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

immer autofreeze set to false during production #76

Closed
wants to merge 13 commits into from

Conversation

Gregjarvez
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 98.352% when pulling e2518a1 on Gregjarvez:master into 7290670 on mweststrate:master.

@mweststrate
Copy link
Collaborator

Hey @Gregjarvez

thanks for the PR! It seems the PR is based on a very old master. Would you be able to reapply the changes to the most recent version of immer?

A few comments on the PR: please keep autoFreeze a let variable (it can in the latest master be found in src/common.js.

Looking at the autofreeze check, I think your solution to check if the source are minified are pretty nice. So I think the check in the end could be:

let autoFreeze = (typeof process != "undefined" && process.env && process.env === "production") || verifyMinified.name === 'verifyMinified'

I think the typeof checks are nice to add to make it failsafe against build environments that don't substitute process.env, for example when the build system is not webpack.

@Gregjarvez
Copy link
Contributor Author

sure @mweststrate I will apply those changes soon. however whenever I pull i get merge conflicts and so one although I almost always have not made any changes

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 98.623% when pulling 8a31b05 on Gregjarvez:master into 7290670 on mweststrate:master.

@mweststrate
Copy link
Collaborator

mweststrate commented Jan 20, 2018 via email

@Gregjarvez
Copy link
Contributor Author

Will do that for my next pull request? @mweststrate

@mweststrate
Copy link
Collaborator

Manually picked the relevant changes, as that would be less work then merging.

Thanks!

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.

3 participants