v5.4.2-pre.1 #2160
-
Version 5.4.2-pre.1 is an important build for everyone to test out, because it includes some TypeScript changes that could be seen as either bug fixes or breaking changes. RFC - should we consider these changes bug fixes (bump to 5.4.2) or breaking changes (bump to 6.0.0)import { t } from "mobx-state-tree";
/**
* In MobX-State-Tree 5.4.1, this is typed as:
* ISimpleType<"Red" | "Orange" | "Green">
*/
const namedEnum = t.enumeration("Color", ["Red", "Orange", "Green"]);
/**
* In MobX-State-Tree 5.4.1, this is typed as:
* ISimpleType<string>
*/
const anonymousEnum = t.enumeration(["Red", "Orange", "Green"]);
/**
* If you use mobx-state-tree@5.4.2-pre.1, both of these will be typed as:
* ISimpleType<"Red" | "Orange" | "Green">
*/ CodeSandbox for version 5.4.2-pre.1 It's reasonable to call this change a "bug fix", but for projects that relied on the prior behavior, a patch version might "break" their TypeScript types, if they've typed around our existing bug. The change comes from #2151, which also "fixes" #1525 and #1664 again, by changing types. We have also removed And of course, we've moved to TypeScript Breaking Changes
Features
Fixes
Tests
Docs
Community/Developer changes
New Contributors
Full Changelog: v5.4.1...v5.4.2-pre.1 This discussion was created from the release v5.4.2-pre.1. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Another reason to consider a new major: There's another PR that we've left open for a long time which we could finally merge and ship with a new major version: #2039. That PR is much more clearly breaking - it introduces a new scenario in which MST will throw an error. It could be nice to move up to |
Beta Was this translation helpful? Give feedback.
-
Considering Jamon's opinion, and conversations we had at the last maintainer meeting, I think we're going to bundle these changes into a major version. We'll do a preview release and keep it in preview for a while in case anyone else is sitting on or needs breaking changes we can bundle together. I'll release that today, and over the next few weeks put together a migration guide. |
Beta Was this translation helpful? Give feedback.
-
Release post for the pre-reelease of 6.0.0: https://github.com/mobxjs/mobx-state-tree/releases/tag/v6.0.0-pre.2 |
Beta Was this translation helpful? Give feedback.
Considering Jamon's opinion, and conversations we had at the last maintainer meeting, I think we're going to bundle these changes into a major version. We'll do a preview release and keep it in preview for a while in case anyone else is sitting on or needs breaking changes we can bundle together.
I'll release that today, and over the next few weeks put together a migration guide.