Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
I've published a few npm packages recently and also been working on upgrading to React@16 at work. I have some rapid fire questions about npm I'm hoping you can help with or at least point me in the right direction. Two of them I actually asked on SO but haven't had any feedback at all. Thanks so much for any thoughts in advance!
Nested dependecy overhead
While upgrading to react@16 on the foreman project I've been thinking about the structure of npm and how dependencies rely on other dependencies and on and on. Each of those dependencies sets a specific version range that it will work with. This whole scenario seems like it could really slow down the upgrade process if you've got a nested dependency that hasn't updated their package.json to support React@16 (or whatever you're moving to). If a package has a React peer dependency of 15.x will it use React@16 anyway? I realize it may break since it hasn't been tested but would it use it?
Set the semver range as npm author
I just published my first npm package on npm and I don’t understand how the semver range is specified.
When I install
Get patch updates with caret on npm package
The caret symbol (^) doesn't seem to include patch updates on
After I published
indicating there is a higher latest version but my semver range doesn't want it.
If I change my semver range to
I would expect this second outcome to be the result when I use the
I read through the docs but I don't see anything that would explain this. Thanks for your help!