Releases: mobxjs/mobx-state-tree
v6.0.0-pre.3
Breaking Changes
- Bump typescript from 3.9.10 to 5.3.3 by @thegedge in #2146
- Eliminate
NonEmptyObject
by @thegedge in #2152 - Improved typing for union types by @thegedge in #2151
- fix #1530 array clear replace should produce one patch by @BrianHung in #2073
- Feat/has env and getenv changes by @t49tran in #2163
Features
- We added a new feature,
hasEnv
, to support #2163
Fixes
- Union types will now be fixed, but this also may break TypeScript for some users
- Array operations produce condensed patches when we can, but this may break for some users who relied on the patch generation as it was
- Fix: do not mutate properties object by model constructor: by @dangreen in #2176
- Fix
getMembers
duplicating actions into views by @evinosheaforward in #2174
Tests
- Test: convert to bun:test for tests, remove codecov by @coolsoftwaretyler in #2149
Docs
- Docs/update docs homepage by @coolsoftwaretyler in #2141
- docs: fix typos in docs update by @coolsoftwaretyler in #2142
- Docs: add comparison between React Context/Reducer by @coolsoftwaretyler in #2158
- Docs: add recipe for
mst-form-type
by @sherlockwang in #2168 - Docs: fix broken link by @kylemeenehan in #2165
Community/Developer changes
- Bump typescript from 3.9.10 to 5.3.3 by @thegedge in #2146
- Chore/use bun as a package manager and script runner by @coolsoftwaretyler in #2148
Full Changelog: v5.4.1...v6.0.0-pre.3
v5.4.2
Version 5.4.2 fixes a few regressions, and comes with documentation updates. Thanks to everyone who contributed!
Breaking Changes
No breaking changes
Features
No new features
Fixes
- Fix: do not mutate properties object by model constructor: #2176
- Fix
getMembers
duplicating actions into views #2174
Tests
No new tests
Docs
- Docs: add comparison between React Context/Reducer: #2158
- Docs: fix broken link: #2165
- Docs: add recipe for
mst-form-type
: #2168
New Contributors
Full Changelog: v5.4.1...v5.4.2
v6.0.0-pre.2
Breaking Changes
- Bump typescript from 3.9.10 to 5.3.3 by @thegedge in #2146
- Eliminate
NonEmptyObject
by @thegedge in #2152 - Improved typing for union types by @thegedge in #2151
- fix #1530 array clear replace should produce one patch by @BrianHung in #2073
- Feat/has env and getenv changes by @t49tran in #2163
Features
- We added a new feature,
hasEnv
, to support #2163
Fixes
- Union types will now be fixed, but this also may break TypeScript for some users
- Array operations produce condensed patches when we can, but this may break for some users who relied on the patch generation as it was
Tests
No new test-only contributions
Docs
- Docs/update docs homepage by @coolsoftwaretyler in #2141
- docs: fix typos in docs update by @coolsoftwaretyler in #2142
- Docs: add comparison between React Context/Reducer by @coolsoftwaretyler in #2158
Community/Developer changes
- Bump typescript from 3.9.10 to 5.3.3 by @thegedge in #2146
- Chore/use bun as a package manager and script runner by @coolsoftwaretyler in #2148
What's Changed
New Contributors
Full Changelog: v5.4.1...v6.0.0-pre.2
v5.4.2-pre.1
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 NonEmptyObject
. If a project had relied on that for any kind of type casting, I think that could also be seen as a breaking change.
And of course, we've moved to TypeScript 5.3.3
, which shouldn't have a direct impact downstream, but we have previously only called out TS 3.0 or later. This is not strictly a breaking change, and it's technically in line with "TypeScript 3.0 or later", but it could be seen as disruptive to move so far ahead in TypeScript without ample warning in our version.
Breaking Changes
- Improved typing for union types by @thegedge in #2151 (maybe, see introduction)
- Eliminate
NonEmptyObject
by @thegedge in #2152 (maybe, see introduction) - Bump typescript from 3.9.10 to 5.3.3 by @thegedge in #2146
Features
- No new features
Fixes
Tests
- No test-only additions.
Docs
- Docs/update docs homepage by @coolsoftwaretyler in #2141
- chore: version bump to 5.4.2-pre.1 by @coolsoftwaretyler in #2159
- docs: fix typos in docs update by @coolsoftwaretyler in #2142
Community/Developer changes
- Chore/use bun as a package manager and script runner by @coolsoftwaretyler in #2148
New Contributors
Full Changelog: v5.4.1...v5.4.2-pre.1
v5.4.1
Version 5.4.1 fixes a small import bug, and updates tests and documentation. Thanks to everyone who contributed!
Breaking Changes
No breaking changes
Features
No new features
Fixes
Tests
- test: add t.number tests by @coolsoftwaretyler in #2123
- test: add tests for boolean primitive by @coolsoftwaretyler in #2124
- test: add tests for types.Date by @coolsoftwaretyler in #2125
- test: write tests for object-node class by @coolsoftwaretyler in #2127
Docs
- fix: documentation typo by @jonstuebe in #2129
- Docs: update docs to match the code for addMiddleware by @kylemeenehan in #2135
- chore: bump version, build docs, deploy docs by @coolsoftwaretyler in #2139
New Contributors
- @jonstuebe made their first contribution in #2129
Full Changelog: v5.4.0...v5.4.1
v5.4.0
Version 5.4.0
brings performance improvements and improved developer experience around importing types
as t
, and passing nodes
to postProcess
snapshot operations.
Breaking Changes
- No breaking changes
Features
- feat: add t export, update documentation by @coolsoftwaretyler in #2117
- feat: pass the node to postProcess snapshot transformers by @airhorns in #2116
Fixes
- perf: make model creation faster by @coolsoftwaretyler in #2113
Tests
- test: add tests for string primitive by @coolsoftwaretyler in #2121
Docs
- chore: bump docs and build for v5.3.0 by @coolsoftwaretyler in #2108
- chore: 5.4.0-pre.1 release chores by @coolsoftwaretyler in #2118
New Contributors
Full Changelog: v5.3.0...v5.4.0
v5.4.0-pre.1
This is a pre-release version that introduces some new quality-of-life improvements to existing APIs, and possible performance improvements. Please give it a try and let us know what you think!
Breaking Changes
- No breaking changes
Features
- feat: add t export, update documentation by @coolsoftwaretyler in #2117
- feat: pass the node to postProcess snapshot transformers by @airhorns in #2116
Fixes
- perf: make model creation faster by @coolsoftwaretyler in #2113
Docs
- chore: bump docs and build for v5.3.0 by @coolsoftwaretyler in #2108
- chore: 5.4.0-pre.1 release chores by @coolsoftwaretyler in #2118
New Contributors
Full Changelog: v5.3.0...v5.4.0-pre.1
v5.3.1-alpha.1
What's Changed
- chore: bump docs and build for v5.3.0 by @coolsoftwaretyler in #2108
- perf: make model creation faster by @coolsoftwaretyler in #2113
Full Changelog: v5.3.0...v5.3.1-alpha.1
We cut this release with a small change set because we wanted to get real-world testing on the changes in #2113. If you want to help MST get faster out of the box, please try v5.3.1-alpha.1 and report any improvements in speed, regression in speed, or regressions in functionality you experience.
v5.3.0
Breaking Changes
- No breaking changes
Features
- Add number types to map model methods by @a-hassanzadeh-h in #2079
Fixes
- perf: use push instead of unshift by @BrianHung in #2082
- use mobx type for map initial data by @BrianHung in #2072
- perf: use map instead of weak map by @BrianHung in #2084
- return undefined in resolveNodeByPathParts when failIfResolveFails = false by @BrianHung in #2071
Docs
- Add union tips by @chakrihacker in #2078
- Clarify wording and fix old link in philosophy.md by @StefanWallin in #2093
- Fix wording and discuss a bad link in philosophy.md by @StefanWallin in #2094
Development/community
- chore: add community docs by @coolsoftwaretyler in #2090
- chore: remove immer open collective link by @coolsoftwaretyler in #2086
- Chore/remove mst middlewares package by @coolsoftwaretyler in #2091
New Contributors
- @StefanWallin made their first contribution in #2093
- @a-hassanzadeh-h made their first contribution in #2079
Full Changelog: 5.2.0...v5.3.0
v5.3.0-alpha.1
This alpha release was built and shipped from the branch in #2099. We did that to make sure none of the configuration changes broke our deployment processes, but also shipped some changes.
Once we get a few weeks of usage data and verify things are good, we can ship a full 5.3.0
. I'm feeling optimistic about doing that shortly.
Breaking Changes
- No breaking changes
Features
- Add number types to map model methods by @a-hassanzadeh-h in #2079
Fixes
- perf: use push instead of unshift by @BrianHung in #2082
- use mobx type for map initial data by @BrianHung in #2072
- perf: use map instead of weak map by @BrianHung in #2084
- return undefined in resolveNodeByPathParts when failIfResolveFails = false by @BrianHung in #2071
Docs
- Add union tips by @chakrihacker in #2078
- Clarify wording and fix old link in philosophy.md by @StefanWallin in #2093
- Fix wording and discuss a bad link in philosophy.md by @StefanWallin in #2094
Development/community
- chore: add community docs by @coolsoftwaretyler in #2090
- chore: remove immer open collective link by @coolsoftwaretyler in #2086
- Chore/remove mst middlewares package by @coolsoftwaretyler in #2091
New Contributors
- @StefanWallin made their first contribution in #2093
- @a-hassanzadeh-h made their first contribution in #2079
Full Changelog: 5.2.0...v5.3.0-alpha.1