The npm blog has been discontinued.
Updates from the npm team are now published on the GitHub Blog and the GitHub Changelog.
v5.7.0
Hey y'all, it’s been a while. Expect our release rate to increase back to normal here, as we’ve got a lot in the pipeline. Right now we’ve got a bunch of things from folks at npm. In the next release we’ll be focusing on user contributions and there are a lot of them queued up!
This release brings a bunch of exciting new features and bug fixes.
PACKAGE-LOCK GIT MERGE CONFLICT RESOLUTION
Allow npm install to fix package-lock.json and npm-shrinkwrap.json files that have merge conflicts in them without your having to edit them. It works in conjunction with npm-merge-driver to entirely eliminate package-lock merge conflicts.
NPM CI
The new npm ci command installs from your lock-file ONLY. If your package.json and your lock-file are out of sync then it will report an error.
It works by throwing away your node_modules and recreating it from scratch.
Beyond guaranteeing you that you’ll only get what is in your lock-file it’s also much faster (2x-10x!) than npm install when you don’t start with a node_modules.
As you may take from the name, we expect it to be a big boon to continuous integration environments. We also expect that folks who do production deploys from git tags will see major gains.
OTHER NEW FEATURES
4d418c21b#19817 Include contributor count in installation summary. (@kemitchell)17079c2a8Require password to change email throughnpm profile. (@iarna)e7c5d226a4f5327c05#19780 Add support for web-based logins. This is not yet available on the registry, however. (@isaacs)
BIG FIXES TO PRUNING
827951590Handle runningnpm install package-namewith anode_modulescontaining packages without sufficient metadata to verify their origin. The only way to get install packages like this is to use a non-npmpackage manager. Previouslynpmremoved any packages that it couldn’t verify. Now it will leave them untouched as long as you’re not asking for a full install. On a full install they will be reinstalled (but the same versions will be maintained).This will fix problems for folks who are using a third party package manager to install packages that have
postinstallscripts that runnpm install. (@iarna)3b305ee71Only auto-prune on installs that will create a lock-file. This restoresnpm@4compatible behavior when the lock-file is disabled. When using a lock-filenpmwill continue to remove anything in yournode_modulesthat’s not in your lock-file. (@iarna)cec5be542Fix bug wherenpm prune --productionwould remove dev deps from the lock file. It will now only remove them fromnode_modulesnot from your lock file. (@iarna)857dab03fFix bug where git dependencies would be removed or reinstalled when installing other dependencies. (@iarna)
BUG FIXES TO TOKENS AND PROFILES
a66e0cd03For CIDR filtered tokens, allow comma separated CIDR ranges, as documented. Previously you could only pass in multiple cidr ranges with multiple--cidrcommand line options. (@iarna)d259ab014Fix token revocation when an OTP is required. Previously you had to pass it in via--otp. Now it will prompt you for an OTP like othernpm tokencommands. (@iarna)f8b1f6aecUpdate token and profile commands to support legacy (username/password) authentication. (The npm registry uses tokens, not username/password pairs, to authenticate commands.) (@iarna)
OTHER BUG FIXES
6954dfc19Fix a bug where packages would get pushed deeper into the tree when upgrading without an existing copy on disk. Having packages deeper in the tree ordinarily is harmless but is not when peerDependencies are in play. (@iarna)1ca916a1eFix bug where when switching from a linked module to a non-linked module, the dependencies of the module wouldn’t be installed on the first run ofnpm install. (@iarna)8c120ebb2Fix integrity matching to eliminate spurious EINTEGRITY errors. (@zkat)94227e15eMore consistently make directories using perm and ownership preserving features. (@iarna)
DEPENDENCY UPDATES
364b23c7ff2049f9e7cacache@10.0.4(@zkat)d183d7675find-npm-prefix@1.0.2: (@iarna)ffd6ea62cfs-minipass@1.2.5ee63b8a31ini@1.3.5(@isaacs)6f73f5509JSONStream@1.3.2(@dominictarr)26cd648699bc6230cflibcipm@1.3.3(@zkat)21a39be42marked@0.3.1:5 (@joshbruce)dabdf57b2mississippi@2.0.02594c5867npm-registry-couchapp@2.7.1(@iarna)8abb3f230osenv@0.1.5(@isaacs)11a0b00bdpacote@7.3.3(@zkat)9b6bdb2c7query-string@5.1.0(@sindresorhus)d6d17d6b5readable-stream@2.3.4(@mcollina)51370aad5semver@5.5.0(@isaacs)0db14bac781da938ab9999e83f8ssri@5.2.4(@zkat)f526992abtap@11.1.1(@isaacs)be096b409dc3059522tar@4.3.36b552daacuuid@3.2.1(@broofa)8c9011b72worker-farm@1.5.2(@rvagg)