Fix package.json dependency declaration#50
Open
zackdotcomputer wants to merge 1 commit intozoom:masterfrom
Open
Fix package.json dependency declaration#50zackdotcomputer wants to merge 1 commit intozoom:masterfrom
zackdotcomputer wants to merge 1 commit intozoom:masterfrom
Conversation
Author
|
Additionally, there's an issue with the latest version where you have imported |
f98bc86 to
81a7a7b
Compare
Author
|
I've updated this to latest. |
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.
There are two issues with the current structure of the package.json file that cause friction for consumers of this package.
dependenciesandpeerDependenciesobjects. This causes confusion as to what packages are actually being installed, asdependenciescauses downstream consumers to download the requirements whilepeerDependenciesdoes not but rather causes package managers to throw warnings if the package requested does not appear as a top-level dependency of the consuming package itself. (Sorry that was the word "package" an awful lot in there - starting to hit semantic exhaustion.) The TLDR here is each package should either be declared as a dependency OR as a peer dependency, but not both. I've opted to fix this in my suggestion by removing the peer dependencies other than react, but I acknowledge that's a personal choice I made because my project does not use redux or lodash. If your intention would be that consuming apps should explicitly install those packages as well, then they also should be moved to peer dependencies and noted in the documentation.react, which is known to cause annoying bugs due to name collisions. Instead, flexible packages like react should be declared with version ranges (here I've suggested using>your specified version for react, and^the specified version for redux).I'm aware that because this SDK is, unfortunately, closed source that it's unlikely you can apply this patch directly. However, since this is causing us active issues in our usage of the SDK, I'm hoping you can incorporate this to your closed source and then issue an update that uses it. I would really appreciate being able to loosen some of our overriding
resolutionsdefinitions to fix type conflicts between your dependencies and our own.