diff --git a/deps/npm/.github/CODEOWNERS b/deps/npm/.github/CODEOWNERS new file mode 100644 index 00000000000000..ef8743136d8a1c --- /dev/null +++ b/deps/npm/.github/CODEOWNERS @@ -0,0 +1 @@ +* @npm/cli-team diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index 95255d8d8072bb..e63df7e47bf3e3 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -22,6 +22,9 @@ matrix: # then master - node_js: "8" env: DEPLOY_VERSION=testing + script: + - "standard" + - "node . run tap -- \"test/tap/*.js\" \"test/broken-under-nyc/*.js\"" before_install: # required by test/tap/registry.js - "mkdir -p /var/run/couchdb" @@ -29,25 +32,8 @@ notifications: slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 cache: directories: - - $HOME/.npm - - html/doc - - man - - node_modules/.bin - node_modules/.cache - - node_modules/deep-equal - - node_modules/marked - - node_modules/marked-man - - node_modules/npm-registry-couchapp - - node_modules/npm-registry-mock - - node_modules/require-inject - - node_modules/sprintf-js - - node_modules/standard - - node_modules/tacks - - node_modules/tap install: - - "node . rebuild --depth=0" - - "node . install --ignore-scripts" - - "node . prune" - - "make -j4 doc" + - "node . install" script: - "node . run tap -- \"test/tap/*.js\" \"test/broken-under-nyc/*.js\"" diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 7357c4a1bd5bdd..07f44ab1c17379 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -475,3 +475,31 @@ Jason Wohlgemuth Ryan Graham Hirse Colin Rotherham +Aki +Emily Marigold Klassen +Ramana Venkata +kierendixon +Rácz Tibor Zoltán +Guangcong Luo +Steven +Jan Pilzer +Leonard Martin +Teddy Katz +Simon Legg +Kin Lum +dax +Jože Mlakar +happylynx +Dominic Watson +Enrico Weigelt, metux IT consult +Brian Beck +Ramana Venkata +mmkal +Andrew Schmadel +AJ Jordan +Mark Banner +Richard Simko +Sanketh Katta +Tim Needham +leonardo rojas +Mark Peter Fejes diff --git a/deps/npm/BROKEN.org b/deps/npm/BROKEN.org deleted file mode 100644 index 65b1db9a1de612..00000000000000 --- a/deps/npm/BROKEN.org +++ /dev/null @@ -1,37 +0,0 @@ -* Broken test files - * add-remote-git-get-resolved.js (needs porting to pacote) - * bugs.js (I think because opts.fullMetadata) - * builtin-config.js (freezes) - * check-cpu-reqs.js (uhhh? it's not checking?) - * check-engine-reqs.js (same?) - * check-os-reqs.js (same?) - * doctor.js (needs rewrite) - * full-warning-messages.js - * get.js - * git-npmignore.js - * git-races.js - * github-shortcut.js - * ignore-shrinkwrap.js - * install-shrinkwrapped-git.js - * install-with-dev-dep-duplicate.js - * legacy-npm-self-install.js (one check failed) - * ls-depth-cli.js - * outdated-local.js - * outdated-notarget.js - * outdated-private.js - * peer-deps-invalid.js - * peer-deps-toplevel.js - * peer-deps-without-package-json.js - * repo.js - * retry-on-stale-cache.js - * scope-header.js - * shrinkwrap-default-arg-ver.js - * shrinkwrap-local-dependency.js - * shrinkwrap-optional-dependency.js - * shrinkwrap-optional-property.js - * shrinkwrap-prod-dependency.js - * shrinkwrap-shared-dev-dependency.js - * splat-with-only-prerelease-to-latest.js - * url-dependencies.js - * verify-no-lifecycle-on-repo.js - * network/legacy-shrinkwrap.js diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 03b7e29d91e869..0571c17272e891 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,497 @@ +## v5.3.0 (2017-07-12): + +As mentioned before, we're continuing to do relatively rapid, smaller releases +as we keep working on stomping out `npm@5` issues! We've made a lot of progress +since 5.0 already, and this release is no exception. + +### FEATURES + +* [`1e3a46944`](https://github.com/npm/npm/commit/1e3a469448b5db8376e6f64022c4c0c78cdb1686) + [#17616](https://github.com/npm/npm/pull/17616) + Add `--link` filter option to `npm ls`. + ([@richardsimko](https://github.com/richardsimko)) +* [`33df0aaa`](https://github.com/npm/npm/commit/33df0aaaa7271dac982b86f2701d10152c4177c8) + `libnpx@9.2.0`: + * 4 new languages - Czech, Italian, Turkish, and Chinese (Traditional)! This means npx is available in 14 different languages! + * New --node-arg option lets you pass CLI arguments directly to node when the target binary is found to be a Node.js script. + ([@zkat](https://github.com/zkat)) + +### BUGFIXES + +* [`33df0aaa`](https://github.com/npm/npm/commit/33df0aaaa7271dac982b86f2701d10152c4177c8) + `libnpx@9.2.0`: + * npx should now work on (most) Windows installs. A couple of issues remain. + * Prevent auto-fallback from going into an infinite loop when npx disappears. + * `npx npx npx npx npx npx npx npx` works again. + * `update-notifier` will no longer run for the npx bundled with npm. + * `npx ` in a subdirectory of your project should be able to find your `node_modules/.bin` now. Oops + ([@zkat](https://github.com/zkat)) +* [`8e979bf80`](https://github.com/npm/npm/commit/8e979bf80fb93233f19db003f08443e26cfc5e64) + Revert change where npm stopped flattening modules that required peerDeps. + This caused problems because folks were using peer deps to indicate that the + target of the peer dep needed to be able to require the dependency and had + been relying on the fact that peer deps didn't change the shape of the tree + (as of npm@3). + The fix that will actually work for people is for a peer dep to insist on + never being installed deeper than the the thing it relies on. At the moment + this is tricky because the thing the peer dep relies on may not yet have + been added to the tree, so we don't know where it is. + ([@iarna](https://github.com/iarna)) +* [`7f28a77f3`](https://github.com/npm/npm/commit/7f28a77f33ef501065f22e8d5e8cffee3195dccd) + [#17733](https://github.com/npm/npm/pull/17733) + Split remove and unbuild actions into two to get uninstall lifecycles and the + removal of transitive symlinks during uninstallation to run in the right + order. + ([@iarna](https://github.com/iarna)) +* [`637f2548f`](https://github.com/npm/npm/commit/637f2548facae011eebf5e5c38bfe56a6c2db9fa) + [#17748](https://github.com/npm/npm/pull/17748) + When rolling back use symlink project-relative path, fixing some issues with + `fs-vacuum` getting confused while removing symlinked things. + ([@iarna](https://github.com/iarna)) +* [`f153b5b22`](https://github.com/npm/npm/commit/f153b5b22f647d4d403f5b8cecd2ce63ac75b07c) + [#17706](https://github.com/npm/npm/pull/17706) + Use semver to compare node versions in npm doctor instead of plain `>` + comparison. + ([@leo-shopify](https://github.com/leo-shopify)) +* [`542f7561`](https://github.com/npm/npm/commit/542f7561d173eca40eb8d838a16a0ed582fef989) + [#17742](https://github.com/npm/npm/pull/17742) + Fix issue where `npm version` would sometimes not commit package-locks. + ([@markpeterfejes](https://github.com/markpeterfejes)) +* [`51a9e63d`](https://github.com/npm/npm/commit/51a9e63d31cb5ac52259dcf1c364004286072426) + [#17777](https://github.com/npm/npm/pull/17777) + Fix bug exposed by other bugfixes where the wrong package would be removed. + ([@iarna](https://github.com/iarna)) + +### DOCUMENTATION + +Have we mentioned we really like documentation patches? Keep sending them in! +Small patches are just fine, and they're a great way to get started contributing +to npm! + +* [`fb42d55a9`](https://github.com/npm/npm/commit/fb42d55a9a97afa5ab7db38b3b99088cf68684ea) + [#17728](https://github.com/npm/npm/pull/17728) + Document semver git urls in package.json docs. + ([@sankethkatta](https://github.com/sankethkatta)) +* [`f398c700f`](https://github.com/npm/npm/commit/f398c700fb0f2f3665ebf45995a910ad16cd8d05) + [#17684](https://github.com/npm/npm/pull/17684) + Tweak heading hierarchy in package.json docs. + ([@sonicdoe](https://github.com/sonicdoe)) +* [`d5ad65e50`](https://github.com/npm/npm/commit/d5ad65e50a573cdf9df4155225e869cd6c88ca5e) + [#17691](https://github.com/npm/npm/pull/17691) + Explicitly document `--no-save` flag for uninstall. + ([@timneedham](https://github.com/timneedham)) + +## v5.2.0 (2017-07-05): + +It's only been a couple of days but we've got some bug fixes we wanted to +get out to you all. We also believe that +[`npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) is ready to be bundled +with npm, which we're really excited about! + +### npx!!! + +npx is a tool intended to help round out the experience of using packages +from the npm registry — the same way npm makes it super easy to install and +manage dependencies hosted on the registry, npx is meant to make it easy to +use CLI tools and other executables hosted on the registry. It greatly +simplifies a number of things that, until now, required a bit of ceremony to +do with plain npm. + +![](https://cdn-images-1.medium.com/max/1600/1*OlIRsvVO5aK7ja9HmwXz_Q.gif) + +[@zkat](https://github.com/zkat) has a [great introduction post to npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) +that I highly recommend you give a read + +* [`fb040bee0`](https://github.com/npm/npm/commit/fb040bee0710759c60e45bf8fa2a3b8ddcf4212a) + [#17685](https://github.com/npm/npm/pull/17685) + Bundle npx with npm itself. + ([@zkat](https://github.com/zkat)) + +### BUG FIXES + +* [`9fe905c39`](https://github.com/npm/npm/commit/9fe905c399d07a3c00c7b22035ddb6b7762731e6) + [#17652](https://github.com/npm/npm/pull/17652) + Fix max callstack exceeded loops with trees with circular links. + ([@iarna](https://github.com/iarna)) +* [`c0a289b1b`](https://github.com/npm/npm/commit/c0a289b1ba6b99652c43a955b23acbf1de0b56ae) + [#17606](https://github.com/npm/npm/pull/17606) + Make sure that when write package.json and package-lock.json we always use unix path separators. + ([@Standard8](https://github.com/Standard8)) +* [`1658b79ca`](https://github.com/npm/npm/commit/1658b79cad89ccece5ae5ce3c2f691d44b933116) + [#17654](https://github.com/npm/npm/pull/17654) + Make `npm outdated` show results for globals again. Previously it never thought they were out of date. + ([@iarna](https://github.com/iarna)) +* [`06c154fd6`](https://github.com/npm/npm/commit/06c154fd653d18725d2e760ba825d43cdd807420) + [#17678](https://github.com/npm/npm/pull/17678) + Stop flattening modules that have peer dependencies. We're making this + change to support scenarios where the module requiring a peer dependency + is flattened but the peer dependency itself is not, due to conflicts. In + those cases the module requiring the peer dep can't be flattened past the + location its peer dep was placed in. This initial fix is naive, never + flattening peer deps, and we can look into doing something more + sophisticated later on. + ([@iarna](https://github.com/iarna)) +* [`88aafee8b`](https://github.com/npm/npm/commit/88aafee8b5b232b7eeb5690279a098d056575791) + [#17677](https://github.com/npm/npm/pull/17677) + There was an issue where updating a flattened dependency would sometimes + unflatten it. This only happened when the dependency had dependencies + that in turn required the original dependency. + ([@iarna](https://github.com/iarna)) +* [`b58ec8eab`](https://github.com/npm/npm/commit/b58ec8eab3b4141e7f1b8b42d8cc24f716a804d8) + [#17626](https://github.com/npm/npm/pull/17626) + Integrators who were building their own copies of npm ran into issues because + `make install` and https://npmjs.com/install.sh weren't aware that + `npm install` creates links now when given a directory to work on. This does not impact folks + installing npm with `npm install -g npm`. + ([@iarna](https://github.com/iarna)) + +### DOC FIXES + +* [`10bef735e`](https://github.com/npm/npm/commit/10bef735e825acc8278827d34df415dfcd8c67d4) + [#17645](https://github.com/npm/npm/pull/17645) + Fix some github issue links in the 5.1.0 changelog + ([@schmod](https://github.com/schmod)) +* [`85fa9dcb2`](https://github.com/npm/npm/commit/85fa9dcb2f0b4f51b515358e0184ec82a5845227) + [#17634](https://github.com/npm/npm/pull/17634) + Fix typo in package-lock docs. + ([@sonicdoe](https://github.com/sonicdoe)) +* [`688699bef`](https://github.com/npm/npm/commit/688699befc2d147288c69a9405fb8354ecaebe36) + [#17628](https://github.com/npm/npm/pull/17628) + Recommend that folks looking for support join us on https://package.community/ or message + [@npm_support](https://twitter.com/npm_support) on Twitter. + ([@strugee](https://github.com/strugee)) + + +## v5.1.0 (2017-07-05): + +Hey y'all~ + +We've got some goodies for you here, including `npm@5`'s first semver-minor +release! This version includes a huge number of fixes, particularly for some of +the critical bugs users were running into after upgrading npm. You should +overall see a much more stable experience, and we're going to continue hacking +on fixes for the time being. Semver-major releases, specially for tools like +npm, are bound to cause some instability, and getting `npm@5` stable is the CLI +team's top priority for now! + +Not that bugfixes are the only things that landed, either: between improvements +that fell out of the bugfixes, and some really cool work by community members +like [@mikesherov](https://github.com/mikesherov), `npm@5.1.0` is **_twice as +fast_** as `npm@5.0.0` in some benchmarks. We're not stopping there, either: you +can expect a steady stream of speed improvements over the course of the year. +It's not _top_ priority, but we'll keep doing what we can to make sure npm saves +its users as much time as possible. + +Hang on to your seats. At **100 commits**, this release is a bit of a doozy. 😎 + +### FEATURES + +Semver-minor releases, of course, mean that there's a new feature somewhere, +right? Here's what's bumping that number for us this time: + +* [`a09c1a69d`](https://github.com/npm/npm/commit/a09c1a69df05b753464cc1272cdccc6af0f4da5a) + [#16687](https://github.com/npm/npm/pull/16687) + Allow customizing the shell used to execute `run-script`s. + ([@mmkal](https://github.com/mmkal)) +* [`4f45ba222`](https://github.com/npm/npm/commit/4f45ba222e2ac6dbe6d696cb7a8e678bbda7c839) [`a48958598`](https://github.com/npm/npm/commit/a489585985540deed4edc03418636c9e97aa9e40) [`901bef0e1`](https://github.com/npm/npm/commit/901bef0e1ea806fc08d8d58744a9f813b6c020ab) + [#17508](https://github.com/npm/npm/pull/17508) + Add a new `requires` field to `package-lock.json` with information about the + _logical_ dependency tree. This includes references to the specific version + each package is intended to see, and can be used for many things, such as + [converting `package-lock.json` to other lockfile + formats](https://twitter.com/maybekatz/status/880578566907248640), various + optimizations, and verifying correctness of a package tree. + ([@iarna](https://github.com/iarna)) +* [`47e8fc8eb`](https://github.com/npm/npm/commit/47e8fc8eb9b5faccef9e03ab991cf37458c16249) + [#17508](https://github.com/npm/npm/pull/17508) + Make `npm ls` take package locks (and shrinkwraps) into account. This means + `npm ls` can now be used to see [which dependencies are + missing](https://twitter.com/maybekatz/status/880446509547794437), so long as + a package lock has been previously generated with it in. + ([@iarna](https://github.com/iarna)) +* [`f0075e7ca`](https://github.com/npm/npm/commit/f0075e7caa3e151424a254d7809ae4489ed8df90) + [#17508](https://github.com/npm/npm/pull/17508) + Take `package.json` changes into account when running installs -- if you + remove or add a dependency to `package.json` manually, npm will now pick that + up and update your tree and package lock accordingly. + ([@iarna](https://github.com/iarna)) +* [`83a5455aa`](https://github.com/npm/npm/commit/83a5455aac3c5cc2511ab504923b652b13bd66a0) + [#17205](https://github.com/npm/npm/pull/17205) + Add `npm udpate` as an alias for `npm update`, for symmetry with + `install`/`isntall`. + ([@gdassori](https://github.com/gdassori)) +* [`57225d394`](https://github.com/npm/npm/commit/57225d394b6174eb0be48393d8e18da0991f67b6) + [#17120](https://github.com/npm/npm/pull/17120) + npm will no longer warn about `preferGlobal`, and the option is now + deprecated. + ([@zkat](https://github.com/zkat)) +* [`82df7bb16`](https://github.com/npm/npm/commit/82df7bb16fc29c47a024db4a8c393e55f883744b) + [#17351](https://github.com/npm/npm/pull/17351) + As some of you may already know `npm build` doesn't do what a lot of people + expect: It's mainly an npm plumbing command, and is part of the more familiar + `npm rebuild` command. That said, a lot of users assume that this is the way + to run an npm `run-script` named `build`, which is an incredibly common script + name to use. To clarify things for users, and encourage them to use `npm run + build` instead, npm will now warn if `npm build` is run without any arguments. + ([@lennym](https://github.com/lennym)) + +### PERFORMANCE + +* [`59f86ef90`](https://github.com/npm/npm/commit/59f86ef90a58d8dc925c9613f1c96e68bee5ec7b) [`43be9d222`](https://github.com/npm/npm/commit/43be9d2222b23ebb0a427ed91824ae217e6d077a) [`e906cdd98`](https://github.com/npm/npm/commit/e906cdd980b4722e66618ce295c682b9a8ffaf8f) + [#16633](https://github.com/npm/npm/pull/16633) + npm now parallelizes tarball extraction across multiple child process workers. + This can significantly speed up installations, specially when installing from + cache, and will improve with number of processors. + ([@zkat](https://github.com/zkat)) +* [`e0849878d`](https://github.com/npm/npm/commit/e0849878dd248de8988c2ef3fc941054625712ca) + [#17441](https://github.com/npm/npm/pull/17441) + Avoid building environment for empty lifecycle scripts. This change alone + accounted for as much as a 15% speed boost for npm installations by outright + skipping entire steps of the installer when not needed. + ([@mikesherov](https://github.com/mikesherov)) +* [`265c2544c`](https://github.com/npm/npm/commit/265c2544c8ded10854909243482e6437ed03c261) + [npm/hosted-git-info#24](https://github.com/npm/hosted-git-info/pull/24) + `hosted-git-info@2.5.0`: Add caching to `fromURL`, which gets called many, + many times by the installer. This improved installation performance by around + 10% on realistic application repositories. + ([@mikesherov](https://github.com/mikesherov)) +* [`901d26cb`](https://github.com/npm/npm/commit/901d26cb656e7e773d9a38ef4eac9263b95e07c8) + [npm/read-package-json#20](https://github.com/npm/read-package-json/pull/70) + `read-package-json@2.0.9`: Speed up installs by as much as 20% by + reintroducing a previously-removed cache and making it actually be correct + this time around. + ([@mikesherov](https://github.com/mikesherov)) +* [`44e37045d`](https://github.com/npm/npm/commit/44e37045d77bc40adf339b423d42bf5e9b4d4d91) + Eliminate `Bluebird.promisifyAll` from our codebase. + ([@iarna](https://github.com/iarna)) +* [`3b4681b53`](https://github.com/npm/npm/commit/3b4681b53db7757985223932072875d099694677) + [#17508](https://github.com/npm/npm/pull/17508) + Stop calling `addBundle` on locked deps, speeding up the + `package-lock.json`-based fast path. + ([@iarna](https://github.com/iarna)) + +### BUGFIXES + +* [#17508](https://github.com/npm/npm/pull/17508) + This is a big PR that fixes a variety of issues when installing from package + locks. If you were previously having issues with missing dependencies or + unwanted removals, this might have fixed it: + * It introduces a new `package-lock.json` field, called `requires`, which tracks which modules a given module requires. + * It fixes [#16839](https://github.com/npm/npm/issues/16839) which was caused by not having this information available, particularly when git dependencies were involved. + * It fixes [#16866](https://github.com/npm/npm/issues/16866), allowing the `package.json` to trump the `package-lock.json`. + * `npm ls` now loads the shrinkwrap, which opens the door to showing a full tree of dependencies even when nothing is yet installed. (It doesn't do that yet though.) + ([@iarna](https://github.com/iarna)) +* [`656544c31`](https://github.com/npm/npm/commit/656544c31cdef3cef64fc10c24f03a8ae2685e35) [`d21ab57c3`](https://github.com/npm/npm/commit/d21ab57c3ef4f01d41fb6c2103debe884a17dc22) + [#16637](https://github.com/npm/npm/pull/16637) + Fix some cases where `npm prune` was leaving some dependencies unpruned if + to-be-pruned dependencies depended on them. + ([@exogen](https://github.com/exogen)) +* [`394436b09`](https://github.com/npm/npm/commit/394436b098dcca2d252061f95c4eeb92c4a7027c) + [#17552](https://github.com/npm/npm/pull/17552) + Make `refresh-package-json` re-verify the package platform. This fixes an + issue most notably experienced by Windows users using `create-react-app` where + `fsevents` would not short-circuit and cause a crash during its + otherwise-skipped native build phase. + ([@zkat](https://github.com/zkat)) +* [`9e5a94354`](https://github.com/npm/npm/commit/9e5a943547b29c8d022192afd9398b3a136a7e5a) + [#17590](https://github.com/npm/npm/pull/17590) + Fix an issue where `npm@5` would crash when trying to remove packages + installed with `npm@<5`. + ([@iarna](https://github.com/iarna)) +* [`c3b586aaf`](https://github.com/npm/npm/commit/c3b586aafa9eabac572eb6e2b8a7266536dbc65b) + [#17141](https://github.com/npm/npm/issues/17141) + Don't update the package.json when modifying packages that don't go there. + This was previously causing `package.json` to get a `"false": {}` field added. + ([@iarna](https://github.com/iarna)) +* [`d04a23de2`](https://github.com/npm/npm/commit/d04a23de21dd9991b32029d839b71e10e07b400d) [`4a5b360d5`](https://github.com/npm/npm/commit/4a5b360d561f565703024085da0927ccafe8793e) [`d9e53db48`](https://github.com/npm/npm/commit/d9e53db48ca227b21bb67df48c9b3580cb390e9e) + `pacote@2.7.38`: + * [zkat/pacote#102](https://github.com/zkat/pacote/pull/102) Fix issue with tar extraction and special characters. + * Enable loose semver parsing in some missing corner cases. + ([@colinrotherham](https://github.com/colinrotherham), [@zkat](https://github.com/zkat), [@mcibique](https://github.com/mcibique)) +* [`e2f815f87`](https://github.com/npm/npm/commit/e2f815f87676b7c50b896e939cee15a01aa976e4) + [#17104](https://github.com/npm/npm/pull/17104) + Write an empty str and wait for flush to exit to reduce issues with npm + exiting before all output is complete when it's a child process. + ([@zkat](https://github.com/zkat)) +* [`835fcec60`](https://github.com/npm/npm/commit/835fcec601204971083aa3a281c3a9da6061a7c2) + [#17060](https://github.com/npm/npm/pull/17060) + Make git repos with prepare scripts always install with both dev and prod + flags. + ([@intellix](https://github.com/intellix)) +* [`f1dc8a175`](https://github.com/npm/npm/commit/f1dc8a175eed56f1ed23bd5773e5e10beaf6cb31) + [#16879](https://github.com/npm/npm/pull/16879) + Fix support for `always-auth` and `_auth`. They are now both available in both + unscoped and registry-scoped configurations. + ([@jozemlakar](https://github.com/jozemlakar)) +* [`ddd8a1ca2`](https://github.com/npm/npm/commit/ddd8a1ca2fa3377199af74ede9d0c1a406d19793) + Serialize package specs to prevent `[object Object]` showing up in logs during + extraction. + ([@zkat](https://github.com/zkat)) +* [`99ef3b52c`](https://github.com/npm/npm/commit/99ef3b52caa7507e87a4257e622f8964b1c1f5f3) + [#17505](https://github.com/npm/npm/pull/17505) + Stop trying to commit updated `npm-shrinkwrap.json` and `package-lock.json` if + they're `.gitignore`d. + ([@zkat](https://github.com/zkat)) +* [`58be2ec59`](https://github.com/npm/npm/commit/58be2ec596dfb0353ad2570e6750e408339f1478) + Make sure uid and gid are getting correctly set even when they're `0`. This + should fix some Docker-related issues with bad permissions/broken ownership. + ([@rgrove](https://github.com/rgrove)) + ([@zkat](https://github.com/zkat)) +* [`9d1e3b6fa`](https://github.com/npm/npm/commit/9d1e3b6fa01bb563d76018ee153259d9507658cf) + [#17506](https://github.com/npm/npm/pull/17506) + Skip writing package.json and locks if on-disk version is identical to the new + one. + ([@zkat](https://github.com/zkat)) +* [`3fc6477a8`](https://github.com/npm/npm/commit/3fc6477a89773786e6c43ef43a23e5cdc662ff8e) + [#17592](https://github.com/npm/npm/pull/17592) + Fix an issue where `npm install -g .` on a package with no `name` field would + cause the entire global `node_modules` directory to be replaced with a symlink + to `$CWD`. lol. + ([@iarna](https://github.com/iarna)) +* [`06ba0a14a`](https://github.com/npm/npm/commit/06ba0a14a6c1c8cdcc8c062b68c8c63041b0cec0) + [#17591](https://github.com/npm/npm/pull/17591) + Fix spurious removal reporting: if you tried to remove something that didn't + actually exist, npm would tell you it removed 1 package even though there was + nothing to do. + ([@iarna](https://github.com/iarna)) +* [`20ff05f8`](https://github.com/npm/npm/commit/20ff05f8fe0ad8c36e1323d30b63b4d2ff7e11ef) + [#17629](https://github.com/npm/npm/pull/17629) + When removing a link, keep dependencies installed inside of it instead of + removing them, if the link is outside the scope of the current project. This + fixes an issue where removing globally-linked packages would remove all their + dependencies in the source directory, as well as some ergonomic issues when + using links in other situations. + ([@iarna](https://github.com/iarna)) + +### DOCS + +* [`fd5fab595`](https://github.com/npm/npm/commit/fd5fab5955a20a9bb8c0e77092ada1435f73a8d2) + [#16441](https://github.com/npm/npm/pull/16441) + Add spec for `npm-shrinkwrap.json` and `package-lock.json` from RFC. + ([@iarna](https://github.com/iarna)) +* [`9589c1ccb`](https://github.com/npm/npm/commit/9589c1ccb3f794abaaa48c2a647ada311dd881ef) + [#17451](https://github.com/npm/npm/pull/17451) + Fix typo in changelog. + ([@watilde](https://github.com/watilde)) +* [`f8e76d856`](https://github.com/npm/npm/commit/f8e76d8566ae1965e57d348df74edad0643b66a6) + [#17370](https://github.com/npm/npm/pull/17370) + Correct the default prefix config path for Windows operating systems in the + documentation for npm folders. + ([@kierendixon](https://github.com/kierendixon)) +* [`d0f3b5a12`](https://github.com/npm/npm/commit/d0f3b5a127718b0347c6622a2b9c28341c530d36) + [#17369](https://github.com/npm/npm/pull/17369) + Fix `npm-config` reference to `userconfig` & `globalconfig` environment + variables. + ([@racztiborzoltan](https://github.com/racztiborzoltan)) +* [`87629880a`](https://github.com/npm/npm/commit/87629880a71baec352c1b5345bc29268d6212467) + [#17336](https://github.com/npm/npm/pull/17336) + Remove note in docs about `prepublish` being entirely removed. + ([@Hirse](https://github.com/Hirse)) +* [`a1058afd9`](https://github.com/npm/npm/commit/a1058afd9a7a569bd0ac65b86eadd4fe077a7221) + [#17169](https://github.com/npm/npm/pull/17169) + Document `--no-package-lock` flag. + ([@leggsimon](https://github.com/leggsimon)) +* [`32fc6e41a`](https://github.com/npm/npm/commit/32fc6e41a2ce4dbcd5ce1e5f291e2e2efc779d48) + [#17250](https://github.com/npm/npm/pull/17250) + Fix a typo in the shrinkwrap docs. + ([@Zarel](https://github.com/Zarel)) +* [`f19bd3c8c`](https://github.com/npm/npm/commit/f19bd3c8cbd37c8a99487d6b5035282580ac3e9d) + [#17249](https://github.com/npm/npm/pull/17249) + Fix a package-lock.json cross-reference link. + ([@not-an-aardvark](https://github.com/not-an-aardvark)) +* [`153245edc`](https://github.com/npm/npm/commit/153245edc4845db670ada5e95ef384561706a751) + [#17075](https://github.com/npm/npm/pull/17075/files) + Fix a typo in `npm-config` docs. + ([@KennethKinLum](https://github.com/KennethKinLum)) +* [`c9b534a14`](https://github.com/npm/npm/commit/c9b534a148818d1a97787c0dfdba5f64ce3618a6) + [#17074](https://github.com/npm/npm/pull/17074) + Clarify config documention with multiple boolean flags. + ([@KennethKinLum](https://github.com/KennethKinLum)) +* [`e111b0a40`](https://github.com/npm/npm/commit/e111b0a40c4bc6691d7b8d67ddce5419e67bfd27) + [#16768](https://github.com/npm/npm/pull/16768) + Document the `-l` option to `npm config list`. + ([@happylynx](https://github.com/happylynx)) +* [`5a803ebad`](https://github.com/npm/npm/commit/5a803ebadd61229bca3d64fb3ef1981729b2548e) + [#16548](https://github.com/npm/npm/pull/16548) + Fix permissions for documentation files. Some of them had `+x` set. (???) + ([@metux](https://github.com/metux)) +* [`d57d4f48c`](https://github.com/npm/npm/commit/d57d4f48c6cd00fdf1e694eb49e9358071d8e105) + [#17319](https://github.com/npm/npm/pull/17319) + Document that the `--silent` option for `npm run-script` can be used to + suppress `npm ERR!` output on errors. + ([@styfle](https://github.com/styfle)) + +### MISC + +Not all contributions need to be visible features, docs, or bugfixes! It's super +helpful when community members go over our code and help clean it up, too! + +* [`9e5b76140`](https://github.com/npm/npm/commit/9e5b76140ffdb7dcd12aa402793644213fb8c5d7) + [#17411](https://github.com/npm/npm/pull/17411) + Convert all callback-style `move` usage to use Promises. + ([@vramana](https://github.com/vramana)) +* [`0711c08f7`](https://github.com/npm/npm/commit/0711c08f779ac641ec42ecc96f604c8861008b28) + [#17394](https://github.com/npm/npm/pull/17394) + Remove unused argument in `deepSortObject`. + ([@vramana](https://github.com/vramana)) +* [`7d650048c`](https://github.com/npm/npm/commit/7d650048c8ed5faa0486492f1eeb698e7383e32f) + [#17563](https://github.com/npm/npm/pull/17563) + Refactor some code to use `Object.assign`. + ([@vramana](https://github.com/vramana)) +* [`993f673f0`](https://github.com/npm/npm/commit/993f673f056aea5f602ea04b1e697b027c267a2d) + [#17600](https://github.com/npm/npm/pull/17600) + Remove an old comment. + ([@vramana](https://github.com/vramana)) + +## v5.0.4 (2017-06-13): + +Hey y'all. This is another minor patch release with a variety of little fixes +we've been accumulating~ + +* [`f0a37ace9`](https://github.com/npm/npm/commit/f0a37ace9ab7879cab20f2b0fcd7840bfc305feb) + Fix `npm doctor` when hitting registries without `ping`. + ([@zkat](https://github.com/zkat)) +* [`64f0105e8`](https://github.com/npm/npm/commit/64f0105e81352b42b72900d83b437b90afc6d9ce) + Fix invalid format error when setting cache-related headers. + ([@zkat](https://github.com/zkat)) +* [`d2969c80e`](https://github.com/npm/npm/commit/d2969c80e4178faebf0f7c4cab6eb610dd953cc6) + Fix spurious `EINTEGRITY` issue. + ([@zkat](https://github.com/zkat)) +* [`800cb2b4e`](https://github.com/npm/npm/commit/800cb2b4e2d0bd00b5c9082a896f2110e907eb0b) + [#17076](https://github.com/npm/npm/pull/17076) + Use legacy `from` field to improve upgrade experience from legacy shrinkwraps + and installs. + ([@zkat](https://github.com/zkat)) +* [`4100d47ea`](https://github.com/npm/npm/commit/4100d47ea58b4966c02604f71350b5316108df6a) + [#17007](https://github.com/npm/npm/pull/17007) + Restore loose semver parsing to match older npm behavior when running into + invalid semver ranges in dependencies. + ([@zkat](https://github.com/zkat)) +* [`35316cce2`](https://github.com/npm/npm/commit/35316cce2ca2d8eb94161ec7fe7e8f7bec7b3aa7) + [#17005](https://github.com/npm/npm/pull/17005) + Emulate npm@4's behavior of simply marking the peerDep as invalid, instead of + crashing. + ([@zkat](https://github.com/zkat)) +* [`e7e8ee5c5`](https://github.com/npm/npm/commit/e7e8ee5c57c7238655677e118a8809b652019f53) + [#16937](https://github.com/npm/npm/pull/16937) + Workaround for separate bug where `requested` was somehow null. + ([@forivall](https://github.com/forivall)) +* [`2d9629bb2`](https://github.com/npm/npm/commit/2d9629bb2043cff47eaad2654a64d2cef5725356) + Better logging output for git errors. + ([@zkat](https://github.com/zkat)) +* [`2235aea73`](https://github.com/npm/npm/commit/2235aea73569fb9711a06fa6344ef31247177dcd) + More scp-url fixes: parsing only worked correctly when a committish was + present. + ([@zkat](https://github.com/zkat)) +* [`80c33cf5e`](https://github.com/npm/npm/commit/80c33cf5e6ef207450949764de41ea96538c636e) + Standardize package permissions on tarball extraction, instead of using perms + from the tarball. This matches previous npm behavior and fixes a number of + incompatibilities in the wild. + ([@zkat](https://github.com/zkat)) +* [`2b1e40efb`](https://github.com/npm/npm/commit/2b1e40efba0b3d1004259efa4275cf42144e3ce3) + Limit shallow cloning to hosts which are known to support it. + ([@zkat](https://github.com/zkat)) + ## v5.0.3 (2017-06-05) Happy Monday, y'all! We've got another npm release for you with the fruits of diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 7b69df98fe1831..53ab16a29063c2 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -14,7 +14,8 @@ html_docdeps = html/dochead.html \ cli_mandocs = $(shell find doc/cli -name '*.md' \ |sed 's|.md|.1|g' \ |sed 's|doc/cli/|man/man1/|g' ) \ - man/man1/npm-README.1 + man/man1/npm-README.1 \ + man/man1/npx.1 files_mandocs = $(shell find doc/files -name '*.md' \ |sed 's|.md|.5|g' \ @@ -56,7 +57,7 @@ latest: node bin/npm-cli.js install -g -f npm ${NPMOPTS} install: all - node bin/npm-cli.js install -g -f ${NPMOPTS} + node bin/npm-cli.js install -g -f ${NPMOPTS} $(shell node bin/npm-cli.js pack | tail -1) # backwards compat dev: install @@ -96,6 +97,9 @@ man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json @[ -d man/man1 ] || mkdir -p man/man1 scripts/doc-build.sh $< $@ +man/man1/npx.1: node_modules/libnpx/libnpx.1 + cat $< | sed s/libnpx/npx/ > $@ + man/man5/npm-json.5: man/man5/package.json.5 cp $< $@ diff --git a/deps/npm/README.md b/deps/npm/README.md index 3a96074afb4f09..ce79f41ec2b13b 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -158,8 +158,9 @@ When you find issues, please report them: Be sure to include *all* of the output from the npm command that didn't work as expected. The `npm-debug.log` file is also helpful to provide. -You can also look for isaacs in #node.js on irc://irc.freenode.net. She -will no doubt tell you to put the output in a gist or email. +You can also find npm people in `#npm` on https://package.community/ or +[on Twitter](https://twitter.com/npm_support). Whoever responds will no +doubt tell you to put the output in a gist or email. ## SEE ALSO diff --git a/deps/npm/TODO.org b/deps/npm/TODO.org deleted file mode 100644 index 9ccceba595ff8a..00000000000000 --- a/deps/npm/TODO.org +++ /dev/null @@ -1,86 +0,0 @@ -* Finished - * [COMPLETED] npm: remove packageIntegrity - * [COMPLETED] npm: fix lifecycle stuff - * pack: - * pre-: immediately before tarball contents are packed. Need to re-read package.json immediately after - * pack: No pack lifecycle - * post-: immediately after tarball reaches its final destination (not immediately after packaging) - * prepare: `npm install`, immediately before `postinstall`, and immediately before `prepack`, never if `--prod`, after prepublish, before prepublishOnly - * prepublish: alias for `prepare` - * prepublishOnly: ONLY on `npm publish` (never on `npm pack`), runs before prepack (which takes care of re-reading package.json), re-reads package.json immediately after - * [COMPLETED] pacote: fix always-auth bug - * [COMPLETED] pacote: figure out why cache is being written as root - * [COMPLETED] npm: make `npm update` save files as the right type - * [COMPLETED] npm: update docs with npm5 changes - * [COMPLETED] npm: don't write "problems" into package-lock - * [COMPLETED] npm: add `created-with`, `shrinkwrap-version`, and `package-integrity` - * [COMPLETED] npm: warn on incompatible package-lock version - * [COMPLETED] npm: warn if both shrinkwrap and package-lock are there - * [COMPLETED] npm: fix git-prepare - * [COMPLETED] npm: fix auth failure for locked scoped deps - * [COMPLETED] npm: send the user-agent through to pacote - * [COMPLETED] npm: get https://github.com/npm/write-file-atomic/pull/23 merged - * [COMPLETED] npm: get https://github.com/npm/fstream-npm/pull/27 merged - * [COMPLETED] npm: if local deps exist w/o needed metadata, fetch it - * [COMPLETED] Run `prepare` during git tarball packing phase - * [COMPLETED] npm: put npm cache clear behind --force - * [COMPLETED] npm: package-lock.json - * lib/install/read-shrinkwrap.js - * lib/shrinkwrap.js - * lib/install/save.js (?) - * lib/utils/tar.js (add autoignore) - * fstream-npm (add autoignore) - * lib/version.js - * [COMPLETED] npm: --save by default - * [COMPLETED] npm: make sure `npm i ` defaults to package.json - * it only happens for command line arguments - * getAllMetadata - * Apparently, I did this way back when and totally forgot. lol. - * [COMPLETED] make-fetch-happen: make sure other options npm used are implemented - * look at the comment at the bottom of pacote.js - * [COMPLETED] make-fetch-happen: support strictSSL option - * [COMPLETED] Write npm@5 speeds presentation for Friday - * [COMPLETED] pacote: support `opts.fullMetadata` for `pkg.manifest` - * [COMPLETED] npm: fix invalid package: null error - * [COMPLETED] make-fetch-happen: case-insensitive http_proxy/proxy/https_proxy - * [COMPLETED] cacache: integrate cacache@8 into npm/pacote/mfh - * [COMPLETED] make-fetch-happen: literally vendor in node-fetch. sigh. - * basically, the whole tarball situation prevents shrinkwrap. sux :< - * note: solved this by forking node-fetch into node-fetch-npm - * [COMPLETED] pacote: http auth and alwaysAuth - * https://github.com/zkat/pacote/issues/77 - * [COMPLETED] make-fetch-happen: NO_PROXY support - * https://github.com/zkat/make-fetch-happen/issues/17 - * [COMPLETED] npm: calculate sri with ssri and add it to dist.integrity - * [COMPLETED] pacote: refactor handler API - * maybe use Protoduck? - * [COMPLETED] npm: nag Ryan about when sha512 is happening - * He says it's delayed 😭 - * I can still start sending integrity in the publish - * [COMPLETED] npm: fix bundle replacement issues (see: npm i nyc warning spam) - * need fromBundle attribute on shrinkwrap and pass it through. the sw.version && sw.integrity-based fake node needs to have this there. -* Backlog - * [TODO] make-fetch-happen: integrity failures are being thrown - * [TODO] write-file-atomic: review https://github.com/npm/write-file-atomic/pull/22 - * [TODO] pacote: write tests for git handlers - * https://github.com/zkat/pacote/issues/70 - * [TODO] pacote: offline feature support for git deps - * [TODO] npm: get logging working during the recalculateMetadata spam - * [TODO] pacote: opts.extraHeaders - * https://github.com/zkat/pacote/issues/79 - * [TODO] pacote: ECONNRESET recovery - * https://github.com/zkat/pacote/issues/8 - * [TODO] pacote: skip node_modules extraction for non-bundleDeps - * https://github.com/zkat/pacote/issues/49 - * [TODO] pacote: write tests for file/directory handlers - * [TODO] npm: `npm publish --dry-run` -> https://npm.im/pkgfiles ? - * Rebecca says yea - * [TODO] make-fetch-happen: write tests for agent pooling/proxy - * https://github.com/zkat/make-fetch-happen/issues/16 - * [TODO] make-fetch-happen: retry notification - * https://github.com/zkat/make-fetch-happen/issues/21 - * [TODO] npm: more informative logging when building git deps -* Needed for npm@5 -* Active - * [TODO] npm: figure out https://github.com/npm/npm/issues/16665 - * [TODO] npm: first-run notice about npm5 still having known issues diff --git a/deps/npm/bin/npx b/deps/npm/bin/npx new file mode 100644 index 00000000000000..a49c608bab89ba --- /dev/null +++ b/deps/npm/bin/npx @@ -0,0 +1,34 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node +fi + +NPX_CLI_JS="$basedir/node_modules/npm/bin/npx-cli.js" + +case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPX_CLI_JS" prefix -g` + NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js" + if [ -f "$NPM_PREFIX_NPX_CLI_JS" ]; then + NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS" + fi + ;; + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPX_CLI_JS" prefix -g` + NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js" + if [ -f "$NPM_PREFIX_NPX_CLI_JS" ]; then + NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPX_CLI_JS" "$@" diff --git a/deps/npm/bin/npx-cli.js b/deps/npm/bin/npx-cli.js new file mode 100755 index 00000000000000..f4043650599d77 --- /dev/null +++ b/deps/npm/bin/npx-cli.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +const npx = require('libnpx') +const path = require('path') + +const NPM_PATH = path.join(__dirname, 'npm-cli.js') + +npx(npx.parseArgs(process.argv, NPM_PATH)) diff --git a/deps/npm/bin/npx.cmd b/deps/npm/bin/npx.cmd new file mode 100644 index 00000000000000..02fcbd9ffc2325 --- /dev/null +++ b/deps/npm/bin/npx.cmd @@ -0,0 +1,19 @@ +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPX_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js" +) +IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" ( + SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%" +) + +"%NODE_EXE%" "%NPX_CLI_JS%" %* diff --git a/deps/npm/doc/cli/npm-config.md b/deps/npm/doc/cli/npm-config.md index 5aecb2c3acbb97..aad9e0dffea90d 100644 --- a/deps/npm/doc/cli/npm-config.md +++ b/deps/npm/doc/cli/npm-config.md @@ -6,7 +6,7 @@ npm-config(1) -- Manage the npm configuration files npm config set [-g|--global] npm config get npm config delete - npm config list + npm config list [-l] npm config edit npm get npm set [-g|--global] @@ -48,7 +48,7 @@ Echo the config value to stdout. npm config list -Show all the config settings. +Show all the config settings. Use `-l` to also show defaults. ### delete diff --git a/deps/npm/doc/cli/npm-install.md b/deps/npm/doc/cli/npm-install.md index 44cb68792bfff7..74e5e04bca4fd6 100644 --- a/deps/npm/doc/cli/npm-install.md +++ b/deps/npm/doc/cli/npm-install.md @@ -343,6 +343,9 @@ being installed. The `--no-shrinkwrap` argument, which will ignore an available package lock or shrinkwrap file and use the package.json instead. +The `--no-package-lock` argument will prevent npm from creating a +`package-lock.json` file. + The `--nodedir=/path/to/node/source` argument will allow npm to find the node source code so that npm can compile native modules. diff --git a/deps/npm/doc/cli/npm-ls.md b/deps/npm/doc/cli/npm-ls.md index 65e8366d467ec2..e665a735c3237e 100644 --- a/deps/npm/doc/cli/npm-ls.md +++ b/deps/npm/doc/cli/npm-ls.md @@ -91,6 +91,13 @@ When "dev" or "development", is an alias to `dev`. When "prod" or "production", is an alias to `production`. +### link + +* Type: Boolean +* Default: false + +Display only dependencies which are linked + ## SEE ALSO * npm-config(1) diff --git a/deps/npm/doc/cli/npm-run-script.md b/deps/npm/doc/cli/npm-run-script.md index f1389c21c623fd..b79d58fb01952c 100644 --- a/deps/npm/doc/cli/npm-run-script.md +++ b/deps/npm/doc/cli/npm-run-script.md @@ -3,7 +3,7 @@ npm-run-script(1) -- Run arbitrary package scripts ## SYNOPSIS - npm run-script [-- ...] + npm run-script [--silent] [-- ...] alias: npm run @@ -50,6 +50,8 @@ not found in the `PATH`. If you try to run a script without having a `node_modules` directory and it fails, you will be given a warning to run `npm install`, just in case you've forgotten. +You can use the `--silent` flag to prevent showing `npm ERR!` output on error. + ## SEE ALSO * npm-scripts(7) diff --git a/deps/npm/doc/cli/npm-uninstall.md b/deps/npm/doc/cli/npm-uninstall.md index e870b23d5ce5c5..38302b20d61fcd 100644 --- a/deps/npm/doc/cli/npm-uninstall.md +++ b/deps/npm/doc/cli/npm-uninstall.md @@ -3,7 +3,7 @@ npm-uninstall(1) -- Remove a package ## SYNOPSIS - npm uninstall [<@scope>/][@]... [-S|--save|-D|--save-dev|-O|--save-optional] + npm uninstall [<@scope>/][@]... [-S|--save|-D|--save-dev|-O|--save-optional|--no-save] aliases: remove, rm, r, un, unlink @@ -28,6 +28,8 @@ the package version in your main package.json: * `-O, --save-optional`: Package will be removed from your `optionalDependencies`. +* `--no-save`: Package will not be removed from your `package.json` file. + Further, if you have an `npm-shrinkwrap.json` then it will be updated as well. @@ -39,6 +41,7 @@ Examples: npm uninstall @myorg/privatepackage --save npm uninstall node-tap --save-dev npm uninstall dtrace-provider --save-optional + npm uninstall lodash --no-save ## SEE ALSO diff --git a/deps/npm/doc/files/npm-folders.md b/deps/npm/doc/files/npm-folders.md index 62ecebc27a3166..74c78834435f92 100644 --- a/deps/npm/doc/files/npm-folders.md +++ b/deps/npm/doc/files/npm-folders.md @@ -20,10 +20,9 @@ This document will tell you what it puts where. ### prefix Configuration The `prefix` config defaults to the location where node is installed. -On most systems, this is `/usr/local`. On windows, this is the exact -location of the node.exe binary. On Unix systems, it's one level up, -since node is typically installed at `{prefix}/bin/node` rather than -`{prefix}/node.exe`. +On most systems, this is `/usr/local`. On Windows, it's `%AppData%\npm`. +On Unix systems, it's one level up, since node is typically installed at +`{prefix}/bin/node` rather than `{prefix}/node.exe`. When the `global` flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the diff --git a/deps/npm/doc/files/npm-shrinkwrap.json.md b/deps/npm/doc/files/npm-shrinkwrap.json.md index 8256398e86b1a8..541a1f5a6d7656 100644 --- a/deps/npm/doc/files/npm-shrinkwrap.json.md +++ b/deps/npm/doc/files/npm-shrinkwrap.json.md @@ -5,7 +5,7 @@ npm-shrinkwrap.json(5) -- A publishable lockfile `npm-shrinkwrap.json` is a file created by npm-shrinkwrap(1). It is identical to `package-lock.json`, with one major caveat: Unlike `package-lock.json`, -`npm-shrinwkrap.json` may be included when publishing a package. +`npm-shrinkwrap.json` may be included when publishing a package. The recommended use-case for `npm-shrinkwrap.json` is applications deployed through the publishing process on the registry: for example, daemons and @@ -13,7 +13,7 @@ command-line tools intended as global installs or `devDependencies`. It's strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates. -Additionally, if both `package-lock.json` and `npm-shrinwkrap.json` are present +Additionally, if both `package-lock.json` and `npm-shrinkwrap.json` are present in a package root, `package-lock.json` will be ignored in favor of this file. For full details and description of the `npm-shrinkwrap.json` file format, refer diff --git a/deps/npm/doc/files/package-lock.json.md b/deps/npm/doc/files/package-lock.json.md index f6dde3649237b0..4c134fc229ecb1 100644 --- a/deps/npm/doc/files/package-lock.json.md +++ b/deps/npm/doc/files/package-lock.json.md @@ -127,6 +127,6 @@ The dependencies of this dependency, exactly as at the top level. ## SEE ALSO * npm-shrinkwrap(1) -* package-lock.json(5) +* npm-shrinkwrap.json(5) * package.json(5) * npm-install(1) diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index 1a06ff794b6784..1b2b04fe2f97c6 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -451,18 +451,28 @@ install time. ### Git URLs as Dependencies -Git urls can be of the form: +Git urls are of the form: - git://github.com/user/project.git#commit-ish - git+ssh://user@hostname:project.git#commit-ish - git+ssh://user@hostname/project.git#commit-ish - git+http://user@hostname/project/blah.git#commit-ish - git+https://user@hostname/project/blah.git#commit-ish + ://[[:]@][:][:][/][# | #semver:] -The `commit-ish` can be any tag, sha, or branch which can be supplied as -an argument to `git checkout`. The default is `master`. +`` is one of `git`, `git+ssh`, `git+http`, `git+https`, or +`git+file`. -## GitHub URLs +If `#` is provided, it will be used to clone exactly that +commit. If the commit-ish has the format `#semver:`, `` can +be any valid semver range or exact version, and npm will look for any tags +or refs matching that range in the remote repository, much as it would for a +registry dependency. If neither `#` or `#semver:` is +specified, then `master` is used. + +Examples: + + git+ssh://git@github.com:npm/npm.git#v1.0.27 + git+ssh://git@github.com:npm/npm#semver:^5.0 + git+https://isaacs@github.com/npm/npm.git + git://github.com/npm/npm.git#v1.0.27 + +### GitHub URLs As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". Just as with git URLs, a `commit-ish` suffix can be @@ -478,7 +488,7 @@ included. For example: } } -## Local Paths +### Local Paths As of version 2.0.0 you can provide a path to a local directory that contains a package. Local paths can be saved using `npm install -S` or @@ -700,12 +710,11 @@ The host architecture is determined by `process.arch` ## preferGlobal -If your package is primarily a command-line application that should be -installed globally, then set this value to `true` to provide a warning -if it is installed locally. +**DEPRECATED** -It doesn't actually prevent users from installing it locally, but it -does help prevent some confusion if it doesn't work as expected. +This option used to trigger an npm warning, but it will no longer warn. It is +purely there for informational purposes. It is now recommended that you install +any binaries as local devDependencies wherever possible. ## private diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md index 6fee98a90c7f9a..dd0993d6bb7958 100644 --- a/deps/npm/doc/misc/npm-config.md +++ b/deps/npm/doc/misc/npm-config.md @@ -9,8 +9,14 @@ npm gets its configuration values from the following sources, sorted by priority Putting `--foo bar` on the command line sets the `foo` configuration parameter to `"bar"`. A `--` argument tells the cli parser to stop -reading flags. A `--flag` parameter that is at the *end* of the -command will be given the value of `true`. +reading flags. Using `--flag` without specifying any value will set +the value to `true`. + +Example: `--flag1 --flag2` will set both configuration parameters +to `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`, +and `flag2` to `bar`. Finally, `--flag1 --flag2 -- bar` will set +both configuration parameters to `true`, and the `bar` is taken +as a command argument. ### Environment Variables @@ -21,7 +27,7 @@ configuration parameter to `bar`. Any environment configurations that are not given a value will be given the value of `true`. Config values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the same. However, please note that inside [npm-scripts](/misc/scripts) -npm will set it's own environment variables and Node will prefer +npm will set its own environment variables and Node will prefer those lowercase versions over any uppercase ones that you might set. For details see [this issue](https://github.com/npm/npm/issues/14528). @@ -31,9 +37,9 @@ The four relevant files are: * per-project configuration file (`/path/to/my/project/.npmrc`) * per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI - option `--userconfig` or environment variable `$NPM_CONF_USERCONFIG`) + option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`) * global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via - CLI option `--globalconfig` or environment variable `$NPM_CONF_GLOBALCONFIG`) + CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`) * npm's built-in configuration file (`/path/to/npm/npmrc`) See npmrc(5) for more details. @@ -883,6 +889,13 @@ in to a private registry for the first time: will cause `@organization` to be mapped to the registry for future installation of packages specified according to the pattern `@organization/package`. +### script-shell + +* Default: `null` +* Type: path + +The shell to use for scripts run with the `npm run` command. + ### scripts-prepend-node-path * Default: "warn-only" diff --git a/deps/npm/doc/misc/npm-scripts.md b/deps/npm/doc/misc/npm-scripts.md index 0e9c3bc6e76816..9cdf588397c3ed 100644 --- a/deps/npm/doc/misc/npm-scripts.md +++ b/deps/npm/doc/misc/npm-scripts.md @@ -70,11 +70,6 @@ allow users to avoid the confusing behavior of existing npm versions and only run on `npm publish` (for instance, running the tests one last time to ensure they're in good shape). -**IMPORTANT:** As of `npm@5`, `prepublish` will _only_ be run for `npm -publish`. This will make its behavior identical to `prepublishOnly`, so -`npm@6` or later may drop support for the use of `prepublishOnly`, and then -maybe we can all forget this embarrassing thing ever happened. - See for a much lengthier justification, with further reading, for this change. diff --git a/deps/npm/doc/spec/package-lock.md b/deps/npm/doc/spec/package-lock.md new file mode 100644 index 00000000000000..e7a714113946d4 --- /dev/null +++ b/deps/npm/doc/spec/package-lock.md @@ -0,0 +1,276 @@ +# package-lock and npm-shrinkwrap + +`npm` can have one of two different lock files: + +* `package-lock.json`, which is ordinarily always present and is never published. +* `npm-shrinkwrap.json`, which is created with `npm shrinkwrap` and usually published. + +You can only have one of them and in the event that you have both, +`npm-shrinkwrap.json` takes precedence. The files are exactly the same +format and in fact all the `npm shrinkwrap` command does is rename your +`package-lock.json`. + +Through the rest of this document we will refer to the package-lock and +`package-lock.json` but everything also applies to `npm-shrinkwrap.json`. + +## File Format + +### name + +The name of the package this is a package-lock for. This must match what's in `package.json`. + +### version + +The version of the package this is a package-lock for. This must match what's in `package.json`. + +### lockfileVersion *(new)* + +An integer version, starting at `1` with the version number of this document +whose semantics were used when generating this `package-lock.json`. + +### preserveSymlinks *(new)* + +Indicates that the install was done with the environment variable +`NODE_PRESERVE_SYMLINKS` enabled. The installer should insist that the value of this +property match that environment variable. + +### dependencies + +These are the modules installed in the `node_modules`. Some of these are +dependencies some of these are transitive dependencies (that is, +dependencies of our dependencies). + +This is a mapping of package name to dependency object. Dependency objects have the +following properties: + +#### version *(changed)* + +This is a specifier that uniquely identifies this package and should be +usable in fetching a new copy of it. + +* bundled dependencies: Regardless of source, this is a version number that is purely for informational purposes. +* registry sources: This is a version number. (eg, `1.2.3`) +* git sources: This is a git specifier with resolved committish. (eg, `git+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e`) +* http tarball sources: This is the URL of the tarball. (eg, `https://example.com/example-1.3.0.tgz`) +* local tarball sources: This is the file URL of the tarball. (eg `file:///opt/storage/example-1.3.0.tgz`) +* local link sources: This is the file URL of the link. (eg `file:libs/our-module`) + +#### integrity *(new)* + +This is a [Standard Subresource +Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) for +this resource. + +* For bundled dependencies this is not included, regardless of source. +* For registry sources, this is the `integrity` that the registry provided, or if one wasn't provided the SHA1 in `shasum`. +* For git sources this is the specific commit hash we cloned from. +* For remote tarball sources this is an integrity based on a SHA512 of + the file. +* For local tarball sources: This is an integrity field based on the SHA512 of the file. + +#### resolved + +* For bundled dependencies this is not included, regardless of source. +* For registry sources this is path of the tarball relative to the registry + URL. If the tarball URL isn't on the same server as the registry URL then + this is a complete URL. + +#### link *(new)* + +If this module was symlinked in development but had semver in the +`package.json` then this is the relative path of that link. + +Discussion of the semantics of this will go in the symlinks RFC. + +Implementation note: To be implemented post npm@5. + +#### bundled *(new)* + +If true, this is the bundled dependency and will be installed by the parent +module. When installing, this module will be extracted from the parent +module during the extract phase, not installed as a separate dependency. + +#### dev + +If true then this dependency is either a development dependency ONLY of the +top level module or a transitive dependency of one. This is false for +dependencies that are both a development dependency of the top level and a +transitive dependency of a non-development dependency of the top level. + +#### optional + +If true then this dependency is either an optional dependency ONLY of the +top level module or a transitive dependency of one. This is false for +dependencies that are both an optional dependency of the top level and a +transitive dependency of a non-optional dependency of the top level. + +All optional dependencies should be included even if they're uninstallable +on the current platform. + +#### from *(deprecated)* + +This is a record of what specifier was used to originally install this +package. This should not be included in new `package-lock.json` files. + +#### requires + +This is a mapping of module name to version. This is a list of everything +this module requires, regardless of where it will be installed. The version +should match via normal matching rules a dependency either in our +`dependencies` or in a level higher than us. + +#### dependencies + +Exactly like `dependencies` at the top level, this is a list of modules to +install in the `node_modules` of this module. + +## Generating + +### `npm init` + +If neither a `package-lock.json` nor an `npm-shrinkwrap.json` exist then +`npm init` will create a `package-lock.json`. This is functionally +equivalent to running `npm shrinkwrap` after the current init completes and +renaming the result to `package-lock.json`. + +### `npm install --save` + +If either an `npm-shrinkwrap.json` or a `package-lock.json` exists then it +will be updated. + +If neither exist then a `package-lock.json` should be generated. + +If a `package.json` does not exist, it should be generated. The generated +`package.json` should be empty, as in: + +``` +{ + "dependencies": { + } +} +``` + +If the user wants to get a default package name/version added they can run `npm init`. + +### `npm shrinkwrap` + +If a `package-lock.json` exists, rename it to `npm-shrinkwrap.json`. +Refresh the data from the installer's ideal tree. + +The top level `name` and `version` come from the `package.json`. It is an +error if either are missing or invalid. + +#### dependencies.dev + +This is `true` if this dependency is ONLY installed to fulfill either a top +level development dependency, or one of its transitive dependencies. + +Given: +``` +B (Dev) → C +``` + +Then both B and C would be `dev: true`. + +Given: +``` +A → B → C +B (Dev) -> C +``` + +Then all dependencies would be `dev: false`. + +#### dependencies.optional + +This is `true` if this dependency is ONLY ever either an optional dependency +or a transitive dependency of optional dependencies. + +Given: +``` +A (Opt) → B → C +``` + +Then all three of A, B and C would be flagged as optional. + +Given: +``` +A (Opt) → B → C +D → C +``` + +Then A and B would be flagged as optional, but C would not be. + +Given: +``` +A (Opt) → B → C +D → A +``` + +Then none would be flagged as optional. + +## Installing + +If the `packageIntegrity` in the `package-lock.json` differs from the one +computed from the `package.json` then places where the `package.json` is +incompatible with the `package-lock.json` a new module should be installed. +That is, while the `package-lock.json` ordinarily defines the state of your +project, if your `package.json` is edited independently it will take +precedence. + +The `package-lock.json` describes the exact tree that `npm` should create. +Any deviation between the `package.json` and the shrinkwrap/lock should +result in a warning be issued. This includes: + +* Modules in `package.json` but missing from the `package-lock.json` +* Modules in the `package-lock.json` but missing from the `package.json`. +* Modules in `package.json` whose specifiers don't match the version in `package-lock.json`. + +Warn if the `lockfileVersion` in the `package-lock.json` is for a different +major version than we implement. + +Module resolution from package-lock data works as such: + +* If install was run with `--resolve-links` and a dependency has a `link` + property then a symlink is made using that. If the version of the + destination can not be matched to the package-lock and/or the package.json + then a warning will be issued. + +* Otherwise, if a `integrity` is available then we try to install it from the cache using it. + +If `integrity` is unavailable or we are unable to locate a module from the `integrity` then: + +* If `lockfileVersion` is set: + * Install using the value of `version` and validate the result against the + `integrity`. +* Otherwise, try these in turn and validate the result against the `integrity`: + * `resolved`, then `from`, then `version. + * `from` can be either `package@specifier` or just `specifier`. + +Regardless of how the module is installed the metadata in the installed +module should be identical to what it would have been if the module were +installed w/o a package-lock. + +## Implied Changes To Other Commands + +### `npm rm --save` + +Currently if you ask to remove a package that's both a direct and a +transitive dependency, we'll remove the package from `node_modules` even if +this results in a broken tree. This was chosen at the time because we felt +that users would expect `npm rm pkgname` to be equivalent of +`rm -rf node_modules/pkgname`. + +As you are no longer going to be allowed to put your `node_modules` in a +state that's not a valid package-lock, this means this behavior is no longer +valid. Instead we should follow normal rules, removing it from the +dependencies for the top level but only removing the module on disk if +nothing requires it any more. + +## Additional fields / Adding new fields + +Installers should ignore any field they aren't aware of. It's not an error +to have additional properities in the package-lock or lock file. + +Installers that want to add new fields should either have one added via RFC +in the npm issue tracker and an accompanying documentation PR, or should prefix +it with the name of their project. diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 6668429083910b..437c78dc8ecaeb 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -106,8 +106,9 @@

BUGS

Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

-

You can also look for isaacs in #node.js on irc://irc.freenode.net. She -will no doubt tell you to put the output in a gist or email.

+

You can also find npm people in #npm on https://package.community/ or +on Twitter. Whoever responds will no +doubt tell you to put the output in a gist or email.

SEE ALSO

  • npm(1)
  • @@ -126,5 +127,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 4fcfc87ccda4ea..4824196bf5932b 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -84,5 +84,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 905c01acb0d24d..8297188343be97 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -81,5 +81,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 131dff4dd2da70..5baf48529c5114 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index e73b582a191f75..65001a407e21f5 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -55,5 +55,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 99f846f55f2a91..33d0c896c245b4 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@

    DESCRIPTION

           - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 3898c9c0a8465f..1860157fb8c786 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -31,5 +31,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index ff6f6cb556f5a5..de1e4ce51cfc63 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -89,5 +89,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 9322d0a096cd77..da720731c49a5b 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -43,5 +43,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 6d1f6fcc20809b..5eb01b9e7c7aaf 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -14,7 +14,7 @@

    SYNOPSIS

    npm config set <key> <value> [-g|--global]
     npm config get <key>
     npm config delete <key>
    -npm config list
    +npm config list [-l]
     npm config edit
     npm get <key>
     npm set <key> <value> [-g|--global]
    @@ -39,7 +39,7 @@ 

    get

    Echo the config value to stdout.

    list

    npm config list
    -

    Show all the config settings.

    +

    Show all the config settings. Use -l to also show defaults.

    delete

    npm config delete key
     

    Deletes the key from all configuration files.

    @@ -67,5 +67,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 21c85e73b8def2..169c47cb43c693 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -61,5 +61,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 5b3e33d42288cb..c8c0e450649a7b 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index 1325853d76517f..ec1697d29bb8e9 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -86,5 +86,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 7100b563c5faa2..1aaae98cef3943 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-doctor.html b/deps/npm/html/doc/cli/npm-doctor.html index 41125d789078c4..28408c8eaa5431 100644 --- a/deps/npm/html/doc/cli/npm-doctor.html +++ b/deps/npm/html/doc/cli/npm-doctor.html @@ -103,4 +103,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index b4291160b65839..8de2342143700e 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 1e5208e496f0bc..83586c58eb2895 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 528e70cbab6e7f..aa5c99f21ac290 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -45,5 +45,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 5f2a04a159dc2d..bf82b1b6b0496b 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -50,5 +50,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 215fdb40a9e70a..9a1853ad6410b3 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html index 83325a82891158..210c21b60f168c 100644 --- a/deps/npm/html/doc/cli/npm-install-test.html +++ b/deps/npm/html/doc/cli/npm-install-test.html @@ -42,5 +42,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index b41029e7c99afc..227ad01d2f55e5 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -278,6 +278,8 @@

    SYNOPSIS

    being installed.

    The --no-shrinkwrap argument, which will ignore an available package lock or shrinkwrap file and use the package.json instead.

    +

    The --no-package-lock argument will prevent npm from creating a +package-lock.json file.

    The --nodedir=/path/to/node/source argument will allow npm to find the node source code so that npm can compile native modules.

    The --only={prod[uction]|dev[elopment]} argument will cause either only @@ -365,5 +367,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index 54b41d91dcbedf..ed797754f1a740 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -74,5 +74,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index d3a544534ebaa6..123cf6e6ae942f 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -51,5 +51,5 @@

    scope

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 500ca033e576ed..7f58b006ef7370 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -21,7 +21,7 @@

    SYNOPSIS

    limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

    -
    npm@5.0.3 /path/to/npm
    +
    npm@5.3.0 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5
     

    It will print out extraneous, missing, and invalid packages.

    @@ -80,6 +80,12 @@

    only

When "dev" or "development", is an alias to dev.

When "prod" or "production", is an alias to production.

+ +
    +
  • Type: Boolean
  • +
  • Default: false
  • +
+

Display only dependencies which are linked

SEE ALSO

  • npm-config(1)
  • @@ -104,5 +110,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 1c862a8ba7a7e1..b25aaec3d3af19 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -116,5 +116,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index e4cc4d7de89d11..7b9980c67c50b4 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -51,5 +51,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index 25982014e3593a..2d66916d8b96df 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 666ba97c7cefd6..68a5e8574983f4 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,5 +32,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 30c3172493f57b..2560340d5e16f7 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 52b2ba78e4ee4e..a7073a9e022a9a 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -40,5 +40,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 3fca992169342d..2d3b1d1db8bc55 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -79,5 +79,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 7ec9923cb8bb63..bc8ee7877132e3 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -35,5 +35,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index 38990dc8e96f3b..e2ef9ee958a673 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 6847b24387ce83..a6648c5716ac74 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index af03619a5d683c..94b59687abf668 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 2f61d63aece01e..037ad1a64c233d 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -11,7 +11,7 @@

    npm-run-script

    Run arbitrary package scripts

    SYNOPSIS

    -
    npm run-script <command> [-- <args>...]
    +
    npm run-script <command> [--silent] [-- <args>...]
     
     alias: npm run
     

    DESCRIPTION

    @@ -46,6 +46,7 @@

    SYNOPSIS

    not found in the PATH.

    If you try to run a script without having a node_modules directory and it fails, you will be given a warning to run npm install, just in case you've forgotten.

    +

    You can use the --silent flag to prevent showing npm ERR! output on error.

    SEE ALSO

    • npm-scripts(7)
    • @@ -66,5 +67,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index cc95846328a2e4..e136612e961c6b 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -109,5 +109,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 44388546d8a2c4..c68795a33fa9e6 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -41,5 +41,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index aacae893619a59..7f16258c099b58 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index 8252aa8f21ae80..cac0603d220e27 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -36,5 +36,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 8c8dd3bb39d16e..03226273786ae5 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -39,5 +39,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index b55a285de775fa..ac2e46f74a9746 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index 8bf5fdea1ed99b..a80d86c3ada61f 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -67,5 +67,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index e099df218cb603..ecbbc74b9ac819 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -36,5 +36,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 37bb0bd71f771d..5e60ae30385139 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -11,7 +11,7 @@

      npm-uninstall

      Remove a package

      SYNOPSIS

      -
      npm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|-D|--save-dev|-O|--save-optional]
      +
      npm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|-D|--save-dev|-O|--save-optional|--no-save]
       
       aliases: remove, rm, r, un, unlink
       

      DESCRIPTION

      @@ -30,6 +30,8 @@

      SYNOPSIS

    • -O, --save-optional: Package will be removed from your optionalDependencies.

    • +
    • --no-save: Package will not be removed from your package.json file.

      +

    Further, if you have an npm-shrinkwrap.json then it will be updated as well.

    @@ -39,6 +41,7 @@

    SYNOPSIS

    npm uninstall @myorg/privatepackage --save npm uninstall node-tap --save-dev npm uninstall dtrace-provider --save-optional +npm uninstall lodash --no-save

    SEE ALSO

    • npm-prune(1)
    • @@ -60,5 +63,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 36d0d328616187..220efe599a5fe3 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -51,5 +51,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 197aa41870f128..471db2baba31c6 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -118,5 +118,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index bc29ed75ac1b90..e821d71fc6779a 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -114,5 +114,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 70bf31e435975a..9d30ff9031912a 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -86,5 +86,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 8f84bc8ab62e5b..9c8b91e4d57243 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 4e4d97b2350736..06414eebab5d37 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

      npm

      javascript package manager

      SYNOPSIS

      npm <command> [args]
       

      VERSION

      -

      5.0.3

      +

      5.3.0

      DESCRIPTION

      npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency @@ -126,7 +126,7 @@

      AUTHOR

      Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me

      +i@izs.me

      SEE ALSO

      • npm-help(1)
      • @@ -150,5 +150,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index 300df680e1afb2..915750606cecda 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -25,10 +25,9 @@

        tl;dr

      prefix Configuration

      The prefix config defaults to the location where node is installed. -On most systems, this is /usr/local. On windows, this is the exact -location of the node.exe binary. On Unix systems, it's one level up, -since node is typically installed at {prefix}/bin/node rather than -{prefix}/node.exe.

      +On most systems, this is /usr/local. On Windows, it's %AppData%\npm. +On Unix systems, it's one level up, since node is typically installed at +{prefix}/bin/node rather than {prefix}/node.exe.

      When the global flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the current working directory if not in a package already.

      @@ -182,5 +181,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 300df680e1afb2..915750606cecda 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -25,10 +25,9 @@

      tl;dr

    prefix Configuration

    The prefix config defaults to the location where node is installed. -On most systems, this is /usr/local. On windows, this is the exact -location of the node.exe binary. On Unix systems, it's one level up, -since node is typically installed at {prefix}/bin/node rather than -{prefix}/node.exe.

    +On most systems, this is /usr/local. On Windows, it's %AppData%\npm. +On Unix systems, it's one level up, since node is typically installed at +{prefix}/bin/node rather than {prefix}/node.exe.

    When the global flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the current working directory if not in a package already.

    @@ -182,5 +181,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index e0f2df86f29360..6374cc5a7d7882 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -342,15 +342,22 @@

    dependencies

    This tarball will be downloaded and installed locally to your package at install time.

    Git URLs as Dependencies

    -

    Git urls can be of the form:

    -
    git://github.com/user/project.git#commit-ish
    -git+ssh://user@hostname:project.git#commit-ish
    -git+ssh://user@hostname/project.git#commit-ish
    -git+http://user@hostname/project/blah.git#commit-ish
    -git+https://user@hostname/project/blah.git#commit-ish
    -

    The commit-ish can be any tag, sha, or branch which can be supplied as -an argument to git checkout. The default is master.

    -

    GitHub URLs

    +

    Git urls are of the form:

    +
    <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
    +

    <protocol> is one of git, git+ssh, git+http, git+https, or +git+file.

    +

    If #<commit-ish> is provided, it will be used to clone exactly that +commit. If the commit-ish has the format #semver:<semver>, <semver> can +be any valid semver range or exact version, and npm will look for any tags +or refs matching that range in the remote repository, much as it would for a +registry dependency. If neither #<commit-ish> or #semver:<semver> is +specified, then master is used.

    +

    Examples:

    +
    git+ssh://git@github.com:npm/npm.git#v1.0.27
    +git+ssh://git@github.com:npm/npm#semver:^5.0
    +git+https://isaacs@github.com/npm/npm.git
    +git://github.com/npm/npm.git#v1.0.27
    +

    GitHub URLs

    As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". Just as with git URLs, a commit-ish suffix can be included. For example:

    @@ -363,7 +370,7 @@

    GitHub URLs

    "module": "user/repo#feature\/branch" } } -

    Local Paths

    +

    Local Paths

    As of version 2.0.0 you can provide a path to a local directory that contains a package. Local paths can be saved using npm install -S or npm install --save, using any of these forms:

    @@ -523,11 +530,10 @@

    cpu

    "cpu" : [ "!arm", "!mips" ]
     

    The host architecture is determined by process.arch

    preferGlobal

    -

    If your package is primarily a command-line application that should be -installed globally, then set this value to true to provide a warning -if it is installed locally.

    -

    It doesn't actually prevent users from installing it locally, but it -does help prevent some confusion if it doesn't work as expected.

    +

    DEPRECATED

    +

    This option used to trigger an npm warning, but it will no longer warn. It is +purely there for informational purposes. It is now recommended that you install +any binaries as local devDependencies wherever possible.

    private

    If you set "private": true in your package.json, then npm will refuse to publish it.

    @@ -587,5 +593,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-package-locks.html b/deps/npm/html/doc/files/npm-package-locks.html index 56bf73fbf86e6a..21029d3a9dd74c 100644 --- a/deps/npm/html/doc/files/npm-package-locks.html +++ b/deps/npm/html/doc/files/npm-package-locks.html @@ -145,4 +145,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-shrinkwrap.json.html b/deps/npm/html/doc/files/npm-shrinkwrap.json.html index 1437a6807ee6f6..9fdb543984ed7c 100644 --- a/deps/npm/html/doc/files/npm-shrinkwrap.json.html +++ b/deps/npm/html/doc/files/npm-shrinkwrap.json.html @@ -13,13 +13,13 @@

    npm-shrinkwrap.json

    DESCRIPTION

    npm-shrinkwrap.json is a file created by npm-shrinkwrap(1). It is identical to package-lock.json, with one major caveat: Unlike package-lock.json, -npm-shrinwkrap.json may be included when publishing a package.

    +npm-shrinkwrap.json may be included when publishing a package.

    The recommended use-case for npm-shrinkwrap.json is applications deployed through the publishing process on the registry: for example, daemons and command-line tools intended as global installs or devDependencies. It's strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates.

    -

    Additionally, if both package-lock.json and npm-shrinwkrap.json are present +

    Additionally, if both package-lock.json and npm-shrinkwrap.json are present in a package root, package-lock.json will be ignored in favor of this file.

    For full details and description of the npm-shrinkwrap.json file format, refer to the manual page for package-lock.json(5).

    @@ -42,4 +42,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 9dd6e18b10c0e6..8fe8746efbc1b0 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -85,5 +85,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/package-lock.json.html b/deps/npm/html/doc/files/package-lock.json.html index ea9439e8418ee2..3290c365da78e6 100644 --- a/deps/npm/html/doc/files/package-lock.json.html +++ b/deps/npm/html/doc/files/package-lock.json.html @@ -108,7 +108,7 @@

    dependencies

    SEE ALSO

    @@ -124,4 +124,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index e0f2df86f29360..6374cc5a7d7882 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -342,15 +342,22 @@

    dependencies

    This tarball will be downloaded and installed locally to your package at install time.

    Git URLs as Dependencies

    -

    Git urls can be of the form:

    -
    git://github.com/user/project.git#commit-ish
    -git+ssh://user@hostname:project.git#commit-ish
    -git+ssh://user@hostname/project.git#commit-ish
    -git+http://user@hostname/project/blah.git#commit-ish
    -git+https://user@hostname/project/blah.git#commit-ish
    -

    The commit-ish can be any tag, sha, or branch which can be supplied as -an argument to git checkout. The default is master.

    -

    GitHub URLs

    +

    Git urls are of the form:

    +
    <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
    +

    <protocol> is one of git, git+ssh, git+http, git+https, or +git+file.

    +

    If #<commit-ish> is provided, it will be used to clone exactly that +commit. If the commit-ish has the format #semver:<semver>, <semver> can +be any valid semver range or exact version, and npm will look for any tags +or refs matching that range in the remote repository, much as it would for a +registry dependency. If neither #<commit-ish> or #semver:<semver> is +specified, then master is used.

    +

    Examples:

    +
    git+ssh://git@github.com:npm/npm.git#v1.0.27
    +git+ssh://git@github.com:npm/npm#semver:^5.0
    +git+https://isaacs@github.com/npm/npm.git
    +git://github.com/npm/npm.git#v1.0.27
    +

    GitHub URLs

    As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". Just as with git URLs, a commit-ish suffix can be included. For example:

    @@ -363,7 +370,7 @@

    GitHub URLs

    "module": "user/repo#feature\/branch" } } -

    Local Paths

    +

    Local Paths

    As of version 2.0.0 you can provide a path to a local directory that contains a package. Local paths can be saved using npm install -S or npm install --save, using any of these forms:

    @@ -523,11 +530,10 @@

    cpu

    "cpu" : [ "!arm", "!mips" ]
     

    The host architecture is determined by process.arch

    preferGlobal

    -

    If your package is primarily a command-line application that should be -installed globally, then set this value to true to provide a warning -if it is installed locally.

    -

    It doesn't actually prevent users from installing it locally, but it -does help prevent some confusion if it doesn't work as expected.

    +

    DEPRECATED

    +

    This option used to trigger an npm warning, but it will no longer warn. It is +purely there for informational purposes. It is now recommended that you install +any binaries as local devDependencies wherever possible.

    private

    If you set "private": true in your package.json, then npm will refuse to publish it.

    @@ -587,5 +593,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 9e300e85bf23b6..5976e6cf5a09d8 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -168,5 +168,5 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index 081d89f4945cff..4c038f9d1cce37 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -153,5 +153,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index c6fc5cad3cb289..68548cb08efcd2 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -15,8 +15,13 @@

    DESCRIPTION

    Command Line Flags

    Putting --foo bar on the command line sets the foo configuration parameter to "bar". A -- argument tells the cli parser to stop -reading flags. A --flag parameter that is at the end of the -command will be given the value of true.

    +reading flags. Using --flag without specifying any value will set +the value to true.

    +

    Example: --flag1 --flag2 will set both configuration parameters +to true, while --flag1 --flag2 bar will set flag1 to true, +and flag2 to bar. Finally, --flag1 --flag2 -- bar will set +both configuration parameters to true, and the bar is taken +as a command argument.

    Environment Variables

    Any environment variables that start with npm_config_ will be interpreted as a configuration parameter. For example, putting @@ -25,7 +30,7 @@

    Environment Variables

    are not given a value will be given the value of true. Config values are case-insensitive, so NPM_CONFIG_FOO=bar will work the same. However, please note that inside npm-scripts -npm will set it's own environment variables and Node will prefer +npm will set its own environment variables and Node will prefer those lowercase versions over any uppercase ones that you might set. For details see this issue.

    npmrc Files

    @@ -33,9 +38,9 @@

    npmrc Files

    • per-project configuration file (/path/to/my/project/.npmrc)
    • per-user configuration file (defaults to $HOME/.npmrc; configurable via CLI -option --userconfig or environment variable $NPM_CONF_USERCONFIG)
    • +option --userconfig or environment variable $NPM_CONFIG_USERCONFIG)
    • global configuration file (defaults to $PREFIX/etc/npmrc; configurable via -CLI option --globalconfig or environment variable $NPM_CONF_GLOBALCONFIG)
    • +CLI option --globalconfig or environment variable $NPM_CONFIG_GLOBALCONFIG)
    • npm's built-in configuration file (/path/to/npm/npmrc)

    See npmrc(5) for more details.

    @@ -756,6 +761,12 @@

    scope

    npm login --scope=@organization --registry=registry.organization.com, which will cause @organization to be mapped to the registry for future installation of packages specified according to the pattern @organization/package.

    +

    script-shell

    +
      +
    • Default: null
    • +
    • Type: path
    • +
    +

    The shell to use for scripts run with the npm run command.

    scripts-prepend-node-path

    • Default: "warn-only"
    • @@ -981,5 +992,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 7d27bd2bc19724..39cc446723e976 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -194,5 +194,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 351539c60b87a7..c586bb9253ef1f 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -20,7 +20,7 @@

      npm-disputes

      Handling Module

      TL;DR

      1. Get the author email with npm owner ls <pkgname>
      2. -
      3. Email the author, CC support@npmjs.com
      4. +
      5. Email the author, CC support@npmjs.com
      6. After a few weeks, if there's no resolution, we'll sort it out.

      Don't squat on package names. Publish code or move out of the way.

      @@ -55,12 +55,12 @@

      DESCRIPTION

    • Alice emails Yusuf, explaining the situation as respectfully as possible, and what she would like to do with the module name. She adds the npm support -staff support@npmjs.com to the CC list of the email. Mention in the email +staff support@npmjs.com to the CC list of the email. Mention in the email that Yusuf can run npm owner add alice foo to add Alice as an owner of the foo package.
    • After a reasonable amount of time, if Yusuf has not responded, or if Yusuf and Alice can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks.)
    • REASONING

      @@ -96,12 +96,12 @@

      EXCEPTIONS

      Code of Conduct such as hateful language, pornographic content, or harassment. -

      If you see bad behavior like this, please report it to abuse@npmjs.com right +

      If you see bad behavior like this, please report it to abuse@npmjs.com right away. You are never expected to resolve abusive behavior on your own. We are here to help.

      TRADEMARKS

      If you think another npm publisher is infringing your trademark, such as by -using a confusingly similar package name, email abuse@npmjs.com with a link to +using a confusingly similar package name, email abuse@npmjs.com with a link to the package or user account on https://npmjs.com. Attach a copy of your trademark registration certificate.

      If we see that the package's publisher is intentionally misleading others by @@ -134,5 +134,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 4888d872841e05..96d9dbfc4dea70 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -168,5 +168,5 @@

      semver(7)

             - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index f3aab6e8517a29..cdd7d2c354a037 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,5 +86,5 @@

      Team Admins create teams

             - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index 7c6445b4cf4a18..6fd2e728ac949c 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -90,5 +90,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index 98595501fad131..484e6c1c33e470 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -99,5 +99,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index ea3ecc321d8145..46a126d8f64cd4 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -74,10 +74,6 @@

      DEPRECATION NOTE

      allow users to avoid the confusing behavior of existing npm versions and only run on npm publish (for instance, running the tests one last time to ensure they're in good shape).

      -

      IMPORTANT: As of npm@5, prepublish will only be run for npm -publish. This will make its behavior identical to prepublishOnly, so -npm@6 or later may drop support for the use of prepublishOnly, and then -maybe we can all forget this embarrassing thing ever happened.

      See https://github.com/npm/npm/issues/10074 for a much lengthier justification, with further reading, for this change.

      USE CASES

      @@ -243,5 +239,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 98404d073c88ad..2bfd2a513ca8a2 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 44c208b217d82c..e97c70afcbf730 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -325,5 +325,5 @@

      Ranges

             - + diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js index c2acc0066235e2..44ac40a00708b5 100644 --- a/deps/npm/lib/build.js +++ b/deps/npm/lib/build.js @@ -43,14 +43,23 @@ function build (args, global, didPre, didRB, cb) { global = npm.config.get('global') } - // it'd be nice to asyncMap these, but actually, doing them - // in parallel generally munges up the output from node-waf - var builder = build_(global, didPre, didRB) - chain(args.map(function (arg) { - return function (cb) { - builder(arg, cb) - } - }), cb) + if (!args.length) { + readJson(path.resolve(npm.localPrefix, 'package.json'), function (er, pkg) { + if (!args.length && pkg && pkg.scripts && pkg.scripts.build) { + log.warn('build', '`npm build` called with no arguments. Did you mean to `npm run-script build`?') + } + cb() + }) + } else { + // it'd be nice to asyncMap these, but actually, doing them + // in parallel generally munges up the output from node-waf + var builder = build_(global, didPre, didRB) + chain(args.map(function (arg) { + return function (cb) { + builder(arg, cb) + } + }), cb) + } } function build_ (global, didPre, didRB) { @@ -108,44 +117,15 @@ var linkStuff = build.linkStuff = function (pkg, folder, global, didRB, cb) { if (gnm) log.silly('linkStuff', packageId(pkg), 'is installed into a global node_modules') if (gtop) log.silly('linkStuff', packageId(pkg), 'is installed into the top-level global node_modules') - shouldWarn(pkg, folder, global, function () { - asyncMap( - [linkBins, linkMans, !didRB && rebuildBundles], - function (fn, cb) { - if (!fn) return cb() - log.verbose(fn.name, packageId(pkg)) - fn(pkg, folder, parent, gtop, cb) - }, - cb - ) - }) -} - -function shouldWarn (pkg, folder, global, cb) { - var parent = path.dirname(folder) - var top = parent === npm.dir - var cwd = npm.localPrefix - - readJson(path.resolve(cwd, 'package.json'), function (er, topPkg) { - if (er) return cb(er) - - var linkedPkg = path.basename(cwd) - var currentPkg = path.basename(folder) - - // current searched package is the linked package on first call - if (linkedPkg !== currentPkg) { - // don't generate a warning if it's listed in dependencies - if (Object.keys(topPkg.dependencies || {}) - .concat(Object.keys(topPkg.devDependencies || {})) - .indexOf(currentPkg) === -1) { - if (top && pkg.preferGlobal && !global) { - log.warn('prefer global', packageId(pkg) + ' should be installed with -g') - } - } - } - - cb() - }) + asyncMap( + [linkBins, linkMans, !didRB && rebuildBundles], + function (fn, cb) { + if (!fn) return cb() + log.verbose(fn.name, packageId(pkg)) + fn(pkg, folder, parent, gtop, cb) + }, + cb + ) } function rebuildBundles (pkg, folder, parent, gtop, cb) { diff --git a/deps/npm/lib/config/cmd-list.js b/deps/npm/lib/config/cmd-list.js index c54d105247f224..f2d5fab17dfeea 100644 --- a/deps/npm/lib/config/cmd-list.js +++ b/deps/npm/lib/config/cmd-list.js @@ -1,5 +1,3 @@ -var extend = Object.assign || require('util')._extend - // short names for common things var shorthands = { 'un': 'uninstall', @@ -29,6 +27,7 @@ var affordances = { 'apihelp': 'help', 'find-dupes': 'dedupe', 'upgrade': 'update', + 'udpate': 'update', 'login': 'adduser', 'add-user': 'adduser', 'author': 'owner', @@ -41,7 +40,8 @@ var affordances = { 'unlink': 'uninstall', 'remove': 'uninstall', 'rm': 'uninstall', - 'r': 'uninstall' + 'r': 'uninstall', + 'rum': 'run-script' } // these are filenames in . @@ -110,7 +110,7 @@ var plumbing = [ 'substack', 'visnup' ] -module.exports.aliases = extend(extend({}, shorthands), affordances) +module.exports.aliases = Object.assign({}, shorthands, affordances) module.exports.shorthands = shorthands module.exports.affordances = affordances module.exports.cmdList = cmdList diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js index da019ac4d6d196..93bac84a6108f9 100644 --- a/deps/npm/lib/config/defaults.js +++ b/deps/npm/lib/config/defaults.js @@ -203,6 +203,7 @@ Object.defineProperty(exports, 'defaults', {get: function () { 'save-prefix': '^', 'save-prod': false, scope: '', + 'script-shell': null, 'scripts-prepend-node-path': 'warn-only', searchopts: '', searchexclude: null, @@ -326,6 +327,7 @@ exports.types = { 'save-prefix': String, 'save-prod': Boolean, scope: String, + 'script-shell': [null, String], 'scripts-prepend-node-path': [false, true, 'auto', 'warn-only'], searchopts: String, searchexclude: [null, String], diff --git a/deps/npm/lib/config/get-credentials-by-uri.js b/deps/npm/lib/config/get-credentials-by-uri.js index 19779c41372cf4..d04f6137de9ba1 100644 --- a/deps/npm/lib/config/get-credentials-by-uri.js +++ b/deps/npm/lib/config/get-credentials-by-uri.js @@ -36,8 +36,6 @@ function getCredentialsByURI (uri) { // Handle the old-style _auth= style for the default // registry, if set. - // - // XXX(isaacs): Remove when npm 1.4 is no longer relevant var authDef = this.get('_auth') var userDef = this.get('username') var passDef = this.get('_password') diff --git a/deps/npm/lib/config/pacote.js b/deps/npm/lib/config/pacote.js index 2d2dda59fa3ee2..ec43178c7727dd 100644 --- a/deps/npm/lib/config/pacote.js +++ b/deps/npm/lib/config/pacote.js @@ -47,40 +47,63 @@ function pacoteOpts (moreOpts) { }, scope: npm.config.get('scope'), strictSSL: npm.config.get('strict-ssl'), - userAgent: npm.config.get('user-agent') + userAgent: npm.config.get('user-agent'), + + dmode: npm.modes.exec, + fmode: npm.modes.file, + umask: npm.modes.umask } - if (ownerStats.uid || ownerStats.gid) { + if (ownerStats.uid != null || ownerStats.gid != null) { Object.assign(opts, ownerStats) } npm.config.keys.forEach(function (k) { - const authMatch = k[0] === '/' && k.match( - /(.*):(_authToken|username|_password|password|email|always-auth)$/ + const authMatchGlobal = k.match( + /^(_authToken|username|_password|password|email|always-auth|_auth)$/ + ) + const authMatchScoped = k[0] === '/' && k.match( + /(.*):(_authToken|username|_password|password|email|always-auth|_auth)$/ ) - if (authMatch) { - const nerfDart = authMatch[1] - const key = authMatch[2] - const val = npm.config.get(k) + + // if it matches scoped it will also match global + if (authMatchGlobal || authMatchScoped) { + let nerfDart = null + let key = null + let val = null + if (!opts.auth) { opts.auth = {} } - if (!opts.auth[nerfDart]) { - opts.auth[nerfDart] = { - alwaysAuth: !!npm.config.get('always-auth') + + if (authMatchScoped) { + nerfDart = authMatchScoped[1] + key = authMatchScoped[2] + val = npm.config.get(k) + if (!opts.auth[nerfDart]) { + opts.auth[nerfDart] = { + alwaysAuth: !!npm.config.get('always-auth') + } } + } else { + key = authMatchGlobal[1] + val = npm.config.get(k) + opts.auth.alwaysAuth = !!npm.config.get('always-auth') } + + const auth = authMatchScoped ? opts.auth[nerfDart] : opts.auth if (key === '_authToken') { - opts.auth[nerfDart].token = val + auth.token = val } else if (key.match(/password$/i)) { - opts.auth[nerfDart].password = + auth.password = // the config file stores password auth already-encoded. pacote expects // the actual username/password pair. Buffer.from(val, 'base64').toString('utf8') } else if (key === 'always-auth') { - opts.auth[nerfDart].alwaysAuth = val === 'false' ? false : !!val + auth.alwaysAuth = val === 'false' ? false : !!val } else { - opts.auth[nerfDart][key] = val + auth[key] = val } } + if (k[0] === '@') { if (!opts.scopeTargets) { opts.scopeTargets = {} } opts.scopeTargets[k.replace(/:registry$/, '')] = npm.config.get(k) diff --git a/deps/npm/lib/dedupe.js b/deps/npm/lib/dedupe.js index ded309c21ac7e5..71e60619c4f1b7 100644 --- a/deps/npm/lib/dedupe.js +++ b/deps/npm/lib/dedupe.js @@ -112,12 +112,12 @@ function moveRemainingChildren (node, diff) { } function remove (child, diff, done) { - remove_(child, diff, {}, done) + remove_(child, diff, new Set(), done) } function remove_ (child, diff, seen, done) { - if (seen[child.path]) return done() - seen[child.path] = true + if (seen.has(child)) return done() + seen.add(child) diff.push(['remove', child]) child.parent.children = without(child.parent.children, child) asyncMap(child.children, function (child, next) { @@ -126,13 +126,13 @@ function remove_ (child, diff, seen, done) { } function hoistChildren (tree, diff, next) { - hoistChildren_(tree, diff, {}, next) + hoistChildren_(tree, diff, new Set(), next) } function hoistChildren_ (tree, diff, seen, next) { validate('OAOF', arguments) - if (seen[tree.path]) return next() - seen[tree.path] = true + if (seen.has(tree)) return next() + seen.add(tree) asyncMap(tree.children, function (child, done) { if (!tree.parent) return hoistChildren_(child, diff, seen, done) var better = findRequirement(tree.parent, moduleName(child), getRequested(child) || npa(packageId(child))) diff --git a/deps/npm/lib/doctor/check-ping.js b/deps/npm/lib/doctor/check-ping.js index 29a25c2fb7cce1..e7e82902a7165c 100644 --- a/deps/npm/lib/doctor/check-ping.js +++ b/deps/npm/lib/doctor/check-ping.js @@ -4,9 +4,7 @@ var ping = require('../ping.js') function checkPing (cb) { var tracker = log.newItem('checkPing', 1) tracker.info('checkPing', 'Pinging registry') - ping({}, true, function (err, pong, data, res) { - if (err) { return cb(err) } - tracker.finish() + ping({}, true, (_err, pong, data, res) => { cb(null, [res.statusCode, res.statusMessage]) }) } diff --git a/deps/npm/lib/doctor/get-latest-nodejs-version.js b/deps/npm/lib/doctor/get-latest-nodejs-version.js index a21229692fb30f..1586b087a0bff3 100644 --- a/deps/npm/lib/doctor/get-latest-nodejs-version.js +++ b/deps/npm/lib/doctor/get-latest-nodejs-version.js @@ -1,10 +1,11 @@ var log = require('npmlog') var request = require('request') +var semver = require('semver') function getLatestNodejsVersion (url, cb) { var tracker = log.newItem('getLatestNodejsVersion', 1) tracker.info('getLatestNodejsVersion', 'Getting Node.js release information') - var version = '' + var version = 'v0.0.0' url = url || 'https://nodejs.org/dist/index.json' request(url, function (e, res, index) { tracker.finish() @@ -14,7 +15,7 @@ function getLatestNodejsVersion (url, cb) { } try { JSON.parse(index).forEach(function (item) { - if (item.lts && item.version > version) version = item.version + if (item.lts && semver.gt(item.version, version)) version = item.version }) cb(null, version) } catch (e) { diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index 67dcf98b70d797..029f806f835b45 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -208,7 +208,6 @@ function Installer (where, dryrun, args) { // the only exist when the tree does not match the lockfile // this is fine when doing full tree installs/updates but not ok when modifying only // a few deps via `npm install` or `npm uninstall`. - this.fakeChildren = true this.currentTree = null this.idealTree = null this.differences = [] @@ -296,6 +295,7 @@ Installer.prototype.run = function (_cb) { // this is necessary as we don't fill in `dependencies` and `devDependencies` in deps loaded from shrinkwrap // until after we extract them [this, (next) => { computeMetadata(this.idealTree); next() }], + [this, this.pruneIdealTree], [this, this.saveToDependencies]) } } @@ -324,7 +324,6 @@ Installer.prototype.run = function (_cb) { Installer.prototype.loadArgMetadata = function (next) { getAllMetadata(this.args, this.currentTree, process.cwd(), iferr(next, (args) => { this.args = args - if (args.length) this.fakeChildren = false next() })) } @@ -371,12 +370,16 @@ Installer.prototype.normalizeCurrentTree = function (cb) { } } } + computeMetadata(this.currentTree) return cb() - function normalizeTree (tree) { + function normalizeTree (tree, seen) { + if (!seen) seen = new Set() + if (seen.has(tree)) return + seen.add(tree) createNode(tree) tree.location = flatNameFromTree(tree) - tree.children.forEach(normalizeTree) + tree.children.forEach((child) => normalizeTree(child, seen)) } } @@ -402,8 +405,12 @@ Installer.prototype.loadIdealTree = function (cb) { } Installer.prototype.pruneIdealTree = function (cb) { + if (!this.idealTree) return cb() + // if our lock file didn't have the requires field and there + // are any fake children then forgo pruning until we have more info. + if (!this.idealTree.hasRequiresFromLock && this.idealTree.children.some((n) => n.fakeChild)) return cb() var toPrune = this.idealTree.children - .filter((n) => !n.fakeChild && isExtraneous(n)) + .filter(isExtraneous) .map((n) => ({name: moduleName(n)})) return removeExtraneous(toPrune, this.idealTree, cb) } @@ -417,14 +424,14 @@ Installer.prototype.loadAllDepsIntoIdealTree = function (cb) { var installNewModules = !!this.args.length var steps = [] - const depsToPreload = Object.assign({}, - this.dev ? this.idealTree.package.devDependencies : {}, - this.prod ? this.idealTree.package.dependencies : {} - ) if (installNewModules) { steps.push([validateArgs, this.idealTree, this.args]) steps.push([loadRequestedDeps, this.args, this.idealTree, saveDeps, cg.newGroup('loadRequestedDeps')]) } else { + const depsToPreload = Object.assign({}, + this.dev ? this.idealTree.package.devDependencies : {}, + this.prod ? this.idealTree.package.dependencies : {} + ) if (this.prod || this.dev) { steps.push( [prefetchDeps, this.idealTree, depsToPreload, cg.newGroup('prefetchDeps')]) @@ -513,7 +520,8 @@ Installer.prototype.executeActions = function (cb) { [lock, node_modules, '.staging'], [rimraf, staging], [doParallelActions, 'extract', staging, todo, cg.newGroup('extract', 100)], - [doReverseSerialActions, 'remove', staging, todo, cg.newGroup('remove')], + [doReverseSerialActions, 'unbuild', staging, todo, cg.newGroup('unbuild')], + [doSerialActions, 'remove', staging, todo, cg.newGroup('remove')], [doSerialActions, 'move', staging, todo, cg.newGroup('move')], [doSerialActions, 'finalize', staging, todo, cg.newGroup('finalize')], [doParallelActions, 'refresh-package-json', staging, todo, cg.newGroup('refresh-package-json')], @@ -675,7 +683,7 @@ function isLink (child) { Installer.prototype.loadShrinkwrap = function (cb) { validate('F', arguments) log.silly('install', 'loadShrinkwrap') - readShrinkwrap.andInflate(this.idealTree, {fakeChildren: this.fakeChildren}, cb) + readShrinkwrap.andInflate(this.idealTree, cb) } Installer.prototype.getInstalledModules = function () { @@ -713,7 +721,16 @@ Installer.prototype.printInstalled = function (cb) { validate('F', arguments) if (this.failing) return cb() log.silly('install', 'printInstalled') - const diffs = this.differences.concat((this.idealTree.removedChildren || []).map((r) => ['remove', r])) + const diffs = this.differences + if (!this.idealTree.error && this.idealTree.removedChildren) { + const deps = this.currentTree.package.dependencies || {} + const dev = this.currentTree.package.devDependencies || {} + this.idealTree.removedChildren.forEach((r) => { + if (diffs.some((d) => d[0] === 'remove' && d[1].path === r.path)) return + if (!deps[moduleName(r)] && !dev[moduleName(r)]) return + diffs.push(['remove', r]) + }) + } if (npm.config.get('json')) { return this.printInstalledForJSON(diffs, cb) } else if (npm.config.get('parseable')) { @@ -874,15 +891,15 @@ Installer.prototype.debugTree = function (name, treeName, cb) { Installer.prototype.prettify = function (tree) { validate('O', arguments) - var seen = {} + var seen = new Set() function byName (aa, bb) { return packageId(aa).localeCompare(packageId(bb)) } function expandTree (tree) { - seen[tree.path] = true + seen.add(tree) return { label: packageId(tree), - nodes: tree.children.filter((tree) => { return !seen[tree.path] && !tree.removed && !tree.failed }).sort(byName).map(expandTree) + nodes: tree.children.filter((tree) => { return !seen.has(tree) && !tree.removed && !tree.failed }).sort(byName).map(expandTree) } } return archy(expandTree(tree), '', { unicode: npm.config.get('unicode') }) diff --git a/deps/npm/lib/install/action/extract-worker.js b/deps/npm/lib/install/action/extract-worker.js new file mode 100644 index 00000000000000..24508c780495eb --- /dev/null +++ b/deps/npm/lib/install/action/extract-worker.js @@ -0,0 +1,18 @@ +'use strict' + +const BB = require('bluebird') + +const extract = require('pacote/extract') +const npmlog = require('npmlog') + +module.exports = (args, cb) => { + const parsed = typeof args === 'string' ? JSON.parse(args) : args + const spec = parsed[0] + const extractTo = parsed[1] + const opts = parsed[2] + if (!opts.log && opts.loglevel) { + opts.log = npmlog + opts.log.level = opts.loglevel + } + BB.resolve(extract(spec, extractTo, opts)).nodeify(cb) +} diff --git a/deps/npm/lib/install/action/extract.js b/deps/npm/lib/install/action/extract.js index 437d7e57f78ffa..5534e8b28a3fcd 100644 --- a/deps/npm/lib/install/action/extract.js +++ b/deps/npm/lib/install/action/extract.js @@ -2,19 +2,36 @@ const BB = require('bluebird') -const fs = BB.promisifyAll(require('graceful-fs')) +const stat = BB.promisify(require('graceful-fs').stat) const gentlyRm = BB.promisify(require('../../utils/gently-rm.js')) const log = require('npmlog') const mkdirp = BB.promisify(require('mkdirp')) const moduleName = require('../../utils/module-name.js') const moduleStagingPath = require('../module-staging-path.js') -const move = BB.promisify(require('../../utils/move.js')) +const move = require('../../utils/move.js') const npa = require('npm-package-arg') +const npm = require('../../npm.js') const packageId = require('../../utils/package-id.js') -const pacote = require('pacote') let pacoteOpts const path = require('path') +const localWorker = require('./extract-worker.js') +const workerFarm = require('worker-farm') +const WORKER_PATH = require.resolve('./extract-worker.js') +let workers + +extract.init = () => { + workers = workerFarm({ + maxConcurrentCallsPerWorker: npm.limit.fetch, + maxRetries: 1 + }, WORKER_PATH) + return BB.resolve() +} +extract.teardown = () => { + workerFarm.end(workers) + workers = null + return BB.resolve() +} module.exports = extract function extract (staging, pkg, log) { log.silly('extract', packageId(pkg)) @@ -25,14 +42,34 @@ function extract (staging, pkg, log) { const opts = pacoteOpts({ integrity: pkg.package._integrity }) - return pacote.extract( + const args = [ pkg.package._resolved ? npa.resolve(pkg.package.name, pkg.package._resolved) : pkg.package._requested, extractTo, opts - ).then(() => { - if (pkg.package.bundleDependencies) { + ] + return BB.fromNode((cb) => { + let launcher = localWorker + let msg = args + const spec = typeof args[0] === 'string' ? npa(args[0]) : args[0] + args[0] = spec.raw + if (spec.registry || spec.type === 'remote') { + // We can't serialize these options + opts.loglevel = opts.log.level + opts.log = null + opts.dirPacker = null + // workers will run things in parallel! + launcher = workers + try { + msg = JSON.stringify(msg) + } catch (e) { + return cb(e) + } + } + launcher(msg, cb) + }).then(() => { + if (pkg.package.bundleDependencies || anyBundled(pkg)) { return readBundled(pkg, staging, extractTo) } }).then(() => { @@ -40,8 +77,14 @@ function extract (staging, pkg, log) { }) } +function anyBundled (top, pkg) { + if (!pkg) pkg = top + return pkg.children.some((child) => child.fromBundle === top || anyBundled(top, child)) +} + function readBundled (pkg, staging, extractTo) { return BB.map(pkg.children, (child) => { + if (!child.fromBundle) return if (child.error) { throw child.error } else { @@ -84,7 +127,7 @@ function finishModule (bundler, child, stageTo, stageFrom) { return move(stageFrom, stageTo) }) } else { - return fs.statAsync(stageFrom).then(() => { + return stat(stageFrom).then(() => { const bundlerId = packageId(bundler) if (!getTree(bundler).warnings.some((w) => { return w.code === 'EBUNDLEOVERRIDE' diff --git a/deps/npm/lib/install/action/finalize.js b/deps/npm/lib/install/action/finalize.js index ded2350dff7155..a50ec8a6bdbfc8 100644 --- a/deps/npm/lib/install/action/finalize.js +++ b/deps/npm/lib/install/action/finalize.js @@ -91,5 +91,5 @@ module.exports = function (staging, pkg, log) { module.exports.rollback = function (top, staging, pkg, next) { const requested = pkg.package._requested || getRequested(pkg) if (requested && requested.type === 'directory') return next() - gentlyRm(pkg.realpath, false, top, next) + gentlyRm(pkg.path, false, top, next) } diff --git a/deps/npm/lib/install/action/move.js b/deps/npm/lib/install/action/move.js index 07649c355693ab..bc9bf6a883edea 100644 --- a/deps/npm/lib/install/action/move.js +++ b/deps/npm/lib/install/action/move.js @@ -46,7 +46,7 @@ function moveModuleOnly (from, to, log, done) { log.silly('move', 'move existing destination node_modules away', toModules) - move(toModules, tempToModules, removeDestination(done)) + move(toModules, tempToModules).then(removeDestination(done), removeDestination(done)) function removeDestination (next) { return function (er) { @@ -62,7 +62,7 @@ function moveModuleOnly (from, to, log, done) { function moveToModulesBack (next) { return function () { log.silly('move', 'move existing destination node_modules back', toModules) - move(tempToModules, toModules, iferr(done, next)) + move(tempToModules, toModules).then(next, done) } } @@ -76,14 +76,14 @@ function moveModuleOnly (from, to, log, done) { function moveNodeModules (next) { return function () { log.silly('move', 'move source node_modules away', fromModules) - move(fromModules, tempFromModules, iferr(doMove(next), doMove(moveNodeModulesBack(next)))) + move(fromModules, tempFromModules).then(doMove(moveNodeModulesBack(next)), doMove(next)) } } function doMove (next) { return function () { log.silly('move', 'move module dir to final dest', from, to) - move(from, to, iferr(done, next)) + move(from, to).then(next, done) } } @@ -91,7 +91,7 @@ function moveModuleOnly (from, to, log, done) { return function () { mkdirp(from, iferr(done, function () { log.silly('move', 'put source node_modules back', fromModules) - move(tempFromModules, fromModules, iferr(done, next)) + move(tempFromModules, fromModules).then(next, done) })) } } diff --git a/deps/npm/lib/install/action/refresh-package-json.js b/deps/npm/lib/install/action/refresh-package-json.js index 6910803451048b..42f80121006d33 100644 --- a/deps/npm/lib/install/action/refresh-package-json.js +++ b/deps/npm/lib/install/action/refresh-package-json.js @@ -1,16 +1,20 @@ 'use strict' -const path = require('path') + const Bluebird = require('bluebird') + +const checkPlatform = Bluebird.promisify(require('npm-install-checks').checkPlatform) +const getRequested = require('../get-requested.js') +const npm = require('../../npm.js') +const path = require('path') const readJson = Bluebird.promisify(require('read-package-json')) const updatePackageJson = Bluebird.promisify(require('../update-package-json')) -const getRequested = require('../get-requested.js') module.exports = function (staging, pkg, log) { log.silly('refresh-package-json', pkg.realpath) return readJson(path.join(pkg.path, 'package.json'), false).then((metadata) => { Object.keys(pkg.package).forEach(function (key) { - if (!isEmpty(pkg.package[key])) { + if (key !== 'dependencies' && !isEmpty(pkg.package[key])) { metadata[key] = pkg.package[key] } }) @@ -22,7 +26,10 @@ module.exports = function (staging, pkg, log) { delete metadata.readmeFilename pkg.package = metadata + pkg.fakeChild = false }).catch(() => 'ignore').then(() => { + return checkPlatform(pkg.package, npm.config.get('force')) + }).then(() => { const requested = pkg.package._requested || getRequested(pkg) if (requested.type !== 'directory') { return updatePackageJson(pkg, pkg.path) diff --git a/deps/npm/lib/install/action/remove.js b/deps/npm/lib/install/action/remove.js index 9fe77c35e05f8a..a852d10c5fd84f 100644 --- a/deps/npm/lib/install/action/remove.js +++ b/deps/npm/lib/install/action/remove.js @@ -7,6 +7,8 @@ var mkdirp = require('mkdirp') var npm = require('../../npm.js') var andIgnoreErrors = require('../and-ignore-errors.js') var move = require('../../utils/move.js') +var isInside = require('path-is-inside') +var vacuum = require('fs-vacuum') // This is weird because we want to remove the module but not it's node_modules folder // allowing for this allows us to not worry about the order of operations @@ -20,18 +22,20 @@ module.exports = function (staging, pkg, log, next) { } function removeLink (pkg, next) { - npm.commands.unbuild(pkg.path, true, next) + var base = isInside(pkg.path, npm.prefix) ? npm.prefix : pkg.path + rimraf(pkg.path, (err) => { + if (err) return next(err) + vacuum(pkg.path, {base: base}, next) + }) } function removeDir (pkg, log, next) { var modpath = path.join(path.dirname(pkg.path), '.' + path.basename(pkg.path) + '.MODULES') - move(path.join(pkg.path, 'node_modules'), modpath, unbuildPackage) + move(path.join(pkg.path, 'node_modules'), modpath).then(unbuildPackage, unbuildPackage) function unbuildPackage (moveEr) { - npm.commands.unbuild(pkg.path, true, function () { - rimraf(pkg.path, moveEr ? andRemoveEmptyParents(pkg.path) : moveModulesBack) - }) + rimraf(pkg.path, moveEr ? andRemoveEmptyParents(pkg.path) : moveModulesBack) } function andRemoveEmptyParents (path) { @@ -58,7 +62,7 @@ function removeDir (pkg, log, next) { var to = path.join(pkg.path, 'node_modules', file) // we ignore errors here, because they can legitimately happen, for instance, // bundled modules will be in both node_modules folders - move(from, to, andIgnoreErrors(done)) + move(from, to).then(andIgnoreErrors(done), andIgnoreErrors(done)) }, cleanup) } diff --git a/deps/npm/lib/install/action/unbuild.js b/deps/npm/lib/install/action/unbuild.js new file mode 100644 index 00000000000000..ce20df75d39d70 --- /dev/null +++ b/deps/npm/lib/install/action/unbuild.js @@ -0,0 +1,16 @@ +'use strict' +var Bluebird = require('bluebird') +var lifecycle = Bluebird.promisify(require('../../utils/lifecycle.js')) +var packageId = require('../../utils/package-id.js') +var rmStuff = Bluebird.promisify(require('../../unbuild.js').rmStuff) + +module.exports = function (staging, pkg, log) { + log.silly('unbuild', packageId(pkg)) + return lifecycle(pkg.package, 'preuninstall', pkg.path, false, true).then(() => { + return lifecycle(pkg.package, 'uninstall', pkg.path, false, true) + }).then(() => { + return rmStuff(pkg.package, pkg.path) + }).then(() => { + return lifecycle(pkg.package, 'postuninstall', pkg.path, false, true) + }) +} diff --git a/deps/npm/lib/install/actions.js b/deps/npm/lib/install/actions.js index 912985e2c74aeb..028d932373f1f6 100644 --- a/deps/npm/lib/install/actions.js +++ b/deps/npm/lib/install/actions.js @@ -21,6 +21,7 @@ actions.postinstall = require('./action/postinstall.js') actions.prepare = require('./action/prepare.js') actions.finalize = require('./action/finalize.js') actions.remove = require('./action/remove.js') +actions.unbuild = require('./action/unbuild.js') actions.move = require('./action/move.js') actions['global-install'] = require('./action/global-install.js') actions['global-link'] = require('./action/global-link.js') @@ -64,6 +65,8 @@ Object.keys(actions).forEach(function (actionName) { }) }) } + actions[actionName].init = action.init || (() => BB.resolve()) + actions[actionName].teardown = action.teardown || (() => BB.resolve()) }) exports.actions = actions @@ -106,7 +109,10 @@ function handleOptionalDepErrors (pkg, err) { exports.doOne = doOne function doOne (cmd, staging, pkg, log, next) { validate('SSOOF', arguments) - execAction(prepareAction([cmd, pkg], staging, log)).then(() => next(), next) + const prepped = prepareAction([cmd, pkg], staging, log) + return withInit(actions[cmd], () => { + return execAction(prepped) + }).nodeify(next) } exports.doParallel = doParallel @@ -120,8 +126,11 @@ function doParallel (type, staging, actionsToRun, log, next) { }, []) log.silly('doParallel', type + ' ' + actionsToRun.length) time(log) - BB.map(acts, execAction, { - concurrency: npm.limit.action + if (!acts.length) { return next() } + return withInit(actions[type], () => { + return BB.map(acts, execAction, { + concurrency: npm.limit.action + }) }).nodeify((err) => { log.finish() timeEnd(log) @@ -140,7 +149,7 @@ exports.doReverseSerial = doReverseSerial function doReverseSerial (type, staging, actionsToRun, log, next) { validate('SSAOF', arguments) log.silly('doReverseSerial', '%s %d', type, actionsToRun.length) - runSerial(type, staging, actionsToRun.reverse(), log, next) + runSerial(type, staging, [].concat(actionsToRun).reverse(), log, next) } function runSerial (type, staging, actionsToRun, log, next) { @@ -151,7 +160,10 @@ function runSerial (type, staging, actionsToRun, log, next) { return acc }, []) time(log) - BB.each(acts, execAction).nodeify((err) => { + if (!acts.length) { return next() } + return withInit(actions[type], () => { + return BB.each(acts, execAction) + }).nodeify((err) => { log.finish() timeEnd(log) next(err) @@ -165,6 +177,13 @@ function timeEnd (log) { process.emit('timeEnd', 'action:' + log.name) } +function withInit (action, body) { + return BB.using( + action.init().disposer(() => action.teardown()), + body + ) +} + function prepareAction (action, staging, log) { validate('ASO', arguments) validate('SO', action) diff --git a/deps/npm/lib/install/decompose-actions.js b/deps/npm/lib/install/decompose-actions.js index 1d954f5cab78bf..57dc7cd6874647 100644 --- a/deps/npm/lib/install/decompose-actions.js +++ b/deps/npm/lib/install/decompose-actions.js @@ -19,6 +19,8 @@ module.exports = function (differences, decomposed, next) { moveSteps(decomposed, pkg, done) break case 'remove': + removeSteps(decomposed, pkg, done) + break default: defaultSteps(decomposed, cmd, pkg, done) } @@ -44,8 +46,15 @@ function addSteps (decomposed, pkg, done) { } function updateSteps (decomposed, pkg, done) { + removeSteps(decomposed, pkg.oldPkg, () => { + addSteps(decomposed, pkg, done) + }) +} + +function removeSteps (decomposed, pkg, done) { + decomposed.push(['unbuild', pkg]) decomposed.push(['remove', pkg]) - addSteps(decomposed, pkg, done) + done() } function moveSteps (decomposed, pkg, done) { diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js index c0fe905d4ba01a..d7a2c27c1cfb1c 100644 --- a/deps/npm/lib/install/deps.js +++ b/deps/npm/lib/install/deps.js @@ -30,6 +30,8 @@ var isDevDep = require('./is-dev-dep.js') var isProdDep = require('./is-prod-dep.js') var reportOptionalFailure = require('./report-optional-failure.js') var getSaveType = require('./save.js').getSaveType +var unixFormatPath = require('../utils/unix-format-path.js') +var isExtraneous = require('./is-extraneous.js') // The export functions in this module mutate a dependency tree, adding // items to them. @@ -37,9 +39,7 @@ var getSaveType = require('./save.js').getSaveType var registryTypes = { range: true, version: true } function doesChildVersionMatch (child, requested, requestor) { - // we always consider deps provided by a shrinkwrap as "correct" or else - // we'll subvert them if they're intentionally "invalid" - if (child.parent === requestor && child.fromShrinkwrap) return true + if (child.fromShrinkwrap && !child.hasRequiresFromLock) return true // ranges of * ALWAYS count as a match, because when downloading we allow // prereleases to match * if there are ONLY prereleases if (requested.type === 'range' && requested.fetchSpec === '*') return true @@ -51,13 +51,9 @@ function doesChildVersionMatch (child, requested, requestor) { if (!registryTypes[requested.type]) { var childReq = child.package._requested - if (!childReq && child.package._from) { - childReq = npa.resolve(moduleName(child), child.package._from.replace(new RegExp('^' + moduleName(child) + '@'), '')) - } if (childReq) { if (childReq.rawSpec === requested.rawSpec) return true if (childReq.type === requested.type && childReq.saveSpec === requested.saveSpec) return true - if (childReq.type === requested.type && childReq.spec === requested.saveSpec) return true } // If _requested didn't exist OR if it didn't match then we'll try using // _from. We pass it through npa to normalize the specifier. @@ -67,14 +63,14 @@ function doesChildVersionMatch (child, requested, requestor) { // really came from the same sources. // You'll see this scenario happen with at least tags and git dependencies. if (child.package._from) { - var fromReq = npa(child.package._from) + var fromReq = npa.resolve(moduleName(child), child.package._from.replace(new RegExp('^' + moduleName(child) + '@'), '')) if (fromReq.rawSpec === requested.rawSpec) return true if (fromReq.type === requested.type && fromReq.saveSpec && fromReq.saveSpec === requested.saveSpec) return true } return false } try { - return semver.satisfies(child.package.version, requested.fetchSpec) + return semver.satisfies(child.package.version, requested.fetchSpec, true) } catch (e) { return false } @@ -86,9 +82,9 @@ function childDependencySpecifier (tree, name, spec) { exports.computeMetadata = computeMetadata function computeMetadata (tree, seen) { - if (!seen) seen = {} - if (!tree || seen[tree.path]) return - seen[tree.path] = true + if (!seen) seen = new Set() + if (!tree || seen.has(tree)) return + seen.add(tree) if (tree.parent == null) { resetMetadata(tree) tree.isTop = true @@ -110,8 +106,10 @@ function computeMetadata (tree, seen) { } const deps = tree.package.dependencies || {} + const reqs = tree.swRequires || {} for (let name of Object.keys(deps)) { if (findChild(name, deps[name])) continue + if (findChild(name, reqs[name])) continue tree.missingDeps[name] = deps[name] } if (tree.isTop) { @@ -175,7 +173,9 @@ function removeObsoleteDep (child, log) { var requires = child.requires || [] requires.forEach(function (requirement) { requirement.requiredBy = requirement.requiredBy.filter(function (reqBy) { return reqBy !== child }) - if (requirement.requiredBy.length === 0) removeObsoleteDep(requirement, log) + // we don't just check requirement.requires because that doesn't account + // for circular deps. isExtraneous does. + if (isExtraneous(requirement)) removeObsoleteDep(requirement, log) }) } @@ -258,11 +258,16 @@ exports.loadRequestedDeps = function (args, tree, saveToDependencies, log, next) }, andForEachChild(loadDeps, andFinishTracker(log, next))) } +function isNotEmpty (value) { + return value != null && value !== '' +} + module.exports.computeVersionSpec = computeVersionSpec function computeVersionSpec (tree, child) { validate('OO', arguments) var requested - if (child.package._requested) { + var childReq = child.package._requested + if (childReq && (isNotEmpty(childReq.saveSpec) || (isNotEmpty(childReq.rawSpec) && isNotEmpty(childReq.fetchSpec)))) { requested = child.package._requested } else if (child.package._from) { requested = npa(child.package._from) @@ -279,9 +284,9 @@ function computeVersionSpec (tree, child) { } return rangeDescriptor + version } else if (requested.type === 'directory' || requested.type === 'file') { - return 'file:' + path.relative(tree.path, requested.fetchSpec) + return 'file:' + unixFormatPath(path.relative(tree.path, requested.fetchSpec)) } else { - return requested.saveSpec + return requested.saveSpec || requested.rawSpec } } @@ -412,7 +417,7 @@ exports.prefetchDeps = prefetchDeps function prefetchDeps (tree, deps, log, next) { validate('OOOF', arguments) var skipOptional = !npm.config.get('optional') - var seen = {} + var seen = new Set() const finished = andFinishTracker(log, next) const fpm = BB.promisify(fetchPackageMetadata) resolveBranchDeps(tree.package, deps).then( @@ -425,7 +430,7 @@ function prefetchDeps (tree, deps, log, next) { return npa.resolve(dep, deps[dep]) }).filter((dep) => { return dep.registry && - !seen[dep.toString()] && + !seen.has(dep.toString()) && !findRequirement(tree, dep.name, dep) }) if (skipOptional) { @@ -433,7 +438,7 @@ function prefetchDeps (tree, deps, log, next) { allDependencies = allDependencies.filter((dep) => !optDeps[dep.name]) } return BB.map(allDependencies, (dep) => { - seen[dep.toString()] = true + seen.add(dep.toString()) return fpm(dep, '', {tracker: log.newItem('fetchMetadata')}).then( (pkg) => { return pkg && pkg.dependencies && resolveBranchDeps(pkg, pkg.dependencies) @@ -468,11 +473,6 @@ function loadDeps (tree, log, next) { exports.loadDevDeps = function (tree, log, next) { validate('OOF', arguments) if (!tree.package.devDependencies) return andFinishTracker.now(log, next) - // if any of our prexisting children are from a shrinkwrap then we skip - // loading dev deps as the shrinkwrap will already have provided them for us. - if (tree.children.some(function (child) { return child.shrinkwrapDev })) { - return andFinishTracker.now(log, next) - } asyncMap(Object.keys(tree.package.devDependencies), function (dep, done) { // things defined as both dev dependencies and regular dependencies are treated // as the former @@ -484,11 +484,11 @@ exports.loadDevDeps = function (tree, log, next) { } var loadExtraneous = exports.loadExtraneous = function (tree, log, next) { - var seen = {} + var seen = new Set() function loadExtraneous (tree) { - if (seen[tree.path]) return - seen[tree.path] = true + if (seen.has(tree)) return + seen.add(tree) for (var child of tree.children) { if (child.loaded) continue resolveWithExistingModule(child, tree) @@ -516,10 +516,14 @@ function addDependency (name, versionSpec, tree, log, done) { var next = andAddParentToErrors(tree, done) try { var req = childDependencySpecifier(tree, name, versionSpec) + if (tree.swRequires && tree.swRequires[name]) { + var swReq = childDependencySpecifier(tree, name, tree.swRequires[name]) + } } catch (err) { return done(err) } var child = findRequirement(tree, name, req) + if (!child && swReq) child = findRequirement(tree, name, swReq) if (child) { resolveWithExistingModule(child, tree) if (child.package._shrinkwrap === undefined) { @@ -612,7 +616,7 @@ function resolveWithNewModule (pkg, tree, log, next) { } if (pkg._shrinkwrap && pkg._shrinkwrap.dependencies) { - return inflateShrinkwrap(child, pkg._shrinkwrap.dependencies, function (er) { + return inflateShrinkwrap(child, pkg._shrinkwrap, function (er) { next(er, child, log) }) } @@ -625,19 +629,22 @@ var validatePeerDeps = exports.validatePeerDeps = function (tree, onInvalid) { if (!tree.package.peerDependencies) return Object.keys(tree.package.peerDependencies).forEach(function (pkgname) { var version = tree.package.peerDependencies[pkgname] - var match = findRequirement(tree.parent || tree, pkgname, npa.resolve(pkgname, version)) + try { + var spec = npa.resolve(pkgname, version) + } catch (e) {} + var match = spec && findRequirement(tree.parent || tree, pkgname, spec) if (!match) onInvalid(tree, pkgname, version) }) } exports.validateAllPeerDeps = function (tree, onInvalid) { - validateAllPeerDeps(tree, onInvalid, {}) + validateAllPeerDeps(tree, onInvalid, new Set()) } function validateAllPeerDeps (tree, onInvalid, seen) { validate('OFO', arguments) - if (seen[tree.path]) return - seen[tree.path] = true + if (seen.has(tree)) return + seen.add(tree) validatePeerDeps(tree, onInvalid) tree.children.forEach(function (child) { validateAllPeerDeps(child, onInvalid, seen) }) } @@ -668,6 +675,7 @@ var findRequirement = exports.findRequirement = function (tree, name, requested, return null } if (tree.isTop) return null + if (!preserveSymlinks() && /^[.][.][\\/]/.test(path.relative(tree.parent.realpath, tree.realpath))) return null return findRequirement(tree.parent, name, requested, requestor) } diff --git a/deps/npm/lib/install/diff-trees.js b/deps/npm/lib/install/diff-trees.js index 67fe72d04471c0..ac4f421a5012b1 100644 --- a/deps/npm/lib/install/diff-trees.js +++ b/deps/npm/lib/install/diff-trees.js @@ -1,7 +1,11 @@ 'use strict' +var npm = require('../npm.js') var validate = require('aproba') var npa = require('npm-package-arg') var flattenTree = require('./flatten-tree.js') +var isOnlyDev = require('./is-only-dev.js') +var log = require('npmlog') +var path = require('path') function nonRegistrySource (pkg) { validate('O', arguments) @@ -119,6 +123,8 @@ var diffTrees = module.exports._diffTrees = function (oldTree, newTree) { Object.keys(flatOldTree).forEach(function (flatname) { if (flatNewTree[flatname]) return var pkg = flatOldTree[flatname] + if (pkg.isInLink && /^[.][.][/\\]/.test(path.relative(newTree.realpath, pkg.realpath))) return + toRemove[flatname] = pkg var pkgunique = getUniqueId(pkg.package) if (!toRemoveByUniqueId[pkgunique]) toRemoveByUniqueId[pkgunique] = [] @@ -146,9 +152,21 @@ var diffTrees = module.exports._diffTrees = function (oldTree, newTree) { }) Object .keys(toRemove) - .map(function (path) { return toRemove[path] }) - .forEach(function (pkg) { - setAction(differences, 'remove', pkg) + .map((path) => toRemove[path]) + .forEach((pkg) => setAction(differences, 'remove', pkg)) + + const includeDev = npm.config.get('dev') || + (!/^prod(uction)?$/.test(npm.config.get('only')) && !npm.config.get('production')) || + /^dev(elopment)?$/.test(npm.config.get('only')) || + /^dev(elopment)?$/.test(npm.config.get('also')) + const includeProd = !/^dev(elopment)?$/.test(npm.config.get('only')) + if (!includeProd || !includeDev) { + log.silly('diff-trees', 'filtering actions:', 'includeDev', includeDev, 'includeProd', includeProd) + differences = differences.filter((diff) => { + const pkg = diff[1] + const pkgIsOnlyDev = isOnlyDev(pkg) + return (!includeProd && pkgIsOnlyDev) || (includeDev && pkgIsOnlyDev) || (includeProd && !pkgIsOnlyDev) }) + } return differences } diff --git a/deps/npm/lib/install/flatten-tree.js b/deps/npm/lib/install/flatten-tree.js index b6ceb30f2fd916..56282b771da43a 100644 --- a/deps/npm/lib/install/flatten-tree.js +++ b/deps/npm/lib/install/flatten-tree.js @@ -8,19 +8,19 @@ module.exports.flatNameFromTree = flatNameFromTree function flattenTree (tree) { validate('O', arguments) - var seen = {} + var seen = new Set() var flat = {} var todo = [[tree, '/']] while (todo.length) { var next = todo.shift() var pkg = next[0] - seen[pkg.path] = true + seen.add(pkg) var path = next[1] flat[path] = pkg if (path !== '/') path += '/' for (var ii = 0; ii < pkg.children.length; ++ii) { var child = pkg.children[ii] - if (!seen[child.path]) { + if (!seen.has(child)) { todo.push([child, flatName(path, child)]) } } diff --git a/deps/npm/lib/install/inflate-shrinkwrap.js b/deps/npm/lib/install/inflate-shrinkwrap.js index 7ad966ea0a90e8..48be93d0952e72 100644 --- a/deps/npm/lib/install/inflate-shrinkwrap.js +++ b/deps/npm/lib/install/inflate-shrinkwrap.js @@ -14,7 +14,7 @@ const realizeShrinkwrapSpecifier = require('./realize-shrinkwrap-specifier.js') const validate = require('aproba') const path = require('path') -module.exports = function (tree, swdeps, opts, finishInflating) { +module.exports = function (tree, sw, opts, finishInflating) { if (!fetchPackageMetadata) { fetchPackageMetadata = BB.promisify(require('../fetch-package-metadata.js')) addBundled = BB.promisify(fetchPackageMetadata.addBundled) @@ -26,36 +26,32 @@ module.exports = function (tree, swdeps, opts, finishInflating) { if (!npm.config.get('shrinkwrap') || !npm.config.get('package-lock')) { return finishInflating() } - tree.loaded = true - return inflateShrinkwrap(tree.path, tree, swdeps, opts).then( + tree.loaded = false + tree.hasRequiresFromLock = sw.requires + return inflateShrinkwrap(tree.path, tree, sw.dependencies, opts).then( () => finishInflating(), finishInflating ) } function inflateShrinkwrap (topPath, tree, swdeps, opts) { - validate('SOO|SOOO', arguments) + if (!swdeps) return Promise.resolve() if (!opts) opts = {} const onDisk = {} tree.children.forEach((child) => { onDisk[moduleName(child)] = child }) - const dev = npm.config.get('dev') || (!/^prod(uction)?$/.test(npm.config.get('only')) && !npm.config.get('production')) || /^dev(elopment)?$/.test(npm.config.get('only')) - const prod = !/^dev(elopment)?$/.test(npm.config.get('only')) tree.children = [] return BB.each(Object.keys(swdeps), (name) => { const sw = swdeps[name] - if ( - (!prod && !sw.dev) || - (!dev && sw.dev) - ) { return null } const dependencies = sw.dependencies || {} const requested = realizeShrinkwrapSpecifier(name, sw, topPath) return inflatableChild( onDisk[name], name, topPath, tree, sw, requested, opts ).then((child) => { + child.hasRequiresFromLock = tree.hasRequiresFromLock return inflateShrinkwrap(topPath, child, dependencies) }) }) @@ -74,11 +70,13 @@ function inflatableChild (onDiskChild, name, topPath, tree, sw, requested, opts) if (onDiskChild && childIsEquivalent(sw, requested, onDiskChild)) { // The version on disk matches the shrinkwrap entry. if (!onDiskChild.fromShrinkwrap) onDiskChild.fromShrinkwrap = true - if (sw.dev) onDiskChild.shrinkwrapDev = true onDiskChild.package._requested = requested onDiskChild.package._spec = requested.rawSpec onDiskChild.package._where = topPath - onDiskChild.fromBundle = sw.bundled ? tree.fromBundle || tree : null + onDiskChild.package._optional = sw.optional + onDiskChild.package._development = sw.dev + onDiskChild.package._inBundle = sw.bundled + onDiskChild.fromBundle = (sw.bundled || onDiskChild.package._inBundle) ? tree.fromBundle || tree : null if (!onDiskChild.package._args) onDiskChild.package._args = [] onDiskChild.package._args.push([String(requested), topPath]) // non-npm registries can and will return unnormalized data, plus @@ -86,9 +84,10 @@ function inflatableChild (onDiskChild, name, topPath, tree, sw, requested, opts) // normalization rules. This ensures we get package data in a consistent, // stable format. normalizePackageDataNoErrors(onDiskChild.package) + onDiskChild.swRequires = sw.requires tree.children.push(onDiskChild) return BB.resolve(onDiskChild) - } else if (opts.fakeChildren !== false && sw.version && sw.integrity) { + } else if ((sw.version && sw.integrity) || sw.bundled) { // The shrinkwrap entry has an integrity field. We can fake a pkg to get // the installer to do a content-address fetch from the cache, if possible. return BB.resolve(makeFakeChild(name, topPath, tree, sw, requested)) @@ -105,43 +104,43 @@ function makeFakeChild (name, topPath, tree, sw, requested) { const pkg = { name: name, version: sw.version, + _id: name + '@' + sw.version, _resolved: adaptResolved(requested, sw.resolved), _requested: requested, _optional: sw.optional, + _development: sw.dev, + _inBundle: sw.bundled, _integrity: sw.integrity, _from: from, _spec: requested.rawSpec, _where: topPath, - _args: [[requested.toString(), topPath]] + _args: [[requested.toString(), topPath]], + dependencies: sw.requires } - let bundleAdded = BB.resolve() - if (Object.keys(sw.dependencies || {}).some((d) => { - return sw.dependencies[d].bundled - })) { - pkg.bundleDependencies = [] - bundleAdded = addBundled(pkg) - } - return bundleAdded.then(() => { - const child = createChild({ - package: pkg, - loaded: true, - parent: tree, - children: pkg._bundled || [], - fromShrinkwrap: true, - fakeChild: sw, - fromBundle: sw.bundled ? tree.fromBundle || tree : null, - path: childPath(tree.path, pkg), - realpath: childPath(tree.realpath, pkg), - location: tree.location + '/' + pkg.name, - isInLink: tree.isLink - }) - tree.children.push(child) - if (pkg._bundled) { - delete pkg._bundled - inflateBundled(child, child, child.children) + + if (!sw.bundled) { + const bundleDependencies = Object.keys(sw.dependencies || {}).filter((d) => sw.dependencies[d].bundled) + if (bundleDependencies.length === 0) { + pkg.bundleDependencies = bundleDependencies } - return child + } + const child = createChild({ + package: pkg, + loaded: true, + parent: tree, + children: [], + fromShrinkwrap: true, + fakeChild: sw, + fromBundle: sw.bundled ? tree.fromBundle || tree : null, + path: childPath(tree.path, pkg), + realpath: childPath(tree.realpath, pkg), + location: tree.location + '/' + pkg.name, + isLink: requested.type === 'directory', + isInLink: tree.isLink, + swRequires: sw.requires }) + tree.children.push(child) + return child } function adaptResolved (requested, resolved) { @@ -162,25 +161,27 @@ function adaptResolved (requested, resolved) { } function fetchChild (topPath, tree, sw, requested) { - const from = sw.from || requested.raw - const optional = sw.optional return fetchPackageMetadata(requested, topPath).then((pkg) => { - pkg._from = from - pkg._optional = optional + pkg._from = sw.from || requested.raw + pkg._optional = sw.optional + pkg._development = sw.dev + pkg._inBundle = false return addBundled(pkg).then(() => pkg) }).then((pkg) => { var isLink = pkg._requested.type === 'directory' const child = createChild({ package: pkg, - loaded: true, + loaded: false, parent: tree, fromShrinkwrap: requested, path: childPath(tree.path, pkg), realpath: isLink ? requested.fetchSpec : childPath(tree.realpath, pkg), children: pkg._bundled || [], location: tree.location + '/' + pkg.name, + fromBundle: null, isLink: isLink, - isInLink: tree.isLink + isInLink: tree.isLink, + swRequires: sw.requires }) tree.children.push(child) if (pkg._bundled) { diff --git a/deps/npm/lib/install/is-only-dev.js b/deps/npm/lib/install/is-only-dev.js new file mode 100644 index 00000000000000..ef41e8ad1a2659 --- /dev/null +++ b/deps/npm/lib/install/is-only-dev.js @@ -0,0 +1,35 @@ +'use strict' +module.exports = isOnlyDev + +const moduleName = require('../utils/module-name.js') +const isDevDep = require('./is-dev-dep.js') +const isProdDep = require('./is-prod-dep.js') + +// Returns true if the module `node` is only required direcctly as a dev +// dependency of the top level or transitively _from_ top level dev +// dependencies. +// Dual mode modules (that are both dev AND prod) should return false. +function isOnlyDev (node, seen) { + if (!seen) seen = new Set() + return node.requiredBy.length && node.requiredBy.every(andIsOnlyDev(moduleName(node), seen)) +} + +// There is a known limitation with this implementation: If a dependency is +// ONLY required by cycles that are detached from the top level then it will +// ultimately return true. +// +// This is ok though: We don't allow shrinkwraps with extraneous deps and +// these situation is caught by the extraneous checker before we get here. +function andIsOnlyDev (name, seen) { + return function (req) { + const isDev = isDevDep(req, name) + const isProd = isProdDep(req, name) + if (req.isTop) { + return isDev && !isProd + } else { + if (seen.has(req)) return true + seen.add(req) + return isOnlyDev(req, seen) + } + } +} diff --git a/deps/npm/lib/install/is-only-optional.js b/deps/npm/lib/install/is-only-optional.js new file mode 100644 index 00000000000000..7366e9abe1b326 --- /dev/null +++ b/deps/npm/lib/install/is-only-optional.js @@ -0,0 +1,18 @@ +'use strict' +module.exports = isOptional + +const isOptDep = require('./is-opt-dep.js') + +function isOptional (node, seen) { + if (!seen) seen = new Set() + // If a node is not required by anything, then we've reached + // the top level package. + if (seen.has(node) || node.requiredBy.length === 0) { + return false + } + seen.add(node) + + return node.requiredBy.every(function (req) { + return isOptDep(req, node.package.name) || isOptional(req, seen) + }) +} diff --git a/deps/npm/lib/install/mutate-into-logical-tree.js b/deps/npm/lib/install/mutate-into-logical-tree.js index 018745cc5ffa49..0979afc7814385 100644 --- a/deps/npm/lib/install/mutate-into-logical-tree.js +++ b/deps/npm/lib/install/mutate-into-logical-tree.js @@ -70,18 +70,23 @@ module.exports.asReadInstalled = function (tree) { } function translateTree (tree) { - return translateTree_(tree, {}) + return translateTree_(tree, new Set()) } function translateTree_ (tree, seen) { var pkg = tree.package - if (seen[tree.path]) return pkg - seen[tree.path] = pkg + if (seen.has(tree)) return pkg + seen.add(tree) if (pkg._dependencies) return pkg pkg._dependencies = pkg.dependencies pkg.dependencies = {} tree.children.forEach(function (child) { - pkg.dependencies[moduleName(child)] = translateTree_(child, seen) + const dep = pkg.dependencies[moduleName(child)] = translateTree_(child, seen) + if (child.fakeChild) { + dep.missing = true + dep.optional = child.package._optional + dep.requiredBy = child.package._spec + } }) function markMissing (name, requiredBy) { diff --git a/deps/npm/lib/install/node.js b/deps/npm/lib/install/node.js index b1b01fa8b9eb6a..18138078a2e662 100644 --- a/deps/npm/lib/install/node.js +++ b/deps/npm/lib/install/node.js @@ -27,6 +27,9 @@ var defaultTemplate = { function isLink (node) { return node && node.isLink } +function isInLink (node) { + return node && (node.isInLink || node.isLink) +} var create = exports.create = function (node, template, isNotTop) { if (!template) template = defaultTemplate @@ -41,16 +44,9 @@ var create = exports.create = function (node, template, isNotTop) { if (!isNotTop) { // isLink is true for the symlink and everything inside it. // by contrast, isInLink is true for only the things inside a link - if (node.isLink == null && isLink(node.parent)) { - node.isLink = true - node.isInLink = true - } else if (node.isLink == null) { - node.isLink = false - node.isInLink = false - } - if (node.fromBundle == null && node.package) { - node.fromBundle = node.package._inBundle - } else if (node.fromBundle == null) { + if (node.isLink == null) node.isLink = isLink(node.parent) + if (node.isInLink == null) node.isInLink = isInLink(node.parent) + if (node.fromBundle == null) { node.fromBundle = false } } @@ -58,12 +54,12 @@ var create = exports.create = function (node, template, isNotTop) { } exports.reset = function (node) { - reset(node, {}) + reset(node, new Set()) } function reset (node, seen) { - if (seen[node.path]) return - seen[node.path] = true + if (seen.has(node)) return + seen.add(node) var child = create(node) // FIXME: cleaning up after read-package-json's mess =( diff --git a/deps/npm/lib/install/read-shrinkwrap.js b/deps/npm/lib/install/read-shrinkwrap.js index de398fb40b878d..45e883caa2f5e2 100644 --- a/deps/npm/lib/install/read-shrinkwrap.js +++ b/deps/npm/lib/install/read-shrinkwrap.js @@ -47,14 +47,10 @@ function maybeReadFile (name, child) { ).catch({code: 'ENOENT'}, () => null) } -module.exports.andInflate = function (child, opts, next) { - if (arguments.length === 2) { - next = opts - opts = {} - } +module.exports.andInflate = function (child, next) { readShrinkwrap(child, iferr(next, function () { if (child.package._shrinkwrap) { - return inflateShrinkwrap(child, child.package._shrinkwrap.dependencies || {}, opts, next) + return inflateShrinkwrap(child, child.package._shrinkwrap || {}, next) } else { return next() } diff --git a/deps/npm/lib/install/realize-shrinkwrap-specifier.js b/deps/npm/lib/install/realize-shrinkwrap-specifier.js index 91030bfa826fe2..ac700278fff9fa 100644 --- a/deps/npm/lib/install/realize-shrinkwrap-specifier.js +++ b/deps/npm/lib/install/realize-shrinkwrap-specifier.js @@ -5,14 +5,17 @@ module.exports = function (name, sw, where) { try { if (sw.version && sw.integrity) { return npa.resolve(name, sw.version, where) + } else if (sw.from) { + const spec = npa(sw.from, where) + if (spec.registry && sw.version) { + return npa.resolve(name, sw.version, where) + } else if (!sw.resolved) { + return spec + } } if (sw.resolved) { return npa.resolve(name, sw.resolved, where) } - if (sw.from) { - var spec = npa(sw.from, where) - if (!spec.registry) return spec - } } catch (_) { } return npa.resolve(name, sw.version, where) } diff --git a/deps/npm/lib/install/save.js b/deps/npm/lib/install/save.js index 56a4a892ad4ee3..e1a94fcff7a6ad 100644 --- a/deps/npm/lib/install/save.js +++ b/deps/npm/lib/install/save.js @@ -1,11 +1,9 @@ 'use strict' -const BB = require('bluebird') - const createShrinkwrap = require('../shrinkwrap.js').createShrinkwrap const deepSortObject = require('../utils/deep-sort-object.js') const detectIndent = require('detect-indent') -const fs = BB.promisifyAll(require('graceful-fs')) +const fs = require('graceful-fs') const iferr = require('iferr') const log = require('npmlog') const moduleName = require('../utils/module-name.js') @@ -77,8 +75,8 @@ function savePackageJson (tree, next) { var toSave = getThingsToSave(tree) var toRemove = getThingsToRemove(tree) var savingTo = {} - toSave.forEach(function (pkg) { savingTo[pkg.save] = true }) - toRemove.forEach(function (pkg) { savingTo[pkg.save] = true }) + toSave.forEach(function (pkg) { if (pkg.save) savingTo[pkg.save] = true }) + toRemove.forEach(function (pkg) { if (pkg.save) savingTo[pkg.save] = true }) Object.keys(savingTo).forEach(function (save) { if (!tree.package[save]) tree.package[save] = {} @@ -87,7 +85,7 @@ function savePackageJson (tree, next) { log.verbose('saving', toSave) const types = ['dependencies', 'devDependencies', 'optionalDependencies'] toSave.forEach(function (pkg) { - tree.package[pkg.save][pkg.name] = pkg.spec + if (pkg.save) tree.package[pkg.save][pkg.name] = pkg.spec const movedFrom = [] for (let saveType of types) { if ( @@ -109,7 +107,7 @@ function savePackageJson (tree, next) { }) toRemove.forEach(function (pkg) { - delete tree.package[pkg.save][pkg.name] + if (pkg.save) delete tree.package[pkg.save][pkg.name] if (saveBundle) { bundle = without(bundle, pkg.name) } @@ -123,7 +121,12 @@ function savePackageJson (tree, next) { } var json = JSON.stringify(tree.package, null, indent) + '\n' - writeFileAtomic(saveTarget, json, next) + if (json === packagejson) { + log.verbose('shrinkwrap', 'skipping write for package.json because there were no changes.') + next() + } else { + writeFileAtomic(saveTarget, json, next) + } })) } diff --git a/deps/npm/lib/install/validate-args.js b/deps/npm/lib/install/validate-args.js index c30bf8695b0ce1..65b660417a4caa 100644 --- a/deps/npm/lib/install/validate-args.js +++ b/deps/npm/lib/install/validate-args.js @@ -14,12 +14,23 @@ module.exports = function (idealTree, args, next) { asyncMap(args, function (pkg, done) { chain([ + [hasMinimumFields, pkg], [checkSelf, idealTree, pkg, force], [isInstallable, pkg] ], done) }, next) } +function hasMinimumFields (pkg, cb) { + if (pkg.name === '' || pkg.name == null) { + return cb(new Error(`Can't install ${pkg._resolved}: Missing package name`)) + } else if (pkg.version === '' || pkg.version == null) { + return cb(new Error(`Can't install ${pkg._resolved}: Missing package version`)) + } else { + return cb() + } +} + function getWarnings (pkg) { while (pkg.parent) pkg = pkg.parent if (!pkg.warnings) pkg.warnings = [] diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js index 3e2f2ce8fadef8..2e3db79c3be7d0 100644 --- a/deps/npm/lib/ls.js +++ b/deps/npm/lib/ls.js @@ -13,12 +13,11 @@ var archy = require('archy') var semver = require('semver') var color = require('ansicolors') var npa = require('npm-package-arg') -var iferr = require('iferr') var sortedObject = require('sorted-object') -var extend = Object.assign || require('util')._extend var npm = require('./npm.js') var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js') var computeMetadata = require('./install/deps.js').computeMetadata +var readShrinkwrap = require('./install/read-shrinkwrap.js') var packageId = require('./utils/package-id.js') var usage = require('./utils/usage') var output = require('./utils/output.js') @@ -36,15 +35,13 @@ function ls (args, silent, cb) { silent = false } var dir = path.resolve(npm.dir, '..') - readPackageTree(dir, andComputeMetadata(iferr(cb, function (physicalTree) { - lsFromTree(dir, physicalTree, args, silent, cb) - }))) -} - -function andComputeMetadata (next) { - return function (er, tree) { - next(null, computeMetadata(tree || {})) - } + readPackageTree(dir, function (_, physicalTree) { + if (!physicalTree) physicalTree = {package: {}, path: dir} + physicalTree.isTop = true + readShrinkwrap.andInflate(physicalTree, function () { + lsFromTree(dir, computeMetadata(physicalTree), args, silent, cb) + }) + }) } function inList (list, value) { @@ -81,6 +78,8 @@ var lsFromTree = ls.fromTree = function (dir, physicalTree, args, silent, cb) { pruneNestedExtraneous(data) filterByEnv(data) + filterByLink(data) + var unlooped = filterFound(unloop(data), args) var lite = getLite(unlooped) @@ -90,13 +89,13 @@ var lsFromTree = ls.fromTree = function (dir, physicalTree, args, silent, cb) { var json = npm.config.get('json') var out if (json) { - var seen = [] + var seen = new Set() var d = long ? unlooped : lite // the raw data can be circular out = JSON.stringify(d, function (k, o) { if (typeof o === 'object') { - if (inList(seen, o)) return '[Circular]' - seen.push(o) + if (seen.has(o)) return '[Circular]' + seen.add(o) } return o }, 2) @@ -149,6 +148,19 @@ function filterByEnv (data) { data.dependencies = dependencies } +function filterByLink (data) { + if (npm.config.get('link')) { + var dependencies = {} + Object.keys(data.dependencies).forEach(function (name) { + var dependency = data.dependencies[name] + if (dependency.link) { + dependencies[name] = dependency + } + }) + data.dependencies = dependencies + } +} + function alphasort (a, b) { a = a.toLowerCase() b = b.toLowerCase() @@ -224,7 +236,11 @@ function getLite (data, noname, depth) { ', required by ' + packageId(data) lite.problems.push(p) - return [d, { required: dep.requiredBy, missing: true }] + if (dep.dependencies) { + return [d, getLite(dep, true)] + } else { + return [d, { required: dep.requiredBy, missing: true }] + } } else if (dep.peerMissing) { lite.problems = lite.problems || [] dep.peerMissing.forEach(function (missing) { @@ -254,22 +270,22 @@ function getLite (data, noname, depth) { function unloop (root) { var queue = [root] - var seen = {} - seen[root.path] = true + var seen = new Set() + seen.add(root) while (queue.length) { var current = queue.shift() var deps = current.dependencies = current.dependencies || {} Object.keys(deps).forEach(function (d) { var dep = deps[d] - if (dep.missing) return - if (dep.path && seen[dep.path]) { - dep = deps[d] = extend({}, dep) + if (dep.missing && !dep.dependencies) return + if (dep.path && seen.has(dep)) { + dep = deps[d] = Object.assign({}, dep) dep.dependencies = {} dep._deduped = path.relative(root.path, dep.path).replace(/node_modules\//g, '') return } - seen[dep.path] = true + seen.add(dep) queue.push(dep) }) } @@ -353,11 +369,26 @@ function makeArchy_ (data, long, dir, depth, parent, d) { unmet = color.bgBlack(color.red(unmet)) } } - data = unmet + ' ' + d + '@' + data.requiredBy + var label = data._id || (d + '@' + data.requiredBy) + if (data._found === 'explicit' && data._id) { + if (npm.color) { + label = color.bgBlack(color.yellow(label.trim())) + ' ' + } else { + label = label.trim() + ' ' + } + } + return { + label: unmet + ' ' + label, + nodes: Object.keys(data.dependencies || {}) + .sort(alphasort).filter(function (d) { + return !isCruft(data.dependencies[d]) + }).map(function (d) { + return makeArchy_(sortedObject(data.dependencies[d]), long, dir, depth + 1, data, d) + }) + } } else { - data = d + '@' + data.requiredBy + return {label: d + '@' + data.requiredBy} } - return data } var out = {} diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js index 7d5cfba86e7d37..f2fb2df79a3cca 100644 --- a/deps/npm/lib/outdated.js +++ b/deps/npm/lib/outdated.js @@ -38,21 +38,19 @@ var long = npm.config.get('long') var mapToRegistry = require('./utils/map-to-registry.js') var isExtraneous = require('./install/is-extraneous.js') var computeMetadata = require('./install/deps.js').computeMetadata +var computeVersionSpec = require('./install/deps.js').computeVersionSpec var moduleName = require('./utils/module-name.js') var output = require('./utils/output.js') var ansiTrim = require('./utils/ansi-trim') -function uniqName (item) { - return item[0].path + '|' + item[1] + '|' + item[7] -} - function uniq (list) { + // we maintain the array because we need an array, not iterator, return + // value. var uniqed = [] - var seen = {} + var seen = new Set() list.forEach(function (item) { - var name = uniqName(item) - if (seen[name]) return - seen[name] = true + if (seen.has(item)) return + seen.add(item) uniqed.push(item) }) return uniqed @@ -204,7 +202,7 @@ function outdated_ (args, path, tree, parentHas, depth, cb) { var types = {} var pkg = tree.package - var deps = tree.children.filter(function (child) { return !isExtraneous(child) }) || [] + var deps = tree.error ? tree.children : tree.children.filter((child) => !isExtraneous(child)) deps.forEach(function (dep) { types[moduleName(dep)] = 'dependencies' @@ -291,7 +289,7 @@ function outdated_ (args, path, tree, parentHas, depth, cb) { var required = (tree.package.dependencies)[name] || (tree.package.optionalDependencies)[name] || (tree.package.devDependencies)[name] || - dep.package._requested && dep.package._requested.fetchSpec || + computeVersionSpec(tree, dep) || '*' if (!long) return shouldUpdate(args, dep, name, has, required, depth, path, cb) diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js index 4552bbc498986b..ae3bb260bad02a 100644 --- a/deps/npm/lib/pack.js +++ b/deps/npm/lib/pack.js @@ -163,6 +163,8 @@ function packGitDep (manifest, dir) { const child = cp.spawn(process.env.NODE || process.execPath, [ require.main.filename, 'install', + '--dev', + '--prod', '--ignore-prepublish', '--no-progress', '--no-save' diff --git a/deps/npm/lib/prune.js b/deps/npm/lib/prune.js index 6027745383e47a..4ac8139576bd04 100644 --- a/deps/npm/lib/prune.js +++ b/deps/npm/lib/prune.js @@ -11,7 +11,7 @@ var util = require('util') var moduleName = require('./utils/module-name.js') var Installer = require('./install.js').Installer var isExtraneous = require('./install/is-extraneous.js') -var isDev = require('./install/is-dev-dep.js') +var isOnlyDev = require('./install/is-only-dev.js') var removeDeps = require('./install/deps.js').removeDeps var loadExtraneous = require('./install/deps.js').loadExtraneous var chain = require('slide').chain @@ -26,7 +26,6 @@ function prune (args, cb) { function Pruner (where, dryrun, args) { Installer.call(this, where, dryrun, args) - this.fakeChildren = false } util.inherits(Pruner, Installer) @@ -42,9 +41,7 @@ Pruner.prototype.loadAllDepsIntoIdealTree = function (cb) { function shouldPrune (child) { if (isExtraneous(child)) return true if (!excludeDev) return false - var childName = moduleName(child) - var isChildDev = function (parent) { return isDev(parent, childName) } - if (child.requiredBy.every(isChildDev)) return true + return isOnlyDev(child) } function getModuleName (child) { // wrapping because moduleName doesn't like extra args and we're called diff --git a/deps/npm/lib/rebuild.js b/deps/npm/lib/rebuild.js index 2673b1cfea66a3..bbc5e8f4811b34 100644 --- a/deps/npm/lib/rebuild.js +++ b/deps/npm/lib/rebuild.js @@ -43,10 +43,10 @@ function cleanBuild (folders, set, cb) { function filter (data, args, set, seen) { if (!set) set = {} - if (!seen) seen = {} + if (!seen) seen = new Set() if (set.hasOwnProperty(data.path)) return set - if (seen.hasOwnProperty(data.path)) return set - seen[data.path] = true + if (seen.has(data)) return set + seen.add(data) var pass if (!args.length) pass = true // rebuild everything else if (data.name && data._id) { diff --git a/deps/npm/lib/shrinkwrap.js b/deps/npm/lib/shrinkwrap.js index 428c12bba70233..a541d868fc2d02 100644 --- a/deps/npm/lib/shrinkwrap.js +++ b/deps/npm/lib/shrinkwrap.js @@ -4,13 +4,12 @@ const BB = require('bluebird') const chain = require('slide').chain const detectIndent = require('detect-indent') -const fs = BB.promisifyAll(require('graceful-fs')) +const readFile = BB.promisify(require('graceful-fs').readFile) const getRequested = require('./install/get-requested.js') const id = require('./install/deps.js') const iferr = require('iferr') -const isDevDep = require('./install/is-dev-dep.js') -const isOptDep = require('./install/is-opt-dep.js') -const isProdDep = require('./install/is-prod-dep.js') +const isOnlyOptional = require('./install/is-only-optional.js') +const isOnlyDev = require('./install/is-only-dev.js') const lifecycle = require('./utils/lifecycle.js') const log = require('npmlog') const moduleName = require('./utils/module-name.js') @@ -21,6 +20,7 @@ const readPackageTree = BB.promisify(require('read-package-tree')) const ssri = require('ssri') const validate = require('aproba') const writeFileAtomic = require('write-file-atomic') +const unixFormatPath = require('./utils/unix-format-path.js') const PKGLOCK = 'package-lock.json' const SHRINKWRAP = 'npm-shrinkwrap.json' @@ -47,7 +47,7 @@ function shrinkwrap (args, silent, cb) { { Promise: BB } ).then(() => { log.notice('', `${PKGLOCK} has been renamed to ${SHRINKWRAP}. ${SHRINKWRAP} will be used for future installations.`) - return fs.readFileAsync(path.resolve(npm.prefix, SHRINKWRAP)).then((d) => { + return readFile(path.resolve(npm.prefix, SHRINKWRAP)).then((d) => { return JSON.parse(d) }) }, (err) => { @@ -90,6 +90,7 @@ function treeToShrinkwrap (tree) { if (tree.package.name) pkginfo.name = tree.package.name if (tree.package.version) pkginfo.version = tree.package.version if (tree.children.length) { + pkginfo.requires = true shrinkwrapDeps(pkginfo.dependencies = {}, tree, tree) } return pkginfo @@ -97,34 +98,28 @@ function treeToShrinkwrap (tree) { function shrinkwrapDeps (deps, top, tree, seen) { validate('OOO', [deps, top, tree]) - if (!seen) seen = {} - if (seen[tree.path]) return - seen[tree.path] = true + if (!seen) seen = new Set() + if (seen.has(tree)) return + seen.add(tree) tree.children.sort(function (aa, bb) { return moduleName(aa).localeCompare(moduleName(bb)) }).forEach(function (child) { - var childIsOnlyDev = isOnlyDev(child) if (child.fakeChild) { deps[moduleName(child)] = child.fakeChild return } + var childIsOnlyDev = isOnlyDev(child) var pkginfo = deps[moduleName(child)] = {} - var req = child.package._requested || getRequested(child) - if (req.type === 'directory' || req.type === 'file') { - pkginfo.version = 'file:' + path.relative(top.path, child.package._resolved || req.fetchSpec) - } else if (!req.registry && !child.fromBundle) { - pkginfo.version = child.package._resolved || req.saveSpec || req.rawSpec - } else { - pkginfo.version = child.package.version - } + var requested = child.package._requested || getRequested(child) || {} + pkginfo.version = childVersion(top, child, requested) if (child.fromBundle || child.isInLink) { pkginfo.bundled = true } else { - if (req.registry) { + if (requested.registry) { pkginfo.resolved = child.package._resolved } // no integrity for git deps as integirty hashes are based on the // tarball and we can't (yet) create consistent tarballs from a stable // source. - if (req.type !== 'git') { + if (requested.type !== 'git') { pkginfo.integrity = child.package._integrity if (!pkginfo.integrity && child.package._shasum) { pkginfo.integrity = ssri.fromHex(child.package._shasum, 'sha1') @@ -132,7 +127,14 @@ function shrinkwrapDeps (deps, top, tree, seen) { } } if (childIsOnlyDev) pkginfo.dev = true - if (isOptional(child)) pkginfo.optional = true + if (isOnlyOptional(child)) pkginfo.optional = true + if (child.requires.length) { + pkginfo.requires = {} + child.requires.sort((a, b) => moduleName(a).localeCompare(moduleName(b))).forEach((required) => { + var requested = required.package._requested || getRequested(required) || {} + pkginfo.requires[moduleName(required)] = childVersion(top, required, requested) + }) + } if (child.children.length) { pkginfo.dependencies = {} shrinkwrapDeps(pkginfo.dependencies, top, child, seen) @@ -140,6 +142,16 @@ function shrinkwrapDeps (deps, top, tree, seen) { }) } +function childVersion (top, child, req) { + if (req.type === 'directory' || req.type === 'file') { + return 'file:' + unixFormatPath(path.relative(top.path, child.package._resolved || req.fetchSpec)) + } else if (!req.registry && !child.fromBundle) { + return child.package._resolved || req.saveSpec || req.rawSpec + } else { + return child.package.version + } +} + function shrinkwrap_ (dir, pkginfo, opts, cb) { save(dir, pkginfo, opts, cb) } @@ -163,14 +175,20 @@ function save (dir, pkginfo, opts, cb) { ) const updated = updateLockfileMetadata(pkginfo, pkg && pkg.data) const swdata = JSON.stringify(updated, null, info.indent) + '\n' - writeFileAtomic(info.path, swdata, (err) => { - if (err) return cb(err) - if (opts.silent) return cb(null, pkginfo) - if (!shrinkwrap && !lockfile) { - log.notice('', `created a lockfile as ${path.basename(info.path)}. You should commit this file.`) - } + if (swdata === info.raw) { + // skip writing if file is identical + log.verbose('shrinkwrap', `skipping write for ${path.basename(info.path)} because there were no changes.`) cb(null, pkginfo) - }) + } else { + writeFileAtomic(info.path, swdata, (err) => { + if (err) return cb(err) + if (opts.silent) return cb(null, pkginfo) + if (!shrinkwrap && !lockfile) { + log.notice('', `created a lockfile as ${path.basename(info.path)}. You should commit this file.`) + } + cb(null, pkginfo) + }) + } } ).then((file) => { }, cb) @@ -211,56 +229,15 @@ function updateLockfileMetadata (pkginfo, pkgJson) { function checkPackageFile (dir, name) { const file = path.resolve(dir, name) - return fs.readFileAsync( + return readFile( file, 'utf8' ).then((data) => { return { path: file, + raw: data, data: JSON.parse(data), indent: detectIndent(data).indent || 2 } }).catch({code: 'ENOENT'}, () => {}) } -// Returns true if the module `node` is only required direcctly as a dev -// dependency of the top level or transitively _from_ top level dev -// dependencies. -// Dual mode modules (that are both dev AND prod) should return false. -function isOnlyDev (node, seen) { - if (!seen) seen = {} - return node.requiredBy.length && node.requiredBy.every(andIsOnlyDev(moduleName(node), seen)) -} - -// There is a known limitation with this implementation: If a dependency is -// ONLY required by cycles that are detached from the top level then it will -// ultimately return true. -// -// This is ok though: We don't allow shrinkwraps with extraneous deps and -// these situation is caught by the extraneous checker before we get here. -function andIsOnlyDev (name, seen) { - return function (req) { - var isDev = isDevDep(req, name) - var isProd = isProdDep(req, name) - if (req.isTop) { - return isDev && !isProd - } else { - if (seen[req.path]) return true - seen[req.path] = true - return isOnlyDev(req, seen) - } - } -} - -function isOptional (node, seen) { - if (!seen) seen = {} - // If a node is not required by anything, then we've reached - // the top level package. - if (seen[node.path] || node.requiredBy.length === 0) { - return false - } - seen[node.path] = true - - return node.requiredBy.every(function (req) { - return isOptDep(req, node.package.name) || isOptional(req, seen) - }) -} diff --git a/deps/npm/lib/uninstall.js b/deps/npm/lib/uninstall.js index c181fdc4e8200e..333d3e9d69c3c9 100644 --- a/deps/npm/lib/uninstall.js +++ b/deps/npm/lib/uninstall.js @@ -52,7 +52,6 @@ class Uninstaller extends Installer { constructor (where, dryrun, args) { super(where, dryrun, args) this.remove = [] - this.fakeChildren = false } loadArgMetadata (next) { diff --git a/deps/npm/lib/utils/deep-sort-object.js b/deps/npm/lib/utils/deep-sort-object.js index a9971506997013..7499efc4bef533 100644 --- a/deps/npm/lib/utils/deep-sort-object.js +++ b/deps/npm/lib/utils/deep-sort-object.js @@ -1,16 +1,14 @@ 'use strict' var sortedObject = require('sorted-object') -module.exports = function deepSortObject (obj, sortBy) { +module.exports = function deepSortObject (obj) { if (obj == null || typeof obj !== 'object') return obj if (obj instanceof Array) { - return obj.map(function (x) { - return deepSortObject(x, sortBy) - }) + return obj.map(deepSortObject) } obj = sortedObject(obj) Object.keys(obj).forEach(function (key) { - obj[key] = deepSortObject(obj[key], sortBy) + obj[key] = deepSortObject(obj[key]) }) return obj } diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index b13d42e1df451f..52a675bea640ad 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -135,7 +135,9 @@ function exit (code, noLog) { // for whatever reason gets thrown away, instead of leaving the CLI open // // Commands that expect long-running actions should just delay `cb()` - process.exit(code) + process.stdout.write('', () => { + process.exit(code) + }) } } diff --git a/deps/npm/lib/utils/git.js b/deps/npm/lib/utils/git.js index 4d05c75b867e37..6770853dd9622a 100644 --- a/deps/npm/lib/utils/git.js +++ b/deps/npm/lib/utils/git.js @@ -1,25 +1,28 @@ -// handle some git configuration for windows +'use strict' + +const BB = require('bluebird') + +const exec = require('child_process').execFile +const spawn = require('./spawn') +const npm = require('../npm.js') +const which = require('which') +const git = npm.config.get('git') +const assert = require('assert') +const log = require('npmlog') +const noProgressTillDone = require('./no-progress-while-running.js').tillDone exports.spawn = spawnGit +exports.exec = BB.promisify(execGit) exports.chainableExec = chainableExec exports.whichAndExec = whichAndExec -var exec = require('child_process').execFile -var spawn = require('./spawn') -var npm = require('../npm.js') -var which = require('which') -var git = npm.config.get('git') -var assert = require('assert') -var log = require('npmlog') -var noProgressTillDone = require('./no-progress-while-running.js').tillDone - function prefixGitArgs () { return process.platform === 'win32' ? ['-c', 'core.longpaths=true'] : [] } function execGit (args, options, cb) { log.info('git', args) - var fullArgs = prefixGitArgs().concat(args || []) + const fullArgs = prefixGitArgs().concat(args || []) return exec(git, fullArgs, options, noProgressTillDone(cb)) } diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index f8b34d7befada4..412c1c69448a9a 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -60,6 +60,8 @@ function lifecycle (pkg, stage, wd, unsafe, failOk, cb) { delete pkg.scripts.prepublish } + if (!pkg.scripts[stage]) return cb() + validWd(wd || path.resolve(npm.dir, pkg.name), function (er, wd) { if (er) return cb(er) @@ -262,7 +264,11 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { var sh = 'sh' var shFlag = '-c' - if (process.platform === 'win32') { + var customShell = npm.config.get('script-shell') + + if (customShell) { + sh = customShell + } else if (process.platform === 'win32') { sh = process.env.comspec || 'cmd' shFlag = '/d /s /c' conf.windowsVerbatimArguments = true diff --git a/deps/npm/lib/utils/move.js b/deps/npm/lib/utils/move.js index 242e87d37fce66..d564962c219411 100644 --- a/deps/npm/lib/utils/move.js +++ b/deps/npm/lib/utils/move.js @@ -1,19 +1,12 @@ 'use strict' module.exports = wrappedMove -var fs = require('graceful-fs') -var move = require('move-concurrently') -var Bluebird = require('bluebird') +const fs = require('graceful-fs') +const move = require('move-concurrently') +const Bluebird = require('bluebird') -function wrappedMove (from, to, cb) { - var movePromise = move(from, to, {fs: fs, Promise: Bluebird, maxConcurrency: 4}) - if (cb) { - return movePromise.then(function (value) { - cb(value) - }, function (err) { - cb(err) - }) - } else { - return movePromise - } +const options = {fs: fs, Promise: Bluebird, maxConcurrency: 4} + +function wrappedMove (from, to) { + return move(from, to, options) } diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js index ebbee025a27540..12719e37e290ab 100644 --- a/deps/npm/lib/utils/tar.js +++ b/deps/npm/lib/utils/tar.js @@ -185,11 +185,11 @@ function pack_ (tarball, folder, tree, pkg, cb) { var pkg = tree.children.filter(nameMatch(name))[0] if (!pkg) return false var requiredBy = [].concat(pkg.requiredBy) - var seen = {} + var seen = new Set() while (requiredBy.length) { var reqPkg = requiredBy.shift() - if (seen[reqPkg.path]) continue - seen[reqPkg.path] = true + if (seen.has(reqPkg)) continue + seen.add(reqPkg) if (!reqPkg) continue if (reqPkg.parent === tree && bd.indexOf(moduleName(reqPkg)) !== -1) { return true diff --git a/deps/npm/lib/utils/unix-format-path.js b/deps/npm/lib/utils/unix-format-path.js new file mode 100644 index 00000000000000..a82cd7135cc2c9 --- /dev/null +++ b/deps/npm/lib/utils/unix-format-path.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports = function (path) { + return path.replace(/\\/g, '/') +} diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js index 42f7d2a68d2570..c52b5158a03398 100644 --- a/deps/npm/lib/version.js +++ b/deps/npm/lib/version.js @@ -4,7 +4,8 @@ const BB = require('bluebird') const assert = require('assert') const chain = require('slide').chain const detectIndent = require('detect-indent') -const fs = BB.promisifyAll(require('graceful-fs')) +const fs = require('graceful-fs') +const readFile = BB.promisify(require('graceful-fs').readFile) const git = require('./utils/git.js') const lifecycle = require('./utils/lifecycle.js') const log = require('npmlog') @@ -151,7 +152,7 @@ const SHRINKWRAP = 'npm-shrinkwrap.json' const PKGLOCK = 'package-lock.json' function readLockfile (name) { - return fs.readFileAsync( + return readFile( path.join(npm.localPrefix, name), 'utf8' ).catch({code: 'ENOENT'}, () => null) } @@ -278,26 +279,38 @@ function checkGit (localData, cb) { } function _commit (version, localData, cb) { - var packagePath = path.join(npm.localPrefix, 'package.json') - var options = { env: process.env } - var message = npm.config.get('message').replace(/%s/g, version) - var sign = npm.config.get('sign-git-tag') - var flag = sign ? '-sm' : '-am' - chain( - [ - git.chainableExec([ 'add', packagePath ], options), - localData.hasShrinkwrap && git.chainableExec([ 'add', path.join(npm.localPrefix, 'npm-shrinkwrap.json') ], options), - localData.hasPackageLock && git.chainableExec([ 'add', path.join(npm.localPrefix, 'package-lock.json') ], options), - git.chainableExec([ 'commit', '-m', message ], options), - !localData.existingTag && git.chainableExec([ - 'tag', - npm.config.get('tag-version-prefix') + version, - flag, - message + const options = { env: process.env } + const message = npm.config.get('message').replace(/%s/g, version) + const sign = npm.config.get('sign-git-tag') + const flagForTag = sign ? '-sm' : '-am' + + stagePackageFiles(localData, options).then(() => { + return git.exec([ 'commit', '-m', message ], options) + }).then(() => { + if (!localData.existingTag) { + return git.exec([ + 'tag', npm.config.get('tag-version-prefix') + version, + flagForTag, message ], options) - ], - cb - ) + } + }).nodeify(cb) +} + +function stagePackageFiles (localData, options) { + return addLocalFile('package.json', options, false).then(() => { + if (localData.hasShrinkwrap) { + return addLocalFile('npm-shrinkwrap.json', options, false) + } else if (localData.hasPackageLock) { + return addLocalFile('package-lock.json', options, false) + } + }) +} + +function addLocalFile (file, options, ignoreFailure) { + const p = git.exec(['add', path.join(npm.localPrefix, file)], options) + return ignoreFailure + ? p.catch(() => {}) + : p } function write (data, file, indent, cb) { diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index 0c2fbb6faa2483..7d44d1c1510c70 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "June 2017" "" "" +.TH "NPM" "1" "July 2017" "" "" .SH "NAME" \fBnpm\fR \- a JavaScript package manager .P @@ -162,8 +162,9 @@ https://github\.com/npm/npm/issues Be sure to include \fIall\fR of the output from the npm command that didn't work as expected\. The \fBnpm\-debug\.log\fP file is also helpful to provide\. .P -You can also look for isaacs in #node\.js on irc://irc\.freenode\.net\. She -will no doubt tell you to put the output in a gist or email\. +You can also find npm people in \fB#npm\fP on https://package\.community/ or +on Twitter \fIhttps://twitter\.com/npm_support\fR\|\. Whoever responds will no +doubt tell you to put the output in a gist or email\. .SH SEE ALSO .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index d2a7a9fa00d160..2f86c385448760 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ACCESS" "1" "June 2017" "" "" +.TH "NPM\-ACCESS" "1" "July 2017" "" "" .SH "NAME" \fBnpm-access\fR \- Set access level on published packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 64b037402f0d22..b90fd9ebd52583 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ADDUSER" "1" "June 2017" "" "" +.TH "NPM\-ADDUSER" "1" "July 2017" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index e6a15a467c3311..9571db127a6eb9 100644 --- a/deps/npm/man/man1/npm-bin.1 +++ b/deps/npm/man/man1/npm-bin.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "1" "June 2017" "" "" +.TH "NPM\-BIN" "1" "July 2017" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 860d5299ca0891..7126fda85fc2e9 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "1" "June 2017" "" "" +.TH "NPM\-BUGS" "1" "July 2017" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index 322d8c069e7e7f..909ea651051a05 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUILD" "1" "June 2017" "" "" +.TH "NPM\-BUILD" "1" "July 2017" "" "" .SH "NAME" \fBnpm-build\fR \- Build a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1 index c8d8f8686b3e2f..522dcc1a366353 100644 --- a/deps/npm/man/man1/npm-bundle.1 +++ b/deps/npm/man/man1/npm-bundle.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUNDLE" "1" "June 2017" "" "" +.TH "NPM\-BUNDLE" "1" "July 2017" "" "" .SH "NAME" \fBnpm-bundle\fR \- REMOVED .SH DESCRIPTION diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 41d84cba055dd3..9309a00a61290d 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "1" "June 2017" "" "" +.TH "NPM\-CACHE" "1" "July 2017" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 11b4d11b1f1df2..cd3343d7f66e19 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM\-COMPLETION" "1" "June 2017" "" "" +.TH "NPM\-COMPLETION" "1" "July 2017" "" "" .SH "NAME" \fBnpm-completion\fR \- Tab Completion for npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index 265aff01c6cd01..e98d3b52be613f 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "1" "June 2017" "" "" +.TH "NPM\-CONFIG" "1" "July 2017" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS @@ -8,7 +8,7 @@ npm config set [\-g|\-\-global] npm config get npm config delete -npm config list +npm config list [\-l] npm config edit npm get npm set [\-g|\-\-global] @@ -59,7 +59,7 @@ npm config list .fi .RE .P -Show all the config settings\. +Show all the config settings\. Use \fB\-l\fP to also show defaults\. .SS delete .P .RS 2 diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index d0962471d801b9..ffce7a43283bb0 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEDUPE" "1" "June 2017" "" "" +.TH "NPM\-DEDUPE" "1" "July 2017" "" "" .SH "NAME" \fBnpm-dedupe\fR \- Reduce duplication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index 2b26e9fc56fe18..f3f103bdf17a20 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "1" "June 2017" "" "" +.TH "NPM\-DEPRECATE" "1" "July 2017" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 3142da944ff0e5..3167e8e6cd7f37 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DIST\-TAG" "1" "June 2017" "" "" +.TH "NPM\-DIST\-TAG" "1" "July 2017" "" "" .SH "NAME" \fBnpm-dist-tag\fR \- Modify package distribution tags .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index c97b912e184337..84881635a07bb4 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "1" "June 2017" "" "" +.TH "NPM\-DOCS" "1" "July 2017" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1 index 787b9d42198cd9..7a0b057b75f9a6 100644 --- a/deps/npm/man/man1/npm-doctor.1 +++ b/deps/npm/man/man1/npm-doctor.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCTOR" "1" "June 2017" "" "" +.TH "NPM\-DOCTOR" "1" "July 2017" "" "" .SH "NAME" \fBnpm-doctor\fR \- Check your environments .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 978a4e54f3e680..63cdeb77ca5294 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "1" "June 2017" "" "" +.TH "NPM\-EDIT" "1" "July 2017" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index d5cf964ecb2a71..ac993ff4dd6c3d 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "1" "June 2017" "" "" +.TH "NPM\-EXPLORE" "1" "July 2017" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index d54f316542229a..0d7971406a751e 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "1" "June 2017" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "July 2017" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search npm help documentation .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index a102985b9f240a..224d45a35d1faa 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP" "1" "June 2017" "" "" +.TH "NPM\-HELP" "1" "July 2017" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index c8ccd94b7b866d..38bf391be8e71a 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INIT" "1" "June 2017" "" "" +.TH "NPM\-INIT" "1" "July 2017" "" "" .SH "NAME" \fBnpm-init\fR \- Interactively create a package\.json file .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index 3bdd4c632b95f0..af1356d6093f7c 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM" "" "June 2017" "" "" +.TH "NPM" "" "July 2017" "" "" .SH "NAME" \fBnpm\fR .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index e90cc4f8f40c68..b33c7e8f8ec40b 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "1" "June 2017" "" "" +.TH "NPM\-INSTALL" "1" "July 2017" "" "" .SH "NAME" \fBnpm-install\fR \- Install a package .SH SYNOPSIS @@ -393,6 +393,9 @@ being installed\. The \fB\-\-no\-shrinkwrap\fP argument, which will ignore an available package lock or shrinkwrap file and use the package\.json instead\. .P +The \fB\-\-no\-package\-lock\fP argument will prevent npm from creating a +\fBpackage\-lock\.json\fP file\. +.P The \fB\-\-nodedir=/path/to/node/source\fP argument will allow npm to find the node source code so that npm can compile native modules\. .P diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index b5b1d25098f32a..a1fa966c0f61c2 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "1" "June 2017" "" "" +.TH "NPM\-LINK" "1" "July 2017" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 1bb0d25ce53c70..74c22144648bfe 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LOGOUT" "1" "June 2017" "" "" +.TH "NPM\-LOGOUT" "1" "July 2017" "" "" .SH "NAME" \fBnpm-logout\fR \- Log out of the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index bf339ee70ca67b..5c6744e450035d 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "1" "June 2017" "" "" +.TH "NPM\-LS" "1" "July 2017" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@5.0.3 /path/to/npm +npm@5.3.0 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi @@ -118,6 +118,16 @@ Type: String When "dev" or "development", is an alias to \fBdev\fP\|\. .P When "prod" or "production", is an alias to \fBproduction\fP\|\. +.SS link +.RS 0 +.IP \(bu 2 +Type: Boolean +.IP \(bu 2 +Default: false + +.RE +.P +Display only dependencies which are linked .SH SEE ALSO .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 992c359dcbabb9..ccd38acb170afa 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "1" "June 2017" "" "" +.TH "NPM\-OUTDATED" "1" "July 2017" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index 9eb713bd666d00..62be1bdcd03d61 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "1" "June 2017" "" "" +.TH "NPM\-OWNER" "1" "July 2017" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 634d3e84094c59..2e70602351b2ee 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "1" "June 2017" "" "" +.TH "NPM\-PACK" "1" "July 2017" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index e14fa450d97268..33693a1a5c3942 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "1" "June 2017" "" "" +.TH "NPM\-PING" "1" "July 2017" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index 46d06910454ac2..27fb7e9ef49b7a 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "1" "June 2017" "" "" +.TH "NPM\-PREFIX" "1" "July 2017" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index c8051b36e8ed9d..3317b213c2a1a7 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "1" "June 2017" "" "" +.TH "NPM\-PRUNE" "1" "July 2017" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index 5095939be6ad8d..1529f1b2f31f13 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "1" "June 2017" "" "" +.TH "NPM\-PUBLISH" "1" "July 2017" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 7cb888b260d7c0..15bcaf92d3469f 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "1" "June 2017" "" "" +.TH "NPM\-REBUILD" "1" "July 2017" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index cf2c9f7f5797a9..a1732297cecdde 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "1" "June 2017" "" "" +.TH "NPM\-REPO" "1" "July 2017" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index 7a0c40d0502ddb..bb78c0248283a8 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "1" "June 2017" "" "" +.TH "NPM\-RESTART" "1" "July 2017" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index fd30fb7cac442a..bc704262e4e5c5 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "1" "June 2017" "" "" +.TH "NPM\-ROOT" "1" "July 2017" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index eaffbefc0ff5fa..6219b27a3c4f67 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,11 +1,11 @@ -.TH "NPM\-RUN\-SCRIPT" "1" "June 2017" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "July 2017" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS .P .RS 2 .nf -npm run\-script [\-\- \.\.\.] +npm run\-script [\-\-silent] [\-\- \.\.\.] alias: npm run .fi @@ -60,6 +60,8 @@ not found in the \fBPATH\fP\|\. .P If you try to run a script without having a \fBnode_modules\fP directory and it fails, you will be given a warning to run \fBnpm install\fP, just in case you've forgotten\. +.P +You can use the \fB\-\-silent\fP flag to prevent showing \fBnpm ERR!\fP output on error\. .SH SEE ALSO .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index 89cb716d847a1a..190b75a34e44e6 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "1" "June 2017" "" "" +.TH "NPM\-SEARCH" "1" "July 2017" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index d6d12bf1676774..ad4a78d3e7d5f7 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "1" "June 2017" "" "" +.TH "NPM\-SHRINKWRAP" "1" "July 2017" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions for publication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index a04ce7363e2d7f..b325ff0ea1e423 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STAR" "1" "June 2017" "" "" +.TH "NPM\-STAR" "1" "July 2017" "" "" .SH "NAME" \fBnpm-star\fR \- Mark your favorite packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index face66764b542e..92e5bf7a4e6a20 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STARS" "1" "June 2017" "" "" +.TH "NPM\-STARS" "1" "July 2017" "" "" .SH "NAME" \fBnpm-stars\fR \- View packages marked as favorites .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index 0916970e0d247d..df0e1cd65b5575 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "1" "June 2017" "" "" +.TH "NPM\-START" "1" "July 2017" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index 430f3c117f5c66..30f2b67fc124da 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "1" "June 2017" "" "" +.TH "NPM\-STOP" "1" "July 2017" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index b38561f7114732..1d398c9fdc14d8 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEAM" "1" "June 2017" "" "" +.TH "NPM\-TEAM" "1" "July 2017" "" "" .SH "NAME" \fBnpm-team\fR \- Manage organization teams and team memberships .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index ad9fc14d558fab..a17682b38ea2a7 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "1" "June 2017" "" "" +.TH "NPM\-TEST" "1" "July 2017" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 29df8f50f4f242..0863df058d4f26 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,11 +1,11 @@ -.TH "NPM\-UNINSTALL" "1" "June 2017" "" "" +.TH "NPM\-UNINSTALL" "1" "July 2017" "" "" .SH "NAME" \fBnpm-uninstall\fR \- Remove a package .SH SYNOPSIS .P .RS 2 .nf -npm uninstall [<@scope>/][@]\.\.\. [\-S|\-\-save|\-D|\-\-save\-dev|\-O|\-\-save\-optional] +npm uninstall [<@scope>/][@]\.\.\. [\-S|\-\-save|\-D|\-\-save\-dev|\-O|\-\-save\-optional|\-\-no\-save] aliases: remove, rm, r, un, unlink .fi @@ -35,6 +35,8 @@ the package version in your main package\.json: \fB\-D, \-\-save\-dev\fP: Package will be removed from your \fBdevDependencies\fP\|\. .IP \(bu 2 \fB\-O, \-\-save\-optional\fP: Package will be removed from your \fBoptionalDependencies\fP\|\. +.IP \(bu 2 +\fB\-\-no\-save\fP: Package will not be removed from your \fBpackage\.json\fP file\. .RE .P @@ -51,6 +53,7 @@ npm uninstall sax \-\-save npm uninstall @myorg/privatepackage \-\-save npm uninstall node\-tap \-\-save\-dev npm uninstall dtrace\-provider \-\-save\-optional +npm uninstall lodash \-\-no\-save .fi .RE .SH SEE ALSO diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index c3883a59498f0a..ce7f2147679fe9 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "1" "June 2017" "" "" +.TH "NPM\-UNPUBLISH" "1" "July 2017" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 14bad07f5fedd4..24b07a1fd0b68e 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "1" "June 2017" "" "" +.TH "NPM\-UPDATE" "1" "July 2017" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index ae2678a8db610a..de93869d33704c 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "1" "June 2017" "" "" +.TH "NPM\-VERSION" "1" "July 2017" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 0bfedd6b8b9c36..503f71a9eceab7 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "1" "June 2017" "" "" +.TH "NPM\-VIEW" "1" "July 2017" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index 8fdf66c2fc5b93..180b949747a6db 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "1" "June 2017" "" "" +.TH "NPM\-WHOAMI" "1" "July 2017" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index e3771ad9facb2f..a626190edd9608 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "June 2017" "" "" +.TH "NPM" "1" "July 2017" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -5.0.3 +5.3.0 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1 new file mode 100644 index 00000000000000..f64614d36ec028 --- /dev/null +++ b/deps/npm/man/man1/npx.1 @@ -0,0 +1,167 @@ +.TH "NPX" "1" "July 2017" "npx@9.1.0" "User Commands" +.SH "NAME" +\fBnpx\fR \- execute npm package binaries +.SH SYNOPSIS +.P +\fBnpx [options] [@version] [command\-arg]\.\.\.\fP +.P +\fBnpx [options] [\-p|\-\-package ]\.\.\. [command\-arg]\.\.\.\fP +.P +\fBnpx [options] \-c ''\fP +.P +\fBnpx \-\-shell\-auto\-fallback [shell]\fP +.SH INSTALL +.P +\fBnpm install \-g npx\fP +.SH DESCRIPTION +.P +Executes \fB\fP either from a local \fBnode_modules/\.bin\fP, or from a central cache, installing any packages needed in order for \fB\fP to run\. +.P +By default, \fBnpx\fP will check whether \fB\fP exists in \fB$PATH\fP, or in the local project binaries, and execute that\. If \fB\fP is not found, it will be installed prior to execution\. +.P +Unless a \fB\-\-package\fP option is specified, \fBnpx\fP will try to guess the name of the binary to invoke depending on the specifier provided\. All package specifiers understood by \fBnpm\fP may be used with \fBnpx\fP, including git specifiers, remote tarballs, local directories, or scoped packages\. +.P +If a full specifier is included, or if \fB\-\-package\fP is used, npx will always use a freshly\-installed, temporary version of the package\. This can also be forced with the \fB\-\-ignore\-existing\fP flag\. +.RS 0 +.IP \(bu 2 +\fB\-p, \-\-package \fP \- define the package to be installed\. This defaults to the value of \fB\fP\|\. This is only needed for packages with multiple binaries if you want to call one of the other executables, or where the binary name does not match the package name\. If this option is provided \fB\fP will be executed as\-is, without interpreting \fB@version\fP if it's there\. Multiple \fB\-\-package\fP options may be provided, and all the packages specified will be installed\. +.IP \(bu 2 +\fB\-\-no\-install\fP \- If passed to \fBnpx\fP, it will only try to run \fB\fP if it already exists in the current path or in \fB$prefix/node_modules/\.bin\fP\|\. It won't try to install missing commands\. +.IP \(bu 2 +\fB\-\-cache \fP \- set the location of the npm cache\. Defaults to npm's own cache settings\. +.IP \(bu 2 +\fB\-\-userconfig \fP \- path to the user configuration file to pass to npm\. Defaults to whatever npm's current default is\. +.IP \(bu 2 +\fB\-c \fP \- Execute \fB\fP inside an \fBnpm run\-script\fP\-like shell environment, with all the usual environment variables available\. Only the first item in \fB\fP will be automatically used as \fB\fP\|\. Any others \fImust\fR use \fB\-p\fP\|\. +.IP \(bu 2 +\fB\-\-shell \fP \- The shell to invoke the command with, if any\. +.IP \(bu 2 +\fB\-\-shell\-auto\-fallback []\fP \- Generates shell code to override your shell's "command not found" handler with one that calls \fBnpx\fP\|\. Tries to figure out your shell, or you can pass its name (either \fBbash\fP, \fBfish\fP, or \fBzsh\fP) as an option\. See below for how to install\. +.IP \(bu 2 +\fB\-\-ignore\-existing\fP \- If this flag is set, npx will not look in \fB$PATH\fP, or in the current package's \fBnode_modules/\.bin\fP for an existing version before deciding whether to install\. Binaries in those paths will still be available for execution, but will be shadowed by any packages requested by this install\. +.IP \(bu 2 +\fB\-q, \-\-quiet\fP \- Suppressed any output from npx itself (progress bars, error messages, install reports)\. Subcommand output itself will not be silenced\. +.IP \(bu 2 +\fB\-n, \-\-node\-arg\fP \- Extra node argument to supply to node when binary is a node script\. You can supply this option multiple times to add more arguments\. +.IP \(bu 2 +\fB\-v, \-\-version\fP \- Show the current npx version\. + +.RE +.SH EXAMPLES +.SS Running a project\-local bin +.P +.RS 2 +.nf +$ npm i \-D webpack +$ npx webpack \.\.\. +.fi +.RE +.SS One\-off invocation without local installation +.P +.RS 2 +.nf +$ npm rm webpack +$ npx webpack \-\- \.\.\. +$ cat package\.json +\|\.\.\.webpack not in "devDependencies"\.\.\. +.fi +.RE +.SS Invoking a command from a github repository +.P +.RS 2 +.nf +$ npx github:piuccio/cowsay +\|\.\.\.or\.\.\. +$ npx git+ssh://my\.hosted\.git:cowsay\.git#semver:^1 +\|\.\.\.etc\.\.\. +.fi +.RE +.SS Execute a full shell command using one npx call w/ multiple packages +.P +.RS 2 +.nf +$ npx \-p lolcatjs \-p cowsay \-c \\ + 'echo "$npm_package_name@$npm_package_version" | cowsay | lolcatjs' +\|\.\.\. + _____ +< your\-cool\-package@1\.2\.3 > + \-\-\-\-\- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||\-\-\-\-w | + || || +.fi +.RE +.SS Run node binary with \-\-inspect +.P +.RS 2 +.nf +$ npx \-\-node\-arg=\-\-inspect cowsay +Debugger listening on ws://127\.0\.0\.1:9229/\.\.\.\. +.fi +.RE +.SH SHELL AUTO FALLBACK +.P +You can configure \fBnpx\fP to run as your default fallback command when you type something in the command line with an \fB@\fP but the command is not found\. This includes installing packages that were not found in the local prefix either\. +.P +For example: +.P +.RS 2 +.nf +$ npm@4 \-\-version +(stderr) npm@4 not found\. Trying with npx\.\.\. +4\.6\.1 +$ asdfasdfasf +zsh: command not found: asfdasdfasdf +.fi +.RE +.P +Currently, \fBzsh\fP, \fBbash\fP (>= 4), and \fBfish\fP are supported\. You can access these completion scripts using \fBnpx \-\-shell\-auto\-fallback \fP\|\. +.P +To install permanently, add the relevant line below to your \fB~/\.bashrc\fP, \fB~/\.zshrc\fP, \fB~/\.config/fish/config\.fish\fP, or as needed\. To install just for the shell session, simply run the line\. +.P +You can optionally pass through \fB\-\-no\-install\fP when generating the fallback to prevent it from installing packages if the command is missing\. +.SS For bash@>=4: +.P +.RS 2 +.nf +$ source <(npx \-\-shell\-auto\-fallback bash) +.fi +.RE +.SS For zsh: +.P +.RS 2 +.nf +$ source <(npx \-\-shell\-auto\-fallback zsh) +.fi +.RE +.SS For fish: +.P +.RS 2 +.nf +$ source (npx \-\-shell\-auto\-fallback fish | psub) +.fi +.RE +.SH ACKNOWLEDGEMENTS +.P +Huge thanks to Kwyn Meagher \fIhttps://blog\.kwyn\.io\fR for generously donating the package name in the main npm registry\. Previously \fBnpx\fP was used for a Tessel board Neopixels library, which can now be found under \fBnpx\-tessel\fP \fIhttps://npm\.im/npx\-tessel\fR\|\. +.SH AUTHOR +.P +Written by Kat Marchan \fIhttps://github\.com/zkat\fR\|\. +.SH REPORTING BUGS +.P +Please file any relevant issues on Github\. \fIhttps://github\.com/zkat/npx\fR +.SH LICENSE +.P +This work is released by its authors into the public domain under CC0\-1\.0\. See \fBLICENSE\.md\fP for details\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +\fBnpm(1)\fP +.IP \(bu 2 +\fBnpm\-run\-script(1)\fP +.IP \(bu 2 +\fBnpm\-config(7)\fP + +.RE diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index 194e6bcc02d474..2442ef30567171 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "June 2017" "" "" +.TH "NPM\-FOLDERS" "5" "July 2017" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION @@ -25,10 +25,9 @@ If you need both, then install it in both places, or use \fBnpm link\fP\|\. .SS prefix Configuration .P The \fBprefix\fP config defaults to the location where node is installed\. -On most systems, this is \fB/usr/local\fP\|\. On windows, this is the exact -location of the node\.exe binary\. On Unix systems, it's one level up, -since node is typically installed at \fB{prefix}/bin/node\fP rather than -\fB{prefix}/node\.exe\fP\|\. +On most systems, this is \fB/usr/local\fP\|\. On Windows, it's \fB%AppData%\\npm\fP\|\. +On Unix systems, it's one level up, since node is typically installed at +\fB{prefix}/bin/node\fP rather than \fB{prefix}/node\.exe\fP\|\. .P When the \fBglobal\fP flag is set, npm installs things into this prefix\. When it is not set, it uses the root of the current package, or the diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index 194e6bcc02d474..2442ef30567171 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "June 2017" "" "" +.TH "NPM\-FOLDERS" "5" "July 2017" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION @@ -25,10 +25,9 @@ If you need both, then install it in both places, or use \fBnpm link\fP\|\. .SS prefix Configuration .P The \fBprefix\fP config defaults to the location where node is installed\. -On most systems, this is \fB/usr/local\fP\|\. On windows, this is the exact -location of the node\.exe binary\. On Unix systems, it's one level up, -since node is typically installed at \fB{prefix}/bin/node\fP rather than -\fB{prefix}/node\.exe\fP\|\. +On most systems, this is \fB/usr/local\fP\|\. On Windows, it's \fB%AppData%\\npm\fP\|\. +On Unix systems, it's one level up, since node is typically installed at +\fB{prefix}/bin/node\fP rather than \fB{prefix}/node\.exe\fP\|\. .P When the \fBglobal\fP flag is set, npm installs things into this prefix\. When it is not set, it uses the root of the current package, or the diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 89eefefcf68123..df570a7e1bcee2 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "June 2017" "" "" +.TH "PACKAGE\.JSON" "5" "July 2017" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -557,21 +557,35 @@ This tarball will be downloaded and installed locally to your package at install time\. .SS Git URLs as Dependencies .P -Git urls can be of the form: +Git urls are of the form: .P .RS 2 .nf -git://github\.com/user/project\.git#commit\-ish -git+ssh://user@hostname:project\.git#commit\-ish -git+ssh://user@hostname/project\.git#commit\-ish -git+http://user@hostname/project/blah\.git#commit\-ish -git+https://user@hostname/project/blah\.git#commit\-ish +://[[:]@][:][:][/][# | #semver:] .fi .RE .P -The \fBcommit\-ish\fP can be any tag, sha, or branch which can be supplied as -an argument to \fBgit checkout\fP\|\. The default is \fBmaster\fP\|\. -.SH GitHub URLs +\fB\fP is one of \fBgit\fP, \fBgit+ssh\fP, \fBgit+http\fP, \fBgit+https\fP, or +\fBgit+file\fP\|\. +.P +If \fB#\fP is provided, it will be used to clone exactly that +commit\. If the commit\-ish has the format \fB#semver:\fP, \fB\fP can +be any valid semver range or exact version, and npm will look for any tags +or refs matching that range in the remote repository, much as it would for a +registry dependency\. If neither \fB#\fP or \fB#semver:\fP is +specified, then \fBmaster\fP is used\. +.P +Examples: +.P +.RS 2 +.nf +git+ssh://git@github\.com:npm/npm\.git#v1\.0\.27 +git+ssh://git@github\.com:npm/npm#semver:^5\.0 +git+https://isaacs@github\.com/npm/npm\.git +git://github\.com/npm/npm\.git#v1\.0\.27 +.fi +.RE +.SS GitHub URLs .P As of version 1\.1\.65, you can refer to GitHub urls as just "foo": "user/foo\-project"\. Just as with git URLs, a \fBcommit\-ish\fP suffix can be @@ -590,7 +604,7 @@ included\. For example: } .fi .RE -.SH Local Paths +.SS Local Paths .P As of version 2\.0\.0 you can provide a path to a local directory that contains a package\. Local paths can be saved using \fBnpm install \-S\fP or @@ -854,12 +868,11 @@ Like the \fBos\fP option, you can also blacklist architectures: The host architecture is determined by \fBprocess\.arch\fP .SH preferGlobal .P -If your package is primarily a command\-line application that should be -installed globally, then set this value to \fBtrue\fP to provide a warning -if it is installed locally\. +\fBDEPRECATED\fR .P -It doesn't actually prevent users from installing it locally, but it -does help prevent some confusion if it doesn't work as expected\. +This option used to trigger an npm warning, but it will no longer warn\. It is +purely there for informational purposes\. It is now recommended that you install +any binaries as local devDependencies wherever possible\. .SH private .P If you set \fB"private": true\fP in your package\.json, then npm will refuse diff --git a/deps/npm/man/man5/npm-package-locks.5 b/deps/npm/man/man5/npm-package-locks.5 index 4d6a28519294af..df808f2e98ab83 100644 --- a/deps/npm/man/man5/npm-package-locks.5 +++ b/deps/npm/man/man5/npm-package-locks.5 @@ -1,4 +1,4 @@ -.TH "NPM\-PACKAGE\-LOCKS" "5" "June 2017" "" "" +.TH "NPM\-PACKAGE\-LOCKS" "5" "July 2017" "" "" .SH "NAME" \fBnpm-package-locks\fR \- An explanation of npm lockfiles .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-shrinkwrap.json.5 b/deps/npm/man/man5/npm-shrinkwrap.json.5 index 400e23b20adb5e..9188009c10ed5a 100644 --- a/deps/npm/man/man5/npm-shrinkwrap.json.5 +++ b/deps/npm/man/man5/npm-shrinkwrap.json.5 @@ -1,11 +1,11 @@ -.TH "NPM\-SHRINKWRAP\.JSON" "5" "June 2017" "" "" +.TH "NPM\-SHRINKWRAP\.JSON" "5" "July 2017" "" "" .SH "NAME" \fBnpm-shrinkwrap.json\fR \- A publishable lockfile .SH DESCRIPTION .P \fBnpm\-shrinkwrap\.json\fP is a file created by npm help shrinkwrap\. It is identical to \fBpackage\-lock\.json\fP, with one major caveat: Unlike \fBpackage\-lock\.json\fP, -\fBnpm\-shrinwkrap\.json\fP may be included when publishing a package\. +\fBnpm\-shrinkwrap\.json\fP may be included when publishing a package\. .P The recommended use\-case for \fBnpm\-shrinkwrap\.json\fP is applications deployed through the publishing process on the registry: for example, daemons and @@ -13,7 +13,7 @@ command\-line tools intended as global installs or \fBdevDependencies\fP\|\. It' strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates\. .P -Additionally, if both \fBpackage\-lock\.json\fP and \fBnpm\-shrinwkrap\.json\fP are present +Additionally, if both \fBpackage\-lock\.json\fP and \fBnpm\-shrinkwrap\.json\fP are present in a package root, \fBpackage\-lock\.json\fP will be ignored in favor of this file\. .P For full details and description of the \fBnpm\-shrinkwrap\.json\fP file format, refer diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index a80fdca666fe9b..4a35447e23bfe7 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "June 2017" "" "" +.TH "NPMRC" "5" "July 2017" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SH DESCRIPTION diff --git a/deps/npm/man/man5/package-lock.json.5 b/deps/npm/man/man5/package-lock.json.5 index 09dc0d760040ed..4e1f7b880a33e4 100644 --- a/deps/npm/man/man5/package-lock.json.5 +++ b/deps/npm/man/man5/package-lock.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\-LOCK\.JSON" "5" "June 2017" "" "" +.TH "PACKAGE\-LOCK\.JSON" "5" "July 2017" "" "" .SH "NAME" \fBpackage-lock.json\fR \- A manifestation of the manifest .SH DESCRIPTION @@ -135,7 +135,7 @@ The dependencies of this dependency, exactly as at the top level\. .IP \(bu 2 npm help shrinkwrap .IP \(bu 2 -npm help 5 package\-lock\.json +npm help 5 shrinkwrap\.json .IP \(bu 2 npm help 5 package\.json .IP \(bu 2 diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index 89eefefcf68123..df570a7e1bcee2 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "June 2017" "" "" +.TH "PACKAGE\.JSON" "5" "July 2017" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -557,21 +557,35 @@ This tarball will be downloaded and installed locally to your package at install time\. .SS Git URLs as Dependencies .P -Git urls can be of the form: +Git urls are of the form: .P .RS 2 .nf -git://github\.com/user/project\.git#commit\-ish -git+ssh://user@hostname:project\.git#commit\-ish -git+ssh://user@hostname/project\.git#commit\-ish -git+http://user@hostname/project/blah\.git#commit\-ish -git+https://user@hostname/project/blah\.git#commit\-ish +://[[:]@][:][:][/][# | #semver:] .fi .RE .P -The \fBcommit\-ish\fP can be any tag, sha, or branch which can be supplied as -an argument to \fBgit checkout\fP\|\. The default is \fBmaster\fP\|\. -.SH GitHub URLs +\fB\fP is one of \fBgit\fP, \fBgit+ssh\fP, \fBgit+http\fP, \fBgit+https\fP, or +\fBgit+file\fP\|\. +.P +If \fB#\fP is provided, it will be used to clone exactly that +commit\. If the commit\-ish has the format \fB#semver:\fP, \fB\fP can +be any valid semver range or exact version, and npm will look for any tags +or refs matching that range in the remote repository, much as it would for a +registry dependency\. If neither \fB#\fP or \fB#semver:\fP is +specified, then \fBmaster\fP is used\. +.P +Examples: +.P +.RS 2 +.nf +git+ssh://git@github\.com:npm/npm\.git#v1\.0\.27 +git+ssh://git@github\.com:npm/npm#semver:^5\.0 +git+https://isaacs@github\.com/npm/npm\.git +git://github\.com/npm/npm\.git#v1\.0\.27 +.fi +.RE +.SS GitHub URLs .P As of version 1\.1\.65, you can refer to GitHub urls as just "foo": "user/foo\-project"\. Just as with git URLs, a \fBcommit\-ish\fP suffix can be @@ -590,7 +604,7 @@ included\. For example: } .fi .RE -.SH Local Paths +.SS Local Paths .P As of version 2\.0\.0 you can provide a path to a local directory that contains a package\. Local paths can be saved using \fBnpm install \-S\fP or @@ -854,12 +868,11 @@ Like the \fBos\fP option, you can also blacklist architectures: The host architecture is determined by \fBprocess\.arch\fP .SH preferGlobal .P -If your package is primarily a command\-line application that should be -installed globally, then set this value to \fBtrue\fP to provide a warning -if it is installed locally\. +\fBDEPRECATED\fR .P -It doesn't actually prevent users from installing it locally, but it -does help prevent some confusion if it doesn't work as expected\. +This option used to trigger an npm warning, but it will no longer warn\. It is +purely there for informational purposes\. It is now recommended that you install +any binaries as local devDependencies wherever possible\. .SH private .P If you set \fB"private": true\fP in your package\.json, then npm will refuse diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index 6a788d870c223f..bedeace4f3a215 100644 --- a/deps/npm/man/man7/npm-coding-style.7 +++ b/deps/npm/man/man7/npm-coding-style.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CODING\-STYLE" "7" "June 2017" "" "" +.TH "NPM\-CODING\-STYLE" "7" "July 2017" "" "" .SH "NAME" \fBnpm-coding-style\fR \- npm's "funny" coding style .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index 7af1f90f7cb86a..07ab671f40625d 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "7" "June 2017" "" "" +.TH "NPM\-CONFIG" "7" "July 2017" "" "" .SH "NAME" \fBnpm-config\fR \- More than you probably want to know about npm configuration .SH DESCRIPTION @@ -8,8 +8,14 @@ npm gets its configuration values from the following sources, sorted by priority .P Putting \fB\-\-foo bar\fP on the command line sets the \fBfoo\fP configuration parameter to \fB"bar"\fP\|\. A \fB\-\-\fP argument tells the cli parser to stop -reading flags\. A \fB\-\-flag\fP parameter that is at the \fIend\fR of the -command will be given the value of \fBtrue\fP\|\. +reading flags\. Using \fB\-\-flag\fP without specifying any value will set +the value to \fBtrue\fP\|\. +.P +Example: \fB\-\-flag1 \-\-flag2\fP will set both configuration parameters +to \fBtrue\fP, while \fB\-\-flag1 \-\-flag2 bar\fP will set \fBflag1\fP to \fBtrue\fP, +and \fBflag2\fP to \fBbar\fP\|\. Finally, \fB\-\-flag1 \-\-flag2 \-\- bar\fP will set +both configuration parameters to \fBtrue\fP, and the \fBbar\fP is taken +as a command argument\. .SS Environment Variables .P Any environment variables that start with \fBnpm_config_\fP will be @@ -19,7 +25,7 @@ configuration parameter to \fBbar\fP\|\. Any environment configurations that are not given a value will be given the value of \fBtrue\fP\|\. Config values are case\-insensitive, so \fBNPM_CONFIG_FOO=bar\fP will work the same\. However, please note that inside npm\-scripts \fI/misc/scripts\fR -npm will set it's own environment variables and Node will prefer +npm will set its own environment variables and Node will prefer those lowercase versions over any uppercase ones that you might set\. For details see this issue \fIhttps://github\.com/npm/npm/issues/14528\fR\|\. .SS npmrc Files @@ -30,10 +36,10 @@ The four relevant files are: per\-project configuration file (\fB/path/to/my/project/\.npmrc\fP) .IP \(bu 2 per\-user configuration file (defaults to \fB$HOME/\.npmrc\fP; configurable via CLI -option \fB\-\-userconfig\fP or environment variable \fB$NPM_CONF_USERCONFIG\fP) +option \fB\-\-userconfig\fP or environment variable \fB$NPM_CONFIG_USERCONFIG\fP) .IP \(bu 2 global configuration file (defaults to \fB$PREFIX/etc/npmrc\fP; configurable via -CLI option \fB\-\-globalconfig\fP or environment variable \fB$NPM_CONF_GLOBALCONFIG\fP) +CLI option \fB\-\-globalconfig\fP or environment variable \fB$NPM_CONFIG_GLOBALCONFIG\fP) .IP \(bu 2 npm's built\-in configuration file (\fB/path/to/npm/npmrc\fP) @@ -1209,6 +1215,16 @@ in to a private registry for the first time: \fBnpm login \-\-scope=@organization \-\-registry=registry\.organization\.com\fP, which will cause \fB@organization\fP to be mapped to the registry for future installation of packages specified according to the pattern \fB@organization/package\fP\|\. +.SS script\-shell +.RS 0 +.IP \(bu 2 +Default: \fBnull\fP +.IP \(bu 2 +Type: path + +.RE +.P +The shell to use for scripts run with the \fBnpm run\fP command\. .SS scripts\-prepend\-node\-path .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7 index da88a0df013cd7..ba6a0811c98ed7 100644 --- a/deps/npm/man/man7/npm-developers.7 +++ b/deps/npm/man/man7/npm-developers.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DEVELOPERS" "7" "June 2017" "" "" +.TH "NPM\-DEVELOPERS" "7" "July 2017" "" "" .SH "NAME" \fBnpm-developers\fR \- Developer Guide .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index 8de6d02da89ac3..b7767f3a4abc2f 100644 --- a/deps/npm/man/man7/npm-disputes.7 +++ b/deps/npm/man/man7/npm-disputes.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DISPUTES" "7" "June 2017" "" "" +.TH "NPM\-DISPUTES" "7" "July 2017" "" "" .SH "NAME" \fBnpm-disputes\fR \- Handling Module Name Disputes .P diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index 689e6b91ad96c0..7568e29882fd44 100644 --- a/deps/npm/man/man7/npm-index.7 +++ b/deps/npm/man/man7/npm-index.7 @@ -1,4 +1,4 @@ -.TH "NPM\-INDEX" "7" "June 2017" "" "" +.TH "NPM\-INDEX" "7" "July 2017" "" "" .SH "NAME" \fBnpm-index\fR \- Index of all npm documentation .SS npm help README diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7 index 4c37567e15793a..8a25d47a33d7ad 100644 --- a/deps/npm/man/man7/npm-orgs.7 +++ b/deps/npm/man/man7/npm-orgs.7 @@ -1,4 +1,4 @@ -.TH "NPM\-ORGS" "7" "June 2017" "" "" +.TH "NPM\-ORGS" "7" "July 2017" "" "" .SH "NAME" \fBnpm-orgs\fR \- Working with Teams & Orgs .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7 index 483f36010c03ad..abd1406097515f 100644 --- a/deps/npm/man/man7/npm-registry.7 +++ b/deps/npm/man/man7/npm-registry.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REGISTRY" "7" "June 2017" "" "" +.TH "NPM\-REGISTRY" "7" "July 2017" "" "" .SH "NAME" \fBnpm-registry\fR \- The JavaScript Package Registry .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7 index 5331efae492130..fbb685c46035f0 100644 --- a/deps/npm/man/man7/npm-scope.7 +++ b/deps/npm/man/man7/npm-scope.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCOPE" "7" "June 2017" "" "" +.TH "NPM\-SCOPE" "7" "July 2017" "" "" .SH "NAME" \fBnpm-scope\fR \- Scoped packages .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index c58a1ef9544989..e93ad1e6509fa6 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCRIPTS" "7" "June 2017" "" "" +.TH "NPM\-SCRIPTS" "7" "July 2017" "" "" .SH "NAME" \fBnpm-scripts\fR \- How npm handles the "scripts" field .SH DESCRIPTION @@ -89,11 +89,6 @@ allow users to avoid the confusing behavior of existing npm versions and only run on \fBnpm publish\fP (for instance, running the tests one last time to ensure they're in good shape)\. .P -\fBIMPORTANT:\fR As of \fBnpm@5\fP, \fBprepublish\fP will \fIonly\fR be run for \fBnpm -publish\fP\|\. This will make its behavior identical to \fBprepublishOnly\fP, so -\fBnpm@6\fP or later may drop support for the use of \fBprepublishOnly\fP, and then -maybe we can all forget this embarrassing thing ever happened\. -.P See https://github\.com/npm/npm/issues/10074 for a much lengthier justification, with further reading, for this change\. .SS USE CASES diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7 index f2bd986225fa09..1ee678b59e9344 100644 --- a/deps/npm/man/man7/removing-npm.7 +++ b/deps/npm/man/man7/removing-npm.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REMOVAL" "1" "June 2017" "" "" +.TH "NPM\-REMOVAL" "1" "July 2017" "" "" .SH "NAME" \fBnpm-removal\fR \- Cleaning the Slate .SH SYNOPSIS diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index 88ed4a079912de..f0b22279d07f58 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,4 +1,4 @@ -.TH "SEMVER" "7" "June 2017" "" "" +.TH "SEMVER" "7" "July 2017" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm .SH Usage diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js index 26752d4a1b55ae..39910608b3db31 100644 --- a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +++ b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js @@ -59,6 +59,7 @@ function Parser() { this.stringBuffer = Buffer.alloc ? Buffer.alloc(STRING_BUFFER_SIZE) : new Buffer(STRING_BUFFER_SIZE); this.stringBufferOffset = 0; this.unicode = undefined; // unicode escapes + this.highSurrogate = undefined; this.key = undefined; this.mode = undefined; @@ -217,8 +218,20 @@ proto.write = function (buffer) { if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) { this.unicode += String.fromCharCode(n); if (this.tState++ === STRING6) { - this.appendStringBuf(Buffer(String.fromCharCode(parseInt(this.unicode, 16)))); + var intVal = parseInt(this.unicode, 16); this.unicode = undefined; + if (this.highSurrogate !== undefined && intVal >= 0xDC00 && intVal < (0xDFFF + 1)) { //<56320,57343> - lowSurrogate + this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate, intVal))); + this.highSurrogate = undefined; + } else if (this.highSurrogate === undefined && intVal >= 0xD800 && intVal < (0xDBFF + 1)) { //<55296,56319> - highSurrogate + this.highSurrogate = intVal; + } else { + if (this.highSurrogate !== undefined) { + this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate))); + this.highSurrogate = undefined; + } + this.appendStringBuf(new Buffer(String.fromCharCode(intVal))); + } this.tState = STRING1; } } else { diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/package.json b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/package.json index e712039daecc4e..fe0cfcd1f4a151 100644 --- a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/package.json +++ b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/package.json @@ -1,7 +1,8 @@ { "_from": "jsonparse@^1.2.0", - "_id": "jsonparse@1.3.0", - "_integrity": "sha1-hfwkWx2SWazGlBlguQWt9k594Og=", + "_id": "jsonparse@1.3.1", + "_inBundle": false, + "_integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "_location": "/JSONStream/jsonparse", "_phantomChildren": {}, "_requested": { @@ -17,21 +18,18 @@ "_requiredBy": [ "/JSONStream" ], - "_resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.0.tgz", - "_shasum": "85fc245b1d9259acc6941960b905adf64e7de0e8", - "_shrinkwrap": null, + "_resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "_shasum": "3f4dae4a91fac315f71062f8521cc239f1366280", "_spec": "jsonparse@^1.2.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/JSONStream", + "_where": "/Users/rebecca/code/npm/node_modules/JSONStream", "author": { "name": "Tim Caswell", "email": "tim@creationix.com" }, - "bin": null, "bugs": { "url": "http://github.com/creationix/jsonparse/issues" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "This is a pure-js JSON streaming parser for node.js", "devDependencies": { @@ -45,8 +43,6 @@ "license": "MIT", "main": "jsonparse.js", "name": "jsonparse", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+ssh://git@github.com/creationix/jsonparse.git" @@ -58,5 +54,5 @@ "json", "stream" ], - "version": "1.3.0" + "version": "1.3.1" } diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/surrogate.js b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/surrogate.js new file mode 100644 index 00000000000000..33351c73cc193b --- /dev/null +++ b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/surrogate.js @@ -0,0 +1,25 @@ +var test = require('tape'); +var Parser = require('../'); + +test('parse surrogate pair', function (t) { + t.plan(1); + + var p = new Parser(); + p.onValue = function (value) { + t.equal(value, '😋'); + }; + + p.write('"\\uD83D\\uDE0B"'); +}); + +test('parse chunked surrogate pair', function (t) { + t.plan(1); + + var p = new Parser(); + p.onValue = function (value) { + t.equal(value, '😋'); + }; + + p.write('"\\uD83D'); + p.write('\\uDE0B"'); +}); diff --git a/deps/npm/node_modules/JSONStream/package.json b/deps/npm/node_modules/JSONStream/package.json index 7f472afd062e57..2086da717bcf41 100644 --- a/deps/npm/node_modules/JSONStream/package.json +++ b/deps/npm/node_modules/JSONStream/package.json @@ -1,6 +1,7 @@ { "_from": "JSONStream@~1.3.1", "_id": "JSONStream@1.3.1", + "_inBundle": false, "_integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", "_location": "/JSONStream", "_phantomChildren": {}, @@ -15,13 +16,13 @@ "fetchSpec": "~1.3.1" }, "_requiredBy": [ + "#USER", "/" ], "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", "_shasum": "707f761e01dae9e16f1bcf93703b78c70966579a", - "_shrinkwrap": null, "_spec": "JSONStream@~1.3.1", - "_where": "/Users/zkat/Documents/code/npm", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Dominic Tarr", "email": "dominic.tarr@gmail.com", @@ -63,7 +64,6 @@ "license": "(MIT OR Apache-2.0)", "name": "JSONStream", "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/dominictarr/JSONStream.git" diff --git a/deps/npm/node_modules/ansi-regex/index.js b/deps/npm/node_modules/ansi-regex/index.js index b9574ed7e82013..c4aaecf5050639 100644 --- a/deps/npm/node_modules/ansi-regex/index.js +++ b/deps/npm/node_modules/ansi-regex/index.js @@ -1,4 +1,10 @@ 'use strict'; -module.exports = function () { - return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; + +module.exports = () => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, 'g'); }; diff --git a/deps/npm/node_modules/ansi-regex/license b/deps/npm/node_modules/ansi-regex/license index 654d0bfe943437..e7af2f77107d73 100644 --- a/deps/npm/node_modules/ansi-regex/license +++ b/deps/npm/node_modules/ansi-regex/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/ansi-regex/package.json b/deps/npm/node_modules/ansi-regex/package.json index bf854fdc32bca5..2bf2bb485f0b63 100644 --- a/deps/npm/node_modules/ansi-regex/package.json +++ b/deps/npm/node_modules/ansi-regex/package.json @@ -1,52 +1,45 @@ { - "_from": "ansi-regex@~2.1.1", - "_id": "ansi-regex@2.1.1", - "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "_from": "ansi-regex@latest", + "_id": "ansi-regex@3.0.0", + "_inBundle": false, + "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "_location": "/ansi-regex", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "tag", "registry": true, - "raw": "ansi-regex@~2.1.1", + "raw": "ansi-regex@latest", "name": "ansi-regex", "escapedName": "ansi-regex", - "rawSpec": "~2.1.1", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "~2.1.1" + "fetchSpec": "latest" }, "_requiredBy": [ - "/", - "/npm-registry-couchapp/couchapp/nano/follow/request/har-validator/chalk/has-ansi", - "/standard/eslint/chalk/has-ansi", - "/standard/eslint/inquirer", - "/strip-ansi", - "/tap/coveralls/request/har-validator/chalk/has-ansi", - "/update-notifier/chalk/has-ansi" + "#USER", + "/" ], - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", - "_shrinkwrap": null, - "_spec": "ansi-regex@~2.1.1", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "_shasum": "ed0317c322064f79466c02966bddb605ab37d998", + "_spec": "ansi-regex@latest", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "bin": null, "bugs": { "url": "https://github.com/chalk/ansi-regex/issues" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "Regular expression for matching ANSI escape codes", "devDependencies": { - "ava": "0.17.0", - "xo": "0.16.0" + "ava": "*", + "xo": "*" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" }, "files": [ "index.js" @@ -80,39 +73,14 @@ "pattern" ], "license": "MIT", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Joshua Appelman", - "email": "jappelman@xebia.com", - "url": "jbnicolai.com" - }, - { - "name": "JD Ballard", - "email": "i.am.qix@gmail.com", - "url": "github.com/qix-" - } - ], "name": "ansi-regex", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/chalk/ansi-regex.git" }, "scripts": { - "test": "xo && ava --verbose", + "test": "xo && ava", "view-supported": "node fixtures/view-codes.js" }, - "version": "2.1.1", - "xo": { - "rules": { - "guard-for-in": 0, - "no-loop-func": 0 - } - } + "version": "3.0.0" } diff --git a/deps/npm/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/ansi-regex/readme.md index 6a928edf0f6b08..22db1c34055556 100644 --- a/deps/npm/node_modules/ansi-regex/readme.md +++ b/deps/npm/node_modules/ansi-regex/readme.md @@ -1,12 +1,12 @@ # ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) -> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) ## Install ``` -$ npm install --save ansi-regex +$ npm install ansi-regex ``` @@ -15,25 +15,32 @@ $ npm install --save ansi-regex ```js const ansiRegex = require('ansi-regex'); -ansiRegex().test('\u001b[4mcake\u001b[0m'); +ansiRegex().test('\u001B[4mcake\u001B[0m'); //=> true ansiRegex().test('cake'); //=> false -'\u001b[4mcake\u001b[0m'.match(ansiRegex()); -//=> ['\u001b[4m', '\u001b[0m'] +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] ``` + ## FAQ ### Why do you test for codes not in the ECMA 48 standard? -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT diff --git a/deps/npm/node_modules/cacache/CHANGELOG.md b/deps/npm/node_modules/cacache/CHANGELOG.md index 802257622eab58..9e8f8d6dddeb42 100644 --- a/deps/npm/node_modules/cacache/CHANGELOG.md +++ b/deps/npm/node_modules/cacache/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [9.2.9](https://github.com/zkat/cacache/compare/v9.2.8...v9.2.9) (2017-06-17) + + + ## [9.2.8](https://github.com/zkat/cacache/compare/v9.2.7...v9.2.8) (2017-06-05) diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE b/deps/npm/node_modules/cacache/node_modules/lru-cache/LICENSE similarity index 100% rename from deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE rename to deps/npm/node_modules/cacache/node_modules/lru-cache/LICENSE diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/README.md b/deps/npm/node_modules/cacache/node_modules/lru-cache/README.md new file mode 100644 index 00000000000000..f646c1cb8e50b1 --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/README.md @@ -0,0 +1,152 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) + +## Installation: + +```javascript +npm install lru-cache --save +``` + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n, key) { return n * 2 + key.length } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +// non-string keys ARE fully supported +var someObject = {} +cache.set(someObject, 'a value') +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n, key){return n.length}`. The default is + `function(){return 1}`, which is fine if you want to store `max` + like-sized things. The item is passed as the first argument, and + the key is passed as the second argumnet. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. +* `noDisposeOnSet` By default, if you set a `dispose()` method, then + it'll be called whenever a `set()` operation overwrites an existing + key. If you set this option, `dispose()` will only be called when a + key falls out of the cache, not when it is overwritten. + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `maxAge` is optional and overrides the + cache `maxAge` option if provided. + + If the key is not found, `get()` will return `undefined`. + + The key and val can be any value. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries + +* `prune()` + + Manually iterates over the entire cache proactively pruning old entries diff --git a/deps/npm/node_modules/lru-cache/lib/lru-cache.js b/deps/npm/node_modules/cacache/node_modules/lru-cache/index.js similarity index 65% rename from deps/npm/node_modules/lru-cache/lib/lru-cache.js rename to deps/npm/node_modules/cacache/node_modules/lru-cache/index.js index e98ef78a53dc79..460462aadc9dd9 100644 --- a/deps/npm/node_modules/lru-cache/lib/lru-cache.js +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/index.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = LRUCache // This will be a proper iterable 'Map' in engines that support it, @@ -9,10 +11,8 @@ var util = require('util') var Yallist = require('yallist') // use symbols if possible, otherwise just _props -var symbols = {} var hasSymbol = typeof Symbol === 'function' var makeSymbol -/* istanbul ignore if */ if (hasSymbol) { makeSymbol = function (key) { return Symbol.for(key) @@ -23,21 +23,15 @@ if (hasSymbol) { } } -function priv (obj, key, val) { - var sym - if (symbols[key]) { - sym = symbols[key] - } else { - sym = makeSymbol(key) - symbols[key] = sym - } - if (arguments.length === 2) { - return obj[sym] - } else { - obj[sym] = val - return val - } -} +var MAX = makeSymbol('max') +var LENGTH = makeSymbol('length') +var LENGTH_CALCULATOR = makeSymbol('lengthCalculator') +var ALLOW_STALE = makeSymbol('allowStale') +var MAX_AGE = makeSymbol('maxAge') +var DISPOSE = makeSymbol('dispose') +var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet') +var LRU_LIST = makeSymbol('lruList') +var CACHE = makeSymbol('cache') function naiveLength () { return 1 } @@ -62,23 +56,24 @@ function LRUCache (options) { options = {} } - var max = priv(this, 'max', options.max) + var max = this[MAX] = options.max // Kind of weird to have a default max of Infinity, but oh well. if (!max || !(typeof max === 'number') || max <= 0) { - priv(this, 'max', Infinity) + this[MAX] = Infinity } var lc = options.length || naiveLength if (typeof lc !== 'function') { lc = naiveLength } - priv(this, 'lengthCalculator', lc) + this[LENGTH_CALCULATOR] = lc - priv(this, 'allowStale', options.stale || false) - priv(this, 'maxAge', options.maxAge || 0) - priv(this, 'dispose', options.dispose) + this[ALLOW_STALE] = options.stale || false + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false this.reset() } @@ -88,21 +83,21 @@ Object.defineProperty(LRUCache.prototype, 'max', { if (!mL || !(typeof mL === 'number') || mL <= 0) { mL = Infinity } - priv(this, 'max', mL) + this[MAX] = mL trim(this) }, get: function () { - return priv(this, 'max') + return this[MAX] }, enumerable: true }) Object.defineProperty(LRUCache.prototype, 'allowStale', { set: function (allowStale) { - priv(this, 'allowStale', !!allowStale) + this[ALLOW_STALE] = !!allowStale }, get: function () { - return priv(this, 'allowStale') + return this[ALLOW_STALE] }, enumerable: true }) @@ -112,11 +107,11 @@ Object.defineProperty(LRUCache.prototype, 'maxAge', { if (!mA || !(typeof mA === 'number') || mA < 0) { mA = 0 } - priv(this, 'maxAge', mA) + this[MAX_AGE] = mA trim(this) }, get: function () { - return priv(this, 'maxAge') + return this[MAX_AGE] }, enumerable: true }) @@ -127,33 +122,33 @@ Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { if (typeof lC !== 'function') { lC = naiveLength } - if (lC !== priv(this, 'lengthCalculator')) { - priv(this, 'lengthCalculator', lC) - priv(this, 'length', 0) - priv(this, 'lruList').forEach(function (hit) { - hit.length = priv(this, 'lengthCalculator').call(this, hit.value, hit.key) - priv(this, 'length', priv(this, 'length') + hit.length) + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(function (hit) { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length }, this) } trim(this) }, - get: function () { return priv(this, 'lengthCalculator') }, + get: function () { return this[LENGTH_CALCULATOR] }, enumerable: true }) Object.defineProperty(LRUCache.prototype, 'length', { - get: function () { return priv(this, 'length') }, + get: function () { return this[LENGTH] }, enumerable: true }) Object.defineProperty(LRUCache.prototype, 'itemCount', { - get: function () { return priv(this, 'lruList').length }, + get: function () { return this[LRU_LIST].length }, enumerable: true }) LRUCache.prototype.rforEach = function (fn, thisp) { thisp = thisp || this - for (var walker = priv(this, 'lruList').tail; walker !== null;) { + for (var walker = this[LRU_LIST].tail; walker !== null;) { var prev = walker.prev forEachStep(this, fn, walker, thisp) walker = prev @@ -164,7 +159,7 @@ function forEachStep (self, fn, node, thisp) { var hit = node.value if (isStale(self, hit)) { del(self, node) - if (!priv(self, 'allowStale')) { + if (!self[ALLOW_STALE]) { hit = undefined } } @@ -175,7 +170,7 @@ function forEachStep (self, fn, node, thisp) { LRUCache.prototype.forEach = function (fn, thisp) { thisp = thisp || this - for (var walker = priv(this, 'lruList').head; walker !== null;) { + for (var walker = this[LRU_LIST].head; walker !== null;) { var next = walker.next forEachStep(this, fn, walker, thisp) walker = next @@ -183,33 +178,33 @@ LRUCache.prototype.forEach = function (fn, thisp) { } LRUCache.prototype.keys = function () { - return priv(this, 'lruList').toArray().map(function (k) { + return this[LRU_LIST].toArray().map(function (k) { return k.key }, this) } LRUCache.prototype.values = function () { - return priv(this, 'lruList').toArray().map(function (k) { + return this[LRU_LIST].toArray().map(function (k) { return k.value }, this) } LRUCache.prototype.reset = function () { - if (priv(this, 'dispose') && - priv(this, 'lruList') && - priv(this, 'lruList').length) { - priv(this, 'lruList').forEach(function (hit) { - priv(this, 'dispose').call(this, hit.key, hit.value) + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(function (hit) { + this[DISPOSE](hit.key, hit.value) }, this) } - priv(this, 'cache', new Map()) // hash of items by key - priv(this, 'lruList', new Yallist()) // list of items in order of use recency - priv(this, 'length', 0) // length of items in the list + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list } LRUCache.prototype.dump = function () { - return priv(this, 'lruList').map(function (hit) { + return this[LRU_LIST].map(function (hit) { if (!isStale(this, hit)) { return { k: hit.key, @@ -223,20 +218,20 @@ LRUCache.prototype.dump = function () { } LRUCache.prototype.dumpLru = function () { - return priv(this, 'lruList') + return this[LRU_LIST] } LRUCache.prototype.inspect = function (n, opts) { var str = 'LRUCache {' var extras = false - var as = priv(this, 'allowStale') + var as = this[ALLOW_STALE] if (as) { str += '\n allowStale: true' extras = true } - var max = priv(this, 'max') + var max = this[MAX] if (max && max !== Infinity) { if (extras) { str += ',' @@ -245,7 +240,7 @@ LRUCache.prototype.inspect = function (n, opts) { extras = true } - var maxAge = priv(this, 'maxAge') + var maxAge = this[MAX_AGE] if (maxAge) { if (extras) { str += ',' @@ -254,17 +249,17 @@ LRUCache.prototype.inspect = function (n, opts) { extras = true } - var lc = priv(this, 'lengthCalculator') + var lc = this[LENGTH_CALCULATOR] if (lc && lc !== naiveLength) { if (extras) { str += ',' } - str += '\n length: ' + util.inspect(priv(this, 'length'), opts) + str += '\n length: ' + util.inspect(this[LENGTH], opts) extras = true } var didFirst = false - priv(this, 'lruList').forEach(function (item) { + this[LRU_LIST].forEach(function (item) { if (didFirst) { str += ',\n ' } else { @@ -299,29 +294,32 @@ LRUCache.prototype.inspect = function (n, opts) { } LRUCache.prototype.set = function (key, value, maxAge) { - maxAge = maxAge || priv(this, 'maxAge') + maxAge = maxAge || this[MAX_AGE] var now = maxAge ? Date.now() : 0 - var len = priv(this, 'lengthCalculator').call(this, value, key) + var len = this[LENGTH_CALCULATOR](value, key) - if (priv(this, 'cache').has(key)) { - if (len > priv(this, 'max')) { - del(this, priv(this, 'cache').get(key)) + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) return false } - var node = priv(this, 'cache').get(key) + var node = this[CACHE].get(key) var item = node.value // dispose of the old one before overwriting - if (priv(this, 'dispose')) { - priv(this, 'dispose').call(this, key, item.value) + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) { + this[DISPOSE](key, item.value) + } } item.now = now item.maxAge = maxAge item.value = value - priv(this, 'length', priv(this, 'length') + (len - item.length)) + this[LENGTH] += len - item.length item.length = len this.get(key) trim(this) @@ -331,23 +329,23 @@ LRUCache.prototype.set = function (key, value, maxAge) { var hit = new Entry(key, value, len, now, maxAge) // oversized objects fall out of cache automatically. - if (hit.length > priv(this, 'max')) { - if (priv(this, 'dispose')) { - priv(this, 'dispose').call(this, key, value) + if (hit.length > this[MAX]) { + if (this[DISPOSE]) { + this[DISPOSE](key, value) } return false } - priv(this, 'length', priv(this, 'length') + hit.length) - priv(this, 'lruList').unshift(hit) - priv(this, 'cache').set(key, priv(this, 'lruList').head) + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) trim(this) return true } LRUCache.prototype.has = function (key) { - if (!priv(this, 'cache').has(key)) return false - var hit = priv(this, 'cache').get(key).value + if (!this[CACHE].has(key)) return false + var hit = this[CACHE].get(key).value if (isStale(this, hit)) { return false } @@ -363,14 +361,14 @@ LRUCache.prototype.peek = function (key) { } LRUCache.prototype.pop = function () { - var node = priv(this, 'lruList').tail + var node = this[LRU_LIST].tail if (!node) return null del(this, node) return node.value } LRUCache.prototype.del = function (key) { - del(this, priv(this, 'cache').get(key)) + del(this, this[CACHE].get(key)) } LRUCache.prototype.load = function (arr) { @@ -397,21 +395,21 @@ LRUCache.prototype.load = function (arr) { LRUCache.prototype.prune = function () { var self = this - priv(this, 'cache').forEach(function (value, key) { + this[CACHE].forEach(function (value, key) { get(self, key, false) }) } function get (self, key, doUse) { - var node = priv(self, 'cache').get(key) + var node = self[CACHE].get(key) if (node) { var hit = node.value if (isStale(self, hit)) { del(self, node) - if (!priv(self, 'allowStale')) hit = undefined + if (!self[ALLOW_STALE]) hit = undefined } else { if (doUse) { - priv(self, 'lruList').unshiftNode(node) + self[LRU_LIST].unshiftNode(node) } } if (hit) hit = hit.value @@ -420,7 +418,7 @@ function get (self, key, doUse) { } function isStale (self, hit) { - if (!hit || (!hit.maxAge && !priv(self, 'maxAge'))) { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) { return false } var stale = false @@ -428,15 +426,15 @@ function isStale (self, hit) { if (hit.maxAge) { stale = diff > hit.maxAge } else { - stale = priv(self, 'maxAge') && (diff > priv(self, 'maxAge')) + stale = self[MAX_AGE] && (diff > self[MAX_AGE]) } return stale } function trim (self) { - if (priv(self, 'length') > priv(self, 'max')) { - for (var walker = priv(self, 'lruList').tail; - priv(self, 'length') > priv(self, 'max') && walker !== null;) { + if (self[LENGTH] > self[MAX]) { + for (var walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { // We know that we're about to delete this one, and also // what the next least recently used key will be, so just // go ahead and set it now. @@ -450,12 +448,12 @@ function trim (self) { function del (self, node) { if (node) { var hit = node.value - if (priv(self, 'dispose')) { - priv(self, 'dispose').call(this, hit.key, hit.value) + if (self[DISPOSE]) { + self[DISPOSE](hit.key, hit.value) } - priv(self, 'length', priv(self, 'length') - hit.length) - priv(self, 'cache').delete(hit.key) - priv(self, 'lruList').removeNode(node) + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) } } diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/LICENSE similarity index 100% rename from deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE rename to deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/LICENSE diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/README.md b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/README.md new file mode 100644 index 00000000000000..778bf01dfaaf9f --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/README.md @@ -0,0 +1,60 @@ +# pseudomap + +A thing that is a lot like ES6 `Map`, but without iterators, for use +in environments where `for..of` syntax and `Map` are not available. + +If you need iterators, or just in general a more faithful polyfill to +ES6 Maps, check out [es6-map](http://npm.im/es6-map). + +If you are in an environment where `Map` is supported, then that will +be returned instead, unless `process.env.TEST_PSEUDOMAP` is set. + +You can use any value as keys, and any value as data. Setting again +with the identical key will overwrite the previous value. + +Internally, data is stored on an `Object.create(null)` style object. +The key is coerced to a string to generate the key on the internal +data-bag object. The original key used is stored along with the data. + +In the event of a stringified-key collision, a new key is generated by +appending an increasing number to the stringified-key until finding +either the intended key or an empty spot. + +Note that because object traversal order of plain objects is not +guaranteed to be identical to insertion order, the insertion order +guarantee of `Map.prototype.forEach` is not guaranteed in this +implementation. However, in all versions of Node.js and V8 where this +module works, `forEach` does traverse data in insertion order. + +## API + +Most of the [Map +API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), +with the following exceptions: + +1. A `Map` object is not an iterator. +2. `values`, `keys`, and `entries` methods are not implemented, + because they return iterators. +3. The argument to the constructor can be an Array of `[key, value]` + pairs, or a `Map` or `PseudoMap` object. But, since iterators + aren't used, passing any plain-old iterator won't initialize the + map properly. + +## USAGE + +Use just like a regular ES6 Map. + +```javascript +var PseudoMap = require('pseudomap') + +// optionally provide a pseudomap, or an array of [key,value] pairs +// as the argument to initialize the map with +var myMap = new PseudoMap() + +myMap.set(1, 'number 1') +myMap.set('1', 'string 1') +var akey = {} +var bkey = {} +myMap.set(akey, { some: 'data' }) +myMap.set(bkey, { some: 'other data' }) +``` diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/map.js b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/map.js new file mode 100644 index 00000000000000..7db15994612fd9 --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/map.js @@ -0,0 +1,9 @@ +if (process.env.npm_package_name === 'pseudomap' && + process.env.npm_lifecycle_script === 'test') + process.env.TEST_PSEUDOMAP = 'true' + +if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { + module.exports = Map +} else { + module.exports = require('./pseudomap') +} diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/package.json b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/package.json new file mode 100644 index 00000000000000..3b5bd1e0eefc3f --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/package.json @@ -0,0 +1,54 @@ +{ + "_from": "pseudomap@^1.0.2", + "_id": "pseudomap@1.0.2", + "_inBundle": false, + "_integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "_location": "/cacache/lru-cache/pseudomap", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "pseudomap@^1.0.2", + "name": "pseudomap", + "escapedName": "pseudomap", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/cacache/lru-cache" + ], + "_resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "_shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3", + "_spec": "pseudomap@^1.0.2", + "_where": "/Users/rebecca/code/npm/node_modules/cacache/node_modules/lru-cache", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/pseudomap/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/isaacs/pseudomap#readme", + "license": "ISC", + "main": "map.js", + "name": "pseudomap", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/pseudomap.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.0.2" +} diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/pseudomap.js b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/pseudomap.js new file mode 100644 index 00000000000000..25a21d829e8b3f --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/pseudomap.js @@ -0,0 +1,113 @@ +var hasOwnProperty = Object.prototype.hasOwnProperty + +module.exports = PseudoMap + +function PseudoMap (set) { + if (!(this instanceof PseudoMap)) // whyyyyyyy + throw new TypeError("Constructor PseudoMap requires 'new'") + + this.clear() + + if (set) { + if ((set instanceof PseudoMap) || + (typeof Map === 'function' && set instanceof Map)) + set.forEach(function (value, key) { + this.set(key, value) + }, this) + else if (Array.isArray(set)) + set.forEach(function (kv) { + this.set(kv[0], kv[1]) + }, this) + else + throw new TypeError('invalid argument') + } +} + +PseudoMap.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + Object.keys(this._data).forEach(function (k) { + if (k !== 'size') + fn.call(thisp, this._data[k].value, this._data[k].key) + }, this) +} + +PseudoMap.prototype.has = function (k) { + return !!find(this._data, k) +} + +PseudoMap.prototype.get = function (k) { + var res = find(this._data, k) + return res && res.value +} + +PseudoMap.prototype.set = function (k, v) { + set(this._data, k, v) +} + +PseudoMap.prototype.delete = function (k) { + var res = find(this._data, k) + if (res) { + delete this._data[res._index] + this._data.size-- + } +} + +PseudoMap.prototype.clear = function () { + var data = Object.create(null) + data.size = 0 + + Object.defineProperty(this, '_data', { + value: data, + enumerable: false, + configurable: true, + writable: false + }) +} + +Object.defineProperty(PseudoMap.prototype, 'size', { + get: function () { + return this._data.size + }, + set: function (n) {}, + enumerable: true, + configurable: true +}) + +PseudoMap.prototype.values = +PseudoMap.prototype.keys = +PseudoMap.prototype.entries = function () { + throw new Error('iterators are not implemented in this version') +} + +// Either identical, or both NaN +function same (a, b) { + return a === b || a !== a && b !== b +} + +function Entry (k, v, i) { + this.key = k + this.value = v + this._index = i +} + +function find (data, k) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) + return data[key] + } +} + +function set (data, k, v) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) { + data[key].value = v + return + } + } + data.size++ + data[key] = new Entry(k, v, key) +} diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/test/basic.js b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/test/basic.js new file mode 100644 index 00000000000000..4378e4541e9a14 --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap/test/basic.js @@ -0,0 +1,86 @@ +var t = require('tap') + +process.env.TEST_PSEUDOMAP = 'true' + +var PM = require('../') +runTests(PM) + +// if possible, verify that Map also behaves the same way +if (typeof Map === 'function') + runTests(Map) + + +function runTests (Map) { + t.throws(Map) + + var m = new Map() + + t.equal(m.size, 0) + + m.set(1, '1 string') + t.equal(m.get(1), '1 string') + t.equal(m.size, 1) + m.size = 1000 + t.equal(m.size, 1) + m.size = 0 + t.equal(m.size, 1) + + m = new Map([[1, 'number 1'], ['1', 'string 1']]) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + m = new Map(m) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + var akey = {} + var bkey = {} + m.set(akey, { some: 'data' }) + m.set(bkey, { some: 'other data' }) + t.same(m.get(akey), { some: 'data' }) + t.same(m.get(bkey), { some: 'other data' }) + t.equal(m.size, 4) + + var x = /x/ + var y = /x/ + m.set(x, 'x regex') + m.set(y, 'y regex') + t.equal(m.get(x), 'x regex') + m.set(x, 'x again') + t.equal(m.get(x), 'x again') + t.equal(m.size, 6) + + m.set(NaN, 'not a number') + t.equal(m.get(NaN), 'not a number') + m.set(NaN, 'it is a ' + typeof NaN) + t.equal(m.get(NaN), 'it is a number') + m.set('NaN', 'stringie nan') + t.equal(m.get(NaN), 'it is a number') + t.equal(m.get('NaN'), 'stringie nan') + t.equal(m.size, 8) + + m.delete(NaN) + t.equal(m.get(NaN), undefined) + t.equal(m.size, 7) + + var expect = [ + { value: 'number 1', key: 1 }, + { value: 'string 1', key: '1' }, + { value: { some: 'data' }, key: {} }, + { value: { some: 'other data' }, key: {} }, + { value: 'x again', key: /x/ }, + { value: 'y regex', key: /x/ }, + { value: 'stringie nan', key: 'NaN' } + ] + var actual = [] + + m.forEach(function (value, key) { + actual.push({ value: value, key: key }) + }) + t.same(actual, expect) + + m.clear() + t.equal(m.size, 0) +} diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/LICENSE similarity index 100% rename from deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE rename to deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/LICENSE diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/README.md b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/README.md new file mode 100644 index 00000000000000..f5861018696688 --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/README.md @@ -0,0 +1,204 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + + +[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) + +## basic usage + +```javascript +var yallist = require('yallist') +var myList = yallist.create([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `var n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/iterator.js b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/iterator.js new file mode 100644 index 00000000000000..4a15bf22c40032 --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/iterator.js @@ -0,0 +1,7 @@ +var Yallist = require('./yallist.js') + +Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } +} diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/package.json b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/package.json new file mode 100644 index 00000000000000..b0fdf0d0a6fdf6 --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/package.json @@ -0,0 +1,62 @@ +{ + "_from": "yallist@^2.1.2", + "_id": "yallist@2.1.2", + "_inBundle": false, + "_integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "_location": "/cacache/lru-cache/yallist", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "yallist@^2.1.2", + "name": "yallist", + "escapedName": "yallist", + "rawSpec": "^2.1.2", + "saveSpec": null, + "fetchSpec": "^2.1.2" + }, + "_requiredBy": [ + "/cacache/lru-cache" + ], + "_resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "_shasum": "1c11f9218f076089a47dd512f93c6699a6a81d52", + "_spec": "yallist@^2.1.2", + "_where": "/Users/rebecca/code/npm/node_modules/cacache/node_modules/lru-cache", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/yallist/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Yet Another Linked List", + "devDependencies": { + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "homepage": "https://github.com/isaacs/yallist#readme", + "license": "ISC", + "main": "yallist.js", + "name": "yallist", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.1.2" +} diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/yallist.js b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/yallist.js new file mode 100644 index 00000000000000..518d23330b936c --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist/yallist.js @@ -0,0 +1,370 @@ +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} diff --git a/deps/npm/node_modules/cacache/node_modules/lru-cache/package.json b/deps/npm/node_modules/cacache/node_modules/lru-cache/package.json new file mode 100644 index 00000000000000..b0b037c12876f9 --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/lru-cache/package.json @@ -0,0 +1,68 @@ +{ + "_from": "lru-cache@^4.1.1", + "_id": "lru-cache@4.1.1", + "_inBundle": false, + "_integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "_location": "/cacache/lru-cache", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "lru-cache@^4.1.1", + "name": "lru-cache", + "escapedName": "lru-cache", + "rawSpec": "^4.1.1", + "saveSpec": null, + "fetchSpec": "^4.1.1" + }, + "_requiredBy": [ + "/cacache" + ], + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "_shasum": "622e32e82488b49279114a4f9ecf45e7cd6bba55", + "_spec": "lru-cache@^4.1.1", + "_where": "/Users/rebecca/code/npm/node_modules/cacache", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/node-lru-cache/issues" + }, + "bundleDependencies": false, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + }, + "deprecated": false, + "description": "A cache object that deletes the least-recently-used items.", + "devDependencies": { + "benchmark": "^2.1.4", + "standard": "^5.4.1", + "tap": "^10.3.3" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/isaacs/node-lru-cache#readme", + "keywords": [ + "mru", + "lru", + "cache" + ], + "license": "ISC", + "main": "index.js", + "name": "lru-cache", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "posttest": "standard test/*.js index.js", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100 -J" + }, + "version": "4.1.1" +} diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json index b55c3ba6897b82..3290274a429a1d 100644 --- a/deps/npm/node_modules/cacache/package.json +++ b/deps/npm/node_modules/cacache/package.json @@ -1,19 +1,19 @@ { - "_from": "cacache@9.2.8", - "_id": "cacache@9.2.8", + "_from": "cacache@latest", + "_id": "cacache@9.2.9", "_inBundle": false, - "_integrity": "sha512-nA3gmaDPEsFWqI5eYAe35IfvW54yGJ3ns2wDopWf4iDA3fkhBNsdvnYp4NrL+L7ysMt0/isM84Mwi+b4l8/pMQ==", + "_integrity": "sha512-ghg1j5OyTJ6qsrqU++dN23QiTDxb5AZCFGsF3oB+v9v/gY+F4X8L/0gdQMEjd+8Ot3D29M2etX5PKozHRn2JQw==", "_location": "/cacache", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "tag", "registry": true, - "raw": "cacache@9.2.8", + "raw": "cacache@latest", "name": "cacache", "escapedName": "cacache", - "rawSpec": "9.2.8", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "9.2.8" + "fetchSpec": "latest" }, "_requiredBy": [ "#USER", @@ -21,10 +21,10 @@ "/pacote", "/pacote/make-fetch-happen" ], - "_resolved": "https://registry.npmjs.org/cacache/-/cacache-9.2.8.tgz", - "_shasum": "2e38b51161a3904e3b9fb35c0869b751f7d0bcf4", - "_spec": "cacache@9.2.8", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/cacache/-/cacache-9.2.9.tgz", + "_shasum": "f9d7ffe039851ec94c28290662afa4dd4bb9e8dd", + "_spec": "cacache@latest", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -60,13 +60,13 @@ "chownr": "^1.0.1", "glob": "^7.1.2", "graceful-fs": "^4.1.11", - "lru-cache": "^4.0.2", + "lru-cache": "^4.1.1", "mississippi": "^1.3.0", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", "rimraf": "^2.6.1", - "ssri": "^4.1.5", + "ssri": "^4.1.6", "unique-filename": "^1.1.0", "y18n": "^3.2.1" }, @@ -75,14 +75,14 @@ "devDependencies": { "benchmark": "^2.1.4", "chalk": "^1.1.3", - "cross-env": "^5.0.0", + "cross-env": "^5.0.1", "nyc": "^11.0.2", "require-inject": "^1.4.0", "safe-buffer": "^5.1.0", "standard": "^10.0.2", - "standard-version": "^4.0.0", + "standard-version": "^4.2.0", "tacks": "^1.2.2", - "tap": "^10.3.3", + "tap": "^10.3.4", "weallbehave": "^1.2.0", "weallcontribute": "^1.0.8" }, @@ -125,5 +125,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "9.2.8" + "version": "9.2.9" } diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js b/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js new file mode 100644 index 00000000000000..099480fbfc54cb --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js @@ -0,0 +1,6 @@ +'use strict'; +var ansiRegex = require('ansi-regex')(); + +module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; diff --git a/deps/npm/node_modules/update-notifier/node_modules/boxen/node_modules/ansi-align/node_modules/string-width/license b/deps/npm/node_modules/columnify/node_modules/strip-ansi/license similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/boxen/node_modules/ansi-align/node_modules/string-width/license rename to deps/npm/node_modules/columnify/node_modules/strip-ansi/license diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js new file mode 100644 index 00000000000000..b9574ed7e82013 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; diff --git a/deps/npm/node_modules/update-notifier/node_modules/boxen/node_modules/ansi-align/node_modules/string-width/node_modules/code-point-at/license b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/license similarity index 100% rename from deps/npm/node_modules/update-notifier/node_modules/boxen/node_modules/ansi-align/node_modules/string-width/node_modules/code-point-at/license rename to deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/license diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json new file mode 100644 index 00000000000000..b5fbbd7d767916 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json @@ -0,0 +1,108 @@ +{ + "_from": "ansi-regex@^2.0.0", + "_id": "ansi-regex@2.1.1", + "_inBundle": false, + "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "_location": "/columnify/strip-ansi/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-regex@^2.0.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/columnify/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", + "_spec": "ansi-regex@^2.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/columnify/node_modules/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "0.17.0", + "xo": "0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "2.1.1", + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md new file mode 100644 index 00000000000000..6a928edf0f6b08 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md @@ -0,0 +1,39 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json b/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json new file mode 100644 index 00000000000000..2befc6de4d28bb --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json @@ -0,0 +1,101 @@ +{ + "_from": "strip-ansi@^3.0.0", + "_id": "strip-ansi@3.0.1", + "_inBundle": false, + "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "_location": "/columnify/strip-ansi", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "strip-ansi@^3.0.0", + "name": "strip-ansi", + "escapedName": "strip-ansi", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/columnify" + ], + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", + "_spec": "strip-ansi@^3.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/columnify", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "deprecated": false, + "description": "Strip ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/strip-ansi#readme", + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "strip-ansi", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.1" +} diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md new file mode 100644 index 00000000000000..cb7d9ff7ee403d --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md @@ -0,0 +1,33 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save strip-ansi +``` + + +## Usage + +```js +var stripAnsi = require('strip-ansi'); + +stripAnsi('\u001b[4mcake\u001b[0m'); +//=> 'cake' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js index e8d8587020ca6c..1685a762932558 100644 --- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js @@ -1,3 +1,4 @@ +'use strict'; module.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json index a3170ed9c3c3fe..4702c7d9a4f0b7 100644 --- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -1,33 +1,32 @@ { - "_from": "balanced-match@^0.4.1", - "_id": "balanced-match@0.4.2", - "_integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "_from": "balanced-match@^1.0.0", + "_id": "balanced-match@1.0.0", + "_inBundle": false, + "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "_location": "/fstream-npm/fstream-ignore/minimatch/brace-expansion/balanced-match", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "balanced-match@^0.4.1", + "raw": "balanced-match@^1.0.0", "name": "balanced-match", "escapedName": "balanced-match", - "rawSpec": "^0.4.1", + "rawSpec": "^1.0.0", "saveSpec": null, - "fetchSpec": "^0.4.1" + "fetchSpec": "^1.0.0" }, "_requiredBy": [ "/fstream-npm/fstream-ignore/minimatch/brace-expansion" ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", - "_shrinkwrap": null, - "_spec": "balanced-match@^0.4.1", - "_where": "/Users/zkat/Documents/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion", + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767", + "_spec": "balanced-match@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, - "bin": null, "bugs": { "url": "https://github.com/juliangruber/balanced-match/issues" }, @@ -36,6 +35,7 @@ "deprecated": false, "description": "Match balanced character pairs, like \"{\" and \"}\"", "devDependencies": { + "matcha": "^0.7.0", "tape": "^4.6.0" }, "homepage": "https://github.com/juliangruber/balanced-match", @@ -49,13 +49,12 @@ "license": "MIT", "main": "index.js", "name": "balanced-match", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/juliangruber/balanced-match.git" }, "scripts": { + "bench": "make bench", "test": "make test" }, "testling": { @@ -74,5 +73,5 @@ "android-browser/4.2..latest" ] }, - "version": "0.4.2" + "version": "1.0.0" } diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json index 71448dff902e15..7d38d063ea6021 100644 --- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -1,39 +1,38 @@ { - "_from": "brace-expansion@^1.0.0", - "_id": "brace-expansion@1.1.7", - "_integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", + "_from": "brace-expansion@^1.1.7", + "_id": "brace-expansion@1.1.8", + "_inBundle": false, + "_integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", "_location": "/fstream-npm/fstream-ignore/minimatch/brace-expansion", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "brace-expansion@^1.0.0", + "raw": "brace-expansion@^1.1.7", "name": "brace-expansion", "escapedName": "brace-expansion", - "rawSpec": "^1.0.0", + "rawSpec": "^1.1.7", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "^1.1.7" }, "_requiredBy": [ "/fstream-npm/fstream-ignore/minimatch" ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", - "_shasum": "3effc3c50e000531fb720eaff80f0ae8ef23cf59", - "_shrinkwrap": null, - "_spec": "brace-expansion@^1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch", + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292", + "_spec": "brace-expansion@^1.1.7", + "_where": "/Users/rebecca/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, - "bin": null, "bugs": { "url": "https://github.com/juliangruber/brace-expansion/issues" }, "bundleDependencies": false, "dependencies": { - "balanced-match": "^0.4.1", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" }, "deprecated": false, @@ -47,8 +46,6 @@ "license": "MIT", "main": "index.js", "name": "brace-expansion", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/juliangruber/brace-expansion.git" @@ -74,5 +71,5 @@ "android-browser/4.2..latest" ] }, - "version": "1.1.7" + "version": "1.1.8" } diff --git a/deps/npm/node_modules/fstream-npm/package.json b/deps/npm/node_modules/fstream-npm/package.json index 3aef0ce37b886a..67169501835444 100644 --- a/deps/npm/node_modules/fstream-npm/package.json +++ b/deps/npm/node_modules/fstream-npm/package.json @@ -1,5 +1,5 @@ { - "_from": "fstream-npm@latest", + "_from": "fstream-npm@~1.2.1", "_id": "fstream-npm@1.2.1", "_inBundle": false, "_integrity": "sha512-iBHpm/LmD1qw0TlHMAqVd9rwdU6M+EHRUnPkXpRi5G/Hf0FIFH+oZFryodAU2MFNfGRh/CzhUFlMKV3pdeOTDw==", @@ -9,14 +9,14 @@ "inherits": "2.0.3" }, "_requested": { - "type": "tag", + "type": "range", "registry": true, - "raw": "fstream-npm@latest", + "raw": "fstream-npm@~1.2.1", "name": "fstream-npm", "escapedName": "fstream-npm", - "rawSpec": "latest", + "rawSpec": "~1.2.1", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "~1.2.1" }, "_requiredBy": [ "#USER", @@ -24,8 +24,8 @@ ], "_resolved": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.2.1.tgz", "_shasum": "08c4a452f789dcbac4c89a4563c902b2c862fd5b", - "_spec": "fstream-npm@latest", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "fstream-npm@~1.2.1", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js index e8d8587020ca6c..1685a762932558 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js @@ -1,3 +1,4 @@ +'use strict'; module.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json index b1e0e2b28eed7a..23f4e2cc6923d4 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -1,33 +1,32 @@ { - "_from": "balanced-match@^0.4.1", - "_id": "balanced-match@0.4.2", - "_integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "_from": "balanced-match@^1.0.0", + "_id": "balanced-match@1.0.0", + "_inBundle": false, + "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "_location": "/glob/minimatch/brace-expansion/balanced-match", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "balanced-match@^0.4.1", + "raw": "balanced-match@^1.0.0", "name": "balanced-match", "escapedName": "balanced-match", - "rawSpec": "^0.4.1", + "rawSpec": "^1.0.0", "saveSpec": null, - "fetchSpec": "^0.4.1" + "fetchSpec": "^1.0.0" }, "_requiredBy": [ "/glob/minimatch/brace-expansion" ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", - "_shrinkwrap": null, - "_spec": "balanced-match@^0.4.1", - "_where": "/Users/zkat/Documents/code/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion", + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767", + "_spec": "balanced-match@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, - "bin": null, "bugs": { "url": "https://github.com/juliangruber/balanced-match/issues" }, @@ -36,6 +35,7 @@ "deprecated": false, "description": "Match balanced character pairs, like \"{\" and \"}\"", "devDependencies": { + "matcha": "^0.7.0", "tape": "^4.6.0" }, "homepage": "https://github.com/juliangruber/balanced-match", @@ -49,13 +49,12 @@ "license": "MIT", "main": "index.js", "name": "balanced-match", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/juliangruber/balanced-match.git" }, "scripts": { + "bench": "make bench", "test": "make test" }, "testling": { @@ -74,5 +73,5 @@ "android-browser/4.2..latest" ] }, - "version": "0.4.2" + "version": "1.0.0" } diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json index 4dce0154bc3462..e7c21ffc56f679 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -1,39 +1,38 @@ { - "_from": "brace-expansion@^1.0.0", - "_id": "brace-expansion@1.1.7", - "_integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", + "_from": "brace-expansion@^1.1.7", + "_id": "brace-expansion@1.1.8", + "_inBundle": false, + "_integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", "_location": "/glob/minimatch/brace-expansion", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "brace-expansion@^1.0.0", + "raw": "brace-expansion@^1.1.7", "name": "brace-expansion", "escapedName": "brace-expansion", - "rawSpec": "^1.0.0", + "rawSpec": "^1.1.7", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "^1.1.7" }, "_requiredBy": [ "/glob/minimatch" ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", - "_shasum": "3effc3c50e000531fb720eaff80f0ae8ef23cf59", - "_shrinkwrap": null, - "_spec": "brace-expansion@^1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/glob/node_modules/minimatch", + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292", + "_spec": "brace-expansion@^1.1.7", + "_where": "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, - "bin": null, "bugs": { "url": "https://github.com/juliangruber/brace-expansion/issues" }, "bundleDependencies": false, "dependencies": { - "balanced-match": "^0.4.1", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" }, "deprecated": false, @@ -47,8 +46,6 @@ "license": "MIT", "main": "index.js", "name": "brace-expansion", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/juliangruber/brace-expansion.git" @@ -74,5 +71,5 @@ "android-browser/4.2..latest" ] }, - "version": "1.1.7" + "version": "1.1.8" } diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index 82971fc8bfbac0..afa4b50f1636db 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -1,19 +1,19 @@ { - "_from": "glob@7.1.2", + "_from": "glob@~7.1.2", "_id": "glob@7.1.2", "_inBundle": false, "_integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "_location": "/glob", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "glob@7.1.2", + "raw": "glob@~7.1.2", "name": "glob", "escapedName": "glob", - "rawSpec": "7.1.2", + "rawSpec": "~7.1.2", "saveSpec": null, - "fetchSpec": "7.1.2" + "fetchSpec": "~7.1.2" }, "_requiredBy": [ "#USER", @@ -30,8 +30,8 @@ ], "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "_shasum": "c19c9df9a028702d678612384a6552404c636d15", - "_spec": "glob@7.1.2", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "glob@~7.1.2", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", diff --git a/deps/npm/node_modules/hosted-git-info/index.js b/deps/npm/node_modules/hosted-git-info/index.js index 8577ffb7678af0..9055ab1853de77 100644 --- a/deps/npm/node_modules/hosted-git-info/index.js +++ b/deps/npm/node_modules/hosted-git-info/index.js @@ -23,7 +23,19 @@ var authProtocols = { 'git+http:': true } +var cache = {} + module.exports.fromUrl = function (giturl, opts) { + var key = giturl + JSON.stringify(opts || {}) + + if (!(key in cache)) { + cache[key] = fromUrl(giturl, opts) + } + + return cache[key] +} + +function fromUrl (giturl, opts) { if (giturl == null || giturl === '') return var url = fixupUnqualifiedGist( isGitHubShorthand(giturl) ? 'github:' + giturl : giturl diff --git a/deps/npm/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/hosted-git-info/package.json index b6c1b5e297d662..de691a86c0db77 100644 --- a/deps/npm/node_modules/hosted-git-info/package.json +++ b/deps/npm/node_modules/hosted-git-info/package.json @@ -1,40 +1,39 @@ { - "_from": "hosted-git-info@~2.4.2", - "_id": "hosted-git-info@2.4.2", - "_integrity": "sha1-AHa59GonBQbduq6lZJaJdGBhKmc=", + "_from": "hosted-git-info@2.5.0", + "_id": "hosted-git-info@2.5.0", + "_inBundle": false, + "_integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", "_location": "/hosted-git-info", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "hosted-git-info@~2.4.2", + "raw": "hosted-git-info@2.5.0", "name": "hosted-git-info", "escapedName": "hosted-git-info", - "rawSpec": "~2.4.2", + "rawSpec": "2.5.0", "saveSpec": null, - "fetchSpec": "~2.4.2" + "fetchSpec": "2.5.0" }, "_requiredBy": [ + "#USER", "/", "/normalize-package-data", "/npm-package-arg" ], - "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.2.tgz", - "_shasum": "0076b9f46a270506ddbaaea56496897460612a67", - "_shrinkwrap": null, - "_spec": "hosted-git-info@~2.4.2", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "_shasum": "6d60e34b3abbc8313062c3b798ef8d901a07af3c", + "_spec": "hosted-git-info@2.5.0", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org", "url": "http://re-becca.org" }, - "bin": null, "bugs": { "url": "https://github.com/npm/hosted-git-info/issues" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", "devDependencies": { @@ -56,8 +55,6 @@ "license": "ISC", "main": "index.js", "name": "hosted-git-info", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/npm/hosted-git-info.git" @@ -65,5 +62,5 @@ "scripts": { "test": "standard && tap -J --coverage test/*.js" }, - "version": "2.4.2" + "version": "2.5.0" } diff --git a/deps/npm/node_modules/libnpx/CHANGELOG.md b/deps/npm/node_modules/libnpx/CHANGELOG.md new file mode 100644 index 00000000000000..c53646d02084fc --- /dev/null +++ b/deps/npm/node_modules/libnpx/CHANGELOG.md @@ -0,0 +1,603 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [9.2.0](https://github.com/zkat/npx/compare/v9.1.0...v9.2.0) (2017-07-14) + + +### Bug Fixes + +* **binpath:** fix calling binaries from subdirectories ([f185d0d](https://github.com/zkat/npx/commit/f185d0d)) +* **i18n:** Fix typos in french locale (#78) ([f277fc7](https://github.com/zkat/npx/commit/f277fc7)), closes [#78](https://github.com/zkat/npx/issues/78) + + +### Features + +* **i18n:** Add German translations (#79) ([c81e26d](https://github.com/zkat/npx/commit/c81e26d)) +* **i18n:** add zh_TW translation (#80) ([98288d8](https://github.com/zkat/npx/commit/98288d8)) + + + + +# [9.1.0](https://github.com/zkat/npx/compare/v9.0.7...v9.1.0) (2017-07-12) + + +### Bug Fixes + +* **call:** only npm run env if package.json exists ([370f395](https://github.com/zkat/npx/commit/370f395)) +* **i18n:** Fix grammar and spelling for de.json (#63) ([b14020f](https://github.com/zkat/npx/commit/b14020f)), closes [#63](https://github.com/zkat/npx/issues/63) +* **i18n:** wording revisions for Brazilian Portuguese (#75) ([b5dc536](https://github.com/zkat/npx/commit/b5dc536)) +* **npm:** path directly to the npm-cli.js script ([d531206](https://github.com/zkat/npx/commit/d531206)) +* **rimraf:** fix rimraf.sync is not a function issue ([d2ecba3](https://github.com/zkat/npx/commit/d2ecba3)) +* **windows:** get npx working well on Windows again (#69) ([6cfb8de](https://github.com/zkat/npx/commit/6cfb8de)), closes [#60](https://github.com/zkat/npx/issues/60) [#58](https://github.com/zkat/npx/issues/58) [#62](https://github.com/zkat/npx/issues/62) + + +### Features + +* **i18n:** add Czech translation (#76) ([8a0b3f6](https://github.com/zkat/npx/commit/8a0b3f6)) +* **i18n:** Add Turkish translation (#73) ([26e5edf](https://github.com/zkat/npx/commit/26e5edf)) +* **i18n:** Added support for Italian language (#71) ([6883e75](https://github.com/zkat/npx/commit/6883e75)) +* **i18n:** Fix Romanian translation (#70) ([fd6bbcf](https://github.com/zkat/npx/commit/fd6bbcf)), closes [#70](https://github.com/zkat/npx/issues/70) +* **node:** add --node-arg support to pass flags to node for script binaries (#77) ([65665bd](https://github.com/zkat/npx/commit/65665bd)) + + + + +## [9.0.7](https://github.com/zkat/npx/compare/v9.0.6...v9.0.7) (2017-07-11) + + +### Bug Fixes + +* **i18n:** Fix some Catalan translations (#59) ([11c8a19](https://github.com/zkat/npx/commit/11c8a19)), closes [#59](https://github.com/zkat/npx/issues/59) + + + + +## [9.0.6](https://github.com/zkat/npx/compare/v9.0.5...v9.0.6) (2017-07-11) + + +### Bug Fixes + +* **auto-fallback:** fix syntax error in bash/zsh auto-fallback ([d8b19db](https://github.com/zkat/npx/commit/d8b19db)) + + + + +## [9.0.5](https://github.com/zkat/npx/compare/v9.0.4...v9.0.5) (2017-07-11) + + +### Bug Fixes + +* **npx:** something went wrong with the 9.0.4 build and bundledeps ([75fc436](https://github.com/zkat/npx/commit/75fc436)) + + + + +## [9.0.4](https://github.com/zkat/npx/compare/v9.0.3...v9.0.4) (2017-07-11) + + +### Bug Fixes + +* **auto-fallback:** prevent infinite loop if npx disappears ([6c24e58](https://github.com/zkat/npx/commit/6c24e58)) +* **bin:** add repository and more detailed author info ([906574e](https://github.com/zkat/npx/commit/906574e)) +* **bin:** pin the npx bin's dependencies ([ae62f7a](https://github.com/zkat/npx/commit/ae62f7a)) +* **build:** make sure changelog and license are copied to bin ([4fbb599](https://github.com/zkat/npx/commit/4fbb599)) +* **deps:** stop bundling deps in libnpx itself ([c3e56e9](https://github.com/zkat/npx/commit/c3e56e9)) +* **errors:** print command not found for packages without valid binaries ([9b24359](https://github.com/zkat/npx/commit/9b24359)) +* **help:** --no-install help text was contradicting itself ([9d96f5e](https://github.com/zkat/npx/commit/9d96f5e)) +* **install:** prevent concurrent npx runs from clobbering each other ([6b35c91](https://github.com/zkat/npx/commit/6b35c91)) +* **npx:** npx npx npx npx npx npx npx npx npx works again ([875d4cd](https://github.com/zkat/npx/commit/875d4cd)) +* **updater:** dependency injection for update-notifier target ([c3027a9](https://github.com/zkat/npx/commit/c3027a9)) +* **updater:** ignore some kinds of update-notifier errors ([7631bbe](https://github.com/zkat/npx/commit/7631bbe)) + + + + +## [9.0.3](https://github.com/zkat/npx/compare/v9.0.2...v9.0.3) (2017-07-08) + + +### Bug Fixes + +* **version:** hand version to yargs directly ([e0b5eeb](https://github.com/zkat/npx/commit/e0b5eeb)) + + + + +## [9.0.2](https://github.com/zkat/npx/compare/v9.0.1...v9.0.2) (2017-07-08) + + +### Bug Fixes + +* **manpage:** fix manpage for real because files syntax is weird ([9145e2a](https://github.com/zkat/npx/commit/9145e2a)) + + + + +## [9.0.1](https://github.com/zkat/npx/compare/v9.0.0...v9.0.1) (2017-07-08) + + +### Bug Fixes + +* **man:** make sure manpage is used in npx bin ([704b94f](https://github.com/zkat/npx/commit/704b94f)) + + + + +# [9.0.0](https://github.com/zkat/npx/compare/v8.1.1...v9.0.0) (2017-07-08) + + +### Features + +* **libnpx:** libify main npx codebase ([643f58e](https://github.com/zkat/npx/commit/643f58e)) +* **npx:** create a new binary for standalone publishing ([da5a3b7](https://github.com/zkat/npx/commit/da5a3b7)) + + +### BREAKING CHANGES + +* **libnpx:** This version of npx can no longer be used as a +standalone binary. It will be available on the registry as `libnpx`, +and a separate project will take over the role of the main `npx` binary. + + + + +## [8.1.1](https://github.com/zkat/npx/compare/v8.1.0...v8.1.1) (2017-07-06) + + +### Bug Fixes + +* **deps:** bump all deps ([6ea24bf](https://github.com/zkat/npx/commit/6ea24bf)) +* **npm:** bump npm to 5.1.0 for a bunch of fixes ([18e4587](https://github.com/zkat/npx/commit/18e4587)) + + + + +# [8.1.0](https://github.com/zkat/npx/compare/v8.0.1...v8.1.0) (2017-06-27) + + +### Bug Fixes + +* **i18n:** minor tweaks to ja.json (#46) ([1ed63c2](https://github.com/zkat/npx/commit/1ed63c2)) + + +### Features + +* **i18n:** Update pt_BR.json (#51) ([d292f22](https://github.com/zkat/npx/commit/d292f22)) + + + + +## [8.0.1](https://github.com/zkat/npx/compare/v8.0.0...v8.0.1) (2017-06-27) + + +### Bug Fixes + +* **npm:** bump npm version for more bugfixes ([30711a8](https://github.com/zkat/npx/commit/30711a8)) +* **npm:** Use --parseable option to work around output quirks ([8cb75a2](https://github.com/zkat/npx/commit/8cb75a2)) + + + + +# [8.0.0](https://github.com/zkat/npx/compare/v7.0.0...v8.0.0) (2017-06-24) + + +### Features + +* **exec:** auto-guess binaries when different from pkg name ([139c434](https://github.com/zkat/npx/commit/139c434)) + + +### BREAKING CHANGES + +* **exec:** `npx ember-cli` and such things will now execute the +binary based on some guesswork, but only when using the shorthand format +for npx execution, with no `-p` option or `-c`. This might cause npx to +unintentionally execute the wrong binary if the package in question has +multiple non-matching binaries, but that should be rare. + + + + +# [7.0.0](https://github.com/zkat/npx/compare/v6.2.0...v7.0.0) (2017-06-24) + + +### Bug Fixes + +* **win32:** improve win32 situation a bit (#50) ([b7ad934](https://github.com/zkat/npx/commit/b7ad934)) + + +### Features + +* **local:** improve the behavior when calling ./local paths (#48) ([2e418d1](https://github.com/zkat/npx/commit/2e418d1)) + + +### BREAKING CHANGES + +* **local:** `npx ./something` will now execute `./something` as a +binary or script instead of trying to install it as npm would. Other behavior +related to local path deps has likewise been changed. See +[#49](https://github.com/zkat/npx/issues/49) for a detailed explanation +of all the various cases and how each of them is handled. + + + + +# [6.2.0](https://github.com/zkat/npx/compare/v6.1.0...v6.2.0) (2017-06-23) + + +### Bug Fixes + +* **child:** iron out a few crinkles and add tests ([b3b5ef6](https://github.com/zkat/npx/commit/b3b5ef6)) +* **execCmd:** only reuse the current process if no shell passed in ([e413cff](https://github.com/zkat/npx/commit/e413cff)) +* **execCmd:** use the module built-in directly ([6f741c2](https://github.com/zkat/npx/commit/6f741c2)) +* **help:** fuck it. just hard-code it ([d5d5085](https://github.com/zkat/npx/commit/d5d5085)) +* **main:** only exec if this is the main module ([9631e2a](https://github.com/zkat/npx/commit/9631e2a)) + + +### Features + +* **i18n:** Update fr.json (#44) ([ea47c4f](https://github.com/zkat/npx/commit/ea47c4f)) +* **i18n:** update the Romanian translation. (#42) ([2ed36b6](https://github.com/zkat/npx/commit/2ed36b6)) + + + + +# [6.1.0](https://github.com/zkat/npx/compare/v6.0.0...v6.1.0) (2017-06-21) + + +### Bug Fixes + +* **deps:** remove unused gauge dep ([aa40a34](https://github.com/zkat/npx/commit/aa40a34)) + + +### Features + +* **i18n:** update ru locale (#41) ([7c84dee](https://github.com/zkat/npx/commit/7c84dee)) +* **i18n:** update zh_CN (#40) ([da4ec67](https://github.com/zkat/npx/commit/da4ec67)) +* **perf:** run node-based commands in the current process ([6efcde4](https://github.com/zkat/npx/commit/6efcde4)) + + + + +# [6.0.0](https://github.com/zkat/npx/compare/v5.4.0...v6.0.0) (2017-06-20) + + +### Bug Fixes + +* **call:** stop parsing -c for commands + fix corner cases ([bd4e538](https://github.com/zkat/npx/commit/bd4e538)) +* **child:** exec does not have the information needed to correctly escape its args ([6714992](https://github.com/zkat/npx/commit/6714992)) +* **guessCmdName:** tests failed because of lazy npa ([53a0119](https://github.com/zkat/npx/commit/53a0119)) +* **i18n:** gender inclusiveness fix for french version (#37) ([04920ae](https://github.com/zkat/npx/commit/04920ae)), closes [#37](https://github.com/zkat/npx/issues/37) +* **i18n:** typo 😇 (#38) ([ede4a53](https://github.com/zkat/npx/commit/ede4a53)) +* **install:** handle JSON parsing failures ([bec2887](https://github.com/zkat/npx/commit/bec2887)) +* **output:** stop printing out Command Failed messages ([873cffe](https://github.com/zkat/npx/commit/873cffe)) +* **parseArgs:** fix booboo in fast path ([d1e5487](https://github.com/zkat/npx/commit/d1e5487)) +* **perf:** fast-path `npx foo` arg parsing ([ba4fe71](https://github.com/zkat/npx/commit/ba4fe71)) +* **perf:** remove bluebird and defer some requires for SPEED ([00fc313](https://github.com/zkat/npx/commit/00fc313)) + + +### Features + +* **i18n:** add Romanian translations. (#34) ([9e98bd0](https://github.com/zkat/npx/commit/9e98bd0)) +* **i18n:** added a few more localizable strings ([779d950](https://github.com/zkat/npx/commit/779d950)) +* **i18n:** updated ca.json ([af7a035](https://github.com/zkat/npx/commit/af7a035)) +* **i18n:** updated es.json ([414644f](https://github.com/zkat/npx/commit/414644f)) +* **i18n:** updated ja.json ([448b082](https://github.com/zkat/npx/commit/448b082)) +* **i18n:** Ze German Translation (#35) ([6f003f5](https://github.com/zkat/npx/commit/6f003f5)) +* **package:** report number of temp packages installed ([5b7fe8d](https://github.com/zkat/npx/commit/5b7fe8d)) +* **perf:** only launch update-notifier when npx installs stuff ([549d413](https://github.com/zkat/npx/commit/549d413)) +* **quiet:** added -q/--quiet to suppress output from npx itself ([16607d9](https://github.com/zkat/npx/commit/16607d9)) + + +### BREAKING CHANGES + +* **call:** `npx -c "foo"` will no longer install `foo`. Use `-p` to specicify packages to install. npx will no longer assume any particular format or escape status for `-c` strings: they will be passed directly, unparsed, and unaltered, to child_process.spawn. + + + + +# [5.4.0](https://github.com/zkat/npx/compare/v5.3.0...v5.4.0) (2017-06-17) + + +### Bug Fixes + +* **i18n:** some corrections for es.json ([4d50b71](https://github.com/zkat/npx/commit/4d50b71)) +* **i18n:** update locale files with bugfixes ([77caf82](https://github.com/zkat/npx/commit/77caf82)) +* **i18n:** Y utility was ignoring falsy entries ([f22a4d0](https://github.com/zkat/npx/commit/f22a4d0)) +* **i18n:** してください -> します ([01671af](https://github.com/zkat/npx/commit/01671af)) + + +### Features + +* **i18n:** add catalan translation ([579efa1](https://github.com/zkat/npx/commit/579efa1)) +* **i18n:** add pt-br translation (#33) ([6142551](https://github.com/zkat/npx/commit/6142551)) +* **i18n:** added largely machine-translated ja.json ([827705f](https://github.com/zkat/npx/commit/827705f)) +* **i18n:** adds russian translation (#32) ([b2619c1](https://github.com/zkat/npx/commit/b2619c1)) + + + + +# [5.3.0](https://github.com/zkat/npx/compare/v5.2.0...v5.3.0) (2017-06-13) + + +### Features + +* **i18n:** add Chinese translation (#31) ([24e1b31](https://github.com/zkat/npx/commit/24e1b31)) + + + + +# [5.2.0](https://github.com/zkat/npx/compare/v5.1.3...v5.2.0) (2017-06-12) + + +### Bug Fixes + +* **i18n:** removing extra spacing in fr.json ([002e2b8](https://github.com/zkat/npx/commit/002e2b8)) + + +### Features + +* **i18n:** add french locale (#29) ([662395b](https://github.com/zkat/npx/commit/662395b)) + + + + +## [5.1.3](https://github.com/zkat/npx/compare/v5.1.2...v5.1.3) (2017-06-12) + + +### Bug Fixes + +* **fallback:** put the Y in the wrong place lol ([d6bf8aa](https://github.com/zkat/npx/commit/d6bf8aa)) + + + + +## [5.1.2](https://github.com/zkat/npx/compare/v5.1.1...v5.1.2) (2017-06-10) + + + + +## [5.1.1](https://github.com/zkat/npx/compare/v5.1.0...v5.1.1) (2017-06-10) + + +### Bug Fixes + +* **i18n:** forgot to add locales to files ([4118d6a](https://github.com/zkat/npx/commit/4118d6a)) + + + + +# [5.1.0](https://github.com/zkat/npx/compare/v5.0.3...v5.1.0) (2017-06-10) + + +### Bug Fixes + +* **exit:** let process exit normally to finish writes ([c50a398](https://github.com/zkat/npx/commit/c50a398)) + + +### Features + +* **i18n:** added es.json ([6cf58b9](https://github.com/zkat/npx/commit/6cf58b9)) +* **i18n:** set up i18n plus baseline en.json locale ([b67bb3a](https://github.com/zkat/npx/commit/b67bb3a)) + + + + +## [5.0.3](https://github.com/zkat/npx/compare/v5.0.2...v5.0.3) (2017-06-09) + + +### Bug Fixes + +* **fallback:** exec is no ([42c1d30](https://github.com/zkat/npx/commit/42c1d30)) + + + + +## [5.0.2](https://github.com/zkat/npx/compare/v5.0.1...v5.0.2) (2017-06-09) + + +### Bug Fixes + +* **fallback:** allow fallback to local anyway ([569cf2c](https://github.com/zkat/npx/commit/569cf2c)) + + + + +## [5.0.1](https://github.com/zkat/npx/compare/v5.0.0...v5.0.1) (2017-06-09) + + + + +# [5.0.0](https://github.com/zkat/npx/compare/v4.0.3...v5.0.0) (2017-06-09) + + +### Features + +* **fallback:** by default, only fall back if you have an @ in the name ([bea08a0](https://github.com/zkat/npx/commit/bea08a0)) + + +### BREAKING CHANGES + +* **fallback:** auto-fallback will no longer fall back unless there was +an @ sign in the command. + + + + +## [4.0.3](https://github.com/zkat/npx/compare/v4.0.2...v4.0.3) (2017-06-04) + + +### Bug Fixes + +* **npm:** use --userconfig when querying for npm cache config (#28) ([21bc3bf](https://github.com/zkat/npx/commit/21bc3bf)) + + + + +## [4.0.2](https://github.com/zkat/npx/compare/v4.0.1...v4.0.2) (2017-06-04) + + +### Bug Fixes + +* **install:** get windows workin (#27) ([9472175](https://github.com/zkat/npx/commit/9472175)) + + + + +## [4.0.1](https://github.com/zkat/npx/compare/v4.0.0...v4.0.1) (2017-06-04) + + +### Bug Fixes + +* **cmd:** make sure to use our own, enriched path ([9c89c2a](https://github.com/zkat/npx/commit/9c89c2a)) +* **error:** join args with a space on Command failed error ([c2f6f18](https://github.com/zkat/npx/commit/c2f6f18)) + + + + +# [4.0.0](https://github.com/zkat/npx/compare/v3.0.0...v4.0.0) (2017-06-03) + + +### Features + +* **call:** -c now loads same env as run-script ([76ae44c](https://github.com/zkat/npx/commit/76ae44c)) +* **npm:** allow configuration of npm binary ([e5d5634](https://github.com/zkat/npx/commit/e5d5634)) +* **npm:** embed npm binary ([a2cae9d](https://github.com/zkat/npx/commit/a2cae9d)) + + +### BREAKING CHANGES + +* **call:** scripts invoked with -c will now have a bunch of +variables added to them that were not there before. +* **npm:** npx will no longer use the system npm -- it embeds its own + + + + +# [3.0.0](https://github.com/zkat/npx/compare/v2.1.0...v3.0.0) (2017-06-03) + + +### Bug Fixes + +* **args:** accept argv as arg and fix minor bugs ([46f10fe](https://github.com/zkat/npx/commit/46f10fe)) +* **deps:** explicitly add mkdirp and rimraf to devDeps ([832c75d](https://github.com/zkat/npx/commit/832c75d)) +* **docs:** misc tweaks to docs ([ed70a7b](https://github.com/zkat/npx/commit/ed70a7b)) +* **exec:** escape binaries and args to cp.exec (#18) ([55d6a11](https://github.com/zkat/npx/commit/55d6a11)) +* **fallback:** shells were sometimes ignored based on $SHELL ([07b7efc](https://github.com/zkat/npx/commit/07b7efc)) +* **get-prefix:** nudge isRootPath ([1ab31eb](https://github.com/zkat/npx/commit/1ab31eb)) +* **help:** correctly enable -h and --help ([adc2f45](https://github.com/zkat/npx/commit/adc2f45)) +* **startup:** delay loading some things to speed up startup ([6b32bf5](https://github.com/zkat/npx/commit/6b32bf5)) + + +### Features + +* **cmd:** do some heuristic guesswork on default command names (#23) ([2404420](https://github.com/zkat/npx/commit/2404420)) +* **ignore:** add --ignore-existing option (#20) ([0866a83](https://github.com/zkat/npx/commit/0866a83)) +* **install:** added --no-install option to prevent install fallbacks ([a5fbdaf](https://github.com/zkat/npx/commit/a5fbdaf)) +* **package:** multiple --package options are now accepted ([f2fa6b3](https://github.com/zkat/npx/commit/f2fa6b3)) +* **save:** remove all save-related functionality (#19) ([ab77f6c](https://github.com/zkat/npx/commit/ab77f6c)) +* **shell:** run -c strings inside a system shell (#22) ([17db461](https://github.com/zkat/npx/commit/17db461)) + + +### BREAKING CHANGES + +* **save:** npx can no longer be used to save packages locally or globally. Use an actual package manager for that, instead. + + + + +# [2.1.0](https://github.com/zkat/npx/compare/v2.0.1...v2.1.0) (2017-06-01) + + +### Features + +* **opts:** add --shell-auto-fallback (#7) ([ac9cb40](https://github.com/zkat/npx/commit/ac9cb40)) + + + + +## [2.0.1](https://github.com/zkat/npx/compare/v2.0.0...v2.0.1) (2017-05-31) + + +### Bug Fixes + +* **exec:** use command lookup joined with current PATH ([d9175e8](https://github.com/zkat/npx/commit/d9175e8)) + + + + +# [2.0.0](https://github.com/zkat/npx/compare/v1.1.1...v2.0.0) (2017-05-31) + + +### Bug Fixes + +* **npm:** manually look up npm path for Windows compat ([0fe8fbf](https://github.com/zkat/npx/commit/0fe8fbf)) + + +### Features + +* **commands:** -p and [@version](https://github.com/version) now trigger installs ([9668c83](https://github.com/zkat/npx/commit/9668c83)) + + +### BREAKING CHANGES + +* **commands:** If a command has an explicit --package option, or if the command has an @version part, any version of the command in $PATH will be ignored and a regular install will be executed. + + + + +## [1.1.1](https://github.com/zkat/npx/compare/v1.1.0...v1.1.1) (2017-05-30) + + +### Bug Fixes + +* **docs:** make sure man page gets installed ([2aadc16](https://github.com/zkat/npx/commit/2aadc16)) + + + + +# [1.1.0](https://github.com/zkat/npx/compare/v1.0.2...v1.1.0) (2017-05-30) + + +### Bug Fixes + +* **help:** update usage string for help ([0747cff](https://github.com/zkat/npx/commit/0747cff)) +* **main:** exit if no package was parsed ([cdb579d](https://github.com/zkat/npx/commit/cdb579d)) +* **opts:** allow -- to prevent further parsing ([db7a0e4](https://github.com/zkat/npx/commit/db7a0e4)) + + +### Features + +* **updates:** added update-notifier ([8dc91d4](https://github.com/zkat/npx/commit/8dc91d4)) + + + + +## [1.0.2](https://github.com/zkat/npx/compare/v1.0.1...v1.0.2) (2017-05-30) + + +### Bug Fixes + +* **pkg:** bundle deps to guarantee global install precision ([3e21217](https://github.com/zkat/npx/commit/3e21217)) + + + + +## [1.0.1](https://github.com/zkat/npx/compare/v1.0.0...v1.0.1) (2017-05-30) + + +### Bug Fixes + +* **build:** add dummy test file to let things build ([6199eb6](https://github.com/zkat/npx/commit/6199eb6)) +* **docs:** fix arg documentation in readme/manpage ([d1cf44c](https://github.com/zkat/npx/commit/d1cf44c)) +* **opts:** add --version/-v ([2633a0e](https://github.com/zkat/npx/commit/2633a0e)) + + + + +# 1.0.0 (2017-05-30) + + +### Features + +* **npx:** initial working implementation ([a83a67d](https://github.com/zkat/npx/commit/a83a67d)) diff --git a/deps/npm/node_modules/libnpx/LICENSE.md b/deps/npm/node_modules/libnpx/LICENSE.md new file mode 100644 index 00000000000000..c05cb09586fccd --- /dev/null +++ b/deps/npm/node_modules/libnpx/LICENSE.md @@ -0,0 +1,3 @@ +To the extent possible under law, maintainers for this project have waived all copyright and related or neighboring rights to this project. + +For more information on this waiver, see: https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/deps/npm/node_modules/libnpx/README.md b/deps/npm/node_modules/libnpx/README.md new file mode 100644 index 00000000000000..436bdd02402466 --- /dev/null +++ b/deps/npm/node_modules/libnpx/README.md @@ -0,0 +1,159 @@ +[![npm](https://img.shields.io/npm/v/npx.svg)](https://npm.im/npx) [![license](https://img.shields.io/npm/l/npx.svg)](https://npm.im/npx) [![Travis](https://img.shields.io/travis/zkat/npx.svg)](https://travis-ci.org/zkat/npx) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/npx?svg=true)](https://ci.appveyor.com/project/zkat/npx) [![Coverage Status](https://coveralls.io/repos/github/zkat/npx/badge.svg?branch=latest)](https://coveralls.io/github/zkat/npx?branch=latest) + +# npx(1) -- execute npm package binaries + +## SYNOPSIS + +`npx [options] [@version] [command-arg]...` + +`npx [options] [-p|--package ]... [command-arg]...` + +`npx [options] -c ''` + +`npx --shell-auto-fallback [shell]` + +## INSTALL + +`npm install -g npx` + +## DESCRIPTION + +Executes `` either from a local `node_modules/.bin`, or from a central cache, installing any packages needed in order for `` to run. + +By default, `npx` will check whether `` exists in `$PATH`, or in the local project binaries, and execute that. If `` is not found, it will be installed prior to execution. + +Unless a `--package` option is specified, `npx` will try to guess the name of the binary to invoke depending on the specifier provided. All package specifiers understood by `npm` may be used with `npx`, including git specifiers, remote tarballs, local directories, or scoped packages. + +If a full specifier is included, or if `--package` is used, npx will always use a freshly-installed, temporary version of the package. This can also be forced with the `--ignore-existing` flag. + +* `-p, --package ` - define the package to be installed. This defaults to the value of ``. This is only needed for packages with multiple binaries if you want to call one of the other executables, or where the binary name does not match the package name. If this option is provided `` will be executed as-is, without interpreting `@version` if it's there. Multiple `--package` options may be provided, and all the packages specified will be installed. + +* `--no-install` - If passed to `npx`, it will only try to run `` if it already exists in the current path or in `$prefix/node_modules/.bin`. It won't try to install missing commands. + +* `--cache ` - set the location of the npm cache. Defaults to npm's own cache settings. + +* `--userconfig ` - path to the user configuration file to pass to npm. Defaults to whatever npm's current default is. + +* `-c ` - Execute `` inside an `npm run-script`-like shell environment, with all the usual environment variables available. Only the first item in `` will be automatically used as ``. Any others _must_ use `-p`. + +* `--shell ` - The shell to invoke the command with, if any. + +* `--shell-auto-fallback []` - Generates shell code to override your shell's "command not found" handler with one that calls `npx`. Tries to figure out your shell, or you can pass its name (either `bash`, `fish`, or `zsh`) as an option. See below for how to install. + +* `--ignore-existing` - If this flag is set, npx will not look in `$PATH`, or in the current package's `node_modules/.bin` for an existing version before deciding whether to install. Binaries in those paths will still be available for execution, but will be shadowed by any packages requested by this install. + +* `-q, --quiet` - Suppressed any output from npx itself (progress bars, error messages, install reports). Subcommand output itself will not be silenced. + +* `-n, --node-arg` - Extra node argument to supply to node when binary is a node script. You can supply this option multiple times to add more arguments. + +* `-v, --version` - Show the current npx version. + +## EXAMPLES + +### Running a project-local bin + +``` +$ npm i -D webpack +$ npx webpack ... +``` + +### One-off invocation without local installation + +``` +$ npm rm webpack +$ npx webpack -- ... +$ cat package.json +...webpack not in "devDependencies"... +``` + +### Invoking a command from a github repository + +``` +$ npx github:piuccio/cowsay +...or... +$ npx git+ssh://my.hosted.git:cowsay.git#semver:^1 +...etc... +``` + +### Execute a full shell command using one npx call w/ multiple packages + +``` +$ npx -p lolcatjs -p cowsay -c \ + 'echo "$npm_package_name@$npm_package_version" | cowsay | lolcatjs' +... + _____ +< your-cool-package@1.2.3 > + ----- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || +``` + +### Run node binary with --inspect + +``` +$ npx --node-arg=--inspect cowsay +Debugger listening on ws://127.0.0.1:9229/.... +``` + +## SHELL AUTO FALLBACK + +You can configure `npx` to run as your default fallback command when you type something in the command line with an `@` but the command is not found. This includes installing packages that were not found in the local prefix either. + +For example: + +``` +$ npm@4 --version +(stderr) npm@4 not found. Trying with npx... +4.6.1 +$ asdfasdfasf +zsh: command not found: asfdasdfasdf +``` + +Currently, `zsh`, `bash` (>= 4), and `fish` are supported. You can access these completion scripts using `npx --shell-auto-fallback `. + +To install permanently, add the relevant line below to your `~/.bashrc`, `~/.zshrc`, `~/.config/fish/config.fish`, or as needed. To install just for the shell session, simply run the line. + +You can optionally pass through `--no-install` when generating the fallback to prevent it from installing packages if the command is missing. + +### For bash@>=4: + +``` +$ source <(npx --shell-auto-fallback bash) +``` + +### For zsh: + +``` +$ source <(npx --shell-auto-fallback zsh) +``` + +### For fish: + +``` +$ source (npx --shell-auto-fallback fish | psub) +``` + +## ACKNOWLEDGEMENTS + +Huge thanks to [Kwyn Meagher](https://blog.kwyn.io) for generously donating the package name in the main npm registry. Previously `npx` was used for a Tessel board Neopixels library, which can now be found under [`npx-tessel`](https://npm.im/npx-tessel). + +## AUTHOR + +Written by [Kat Marchan](https://github.com/zkat). + +## REPORTING BUGS + +Please file any relevant issues [on Github.](https://github.com/zkat/npx) + +## LICENSE + +This work is released by its authors into the public domain under CC0-1.0. See `LICENSE.md` for details. + +## SEE ALSO + +* `npm(1)` +* `npm-run-script(1)` +* `npm-config(7)` diff --git a/deps/npm/node_modules/libnpx/auto-fallback.js b/deps/npm/node_modules/libnpx/auto-fallback.js new file mode 100644 index 00000000000000..75fb60f4c2cbe8 --- /dev/null +++ b/deps/npm/node_modules/libnpx/auto-fallback.js @@ -0,0 +1,69 @@ +'use strict' + +const Y = require('./y.js') + +function mkPosix (opts) { + return ` +command_not_found_${opts.isBash ? 'handle' : 'handler'}() { + # Do not run within a pipe + if test ! -t 1; then + >&2 echo "${Y`command not found: ${'$1'}`}" + return 127 + fi + if which npx > /dev/null; then + echo "${Y`${'$1'} not found. Trying with npx...`}" >&2 + else + return 127 + fi + if ! [[ $1 =~ @ ]]; then + npx --no-install "$@" + else + npx "$@" + fi + return $? +}` +} + +function mkFish (opts) { + return ` +function __fish_command_not_found_on_interactive --on-event fish_prompt + functions --erase __fish_command_not_found_handler + functions --erase __fish_command_not_found_setup + + function __fish_command_not_found_handler --on-event fish_command_not_found + if which npx > /dev/null + echo "${Y`${'$argv[1]'} not found. Trying with npx...`}" >&2 + else + return 127 + end + if string match -q -r @ $argv[1] + npx $argv + else + npx --no-install $argv + end + end + + functions --erase __fish_command_not_found_on_interactive +end` +} + +module.exports = autoFallback +function autoFallback (shell, fromEnv, opts) { + if (shell.includes('bash')) { + return mkPosix({isBash: true, install: opts.install}) + } + + if (shell.includes('zsh')) { + return mkPosix({isBash: false, install: opts.install}) + } + + if (shell.includes('fish')) { + return mkFish(opts) + } + + if (fromEnv) { + return autoFallback(fromEnv, null, opts) + } + + console.error(Y`Only Bash, Zsh, and Fish shells are supported :(`) +} diff --git a/deps/npm/node_modules/libnpx/child.js b/deps/npm/node_modules/libnpx/child.js new file mode 100644 index 00000000000000..1b7c4c6215bfe6 --- /dev/null +++ b/deps/npm/node_modules/libnpx/child.js @@ -0,0 +1,86 @@ +'use strict' + +const cp = require('child_process') +const path = require('path') + +module.exports.runCommand = runCommand +function runCommand (command, opts) { + const cmd = opts.call || command || opts.command + const copts = (opts.call ? [] : opts.cmdOpts) || [] + return spawn(cmd, copts, { + shell: opts.shell || !!opts.call, + stdio: opts.stdio || 'inherit' + }).catch(err => { + if (err.code === 'ENOENT') { + err = new Error( + `npx: ${ + require('./y.js')`command not found: ${path.basename(cmd)}` + }` + ) + err.exitCode = 127 + } else { + err.message = require('./y.js')`Command failed: ${cmd} ${err.message}` + } + throw err + }) +} + +module.exports.spawn = spawn +function spawn (cmd, args, opts) { + opts = opts || {} + opts.shell = opts.shell || process.platform === 'win32' + return new Promise((resolve, reject) => { + const child = cp.spawn(cmd, args, opts) + let stdout = '' + let stderr = '' + child.stdout && child.stdout.on('data', d => { stdout += d }) + child.stderr && child.stderr.on('data', d => { stderr += d }) + child.on('error', reject) + child.on('close', code => { + if (code) { + const err = new Error( + require('./y.js')`Command failed: ${cmd} ${args.join(' ')}` + ) + err.isOperational = true + err.stderr = stderr + err.exitCode = code + reject(err) + } else { + resolve({code, stdout, stderr}) + } + }) + }) +} + +module.exports.exec = exec +function exec (cmd, args, opts) { + opts = opts || {} + return new Promise((resolve, reject) => { + cp.exec(`${escapeArg(cmd, true)} ${ + args.join(' ') + }`, opts, (err, stdout) => { + if (err) { + if (typeof err.code === 'number') { + err.exitCode = err.code + } + reject(err) + } else { + resolve(stdout) + } + }) + }) +} + +module.exports.escapeArg = escapeArg +function escapeArg (str, asPath) { + return process.platform === 'win32' && asPath + ? path.normalize(str) + .split(/\\/) + .map(s => s.match(/\s+/) ? `"${s}"` : s) + .join('\\') + : process.platform === 'win32' + ? `"${str}"` + : str.match(/[^-_.~/\w]/) + ? `'${str.replace(/'/g, "'\"'\"'")}'` + : str +} diff --git a/deps/npm/node_modules/libnpx/get-prefix.js b/deps/npm/node_modules/libnpx/get-prefix.js new file mode 100644 index 00000000000000..71bedffc580c88 --- /dev/null +++ b/deps/npm/node_modules/libnpx/get-prefix.js @@ -0,0 +1,54 @@ +'use strict' + +const promisify = require('./util.js').promisify + +const path = require('path') +const statAsync = promisify(require('fs').stat) + +module.exports = getPrefix +function getPrefix (current, root) { + if (!root) { + const original = root = path.resolve(current) + while (path.basename(root) === 'node_modules') { + root = path.dirname(root) + } + if (original !== root) { + return Promise.resolve(root) + } else { + return getPrefix(root, root) + } + } + if (isRootPath(current, process.platform)) { + return Promise.resolve(root) + } else { + return Promise.all([ + fileExists(path.join(current, 'package.json')), + fileExists(path.join(current, 'node_modules')) + ]).then(args => { + const hasPkg = args[0] + const hasModules = args[1] + if (hasPkg || hasModules) { + return current + } else { + const parent = path.dirname(current) + return getPrefix(parent, root) + } + }) + } +} + +module.exports._fileExists = fileExists +function fileExists (f) { + return statAsync(f).catch(err => { + if (err.code !== 'ENOENT') { + throw err + } + }) +} + +module.exports._isRootPath = isRootPath +function isRootPath (p, platform) { + return platform === 'win32' + ? p.match(/^[a-z]+:[/\\]?$/i) + : p === '/' +} diff --git a/deps/npm/node_modules/libnpx/index.js b/deps/npm/node_modules/libnpx/index.js new file mode 100644 index 00000000000000..7c0bd6df851a26 --- /dev/null +++ b/deps/npm/node_modules/libnpx/index.js @@ -0,0 +1,329 @@ +'use strict' + +const Buffer = require('safe-buffer').Buffer +const promisify = require('./util.js').promisify + +const child = require('./child') +const fs = require('fs') +const parseArgs = require('./parse-args.js') +const path = require('path') +const which = promisify(require('which')) + +const PATH_SEP = process.platform === 'win32' ? ';' : ':' + +module.exports = npx +module.exports.parseArgs = parseArgs +function npx (argv) { + const shell = argv['shell-auto-fallback'] + if (shell || shell === '') { + const fallback = require('./auto-fallback.js')( + shell, process.env.SHELL, argv + ) + if (fallback) { + return console.log(fallback) + } else { + process.exitCode = 1 + return + } + } + + if (!argv.call && (!argv.command || !argv.package)) { + !argv.q && console.error(Y()`\nERROR: You must supply a command.\n`) + !argv.q && parseArgs.showHelp() + process.exitCode = 1 + return + } + + const startTime = Date.now() + + // First, we look to see if we're inside an npm project, and grab its + // bin path. This is exactly the same as running `$ npm bin`. + return localBinPath(process.cwd()).then(local => { + if (local) { + // Local project paths take priority. Go ahead and prepend it. + process.env.PATH = `${local}${PATH_SEP}${process.env.PATH}` + } + return Promise.all([ + // Figuring out if a command exists, early on, lets us maybe + // short-circuit a few things later. This bit here primarily benefits + // calls like `$ npx foo`, where we might just be trying to invoke + // a single command and use whatever is already in the path. + argv.command && getExistingPath(argv.command, argv), + // The `-c` flag involves special behavior when used: in this case, + // we take a bit of extra time to pick up npm's full lifecycle script + // environment (so you can use `$npm_package_xxxxx` and company). + // Without that flag, we just use the current env. + argv.call && local && getEnv(argv) + ]).then(args => { + const existing = args[0] + const newEnv = args[1] + if (newEnv) { + // NOTE - we don't need to manipulate PATH further here, because + // npm has already done so. And even added the node-gyp path! + Object.assign(process.env, newEnv) + } + if ((!existing && !argv.call) || argv.packageRequested) { + // We only fire off the updateNotifier if we're installing things + if (argv.npxPkg) { + try { + require('update-notifier')({ + pkg: require(argv.npxPkg) + }).notify() + } catch (e) {} + } + // Some npm packages need to be installed. Let's install them! + return ensurePackages(argv.package, argv).then(results => { + if (results && results.added && results.updated && !argv.q) { + console.error(Y()`npx: installed ${ + results.added.length + results.updated.length + } in ${(Date.now() - startTime) / 1000}s`) + } + if ( + argv.command && + !existing && + !argv.packageRequested && + argv.package.length === 1 + ) { + return promisify(fs.readdir)(results.bin).then(bins => { + const cmd = new RegExp(`^${argv.command}(?:\\.cmd)?$`, 'i') + const matching = bins.find(b => b.match(cmd)) + return path.resolve(results.bin, bins[matching] || bins[0]) + }, err => { + if (err.code === 'ENOENT') { + throw new Error(Y()`command not found: ${argv.command}`) + } else { + throw err + } + }) + } else { + return existing + } + }) + } else { + // We can skip any extra installation, 'cause everything exists. + return existing + } + }).then(existing => { + return execCommand(existing, argv) + }).catch(err => { + !argv.q && console.error(err.message) + process.exitCode = err.exitCode || 1 + }) + }) +} + +module.exports._localBinPath = localBinPath +function localBinPath (cwd) { + return require('./get-prefix.js')(cwd).then(prefix => { + const pkgjson = path.join(prefix, 'package.json') + return promisify(fs.stat)(pkgjson).then( + () => path.join(prefix, 'node_modules', '.bin'), + err => { if (err.code !== 'ENOENT') throw err } + ) + }) +} + +module.exports._getEnv = getEnv +function getEnv (opts) { + const args = ['run', 'env', '--parseable'] + return which(opts.npm).catch(() => { + args.unshift(opts.npm) + return process.argv[0] + }).then(npmPath => { + return child.exec(npmPath, args) + }).then(require('dotenv').parse) +} + +module.exports._ensurePackages = ensurePackages +function ensurePackages (specs, opts) { + return ( + opts.cache ? Promise.resolve(opts.cache) : getNpmCache(opts) + ).then(cache => { + const prefix = path.join(cache, '_npx', process.pid.toString()) + const bins = process.platform === 'win32' + ? prefix + : path.join(prefix, 'bin') + const rimraf = require('rimraf') + process.on('exit', () => rimraf.sync(prefix)) + return promisify(rimraf)(bins).then(() => { + return installPackages(specs, prefix, opts) + }).then(info => { + // This will make temp bins _higher priority_ than even local bins. + // This is intentional, since npx assumes that if you went through + // the trouble of doing `-p`, you're rather have that one. Right? ;) + process.env.PATH = `${bins}${PATH_SEP}${process.env.PATH}` + if (!info) { info = {} } + info.prefix = prefix + info.bin = bins + return info + }) + }) +} + +module.exports._getExistingPath = getExistingPath +function getExistingPath (command, opts) { + if (opts.isLocal) { + return Promise.resolve(command) + } else if ( + opts.cmdHadVersion || opts.packageRequested || opts.ignoreExisting + ) { + return Promise.resolve(false) + } else { + return which(command).catch(err => { + if (err.code === 'ENOENT') { + if (opts.install === false) { + err.exitCode = 127 + throw err + } + } else { + throw err + } + }) + } +} + +module.exports._getNpmCache = getNpmCache +function getNpmCache (opts) { + const args = ['config', 'get', 'cache', '--parseable'] + if (opts.userconfig) { + args.push('--userconfig', child.escapeArg(opts.userconfig, true)) + } + return which(opts.npm).catch(() => { + args.unshift(opts.npm) + return process.argv[0] + }).then(npmPath => { + return child.exec(npmPath, args) + }).then(cache => cache.trim()) +} + +module.exports._buildArgs = buildArgs +function buildArgs (specs, prefix, opts) { + const args = ['install'].concat(specs) + args.push('--global', '--prefix', prefix) + if (opts.cache) args.push('--cache', opts.cache) + if (opts.userconfig) args.push('--userconfig', opts.userconfig) + args.push('--loglevel', 'error', '--json') + + return args +} + +module.exports._installPackages = installPackages +function installPackages (specs, prefix, opts) { + const args = buildArgs(specs, prefix, opts) + return which(opts.npm).catch(() => { + args.unshift(opts.npm) + return process.argv[0] + }).then(npmPath => { + return child.escapeArg(npmPath, true) + }).then(npmPath => { + return child.spawn(npmPath, args, { + stdio: [0, 'pipe', opts.q ? 'ignore' : 2] + }).then(deets => { + try { + return deets.stdout ? JSON.parse(deets.stdout) : null + } catch (e) { } + }, err => { + if (err.exitCode) { + err.message = Y()`Install for ${specs} failed with code ${err.exitCode}` + } + throw err + }) + }) +} + +module.exports._execCommand = execCommand +function execCommand (_existing, argv) { + return findNodeScript(_existing, argv).then(existing => { + if (existing && !argv.nodeArg && !argv.shell && existing !== process.argv[1]) { + const Module = require('module') + // let it take over the process. This means we can skip node startup! + if (!argv.noYargs) { + // blow away built-up yargs crud + require('yargs').reset() + } + process.argv = [ + process.argv[0], // Current node binary + existing // node script path. `runMain()` will set this as the new main + ].concat(argv.cmdOpts) // options for the cmd itself + Module.runMain() // ✨MAGIC✨. Sorry-not-sorry + } else if (!existing && argv.nodeArg && argv.nodeArg.length) { + throw new Error(Y()`ERROR: --node-arg/-n can only be used on packages with node scripts.`) + } else { + let cmd = existing + let opts = argv + if (existing && argv.nodeArg && argv.nodeArg.length) { + // If we know we're running a run script and we got a --node-arg, + // we need to fudge things a bit to get them working right. + let nargs = argv.nodeArg + if (typeof nargs === 'string') { + nargs = [nargs] + } + // It's valid for a single arg to be a string of multiple + // space-separated node args. + // Example: `$ npx -n '--inspect --harmony --debug' ...` + nargs = nargs.reduce((acc, arg) => { + return acc.concat(arg.split(/\s+/)) + }, []) + cmd = process.argv[0] + opts = Object.assign({}, argv, { + cmdOpts: nargs.concat([existing], argv.cmdOpts || []) + }) + } + return child.runCommand(cmd, opts).catch(err => { + if (err.isOperational && err.exitCode) { + // At this point, we want to treat errors from the child as if + // we were just running the command. That means no extra msg logging + process.exitCode = err.exitCode + } else { + // But if it's not just a regular child-level error, blow up normally + throw err + } + }) + } + }) +} + +module.exports._findNodeScript = findNodeScript +function findNodeScript (existing, opts) { + if (!existing) { + return Promise.resolve(false) + } else { + return promisify(fs.stat)(existing).then(stat => { + if (opts && opts.isLocal && path.extname(existing) === '.js') { + return existing + } else if (opts && opts.isLocal && stat.isDirectory()) { + // npx will execute the directory itself + try { + const pkg = require(path.resolve(existing, 'package.json')) + const target = path.resolve(existing, pkg.bin || pkg.main || 'index.js') + return findNodeScript(target, opts).then(script => { + if (script) { + return script + } else { + throw new Error(Y()`command not found: ${target}`) + } + }) + } catch (e) { + throw new Error(Y()`command not found: ${existing}`) + } + } else if (process.platform !== 'win32') { + const line = '#!/usr/bin/env node\n' + const bytecount = line.length + const buf = Buffer.alloc(bytecount) + return promisify(fs.open)(existing, 'r').then(fd => { + return promisify(fs.read)(fd, buf, 0, bytecount, 0).then(() => { + return promisify(fs.close)(fd) + }, err => { + return promisify(fs.close)(fd).then(() => { throw err }) + }) + }).then(() => { + return buf.toString('utf8') === line && existing + }) + } + }) + } +} + +function Y () { + return require('./y.js') +} diff --git a/deps/npm/node_modules/libnpx/libnpx.1 b/deps/npm/node_modules/libnpx/libnpx.1 new file mode 100644 index 00000000000000..ee37777ca10c2c --- /dev/null +++ b/deps/npm/node_modules/libnpx/libnpx.1 @@ -0,0 +1,167 @@ +.TH "NPX" "1" "July 2017" "libnpx@9.1.0" "User Commands" +.SH "NAME" +\fBnpx\fR \- execute npm package binaries +.SH SYNOPSIS +.P +\fBnpx [options] [@version] [command\-arg]\.\.\.\fP +.P +\fBnpx [options] [\-p|\-\-package ]\.\.\. [command\-arg]\.\.\.\fP +.P +\fBnpx [options] \-c ''\fP +.P +\fBnpx \-\-shell\-auto\-fallback [shell]\fP +.SH INSTALL +.P +\fBnpm install \-g npx\fP +.SH DESCRIPTION +.P +Executes \fB\fP either from a local \fBnode_modules/\.bin\fP, or from a central cache, installing any packages needed in order for \fB\fP to run\. +.P +By default, \fBnpx\fP will check whether \fB\fP exists in \fB$PATH\fP, or in the local project binaries, and execute that\. If \fB\fP is not found, it will be installed prior to execution\. +.P +Unless a \fB\-\-package\fP option is specified, \fBnpx\fP will try to guess the name of the binary to invoke depending on the specifier provided\. All package specifiers understood by \fBnpm\fP may be used with \fBnpx\fP, including git specifiers, remote tarballs, local directories, or scoped packages\. +.P +If a full specifier is included, or if \fB\-\-package\fP is used, npx will always use a freshly\-installed, temporary version of the package\. This can also be forced with the \fB\-\-ignore\-existing\fP flag\. +.RS 0 +.IP \(bu 2 +\fB\-p, \-\-package \fP \- define the package to be installed\. This defaults to the value of \fB\fP\|\. This is only needed for packages with multiple binaries if you want to call one of the other executables, or where the binary name does not match the package name\. If this option is provided \fB\fP will be executed as\-is, without interpreting \fB@version\fP if it's there\. Multiple \fB\-\-package\fP options may be provided, and all the packages specified will be installed\. +.IP \(bu 2 +\fB\-\-no\-install\fP \- If passed to \fBnpx\fP, it will only try to run \fB\fP if it already exists in the current path or in \fB$prefix/node_modules/\.bin\fP\|\. It won't try to install missing commands\. +.IP \(bu 2 +\fB\-\-cache \fP \- set the location of the npm cache\. Defaults to npm's own cache settings\. +.IP \(bu 2 +\fB\-\-userconfig \fP \- path to the user configuration file to pass to npm\. Defaults to whatever npm's current default is\. +.IP \(bu 2 +\fB\-c \fP \- Execute \fB\fP inside an \fBnpm run\-script\fP\-like shell environment, with all the usual environment variables available\. Only the first item in \fB\fP will be automatically used as \fB\fP\|\. Any others \fImust\fR use \fB\-p\fP\|\. +.IP \(bu 2 +\fB\-\-shell \fP \- The shell to invoke the command with, if any\. +.IP \(bu 2 +\fB\-\-shell\-auto\-fallback []\fP \- Generates shell code to override your shell's "command not found" handler with one that calls \fBnpx\fP\|\. Tries to figure out your shell, or you can pass its name (either \fBbash\fP, \fBfish\fP, or \fBzsh\fP) as an option\. See below for how to install\. +.IP \(bu 2 +\fB\-\-ignore\-existing\fP \- If this flag is set, npx will not look in \fB$PATH\fP, or in the current package's \fBnode_modules/\.bin\fP for an existing version before deciding whether to install\. Binaries in those paths will still be available for execution, but will be shadowed by any packages requested by this install\. +.IP \(bu 2 +\fB\-q, \-\-quiet\fP \- Suppressed any output from npx itself (progress bars, error messages, install reports)\. Subcommand output itself will not be silenced\. +.IP \(bu 2 +\fB\-n, \-\-node\-arg\fP \- Extra node argument to supply to node when binary is a node script\. You can supply this option multiple times to add more arguments\. +.IP \(bu 2 +\fB\-v, \-\-version\fP \- Show the current npx version\. + +.RE +.SH EXAMPLES +.SS Running a project\-local bin +.P +.RS 2 +.nf +$ npm i \-D webpack +$ npx webpack \.\.\. +.fi +.RE +.SS One\-off invocation without local installation +.P +.RS 2 +.nf +$ npm rm webpack +$ npx webpack \-\- \.\.\. +$ cat package\.json +\|\.\.\.webpack not in "devDependencies"\.\.\. +.fi +.RE +.SS Invoking a command from a github repository +.P +.RS 2 +.nf +$ npx github:piuccio/cowsay +\|\.\.\.or\.\.\. +$ npx git+ssh://my\.hosted\.git:cowsay\.git#semver:^1 +\|\.\.\.etc\.\.\. +.fi +.RE +.SS Execute a full shell command using one npx call w/ multiple packages +.P +.RS 2 +.nf +$ npx \-p lolcatjs \-p cowsay \-c \\ + 'echo "$npm_package_name@$npm_package_version" | cowsay | lolcatjs' +\|\.\.\. + _____ +< your\-cool\-package@1\.2\.3 > + \-\-\-\-\- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||\-\-\-\-w | + || || +.fi +.RE +.SS Run node binary with \-\-inspect +.P +.RS 2 +.nf +$ npx \-\-node\-arg=\-\-inspect cowsay +Debugger listening on ws://127\.0\.0\.1:9229/\.\.\.\. +.fi +.RE +.SH SHELL AUTO FALLBACK +.P +You can configure \fBnpx\fP to run as your default fallback command when you type something in the command line with an \fB@\fP but the command is not found\. This includes installing packages that were not found in the local prefix either\. +.P +For example: +.P +.RS 2 +.nf +$ npm@4 \-\-version +(stderr) npm@4 not found\. Trying with npx\.\.\. +4\.6\.1 +$ asdfasdfasf +zsh: command not found: asfdasdfasdf +.fi +.RE +.P +Currently, \fBzsh\fP, \fBbash\fP (>= 4), and \fBfish\fP are supported\. You can access these completion scripts using \fBnpx \-\-shell\-auto\-fallback \fP\|\. +.P +To install permanently, add the relevant line below to your \fB~/\.bashrc\fP, \fB~/\.zshrc\fP, \fB~/\.config/fish/config\.fish\fP, or as needed\. To install just for the shell session, simply run the line\. +.P +You can optionally pass through \fB\-\-no\-install\fP when generating the fallback to prevent it from installing packages if the command is missing\. +.SS For bash@>=4: +.P +.RS 2 +.nf +$ source <(npx \-\-shell\-auto\-fallback bash) +.fi +.RE +.SS For zsh: +.P +.RS 2 +.nf +$ source <(npx \-\-shell\-auto\-fallback zsh) +.fi +.RE +.SS For fish: +.P +.RS 2 +.nf +$ source (npx \-\-shell\-auto\-fallback fish | psub) +.fi +.RE +.SH ACKNOWLEDGEMENTS +.P +Huge thanks to Kwyn Meagher \fIhttps://blog\.kwyn\.io\fR for generously donating the package name in the main npm registry\. Previously \fBnpx\fP was used for a Tessel board Neopixels library, which can now be found under \fBnpx\-tessel\fP \fIhttps://npm\.im/npx\-tessel\fR\|\. +.SH AUTHOR +.P +Written by Kat Marchan \fIhttps://github\.com/zkat\fR\|\. +.SH REPORTING BUGS +.P +Please file any relevant issues on Github\. \fIhttps://github\.com/zkat/npx\fR +.SH LICENSE +.P +This work is released by its authors into the public domain under CC0\-1\.0\. See \fBLICENSE\.md\fP for details\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +\fBnpm(1)\fP +.IP \(bu 2 +\fBnpm\-run\-script(1)\fP +.IP \(bu 2 +\fBnpm\-config(7)\fP + +.RE diff --git a/deps/npm/node_modules/libnpx/locales/ca.json b/deps/npm/node_modules/libnpx/locales/ca.json new file mode 100644 index 00000000000000..d9faf1c08b0133 --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/ca.json @@ -0,0 +1,28 @@ +{ + "Execute binaries from npm packages.\n%s": "Executa comandes de paquets de npm.\n%s", + "Package to be installed.": "Paquet per a instal·lar.", + "Location of the npm cache.": "Ruta de la memòria cau de npm.", + "Skip installation if a package is missing.": "Salta el pas d'instal·lació si el paquet no està present.", + "Path to user npmrc.": "Ruta al npmrc de l'usuari.", + "Execute string as if inside `npm run-script`.": "Executa l'argument com si estigués dins de `npm run-script`.", + "Shell to execute the command with, if any.": "Shell amb el qual s'executarà la comanda, si hi ha algun.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Genera codi de shell per utilizar npx com el replegament quan la comanda no existeix.", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignora comandaments en $PATH, o en el projecte local. Això obliga a npx a fer una instal·lació temporal i usar la versió més recent de la comanda.", + "npm binary to use for internal operations.": "Comando d'npm que es farà servir per a operacions internes de npx.", + "For the full documentation, see the manual page for npx(1).": "Per documentació completa, vegeu la pàgina del manual npx(1).", + "Unable to guess a binary name from %s. Please use --package.": "No s'ha pogut endevinar el nom de la comanda usant %s. Si us plau utilitza --package.", + "\nERROR: You must supply a command.\n": "\nERROR: Has proveir una comanda.\n", + "Command failed: %s %s": "La comanda va fracasar: %s %s", + "Install for %s failed with code %s": "instal·lació de %s fracassar amb codi %s", + "%s not found. Trying with npx...": "%s no existeix. Provant-ho amb npx...", + "command not found: %s": "comanda no existeix: %s", + "options": "opcions", + "command": "comanda", + "version": "versió", + "command-arg": "argument-de-comanda", + "command-string": "text-de-comanda", + "shell": "shell", + "package": "paquet", + "npx: installed %s in %ss": "npx: instal·lat %s en %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Suprimir la sortida d' npx. Les sub-comandes no es veuran afectades." +} diff --git a/deps/npm/node_modules/libnpx/locales/cs.json b/deps/npm/node_modules/libnpx/locales/cs.json new file mode 100644 index 00000000000000..c3ecc402cf916b --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/cs.json @@ -0,0 +1,28 @@ +{ + "Execute binaries from npm packages.\n%s": "Spouštění skriptů z npm balíčků.\n%s", + "Package to be installed.": "Balíček k instalaci.", + "Location of the npm cache.": "Umístění npm keše.", + "Skip installation if a package is missing.": "Neinstalovat chybějící balíčky.", + "Path to user npmrc.": "Cesta k uživatelskému npmrc souboru.", + "Execute string as if inside `npm run-script`.": "Příkaz, který se spustí jakoby uvnitř `npm run-script`.", + "Shell to execute the command with, if any.": "Shell ke spuštění příkazu, pokud je třeba.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Vygenerovat shell kód použitelný jako \"command not found\" fallback.", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignorovat existující skripty v $PATH i v lokálním projektu, npx tak udělá dočasnou instalaci a použije poslední verzi balíčku.", + "npm binary to use for internal operations.": "npm použité pro interní operace.", + "For the full documentation, see the manual page for npx(1).": "Úplná dokumentace je dostupná v manuálu pro npx(1).", + "Unable to guess a binary name from %s. Please use --package.": "Nelze uhodnout jméno skriptu z %s, použijte prosím --package.", + "\nERROR: You must supply a command.\n": "\nCHYBA: Musíte zadat nějaký příkaz.\n", + "Command failed: %s %s": "Příkaz selhal: %s %s", + "Install for %s failed with code %s": "Instalace %s selhala s kódem %s", + "%s not found. Trying with npx...": "%s nenalezen. Zkouším npx...", + "command not found: %s": "příkaz nenalezen: %s", + "options": "parametry", + "command": "příkaz", + "version": "verze", + "command-arg": "argument", + "command-string": "příkaz v řetězci", + "shell": "shell", + "package": "balíček", + "npx: installed %s in %ss": "npx: nainstalováno %s za %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Potlačit výstup z npx. Spuštěné příkazy nebudou ovlivněné." +} diff --git a/deps/npm/node_modules/libnpx/locales/de.json b/deps/npm/node_modules/libnpx/locales/de.json new file mode 100644 index 00000000000000..f732607063c481 --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/de.json @@ -0,0 +1,29 @@ +{ + "Execute binaries from npm packages.\n%s": "Führt Programme aus, die von npm Paketen bereitgestellt werden.\n%s", + "Package to be installed.": "Das zu installierende Paket.", + "Location of the npm cache.": "Ort des npm Zwischenspeichers.", + "Skip installation if a package is missing.": "Überspringe die Installation, falls ein Paket fehlt.", + "Path to user npmrc.": "Pfad zu npmrc im Benutzerverzeichnis.", + "Execute string as if inside `npm run-script`.": "Führe Zeichenkette aus, als wäre sie innerhalb von `npm run-script`.", + "Shell to execute the command with, if any.": "Shell, mit der Programme ausgeführt werden soll, wenn überhaupt.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Erzeuge Shellcode, um npx als Alternative zu \"Programm konnte nicht gefunden werden\" zu benutzen.", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignoriere bestehende Programme innerhalb von $PATH oder im lokalen Projekt. Dies zwingt npx dazu, die neuste Version herunterzuladen und zu benutzen.", + "npm binary to use for internal operations.": "npm-Programm für die interne Benutzung.", + "For the full documentation, see the manual page for npx(1).": "In der Manpage npx(1) ist die gesamte Dokumentation einzusehen.", + "Unable to guess a binary name from %s. Please use --package.": "Der Programmname von %s kann nicht automatisch ermittelt werden. Bitte benutze --package.", + "\nERROR: You must supply a command.\n": "\nFEHLER: Du musst einen Befehl angeben.\n", + "Command failed: %s %s": "Befehl fehlgeschlagen: %s %s", + "Install for %s failed with code %s": "Die Installation von %s ist mit dem Code %s fehlgeschlagen", + "%s not found. Trying with npx...": "%s konnte nicht gefunden werden. Versuche mit npx...", + "command not found: %s": "Programm konnte nicht gefunden werden: %s", + "options": "Optionen", + "command": "Befehl", + "version": "Version", + "command-arg": "Befehlsargument", + "command-string": "Befehlszeichenkette", + "shell": "Shell", + "package": "Paket", + "npx: installed %s in %ss": "npx: Installierte %s in %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Unterdrücke Output von npx. Unterbefehle sind nicht davon betroffen.", + "Extra node argument when calling a node binary.": "Extra node Argument, wenn eine node ausführbare Binärdatei gerufen ist." +} diff --git a/deps/npm/node_modules/libnpx/locales/en.json b/deps/npm/node_modules/libnpx/locales/en.json new file mode 100644 index 00000000000000..358e343421c75a --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/en.json @@ -0,0 +1,29 @@ +{ + "Execute binaries from npm packages.\n%s": "Execute binaries from npm packages.\n%s", + "Package to be installed.": "Package to be installed.", + "Location of the npm cache.": "Location of the npm cache.", + "Skip installation if a package is missing.": "Skip installation if a package is missing.", + "Path to user npmrc.": "Path to user npmrc.", + "Execute string as if inside `npm run-script`.": "Execute string as if inside `npm run-script`.", + "Shell to execute the command with, if any.": "Shell to execute the command with, if any.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Generate shell code to use npx as the \"command not found\" fallback.", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.", + "npm binary to use for internal operations.": "npm binary to use for internal operations.", + "For the full documentation, see the manual page for npx(1).": "For the full documentation, see the manual page for npx(1).", + "Unable to guess a binary name from %s. Please use --package.": "Unable to guess a binary name from %s. Please use --package.", + "\nERROR: You must supply a command.\n": "\nERROR: You must supply a command.\n", + "Command failed: %s %s": "Command failed: %s %s", + "Install for %s failed with code %s": "Install for %s failed with code %s", + "%s not found. Trying with npx...": "%s not found. Trying with npx...", + "command not found: %s": "command not found: %s", + "options": "options", + "command": "command", + "version": "version", + "command-arg": "command-arg", + "command-string": "command-string", + "shell": "shell", + "package": "package", + "npx: installed %s in %ss": "npx: installed %s in %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Suppress output from npx itself. Subcommands will not be affected.", + "Extra node argument when calling a node binary.": "Extra node argument when calling a node binary." +} \ No newline at end of file diff --git a/deps/npm/node_modules/libnpx/locales/es.json b/deps/npm/node_modules/libnpx/locales/es.json new file mode 100644 index 00000000000000..c89bceeb20b790 --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/es.json @@ -0,0 +1,28 @@ +{ + "Execute binaries from npm packages.\n%s": "Ejecuta comandos de paquetes de npm.\n%s", + "Package to be installed.": "Paquete para instalar.", + "Location of the npm cache.": "Ruta del cache de npm.", + "Skip installation if a package is missing.": "Salta el paso de instalación si el paquete no está presente.", + "Path to user npmrc.": "Ruta al npmrc del usuario.", + "Execute string as if inside `npm run-script`.": "Ejecuta el argumento como si estuviera dentro de `npm run-script`.", + "Shell to execute the command with, if any.": "Shell con el que se ejecutará el comando, si alguno.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Genera código de shell para usar npx como el repliegue cuando el comando no existe.", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignora comandos en $PATH, o en el proyecto local. Esto obliga a npx a hacer una instalación temporanea y usar la version más reciente del comando.", + "npm binary to use for internal operations.": "Comando de npm que se usará para operaciones internas de npx.", + "For the full documentation, see the manual page for npx(1).": "Para documentación completa, véase la pagina del manual npx(1).", + "Unable to guess a binary name from %s. Please use --package.": "No se pudo adivinar el nombre del comando usando %s. Por favor usa --package.", + "\nERROR: You must supply a command.\n": "\nERROR: Debes proveer un comando.\n", + "Command failed: %s %s": "Comando fracasó: %s %s", + "Install for %s failed with code %s": "La instalación de %s fracasó con código %s", + "%s not found. Trying with npx...": "%s no existe. Tratando con npx...", + "command not found: %s": "comando no existe: %s", + "options": "opciones", + "command": "comando", + "version": "versión", + "command-arg": "argumento-de-comando", + "command-string": "texto-de-comando", + "shell": "shell", + "package": "paquete", + "npx: installed %s in %ss": "npx: instaló %s en %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Suprimir producción de npx. Sub-comandos no serán afectados." +} diff --git a/deps/npm/node_modules/libnpx/locales/fr.json b/deps/npm/node_modules/libnpx/locales/fr.json new file mode 100644 index 00000000000000..a6ddf60e6f5401 --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/fr.json @@ -0,0 +1,28 @@ +{ + "Execute binaries from npm packages.\n%s": "Exécutez des binaires à partir de paquets de npm.\n%s", + "Package to be installed.": "Paquet à installer.", + "Location of the npm cache.": "Endroit où est situé le cache de npm.", + "Skip installation if a package is missing.": "Sauter l'installation si un paquet est manquant.", + "Path to user npmrc.": "Chemin du npmrc de l'utilisateur(-trice).", + "Execute string as if inside `npm run-script`.": "Exécuter la chaine de caractère comme avec `npm run-script`.", + "Shell to execute the command with, if any.": "Shell a utiliser pour exécuter la commande, s'il y en a un.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Générer le code du shell pour utiliser npx comme solution de rechange à \"command not found\"", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignorer les binaires dans le $PATH ou dans le projet local. Cela force npm à faire une installation temporaire et utiliser la dernière version.", + "npm binary to use for internal operations.": "Binaire de npm à utiliser pour les opérations internes.", + "For the full documentation, see the manual page for npx(1).": "Pour la documentation complète, regarder la page du manuel pour npx(1).", + "Unable to guess a binary name from %s. Please use --package.": "Impossible de deviner le nom du binaire de %s, utilisez --package s'il vous plaît.", + "\nERROR: You must supply a command.\n": "\nERROR: Vous devez fournir une commande.\n", + "Command failed: %s %s": "La commande a échoué: %s %s", + "Install for %s failed with code %s": "L'installation de %s a échoué avec le code %s", + "%s not found. Trying with npx...": "%s n'a pas été trouvé. Essai avec npx...", + "command not found: %s": "Commande non trouvée: %s", + "options": "options", + "command": "commande", + "version": "version", + "command-arg": "arguments-de-la-commande", + "command-string": "chaine-de-caractères-de-la-commande", + "shell": "shell", + "package": "paquet", + "npx: installed %s in %ss": "npx: %s installé(s) en %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Supprimer les sorties générées par npx. Les sous-commandes ne seront pas affectées." +} diff --git a/deps/npm/node_modules/libnpx/locales/it.json b/deps/npm/node_modules/libnpx/locales/it.json new file mode 100644 index 00000000000000..24e72b49195816 --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/it.json @@ -0,0 +1,28 @@ +{ + "Execute binaries from npm packages.\n%s": "Esegui il binario del pacchetto npm.\n%s", + "Package to be installed.": "Pacchetto da installare.", + "Location of the npm cache.": "Percorso della cache npm.", + "Skip installation if a package is missing.": "Salta l'installazione se un pacchetto non è disponibile.", + "Path to user npmrc.": "Percorso utente per npmrc.", + "Execute string as if inside `npm run-script`.": "Esegui l'argomento come se fosse all'interno di `npm run-script`.", + "Shell to execute the command with, if any.": "Shell con cui eseguire il comando, se presente.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Generare un codice di shell per usare npx come ripiego quando il comando non esiste.", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignora i binari esistenti in $PATH, oppure nel progetto locale. Questo forza temporaneamente npx a installare e usare l'ultima versione.", + "npm binary to use for internal operations.": "Binario npm da usare per le operazioni interne.", + "For the full documentation, see the manual page for npx(1).": "Per la documentazione completa, vedere la pagina del manuale npx(1).", + "Unable to guess a binary name from %s. Please use --package.": "Impossibile supporre il nome del binario da %s. Prego usare --package.", + "\nERROR: You must supply a command.\n": "\nERRORE: E necessario fornire un comando.\n", + "Command failed: %s %s": "Comando fallito: %s %s", + "Install for %s failed with code %s": "Installazione di %s fallita con codice %s", + "%s not found. Trying with npx...": "%s non trovato. Prova con npx...", + "command not found: %s": "comando non trovato: %s", + "options": "opzioni", + "command": "comando", + "version": "versione", + "command-arg": "argomento-del-comando", + "command-string": "stringa-di-comando", + "shell": "shell", + "package": "pacchetto", + "npx: installed %s in %ss": "npx: installato %s in %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Sopprimere l'output da npx stesso. I sottocomandi non saranno interessati." +} diff --git a/deps/npm/node_modules/libnpx/locales/ja.json b/deps/npm/node_modules/libnpx/locales/ja.json new file mode 100644 index 00000000000000..e575edabedfc1d --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/ja.json @@ -0,0 +1,28 @@ +{ + "Execute binaries from npm packages.\n%s": "npmパッケージのバイナリを実行します。", + "Package to be installed.": "インストールするパッケージ。", + "Location of the npm cache.": "npmのキャッシュへのパス。", + "Skip installation if a package is missing.": "パッケージがない場合は、インストールをスキップします。", + "Path to user npmrc.": "ユーザーのnpmrcへのパス。", + "Execute string as if inside `npm run-script`.": "「npm run-script」の内部にあるかのように文字列を実行します。", + "Shell to execute the command with, if any.": "コマンドを実行するシェル(存在する場合)。", + "Generate shell code to use npx as the \"command not found\" fallback.": "\"コマンドが見つかりません\" フォールバックとして使用するコードを生成します。", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "$PATH、または既存のローカルプロジェクトのバイナリを無視します。 これにより、npxは一時的にインストールを行い、最新バージョンを使用します。", + "npm binary to use for internal operations.": "npmのバイナリを内部操作に使用します。", + "For the full documentation, see the manual page for npx(1).": "詳しくは、npx(1)のマニュアルページを参照してください。", + "Unable to guess a binary name from %s. Please use --package.": "%sからバイナリ名を推測できません。 --packageを使用してください。", + "\nERROR: You must supply a command.\n": "\nエラー: コマンドを入力する必要があります。\n", + "Command failed: %s %s": "コマンドが失敗しました: %s %s", + "Install for %s failed with code %s": "コード%sで%sのインストールに失敗しました", + "%s not found. Trying with npx...": "%sが見つかりません。 npxで試してみて...", + "command not found: %s": "コマンドが見つかりません: %s", + "options": "オプション", + "command": "コマンド", + "version": "バージョン", + "command-arg": "コマンドの引数", + "command-string": "コマンドの文字列", + "shell": "シェル", + "package": "パッケージ", + "npx: installed %s in %ss": "npx: %s個のパッケージを%s秒でインストールしました。", + "Suppress output from npx itself. Subcommands will not be affected.": "npx自体の標準出力を抑止します。 サブコマンドは影響を受けません。" +} diff --git a/deps/npm/node_modules/libnpx/locales/pt_BR.json b/deps/npm/node_modules/libnpx/locales/pt_BR.json new file mode 100644 index 00000000000000..d61f8f58f88321 --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/pt_BR.json @@ -0,0 +1,28 @@ +{ + "Execute binaries from npm packages.\n%s": "Execute binários de pacotes npm.\n%s", + "Package to be installed.": "Pacote a ser instalado.", + "Location of the npm cache.": "Localização da cache do npm.", + "Skip installation if a package is missing.": "Pule a instalação se estiver faltando um pacote.", + "Path to user npmrc.": "Caminho para o npmrc do usuário.", + "Execute string as if inside `npm run-script`.": "Execute a string como se estivesse dentro de `npm run-script`.", + "Shell to execute the command with, if any.": "Terminal para executar o comando, se houver.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Gere código de terminal para usar o npx quando o comando não existir (\"command not found\").", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignora binários existentes no $PATH ou no projeto atual. Isso obriga o npx a fazer uma instalação temporária e usar a última versão.", + "npm binary to use for internal operations.": "Binário npm usado para operações internas.", + "For the full documentation, see the manual page for npx(1).": "Para a documentação completa, veja a página do manual do npx(1).", + "Unable to guess a binary name from %s. Please use --package.": "Não foi possível encontrar um binário a partir de %s. Por favor, use --package.", + "\nERROR: You must supply a command.\n": "\nERRO: Você deve fornecer um comando.\n", + "Command failed: %s %s": "Comando falhou: %s %s", + "Install for %s failed with code %s": "Instalação de %s falhou com código %s", + "%s not found. Trying with npx...": "%s não encontrado. Tentando com npx...", + "command not found: %s": "comando não encontrado: %s", + "options": "opções", + "command": "comando", + "version": "versão", + "command-arg": "argumento-do-comando", + "command-string": "string-de-comando", + "shell": "terminal", + "package": "pacote", + "npx: installed %s in %ss": "npx: %s instalado em %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Suprimir resultados de npx. Sub-comandos não serão afetados." +} diff --git a/deps/npm/node_modules/libnpx/locales/ro.json b/deps/npm/node_modules/libnpx/locales/ro.json new file mode 100644 index 00000000000000..b6c15d6af4863c --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/ro.json @@ -0,0 +1,28 @@ +{ + "Execute binaries from npm packages.\n%s": "Rulează executabilele binare din pachetele npm.\n%s", + "Package to be installed.": "Pachetul care va fi instalat.", + "Location of the npm cache.": "Locația cache-ului npm.", + "Skip installation if a package is missing.": "Sari peste instalare dacă lipsește un pachet.", + "Path to user npmrc.": "Calea către fișierul npmrc al utilizatorului.", + "Execute string as if inside `npm run-script`.": "Execută string-ul ca și cum ar fi în `npm run-script`.", + "Shell to execute the command with, if any.": "Shell-ul cu care să fie executată comandă, dacă există.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Generează cod shell pentru a folosi npx drept fallback pentru \"comanda nu a fost găsită\".", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignoră executabilele binare existente din $PATH, sau din proiectul local. Aceasta forțează npx să facă o instalare temporară și să folosească ultima versiune.", + "npm binary to use for internal operations.": "Executabilul binar npm care să fie folosit pentru operaţiunile interne.", + "For the full documentation, see the manual page for npx(1).": "Pentru documentația completă, vedeți pagina de manual pentru npx(1).", + "Unable to guess a binary name from %s. Please use --package.": "Imposibil de ghicit numele executabilului binar pentru %s. Vă rugăm folosiți --package.", + "\nERROR: You must supply a command.\n": "\nEROARE: Trebuie să specifici o comandă.\n", + "Command failed: %s %s": "Comanda a eșuat: %s %s", + "Install for %s failed with code %s": "Procesul de instalare pentru %s a eșuat cu codul %s", + "%s not found. Trying with npx...": "%s nu a fost găsită. Încercare cu npx...", + "command not found: %s": "comanda nu a fost găsită: %s", + "options": "opțiuni", + "command": "comandă", + "version": "versiune", + "command-arg": "comandă-argument", + "command-string": "comandă-string", + "shell": "shell", + "package": "pachet", + "npx: installed %s in %ss": "npx: instalat %s în %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Suprimă outputul de la npx însăși. Subcomenzile nu vor fi afectate." +} diff --git a/deps/npm/node_modules/libnpx/locales/ru.json b/deps/npm/node_modules/libnpx/locales/ru.json new file mode 100644 index 00000000000000..3f431373c8b08d --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/ru.json @@ -0,0 +1,29 @@ +{ + "Execute binaries from npm packages.\n%s": "Выполняйте скрипты из npm пакетов.\n%s", + "Package to be installed.": "Пакет, который будет установлен.", + "Location of the npm cache.": "Расположение npm кеша.", + "Skip installation if a package is missing.": "Пропустить установку, если пакет отсутствует.", + "Path to user npmrc.": "Передать пользователя в nprc.", + "Execute string as if inside `npm run-script`.": "Выпонить скрипт как внутри `npm run-script`.", + "Shell to execute the command with, if any.": "Shell, чтобы выполнить команду, если необходимо.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Создает код для shell, чтобы использовать npx при \"command not found\".", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Игнорирует все существующие скрипты в $PATH или локальном проекте. Что заставляет npx использовать временную установку и использовать последние версии", + "npm binary to use for internal operations.": "npm файл для использования во внутренних операциях.", + "For the full documentation, see the manual page for npx(1).": "Полная документация доступна в мануале npx(1).", + "Unable to guess a binary name from %s. Please use --package.": "Невозможно угадать команду из %s. Пожалуйста, используйте --package.", + "\nERROR: You must supply a command.\n": "\nERROR: Нужно указать команду.\n", + "Command failed: %s %s": "Ошибка: %s %s", + "Install for %s failed with code %s": "Установка %s завершилась с кодом ошибки %s", + "%s not found. Trying with npx...": "%s не найдено. Пробуем с npx...", + "command not found: %s": "команда не найдена: %s", + "options": "опции", + "command": "команда", + "version": "версия", + "command-arg": "аргумент", + "command-string": "команда-строка", + "shell": "shell", + "package": "пакет", + "npx: installed %s in %ss": "npx: установлен %s в %ss", + "Suppress output from npx itself. Subcommands will not be affected.": "Отключить вывод npx. Поведение подкоманд не будет изменено." + +} diff --git a/deps/npm/node_modules/libnpx/locales/tr.json b/deps/npm/node_modules/libnpx/locales/tr.json new file mode 100644 index 00000000000000..58ca49dbbdf88f --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/tr.json @@ -0,0 +1,28 @@ +{ + "Execute binaries from npm packages.\n%s": "npm paketlerinden program çalıştırın.\n%s", + "Package to be installed.": "Yüklenecek paketin adı.", + "Location of the npm cache.":"npm önbelleğinin yeri.", + "Skip installation if a package is missing.": "Eğer eksik paket varsa yükleme adımını atla.", + "Path to user npmrc.": "Kullanıcının npmrc dosyasının yeri.", + "Execute string as if inside `npm run-script`.": "Komutu 'npm run-script' kapsamında çalıştır.", + "Shell to execute the command with, if any.": "Komutların çalıştırılacağı shell.", + "Generate shell code to use npx as the \"command not found\" fallback.": "Komut eğer 'command not found' hatası veriyorsa, komutu npx üzerinden bir daha dene.", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "$PATH ve lokal projede tanımlanmış programları pas geçer. Bu sayede, npx yeni bir yükleme yapar ve en son versiyonu kullanır.", + "npm binary to use for internal operations.": "Bu programın çalıştırılmasında kullanılacak npm.", + "For the full documentation, see the manual page for npx(1).": "Tamamını okumak için 'man npx'.", + "Unable to guess a binary name from %s. Please use --package.": "%s için hangi npm paketi bilemedim. Lütfen --package kullanın.", + "\nERROR: You must supply a command.\n": "\nHATA: Argüman vermelisiniz.\n", + "Command failed: %s %s": "Komut çalıştırılamadı: %s %s", + "Install for %s failed with code %s": "%s yüklenirken %s kodlu bir hata oluştu. Yükleme sonlandırıldı.", + "%s not found. Trying with npx...": "%s bulunamadı. npx ile deniyorum...", + "command not found": "komut bulunamadı", + "options": "seçenekler", + "command": "komut", + "version": "versiyon", + "command-arg": "argümanlar", + "command-string": "argümanlar", + "shell": "shell", + "package": "paket", + "npx": "npx", + "Suppress output from npx itself. Subcommands will not be affected.": "npx çıktısını durdur. Alt komutlar etkilenmez." +} diff --git a/deps/npm/node_modules/libnpx/locales/zh_CN.json b/deps/npm/node_modules/libnpx/locales/zh_CN.json new file mode 100644 index 00000000000000..6cf64629f16d32 --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/zh_CN.json @@ -0,0 +1,28 @@ +{ + "Execute binaries from npm packages.\n%s": "从 npm 的可执行包执行命令\n%s", + "Package to be installed.": "包安装的路径", + "Location of the npm cache.": "npm 缓存路径", + "Skip installation if a package is missing.": "如果有包缺失,跳过安装", + "Path to user npmrc.": "当前用户的 npmrc 路径", + "Execute string as if inside `npm run-script`.": "像执行 `npm run-script` 一样执行一个字符串", + "Shell to execute the command with, if any.": "执行命令用到的解释器,可选", + "Generate shell code to use npx as the \"command not found\" fallback.": "产生“找不到命令”的错误码", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "忽略 $PATH 或工程里已有的可执行文件,这会强制使 npx 临时安装一次,并且使用其最新的版本", + "npm binary to use for internal operations.": "为了执行内部操作的 npm 可执行文件", + "For the full documentation, see the manual page for npx(1).": "可以通过 npx(1) 的手册找到完整说明文档", + "Unable to guess a binary name from %s. Please use --package.": "无法推测出可执行文件名的来源 %s,请使用 --package", + "\nERROR: You must supply a command.\n": "\n错误:您必须提供一个命令\n", + "Command failed: %s %s": "执行失败:%s %s", + "Install for %s failed with code %s": "安装 %s 失败,错误代码:%s", + "%s not found. Trying with npx...": "找不到 %s,请尝试使用 npx...", + "command not found: %s": "找不到命令:%s", + "options": "选项", + "command": "命令", + "version": "版本", + "command-arg": "命令的参数", + "command-string": "命令的字符串", + "shell": "命令行解释器", + "package": "包", + "npx: installed %s in %ss": "npx: %s 安装成功,用时 %s 秒", + "Suppress output from npx itself. Subcommands will not be affected.": "隐藏 npx 的输出,子命令不会受到影响" +} diff --git a/deps/npm/node_modules/libnpx/locales/zh_TW.json b/deps/npm/node_modules/libnpx/locales/zh_TW.json new file mode 100644 index 00000000000000..86ed27ef61ea9a --- /dev/null +++ b/deps/npm/node_modules/libnpx/locales/zh_TW.json @@ -0,0 +1,29 @@ +{ + "Execute binaries from npm packages.\n%s": "從 npm 套件的執行檔執行指令\n%s", + "Package to be installed.": "套件安装的路徑", + "Location of the npm cache.": "npm 快取路徑", + "Skip installation if a package is missing.": "當套件遺失時,略過安裝", + "Path to user npmrc.": "目前使用者的 npmrc 路徑", + "Execute string as if inside `npm run-script`.": "以 `npm run-script` 的方式執行一個字串", + "Shell to execute the command with, if any.": "執行指令所使用的殼層(Shell),選用", + "Generate shell code to use npx as the \"command not found\" fallback.": "當 npx 找不到指令時,產生殼層(Shell)指令,並執行之", + "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "將會讓 npx 忽略 $PATH 環境變數或專案內已有的執行檔,並暫時安裝及使用最新版本的執行檔", + "npm binary to use for internal operations.": "指定 npx 內部執行使用的 npm 執行檔", + "For the full documentation, see the manual page for npx(1).": "參考 npx(1) 的文件以取得完整的說明", + "Unable to guess a binary name from %s. Please use --package.": "無法從 %s 推測執行檔名稱,請使用 --package 參數", + "\nERROR: You must supply a command.\n": "\n錯誤:您必須輸入一個指令\n", + "Command failed: %s %s": "指令執行失敗:%s %s", + "Install for %s failed with code %s": "安裝 %s 失敗,錯誤代碼:%s", + "%s not found. Trying with npx...": "找不到 %s,請嘗試使用 npx...", + "command not found: %s": "找不到指令:%s", + "options": "選項", + "command": "指令", + "version": "版本", + "command-arg": "指令的參數", + "command-string": "指令字串", + "shell": "殼層(Shell)", + "package": "套件", + "npx: installed %s in %ss": "npx: %s 安裝成功,花費 %s 秒", + "Suppress output from npx itself. Subcommands will not be affected.": "隱藏 npx 的輸出,不影響子指令", + "Extra node argument when calling a node binary.": "當呼叫 node 執行檔時,提供的額外參數" +} diff --git a/deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md b/deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md new file mode 100644 index 00000000000000..2fcf56b90228da --- /dev/null +++ b/deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md @@ -0,0 +1,76 @@ +# Change Log +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## [Unreleased] + +## [4.0.0] - 2016-12-23 +### Changed + +- Return Object with parsed content or error instead of false ([#165](https://github.com/motdotla/dotenv/pull/165)). + + +### Removed + +- `verbose` option removed in favor of returning result. + + +## [3.0.0] - 2016-12-20 +### Added + +- `verbose` option will log any error messages. Off by default. +- parses email addresses correctly +- allow importing config method directly in ES6 + +### Changed + +- Suppress error messages by default ([#154](https://github.com/motdotla/dotenv/pull/154)) +- Ignoring more files for NPM to make package download smaller + +### Fixed + +- False positive test due to case-sensitive variable ([#124](https://github.com/motdotla/dotenv/pull/124)) + +### Removed + +- `silent` option removed in favor of `verbose` + +## [2.0.0] - 2016-01-20 +### Added +- CHANGELOG to ["make it easier for users and contributors to see precisely what notable changes have been made between each release"](http://keepachangelog.com/). Linked to from README +- LICENSE to be more explicit about what was defined in `package.json`. Linked to from README +- Testing nodejs v4 on travis-ci +- added examples of how to use dotenv in different ways +- return parsed object on success rather than boolean true + +### Changed +- README has shorter description not referencing ruby gem since we don't have or want feature parity + +### Removed +- Variable expansion and escaping so environment variables are encouraged to be fully orthogonal + +## [1.2.0] - 2015-06-20 +### Added +- Preload hook to require dotenv without including it in your code + +### Changed +- clarified license to be "BSD-2-Clause" in `package.json` + +### Fixed +- retain spaces in string vars + +## [1.1.0] - 2015-03-31 +### Added +- Silent option to silence `console.log` when `.env` missing + +## [1.0.0] - 2015-03-13 +### Removed +- support for multiple `.env` files. should always use one `.env` file for the current environment + +[Unreleased]: https://github.com/motdotla/dotenv/compare/v4.0.0...HEAD +[4.0.0]: https://github.com/motdotla/dotenv/compare/v3.0.0...v4.0.0 +[3.0.0]: https://github.com/motdotla/dotenv/compare/v2.0.0...v3.0.0 +[2.0.0]: https://github.com/motdotla/dotenv/compare/v1.2.0...v2.0.0 +[1.2.0]: https://github.com/motdotla/dotenv/compare/v1.1.0...v1.2.0 +[1.1.0]: https://github.com/motdotla/dotenv/compare/v1.0.0...v1.1.0 +[1.0.0]: https://github.com/motdotla/dotenv/compare/v0.4.0...v1.0.0 diff --git a/deps/npm/node_modules/libnpx/node_modules/dotenv/LICENSE b/deps/npm/node_modules/libnpx/node_modules/dotenv/LICENSE new file mode 100644 index 00000000000000..c430ad8bd06f2c --- /dev/null +++ b/deps/npm/node_modules/libnpx/node_modules/dotenv/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2015, Scott Motte +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/libnpx/node_modules/dotenv/README.md b/deps/npm/node_modules/libnpx/node_modules/dotenv/README.md new file mode 100644 index 00000000000000..90836a34b7c321 --- /dev/null +++ b/deps/npm/node_modules/libnpx/node_modules/dotenv/README.md @@ -0,0 +1,208 @@ +# dotenv + +dotenv + +Dotenv is a zero-dependency module that loads environment variables from a `.env` file into [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env). Storing configuration in the environment separate from code is based on [The Twelve-Factor App](http://12factor.net/config) methodology. + +[![BuildStatus](https://img.shields.io/travis/motdotla/dotenv/master.svg?style=flat-square)](https://travis-ci.org/motdotla/dotenv) +[![NPM version](https://img.shields.io/npm/v/dotenv.svg?style=flat-square)](https://www.npmjs.com/package/dotenv) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) +[![Coverage Status](https://img.shields.io/coveralls/motdotla/dotenv/master.svg?style=flat-square)](https://coveralls.io/github/motdotla/dotenv?branch=coverall-intergration) + +## Install + +```bash +npm install dotenv --save +``` + +## Usage + +As early as possible in your application, require and configure dotenv. + +```javascript +require('dotenv').config() +``` + +Create a `.env` file in the root directory of your project. Add +environment-specific variables on new lines in the form of `NAME=VALUE`. +For example: + +``` +DB_HOST=localhost +DB_USER=root +DB_PASS=s1mpl3 +``` + +That's it. + +`process.env` now has the keys and values you defined in your `.env` file. + +```javascript +var db = require('db') +db.connect({ + host: process.env.DB_HOST, + username: process.env.DB_USER, + password: process.env.DB_PASS +}) +``` + +### Preload + +If you are using iojs-v1.6.0 or later, you can use the `--require` (`-r`) command line option to preload dotenv. By doing this, you do not need to require and load dotenv in your application code. + + +```bash +$ node -r dotenv/config your_script.js +``` + +The configuration options below are supported as command line arguments in the format `dotenv_config_