diff --git a/deps/npm/.github/CODEOWNERS b/deps/npm/.github/CODEOWNERS new file mode 100644 index 0000000000000000000000000000000000000000..ef8743136d8a1cb489623a911c0a402f85e2a4a8 --- /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 95255d8d8072bbcd4face5d2a3f84b0c784c87be..e63df7e47bf3e392ae1cca53dc06eaed3ea61679 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 7357c4a1bd5bdd68c30257b002daaccc085a046d..07f44ab1c17379727fd2f09e7ee812ff2c02b23c 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 65b1db9a1de612909744c2834fb9d650da1e9c59..0000000000000000000000000000000000000000 --- 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 03b7e29d91e86972600ff33f0312d8f9f37e248d..0571c17272e8915891c5bfab9329f6f9cd42e0dc 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 7b69df98fe1831306a9fc4285a4678fee12f8dac..53ab16a29063c2429be79535df05e6674b0f0908 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 3a96074afb4f09f7418150f6258b1ed74bac23d1..ce79f41ec2b13bab8f4955b4f3d77de46a122091 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 9ccceba595ff8ace5bdaa3257a20445c2b2cca5f..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..a49c608bab89baeb89c5e596feb453aec0fb1257 --- /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 0000000000000000000000000000000000000000..f4043650599d77aa41501c0de95f9f06f94fe810 --- /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 0000000000000000000000000000000000000000..02fcbd9ffc232595d06b065214e11a2c40a3cf46 --- /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 5aecb2c3acbb974eefa2b323d7cb521001ad9dfa..aad9e0dffea90d977d701c2d3f2b875a60203b3b 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 44cb68792bfff7eac57ec45a0c0fe213f5def968..74e5e04bca4fd651521badff1faa95310be0f865 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 65e8366d467ec2bd635f936042da49b42187379f..e665a735c3237eb8c1664217da2b0e57d929f47d 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 f1389c21c623fdaac1720777a60a8b87a72d970f..b79d58fb01952c25588e54e5e75983e9b79f0719 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 e870b23d5ce5c5402148bd22dc7997d402330c99..38302b20d61fcd899c0964bbdf4bb95f73842034 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 62ecebc27a316698ffb0b7b1116a279543b0aa19..74c78834435f9210b18f7745422638a27c3ea2c6 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 8256398e86b1a8f85bb3ea3ead53222550ada7e1..541a1f5a6d7656457234aa204acb43be1b845c0e 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 f6dde3649237b0e9a3a44cb03b40c34b74b4fcae..4c134fc229ecb1d31e56f18c6291320d8c682b8f 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 1a06ff794b6784510f5075bc9bddb9805d1f036f..1b2b04fe2f97c6043d82f5fc73029bbba305f956 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 6fee98a90c7f9a4b1cff9052ba19493058367dcf..dd0993d6bb7958de80f5f5d1d7e485e3a36b0133 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 0e9c3bc6e768160b8ba4503df519e2cd85276359..9cdf588397c3ed185352abf35c874072d047c790 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 0000000000000000000000000000000000000000..e7a714113946d4f8d54ecf3a087846b0505afe09 --- /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 6668429083910b221287493a9f122401146fe6c3..437c78dc8ecaeb589cfa1ef09e0dbfacdc8b149e 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -106,8 +106,9 @@ you should read this

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 @@ will no doubt tell you to put the output in a gist or email.

           - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 4fcfc87ccda4ea2ab78ae1537d619c85519d4b85..4824196bf5932b59126aa112c7072b102c98bd79 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -84,5 +84,5 @@ with an HTTP 402 status code (logically enough), unless you use        - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 905c01acb0d24d78f0952efc1d3ab8614a604f5e..8297188343be97973f0ce4daf6b57dcbda079c0b 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -81,5 +81,5 @@ username/password entry in legacy npm.

           - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 131dff4dd2da7096117a8d9f8b23fdb839fd79c3..5baf48529c5114fd483a1e131991a07d8c0070a3 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index e73b582a191f75a06c0828747ec001995e7d2f38..65001a407e21f57f70ff34b524f04ca7ae0f19d9 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -55,5 +55,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 99f846f55f2a917ad5800b78f3509e1f88442952..33d0c896c245b47bfcd162262699bd15cbb239ac 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@ directly, run:

           - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 3898c9c0a8465f9fe60225616c58abeb7223449a..1860157fb8c786e34af60cd5676c52398627f65b 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -31,5 +31,5 @@ install packages into the local space.

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

           - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 9322d0a096cd77a9afdb06d2f990f861c8a0a7b0..da720731c49a5b9dd48a8c79d92ff5e52174625f 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -43,5 +43,5 @@ completions based on the arguments.

           - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 6d1f6fcc20809b93cbf07bc70c96a7d6d360108a..5eb01b9e7c7aaf493bfccc91f94626b35b2f64bc 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -14,7 +14,7 @@
    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 @@ of the user and global npmrc files.

    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 @@ global config.

           - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 21c85e73b8def2e65a09f8dae30e67e7f0c7b30e..169c47cb43c6931dca5df110b41845deec107e16 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -61,5 +61,5 @@ result in new modules being installed.

           - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 5b3e33d42288cbd5d35401d51a7e0c00b045bccb..c8c0e450649a7b6fb4b196f2dde55fdcb453919e 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@ something like this:

           - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index 1325853d76517f58e9244a472780b96fa2913529..ec1697d29bb8e90b79d0fd77bd7d81c187e910db 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 @@ begin with a number or the letter v.

           - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 7100b563c5faa2b71b5c4bd69c1f97369a5eb6f3..1aaae98cef394358d15dd4c5b81a9ae780eb0a2e 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@ the current folder and use the name property.

           - + diff --git a/deps/npm/html/doc/cli/npm-doctor.html b/deps/npm/html/doc/cli/npm-doctor.html index 41125d789078c4b9145362f32746925f4f3109e2..28408c8eaa543124f1a7460d7f489f382c276257 100644 --- a/deps/npm/html/doc/cli/npm-doctor.html +++ b/deps/npm/html/doc/cli/npm-doctor.html @@ -103,4 +103,4 @@ cache, you should probably run npm cache clean and reset the cache.        - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index b4291160b65839d77c215188a91e28ec971cfa87..8de2342143700e7edd7845b3402c8ac66262491c 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@ or "notepad" on Windows.        - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 1e5208e496f0bc2e5f0c8b7df57d7f2366b198ef..83586c58eb28958652f81dcd93ace5e5a7bd95f6 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@ Windows        - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 528e70cbab6e7f50386c9c7215fccb4085fa6bca..aa5c99f21ac290d4854a5bbf051a871e3575a82a 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 @@ where the terms were found in the documentation.

           - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 5f2a04a159dc2db16ce33d75726bdb171391bd73..bf82b1b6b0496b7d2a8e0fe5ad116abc18f2e778 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -50,5 +50,5 @@ matches are equivalent to specifying a topic name.

           - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 215fdb40a9e70a31e59726cc87bbfbc86864aba2..9a1853ad6410b397780420fff3859ba95aee9077 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@ defaults and not prompt you for any options.

           - + diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html index 83325a828911586d8ec7f539b16c9492b3cf995d..210c21b60f168cf66f14fda4b768962dafd749cc 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 @@ takes exactly the same arguments as npm install.

           - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index b41029e7c99afc20fbd79f7a3ad5d7495a65704c..227ad01d2f55e5fc23d79b319aa43a574b6e9f23 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -278,6 +278,8 @@ any binaries the package might contain.

    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 @@ affects a real use-case, it will be investigated.

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index 54b41d91dcbedfc56257b8c52a387f4b13fd7d29..ed797754f1a7402f4b10e9731f868dd000ad6dfe 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -74,5 +74,5 @@ include that scope, e.g.

           - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index d3a544534ebaa63efbee064eb4819b36c2cfe1eb..123cf6e6ae942fcbcc375fc75080c40cea9b0016 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -51,5 +51,5 @@ it takes precedence.

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 500ca033e576ed428789ddbf8c06d5e9f3e77d22..7f58b006ef7370bbf3eeb5d5e7bae9211678721b 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -21,7 +21,7 @@ installed, as well as their dependencies, in a tree-structure.

    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 @@ project.

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 @@ project.

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

           - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index e4cc4d7de89d11beca88d8b898f26a7d4112c0c5..7b9980c67c50b4f40978de420d525b53afd705b7 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -51,5 +51,5 @@ that is not implemented at this time.

           - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index 25982014e3593a18882f3ef97ca3f32ba7351671..2d66916d8b96df21cb83155b68e91634156dac2b 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@ overwritten the second time.

           - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 666ba97c7cefd60890c612a50131cafe27eebbdf..68a5e8574983f4f6c95deb5a611497ef4038e2e9 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,5 +32,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 30c3172493f57b0a00a7125ac5aa33245845b589..2560340d5e16f73014e1c4ba98743dedc4910527 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@ to contain a package.json file unless -g is also specified.

           - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 52b2ba78e4ee4e77bc9f1b7d4208dd66b86d5ee1..a7073a9e022a9aa74058b0ec27508dea43b1a93e 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -40,5 +40,5 @@ negate NODE_ENV being set to production.

           - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 3fca992169342d93a4839410d57c392e1d540c8c..2d3b1d1db8bc559ba93f531d131fb69276e399b9 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -79,5 +79,5 @@ packs them into a tarball to be uploaded to the registry.

           - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 7ec9923cb8bb6372854dbbe85e32a67934965e7f..bc8ee7877132e33f86a696c4c67f5ca75f4295ff 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -35,5 +35,5 @@ the new binary.

           - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index 38990dc8e96f3bca0ed6568cdcfb657dc0ba6403..e2ef9ee958a673acd0966592afe4fa792275adf0 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -41,5 +41,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 6847b24387ce83ac2ad726cc5e9ef26530e4adba..a6648c5716ac745dee51820f0aa31cd970ba0034 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number

           - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index af03619a5d683c1309813a8d9e3853adfa53b23d..94b59687abf668486c0e7666a4d89b4c50ffb050 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 2f61d63aece01eb5c92796d3f519ad7cd705d360..037ad1a64c233d1fe671e44b256cc9fec38ec035 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 @@ default in npm v3), this is only performed when that nodePATH.

    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

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

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

    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 @@ npm uninstall dtrace-provider --save-optional        - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 36d0d328616187744d5291080bb8a113b40142b1..220efe599a5fe33a9da7ad14360258cd2109f143 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -51,5 +51,5 @@ contact support@npmjs.com.

             - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 197aa41870f12889f7848be237f6640a97075f7c..471db2baba31c66ccdb796d723fa7059637cd309 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -118,5 +118,5 @@ be downgraded.

             - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index bc29ed75ac1b9040e56e223df6d46cf3fa5a887e..e821d71fc6779a1e5ae8e322472b7a1dfa6362d5 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -114,5 +114,5 @@ to the same value as the current version.

             - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 70bf31e435975ae5d7790c4218afbb4e0b097c65..9d30ff9031912a3acaffa897b24e1a4d18b39e17 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -86,5 +86,5 @@ the field name.

             - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 8f84bc8ab62e5b5546e26da83926fe012a162540..9c8b91e4d5724340b869ae2f3e67e8a0b3be514c 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 4e4d97b2350736305fffbc62fff5cccf8ca80947..06414eebab5d37a13be781e1c6b5a5d02df2f779 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

      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 @@ will no doubt tell you to put the output in a gist or email.

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

      +i@izs.me

      SEE ALSO

      • npm-help(1)
      • @@ -150,5 +150,5 @@ will no doubt tell you to put the output in a gist or email.

               - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index 300df680e1afb20d303f54d51783ab56dd07a759..915750606cecda696d52e506d784af989a21c6a3 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -25,10 +25,9 @@ is installed.

      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 @@ cannot be found elsewhere. See packa        - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 300df680e1afb20d303f54d51783ab56dd07a759..915750606cecda696d52e506d784af989a21c6a3 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -25,10 +25,9 @@ is installed.

    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 @@ cannot be found elsewhere. See
    packa        - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index e0f2df86f29360a89a25d993b683f0143a85a6d9..6374cc5a7d78823cc4f99711cb19396fa241cf55 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -342,15 +342,22 @@ tarball or git URL.

    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 @@ included. For example:

    "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 @@ you can specify which ones.

    "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 @@ ignored.

           - + diff --git a/deps/npm/html/doc/files/npm-package-locks.html b/deps/npm/html/doc/files/npm-package-locks.html index 56bf73fbf86e6af002f840a7b5ae9dc31b35ead9..21029d3a9dd74c658c638df88fd87c244b9002aa 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 @@ if any transitive dependencies were updated, hoisted, etc.

           - + diff --git a/deps/npm/html/doc/files/npm-shrinkwrap.json.html b/deps/npm/html/doc/files/npm-shrinkwrap.json.html index 1437a6807ee6f67e00dbf3ab6990aba75441cc74..9fdb543984ed7ca5b4cac095c73c0682ac23d7b8 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 @@

    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 @@ to the manual page for package-lock.js        - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 9dd6e18b10c0e601b081626a01e77432a91c9ced..8fe8746efbc1b03226ded6a91707ccaceb76bec2 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -85,5 +85,5 @@ manner.

           - + diff --git a/deps/npm/html/doc/files/package-lock.json.html b/deps/npm/html/doc/files/package-lock.json.html index ea9439e8418ee22d735a2ee9009e9822ba59fed2..3290c365da78e675a43c8f6d7e08667dd98ad483 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 @@ on the current platform.

    SEE ALSO

    @@ -124,4 +124,4 @@ on the current platform.

           - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index e0f2df86f29360a89a25d993b683f0143a85a6d9..6374cc5a7d78823cc4f99711cb19396fa241cf55 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -342,15 +342,22 @@ tarball or git URL.

    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 @@ included. For example:

    "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 @@ you can specify which ones.

    "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 @@ ignored.

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 9e300e85bf23b6860cba6b7c0ffc7447ad80911b..5976e6cf5a09d80990b8a635bb5a90d2083bd34a 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -168,5 +168,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index 081d89f4945cff550638a4c6af4259884934d55e..4c038f9d1cce372751e21d95ea6ad28b0379ff20 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 @@ set to anything."

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

    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 @@ configuration parameter to bar. Any environment configurations tha 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 @@ For details see this issue
    • 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 @@ in to a private registry for the first time: 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 @@ exit successfully.

             - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 7d27bd2bc19724b5a1298ea039321fac430034ca..39cc446723e976e72f9ffbaae5197bea1fa21f19 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -194,5 +194,5 @@ from a fresh checkout.

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

      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 @@ because Yusuf's foo is in the way.

    • 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 @@ application database or otherwise putting non-packagey things into it. 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 @@ License.

             - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 4888d872841e05185c14139538d64c929bd9533b..96d9dbfc4dea70cdf084a67ef533962976a1f7ec 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -168,5 +168,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index f3aab6e8517a294d31c0b3d0074f00842ef70cdb..cdd7d2c354a03723b15993d42bbc5ce49bbda9a8 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,5 +86,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index 7c6445b4cf4a184ae3b1961c645f8283fb645a13..6fd2e728ac949cc15dc504517e21df15241438bb 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -90,5 +90,5 @@ effectively implement the entire CouchDB API anyway.

             - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index 98595501fad1310b515b68b434ef8557332544a5..484e6c1c33e470be40b052604f7459a700cfea14 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -99,5 +99,5 @@ that registry instead.

             - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index ea3ecc321d8145714f3727cb9a39d058f2111052..46a126d8f64cd4ce88a9bd04335116df1079fd17 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -74,10 +74,6 @@ event has been introduced, prepare, that preserves this existing be 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 @@ scripts is for compilation which must be done on the target architecture.        - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 98404d073c88ad6a1f2e31f7c7697f68f2da1e78..2bfd2a513ca8a251214d5434223c984d20376277 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@ modules. To track those down, you can do the following:

             - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 44c208b217d82c6480438b757dd0c806e12c891c..e97c70afcbf730c596e748d9788340ead4bb4d79 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -325,5 +325,5 @@ range, use the satisfies(version, range) function.

             - + diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js index c2acc0066235e2d790588b86a73c3f22b859f4ab..44ac40a00708b599475193e7bf236391936dce0d 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 c54d105247f22465985c98887488a2983f227cbd..f2d5fab17dfeeab7095a9149c388294da749362f 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 da019ac4d6d196f45514d41e85682f7bde1b7f08..93bac84a6108f9f588082289fff4d91303924d6c 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 19779c41372cf4a9e305facc85710355b885a448..d04f6137de9ba10182642b4d189681840bec0e16 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 2d2dda59fa3ee2ffb8a198cbdbe294bf1b83432e..ec43178c7727dd7f32810f6ef125eba039912d61 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 ded309c21ac7e5e6647b215875280ac440553379..71e60619c4f1b759bc53f9b44d6bab689c8ea67d 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 29a25c2fb7cce15308129e0cb532f1747da1a7e3..e7e82902a7165c3d608a8a4ede521a3b3092ef8b 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 a21229692fb30f5f2329cbdee9b8f3ebc16ee786..1586b087a0bff3759e8727a5b747581186bb4e0b 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 67dcf98b70d79782d1a83ea74d9b0f2b906074ba..029f806f835b4561352583dbd9eb09dc146295e8 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 0000000000000000000000000000000000000000..24508c780495ebd97d717b5db561e12364ed9d74 --- /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 437d7e57f78ffabb03655a68bf5f94c7029011f8..5534e8b28a3fcd22f4ecfe7dbe15e2bd85e2a33a 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 ded2350dff7155b8bd0722982078270bca1b77cb..a50ec8a6bdbfc8451495dcb1453ecf880fd21774 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 07649c355693ab5d53a00c192bad4b4ca17c2f97..bc9bf6a883edea1830067fefab49f27a0ac8602f 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 6910803451048bfacf238062bf7c673186f3f902..42f80121006d332ac34b99238f4a9460137c6468 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 9fe77c35e05f8a3a0c32c48ae07f882f96231090..a852d10c5fd84f7bea03175b532cd148c221dcbf 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 0000000000000000000000000000000000000000..ce20df75d39d70402cc5dbc159347215e31a20e1 --- /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 912985e2c74aeb7ee1ceeef13ac092d17c901221..028d932373f1f68491ffaa8d083504165238f54c 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 1d954f5cab78bfa59e86529c5f3c72545f3d4065..57dc7cd6874647b29c217f2616ae16775bfcd17a 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 c0fe905d4ba01aa117dd6d9d6aa3a2fb6447a28d..d7a2c27c1cfb1c3ca1178693ff55f1969c3fbf79 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 67fe72d04471c03efd75e454aa0da99900939c05..ac4f421a5012b1a1e4fe8337bb52c1ac3659f6fb 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 b6ceb30f2fd916262a7d18dd5c6918be835a46b6..56282b771da43a803d449776a11af0a492ca89fb 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 7ad966ea0a90e852a083c68fa495a6fb07120c7f..48be93d0952e72399342349aa7dc0597d551861c 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 0000000000000000000000000000000000000000..ef41e8ad1a265920c0ab9c4e5bfcd898e2af3eb5 --- /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 0000000000000000000000000000000000000000..7366e9abe1b3266c5eeb759bb9e9e5a0d6b3e2a4 --- /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 018745cc5ffa4982976178b52b2c04b85b4b353c..0979afc78143857d4704e81749bb85555bc06bd5 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 b1b01fa8b9eb6a032e55ac0fbe4ecdd217d5a6ac..18138078a2e6623e2517e32bcb42b5b47d439b11 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 de398fb40b878da602a78485556ae54ddd4d233f..45e883caa2f5e2673f97231a8930cc729b5fddc2 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 91030bfa826fe2bda7c69798e37453ec7cb168cb..ac700278fff9fa82b9f2b15cf68a877dba71704d 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 56a4a892ad4ee34821ce1c0771ebc59ccbe774e7..e1a94fcff7a6ad071849bff15862a9b4b5503e3f 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 c30bf8695b0ce1f38fd46be6d07385c49187780b..65b660417a4caaf76a7cf25fb30926035743f38d 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 3e2f2ce8fadef834108122fcd5d373b22841fda6..2e3db79c3be7d08bfc5f63685b1046db1d76663a 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 7d5cfba86e7d3772353adf6f0e7d76f22b12159b..f2fb2df79a3ccaf2d40258ad9be8ec561c9fbc61 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 4552bbc498986bda4bfbb9211c0eef4f7bd83017..ae3bb260bad02abb599afbb732ec59e2af782570 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 6027745383e47a8f16a70c31996c65037af99a8e..4ac8139576bd047047811e38e2f1426f9e87061d 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 2673b1cfea66a39cacb83227f46681990a255752..bbc5e8f4811b34554da2f5770297f14984fb304f 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 428c12bba702335c6f8c127dbf994aeb9f20988f..a541d868fc2d0263035938e0f1dcf8d0268ea3ec 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 c181fdc4e8200eb6bf45fc28d7b606cccd40c04b..333d3e9d69c3c97eeead3ee3dff0bd0d78e83c5c 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 a997150699701378ad79adfbb342c1e37aa5fb01..7499efc4bef53369e833674723e91535bfaabfcb 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 b13d42e1df451f3e284e7c6df71ab60758a4bc3a..52a675bea640ad3d7735c6e037d54efef7f23411 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 4d05c75b867e37d628eed812b9beadadab2a4bfb..6770853dd9622a2567af47b1f5db6c13212c2a61 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 f8b34d7befada49998772d35d5e54f7f05578c09..412c1c69448a9a163b7249a386c3b75243c96bd0 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 242e87d37fce6640cb74b3a349a4c6669e77d8f8..d564962c219411d33a8fcaca6d79ce97d8e1034a 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 ebbee025a27540b04488dc2b8aa8f97a5e73fd05..12719e37e290ab2c8193fa53678a99634d659aea 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 0000000000000000000000000000000000000000..a82cd7135cc2c9e06bec0fa32297f67acff2bf6c --- /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 42f7d2a68d257030f0074815aede6c4f5a83128c..c52b5158a033989e3faeb1b310025e483b803b0d 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 0c2fbb6faa2483a619da89d1dce81cb6e882b931..7d44d1c1510c701877995c7feb66d95a8ae002c5 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 d2a7a9fa00d16047408b817df61e914d91cf394b..2f86c38544876000ea74eaaa3b6c55eaa315f729 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 64b037402f0d22e0256ed27978331649b107fe84..b90fd9ebd52583bd34879c57028065f6ebb035f3 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 e6a15a467c33117fe7039de5f00493e557788544..9571db127a6eb913a3e6fddc43d120846e9eab37 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 860d5299ca0891b74fbac101226d3c33bb0b9637..7126fda85fc2e90544fe716fb7f7fb8c777a2680 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 322d8c069e7e7f3fdb1ce6f5e01a32abfae1a25c..909ea651051a05bd1791184f55027be14939a1e9 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 c8d8f8686b3e2f624445bdb48654f4fd49d93129..522dcc1a366353475c96d7f070adbfd0c336712c 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 41d84cba055dd37ff80389f8f4f45e2ca50c372f..9309a00a61290dd8b0c0a520127ef38fc204aebf 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 11b4d11b1f1df2e86a1d16e3ad2ce89a53e19b1f..cd3343d7f66e1948d35d844e5f80255398ca0125 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 265aff01c6cd01a6b88573c7130d827e0dbf58f2..e98d3b52be613f7cd5b7decbd6fcc5ce347bc41a 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 d0962471d801b970901f28a9b0a35e7ad9f3f533..ffce7a43283bb0d9046254d64e149656f6c2c30c 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 2b26e9fc56fe189f79a09a52bd038c8acceb2790..f3f103bdf17a203f43402ae85bca5c95c12e27d9 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 3142da944ff0e5f4fd664892e4df21b1d3798045..3167e8e6cd7f373e6430afe345f6fa5e8f4244f5 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 c97b912e184337bf074a98c3aec7649529b9157b..84881635a07bb48ec61571da262ba11e70341f09 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 787b9d42198cd97944881bbf51fae32b30052e62..7a0b057b75f9a6a452eb7a4732acdc96ebf6aaad 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 978a4e54f3e68089e6745076aef1fa0e3cb80597..63cdeb77ca5294b7ad8445b8629dea5915dbc48f 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 d5cf964ecb2a71a7f99875f684001604cdc29b3a..ac993ff4dd6c3daff4f23ab038fe0783d41362e0 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 d54f316542229a8a0ee8caf446f3ba3f68ff4134..0d7971406a751ec84ab65566fe6b8110beae84e7 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 a102985b9f240ae9734e5e0e0ba72530557f4581..224d45a35d1faa82142f3193e00a00d66d571c20 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 c8ccd94b7b866d127cfac3f75faed773f7361b45..38bf391be8e71a7afb8cba9e12752a202abb8cf2 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 3bdd4c632b95f08f62139c01f378ed02742c9caa..af1356d6093f7c0ee56b78426d0a13592c712ab2 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 e90cc4f8f40c6804ea264418d881f7bc270040b0..b33c7e8f8ec40b1405da27215afa0a4bfef45d94 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 b5b1d25098f32a99e046f54c715aa206d22edcda..a1fa966c0f61c2bae3cc9b95d215320ab38f42cf 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 1bb0d25ce53c709e1dc753539edafe5ebdfeac0b..74c22144648bfe840edb014e48fec632fbe40494 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 bf339ee70ca67b1469cc6058c7c03fa037450d02..5c6744e450035d332675b27711c84c87dcc5f252 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 992c359dcbabb983689348b04996e72d1f97cfcd..ccd38acb170afafd224a5acaca39c83d3f4ab21c 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 9eb713bd666d00aa4baec72822c6bc177c966f1e..62be1bdcd03d6105b9b5d9269d2f3da8e904e312 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 634d3e84094c59bb766a3ae80ad6751a81fcbf90..2e70602351b2ee19f138ef17dd003754fe9cb3fa 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 e14fa450d97268eba288dff458d7688929f8d754..33693a1a5c3942a1f5adc3acb9fddddfdd4a5f65 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 46d06910454ac2f947b5b278ef294b0e4ad59983..27fb7e9ef49b7adad544618d09c9530479e3f02d 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 c8051b36e8ed9d2b8334d1857d84876d1706658f..3317b213c2a1a789b3ed84458bfa1cf5c19e4e19 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 5095939be6ad8de598c6f054ea84a8f183376213..1529f1b2f31f13f434d92a4f1e425bc32c47689b 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 7cb888b260d7c04e3eef3501484a462daa57b007..15bcaf92d3469f0d2d74d0eec2c8c369d7a9d7c7 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 cf2c9f7f5797a9dfd3f75dde493c7a60e8b9b89d..a1732297cecddefdfce109e6dce35bd8bbf1d33e 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 7a0c40d0502ddb88e4232bde8b39019c9a71cda2..bb78c0248283a889830f5a3d7a2decf36beb3e4a 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 fd30fb7cac442ac49998c4ec87210aac690117c0..bc704262e4e5c5effaea6162bc2cf9922171b947 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 eaffbefc0ff5fa6967f5e8b3e0919a2f05946bfe..6219b27a3c4f675a07344430d2f74f1830a3b7f4 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 89cb716d847a1acd4ed5f943c62323f12d4f136b..190b75a34e44e69567940d0fb178e86a89e02b39 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 d6d12bf16767746d335f9502a5e2303b7a9d133e..ad4a78d3e7d5f77bab55c3ae9de6dd653071021c 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 a04ce7363e2d7fed943f9d91a3ef8647e252b7a2..b325ff0ea1e423c4031d61d491e1efe9ef0123db 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 face66764b542e84512d6ed0e987854ff0272b32..92e5bf7a4e6a20197bcb892cfa2ab5a9ec118766 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 0916970e0d247d2d49684e693da737b15554697e..df0e1cd65b5575284755745e22d9bc7d1856ac5c 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 430f3c117f5c66437958ab62e943cf88d25265cc..30f2b67fc124dae0d0fc8ee64433e7065d5172d0 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 b38561f71147323f5909642482c207835867e1aa..1d398c9fdc14d88014a3246ead924e13d012d7c1 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 ad9fc14d558fab95dc474cc495e955cf3f5fd4df..a17682b38ea2a7f253ecbd537e5bc96bf428aa6a 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 29df8f50f4f242dbdef00b22aa2c92e782d36b49..0863df058d4f265124790ddfc699d72a8a4c1259 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 c3883a59498f0a7e4b8ee7820ed51407bb938198..ce7f2147679fe9d6a920f83e126c748f5584e3dd 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 14bad07f5fedd4842d4caefdc386f8bb3293a0b5..24b07a1fd0b68e631e231062b2675d738063e5ce 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 ae2678a8db610a19ec655313eb3e12ffa955d52d..de93869d33704cbbc8a08f15b54e975b0148dcc0 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 0bfedd6b8b9c3686a9c6b5fbe3215a6719eb2315..503f71a9eceab7e26d8ef193764c3fd6bc2a22be 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 8fdf66c2fc5b938843507e2594be27861e238d43..180b949747a6dbe1b61dee200beb445ecdb10db1 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 e3771ad9facb2f2c6be068615b21ea025be4495d..a626190edd9608b5ad1b3c005ce55e06784feea1 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 0000000000000000000000000000000000000000..f64614d36ec02867acdd8c20c705304a9cc7b0bf --- /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 194e6bcc02d4745f304fcdf7e7a246a4ec7c50e1..2442ef305671712b1accccbc5f8b8080cb493a51 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 194e6bcc02d4745f304fcdf7e7a246a4ec7c50e1..2442ef305671712b1accccbc5f8b8080cb493a51 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 89eefefcf68123bb152a61e8acdf7e0cd9e4d4d6..df570a7e1bcee29095b4e19a9b43367a1ea66c4b 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 4d6a28519294af6a8646dd6bdcd414652e6dd1ba..df808f2e98ab83ce3e811dabf651815eab19415c 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 400e23b20adb5e8ef2b77cf8f9294524b9bcc532..9188009c10ed5a7240519d41d5dc50214e538dfd 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 a80fdca666fe9b1dceb92bb8e1a809eda3904e96..4a35447e23bfe786c80b86c98e1572dd02f25c6a 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 09dc0d760040eda07bc8c63063fe81535e5f47e4..4e1f7b880a33e47392da887eda56fbf98e9a96e7 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 89eefefcf68123bb152a61e8acdf7e0cd9e4d4d6..df570a7e1bcee29095b4e19a9b43367a1ea66c4b 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 6a788d870c223fcee5bc54fa78ea5ace38df09d8..bedeace4f3a215cbe0f68656fa0418594f17a71f 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 7af1f90f7cb86a9508681cebba28d0a1a134a447..07ab671f40625dcdccb8f4e03918e2587382b643 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 da88a0df013cd7a193f685d755650ad566333bfa..ba6a0811c98ed7ebbd16f76073639896e8350c69 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 8de6d02da89ac3d089a3c22630ec975c5a3be4ad..b7767f3a4abc2fae90aff583db300f753e6751dc 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 689e6b91ad96c02bff975b3ef722cbab451ef505..7568e29882fd44d2190fdc8283c0ee7cdf90fc77 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 4c37567e15793a8859f29f32161ac704a06b1063..8a25d47a33d7ad16f6d761ba06f143e9d95055bf 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 483f36010c03ad68d36fdb7e25bf8fd6524b6f9f..abd1406097515fbee2aa11360123f9684b0793fc 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 5331efae49213021a48f04a0b679ce5dd9918fca..fbb685c46035f0da3638e4234670c0e8ccc769c3 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 c58a1ef9544989f01e40b753152fcd485fdf9e8c..e93ad1e6509fa6a22ac1395ca8bdf425718732ac 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 f2bd986225fa09a6bbaf812ddd573f65109e8762..1ee678b59e934489b93b72a45289c1730dccd55d 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 88ed4a079912deedb7304d823ceee087757d2501..f0b22279d07f5866651939d994906e1172e20567 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 26752d4a1b55ae4f7c8f1c035a56e9fbc99c9351..39910608b3db311b9a0debbff03f9b1a2fd66760 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 e712039daecc4eec74276848f58c6f829b20a2b2..fe0cfcd1f4a151747396aa0e66c1a9468d940db9 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 0000000000000000000000000000000000000000..33351c73cc193b7bf3a7507bfd96286b110cc202 --- /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 7f472afd062e576b59619246eb910bb766ced303..2086da717bcf41d165e0c69b419014bad1a8408e 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 b9574ed7e82013f9af3e62bbb9a9e4c66e5ca497..c4aaecf5050639b636288b7334b31f12cbb8eb37 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 654d0bfe943437d43242325b1fbcff5f400d84ee..e7af2f77107d73046421ef56c4684cbfdd3c1e89 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 bf854fdc32bca56359b74cad29680c93a5795bf8..2bf2bb485f0b63f30a942c1a30787c9b499498b3 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 6a928edf0f6b0816ebe4339dbaa51d562a1c3c96..22db1c34055556f92ed231d2a762b09a389056d2 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 802257622eab58921462fa117ef9c5e47a123a4b..9e8f8d6dddeb42b0eb28177a3d1989672ff12a30 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 0000000000000000000000000000000000000000..f646c1cb8e50b16f887715ac2d4bcb5a39cf358d --- /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 e98ef78a53dc79a3f57ddb35669c52a1fac62979..460462aadc9dd983362c12b1965e98ff58693a71 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 0000000000000000000000000000000000000000..778bf01dfaaf9fbc56168e52c4ca76aabc665ecc --- /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 0000000000000000000000000000000000000000..7db15994612fd90cc4b416c18de018fbc9bf63e5 --- /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 0000000000000000000000000000000000000000..3b5bd1e0eefc3fa340ee0198f6126fb784b15a0f --- /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 0000000000000000000000000000000000000000..25a21d829e8b3fa843eff75b8ae6092719e943f2 --- /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 0000000000000000000000000000000000000000..4378e4541e9a141792f8ce122f3fb238f5ae1693 --- /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 0000000000000000000000000000000000000000..f5861018696688887f69d055dd7d3ef54b38ebdc --- /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 0000000000000000000000000000000000000000..4a15bf22c400326fc31f68eb3c0dde4714e6af0c --- /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 0000000000000000000000000000000000000000..b0fdf0d0a6fdf6f6ef0a11a529e5dd1bff9f254c --- /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 0000000000000000000000000000000000000000..518d23330b936c0b1b370d9304ae48b0fccf2297 --- /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 0000000000000000000000000000000000000000..b0b037c12876f9e376c66857dea548895aa85315 --- /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 b55c3ba6897b822be3077a25283c5cfadbbe9b2c..3290274a429a1de7e02e6997c7e31519202a4b49 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 0000000000000000000000000000000000000000..099480fbfc54cb238d6d190fda653408fbf1ef7f --- /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 0000000000000000000000000000000000000000..b9574ed7e82013f9af3e62bbb9a9e4c66e5ca497 --- /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 0000000000000000000000000000000000000000..b5fbbd7d767916f02ca574c869899d0c1c391af1 --- /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 0000000000000000000000000000000000000000..6a928edf0f6b0816ebe4339dbaa51d562a1c3c96 --- /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 0000000000000000000000000000000000000000..2befc6de4d28bb8e8619fd4e6ce2c7eea87589bd --- /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 0000000000000000000000000000000000000000..cb7d9ff7ee403d6cd7827beaed0629b9eb9af83f --- /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 e8d8587020ca6c7a00ad7dbbffef0bc5fc3894ff..1685a762932558b67a4fe743c9edf77325a520eb 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 a3170ed9c3c3fe28306233c1ba389726f21e4a88..4702c7d9a4f0b7dd76149c436ff478a669d0ad93 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 71448dff902e15cc9bfffda2f42c41544f46698a..7d38d063ea60214434491d887c52aac3ef834bad 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 3aef0ce37b886a6aa0268eb8870fefd0664636e1..6716950183544466eb0b403b6b508ab122de0052 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 e8d8587020ca6c7a00ad7dbbffef0bc5fc3894ff..1685a762932558b67a4fe743c9edf77325a520eb 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 b1e0e2b28eed7ab1713e1c8afcf7f7f7c7f699c9..23f4e2cc6923d4e5adc37b8fb0a4e53d25ea870c 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 4dce0154bc3462df170876719c228b63dfa0d408..e7c21ffc56f6791c8a0461eb88ea45c26ab74e53 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 82971fc8bfbac02aa3a23e7bd6cb1cfd20f0b94d..afa4b50f1636db5a8060ba8cc873a7a9ee91751b 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 8577ffb7678af0f69c86c41522d96cfa563f1530..9055ab1853de7716ca3c110f52d00409ff265ee4 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 b6c1b5e297d662d365195cb97afdbbbbe5fa37e5..de691a86c0db77324c1fd39963efdc342812e6ea 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 0000000000000000000000000000000000000000..c53646d02084fc8d2ee7fafa890a1c4c8909d666 --- /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 0000000000000000000000000000000000000000..c05cb09586fccdca90f7b9f72c48dd971cf527ef --- /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 0000000000000000000000000000000000000000..436bdd024024666a9ea9ab00e26b7930a8f6a764 --- /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 0000000000000000000000000000000000000000..75fb60f4c2cbe8e886213da81f4c2067c5672dc6 --- /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 0000000000000000000000000000000000000000..1b7c4c6215bfe6e65dafadca63f400b46a77dbff --- /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 0000000000000000000000000000000000000000..71bedffc580c88c1279c973db9d81706d1462589 --- /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 0000000000000000000000000000000000000000..7c0bd6df851a266d14664a147950a55cf5915cdf --- /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 0000000000000000000000000000000000000000..ee37777ca10c2ce0ca1e7ae484ba8f0af71ceb86 --- /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 0000000000000000000000000000000000000000..d9faf1c08b0133af59209bb8c3e5a7425041d2d0 --- /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 0000000000000000000000000000000000000000..c3ecc402cf916b5620dd868cb667702922cc2750 --- /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 0000000000000000000000000000000000000000..f732607063c481afdd4074076ca576d9504374c7 --- /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 0000000000000000000000000000000000000000..358e343421c75a126d5045dcae243a5f418fb759 --- /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 0000000000000000000000000000000000000000..c89bceeb20b790aa6f2b3b5c5e024c5014d9a0e1 --- /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 0000000000000000000000000000000000000000..a6ddf60e6f5401264c55e3bb52536cc925d20257 --- /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 0000000000000000000000000000000000000000..24e72b49195816b0972b87a4edfb982c0aecaa97 --- /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 0000000000000000000000000000000000000000..e575edabedfc1dc762fa56e3e3f19248a4983999 --- /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 0000000000000000000000000000000000000000..d61f8f58f883215e0c5b8ebc58bc1f1982cc54b6 --- /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 0000000000000000000000000000000000000000..b6c15d6af4863ccec5bf303a77570261dd01ade2 --- /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 0000000000000000000000000000000000000000..3f431373c8b08dfb7e0938a374ec57aa1086eb36 --- /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 0000000000000000000000000000000000000000..58ca49dbbdf88f9ff10335464f0d7e59871b91da --- /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 0000000000000000000000000000000000000000..6cf64629f16d3239e31e96640d812ed7216e06b3 --- /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 0000000000000000000000000000000000000000..86ed27ef61ea9a63c70d5bfde485c8af6f0b4786 --- /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 0000000000000000000000000000000000000000..2fcf56b90228da84b20ffaae5c456eaa17024453 --- /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 0000000000000000000000000000000000000000..c430ad8bd06f2c6495641c83b78c910f2f53c837 --- /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 0000000000000000000000000000000000000000..90836a34b7c321fc8c64c748ccb79292e0490628 --- /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_