66 KiB
v6.5.0 (2018-11-28):
NEW FEATURES
fc1a8d185Backronymnpm citonpm clean-install. (@zkat)4be51a9cc#81 Adds 'Homepage' to outdated --long output. (@jbottigliero)
BUGFIXES
89652cb9bnpm.community#1661 Fix sign-git-commit options. They were previously totally wrong. (@zkat)414f2d1a1npm.community#1742 Set lowercase headers for npm audit requests. (@maartenba)a34246baf#75 Fixnpm edithandling of scoped packages. (@larsgw)d3e8a7c72npm.community#2303 Make summary output fornpm cigo tostdout, notstderr. (@alopezsanchez)71d8fb4a9npm.community#1377 Close the file descriptor during publish if exiting upload via an error. This will prevent strange error messages when the upload fails and make sure cleanup happens correctly. (@macdja38)
DOCS UPDATES
b1a8729c8#60 Mention --otp flag when prompting for OTP. (@bakkot)bcae4ea81#64 Clarify that git dependencies use the default branch, not justmaster. (@zckrs)15da82690#72bash_completion.ddir is sometimes found in/etcnot/usr/local. (@RobertKielty)8a6ecc793#74 Update OTP documentation fordist-tag addto clarify--otpis needed right now. (@scotttrinh)dcc03ec85#82 Note thatprepareruns when installing git dependencies. (@seishun)a91a470b7#83 Specify that --dry-run isn't available in older versions of npm publish. (@kjin)1b2fabcce#96 Fix inline code tag issue in docs. (@midare)6cc70cc19#68 Add semver link and a note on empty string format todeprecatedoc. (@neverett)61dbbb7c3Fix semver docs after version update. (@zkat)4acd45a3d#78 Correct spelling across various docs. (@hugovk)
DEPENDENCIES
4f761283efiggy-pudding@3.5.1(@zkat)3706db0bcnpm.community#1764ssri@6.0.1(@zkat)83c2b117dbluebird@3.5.2(@petkaantonov)2702f46bdci-info@1.5.1(@watson)4db6c3898config-chain@1.1.1:2 (@dawsbot)70bee4f69glob@7.1.3(@isaacs)e469fd6beopener@1.5.1: Fix browser opening under Windows Subsystem for Linux (WSL). (@thijsputman)03840dcedsemver@5.5.1(@iarna)161dc0b41bluebird@3.5.3(@petkaantonov)bb6f94395graceful-fs@4.1.1:5 (@isaacs)43b1f4c91tar@4.4.8(@isaacs)ab62afcc4npm-packlist@1.1.1:2 (@isaacs)027f06be3ci-info@1.6.0(@watson)
MISCELLANEOUS
27217dae8#70 Automatically audit dependency licenses for npm itself. (@kemitchell)
v6.4.1 (2018-08-22):
BUGFIXES
4bd40f543#42 Prevent blowing up on malformed responses from thenpm auditendpoint, such as with third-party registries. (@framp)0e576f0aa#46 FixNO_PROXYsupport by renaming npm-side config to--noproxy. The environment variable should still work. (@SneakyFish5)d8e811d6a#33 Disableupdate-notifierchecks when a CI environment is detected. (@Sibiraj-S)1bc5b8cea#47 Fix issue wherepostpackscripts would break ifpackwas used with--dry-run. (@larsgw)
DEPENDENCY BUMPS
4c57316d5figgy-pudding@3.4.1(@zkat)85f4d7905cacache@11.2.0(@zkat)d20ac242anpm-packlist@1.1.11: No real changes in npm-packlist, but npm-bundled included a circular dependency fix, as well as adding a proper LICENSE file. (@isaacs)e8d5f4418npm.community#632libcipm@2.0.2: Fixes issue wherenpm ciwasn't running thepreparelifecycle script when installing git dependencies (@edahlseng)a5e6f78e9JSONStream@1.3.4: Fixes memory leak problem when streaming large files (like legacy npm search). (@daern91)3b940331dnpm.community#1042npm-lifecycle@2.1.0: Fixes issue for Windows user where multiplePath/PATHvariables were being added to the environment and breaking things in all sorts of fun and interesting ways. (@JimiC)d612d2ce8npm-registry-client@8.6.0(@iarna)1f6ba1cb1opener@1.5.0(@domenic)37b8f405frequest@2.88.0(@mikeal)bb91a2a14tacks@1.2.7(@iarna)30bc9900aci-info@1.4.0: Adds support for two more CI services (@watson)1d2fa4dddmarked@0.5.0(@joshbruce)
DOCUMENTATION
08ecde292#54 Mention registry terms of use in manpage and registry docs and update language in README for it. (@kemitchell)de956405d#41 Add documentation for--dry-runininstallandpackdocs. (@reconbot)95031b90c#48 Update republish time and lightly reorganize republish info. (@neverett)767699b68#53 Correctnpm@6.4.0release date in changelog. (@charmander)3fea3166e#55 Align command descriptions in help text. (@erik)
v6.4.0 (2018-08-09):
NEW FEATURES
6e9f04b0bnpm/cli#8 Search for authentication token defined by environment variables by preventing the translation layer from env variable to npm option from breaking:_authToken. (@mkhl)84bfd23e7npm/cli#35 Stop filtering out non-IPv4 addresses fromlocal-addrs, making npm actually use IPv6 addresses when it must. (@valentin2105)792c8c709npm/cli#31 configurable audit level for non-zero exitnpm auditcurrently exits with exit code 1 if any vulnerabilities are found of any level. Add a flag of--audit-leveltonpm auditto allow it to pass if only vulnerabilities below a certain level are found. Example:npm audit --audit-level=highwill exit with 0 if only low or moderate level vulns are detected. (@lennym)
BUGFIXES
d81146181npm/cli#32 Don't check for updates to npm when we are updating npm itself. (@olore)
DEPENDENCY UPDATES
A very special dependency update event! Since the release of
node-gyp@3.8.0, an awkward
version conflict that was preventing request from begin flattened was
resolved. This means two things:
- We've cut down the npm tarball size by another 200kb, to 4.6MB
npm auditnow shows no vulnerabilities for npm itself!
Thanks, @rvagg!
866d776c2request@2.87.0(@simov)f861c2b57node-gyp@3.8.0(@rvagg)32e6947c6npm/cli#39colors@1.1.2: REVERT REVERT, newer versions of this library are broken and print ansi codes even when disabled. (@iarna)beb96b92clibcipm@2.0.1(@zkat)348fc91advalidate-npm-package-license@3.0.4: Fixes errors with empty or string-only license fields. (@Gudahtt)e57d34575iferr@1.0.2(@shesek)46f1c6ad4tar@4.4.6(@isaacs)50df1bf69hosted-git-info@2.7.1(@iarna) (@Erveon) (@huochunpeng)
DOCUMENTATION
af98e76ednpm/cli#34 Removenpm publishfrom list of commands not affected by--dry-run. (@joebowbeer)e2b0f0921npm/cli#36 Tweak formatting in repository field examples. (@noahbenham)e2346e770npm/cli#14 Usedprocess.envexamples to make accessing certainnpm run-scriptsenvironment variables more clear. (@mwarger)
v6.3.0 (2018-08-01):
This is basically the same as the prerelease, but two dependencies have been bumped due to bugs that had been around for a while.
v6.3.0-next.0 (2018-07-25):
NEW FEATURES
ad0dd226fnpm/cli#26npm versionnow supports a--preidoption to specify the preid for prereleases. For example,npm version premajor --preid rcwill tag a version like2.0.0-rc.0. (@dwilches)
MESSAGING IMPROVEMENTS
c1dad1e99npm/cli#6 Makenpm audit fixmessage provide better instructions for vulnerabilities that require manual review. (@bradsk88)15c1130feFix missing colon next to tarball url in newnpm viewoutput. (@zkat)21cf0ab68npm/cli#24 Use the default OTP explanation everywhere except when the context is "OTP-aware" (like when setting double-authentication). This improves the overall CLI messaging when prompting for an OTP code. (@jdeniau)
MISC
a9ac8712dnpm/cli#21 Use the extractedstringify-packagepackage. (@dpogue)9db15408cnpm/cli#27wrappywas previously added to dependencies in order to flatten it, but we no longer do legacy-style for npm itself, so it has been removed frompackage.json. (@rickschubert)
DOCUMENTATION
3242baf08npm/cli#13 Update more dead links in README.md. (@u32i64)06580877bnpm/cli#19 Update links in docs'index.htmlto refer to new bug/PR URLs. (@watilde)ca03013c2npm/cli#15 Fix some typos in file-specifiers docs. (@Mstrodl)4f39f79bcnpm/cli#16 Fix some typos in file-specifiers and package-lock docs. (@watilde)35e51f79dnpm/cli#18 Update build status badge url in README. (@watilde)a67db5607npm/cli#17 Replace TROUBLESHOOTING.md with posts in npm.community. (@watilde)e115f9de6npm/cli#7 Use https URLs in documentation when appropriate. Happy Not Secure Day! (@XhmikosR)
v6.2.0 (2018-07-13):
In case you missed it, we moved!. We look forward to seeing future PRs landing in npm/cli in the future, and we'll be chatting with you all in npm.community. Go check it out!
This final release of npm@6.2.0 includes a couple of features that weren't
quite ready on time but that we'd still like to include. Enjoy!
FEATURES
244b18380#20554 Add support for tab-separated output fornpm auditdata with the--parseableflag. (@luislobo)7984206e2#12697 Add newsign-git-commitconfig to control whether the git commit itself gets signed, or just the tag (which is the default). (@tribou)
FIXES
4c32413a5#19418 Do not useSETto fetch the env in git-bash or Cygwin. (@gucong3000)
DEPENDENCY BUMPS
d9b2712a6request@2.81.0: Downgraded to allow better deduplication. This does introduce a bunch ofhoek-related audit reports, but they don't affect npm itself so we consider it safe. We'll upgraderequestagain oncenode-gypunpins it. (@simov)2ac48f863node-gyp@3.7.0(@MylesBorins)8dc6d7640cli-table3@0.5.0:cli-table2is unmaintained and requiredlodash. With this dependency bump, we've removedlodashfrom our tree, which cut back tarball size by another 300kb. (@Turbo87)90c759feenpm-audit-report@1.3.1(@zkat)4231a0a1eAddcli-table3to bundleDeps. (@iarna)322d9c2f1Makestandardhappy. (@iarna)
DOCS
5724983ea#21165 Fix some markdown formatting in npm-disputes.md. (@hchiam)738178315#20920 Explicitly state that republishing an unpublished package requires a 72h waiting period. (@gmattie)f0a372b07Replace references to the old repo or issue tracker. We're at npm/cli now! (@zkat)
v6.2.0-next.1 (2018-07-05):
This is a quick patch to the release to fix an issue that was preventing users
from installing npm@next.
ecdcbd745#21129 Remove postinstall script that depended on source files, thus preventingnpm@nextfrom being installable from the registry. (@zkat)
v6.2.0-next.0 (2018-06-28):
NEW FEATURES
ce0793358#20750 You can now disable the update notifier entirely by using--no-update-notifieror setting it in your config withnpm config set update-notifier false. (@travi)d2ad776f6#20879 Whennpm run-script <script>fails due to a typo or missing script, npm will now do a "did you mean?..." for scripts that do exist. (@watilde)
BUGFIXES
8f033d72d#20948 Fix the regular expression matching inxcode_emulationinnode-gypto also handle version numbers with multiple-digit major versions which would otherwise break under use of XCode 10. (@Trott)c8ba7573aStop trying to hoist/dedupe bundles dependencies. (@iarna)cd698f068#20762 Add synopsis to brief help fornpm auditand suppress trailing newline. (@wyardley)6808ee3bd#20881 Exclude /.github directory from npm tarball. (@styfle)177cbb476#21105 Add suggestion to use a temporary cache instead ofnpm cache clear --force. (@karanjthakkar)
DOCS
7ba3fca00#20855 Direct people to npm.community instead of the GitHub issue tracker on error. (@zkat)88efbf6b0#20859 Fix typo in registry docs. (@strugee)61bf827ae#20947 Fixed a small grammar error in the README. (@bitsol)f5230c90a#21018 Small typo fix in CONTRIBUTING.md. (@reggi)833efe4b2#20986 Document current structure/expectations around package tarballs. (@Maximaximum)9fc0dc4f5#21019 Clarify behavior ofnpm link ../pathshorthand. (@davidgilbertson)3924c72d0#21064 Add missing "if" (@roblourens)
DEPENDENCY SHUFFLE!
We did some reshuffling and moving around of npm's own dependencies. This significantly reduces the total bundle size of the npm pack, from 8MB to 4.8MB for the distributed tarball! We also moved around what we actually commit to the repo as far as devDeps go.
0483f5c5dFlatten and dedupe our dependencies! (@iarna)ef9fa1cebRemove unused direct dependencyansi-regex. (@iarna)0d14b0bc5Reshuffle ansi-regex for better deduping. (@iarna)68a101859Reshuffle strip-ansi for better deduping. (@iarna)0d5251f97Reshuffle is-fullwidth-code-point for better deduping. (@iarna)2d0886632Add fake-registry, npm-registry-mock replacement. (@iarna)
DEPENDENCIES
8cff8eea7tar@4.4.3(@zkat)bfc4f873bpacote@8.1.6(@zkat)532096163libcipm@2.0.0(@zkat)4a512771brequest@2.87.0(@iarna)b7cc48deewhich@1.3.1(@iarna)bae657c28tar@4.4.4(@iarna)3d46e5c4eJSONStream@1.3.3(@iarna)d0a905dafis-cidr@2.0.6(@iarna)4fc1f815fmarked@0.4.0(@iarna)f72202944tap@12.0.1(@iarna)bdce96eb3npm-profile@3.0.2(@iarna)fe4240e85uuid@3.3.2(@zkat)
v6.1.0 (2018-05-17):
FIX WRITE AFTER END ERROR
First introduced in 5.8.0, this finally puts to bed errors where you would
occasionally see Error: write after end at MiniPass.write.
171f3182fnode-tar#180 npm.community#35pacote@8.1.5: Fix write-after-end errors. (@zkat)
DETECT CHANGES IN GIT SPECIFIERS
0e1726c03We can now determine if the commitid of a git dependency in the lockfile is derived from the specifier in the package.json and if it isn't we now trigger an update for it. (@iarna)
OTHER BUGS
442d2484f2f0c88351631d30a34When requesting the update of a direct dependency that was also a transitive dependency to a version incompatible with the transitive requirement and you had a lock-file but did not have anode_modulesfolder then npm would fail to provide a new copy of the transitive dependency, resulting in an invalid lock-file that could not self heal. (@iarna)be5dd0f49#20715 Cleanup output ofnpm cisummary report. (@legodude17)98ffe4adbNode.js now has a test that scans for things that look like conflict markers in source code. This was triggering false positives on a fixture in a test of npm's ability to heal lockfiles with conflicts in them. (@iarna)
DEPENDENCY UPDATES
3f2e306b8Usingnpm audit fix, replace some transitive dependencies with security issues with versions that don't have any. (@iarna)1d07134e0tar@4.4.1: Dropping to 4.4.1 from 4.4.2 due to https://github.com/npm/node-tar/issues/183 (@zkat)
v6.1.0-next.0 (2018-05-17):
Look at that! A feature bump! npm@6 was super-exciting not just because it
used a bigger number than ever before, but also because it included a super
shiny new command: npm audit. Well, we've kept working on it since then and
have some really nice improvements for it. You can expect more of them, and the
occasional fix, in the next few releases as more users start playing with it and
we get more feedback about what y'all would like to see from something like
this.
I, for one, have started running it (and the new subcommand...) in all my projects, and it's one of those things that I don't know how I ever functioned -without- it! This will make a world of difference to so many people as far as making the npm ecosystem a higher-quality, safer commons for all of us.
This is also a good time to remind y'all that we have a new RFCs repository, along with a new process for them. This repo is open to anyone's RFCs, and has already received some great ideas about where we can take the CLI (and, to a certain extent, the registry). It's a great place to get feedback, and completely replaces feature requests in the main repo, so we won't be accepting feature requests there at all anymore. Check it out if you have something you'd like to suggest, or if you want to keep track of what the future might look like!
NEW FEATURE: npm audit fix
This is the biggie with this release! npm audit fix does exactly what it says
on the tin. It takes all the actionable reports from your npm audit and runs
the installs automatically for you, so you don't have to try to do all that
mechanical work yourself!
Note that by default, npm audit fix will stick to semver-compatible changes,
so you should be able to safely run it on most projects and carry on with your
day without having to track down what breaking changes were included. If you
want your (toplevel) dependencies to accept semver-major bumps as well, you can
use npm audit fix --force and it'll toss those in, as well. Since it's running
the npm installer under the hood, it also supports --production and
--only=dev flags, as well as things like --dry-run, --json, and
--package-lock-only, if you want more control over what it does.
Give it a whirl and tell us what you think! See npm help audit for full docs!
OTHER NEW audit FEATURES
1854b1c7f#20568 Add support fornpm audit --jsonto print the report in JSON format. (@finnp)85b86169d#20570 Include number of audited packages innpm installsummary output. (@zkat)957cbe275npm-audit-report@1.2.1: Overhaul audit install and detail output format. The new format is terser and fits more closely into the visual style of the CLI, while still providing you with the important bits of information you need. They also include a bit more detail on the footer about what actions you can take! (@zkat)
NEW FEATURE: GIT DEPS AND npm init <pkg>!
Another exciting change that came with npm@6 was the new npm init command
that allows for community-authored generators. That means you can, for example,
do npm init react-app and it'll one-off download, install, and run
create-react-app for you, without requiring
or keeping around any global installs. That is, it basically just calls out to
npx.
The first version of this command only really supported registry dependencies, but now, @jdalton went ahead and extended this feature so you can use hosted git dependencies, and their shorthands.
So go ahead and do npm init facebook/create-react-app and it'll grab the
package from the github repo now! Or you can use it with a private github
repository to maintain your organizational scaffolding tools or whatnot. ✨
BUGFIXES
a41c0393c#20538 Make the newnpm viewwork when the license field is an object instead of a string. (@zkat)eb7522073#20582 Add support for environments (like Docker) where the expected binary for opening external URLs is not available. (@bcoe)212266529#20536 Fix a spurious colon in the new update notifier message and add support for the npm canary. (@zkat)5ee1384d0#20597 Infer a version range when apackage.jsonhas a dist-tag instead of a version range in one of its dependency specs. Previously, this would cause dependencies to be flagged as invalid. (@zkat)4fa68ae41#20585 Make sure scoped bundled deps are shown in the new publish preview, too. (@zkat)1f3ee6b7ecacache@11.0.2: Stop droppingsizefrom metadata onnpm cache verify. (@jfmartinez)91ef93691#20513 Fix nested command aliases. (@mmermerkaya)18b2b3cf7npm-lifecycle@2.0.3: Make sure different versions of thePathenv var on Windows all getnode_modules/.binprepended when running lifecycle scripts. (@laggingreflex)
DOCUMENTATION
a91d87072#20550 Update required node versions in README. (@legodude17)bf3cfa7b8Pull in changelogs from the lastnpm@5release. (@iarna)b2f14b14c#20629 Make tone inpublishConfigdocs more neutral. (@jeremyckahn)
DEPENDENCY BUMPS
5fca4eae8byte-size@4.0.3(@75lb)d9ef3fba7lru-cache@4.1.3(@isaacs)f1baf011arequest@2.86.0(@simonv)005fa5420require-inject@1.4.3(@iarna)1becdf09atap@11.1.5(@isaacs)
v6.0.1 (2018-05-09):
AUDIT SHOULDN'T WAIT FOREVER
This will likely be reduced further with the goal that the audit process shouldn't noticibly slow down your builds regardless of your network situation.
Looking forward
We're still a way from having node@11, so now's a good time to ensure we don't warn about being used with it.
v6.0.1-next.0 (2018-05-03):
CTRL-C OUT DURING PACKAGE EXTRACTION AS MUCH AS YOU WANT!
b267bbbb9npm/lockfile#29lockfile@1.0.4: Switches tosignal-exitto 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 (name@version) to your package-lock.json
as https:// URLs instead of versions.
89102c0d9When saving the lock-file compute how the dependency is being required instead of using_resolvedin thepackage.json. This fixes the bug that was converting registry dependencies intohttps://dependencies. (@iarna)676f1239aWhen 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.jsonfiles produced by 6.0.0 (@iarna)
AUDIT AUDIT EVERYWHERE
You can't use it quite yet, but we do have a few last moment patches to npm audit to make
it even better when it is turned on!
b2e4f48f5Make sure we hide stream errors on background audit submissions. Previously some classes of error could end up being displayed (harmlessly) during installs. (@iarna)1fe0c7feaInclude session and scope in requests (as we do in other requests to the registry). (@iarna)d04656461Exit with non-zero status when vulnerabilities are found. So you can havenpm auditas a test or prepublish step! (@iarna)fcdbcbaccVerify 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)2ac8edd42Refuse to run in global mode. Audits require a lockfile and globals don't have one. Yet. (@iarna)
DOCUMENTATION IMPROVEMENTS
b7fca1084#20407 Update the lock-file spec doc to mention that we now generate the from field forgit-type dependencies. (@watilde)7a6555e61#20408 Describe what the colors in outdated mean. (@teameh)
DEPENDENCY UPDATES
5e56b3209npm-audit-report@1.0.8(@evilpacket)58a0b31b4lock-verify@2.0.2(@iarna)e7a8c364fzkat/pacote#148pacote@8.1.1(@redonkulus)46c0090a5tar@4.4.2(@isaacs)8a16db3e3update-notifier@2.5.0(@alexccl)696375903safe-buffer@5.1.2(@feross)c949eb26aquery-string@6.1.0(@sindresorhus)
v6.0.0 (2018-04-20):
Hey y'all! Here's another npm@6 release -- with node@10 around the corner,
this might well be the last prerelease before we tag 6.0.0! There's two major
features included with this release, along with a few miscellaneous fixes and
changes.
EXTENDED npm init SCAFFOLDING
Thanks 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 or npm init esm to scaffold an
npm package by running create-react-app and create-esm, respectively. This
also adds an npm create alias, to correspond to Yarn's yarn create feature,
which inspired this.
008a83642ed81d1426833046e45#20303 Add annpm initfeature that calls out tonpxwhen 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 for npm audit
online. You
can disable this altogether by doing npm config set audit false, but will no
longer benefit from the service.
f4bc648ea#20389npm-registry-fetch@1.1.0(@iarna)594d16987#20389npm-audit-report@1.0.5(@iarna)8c77dde741d8ac2492552ff6d6409c734803#20389 Add newnpm auditcommand. (@iarna)be393a290#20389 Temporarily suppress git metadata till there's an opt-in. (@iarna)8e713344f#20389 Document the new command. (@iarna)- #20389 Default audit to off when running the npm test suite itself. (@iarna)
MORE package-lock.json FORMAT CHANGES?!
820f74ae2#20384 Addfromfield 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-onlymode when there's nonode_modules. This should help remove a significant amount of git-related churn on the lock-file. (@zkat)
BUGFIXES
9d5d0a18a#20358npm install-test(akanpm it) will no longer generatepackage-lock.jsonwhen running with--no-package-lockorpackage-lock=false. (@raymondfeng)e4ed976e22facb35fb9c1eb945b#20390 Fix a scenario where a git dependency had a comittish associated with it that was not a complete commitid.npmwould never consider that entry in thepackage.jsonas matching the entry in thepackage-lock.jsonand this resulted in inappropriate pruning or reinstallation of git dependencies. This has been addressed in two ways, first, the addition of thefromfield as described in #20384 means we can exactly match thepackage.json. Second, when that's missing (when working with olderpackage-lock.jsonfiles), we assume that the match is ok. (If it's not, we'll fix it up when a real installation is done.) (@iarna)
DEPENDENCIES
DOCS
a1c77d614#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)ad7a5962d#20279 Document the--if-presentoption fornpm run-script. (@aleclarson)
v6.0.0-next.1 (2018-04-12):
NEW FEATURES
a9e722118#20256 Add support for managing npm webhooks. This brings over functionality previously provided by thewombatCLI. (@zkat)8a1a64203#20126 Addnpm citcommand that's equivalent ofnpm ci && npm tthat's equivalent ofnpm it. (@SimenB)fe867aaf149d18b4d8ff6b31f7778eab3cdaTherequiresfield in your lock-file will be upgraded to use ranges from versions on your first use of npm. (@iarna)cf4d7b4de#20257 Add shasum and integrity to the newnpm viewoutput. (@zkat)
BUG FIXES
-
685764308Fix a bug where OTPs passed in via the commandline would have leading zeros deleted resulted in authentication failures. (@iarna) -
8f3faa3236800f76ffec90c06c7825b5d2c64785f13fbbd16485f5Restore the ability to bundle dependencies that are uninstallable from the registry. This also eliminates needless registry lookups for bundled dependencies.Fixed a bug where attempting to install a dependency that is bundled inside another module without reinstalling that module would result in ENOENT errors. (@iarna)
-
429498a8c#20029 Allow packages with non-registry specifiers to follow the fast path that the we use with the lock-file for registry specifiers. This will improve install time especially when operating only on the package-lock (--package-lock-only). (@zkat)Fix the a bug where
npm i --only=prodcould remove development dependencies from lock-file. (@iarna) -
834b46ff4#20122 Improve the update-notifier messaging (borrowing ideas from pnpm) and eliminate false positives. (@zkat) -
f9de7ef3a#20154 Let version succeed whenpackage-lock.jsonis gitignored. (@nwoltman) -
f8ec52073#20212 Ensure that we only create anetcdirectory if we are actually going to write files to it. (@buddydvd) -
ab489b753#20140 Note in documentation thatpackage-lock.jsonversion gets touched bynpm version. (@srl295) -
857c2138d#20032 Fix bug where unauthenticated errors would get reported as both 404s and 401s, i.e.npm ERR! 404 Registry returned 401. In these cases the error message will now be much more informative. (@iarna) -
d2d290bca#20082 Allow optional @ prefix on scope withnpm teamcommands for parity with other commands. (@bcoe) -
b5babf0a9#19580 Improve messaging when two-factor authentication is required while publishing. (@jdeniau) -
471ee1c5b0da38b7b4Fix a bug where optional status of a dependency was not being saved to the package-lock on the initial install. (@iarna) -
b3f98d8ba9dea95e31Ensure that--no-optionaldoes not remove optional dependencies from the lock-file. (@iarna)
MISCELLANEOUS
DEPENDENCY UPDATES
73dc97455zkat/cipm#46libcipm@1.6.2: Detect binding.gyp for default install lifecycle. Let'snpm ciwork on projects that have their own C code. (@caleblloyd)77c3f7a00iferr@1.0.0dce733e37zkat/json-parse-better-errors#1json-parse-better-errors@1.0.2(@Hoishin)c52765ff3readable-stream@2.3.6(@mcollina)e160adf9fupdate-notifier@2.4.0(@sindersorhus)9a9d7809emarked@0.3.1(@joshbruce)f2fbd8577#20256figgy-pudding@2.0.1(@zkat)44972d53d#20256libnpmhook@3.0.0(@zkat)cfe562c58#20276node-gyp@3.6.23c0bbcb8ezkat/npx#172libnpx@10.1.1(@jdalton)0573d91e5zkat/cacache#128cacache@11.0.1(@zkat)396afa99ffiggy-pudding@3.1.0(@zkat)e7f869c36pacote@8.0.0(@zkat)77dac72dfssri@6.0.0(@zkat)0b802f2a0retry@0.12.0(@iarna)4781b64bclibnpmhook@4.0.1(@zkat)7bdbaeea6npm-package-arg@6.1.0(@zkat)5f2bf4222read-package-tree@5.2.1(@zkat)
v6.0.0-0 (2018-03-23):
Sometimes major releases are a big splash, sometimes they're something
smaller. This is the latter kind. That said, we expect to keep this in
release candidate status until Node 10 ships at the end of April. There
will likely be a few more features for the 6.0.0 release line between now
and then. We do expect to have a bigger one later this year though, so keep
an eye out for npm@7!
BREAKING AVOID DEPRECATED
When selecting versions to install, we now avoid deprecated versions if possible. For example:
Module: example
Versions:
1.0.0
1.1.0
1.1.2
1.1.3 (deprecated)
1.2.0 (latest)
If you ask npm to install example@~1.1.0, npm will now give you 1.1.2.
By contrast, if you installed example@~1.1.3 then you'd get 1.1.3, as
it's the only version that can match the range.
BREAKING UPDATE AND OUTDATED
When npm install is finding a version to install, it first checks to see
if the specifier you requested matches the latest tag. If it doesn't,
then it looks for the highest version that does. This means you can do
release candidates on tags other than latest and users won't see them
unless they ask for them. Promoting them is as easy as setting the latest
tag to point at them.
Historically npm update and npm outdated worked differently. They just
looked for the most recent thing that matched the semver range, disregarding
the latest tag. We're changing it to match npm install's behavior.
3aaa6ef42Make update and outdated respect latest interaction with semver as install does. (@iarna)e5fbbd2c9npm-pick-manifest@2.1.0(@iarna)
PLUS ONE SMALLER PATCH
Technically this is a bug fix, but the change in behavior is enough of an edge case that I held off on bringing it in until a major version.
When we extract a binary and it starts with a shebang (or "hash bang"), that is, something like:
#!/usr/bin/env node
If the file has Windows line endings we strip them off of the first line. The reason for this is that shebangs are only used in Unix-like environments and the files with them can't be run if the shebang has a Windows line ending.
Previously we converted ALL line endings from Windows to Unix. With this patch we only convert the line with the shebang. (Node.js works just fine with either set of line endings.)
8146583717265198ebbin-links@1.1.2: Only rewrite the CR after a shebang (if any) when fixing up CR/LFs. (@iarna)
BREAKING SUPPORTED NODE VERSIONS
Per our supported Node.js policy, we're dropping support for both Node 4 and Node 7, which are no longer supported by the Node.js project.