Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Immer to 8.x #821

Merged
merged 5 commits into from Nov 27, 2020
Merged

Update Immer to 8.x #821

merged 5 commits into from Nov 27, 2020

Conversation

markerikson
Copy link
Collaborator

@markerikson markerikson commented Nov 27, 2020

Fixes #809 .

This PR:

  • Bumps shelljs to 0.8.4 to fix some annoying import warnings
  • Adds a test that specifically imports Immer with NODE_ENV === 'production', then tries to mutate state from a reducer and expects an error. Under Immer 7, that test fails because it's an unfrozen POJO and the mutation runs without error
  • Updates Immer to 8.x. Since Immer 8 autofreezes in prod, the test throws an error as expected and now passes.

My one concern atm is the Immer docs advice to consider "pre-freezing large data ahead of time":

https://immerjs.github.io/immer/docs/freezing

do we need to note this ourselves somewhere? should we be re-exporting freeze() or something?

@netlify
Copy link

netlify bot commented Nov 27, 2020

Deploy preview for redux-starter-kit-docs ready!

Built with commit 2e6ce7e

https://deploy-preview-821--redux-starter-kit-docs.netlify.app

@markerikson markerikson changed the base branch from master to v1.5.0-integration November 27, 2020 19:43
@github-actions
Copy link

Size Change: +158 B (0%)

Total Size: 64.4 kB

Filename Size Change
dist/redux-toolkit.umd.js 24.3 kB +78 B (0%)
dist/redux-toolkit.umd.min.js 10.4 kB +80 B (0%)
ℹ️ View Unchanged
Filename Size Change
dist/index.js 149 B 0 B
dist/redux-toolkit.cjs.development.js 12.4 kB 0 B
dist/redux-toolkit.cjs.production.min.js 4.74 kB 0 B
dist/redux-toolkit.esm.js 12.4 kB 0 B

compressed-size-action

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 27, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 35bcf86:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration
rsk-github-issues-example Configuration

@markerikson
Copy link
Collaborator Author

Uh... CI blew up on this push with some unrelated TS errors. Something about the integration branch, maybe?

@markerikson markerikson merged commit 10ade92 into v1.5.0-integration Nov 27, 2020
@markerikson markerikson deleted the feature/immer-8 branch November 27, 2020 21:58
@markerikson markerikson mentioned this pull request Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants