Currently some tests are failing due to the new behaviour, I'm still working
my way through them. There's a script you can run at test/npm-compatibility/
that will test the behaviour of npm for updates/installs in a bunch of different
scenarios, and tests that make sure the behaviour of the generator is aligned.
npm install <pkg> bumps the version of <pkg> to latest, and only bumps
transitive dependencies if they're out of range.
npm update <pkg> has exactly the same behaviour as 1 in all tested cases.
npm install bumps the versions of anything that is out of range, but keeps
versions of in-range primaries and secondaries.
npm update bumps the versions of everthing to latest.
The changes to latest that I've made:
the latest and freeze generator options have both been deprecated in
favour of a ResolutionOptions object that you can optionally pass into
install/link/update.
ResolutionsOptions contains mode, latestPrimaries, latestSecondaries
and freeze fields. I had to split into the two cases for latest to make
sure that npm install <pkg> doesn't bump secondaries, but does bump
primaries.
When none of the latest/freeze resolution options are set, the default
is to take existing locks whenever they are in range.
Currently some tests are failing due to the new behaviour, I'm still working my way through them. There's a script you can run at
test/npm-compatibility/
that will test the behaviour of npm for updates/installs in a bunch of different scenarios, and tests that make sure the behaviour of the generator is aligned.npm install <pkg>
bumps the version of<pkg>
to latest, and only bumps transitive dependencies if they're out of range.npm update <pkg>
has exactly the same behaviour as 1 in all tested cases.npm install
bumps the versions of anything that is out of range, but keeps versions of in-range primaries and secondaries.npm update
bumps the versions of everthing to latest.The changes to
latest
that I've made:latest
andfreeze
generator options have both been deprecated in favour of aResolutionOptions
object that you can optionally pass intoinstall
/link
/update
.ResolutionsOptions
containsmode
,latestPrimaries
,latestSecondaries
andfreeze
fields. I had to split into the two cases for latest to make sure thatnpm install <pkg>
doesn't bump secondaries, but does bump primaries.latest
/freeze
resolution options are set, the default is to take existing locks whenever they are in range.