Make react-native-fs an optional peer dependency#2456
Open
ej612 wants to merge 1 commit intoAlaSQL:developfrom
Open
Make react-native-fs an optional peer dependency#2456ej612 wants to merge 1 commit intoAlaSQL:developfrom
react-native-fs an optional peer dependency#2456ej612 wants to merge 1 commit intoAlaSQL:developfrom
Conversation
So far, `react-native-fs` has been declared under `optionalDependencies`, as alasql will use it if available, but doesn't require it being there. This relation, however, is that of an optional peer dependency, which is contrary to how `optionalDependencies` works, which is that npm will install it by default. To relieve people from having to use custom logic if they don't want to end up with `react-native-fs`, we turn that package into a peer dependency, and use npm's [peerDependenciesMeta](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#peerdependenciesmeta) field to declare it as optional. Note that this is a breaking change as npm will no longer pull in `react-native-fs` by default. Fixes: AlaSQL#2454
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So far,
react-native-fshas been declared underoptionalDependencies, as alasql will use it if available, but doesn't require it to be there. This relation, however, is that of an optional peer dependency, which is contrary to howoptionalDependenciesworks, which is that npm will install it by default. To relieve people from having to use custom logic if they don't want to end up withreact-native-fs, we turn that package into a peer dependency, and use npm's peerDependenciesMeta field to declare it as optional.Note that this is a breaking change as npm will no longer pull in
react-native-fsby default.Fixes: #2454