Closed noahnu closed 3 years ago
@jp928 are you here?=)
@noahnu Thanks for your PR
@jp928 can you publish it to NPM?
Why is @redux-sage/is
listed as a peer dependency here? I thought it was a helper library, and thus used internally, which means that it doesn't matter the version the project using this lib has and can be different from what is used in the lib?
Having this now as a peer dependency, while redux-saga
itself includes it as a normal dependency gives errors in our rush/pnpm setup.
@dietergeerts It's a helper library used internally in redux-saga as well, so it should be compatible with the version of redux-saga being used. Since redux-saga is a peer, @redux-saga/is must also be a peer. Consider what would happen if the symbols were changed in a newer version of redux-saga, or the versions drifted so there were multiple instances of the symbols that are used here: https://github.com/redux-saga/redux-saga/blob/1ecb1bed867eeafc69757df8acf1024b438a79e0/packages/is/src/index.js#L1
@noahnu , with pnpm, you only have access to your own dependencies, for very good reasons, meaning that when redux-saga uses other versions than what we define ourselves, we'll have 2 versions of them like you mention. So a solution would be that both add them as peer then?
Redux-sage includes them as normal dependency, this package includes them as peer dependency. when the versions match, it will be OK, but when they don't match, we will have 2 versions of the packages. But I guess because redux-sage itself is a peer here, that the others will have the same version listed as redux-saga itself, and thus there should be no problems, though it's not 100% safe.
Yarn PnP requires a packageExtension due to the missing peer dependencies.