immerjs / immer

Create the next immutable state by mutating the current one
https://immerjs.github.io/immer/
MIT License
27.69k stars 849 forks source link

fix: don't use `.mjs` file for react-native, which isn't supported by default. Fixes #1058 #1065 #1075

Closed mweststrate closed 1 year ago

mweststrate commented 1 year ago

pre-published as immer@10.0.3-beta

github-actions[bot] commented 1 year ago

Pull Request Test Coverage Report for Build 6285188608


Totals Coverage Status
Change from base Build 4929177933: 0.0%
Covered Lines: 646
Relevant Lines: 647

💛 - Coveralls
markerikson commented 1 year ago

It looks like RN 0.72 will help with this by finally supporting exports properly, but yeah, this might be necessary to support the rest of the ecosystem until they catch up:

markerikson commented 1 year ago

Looking at https://facebook.github.io/metro/docs/package-exports/ , it sounds like Metro currently looks for "react-native", "browser", and "main":

I see that Immer actually does list "react-native". The Redux packages don't, but do list "main", and in our current Redux betas, I am pointing "main" to that similar legacy-esm.js file. So, I think we've got the same net result.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 10.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 6285188608

Details


Totals Coverage Status
Change from base Build 4929177933: 0.0%
Covered Lines: 646
Relevant Lines: 647

💛 - Coveralls