Changelog History
Page 2
-
v5.10.0-next.1 Changes
May 08, 2018EXTENDED
npm init
SCAFFOLDINGThanks to the wonderful efforts of @jdalton of lodash fame,
npm init
can now be used to invoke custom scaffolding tools!๐ฆ You can now do things like
npm init react-app
ornpm init esm
to scaffold an npm package by runningcreate-react-app
andcreate-esm
, respectively. This also adds annpm create
alias, to correspond to Yarn'syarn create
feature, which inspired this.adc009ed4
f363edd04
f03b45fb2
13adcbb52
#20303 #20372 Add annpm init
feature that calls out tonpx
when invoked with positional arguments. (@jdalton)
DEPENDENCY AUDITING
๐ This version of npm adds a new command,
npm audit
, which will run a security audit of your project's dependency tree and notify you about any actions you may need to take.The registry-side services required for this command to work will be available on the main npm registry in the coming weeks. Until then, you won't get much out of trying to use this on the CLI.
๐ As part of this change, the npm CLI now sends scrubbed and cryptographically anonymized metadata about your dependency tree to your configured registry, to allow notifying you about the existence of critical security flaws. For details about how the CLI protects your privacy when it shares this metadata, see
npm help audit
, or read the docs fornpm audit
online. You can disable this altogether by doingnpm config set audit false
, but will no longer benefit from the service.c81dfb91b
[email protected]
(@iarna)b096f44a9
[email protected]
(@iarna)43b20b204
#20389 Add newnpm audit
command. (@iarna)- ๐
49ddb3f56
#20389 Temporarily suppress git metadata till there's an opt-in. (@iarna) 5f1129c4b
#20389 Document the new command. (@iarna)- โ
9a07b379d
#20389 Default audit to off when running the npm test suite itself. (@iarna) a6e2f1284
Make sure we hide stream errors on background audit submissions. Previously some classes of error could end up being displayed (harmlessly) during installs. (@iarna)aadbf3f46
Include session and scope in requests (as we do in other requests to the registry). (@iarna)- โ
7d43ddf63
Exit with non-zero status when vulnerabilities are found. So you can havenpm audit
as a test or prepublish step! (@iarna) bc3fc55fa
Verify lockfile integrity before running. You'd get an error either way, but this way it's faster and can give you more concrete instructions on how to fix it. (@iarna)2ac8edd42
Refuse to run in global mode. Audits require a lockfile and globals don't have one. Yet. (@iarna)
๐ฆ CTRL-C OUT DURING PACKAGE EXTRACTION AS MUCH AS YOU WANT!
- ๐ฆ
663d8b5e5
npm/lockfile#29[email protected]
: Switches tosignal-exit
to detect abnormal exits and remove locks. (@Redsandro)
SHRONKWRAPS AND LACKFILES
๐ If a published modules had legacy
npm-shrinkwrap.json
we were saving ordinary registry dependencies ([email protected]
) to yourpackage-lock.json
ashttps://
URLs instead of versions.- ๐
36f998411
When saving the lock-file compute how the dependency is being required instead of using_resolved
in thepackage.json
. This fixes the bug that was converting registry dependencies intohttps://
dependencies. (@iarna) - ๐
113e1a3af
When encountering ahttps://
URL in our lockfiles that point at our default registry, extract the version and use them as registry dependencies. This lets us healpackage-lock.json
files produced by 6.0.0 (@iarna)
๐ MORE
package-lock.json
FORMAT CHANGES?!- ๐
074502916
#20384 Addfrom
field back into package-lock for git dependencies. This will give npm the information it needs to figure out whether git deps are valid, specially when running with legacy install metadata or in--package-lock-only
mode when there's nonode_modules
. This should help remove a significant amount of git-related churn on the lock-file. (@zkat)
๐ DOCUMENTATION IMPROVEMENTS
- โก๏ธ
e0235ebb6
#20384 Update the lock-file spec doc to mention that we now generate the from field forgit
-type dependencies. (@watilde) 35de04676
#20408 Describe what the colors in outdated mean. (@teameh)
๐ BUGFIXES
- ๐
1b535cb9d
#20358npm install-test
(akanpm it
) will no longer generatepackage-lock.json
when running with--no-package-lock
orpackage-lock=false
. (@raymondfeng) - ๐
268f7ac50
5f84ebdb6
c12e61431
#20390 Fix a scenario where a git dependency had a comittish associated with it that was not a complete commitid.npm
would never consider that entry in thepackage.json
as matching the entry in thepackage-lock.json
and this resulted in inappropriate pruning or reinstallation of git dependencies. This has been addressed in two ways, first, the addition of thefrom
field as described in #20384 means we can exactly match thepackage.json
. Second, when that's missing (when working with olderpackage-lock.json
files), we assume that the match is ok. (If it's not, we'll fix it up when a real installation is done.) (@iarna)
๐ DOCS
- ๐
7b13bf5e3
#20331 Fix broken link to 'private-modules' page. The redirect went away when the new npm website went up, but the new URL is better anyway. (@vipranarayan14) 1c4ffddce
#20279 Document the--if-present
option fornpm run-script
. (@aleclarson)
โก๏ธ DEPENDENCY UPDATES
815d91ce0
[email protected]
(@zkat)- โก๏ธ
02715f19f
[email protected]
(@alexccl) 08c4ddd9e
[email protected]
(@isaacs)53718cb12
[email protected]
(@isaacs)0a20cf546
[email protected]
(@feross)e8c8e844c
[email protected]
(@tim-kos)- ๐ฆ
76c7f21bd
[email protected]
(@zkat) c8b0aa07b
[email protected]
(@sindresorhus)- ๐ฆ
abfd366b4
[email protected]
(@zkat) - ๐
bd29baf83
[email protected]
(@iarna)