From 32c73bf0e3f0441d0c7c940292235d4b93aa87e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Tue, 27 Nov 2018 09:28:05 -0800 Subject: [PATCH] libnpm@2.0.1 --- node_modules/genfun/CHANGELOG.md | 17 + node_modules/genfun/LICENSE | 21 + node_modules/genfun/lib/method.js | 10 +- node_modules/genfun/package.json | 24 +- node_modules/libnpm/CHANGELOG.md | 35 + node_modules/libnpm/extract.js | 2 +- node_modules/libnpm/manifest.js | 2 +- node_modules/libnpm/package.json | 41 +- node_modules/libnpm/packument.js | 2 +- node_modules/libnpm/read-json.js | 2 +- node_modules/libnpm/tarball.js | 2 +- node_modules/libnpmaccess/CHANGELOG.md | 27 + node_modules/libnpmaccess/README.md | 53 +- node_modules/libnpmaccess/index.js | 72 +- node_modules/libnpmaccess/package.json | 31 +- node_modules/libnpmaccess/test/index.js | 46 +- node_modules/pacote/CHANGELOG.md | 38 + node_modules/pacote/README.md | 10 + node_modules/pacote/lib/fetch.js | 2 +- node_modules/pacote/lib/fetchers/directory.js | 6 +- node_modules/pacote/lib/fetchers/file.js | 4 +- node_modules/pacote/lib/fetchers/git.js | 2 +- .../pacote/lib/fetchers/registry/manifest.js | 12 +- .../pacote/lib/fetchers/registry/tarball.js | 2 +- node_modules/pacote/lib/finalize-manifest.js | 4 +- node_modules/pacote/lib/util/git.js | 12 +- node_modules/pacote/lib/util/opt-check.js | 20 +- node_modules/pacote/lib/util/pack-dir.js | 2 +- .../pacote/lib/with-tarball-stream.js | 10 +- node_modules/pacote/node_modules/.bin/semver | 1 + .../node_modules/get-stream/buffer-stream.js | 51 - .../pacote/node_modules/get-stream/index.js | 51 - .../pacote/node_modules/get-stream/license | 21 - .../node_modules/get-stream/package.json | 80 - .../pacote/node_modules/get-stream/readme.md | 117 -- .../pacote/node_modules/minipass/LICENSE | 15 + .../pacote/node_modules/minipass/README.md | 124 ++ .../pacote/node_modules/minipass/index.js | 375 +++++ .../pacote/node_modules/minipass/package.json | 67 + .../npm-pick-manifest/CHANGELOG.md | 133 ++ .../node_modules/npm-pick-manifest/LICENSE.md | 16 + .../node_modules/npm-pick-manifest/README.md | 84 + .../node_modules/npm-pick-manifest/index.js | 121 ++ .../npm-pick-manifest/package.json | 82 + .../pacote/node_modules/semver/LICENSE | 15 + .../pacote/node_modules/semver/README.md | 399 +++++ .../pacote/node_modules/semver/bin/semver | 153 ++ .../pacote/node_modules/semver/package.json | 55 + .../pacote/node_modules/semver/range.bnf | 16 + .../pacote/node_modules/semver/semver.js | 1352 +++++++++++++++++ .../node_modules/unique-filename/LICENSE | 5 + .../node_modules/unique-filename/README.md | 33 + .../coverage/__root__/index.html | 73 + .../coverage/__root__/index.js.html | 69 + .../unique-filename/coverage/base.css | 182 +++ .../unique-filename/coverage/index.html | 73 + .../unique-filename/coverage/prettify.css | 1 + .../unique-filename/coverage/prettify.js | 1 + .../coverage/sort-arrow-sprite.png | Bin 0 -> 209 bytes .../unique-filename/coverage/sorter.js | 156 ++ .../node_modules/unique-filename/index.js | 8 + .../node_modules/unique-filename/package.json | 56 + .../unique-filename/test/index.js | 23 + .../pacote/node_modules/yallist/LICENSE | 15 + .../pacote/node_modules/yallist/README.md | 204 +++ .../pacote/node_modules/yallist/iterator.js | 8 + .../pacote/node_modules/yallist/package.json | 62 + .../pacote/node_modules/yallist/yallist.js | 376 +++++ node_modules/pacote/package.json | 60 +- node_modules/pacote/packument.js | 2 +- node_modules/pacote/prefetch.js | 2 +- node_modules/protoduck/CHANGELOG.md | 11 + node_modules/protoduck/index.js | 26 +- node_modules/protoduck/package.json | 33 +- package-lock.json | 121 +- package.json | 4 +- 76 files changed, 4856 insertions(+), 587 deletions(-) create mode 100644 node_modules/genfun/LICENSE create mode 120000 node_modules/pacote/node_modules/.bin/semver delete mode 100644 node_modules/pacote/node_modules/get-stream/buffer-stream.js delete mode 100644 node_modules/pacote/node_modules/get-stream/index.js delete mode 100644 node_modules/pacote/node_modules/get-stream/license delete mode 100644 node_modules/pacote/node_modules/get-stream/package.json delete mode 100644 node_modules/pacote/node_modules/get-stream/readme.md create mode 100644 node_modules/pacote/node_modules/minipass/LICENSE create mode 100644 node_modules/pacote/node_modules/minipass/README.md create mode 100644 node_modules/pacote/node_modules/minipass/index.js create mode 100644 node_modules/pacote/node_modules/minipass/package.json create mode 100644 node_modules/pacote/node_modules/npm-pick-manifest/CHANGELOG.md create mode 100644 node_modules/pacote/node_modules/npm-pick-manifest/LICENSE.md create mode 100644 node_modules/pacote/node_modules/npm-pick-manifest/README.md create mode 100644 node_modules/pacote/node_modules/npm-pick-manifest/index.js create mode 100644 node_modules/pacote/node_modules/npm-pick-manifest/package.json create mode 100644 node_modules/pacote/node_modules/semver/LICENSE create mode 100644 node_modules/pacote/node_modules/semver/README.md create mode 100755 node_modules/pacote/node_modules/semver/bin/semver create mode 100644 node_modules/pacote/node_modules/semver/package.json create mode 100644 node_modules/pacote/node_modules/semver/range.bnf create mode 100644 node_modules/pacote/node_modules/semver/semver.js create mode 100644 node_modules/pacote/node_modules/unique-filename/LICENSE create mode 100644 node_modules/pacote/node_modules/unique-filename/README.md create mode 100644 node_modules/pacote/node_modules/unique-filename/coverage/__root__/index.html create mode 100644 node_modules/pacote/node_modules/unique-filename/coverage/__root__/index.js.html create mode 100644 node_modules/pacote/node_modules/unique-filename/coverage/base.css create mode 100644 node_modules/pacote/node_modules/unique-filename/coverage/index.html create mode 100644 node_modules/pacote/node_modules/unique-filename/coverage/prettify.css create mode 100644 node_modules/pacote/node_modules/unique-filename/coverage/prettify.js create mode 100644 node_modules/pacote/node_modules/unique-filename/coverage/sort-arrow-sprite.png create mode 100644 node_modules/pacote/node_modules/unique-filename/coverage/sorter.js create mode 100644 node_modules/pacote/node_modules/unique-filename/index.js create mode 100644 node_modules/pacote/node_modules/unique-filename/package.json create mode 100644 node_modules/pacote/node_modules/unique-filename/test/index.js create mode 100644 node_modules/pacote/node_modules/yallist/LICENSE create mode 100644 node_modules/pacote/node_modules/yallist/README.md create mode 100644 node_modules/pacote/node_modules/yallist/iterator.js create mode 100644 node_modules/pacote/node_modules/yallist/package.json create mode 100644 node_modules/pacote/node_modules/yallist/yallist.js diff --git a/node_modules/genfun/CHANGELOG.md b/node_modules/genfun/CHANGELOG.md index c72d719ea385a..461e22fc59626 100644 --- a/node_modules/genfun/CHANGELOG.md +++ b/node_modules/genfun/CHANGELOG.md @@ -2,6 +2,23 @@ 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. + +# [5.0.0](https://github.com/zkat/genfun/compare/v4.0.1...v5.0.0) (2017-12-12) + + +### Bug Fixes + +* **license:** relicense to MIT ([857e720](https://github.com/zkat/genfun/commit/857e720)) +* **platforms:** drop support for node 4 and 7 ([2cdbe32](https://github.com/zkat/genfun/commit/2cdbe32)) + + +### BREAKING CHANGES + +* **platforms:** node 4 and node 7 are no longer officially supported +* **license:** license changed from CC0-1.0 to MIT + + + ## [4.0.1](https://github.com/zkat/genfun/compare/v4.0.0...v4.0.1) (2017-04-16) diff --git a/node_modules/genfun/LICENSE b/node_modules/genfun/LICENSE new file mode 100644 index 0000000000000..ab41caa64b86c --- /dev/null +++ b/node_modules/genfun/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) +Copyright (c) 2017 Kat Marchán + +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 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/node_modules/genfun/lib/method.js b/node_modules/genfun/lib/method.js index 5a9d9f788ed88..eddb7d325370e 100644 --- a/node_modules/genfun/lib/method.js +++ b/node_modules/genfun/lib/method.js @@ -46,13 +46,9 @@ function Method (genfun, selector, func) { } else { method.minimalSelector++ if (!Object.hasOwnProperty.call(object, Role.roleKeyName)) { - if (Object.defineProperty) { - // Object.defineProperty is JS 1.8.0+ - Object.defineProperty( - object, Role.roleKeyName, {value: [], enumerable: false}) - } else { - object[Role.roleKeyName] = [] - } + // Object.defineProperty is JS 1.8.0+ + Object.defineProperty( + object, Role.roleKeyName, {value: [], enumerable: false}) } // XXX HACK - no method replacement now, so we just shove // it in a place where it'll always show up first. This diff --git a/node_modules/genfun/package.json b/node_modules/genfun/package.json index 60295ade5dd31..4a557eb45a3f9 100644 --- a/node_modules/genfun/package.json +++ b/node_modules/genfun/package.json @@ -1,27 +1,27 @@ { - "_from": "genfun@^4.0.1", - "_id": "genfun@4.0.1", + "_from": "genfun@^5.0.0", + "_id": "genfun@5.0.0", "_inBundle": false, - "_integrity": "sha1-7RAEHy5KfxsKOEZtF6XD4n3x38E=", + "_integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", "_location": "/genfun", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "genfun@^4.0.1", + "raw": "genfun@^5.0.0", "name": "genfun", "escapedName": "genfun", - "rawSpec": "^4.0.1", + "rawSpec": "^5.0.0", "saveSpec": null, - "fetchSpec": "^4.0.1" + "fetchSpec": "^5.0.0" }, "_requiredBy": [ "/protoduck" ], - "_resolved": "https://registry.npmjs.org/genfun/-/genfun-4.0.1.tgz", - "_shasum": "ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1", - "_spec": "genfun@^4.0.1", - "_where": "/Users/rebecca/code/npm/node_modules/protoduck", + "_resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", + "_shasum": "9dd9710a06900a5c4a5bf57aca5da4e52fe76537", + "_spec": "genfun@^5.0.0", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/protoduck", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -59,7 +59,7 @@ "polymorphic", "protocols" ], - "license": "CC0-1.0", + "license": "MIT", "main": "lib/genfun.js", "name": "genfun", "repository": { @@ -75,5 +75,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": "4.0.1" + "version": "5.0.0" } diff --git a/node_modules/libnpm/CHANGELOG.md b/node_modules/libnpm/CHANGELOG.md index 2d843717a4bf1..e9712f7d44553 100644 --- a/node_modules/libnpm/CHANGELOG.md +++ b/node_modules/libnpm/CHANGELOG.md @@ -2,6 +2,41 @@ 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. + +## [2.0.1](https://github.com/npm/libnpm/compare/v2.0.0...v2.0.1) (2018-12-05) + + +### Bug Fixes + +* **read-json:** use bluebird for promisification ([8dddde6](https://github.com/npm/libnpm/commit/8dddde6)) + + + + +# [2.0.0](https://github.com/npm/libnpm/compare/v1.5.0...v2.0.0) (2018-11-27) + + +### deps + +* bump all libs ([83ae929](https://github.com/npm/libnpm/commit/83ae929)) + + +### BREAKING CHANGES + +* This includes a breaking libnpmaccess patch + + + + +# [1.5.0](https://github.com/npm/libnpm/compare/v1.4.0...v1.5.0) (2018-11-26) + + +### Features + +* **pacote:** minimal requires for pacote-related APIs ([e19ce11](https://github.com/npm/libnpm/commit/e19ce11)) + + + # [1.4.0](https://github.com/npm/libnpm/compare/v1.3.0...v1.4.0) (2018-11-13) diff --git a/node_modules/libnpm/extract.js b/node_modules/libnpm/extract.js index ac907fe0b1fc4..4f3aa3d7065c4 100644 --- a/node_modules/libnpm/extract.js +++ b/node_modules/libnpm/extract.js @@ -1,3 +1,3 @@ 'use strict' -module.exports = require('pacote').extract +module.exports = require('pacote/extract') diff --git a/node_modules/libnpm/manifest.js b/node_modules/libnpm/manifest.js index 6248d05b21028..863b004e7f27d 100644 --- a/node_modules/libnpm/manifest.js +++ b/node_modules/libnpm/manifest.js @@ -1,3 +1,3 @@ 'use strict' -module.exports = require('pacote').manifest +module.exports = require('pacote/manifest') diff --git a/node_modules/libnpm/package.json b/node_modules/libnpm/package.json index 4e8a48d02ac24..98968d38cf9d0 100644 --- a/node_modules/libnpm/package.json +++ b/node_modules/libnpm/package.json @@ -1,31 +1,31 @@ { - "_from": "libnpm@^1.4.0", - "_id": "libnpm@1.4.0", + "_from": "libnpm@latest", + "_id": "libnpm@2.0.1", "_inBundle": false, - "_integrity": "sha512-Ja6WdFpIEvGmxL34fvAzNma/Kjl303nDIRolpOhHoVbi+s93ZIPyap3RvM8IYINEoeF06P1mGWagZDEedq3NEg==", + "_integrity": "sha512-qTKoxyJvpBxHZQB6k0AhSLajyXq9ZE/lUsZzuHAplr2Bpv9G+k4YuYlExYdUCeVRRGqcJt8hvkPh4tBwKoV98w==", "_location": "/libnpm", "_phantomChildren": { + "figgy-pudding": "3.5.1", "get-stream": "4.1.0", - "npm-package-arg": "6.1.0", "npm-registry-fetch": "3.8.0" }, "_requested": { - "type": "range", + "type": "tag", "registry": true, - "raw": "libnpm@^1.4.0", + "raw": "libnpm@latest", "name": "libnpm", "escapedName": "libnpm", - "rawSpec": "^1.4.0", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "^1.4.0" + "fetchSpec": "latest" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/libnpm/-/libnpm-1.4.0.tgz", - "_shasum": "215c804a17fe83a816b3b854cc87707a49c05db9", - "_spec": "libnpm@^1.4.0", + "_resolved": "https://registry.npmjs.org/libnpm/-/libnpm-2.0.1.tgz", + "_shasum": "a48fcdee3c25e13c77eb7c60a0efe561d7fb0d8f", + "_spec": "libnpm@latest", "_where": "/Users/zkat/Documents/code/work/npm", "author": { "name": "Kat Marchán", @@ -37,22 +37,23 @@ "bundleDependencies": false, "dependencies": { "bin-links": "^1.1.2", + "bluebird": "^3.5.3", "find-npm-prefix": "^1.0.2", - "libnpmaccess": "^2.0.0", - "libnpmconfig": "^1.1.1", - "libnpmhook": "^5.0.0", + "libnpmaccess": "^3.0.1", + "libnpmconfig": "^1.2.1", + "libnpmhook": "^5.0.2", "libnpmorg": "^1.0.0", - "libnpmpublish": "^1.0.1", + "libnpmpublish": "^1.1.0", "libnpmsearch": "^2.0.0", - "libnpmteam": "^1.0.0", + "libnpmteam": "^1.0.1", "lock-verify": "^2.0.2", "npm-lifecycle": "^2.1.0", "npm-logical-tree": "^1.2.1", "npm-package-arg": "^6.1.0", - "npm-profile": "^4.0.0", - "npm-registry-fetch": "^3.3.0", + "npm-profile": "^4.0.1", + "npm-registry-fetch": "^3.8.0", "npmlog": "^4.1.2", - "pacote": "^9.1.0", + "pacote": "^9.2.3", "read-package-json": "^2.0.13", "stringify-package": "^1.0.0" }, @@ -93,5 +94,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": "1.4.0" + "version": "2.0.1" } diff --git a/node_modules/libnpm/packument.js b/node_modules/libnpm/packument.js index 4b8d26f498356..f852a3fe26b60 100644 --- a/node_modules/libnpm/packument.js +++ b/node_modules/libnpm/packument.js @@ -1,3 +1,3 @@ 'use strict' -module.exports = require('pacote').packument +module.exports = require('pacote/packument') diff --git a/node_modules/libnpm/read-json.js b/node_modules/libnpm/read-json.js index fd178d5bfcc8d..b59eb9d45a0be 100644 --- a/node_modules/libnpm/read-json.js +++ b/node_modules/libnpm/read-json.js @@ -1,3 +1,3 @@ 'use strict' -module.exports = require('util').promisify(require('read-package-json')) +module.exports = require('bluebird').promisify(require('read-package-json')) diff --git a/node_modules/libnpm/tarball.js b/node_modules/libnpm/tarball.js index 8e5258fb5f75f..cc1b2e54a49fb 100644 --- a/node_modules/libnpm/tarball.js +++ b/node_modules/libnpm/tarball.js @@ -1,3 +1,3 @@ 'use strict' -module.exports = require('pacote').tarball +module.exports = require('pacote/tarball') diff --git a/node_modules/libnpmaccess/CHANGELOG.md b/node_modules/libnpmaccess/CHANGELOG.md index 0c7cd98375bb3..14959aaefbe44 100644 --- a/node_modules/libnpmaccess/CHANGELOG.md +++ b/node_modules/libnpmaccess/CHANGELOG.md @@ -2,6 +2,33 @@ 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. + +## [3.0.1](https://github.com/npm/libnpmaccess/compare/v3.0.0...v3.0.1) (2018-11-12) + + +### Bug Fixes + +* **ls-packages:** fix confusing splitEntity arg check ([1769090](https://github.com/npm/libnpmaccess/commit/1769090)) + + + + +# [3.0.0](https://github.com/npm/libnpmaccess/compare/v2.0.1...v3.0.0) (2018-08-24) + + +### Features + +* **api:** overhaul API ergonomics ([1faf00a](https://github.com/npm/libnpmaccess/commit/1faf00a)) + + +### BREAKING CHANGES + +* **api:** all API calls where scope and team were separate, or +where team was an extra, optional argument should now use a +fully-qualified team name instead, in the `scope:team` format. + + + ## [2.0.1](https://github.com/npm/libnpmaccess/compare/v2.0.0...v2.0.1) (2018-08-24) diff --git a/node_modules/libnpmaccess/README.md b/node_modules/libnpmaccess/README.md index cf1a11353a0af..2b639823a0641 100644 --- a/node_modules/libnpmaccess/README.md +++ b/node_modules/libnpmaccess/README.md @@ -96,37 +96,37 @@ await access.restricted('@foo/bar', {token: 'myregistrytoken'}) // `@foo/bar` is now private ``` -#### `> access.grant(spec, scope, team, permissions, [opts]) -> Promise` +#### `> access.grant(spec, team, permissions, [opts]) -> Promise` `spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. `scope` must be a valid scope, with or without the `@` prefix, -and `team` must be a valid team within that scope. `permissions` must be one of -`'read-only'` or `'read-write'`. +registry spec. `team` must be a fully-qualified team name, in the `scope:team` +format, with or without the `@` prefix, and the team must be a valid team within +that scope. `permissions` must be one of `'read-only'` or `'read-write'`. Grants `read-only` or `read-write` permissions for a certain package to a team. ##### Example ```javascript -await access.grant('@foo/bar', '@foo', 'myteam', 'read-write', { +await access.grant('@foo/bar', '@foo:myteam', 'read-write', { token: 'myregistrytoken' }) // `@foo/bar` is now read/write enabled for the @foo:myteam team. ``` -#### `> access.revoke(spec, scope, team, [opts]) -> Promise` +#### `> access.revoke(spec, team, [opts]) -> Promise` `spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. `scope` must be a valid scope, with or without the `@` prefix, -and `team` must be a valid team within that scope. `permissions` must be one of -`'read-only'` or `'read-write'`. +registry spec. `team` must be a fully-qualified team name, in the `scope:team` +format, with or without the `@` prefix, and the team must be a valid team within +that scope. `permissions` must be one of `'read-only'` or `'read-write'`. Removes access to a package from a certain team. ##### Example ```javascript -await access.revoke('@foo/bar', '@foo', 'myteam', { +await access.revoke('@foo/bar', '@foo:myteam', { token: 'myregistrytoken' }) // @foo:myteam can no longer access `@foo/bar` @@ -163,22 +163,25 @@ await access.tfaNotRequired('lodash', {otp: '123654', token: 'myregistrytoken'}) // enabled. ``` -#### `> access.lsPackages(scope, [team], [opts]) -> Promise` +#### `> access.lsPackages(entity, [opts]) -> Promise` -`scope` must be a valid org or user name, with or without the `@` prefix. `team` -is optional and, if provided, must be a valid team within that scope. `team` -must be `null` in order to pass in `opts`. +`entity` must be either a valid org or user name, or a fully-qualified team name +in the `scope:team` format, with or without the `@` prefix. Lists out packages a user, org, or team has access to, with corresponding permissions. Packages that the access token does not have access to won't be listed. -For a streamed version of these results, see [`access.lsPackages.stream()`](#ls-package-stream). +In order to disambiguate between users and orgs, two requests may end up being +made when listing orgs or users. + +For a streamed version of these results, see +[`access.lsPackages.stream()`](#ls-package-stream). ##### Example ```javascript -await access.lsPackages('zkat', null, { +await access.lsPackages('zkat', { token: 'myregistrytoken' }) // Lists all packages `@zkat` has access to on the registry, and the @@ -187,15 +190,17 @@ await access.lsPackages('zkat', null, { #### `> access.lsPackages.stream(scope, [team], [opts]) -> Stream` -`scope` must be a valid org or user name, with or without the `@` prefix. `team` -is optional and, if provided, must be a valid team within that scope. `team` -must be `null` in order to pass in `opts`. +`entity` must be either a valid org or user name, or a fully-qualified team name +in the `scope:team` format, with or without the `@` prefix. Streams out packages a user, org, or team has access to, with corresponding permissions, with each stream entry being formatted like `[packageName, permissions]`. Packages that the access token does not have access to won't be listed. +In order to disambiguate between users and orgs, two requests may end up being +made when listing orgs or users. + The returned stream is a valid `asyncIterator`. ##### Example @@ -211,9 +216,8 @@ for await (let [pkg, perm] of access.lsPackages.stream('zkat')) { #### `> access.lsCollaborators(spec, [user], [opts]) -> Promise` `spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. `scope` must be a valid org or user name, with or without the `@` -prefix. `team` is optional and, if provided, must be a valid team within that -scope. `team` must be `null` in order to pass in `opts`. +registry spec. `user` must be a valid user name, with or without the `@` +prefix. Lists out access privileges for a certain package. Will only show permissions for packages to which you have at least read access. If `user` is passed in, the @@ -233,9 +237,8 @@ await access.lsCollaborators('@npm/foo', 'zkat', { #### `> access.lsCollaborators.stream(spec, [user], [opts]) -> Stream` `spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. `scope` must be a valid org or user name, with or without the `@` -prefix. `team` is optional and, if provided, must be a valid team within that -scope. `team` must be `null` in order to pass in `opts`. +registry spec. `user` must be a valid user name, with or without the `@` +prefix. Stream out access privileges for a certain package, with each entry in `[user, permissions]` format. Will only show permissions for packages to which you have diff --git a/node_modules/libnpmaccess/index.js b/node_modules/libnpmaccess/index.js index 83369bba4974c..e241fcbfc68a2 100644 --- a/node_modules/libnpmaccess/index.js +++ b/node_modules/libnpmaccess/index.js @@ -26,7 +26,7 @@ cmd.public = (spec, opts) => setAccess(spec, 'public', opts) cmd.restricted = (spec, opts) => setAccess(spec, 'restricted', opts) function setAccess (spec, access, opts) { opts = AccessConfig(opts) - return new opts.Promise((resolve, reject) => { + return pwrap(opts, () => { spec = npar(spec) validate('OSO', [spec, access, opts]) const uri = `/-/package/${eu(spec.name)}/access` @@ -34,16 +34,16 @@ function setAccess (spec, access, opts) { method: 'POST', body: {access}, spec - })).then(resolve, reject) + })) }).then(res => res.body.resume() && true) } -cmd.grant = (spec, scope, team, permissions, opts) => { +cmd.grant = (spec, entity, permissions, opts) => { opts = AccessConfig(opts) - return new opts.Promise((resolve, reject) => { + return pwrap(opts, () => { spec = npar(spec) + const {scope, team} = splitEntity(entity) validate('OSSSO', [spec, scope, team, permissions, opts]) - scope = scope.replace(/^@/, '') if (permissions !== 'read-write' && permissions !== 'read-only') { throw new Error('`permissions` must be `read-write` or `read-only`. Got `' + permissions + '` instead') } @@ -52,46 +52,48 @@ cmd.grant = (spec, scope, team, permissions, opts) => { method: 'PUT', body: {package: spec.name, permissions}, scope, - spec - })).then(resolve, reject) - }).then(res => res.body.resume() && true) + spec, + ignoreBody: true + })) + }).then(() => true) } -cmd.revoke = (spec, scope, team, opts) => { +cmd.revoke = (spec, entity, opts) => { opts = AccessConfig(opts) - return new opts.Promise((resolve, reject) => { + return pwrap(opts, () => { spec = npar(spec) + const {scope, team} = splitEntity(entity) validate('OSSO', [spec, scope, team, opts]) - scope = scope.replace(/^@/, '') const uri = `/-/team/${eu(scope)}/${eu(team)}/package` return npmFetch(uri, opts.concat({ method: 'DELETE', body: {package: spec.name}, scope, - spec - })).then(resolve, reject) - }).then(res => res.body.resume() && true) + spec, + ignoreBody: true + })) + }).then(() => true) } -cmd.lsPackages = (scope, team, opts) => { +cmd.lsPackages = (entity, opts) => { opts = AccessConfig(opts) - return new opts.Promise((resolve, reject) => { + return pwrap(opts, () => { return getStream.array( - cmd.lsPackages.stream(scope, team, opts) + cmd.lsPackages.stream(entity, opts) ).then(data => data.reduce((acc, [key, val]) => { if (!acc) { acc = {} } acc[key] = val return acc - }, null)).then(resolve, reject) + }, null)) }) } -cmd.lsPackages.stream = (scope, team, opts) => { +cmd.lsPackages.stream = (entity, opts) => { + validate('SO|SZ', [entity, opts]) opts = AccessConfig(opts) - validate('SSO|SZO', [scope, team, opts]) - scope = scope.replace(/^@/, '') + const {scope, team} = splitEntity(entity) let uri if (team) { uri = `/-/team/${eu(scope)}/${eu(team)}/package` @@ -125,8 +127,12 @@ cmd.lsPackages.stream = (scope, team, opts) => { } cmd.lsCollaborators = (spec, user, opts) => { + if (typeof user === 'object' && !opts) { + opts = user + user = undefined + } opts = AccessConfig(opts) - return new opts.Promise((resolve, reject) => { + return pwrap(opts, () => { return getStream.array( cmd.lsCollaborators.stream(spec, user, opts) ).then(data => data.reduce((acc, [key, val]) => { @@ -135,11 +141,15 @@ cmd.lsCollaborators = (spec, user, opts) => { } acc[key] = val return acc - }, null)).then(resolve, reject) + }, null)) }) } cmd.lsCollaborators.stream = (spec, user, opts) => { + if (typeof user === 'object' && !opts) { + opts = user + user = undefined + } opts = AccessConfig(opts) spec = npar(spec) validate('OSO|OZO', [spec, user, opts]) @@ -169,11 +179,23 @@ function setRequires2fa (spec, required, opts) { return npmFetch(uri, opts.concat({ method: 'POST', body: {publish_requires_tfa: required}, - spec + spec, + ignoreBody: true })).then(resolve, reject) - }).then(res => res.body.resume() && true) + }).then(() => true) } cmd.edit = () => { throw new Error('Not implemented yet') } + +function splitEntity (entity = '') { + let [, scope, team] = entity.match(/^@?([^:]+)(?::(.*))?$/) || [] + return {scope, team} +} + +function pwrap (opts, fn) { + return new opts.Promise((resolve, reject) => { + fn().then(resolve, reject) + }) +} diff --git a/node_modules/libnpmaccess/package.json b/node_modules/libnpmaccess/package.json index 1c8e049ef7a21..c60e95b8d975f 100644 --- a/node_modules/libnpmaccess/package.json +++ b/node_modules/libnpmaccess/package.json @@ -1,32 +1,27 @@ { - "_args": [ - [ - "libnpmaccess@2.0.1", - "/Users/zkat/Documents/code/work/npm" - ] - ], - "_from": "libnpmaccess@2.0.1", - "_id": "libnpmaccess@2.0.1", + "_from": "libnpmaccess@^3.0.1", + "_id": "libnpmaccess@3.0.1", "_inBundle": false, - "_integrity": "sha512-WJRlA7YGGCBK6zubJ8eajD7Wm6SaywiR0jnMjwp8QBwt1QxQOY+CCKpERw30opPkShjoesBLzQJ9Wf3MpXGR/A==", + "_integrity": "sha512-RlZ7PNarCBt+XbnP7R6PoVgOq9t+kou5rvhaInoNibhPO7eMlRfS0B8yjatgn2yaHIwWNyoJDolC/6Lc5L/IQA==", "_location": "/libnpmaccess", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "libnpmaccess@2.0.1", + "raw": "libnpmaccess@^3.0.1", "name": "libnpmaccess", "escapedName": "libnpmaccess", - "rawSpec": "2.0.1", + "rawSpec": "^3.0.1", "saveSpec": null, - "fetchSpec": "2.0.1" + "fetchSpec": "^3.0.1" }, "_requiredBy": [ "/libnpm" ], - "_resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-3.0.1.tgz", + "_shasum": "5b3a9de621f293d425191aa2e779102f84167fa8", + "_spec": "libnpmaccess@^3.0.1", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpm", "author": { "name": "Kat Marchán", "email": "kzm@zkat.tech" @@ -34,12 +29,14 @@ "bugs": { "url": "https://github.com/npm/libnpmaccess/issues" }, + "bundleDependencies": false, "dependencies": { "aproba": "^2.0.0", "get-stream": "^4.0.0", "npm-package-arg": "^6.1.0", "npm-registry-fetch": "^3.8.0" }, + "deprecated": false, "description": "programmatic library for `npm access` commands", "devDependencies": { "nock": "^9.6.1", @@ -65,5 +62,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": "2.0.1" + "version": "3.0.1" } diff --git a/node_modules/libnpmaccess/test/index.js b/node_modules/libnpmaccess/test/index.js index df285848d5e2b..b48815e79a1fb 100644 --- a/node_modules/libnpmaccess/test/index.js +++ b/node_modules/libnpmaccess/test/index.js @@ -54,7 +54,7 @@ test('access grant basic read-write', t => { permissions: 'read-write' }).reply(201) return access.grant( - '@foo/bar', 'myorg', 'myteam', 'read-write', OPTS + '@foo/bar', 'myorg:myteam', 'read-write', OPTS ).then(ret => { t.deepEqual(ret, true, 'request succeeded') }) @@ -66,7 +66,7 @@ test('access grant basic read-only', t => { permissions: 'read-only' }).reply(201) return access.grant( - '@foo/bar', 'myorg', 'myteam', 'read-only', OPTS + '@foo/bar', 'myorg:myteam', 'read-only', OPTS ).then(ret => { t.deepEqual(ret, true, 'request succeeded') }) @@ -74,7 +74,7 @@ test('access grant basic read-only', t => { test('access grant bad perm', t => { return access.grant( - '@foo/bar', 'myorg', 'myteam', 'unknown', OPTS + '@foo/bar', 'myorg:myteam', 'unknown', OPTS ).then(ret => { throw new Error('should not have succeeded') }, err => { @@ -86,13 +86,27 @@ test('access grant bad perm', t => { }) }) +test('access grant no entity', t => { + return access.grant( + '@foo/bar', undefined, 'read-write', OPTS + ).then(ret => { + throw new Error('should not have succeeded') + }, err => { + t.match( + err.message, + /Expected string/, + 'passing undefined entity gives useful error' + ) + }) +}) + test('access grant basic unscoped', t => { tnock(t, REG).put('/-/team/myorg/myteam/package', { package: 'bar', permissions: 'read-write' }).reply(201) return access.grant( - 'bar', 'myorg', 'myteam', 'read-write', OPTS + 'bar', 'myorg:myteam', 'read-write', OPTS ).then(ret => { t.deepEqual(ret, true, 'request succeeded') }) @@ -102,7 +116,7 @@ test('access revoke basic', t => { tnock(t, REG).delete('/-/team/myorg/myteam/package', { package: '@foo/bar' }).reply(200) - return access.revoke('@foo/bar', 'myorg', 'myteam', OPTS).then(ret => { + return access.revoke('@foo/bar', 'myorg:myteam', OPTS).then(ret => { t.deepEqual(ret, true, 'request succeeded') }) }) @@ -111,7 +125,7 @@ test('access revoke basic unscoped', t => { tnock(t, REG).delete('/-/team/myorg/myteam/package', { package: 'bar' }).reply(200, {accessChanged: true}) - return access.revoke('bar', 'myorg', 'myteam', OPTS).then(ret => { + return access.revoke('bar', 'myorg:myteam', OPTS).then(ret => { t.deepEqual(ret, true, 'request succeeded') }) }) @@ -130,7 +144,7 @@ test('ls-packages on team', t => { tnock(t, REG).get( '/-/team/myorg/myteam/package?format=cli' ).reply(200, serverPackages) - return access.lsPackages('myorg', 'myteam', OPTS).then(data => { + return access.lsPackages('myorg:myteam', OPTS).then(data => { t.deepEqual(data, clientPackages, 'got client package info') }) }) @@ -149,7 +163,7 @@ test('ls-packages on org', t => { tnock(t, REG).get( '/-/org/myorg/package?format=cli' ).reply(200, serverPackages) - return access.lsPackages('myorg', null, OPTS).then(data => { + return access.lsPackages('myorg', OPTS).then(data => { t.deepEqual(data, clientPackages, 'got client package info') }) }) @@ -168,16 +182,14 @@ test('ls-packages on user', t => { const srv = tnock(t, REG) srv.get('/-/org/myuser/package?format=cli').reply(404, {error: 'not found'}) srv.get('/-/user/myuser/package?format=cli').reply(200, serverPackages) - return access.lsPackages('myuser', null, OPTS).then(data => { + return access.lsPackages('myuser', OPTS).then(data => { t.deepEqual(data, clientPackages, 'got client package info') }) }) test('ls-packages error on team', t => { tnock(t, REG).get('/-/team/myorg/myteam/package?format=cli').reply(404) - return access.lsPackages( - 'myorg', 'myteam', OPTS - ).then( + return access.lsPackages('myorg:myteam', OPTS).then( () => { throw new Error('should not have succeeded') }, err => t.equal(err.code, 'E404', 'spit out 404 directly if team provided') ) @@ -187,7 +199,7 @@ test('ls-packages error on user', t => { const srv = tnock(t, REG) srv.get('/-/org/myuser/package?format=cli').reply(404, {error: 'not found'}) srv.get('/-/user/myuser/package?format=cli').reply(404, {error: 'not found'}) - return access.lsPackages('myuser', null, OPTS).then( + return access.lsPackages('myuser', OPTS).then( () => { throw new Error('should not have succeeded') }, err => t.equal(err.code, 'E404', 'spit out 404 if both reqs fail') ) @@ -197,7 +209,7 @@ test('ls-packages bad response', t => { tnock(t, REG).get( '/-/team/myorg/myteam/package?format=cli' ).reply(200, JSON.stringify(null)) - return access.lsPackages('myorg', 'myteam', OPTS).then(data => { + return access.lsPackages('myorg:myteam', OPTS).then(data => { t.deepEqual(data, null, 'succeeds with null') }) }) @@ -217,7 +229,7 @@ test('ls-packages stream', t => { '/-/team/myorg/myteam/package?format=cli' ).reply(200, serverPackages) return getStream.array( - access.lsPackages.stream('myorg', 'myteam', OPTS) + access.lsPackages.stream('myorg:myteam', OPTS) ).then(data => { t.deepEqual(data, clientPackages, 'got streamed client package info') }) @@ -237,7 +249,7 @@ test('ls-collaborators', t => { tnock(t, REG).get( '/-/package/%40foo%2Fbar/collaborators?format=cli' ).reply(200, serverCollaborators) - return access.lsCollaborators('@foo/bar', null, OPTS).then(data => { + return access.lsCollaborators('@foo/bar', OPTS).then(data => { t.deepEqual(data, clientCollaborators, 'got collaborators') }) }) @@ -257,7 +269,7 @@ test('ls-collaborators stream', t => { '/-/package/%40foo%2Fbar/collaborators?format=cli' ).reply(200, serverCollaborators) return getStream.array( - access.lsCollaborators.stream('@foo/bar', null, OPTS) + access.lsCollaborators.stream('@foo/bar', OPTS) ).then(data => { t.deepEqual(data, clientCollaborators, 'got collaborators') }) diff --git a/node_modules/pacote/CHANGELOG.md b/node_modules/pacote/CHANGELOG.md index b3974de0cb27a..e74c2a0a8b702 100644 --- a/node_modules/pacote/CHANGELOG.md +++ b/node_modules/pacote/CHANGELOG.md @@ -2,6 +2,44 @@ 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.3](https://github.com/zkat/pacote/compare/v9.2.2...v9.2.3) (2018-10-31) + + + + +## [9.2.2](https://github.com/zkat/pacote/compare/v9.2.1...v9.2.2) (2018-10-31) + + + + +## [9.2.1](https://github.com/zkat/pacote/compare/v9.2.0...v9.2.1) (2018-10-31) + + + + +# [9.2.0](https://github.com/zkat/pacote/compare/v9.1.1...v9.2.0) (2018-10-30) + + +### Features + +* **enjoyBy:** add opts.enjoy-by option ([7df399c](https://github.com/zkat/pacote/commit/7df399c)) + + + + +## [9.1.1](https://github.com/zkat/pacote/compare/v9.1.0...v9.1.1) (2018-10-26) + + +### Bug Fixes + +* **deps:** bump protoduck to remove CC0-1.0 license in dep ([3d9d9a6](https://github.com/zkat/pacote/commit/3d9d9a6)) +* **git:** Fix temp directory permissions for git fetcher ([#159](https://github.com/zkat/pacote/issues/159)) ([97c3aeb](https://github.com/zkat/pacote/commit/97c3aeb)) +* **packument:** group together all registry specs in silly log ([2333a17](https://github.com/zkat/pacote/commit/2333a17)) +* **standard:** standard --fix ([0ecb188](https://github.com/zkat/pacote/commit/0ecb188)) + + + # [9.1.0](https://github.com/zkat/pacote/compare/v9.0.0...v9.1.0) (2018-08-15) diff --git a/node_modules/pacote/README.md b/node_modules/pacote/README.md index da8cc08a2eca5..8d160b7cb73ed 100644 --- a/node_modules/pacote/README.md +++ b/node_modules/pacote/README.md @@ -229,6 +229,16 @@ for package specs that are not already packaged, such as git and directory dependencies. The default `opts.dirPacker` does not execute `prepare` scripts, even though npm itself does. +##### `opts.enjoy-by` + +* Alias: `opts.enjoyBy` +* Type: Date-able +* Default: undefined + +If passed in, will be used while resolving to filter the versions for **registry +dependencies** such that versions published **after** `opts.enjoy-by` are not +considered -- as if they'd never been published. + ##### `opts.include-deprecated` * Alias: `opts.includeDeprecated` diff --git a/node_modules/pacote/lib/fetch.js b/node_modules/pacote/lib/fetch.js index f9fdb642b024a..36fb6b6d3da1a 100644 --- a/node_modules/pacote/lib/fetch.js +++ b/node_modules/pacote/lib/fetch.js @@ -8,7 +8,7 @@ const Fetcher = duck.define(['spec', 'opts', 'manifest'], { tarball: ['spec', 'opts'], fromManifest: ['manifest', 'spec', 'opts'], clearMemoized () {} -}, {name: 'Fetcher'}) +}, { name: 'Fetcher' }) module.exports = Fetcher module.exports.packument = packument diff --git a/node_modules/pacote/lib/fetchers/directory.js b/node_modules/pacote/lib/fetchers/directory.js index 146ba334427ed..83f3d7d558cb1 100644 --- a/node_modules/pacote/lib/fetchers/directory.js +++ b/node_modules/pacote/lib/fetchers/directory.js @@ -34,11 +34,11 @@ Fetcher.impl(fetchDirectory, { const pkgPath = path.join(spec.fetchSpec, 'package.json') const srPath = path.join(spec.fetchSpec, 'npm-shrinkwrap.json') return BB.join( - readFileAsync(pkgPath).then(JSON.parse).catch({code: 'ENOENT'}, err => { + readFileAsync(pkgPath).then(JSON.parse).catch({ code: 'ENOENT' }, err => { err.code = 'ENOPACKAGEJSON' throw err }), - readFileAsync(srPath).then(JSON.parse).catch({code: 'ENOENT'}, () => null), + readFileAsync(srPath).then(JSON.parse).catch({ code: 'ENOENT' }, () => null), (pkg, sr) => { pkg._shrinkwrap = sr pkg._hasShrinkwrap = !!sr @@ -50,7 +50,7 @@ Fetcher.impl(fetchDirectory, { ).then(pkg => { if (!pkg.bin && pkg.directories && pkg.directories.bin) { const dirBin = pkg.directories.bin - return glob(path.join(spec.fetchSpec, dirBin, '/**'), {nodir: true}).then(matches => { + return glob(path.join(spec.fetchSpec, dirBin, '/**'), { nodir: true }).then(matches => { matches.forEach(filePath => { const relative = path.relative(spec.fetchSpec, filePath) if (relative && relative[0] !== '.') { diff --git a/node_modules/pacote/lib/fetchers/file.js b/node_modules/pacote/lib/fetchers/file.js index 6f40c8204e745..6852795c091da 100644 --- a/node_modules/pacote/lib/fetchers/file.js +++ b/node_modules/pacote/lib/fetchers/file.js @@ -43,9 +43,9 @@ Fetcher.impl(fetchFile, { opts.cache, `pacote:tarball:file:${src}`, data, { integrity: opts.integrity } - ).then(integrity => ({data, integrity})) + ).then(integrity => ({ data, integrity })) } else { - return {data} + return { data } } }).then(info => { if (info.integrity) { stream.emit('integrity', info.integrity) } diff --git a/node_modules/pacote/lib/fetchers/git.js b/node_modules/pacote/lib/fetchers/git.js index 5d16a57d21190..c5928c3eabc11 100644 --- a/node_modules/pacote/lib/fetchers/git.js +++ b/node_modules/pacote/lib/fetchers/git.js @@ -157,7 +157,7 @@ function resolve (url, spec, name, opts) { function withTmp (opts, cb) { if (opts.cache) { // cacache has a special facility for working in a tmp dir - return cacache.tmp.withTmp(opts.cache, {tmpPrefix: 'git-clone'}, cb) + return cacache.tmp.withTmp(opts.cache, { tmpPrefix: 'git-clone', uid: opts.uid, gid: opts.gid }, cb) } else { const tmpDir = path.join(osenv.tmpdir(), 'pacote-git-tmp') const tmpName = uniqueFilename(tmpDir, 'git-clone') diff --git a/node_modules/pacote/lib/fetchers/registry/manifest.js b/node_modules/pacote/lib/fetchers/registry/manifest.js index d768e8968bb2d..dc7bdc76b18e2 100644 --- a/node_modules/pacote/lib/fetchers/registry/manifest.js +++ b/node_modules/pacote/lib/fetchers/registry/manifest.js @@ -16,10 +16,13 @@ function manifest (spec, opts) { } function getManifest (spec, opts) { - return fetchPackument(spec, opts).then(packument => { + return fetchPackument(spec, opts.concat({ + fullMetadata: opts.enjoyBy ? true : opts.fullMetadata + })).then(packument => { try { return pickManifest(packument, spec.fetchSpec, { defaultTag: opts.defaultTag, + enjoyBy: opts.enjoyBy, includeDeprecated: opts.includeDeprecated }) } catch (err) { @@ -32,9 +35,12 @@ function getManifest (spec, opts) { preferOffline: false, preferOnline: true }) - return fetchPackument(spec, opts).then(packument => { + return fetchPackument(spec, opts.concat({ + fullMetadata: opts.enjoyBy ? true : opts.fullMetadata + })).then(packument => { return pickManifest(packument, spec.fetchSpec, { - defaultTag: opts.defaultTag + defaultTag: opts.defaultTag, + enjoyBy: opts.enjoyBy }) }) } else { diff --git a/node_modules/pacote/lib/fetchers/registry/tarball.js b/node_modules/pacote/lib/fetchers/registry/tarball.js index 2b53daab4fcec..134153280e6f5 100644 --- a/node_modules/pacote/lib/fetchers/registry/tarball.js +++ b/node_modules/pacote/lib/fetchers/registry/tarball.js @@ -48,7 +48,7 @@ function tarball (spec, opts) { module.exports.fromManifest = fromManifest function fromManifest (manifest, spec, opts) { opts = optCheck(opts) - if (spec.scope) { opts = opts.concat({scope: spec.scope}) } + if (spec.scope) { opts = opts.concat({ scope: spec.scope }) } const stream = new PassThrough() const registry = fetch.pickRegistry(spec, opts) const uri = getTarballUrl(spec, registry, manifest, opts) diff --git a/node_modules/pacote/lib/finalize-manifest.js b/node_modules/pacote/lib/finalize-manifest.js index 2dfa4070f64de..80b379898fe4c 100644 --- a/node_modules/pacote/lib/finalize-manifest.js +++ b/node_modules/pacote/lib/finalize-manifest.js @@ -37,7 +37,7 @@ function finalizeManifest (pkg, spec, opts) { const key = finalKey(pkg, spec) opts = optCheck(opts) - const cachedManifest = (opts.cache && key && !opts.preferOnline && !opts.fullMetadata) + const cachedManifest = (opts.cache && key && !opts.preferOnline && !opts.fullMetadata && !opts.enjoyBy) ? cacache.get.info(opts.cache, key, opts) : BB.resolve(null) @@ -156,7 +156,7 @@ function tarballedProps (pkg, spec, opts) { needsShrinkwrap && jsonFromStream('npm-shrinkwrap.json', extracted), needsManifest && jsonFromStream('package.json', extracted), needsBin && getPaths(extracted), - needsHash && ssri.fromStream(tarStream, {algorithms: ['sha1', 'sha512']}), + needsHash && ssri.fromStream(tarStream, { algorithms: ['sha1', 'sha512'] }), needsExtract && pipe(tarStream, extracted), (sr, mani, paths, hash) => { if (needsManifest && !mani) { diff --git a/node_modules/pacote/lib/util/git.js b/node_modules/pacote/lib/util/git.js index 38b533682a23a..617c29c2ae984 100644 --- a/node_modules/pacote/lib/util/git.js +++ b/node_modules/pacote/lib/util/git.js @@ -74,10 +74,10 @@ function fullClone (repo, committish, target, opts) { if (process.platform === 'win32') { gitArgs.push('--config', 'core.longpaths=true') } - return execGit(gitArgs, {cwd: target}).then(() => { - return execGit(['init'], {cwd: target}) + return execGit(gitArgs, { cwd: target }).then(() => { + return execGit(['init'], { cwd: target }) }).then(() => { - return execGit(['checkout', committish || 'HEAD'], {cwd: target}) + return execGit(['checkout', committish || 'HEAD'], { cwd: target }) }).then(() => { return updateSubmodules(target, opts) }).then(() => headSha(target, opts)) @@ -110,7 +110,7 @@ function updateSubmodules (localRepo, opts) { function headSha (repo, opts) { opts = optCheck(opts) - return execGit(['rev-parse', '--revs-only', 'HEAD'], {cwd: repo}, opts).spread(stdout => { + return execGit(['rev-parse', '--revs-only', 'HEAD'], { cwd: repo }, opts).spread(stdout => { return stdout.trim() }) } @@ -139,7 +139,7 @@ function revs (repo, opts) { if (!ref) { return revs } // ??? if (ref.endsWith(CARET_BRACES)) { return revs } // refs/tags/x^{} crap const type = refType(line) - const doc = {sha, ref, type} + const doc = { sha, ref, type } revs.refs[ref] = doc // We can check out shallow clones on specific SHAs if we have a ref @@ -157,7 +157,7 @@ function revs (repo, opts) { } return revs - }, {versions: {}, 'dist-tags': {}, refs: {}, shas: {}}) + }, { versions: {}, 'dist-tags': {}, refs: {}, shas: {} }) }, err => { err.message = `Error while executing:\n${GITPATH} ls-remote -h -t ${repo}\n\n${err.stderr}\n${err.message}` throw err diff --git a/node_modules/pacote/lib/util/opt-check.js b/node_modules/pacote/lib/util/opt-check.js index 6a1130e1655ed..51520d71eb1c7 100644 --- a/node_modules/pacote/lib/util/opt-check.js +++ b/node_modules/pacote/lib/util/opt-check.js @@ -11,29 +11,31 @@ module.exports = figgyPudding({ defaultTag: 'tag', dirPacker: {}, dmode: {}, + 'enjoy-by': 'enjoyBy', + enjoyBy: {}, fmode: {}, - 'fetch-retries': {default: 2}, - 'fetch-retry-factor': {default: 10}, - 'fetch-retry-maxtimeout': {default: 60000}, - 'fetch-retry-mintimeout': {default: 10000}, + 'fetch-retries': { default: 2 }, + 'fetch-retry-factor': { default: 10 }, + 'fetch-retry-maxtimeout': { default: 60000 }, + 'fetch-retry-mintimeout': { default: 10000 }, fullMetadata: 'full-metadata', - 'full-metadata': {default: false}, + 'full-metadata': { default: false }, gid: {}, - includeDeprecated: {default: true}, + includeDeprecated: { default: true }, 'include-deprecated': 'includeDeprecated', integrity: {}, - log: {default: logger}, + log: { default: logger }, memoize: {}, offline: {}, preferOffline: 'prefer-offline', 'prefer-offline': {}, preferOnline: 'prefer-online', 'prefer-online': {}, - registry: {default: 'https://registry.npmjs.org/'}, + registry: { default: 'https://registry.npmjs.org/' }, resolved: {}, retry: {}, scope: {}, - tag: {default: 'latest'}, + tag: { default: 'latest' }, uid: {}, umask: {}, where: {} diff --git a/node_modules/pacote/lib/util/pack-dir.js b/node_modules/pacote/lib/util/pack-dir.js index 62776692e18d7..157a9a82f8af8 100644 --- a/node_modules/pacote/lib/util/pack-dir.js +++ b/node_modules/pacote/lib/util/pack-dir.js @@ -33,7 +33,7 @@ function packDir (manifest, label, dir, target, opts) { } function mkPacker (dir) { - return packlist({path: dir}).then(files => { + return packlist({ path: dir }).then(files => { return tar.c({ cwd: dir, gzip: true, diff --git a/node_modules/pacote/lib/with-tarball-stream.js b/node_modules/pacote/lib/with-tarball-stream.js index e9320fedd747d..abeba738a1c66 100644 --- a/node_modules/pacote/lib/with-tarball-stream.js +++ b/node_modules/pacote/lib/with-tarball-stream.js @@ -36,7 +36,7 @@ function withTarballStream (spec, opts, streamHandler) { const file = path.resolve(opts.where || '.', opts.resolved.substr(5)) return statAsync(file) .then(() => { - const verifier = ssri.integrityStream({integrity: opts.integrity}) + const verifier = ssri.integrityStream({ integrity: opts.integrity }) const stream = fs.createReadStream(file) .on('error', err => verifier.emit('error', err)) .pipe(verifier) @@ -50,7 +50,7 @@ function withTarballStream (spec, opts, streamHandler) { throw err }) }) - : BB.reject(Object.assign(new Error('no file!'), {code: 'ENOENT'})) + : BB.reject(Object.assign(new Error('no file!'), { code: 'ENOENT' })) const tryDigest = tryFile .catch(err => { @@ -96,10 +96,10 @@ function withTarballStream (spec, opts, streamHandler) { const tardata = fetch.tarball(spec, opts) if (!opts.resolved) { tardata.on('manifest', m => { - opts = opts.concat({resolved: m._resolved}) + opts = opts.concat({ resolved: m._resolved }) }) tardata.on('integrity', i => { - opts = opts.concat({integrity: i}) + opts = opts.concat({ integrity: i }) }) } return BB.try(() => streamHandler(tardata)) @@ -117,7 +117,7 @@ function withTarballStream (spec, opts, streamHandler) { throw err } }) - }, {retries: 1})) + }, { retries: 1 })) } }) diff --git a/node_modules/pacote/node_modules/.bin/semver b/node_modules/pacote/node_modules/.bin/semver new file mode 120000 index 0000000000000..317eb293d8e12 --- /dev/null +++ b/node_modules/pacote/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/node_modules/pacote/node_modules/get-stream/buffer-stream.js b/node_modules/pacote/node_modules/get-stream/buffer-stream.js deleted file mode 100644 index ae45d3d9e7417..0000000000000 --- a/node_modules/pacote/node_modules/get-stream/buffer-stream.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -const PassThrough = require('stream').PassThrough; - -module.exports = opts => { - opts = Object.assign({}, opts); - - const array = opts.array; - let encoding = opts.encoding; - const buffer = encoding === 'buffer'; - let objectMode = false; - - if (array) { - objectMode = !(encoding || buffer); - } else { - encoding = encoding || 'utf8'; - } - - if (buffer) { - encoding = null; - } - - let len = 0; - const ret = []; - const stream = new PassThrough({objectMode}); - - if (encoding) { - stream.setEncoding(encoding); - } - - stream.on('data', chunk => { - ret.push(chunk); - - if (objectMode) { - len = ret.length; - } else { - len += chunk.length; - } - }); - - stream.getBufferedValue = () => { - if (array) { - return ret; - } - - return buffer ? Buffer.concat(ret, len) : ret.join(''); - }; - - stream.getBufferedLength = () => len; - - return stream; -}; diff --git a/node_modules/pacote/node_modules/get-stream/index.js b/node_modules/pacote/node_modules/get-stream/index.js deleted file mode 100644 index 2dc5ee96af2d9..0000000000000 --- a/node_modules/pacote/node_modules/get-stream/index.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -const bufferStream = require('./buffer-stream'); - -function getStream(inputStream, opts) { - if (!inputStream) { - return Promise.reject(new Error('Expected a stream')); - } - - opts = Object.assign({maxBuffer: Infinity}, opts); - - const maxBuffer = opts.maxBuffer; - let stream; - let clean; - - const p = new Promise((resolve, reject) => { - const error = err => { - if (err) { // null check - err.bufferedData = stream.getBufferedValue(); - } - - reject(err); - }; - - stream = bufferStream(opts); - inputStream.once('error', error); - inputStream.pipe(stream); - - stream.on('data', () => { - if (stream.getBufferedLength() > maxBuffer) { - reject(new Error('maxBuffer exceeded')); - } - }); - stream.once('error', error); - stream.on('end', resolve); - - clean = () => { - // some streams doesn't implement the `stream.Readable` interface correctly - if (inputStream.unpipe) { - inputStream.unpipe(stream); - } - }; - }); - - p.then(clean, clean); - - return p.then(() => stream.getBufferedValue()); -} - -module.exports = getStream; -module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'})); -module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true})); diff --git a/node_modules/pacote/node_modules/get-stream/license b/node_modules/pacote/node_modules/get-stream/license deleted file mode 100644 index 654d0bfe94343..0000000000000 --- a/node_modules/pacote/node_modules/get-stream/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -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: - -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. diff --git a/node_modules/pacote/node_modules/get-stream/package.json b/node_modules/pacote/node_modules/get-stream/package.json deleted file mode 100644 index 4a06559695865..0000000000000 --- a/node_modules/pacote/node_modules/get-stream/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_from": "get-stream@^3.0.0", - "_id": "get-stream@3.0.0", - "_inBundle": false, - "_integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "_location": "/pacote/get-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "get-stream@^3.0.0", - "name": "get-stream", - "escapedName": "get-stream", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/pacote" - ], - "_resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "_shasum": "8e943d1358dc37555054ecbe2edb05aa174ede14", - "_spec": "get-stream@^3.0.0", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/get-stream/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Get a stream as a string, buffer, or array", - "devDependencies": { - "ava": "*", - "into-stream": "^3.0.0", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "buffer-stream.js" - ], - "homepage": "https://github.com/sindresorhus/get-stream#readme", - "keywords": [ - "get", - "stream", - "promise", - "concat", - "string", - "str", - "text", - "buffer", - "read", - "data", - "consume", - "readable", - "readablestream", - "array", - "object", - "obj" - ], - "license": "MIT", - "name": "get-stream", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/get-stream.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.0.0", - "xo": { - "esnext": true - } -} diff --git a/node_modules/pacote/node_modules/get-stream/readme.md b/node_modules/pacote/node_modules/get-stream/readme.md deleted file mode 100644 index 73b188fb420f2..0000000000000 --- a/node_modules/pacote/node_modules/get-stream/readme.md +++ /dev/null @@ -1,117 +0,0 @@ -# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream) - -> Get a stream as a string, buffer, or array - - -## Install - -``` -$ npm install --save get-stream -``` - - -## Usage - -```js -const fs = require('fs'); -const getStream = require('get-stream'); -const stream = fs.createReadStream('unicorn.txt'); - -getStream(stream).then(str => { - console.log(str); - /* - ,,))))))));, - __)))))))))))))), - \|/ -\(((((''''((((((((. - -*-==//////(('' . `)))))), - /|\ ))| o ;-. '((((( ,(, - ( `| / ) ;))))' ,_))^;(~ - | | | ,))((((_ _____------~~~-. %,;(;(>';'~ - o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ - ; ''''```` `: `:::|\,__,%% );`'; ~ - | _ ) / `:|`----' `-' - ______/\/~ | / / - /~;;.____/;;' / ___--,-( `;;;/ - / // _;______;'------~~~~~ /;;/\ / - // | | / ; \;;,\ - (<_ | ; /',/-----' _> - \_| ||_ //~;~~~~~~~~~ - `\_| (,~~ - \~\ - ~~ - */ -}); -``` - - -## API - -The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. - -### getStream(stream, [options]) - -Get the `stream` as a string. - -#### options - -##### encoding - -Type: `string`
-Default: `utf8` - -[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. - -##### maxBuffer - -Type: `number`
-Default: `Infinity` - -Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected. - -### getStream.buffer(stream, [options]) - -Get the `stream` as a buffer. - -It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. - -### getStream.array(stream, [options]) - -Get the `stream` as an array of values. - -It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: - -- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). - -- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. - -- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. - - -## Errors - -If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error. - -```js -getStream(streamThatErrorsAtTheEnd('unicorn')) - .catch(err => { - console.log(err.bufferedData); - //=> 'unicorn' - }); -``` - - -## FAQ - -### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)? - -This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package. - - -## Related - -- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pacote/node_modules/minipass/LICENSE b/node_modules/pacote/node_modules/minipass/LICENSE new file mode 100644 index 0000000000000..20a4762540923 --- /dev/null +++ b/node_modules/pacote/node_modules/minipass/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) npm, Inc. and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/pacote/node_modules/minipass/README.md b/node_modules/pacote/node_modules/minipass/README.md new file mode 100644 index 0000000000000..7a83c59ffd709 --- /dev/null +++ b/node_modules/pacote/node_modules/minipass/README.md @@ -0,0 +1,124 @@ +# minipass + +A _very_ minimal implementation of a [PassThrough +stream](https://nodejs.org/api/stream.html#stream_class_stream_passthrough) + +[It's very +fast](https://docs.google.com/spreadsheets/d/1oObKSrVwLX_7Ut4Z6g3fZW-AX1j1-k6w-cDsrkaSbHM/edit#gid=0) +for objects, strings, and buffers. + +Supports pipe()ing (including multi-pipe() and backpressure +transmission), buffering data until either a `data` event handler or +`pipe()` is added (so you don't lose the first chunk), and most other +cases where PassThrough is a good idea. + +There is a `read()` method, but it's much more efficient to consume +data from this stream via `'data'` events or by calling `pipe()` into +some other stream. Calling `read()` requires the buffer to be +flattened in some cases, which requires copying memory. + +There is also no `unpipe()` method. Once you start piping, there is +no stopping it! + +If you set `objectMode: true` in the options, then whatever is written +will be emitted. Otherwise, it'll do a minimal amount of Buffer +copying to ensure proper Streams semantics when `read(n)` is called. + +This is not a `through` or `through2` stream. It doesn't transform +the data, it just passes it right through. If you want to transform +the data, extend the class, and override the `write()` method. Once +you're done transforming the data however you want, call +`super.write()` with the transform output. + +For an example of a stream that extends MiniPass to provide transform +capabilities, check out [minizlib](http://npm.im/minizlib). + +## USAGE + +```js +const MiniPass = require('minipass') +const mp = new MiniPass(options) // optional: { encoding } +mp.write('foo') +mp.pipe(someOtherStream) +mp.end('bar') +``` + +### collecting + +```js +mp.collect().then(all => { + // all is an array of all the data emitted + // encoding is supported in this case, so + // so the result will be a collection of strings if + // an encoding is specified, or buffers/objects if not. + // + // In an async function, you may do + // const data = await stream.collect() +}) +``` + +### iteration + +You can iterate over streams synchronously or asynchronously in +platforms that support it. + +Synchronous iteration will end when the currently available data is +consumed, even if the `end` event has not been reached. In string and +buffer mode, the data is concatenated, so unless multiple writes are +occurring in the same tick as the `read()`, sync iteration loops will +generally only have a single iteration. + +To consume chunks in this way exactly as they have been written, with +no flattening, create the stream with the `{ objectMode: true }` +option. + +```js +const mp = new Minipass({ objectMode: true }) +mp.write('a') +mp.write('b') +for (let letter of mp) { + console.log(letter) // a, b +} +mp.write('c') +mp.write('d') +for (let letter of mp) { + console.log(letter) // c, d +} +mp.write('e') +mp.end() +for (let letter of mp) { + console.log(letter) // e +} +for (let letter of mp) { + console.log(letter) // nothing +} +``` + +Asynchronous iteration will continue until the end event is reached, +consuming all of the data. + +```js +const mp = new Minipass({ encoding: 'utf8' }) + +// some source of some data +let i = 5 +const inter = setInterval(() => { + if (i --> 0) + mp.write(Buffer.from('foo\n', 'utf8')) + else { + mp.end() + clearInterval(inter) + } +}, 100) + +// consume the data with asynchronous iteration +async function consume () { + for await (let chunk of mp) { + console.log(chunk) + } + return 'ok' +} + +consume().then(res => console.log(res)) +// logs `foo\n` 5 times, and then `ok` +``` diff --git a/node_modules/pacote/node_modules/minipass/index.js b/node_modules/pacote/node_modules/minipass/index.js new file mode 100644 index 0000000000000..de472c36e7684 --- /dev/null +++ b/node_modules/pacote/node_modules/minipass/index.js @@ -0,0 +1,375 @@ +'use strict' +const EE = require('events') +const Yallist = require('yallist') +const EOF = Symbol('EOF') +const MAYBE_EMIT_END = Symbol('maybeEmitEnd') +const EMITTED_END = Symbol('emittedEnd') +const CLOSED = Symbol('closed') +const READ = Symbol('read') +const FLUSH = Symbol('flush') +const doIter = process.env._MP_NO_ITERATOR_SYMBOLS_ !== '1' +const ASYNCITERATOR = doIter && Symbol.asyncIterator || Symbol('asyncIterator not implemented') +const ITERATOR = doIter && Symbol.iterator || Symbol('iterator not implemented') +const FLUSHCHUNK = Symbol('flushChunk') +const SD = require('string_decoder').StringDecoder +const ENCODING = Symbol('encoding') +const DECODER = Symbol('decoder') +const FLOWING = Symbol('flowing') +const RESUME = Symbol('resume') +const BUFFERLENGTH = Symbol('bufferLength') +const BUFFERPUSH = Symbol('bufferPush') +const BUFFERSHIFT = Symbol('bufferShift') +const OBJECTMODE = Symbol('objectMode') + +// Buffer in node 4.x < 4.5.0 doesn't have working Buffer.from +// or Buffer.alloc, and Buffer in node 10 deprecated the ctor. +// .M, this is fine .\^/M.. +let B = Buffer +/* istanbul ignore next */ +if (!B.alloc) { + B = require('safe-buffer').Buffer +} + +module.exports = class MiniPass extends EE { + constructor (options) { + super() + this[FLOWING] = false + this.pipes = new Yallist() + this.buffer = new Yallist() + this[OBJECTMODE] = options && options.objectMode || false + if (this[OBJECTMODE]) + this[ENCODING] = null + else + this[ENCODING] = options && options.encoding || null + if (this[ENCODING] === 'buffer') + this[ENCODING] = null + this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null + this[EOF] = false + this[EMITTED_END] = false + this[CLOSED] = false + this.writable = true + this.readable = true + this[BUFFERLENGTH] = 0 + } + + get bufferLength () { return this[BUFFERLENGTH] } + + get encoding () { return this[ENCODING] } + set encoding (enc) { + if (this[OBJECTMODE]) + throw new Error('cannot set encoding in objectMode') + + if (this[ENCODING] && enc !== this[ENCODING] && + (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) + throw new Error('cannot change encoding') + + if (this[ENCODING] !== enc) { + this[DECODER] = enc ? new SD(enc) : null + if (this.buffer.length) + this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk)) + } + + this[ENCODING] = enc + } + + setEncoding (enc) { + this.encoding = enc + } + + write (chunk, encoding, cb) { + if (this[EOF]) + throw new Error('write after end') + + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + + if (!encoding) + encoding = 'utf8' + + // fast-path writing strings of same encoding to a stream with + // an empty buffer, skipping the buffer/decoder dance + if (typeof chunk === 'string' && !this[OBJECTMODE] && + // unless it is a string already ready for us to use + !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { + chunk = B.from(chunk, encoding) + } + + if (B.isBuffer(chunk) && this[ENCODING]) + chunk = this[DECODER].write(chunk) + + try { + return this.flowing + ? (this.emit('data', chunk), this.flowing) + : (this[BUFFERPUSH](chunk), false) + } finally { + this.emit('readable') + if (cb) + cb() + } + } + + read (n) { + try { + if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) + return null + + if (this[OBJECTMODE]) + n = null + + if (this.buffer.length > 1 && !this[OBJECTMODE]) { + if (this.encoding) + this.buffer = new Yallist([ + Array.from(this.buffer).join('') + ]) + else + this.buffer = new Yallist([ + B.concat(Array.from(this.buffer), this[BUFFERLENGTH]) + ]) + } + + return this[READ](n || null, this.buffer.head.value) + } finally { + this[MAYBE_EMIT_END]() + } + } + + [READ] (n, chunk) { + if (n === chunk.length || n === null) + this[BUFFERSHIFT]() + else { + this.buffer.head.value = chunk.slice(n) + chunk = chunk.slice(0, n) + this[BUFFERLENGTH] -= n + } + + this.emit('data', chunk) + + if (!this.buffer.length && !this[EOF]) + this.emit('drain') + + return chunk + } + + end (chunk, encoding, cb) { + if (typeof chunk === 'function') + cb = chunk, chunk = null + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + if (chunk) + this.write(chunk, encoding) + if (cb) + this.once('end', cb) + this[EOF] = true + this.writable = false + if (this.flowing) + this[MAYBE_EMIT_END]() + } + + // don't let the internal resume be overwritten + [RESUME] () { + this[FLOWING] = true + this.emit('resume') + if (this.buffer.length) + this[FLUSH]() + else if (this[EOF]) + this[MAYBE_EMIT_END]() + else + this.emit('drain') + } + + resume () { + return this[RESUME]() + } + + pause () { + this[FLOWING] = false + } + + get flowing () { + return this[FLOWING] + } + + [BUFFERPUSH] (chunk) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] += 1 + else + this[BUFFERLENGTH] += chunk.length + return this.buffer.push(chunk) + } + + [BUFFERSHIFT] () { + if (this.buffer.length) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] -= 1 + else + this[BUFFERLENGTH] -= this.buffer.head.value.length + } + return this.buffer.shift() + } + + [FLUSH] () { + do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) + + if (!this.buffer.length && !this[EOF]) + this.emit('drain') + } + + [FLUSHCHUNK] (chunk) { + return chunk ? (this.emit('data', chunk), this.flowing) : false + } + + pipe (dest, opts) { + if (dest === process.stdout || dest === process.stderr) + (opts = opts || {}).end = false + const p = { dest: dest, opts: opts, ondrain: _ => this[RESUME]() } + this.pipes.push(p) + + dest.on('drain', p.ondrain) + this[RESUME]() + return dest + } + + addListener (ev, fn) { + return this.on(ev, fn) + } + + on (ev, fn) { + try { + return super.on(ev, fn) + } finally { + if (ev === 'data' && !this.pipes.length && !this.flowing) + this[RESUME]() + else if (ev === 'end' && this[EMITTED_END]) { + super.emit('end') + this.removeAllListeners('end') + } + } + } + + get emittedEnd () { + return this[EMITTED_END] + } + + [MAYBE_EMIT_END] () { + if (!this[EMITTED_END] && this.buffer.length === 0 && this[EOF]) { + this.emit('end') + this.emit('prefinish') + this.emit('finish') + if (this[CLOSED]) + this.emit('close') + } + } + + emit (ev, data) { + if (ev === 'data') { + if (!data) + return + + if (this.pipes.length) + this.pipes.forEach(p => p.dest.write(data) || this.pause()) + } else if (ev === 'end') { + if (this[EMITTED_END] === true) + return + + this[EMITTED_END] = true + this.readable = false + + if (this[DECODER]) { + data = this[DECODER].end() + if (data) { + this.pipes.forEach(p => p.dest.write(data)) + super.emit('data', data) + } + } + + this.pipes.forEach(p => { + p.dest.removeListener('drain', p.ondrain) + if (!p.opts || p.opts.end !== false) + p.dest.end() + }) + } else if (ev === 'close') { + this[CLOSED] = true + // don't emit close before 'end' and 'finish' + if (!this[EMITTED_END]) + return + } + + const args = new Array(arguments.length) + args[0] = ev + args[1] = data + if (arguments.length > 2) { + for (let i = 2; i < arguments.length; i++) { + args[i] = arguments[i] + } + } + + try { + return super.emit.apply(this, args) + } finally { + if (ev !== 'end') + this[MAYBE_EMIT_END]() + else + this.removeAllListeners('end') + } + } + + // const all = await stream.collect() + collect () { + return new Promise((resolve, reject) => { + const buf = [] + this.on('data', c => buf.push(c)) + this.on('end', () => resolve(buf)) + this.on('error', reject) + }) + } + + // for await (let chunk of stream) + [ASYNCITERATOR] () { + const next = () => { + const res = this.read() + if (res !== null) + return Promise.resolve({ done: false, value: res }) + + if (this[EOF]) + return Promise.resolve({ done: true }) + + let resolve = null + let reject = null + const onerr = er => { + this.removeListener('data', ondata) + this.removeListener('end', onend) + reject(er) + } + const ondata = value => { + this.removeListener('error', onerr) + this.removeListener('end', onend) + this.pause() + resolve({ value: value, done: !!this[EOF] }) + } + const onend = () => { + this.removeListener('error', onerr) + this.removeListener('data', ondata) + resolve({ done: true }) + } + return new Promise((res, rej) => { + reject = rej + resolve = res + this.once('error', onerr) + this.once('end', onend) + this.once('data', ondata) + }) + } + + return { next } + } + + // for (let chunk of stream) + [ITERATOR] () { + const next = () => { + const value = this.read() + const done = value === null + return { value, done } + } + return { next } + } +} diff --git a/node_modules/pacote/node_modules/minipass/package.json b/node_modules/pacote/node_modules/minipass/package.json new file mode 100644 index 0000000000000..d2adc87994780 --- /dev/null +++ b/node_modules/pacote/node_modules/minipass/package.json @@ -0,0 +1,67 @@ +{ + "_from": "minipass@^2.3.5", + "_id": "minipass@2.3.5", + "_inBundle": false, + "_integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "_location": "/pacote/minipass", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "minipass@^2.3.5", + "name": "minipass", + "escapedName": "minipass", + "rawSpec": "^2.3.5", + "saveSpec": null, + "fetchSpec": "^2.3.5" + }, + "_requiredBy": [ + "/pacote" + ], + "_resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "_shasum": "cacebe492022497f656b0f0f51e2682a9ed2d848", + "_spec": "minipass@^2.3.5", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/minipass/issues" + }, + "bundleDependencies": false, + "dependencies": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + }, + "deprecated": false, + "description": "minimal implementation of a PassThrough stream", + "devDependencies": { + "end-of-stream": "^1.4.0", + "tap": "^12.0.1", + "through2": "^2.0.3" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/isaacs/minipass#readme", + "keywords": [ + "passthrough", + "stream" + ], + "license": "ISC", + "main": "index.js", + "name": "minipass", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/minipass.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.3.5" +} diff --git a/node_modules/pacote/node_modules/npm-pick-manifest/CHANGELOG.md b/node_modules/pacote/node_modules/npm-pick-manifest/CHANGELOG.md new file mode 100644 index 0000000000000..2112665f7572e --- /dev/null +++ b/node_modules/pacote/node_modules/npm-pick-manifest/CHANGELOG.md @@ -0,0 +1,133 @@ +# 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. + + +## [2.2.3](https://github.com/zkat/npm-pick-manifest/compare/v2.2.2...v2.2.3) (2018-10-31) + + +### Bug Fixes + +* **enjoyBy:** rework semantics for enjoyBy again ([5e89b62](https://github.com/zkat/npm-pick-manifest/commit/5e89b62)) + + + + +## [2.2.2](https://github.com/zkat/npm-pick-manifest/compare/v2.2.1...v2.2.2) (2018-10-31) + + +### Bug Fixes + +* **enjoyBy:** rework semantics for enjoyBy ([5684f45](https://github.com/zkat/npm-pick-manifest/commit/5684f45)) + + + + +## [2.2.1](https://github.com/zkat/npm-pick-manifest/compare/v2.2.0...v2.2.1) (2018-10-30) + + + + +# [2.2.0](https://github.com/zkat/npm-pick-manifest/compare/v2.1.0...v2.2.0) (2018-10-30) + + +### Bug Fixes + +* **audit:** npm audit fix --force ([d5ae6c4](https://github.com/zkat/npm-pick-manifest/commit/d5ae6c4)) + + +### Features + +* **enjoyBy:** add opts.enjoyBy option to filter versions by date ([0b8a790](https://github.com/zkat/npm-pick-manifest/commit/0b8a790)) + + + + +# [2.1.0](https://github.com/zkat/npm-pick-manifest/compare/v2.0.1...v2.1.0) (2017-10-18) + + +### Features + +* **selection:** allow manually disabling deprecation skipping ([0d239d3](https://github.com/zkat/npm-pick-manifest/commit/0d239d3)) + + + + +## [2.0.1](https://github.com/zkat/npm-pick-manifest/compare/v2.0.0...v2.0.1) (2017-10-18) + + + + +# [2.0.0](https://github.com/zkat/npm-pick-manifest/compare/v1.0.4...v2.0.0) (2017-10-03) + + +### Bug Fixes + +* **license:** relicense project according to npm policy (#3) ([ed743a0](https://github.com/zkat/npm-pick-manifest/commit/ed743a0)) + + +### Features + +* **selection:** Avoid matching deprecated packages if possible ([3fc6c3a](https://github.com/zkat/npm-pick-manifest/commit/3fc6c3a)) + + +### BREAKING CHANGES + +* **selection:** deprecated versions may be skipped now +* **license:** This moves the license from CC0 to ISC and properly documents the copyright as belonging to npm, Inc. + + + + +## [1.0.4](https://github.com/zkat/npm-pick-manifest/compare/v1.0.3...v1.0.4) (2017-06-29) + + +### Bug Fixes + +* **npa:** bump npa version for bugfixes ([7cdaca7](https://github.com/zkat/npm-pick-manifest/commit/7cdaca7)) +* **semver:** use loose semver parsing for *all* ops ([bbc0daa](https://github.com/zkat/npm-pick-manifest/commit/bbc0daa)) + + + + +## [1.0.3](https://github.com/zkat/npm-pick-manifest/compare/v1.0.2...v1.0.3) (2017-05-04) + + +### Bug Fixes + +* **semver:** use semver.clean() instead ([f4133b5](https://github.com/zkat/npm-pick-manifest/commit/f4133b5)) + + + + +## [1.0.2](https://github.com/zkat/npm-pick-manifest/compare/v1.0.1...v1.0.2) (2017-05-04) + + +### Bug Fixes + +* **picker:** spaces in `wanted` prevented match ([97a7d0a](https://github.com/zkat/npm-pick-manifest/commit/97a7d0a)) + + + + +## [1.0.1](https://github.com/zkat/npm-pick-manifest/compare/v1.0.0...v1.0.1) (2017-04-24) + + +### Bug Fixes + +* **deps:** forgot to add semver ([1876f4f](https://github.com/zkat/npm-pick-manifest/commit/1876f4f)) + + + + +# 1.0.0 (2017-04-24) + + +### Features + +* **api:** initial implementation. ([b086912](https://github.com/zkat/npm-pick-manifest/commit/b086912)) + + +### BREAKING CHANGES + +* **api:** ex nihilo diff --git a/node_modules/pacote/node_modules/npm-pick-manifest/LICENSE.md b/node_modules/pacote/node_modules/npm-pick-manifest/LICENSE.md new file mode 100644 index 0000000000000..8d28acf866d93 --- /dev/null +++ b/node_modules/pacote/node_modules/npm-pick-manifest/LICENSE.md @@ -0,0 +1,16 @@ +ISC License + +Copyright (c) npm, Inc. + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/pacote/node_modules/npm-pick-manifest/README.md b/node_modules/pacote/node_modules/npm-pick-manifest/README.md new file mode 100644 index 0000000000000..a9a027bfcb460 --- /dev/null +++ b/node_modules/pacote/node_modules/npm-pick-manifest/README.md @@ -0,0 +1,84 @@ +# npm-pick-manifest [![npm version](https://img.shields.io/npm/v/npm-pick-manifest.svg)](https://npm.im/npm-pick-manifest) [![license](https://img.shields.io/npm/l/npm-pick-manifest.svg)](https://npm.im/npm-pick-manifest) [![Travis](https://img.shields.io/travis/zkat/npm-pick-manifest.svg)](https://travis-ci.org/zkat/npm-pick-manifest) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/npm-pick-manifest?svg=true)](https://ci.appveyor.com/project/zkat/npm-pick-manifest) [![Coverage Status](https://coveralls.io/repos/github/zkat/npm-pick-manifest/badge.svg?branch=latest)](https://coveralls.io/github/zkat/npm-pick-manifest?branch=latest) + +[`npm-pick-manifest`](https://github.com/zkat/npm-pick-manifest) is a standalone +implementation of [npm](https://npmjs.com)'s semver range resolution algorithm. + +## Install + +`$ npm install --save npm-pick-manifest` + +## Table of Contents + +* [Example](#example) +* [Features](#features) +* [Contributing](#contributing) +* [API](#api) + * [`pickManifest()`](#pick-manifest) + +### Example + +```javascript +const pickManifest = require('npm-pick-manifest') + +fetch('https://registry.npmjs.org/npm-pick-manifest').then(res => { + return res.json() +}).then(packument => { + return pickManifest(packument, '^1.0.0') +}) // get same manifest as npm would get if you `npm i npm-pick-manifest@^1.0.0` +``` + +### Features + +* Uses npm's exact semver resolution algorithm +* Supports ranges, tags, and versions + +### Contributing + +The npm-pick-manifest team enthusiastically welcomes contributions and project participation! +There's a bunch of things you can do if you want to contribute! The [Contributor +Guide](CONTRIBUTING.md) has all the information you need for everything from +reporting bugs to contributing entire new features. Please don't hesitate to +jump in if you'd like to, or even ask us questions if something isn't clear. + +### API + +#### `> pickManifest(packument, selector, [opts]) -> manifest` + +Returns the manifest that matches `selector`, or throws an error. + +Packuments are anything returned by metadata URLs from the npm registry. That +is, they're objects with the following shape (only fields used by +`npm-pick-manifest` included): + +```javascript +{ + name: 'some-package', + 'dist-tags': { + foo: '1.0.1' + }, + versions: { + '1.0.0': { version: '1.0.0' }, + '1.0.1': { version: '1.0.1' }, + '1.0.2': { version: '1.0.2' }, + '2.0.0': { version: '2.0.0' } + } +} +``` + +The algorithm will follow npm's algorithm for semver resolution, and only `tag`, +`range`, and `version` selectors are supported. + +The function will throw `ETARGET` if there was no matching manifest, and +`ENOVERSIONS` if the packument object has no valid versions in `versions`. + +If `opts.defaultTag` is provided, it will be used instead of `latest`. That is, +if that tag matches the selector, it will be used, even if a higher available +version matches the range. + +If `opts.enjoyBy` is provided, it should be something that can be passed to `new +Date(x)`, such as a `Date` object or a timestamp string. It will be used to +filter the selected versions such that only versions less than or equal to +`enjoyBy` are considered. + +If `opts.includeDeprecated` passed in as true, deprecated versions will be +selected. By default, deprecated versions other than `defaultTag` are ignored. diff --git a/node_modules/pacote/node_modules/npm-pick-manifest/index.js b/node_modules/pacote/node_modules/npm-pick-manifest/index.js new file mode 100644 index 0000000000000..d9a8373e57f14 --- /dev/null +++ b/node_modules/pacote/node_modules/npm-pick-manifest/index.js @@ -0,0 +1,121 @@ +'use strict' + +const figgyPudding = require('figgy-pudding') +const npa = require('npm-package-arg') +const semver = require('semver') + +const PickerOpts = figgyPudding({ + defaultTag: { default: 'latest' }, + enjoyBy: {}, + includeDeprecated: { default: false } +}) + +module.exports = pickManifest +function pickManifest (packument, wanted, opts) { + opts = PickerOpts(opts) + const time = opts.enjoyBy && packument.time && +(new Date(opts.enjoyBy)) + const spec = npa.resolve(packument.name, wanted) + const type = spec.type + if (type === 'version' || type === 'range') { + wanted = semver.clean(wanted, true) || wanted + } + const distTags = packument['dist-tags'] || {} + const versions = Object.keys(packument.versions || {}).filter(v => { + return semver.valid(v, true) + }) + + function enjoyableBy (v) { + return !time || ( + packument.time[v] && time >= +(new Date(packument.time[v])) + ) + } + + let err + + if (!versions.length) { + err = new Error(`No valid versions available for ${packument.name}`) + err.code = 'ENOVERSIONS' + err.name = packument.name + err.type = type + err.wanted = wanted + throw err + } + + let target + + if (type === 'tag' && enjoyableBy(distTags[wanted])) { + target = distTags[wanted] + } else if (type === 'version') { + target = wanted + } else if (type !== 'range' && enjoyableBy(distTags[wanted])) { + throw new Error('Only tag, version, and range are supported') + } + + const tagVersion = distTags[opts.defaultTag] + + if ( + !target && + tagVersion && + packument.versions[tagVersion] && + enjoyableBy(tagVersion) && + semver.satisfies(tagVersion, wanted, true) + ) { + target = tagVersion + } + + if (!target && !opts.includeDeprecated) { + const undeprecated = versions.filter(v => !packument.versions[v].deprecated && enjoyableBy(v) + ) + target = semver.maxSatisfying(undeprecated, wanted, true) + } + if (!target) { + const stillFresh = versions.filter(enjoyableBy) + target = semver.maxSatisfying(stillFresh, wanted, true) + } + + if (!target && wanted === '*' && enjoyableBy(tagVersion)) { + // This specific corner is meant for the case where + // someone is using `*` as a selector, but all versions + // are pre-releases, which don't match ranges at all. + target = tagVersion + } + + if ( + !target && + time && + type === 'tag' && + distTags[wanted] && + !enjoyableBy(distTags[wanted]) + ) { + const stillFresh = versions.filter(v => + enjoyableBy(v) && semver.lte(v, distTags[wanted], true) + ).sort(semver.rcompare) + target = stillFresh[0] + } + + const manifest = ( + target && + packument.versions[target] + ) + if (!manifest) { + err = new Error( + `No matching version found for ${packument.name}@${wanted}${ + opts.enjoyBy + ? ` with an Enjoy By date of ${ + new Date(opts.enjoyBy).toLocaleString() + }. Maybe try a different date?` + : '' + }` + ) + err.code = 'ETARGET' + err.name = packument.name + err.type = type + err.wanted = wanted + err.versions = versions + err.distTags = distTags + err.defaultTag = opts.defaultTag + throw err + } else { + return manifest + } +} diff --git a/node_modules/pacote/node_modules/npm-pick-manifest/package.json b/node_modules/pacote/node_modules/npm-pick-manifest/package.json new file mode 100644 index 0000000000000..b4cf0e455de99 --- /dev/null +++ b/node_modules/pacote/node_modules/npm-pick-manifest/package.json @@ -0,0 +1,82 @@ +{ + "_from": "npm-pick-manifest@^2.2.3", + "_id": "npm-pick-manifest@2.2.3", + "_inBundle": false, + "_integrity": "sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==", + "_location": "/pacote/npm-pick-manifest", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "npm-pick-manifest@^2.2.3", + "name": "npm-pick-manifest", + "escapedName": "npm-pick-manifest", + "rawSpec": "^2.2.3", + "saveSpec": null, + "fetchSpec": "^2.2.3" + }, + "_requiredBy": [ + "/pacote" + ], + "_resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz", + "_shasum": "32111d2a9562638bb2c8f2bf27f7f3092c8fae40", + "_spec": "npm-pick-manifest@^2.2.3", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote", + "author": { + "name": "Kat Marchán", + "email": "kzm@sykosomatic.org" + }, + "bugs": { + "url": "https://github.com/zkat/npm-pick-manifest/issues" + }, + "bundleDependencies": false, + "config": { + "nyc": { + "exclude": [ + "node_modules/**", + "test/**" + ] + } + }, + "dependencies": { + "figgy-pudding": "^3.5.1", + "npm-package-arg": "^6.0.0", + "semver": "^5.4.1" + }, + "deprecated": false, + "description": "Resolves a matching manifest from a package metadata document according to standard npm semver resolution rules.", + "devDependencies": { + "nyc": "^13.1.0", + "standard": "^10.0.3", + "standard-version": "^4.4.0", + "tap": "^12.0.1", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.8" + }, + "files": [ + "*.js" + ], + "homepage": "https://github.com/zkat/npm-pick-manifest#readme", + "keywords": [ + "npm", + "semver", + "package manager" + ], + "license": "ISC", + "main": "index.js", + "name": "npm-pick-manifest", + "repository": { + "type": "git", + "url": "git+https://github.com/zkat/npm-pick-manifest.git" + }, + "scripts": { + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --100 --coverage test/*.js", + "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": "2.2.3" +} diff --git a/node_modules/pacote/node_modules/semver/LICENSE b/node_modules/pacote/node_modules/semver/LICENSE new file mode 100644 index 0000000000000..19129e315fe59 --- /dev/null +++ b/node_modules/pacote/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/pacote/node_modules/semver/README.md b/node_modules/pacote/node_modules/semver/README.md new file mode 100644 index 0000000000000..e0edbb7333112 --- /dev/null +++ b/node_modules/pacote/node_modules/semver/README.md @@ -0,0 +1,399 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install --save semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the http://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver +string to semver. It looks for the first digit in a string, and +consumes all remaining characters which satisfy at least a partial semver +(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). +Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). +All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). +Only text which lacks digits will fail coercion (`version one` is not valid). +The maximum length for any semver component considered for coercion is 16 characters; +longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). +The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; +higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/pacote/node_modules/semver/bin/semver b/node_modules/pacote/node_modules/semver/bin/semver new file mode 100755 index 0000000000000..9100ed42b8821 --- /dev/null +++ b/node_modules/pacote/node_modules/semver/bin/semver @@ -0,0 +1,153 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + , versions = [] + , range = [] + , gt = [] + , lt = [] + , eq = [] + , inc = null + , version = require("../package.json").version + , loose = false + , includePrerelease = false + , coerce = false + , identifier = undefined + , semver = require("../semver") + , reverse = false + , options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var i = a.indexOf('=') + if (i !== -1) { + a = a.slice(0, i) + argv.unshift(a.slice(i + 1)) + } + switch (a) { + case "-rv": case "-rev": case "--rev": case "--reverse": + reverse = true + break + case "-l": case "--loose": + loose = true + break + case "-p": case "--include-prerelease": + includePrerelease = true + break + case "-v": case "--version": + versions.push(argv.shift()) + break + case "-i": case "--inc": case "--increment": + switch (argv[0]) { + case "major": case "minor": case "patch": case "prerelease": + case "premajor": case "preminor": case "prepatch": + inc = argv.shift() + break + default: + inc = "patch" + break + } + break + case "--preid": + identifier = argv.shift() + break + case "-r": case "--range": + range.push(argv.shift()) + break + case "-c": case "--coerce": + coerce = true + break + case "-h": case "--help": case "-?": + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v) || {version: v}).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) + return failInc() + + for (var i = 0, l = range.length; i < l ; i ++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error("--inc can only be used on a single version with no range") + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? "rcompare" : "compare" + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v,i,_) { console.log(v) }) +} + +function help () { + console.log(["SemVer " + version + ,"" + ,"A JavaScript implementation of the http://semver.org/ specification" + ,"Copyright Isaac Z. Schlueter" + ,"" + ,"Usage: semver [options] [ [...]]" + ,"Prints valid versions sorted by SemVer precedence" + ,"" + ,"Options:" + ,"-r --range " + ," Print versions that match the specified range." + ,"" + ,"-i --increment []" + ," Increment a version by the specified level. Level can" + ," be one of: major, minor, patch, premajor, preminor," + ," prepatch, or prerelease. Default level is 'patch'." + ," Only one version may be specified." + ,"" + ,"--preid " + ," Identifier to be used to prefix premajor, preminor," + ," prepatch or prerelease version increments." + ,"" + ,"-l --loose" + ," Interpret versions and ranges loosely" + ,"" + ,"-p --include-prerelease" + ," Always include prerelease versions in range matching" + ,"" + ,"-c --coerce" + ," Coerce a string into SemVer if possible" + ," (does not imply --loose)" + ,"" + ,"Program exits successfully if any valid version satisfies" + ,"all supplied ranges, and prints all satisfying versions." + ,"" + ,"If no satisfying versions are found, then exits failure." + ,"" + ,"Versions are printed in ascending order, so supplying" + ,"multiple versions to the utility will just sort them." + ].join("\n")) +} diff --git a/node_modules/pacote/node_modules/semver/package.json b/node_modules/pacote/node_modules/semver/package.json new file mode 100644 index 0000000000000..285d247241552 --- /dev/null +++ b/node_modules/pacote/node_modules/semver/package.json @@ -0,0 +1,55 @@ +{ + "_from": "semver@^5.6.0", + "_id": "semver@5.6.0", + "_inBundle": false, + "_integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "_location": "/pacote/semver", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "semver@^5.6.0", + "name": "semver", + "escapedName": "semver", + "rawSpec": "^5.6.0", + "saveSpec": null, + "fetchSpec": "^5.6.0" + }, + "_requiredBy": [ + "/pacote", + "/pacote/npm-pick-manifest" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "_shasum": "7e74256fbaa49c75aa7c7a205cc22799cac80004", + "_spec": "semver@^5.6.0", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote", + "bin": { + "semver": "./bin/semver" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "The semantic version parser used by npm.", + "devDependencies": { + "tap": "^12.0.1" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "test": "tap test/*.js --cov -J" + }, + "version": "5.6.0" +} diff --git a/node_modules/pacote/node_modules/semver/range.bnf b/node_modules/pacote/node_modules/semver/range.bnf new file mode 100644 index 0000000000000..d4c6ae0d76c9a --- /dev/null +++ b/node_modules/pacote/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/pacote/node_modules/semver/semver.js b/node_modules/pacote/node_modules/semver/semver.js new file mode 100644 index 0000000000000..0cc57350c2c8e --- /dev/null +++ b/node_modules/pacote/node_modules/semver/semver.js @@ -0,0 +1,1352 @@ +exports = module.exports = SemVer; + +// The debug function is excluded entirely from the minified version. +/* nomin */ var debug; +/* nomin */ if (typeof process === 'object' && + /* nomin */ process.env && + /* nomin */ process.env.NODE_DEBUG && + /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ debug = function() { + /* nomin */ var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ args.unshift('SEMVER'); + /* nomin */ console.log.apply(console, args); + /* nomin */ }; +/* nomin */ else + /* nomin */ debug = function() {}; + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0'; + +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16; + +// The actual regexps go on exports.re +var re = exports.re = []; +var src = exports.src = []; +var R = 0; + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; + + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; + + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')'; + +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; + + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?'; + +src[FULL] = '^' + FULLPLAIN + '$'; + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?'; + +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; + +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++; +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])'; + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; + +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; + +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; + +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; + +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; + + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; + + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$'; + +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$'; + +// Star ranges basically just allow anything at all. +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) + re[i] = new RegExp(src[i]); +} + +exports.parse = parse; +function parse(version, options) { + if (!options || typeof options !== 'object') + options = { loose: !!options, includePrerelease: false } + + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + if (version.length > MAX_LENGTH) + return null; + + var r = options.loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) + return null; + + try { + return new SemVer(version, options); + } catch (er) { + return null; + } +} + +exports.valid = valid; +function valid(version, options) { + var v = parse(version, options); + return v ? v.version : null; +} + + +exports.clean = clean; +function clean(version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options); + return s ? s.version : null; +} + +exports.SemVer = SemVer; + +function SemVer(version, options) { + if (!options || typeof options !== 'object') + options = { loose: !!options, includePrerelease: false } + if (version instanceof SemVer) { + if (version.loose === options.loose) + return version; + else + version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + + if (!(this instanceof SemVer)) + return new SemVer(version, options); + + debug('SemVer', version, options); + this.options = options; + this.loose = !!options.loose; + + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]); + + if (!m) + throw new TypeError('Invalid Version: ' + version); + + this.raw = version; + + // these are actually numbers + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) + throw new TypeError('Invalid major version') + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + throw new TypeError('Invalid minor version') + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + throw new TypeError('Invalid patch version') + + // numberify any prerelease numeric ids + if (!m[4]) + this.prerelease = []; + else + this.prerelease = m[4].split('.').map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) + return num; + } + return id; + }); + + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} + +SemVer.prototype.format = function() { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) + this.version += '-' + this.prerelease.join('.'); + return this.version; +}; + +SemVer.prototype.toString = function() { + return this.version; +}; + +SemVer.prototype.compare = function(other) { + debug('SemVer.compare', this.version, this.options, other); + if (!(other instanceof SemVer)) + other = new SemVer(other, this.options); + + return this.compareMain(other) || this.comparePre(other); +}; + +SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.options); + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch); +}; + +SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.options); + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) + return -1; + else if (!this.prerelease.length && other.prerelease.length) + return 1; + else if (!this.prerelease.length && !other.prerelease.length) + return 0; + + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) + return 0; + else if (b === undefined) + return 1; + else if (a === undefined) + return -1; + else if (a === b) + continue; + else + return compareIdentifiers(a, b); + } while (++i); +}; + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) + this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) + this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) + this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) + this.prerelease = [identifier, 0]; + } else + this.prerelease = [identifier, 0]; + } + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + this.format(); + this.raw = this.version; + return this; +}; + +exports.inc = inc; +function inc(version, release, loose, identifier) { + if (typeof(loose) === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} + +exports.diff = diff; +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre'+key; + } + } + } + return 'prerelease'; + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} + +exports.compareIdentifiers = compareIdentifiers; + +var numeric = /^[0-9]+$/; +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return (anum && !bnum) ? -1 : + (bnum && !anum) ? 1 : + a < b ? -1 : + a > b ? 1 : + 0; +} + +exports.rcompareIdentifiers = rcompareIdentifiers; +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} + +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + +exports.compare = compare; +function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); +} + +exports.compareLoose = compareLoose; +function compareLoose(a, b) { + return compare(a, b, true); +} + +exports.rcompare = rcompare; +function rcompare(a, b, loose) { + return compare(b, a, loose); +} + +exports.sort = sort; +function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compare(a, b, loose); + }); +} + +exports.rsort = rsort; +function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.rcompare(a, b, loose); + }); +} + +exports.gt = gt; +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} + +exports.lt = lt; +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} + +exports.eq = eq; +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} + +exports.neq = neq; +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} + +exports.gte = gte; +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} + +exports.lte = lte; +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} + +exports.cmp = cmp; +function cmp(a, op, b, loose) { + var ret; + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + case '': case '=': case '==': ret = eq(a, b, loose); break; + case '!=': ret = neq(a, b, loose); break; + case '>': ret = gt(a, b, loose); break; + case '>=': ret = gte(a, b, loose); break; + case '<': ret = lt(a, b, loose); break; + case '<=': ret = lte(a, b, loose); break; + default: throw new TypeError('Invalid operator: ' + op); + } + return ret; +} + +exports.Comparator = Comparator; +function Comparator(comp, options) { + if (!options || typeof options !== 'object') + options = { loose: !!options, includePrerelease: false } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) + return comp; + else + comp = comp.value; + } + + if (!(this instanceof Comparator)) + return new Comparator(comp, options); + + debug('comparator', comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + + if (this.semver === ANY) + this.value = ''; + else + this.value = this.operator + this.semver.version; + + debug('comp', this); +} + +var ANY = {}; +Comparator.prototype.parse = function(comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + + if (!m) + throw new TypeError('Invalid comparator: ' + comp); + + this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) + this.semver = ANY; + else + this.semver = new SemVer(m[2], this.options.loose); +}; + +Comparator.prototype.toString = function() { + return this.value; +}; + +Comparator.prototype.test = function(version) { + debug('Comparator.test', version, this.options.loose); + + if (this.semver === ANY) + return true; + + if (typeof version === 'string') + version = new SemVer(version, this.options); + + return cmp(version, this.operator, this.semver, this.options); +}; + +Comparator.prototype.intersects = function(comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + + if (!options || typeof options !== 'object') + options = { loose: !!options, includePrerelease: false } + + var rangeTmp; + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options); + return satisfies(this.value, rangeTmp, options); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options); + return satisfies(comp.semver, rangeTmp, options); + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')); + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')); + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; +}; + + +exports.Range = Range; +function Range(range, options) { + if (!options || typeof options !== 'object') + options = { loose: !!options, includePrerelease: false } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options); + } + + if (!(this instanceof Range)) + return new Range(range, options); + + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); +} + +Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; + +Range.prototype.toString = function() { + return this.range; +}; + +Range.prototype.parseRange = function(range) { + var loose = this.options.loose; + range = range.trim(); + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace); + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace); + + // normalize spaces + range = range.split(/\s+/).join(' '); + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function(comp) { + return parseComparator(comp, this.options); + }, this).join(' ').split(/\s+/); + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, this.options); + }, this); + + return set; +}; + +Range.prototype.intersects = function(range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } + + return this.set.some(function(thisComparators) { + return thisComparators.every(function(thisComparator) { + return range.set.some(function(rangeComparators) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); +}; + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators; +function toComparators(range, options) { + return new Range(range, options).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(' ').trim().split(' '); + }); +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator(comp, options) { + debug('comp', comp, options); + comp = replaceCarets(comp, options); + debug('caret', comp); + comp = replaceTildes(comp, options); + debug('tildes', comp); + comp = replaceXRanges(comp, options); + debug('xrange', comp); + comp = replaceStars(comp, options); + debug('stars', comp); + return comp; +} + +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, options) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, options); + }).join(' '); +} + +function replaceTilde(comp, options) { + if (!options || typeof options !== 'object') + options = { loose: !!options, includePrerelease: false } + var r = options.loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + + debug('tilde return', ret); + return ret; + }); +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, options) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, options); + }).join(' '); +} + +function replaceCaret(comp, options) { + debug('caret', comp, options); + if (!options || typeof options !== 'object') + options = { loose: !!options, includePrerelease: false } + var r = options.loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } + + debug('caret return', ret); + return ret; + }); +} + +function replaceXRanges(comp, options) { + debug('replaceXRanges', comp, options); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, options); + }).join(' '); +} + +function replaceXRange(comp, options) { + comp = comp.trim(); + if (!options || typeof options !== 'object') + options = { loose: !!options, includePrerelease: false } + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + + if (gtlt === '=' && anyX) + gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) + M = +M + 1; + else + m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + + return ret; + }); +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, options) { + debug('replaceStars', comp, options); + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; + + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; + + return (from + ' ' + to).trim(); +} + + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; + + if (typeof version === 'string') + version = new SemVer(version, this.options); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) + return true; + } + return false; +}; + +function testSet(set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } + + if (!options) + options = {} + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) + continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false; + } + + return true; +} + +exports.satisfies = satisfies; +function satisfies(version, range, options) { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, options) { + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) + max = v; + maxSV = new SemVer(max, options); + } + } + }) + return max; +} + +exports.minSatisfying = minSatisfying; +function minSatisfying(versions, range, options) { + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { // compare(min, v, true) + min = v; + minSV = new SemVer(min, options); + } + } + }) + return min; +} + +exports.validRange = validRange; +function validRange(range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*'; + } catch (er) { + return null; + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, options) { + return outside(version, range, '<', options); +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, options) { + return outside(version, range, '>', options); +} + +exports.outside = outside; +function outside(version, range, hilo, options) { + version = new SemVer(version, options); + range = new Range(range, options); + + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false; + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + + var high = null; + var low = null; + + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; +} + +exports.prerelease = prerelease; +function prerelease(version, options) { + var parsed = parse(version, options); + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; +} + +exports.intersects = intersects; +function intersects(r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce; +function coerce(version) { + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + var match = version.match(re[COERCE]); + + if (match == null) + return null; + + return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); +} diff --git a/node_modules/pacote/node_modules/unique-filename/LICENSE b/node_modules/pacote/node_modules/unique-filename/LICENSE new file mode 100644 index 0000000000000..69619c125ea7e --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/LICENSE @@ -0,0 +1,5 @@ +Copyright npm, Inc + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/pacote/node_modules/unique-filename/README.md b/node_modules/pacote/node_modules/unique-filename/README.md new file mode 100644 index 0000000000000..74b62b2ab4426 --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/README.md @@ -0,0 +1,33 @@ +unique-filename +=============== + +Generate a unique filename for use in temporary directories or caches. + +``` +var uniqueFilename = require('unique-filename') + +// returns something like: /tmp/912ec803b2ce49e4a541068d495ab570 +var randomTmpfile = uniqueFilename(os.tmpdir()) + +// returns something like: /tmp/my-test-912ec803b2ce49e4a541068d495ab570 +var randomPrefixedTmpfile = uniqueFilename(os.tmpdir(), 'my-test') + +var uniqueTmpfile = uniqueFilename('/tmp', 'testing', '/my/thing/to/uniq/on') +``` + +### uniqueFilename(*dir*, *fileprefix*, *uniqstr*) → String + +Returns the full path of a unique filename that looks like: +`dir/prefix-7ddd44c0` +or `dir/7ddd44c0` + +*dir* – The path you want the filename in. `os.tmpdir()` is a good choice for this. + +*fileprefix* – A string to append prior to the unique part of the filename. +The parameter is required if *uniqstr* is also passed in but is otherwise +optional and can be `undefined`/`null`/`''`. If present and not empty +then this string plus a hyphen are prepended to the unique part. + +*uniqstr* – Optional, if not passed the unique part of the resulting +filename will be random. If passed in it will be generated from this string +in a reproducable way. diff --git a/node_modules/pacote/node_modules/unique-filename/coverage/__root__/index.html b/node_modules/pacote/node_modules/unique-filename/coverage/__root__/index.html new file mode 100644 index 0000000000000..cd55391a67a4c --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/coverage/__root__/index.html @@ -0,0 +1,73 @@ + + + + Code coverage report for __root__/ + + + + + + +
+

Code coverage report for __root__/

+

+ Statements: 100% (4 / 4)      + Branches: 100% (2 / 2)      + Functions: 100% (1 / 1)      + Lines: 100% (4 / 4)      + Ignored: none      +

+
All files » __root__/
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
+
+
+ + + + + + diff --git a/node_modules/pacote/node_modules/unique-filename/coverage/__root__/index.js.html b/node_modules/pacote/node_modules/unique-filename/coverage/__root__/index.js.html new file mode 100644 index 0000000000000..02e5768d3fb64 --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/coverage/__root__/index.js.html @@ -0,0 +1,69 @@ + + + + Code coverage report for index.js + + + + + + +
+

Code coverage report for index.js

+

+ Statements: 100% (4 / 4)      + Branches: 100% (2 / 2)      + Functions: 100% (1 / 1)      + Lines: 100% (4 / 4)      + Ignored: none      +

+
All files » __root__/ » index.js
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9  +1 +  +1 +  +1 +6 +  + 
'use strict'
+var path = require('path')
+ 
+var uniqueSlug = require('unique-slug')
+ 
+module.exports = function (filepath, prefix, uniq) {
+  return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq))
+}
+ 
+ +
+ + + + + + diff --git a/node_modules/pacote/node_modules/unique-filename/coverage/base.css b/node_modules/pacote/node_modules/unique-filename/coverage/base.css new file mode 100644 index 0000000000000..a6a2f3284d022 --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/coverage/base.css @@ -0,0 +1,182 @@ +body, html { + margin:0; padding: 0; +} +body { + font-family: Helvetica Neue, Helvetica,Arial; + font-size: 10pt; +} +div.header, div.footer { + background: #eee; + padding: 1em; +} +div.header { + z-index: 100; + position: fixed; + top: 0; + border-bottom: 1px solid #666; + width: 100%; +} +div.footer { + border-top: 1px solid #666; +} +div.body { + margin-top: 10em; +} +div.meta { + font-size: 90%; + text-align: center; +} +h1, h2, h3 { + font-weight: normal; +} +h1 { + font-size: 12pt; +} +h2 { + font-size: 10pt; +} +pre { + font-family: Consolas, Menlo, Monaco, monospace; + margin: 0; + padding: 0; + line-height: 1.3; + font-size: 14px; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} + +div.path { font-size: 110%; } +div.path a:link, div.path a:visited { color: #000; } +table.coverage { border-collapse: collapse; margin:0; padding: 0 } + +table.coverage td { + margin: 0; + padding: 0; + color: #111; + vertical-align: top; +} +table.coverage td.line-count { + width: 50px; + text-align: right; + padding-right: 5px; +} +table.coverage td.line-coverage { + color: #777 !important; + text-align: right; + border-left: 1px solid #666; + border-right: 1px solid #666; +} + +table.coverage td.text { +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 40px; +} +table.coverage td span.cline-neutral { + background: #eee; +} +table.coverage td span.cline-yes { + background: #b5d592; + color: #999; +} +table.coverage td span.cline-no { + background: #fc8c84; +} + +.cstat-yes { color: #111; } +.cstat-no { background: #fc8c84; color: #111; } +.fstat-no { background: #ffc520; color: #111 !important; } +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +.missing-if-branch { + display: inline-block; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: black; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} + +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} + +.entity, .metric { font-weight: bold; } +.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; } +.metric small { font-size: 80%; font-weight: normal; color: #666; } + +div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; } +div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; } +div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; } +div.coverage-summary th.file { border-right: none !important; } +div.coverage-summary th.pic { border-left: none !important; text-align: right; } +div.coverage-summary th.pct { border-right: none !important; } +div.coverage-summary th.abs { border-left: none !important; text-align: right; } +div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; } +div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; } +div.coverage-summary td.file { border-left: 1px solid #666; white-space: nowrap; } +div.coverage-summary td.pic { min-width: 120px !important; } +div.coverage-summary a:link { text-decoration: none; color: #000; } +div.coverage-summary a:visited { text-decoration: none; color: #777; } +div.coverage-summary a:hover { text-decoration: underline; } +div.coverage-summary tfoot td { border-top: 1px solid #666; } + +div.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +div.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +div.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} + +.high { background: #b5d592 !important; } +.medium { background: #ffe87c !important; } +.low { background: #fc8c84 !important; } + +span.cover-fill, span.cover-empty { + display:inline-block; + border:1px solid #444; + background: white; + height: 12px; +} +span.cover-fill { + background: #ccc; + border-right: 1px solid #444; +} +span.cover-empty { + background: white; + border-left: none; +} +span.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } diff --git a/node_modules/pacote/node_modules/unique-filename/coverage/index.html b/node_modules/pacote/node_modules/unique-filename/coverage/index.html new file mode 100644 index 0000000000000..b10d186cc3978 --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/coverage/index.html @@ -0,0 +1,73 @@ + + + + Code coverage report for All files + + + + + + +
+

Code coverage report for All files

+

+ Statements: 100% (4 / 4)      + Branches: 100% (2 / 2)      + Functions: 100% (1 / 1)      + Lines: 100% (4 / 4)      + Ignored: none      +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
__root__/100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
+
+
+ + + + + + diff --git a/node_modules/pacote/node_modules/unique-filename/coverage/prettify.css b/node_modules/pacote/node_modules/unique-filename/coverage/prettify.css new file mode 100644 index 0000000000000..b317a7cda31a4 --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/coverage/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/pacote/node_modules/unique-filename/coverage/prettify.js b/node_modules/pacote/node_modules/unique-filename/coverage/prettify.js new file mode 100644 index 0000000000000..ef51e03866898 --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/coverage/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/pacote/node_modules/unique-filename/coverage/sort-arrow-sprite.png b/node_modules/pacote/node_modules/unique-filename/coverage/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + el = getNthColumn(i).querySelector('.sorter'); + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/node_modules/pacote/node_modules/unique-filename/index.js b/node_modules/pacote/node_modules/unique-filename/index.js new file mode 100644 index 0000000000000..02bf1e273143c --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/index.js @@ -0,0 +1,8 @@ +'use strict' +var path = require('path') + +var uniqueSlug = require('unique-slug') + +module.exports = function (filepath, prefix, uniq) { + return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq)) +} diff --git a/node_modules/pacote/node_modules/unique-filename/package.json b/node_modules/pacote/node_modules/unique-filename/package.json new file mode 100644 index 0000000000000..5778e9c213575 --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/package.json @@ -0,0 +1,56 @@ +{ + "_from": "unique-filename@^1.1.1", + "_id": "unique-filename@1.1.1", + "_inBundle": false, + "_integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "_location": "/pacote/unique-filename", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "unique-filename@^1.1.1", + "name": "unique-filename", + "escapedName": "unique-filename", + "rawSpec": "^1.1.1", + "saveSpec": null, + "fetchSpec": "^1.1.1" + }, + "_requiredBy": [ + "/pacote" + ], + "_resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "_shasum": "1d69769369ada0583103a1e6ae87681b56573230", + "_spec": "unique-filename@^1.1.1", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote", + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org", + "url": "http://re-becca.org/" + }, + "bugs": { + "url": "https://github.com/iarna/unique-filename/issues" + }, + "bundleDependencies": false, + "dependencies": { + "unique-slug": "^2.0.0" + }, + "deprecated": false, + "description": "Generate a unique filename for use in temporary directories or caches.", + "devDependencies": { + "standard": "^5.4.1", + "tap": "^2.3.1" + }, + "homepage": "https://github.com/iarna/unique-filename", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "unique-filename", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/unique-filename.git" + }, + "scripts": { + "test": "standard && tap test" + }, + "version": "1.1.1" +} diff --git a/node_modules/pacote/node_modules/unique-filename/test/index.js b/node_modules/pacote/node_modules/unique-filename/test/index.js new file mode 100644 index 0000000000000..105b4e52e8b40 --- /dev/null +++ b/node_modules/pacote/node_modules/unique-filename/test/index.js @@ -0,0 +1,23 @@ +'sue strict' +var t = require('tap') +var uniqueFilename = require('../index.js') + +t.plan(6) + +var randomTmpfile = uniqueFilename('tmp') +t.like(randomTmpfile, /^tmp.[a-f0-9]{8}$/, 'random tmp file') + +var randomAgain = uniqueFilename('tmp') +t.notEqual(randomAgain, randomTmpfile, 'random tmp files are not the same') + +var randomPrefixedTmpfile = uniqueFilename('tmp', 'my-test') +t.like(randomPrefixedTmpfile, /^tmp.my-test-[a-f0-9]{8}$/, 'random prefixed tmp file') + +var randomPrefixedAgain = uniqueFilename('tmp', 'my-test') +t.notEqual(randomPrefixedAgain, randomPrefixedTmpfile, 'random prefixed tmp files are not the same') + +var uniqueTmpfile = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on') +t.like(uniqueTmpfile, /^tmp.testing-7ddd44c0$/, 'unique filename') + +var uniqueAgain = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on') +t.is(uniqueTmpfile, uniqueAgain, 'same unique string component produces same filename') diff --git a/node_modules/pacote/node_modules/yallist/LICENSE b/node_modules/pacote/node_modules/yallist/LICENSE new file mode 100644 index 0000000000000..19129e315fe59 --- /dev/null +++ b/node_modules/pacote/node_modules/yallist/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/pacote/node_modules/yallist/README.md b/node_modules/pacote/node_modules/yallist/README.md new file mode 100644 index 0000000000000..f586101869668 --- /dev/null +++ b/node_modules/pacote/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/node_modules/pacote/node_modules/yallist/iterator.js b/node_modules/pacote/node_modules/yallist/iterator.js new file mode 100644 index 0000000000000..d41c97a19f984 --- /dev/null +++ b/node_modules/pacote/node_modules/yallist/iterator.js @@ -0,0 +1,8 @@ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} diff --git a/node_modules/pacote/node_modules/yallist/package.json b/node_modules/pacote/node_modules/yallist/package.json new file mode 100644 index 0000000000000..9dd5bf96b017c --- /dev/null +++ b/node_modules/pacote/node_modules/yallist/package.json @@ -0,0 +1,62 @@ +{ + "_from": "yallist@^3.0.0", + "_id": "yallist@3.0.3", + "_inBundle": false, + "_integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "_location": "/pacote/yallist", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "yallist@^3.0.0", + "name": "yallist", + "escapedName": "yallist", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/pacote/minipass" + ], + "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "_shasum": "b4b049e314be545e3ce802236d6cd22cd91c3de9", + "_spec": "yallist@^3.0.0", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote/node_modules/minipass", + "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": "^12.1.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": "3.0.3" +} diff --git a/node_modules/pacote/node_modules/yallist/yallist.js b/node_modules/pacote/node_modules/yallist/yallist.js new file mode 100644 index 0000000000000..b0ab36cf31b7a --- /dev/null +++ b/node_modules/pacote/node_modules/yallist/yallist.js @@ -0,0 +1,376 @@ +'use strict' +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 + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} diff --git a/node_modules/pacote/package.json b/node_modules/pacote/package.json index 6f7e4cc4583e9..1df323dd3621d 100644 --- a/node_modules/pacote/package.json +++ b/node_modules/pacote/package.json @@ -1,10 +1,15 @@ { "_from": "pacote@latest", - "_id": "pacote@9.1.0", + "_id": "pacote@9.2.3", "_inBundle": false, - "_integrity": "sha512-AFXaSWhOtQf3jHqEvg+ZYH/dfT8TKq6TKspJ4qEFwVVuh5aGvMIk6SNF8vqfzz+cBceDIs9drOcpBbrPai7i+g==", + "_integrity": "sha512-Y3+yY3nBRAxMlZWvr62XLJxOwCmG9UmkGZkFurWHoCjqF0cZL72cTOCRJTvWw8T4OhJS2RTg13x4oYYriauvEw==", "_location": "/pacote", - "_phantomChildren": {}, + "_phantomChildren": { + "figgy-pudding": "3.5.1", + "npm-package-arg": "6.1.0", + "safe-buffer": "5.1.2", + "unique-slug": "2.0.0" + }, "_requested": { "type": "tag", "registry": true, @@ -17,10 +22,11 @@ }, "_requiredBy": [ "#USER", - "/" + "/", + "/libcipm" ], - "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.1.0.tgz", - "_shasum": "59810859bbd72984dcb267269259375d32f391e5", + "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.2.3.tgz", + "_shasum": "48cfe87beb9177acd6594355a584a538835424b3", "_spec": "pacote@latest", "_where": "/Users/zkat/Documents/code/work/npm", "author": { @@ -42,46 +48,46 @@ } ], "dependencies": { - "bluebird": "^3.5.1", - "cacache": "^11.0.2", - "figgy-pudding": "^3.2.1", - "get-stream": "^3.0.0", - "glob": "^7.1.2", + "bluebird": "^3.5.2", + "cacache": "^11.2.0", + "figgy-pudding": "^3.5.1", + "get-stream": "^4.1.0", + "glob": "^7.1.3", "lru-cache": "^4.1.3", "make-fetch-happen": "^4.0.1", "minimatch": "^3.0.4", - "minipass": "^2.3.3", + "minipass": "^2.3.5", "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "normalize-package-data": "^2.4.0", "npm-package-arg": "^6.1.0", - "npm-packlist": "^1.1.10", - "npm-pick-manifest": "^2.1.0", - "npm-registry-fetch": "^3.0.0", + "npm-packlist": "^1.1.12", + "npm-pick-manifest": "^2.2.3", + "npm-registry-fetch": "^3.8.0", "osenv": "^0.1.5", "promise-inflight": "^1.0.1", "promise-retry": "^1.1.1", - "protoduck": "^5.0.0", + "protoduck": "^5.0.1", "rimraf": "^2.6.2", "safe-buffer": "^5.1.2", - "semver": "^5.5.0", - "ssri": "^6.0.0", - "tar": "^4.4.3", - "unique-filename": "^1.1.0", - "which": "^1.3.0" + "semver": "^5.6.0", + "ssri": "^6.0.1", + "tar": "^4.4.6", + "unique-filename": "^1.1.1", + "which": "^1.3.1" }, "deprecated": false, "description": "JavaScript package downloader", "devDependencies": { - "nock": "^9.2.6", + "nock": "^10.0.1", "npmlog": "^4.1.2", - "nyc": "^11.8.0", + "nyc": "^13.1.0", "require-inject": "^1.4.3", - "standard": "^11.0.1", + "standard": "^12.0.1", "standard-version": "^4.4.0", - "tacks": "^1.2.6", + "tacks": "^1.2.7", "tap": "^12.0.1", - "tar-stream": "^1.6.1", + "tar-stream": "^1.6.2", "weallbehave": "^1.2.0", "weallcontribute": "^1.0.7" }, @@ -112,5 +118,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.1.0" + "version": "9.2.3" } diff --git a/node_modules/pacote/packument.js b/node_modules/pacote/packument.js index dbeaa8335f717..0606b266f972a 100644 --- a/node_modules/pacote/packument.js +++ b/node_modules/pacote/packument.js @@ -23,7 +23,7 @@ function packument (spec, opts) { return fetchPackument(spec, opts) }).then(p => { const elapsedTime = Date.now() - startTime - opts.log.silly('pacote', `${spec.type} packument for ${spec.name}@${spec.saveSpec || spec.fetchSpec} fetched in ${elapsedTime}ms`) + opts.log.silly('pacote', `${spec.registry ? 'registry' : spec.type} packument for ${spec.name}@${spec.saveSpec || spec.fetchSpec} fetched in ${elapsedTime}ms`) return p }) } diff --git a/node_modules/pacote/prefetch.js b/node_modules/pacote/prefetch.js index d17725993f9de..9e6b5af12d727 100644 --- a/node_modules/pacote/prefetch.js +++ b/node_modules/pacote/prefetch.js @@ -15,7 +15,7 @@ function prefetch (spec, opts) { const startTime = Date.now() if (!opts.cache) { opts.log.info('prefetch', 'skipping prefetch: no cache provided') - return BB.resolve({spec}) + return BB.resolve({ spec }) } if (opts.integrity && !opts.preferOnline) { opts.log.silly('prefetch', 'checking if', opts.integrity, 'is already cached') diff --git a/node_modules/protoduck/CHANGELOG.md b/node_modules/protoduck/CHANGELOG.md index dd7669aa13e2f..f4902ab2d0267 100644 --- a/node_modules/protoduck/CHANGELOG.md +++ b/node_modules/protoduck/CHANGELOG.md @@ -2,6 +2,17 @@ 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. + +## [5.0.1](https://github.com/zkat/protoduck/compare/v5.0.0...v5.0.1) (2018-10-26) + + +### Bug Fixes + +* **security:** npm audit fix ([55a2007](https://github.com/zkat/protoduck/commit/55a2007)) +* **standard:** standard --fix ([2dedbb8](https://github.com/zkat/protoduck/commit/2dedbb8)) + + + # [5.0.0](https://github.com/zkat/protoduck/compare/v4.0.0...v5.0.0) (2017-12-12) diff --git a/node_modules/protoduck/index.js b/node_modules/protoduck/index.js index 3596bb3299d5c..b6a83e1f79012 100644 --- a/node_modules/protoduck/index.js +++ b/node_modules/protoduck/index.js @@ -52,8 +52,8 @@ class Duck extends Function { gf = arg[fns[i]] if (!gf || (gf.hasMethod - ? !gf.hasMethod.apply(gf, args) - : typeof gf === 'function')) { + ? !gf.hasMethod.apply(gf, args) + : typeof gf === 'function')) { return false } } @@ -81,7 +81,7 @@ Duck.prototype.isProtocol = true const Protoduck = module.exports = define(['duck'], { createGenfun: ['duck', _metaCreateGenfun], addMethod: ['duck', _metaAddMethod] -}, {name: 'Protoduck'}) +}, { name: 'Protoduck' }) const noImplFound = module.exports.noImplFound = genfun.noApplicableMethod @@ -168,22 +168,22 @@ function defineMethod (duck, name, target, types, impls) { if (!Object.prototype.hasOwnProperty.call(target, name)) { // Make a genfun if there's nothing there const gf = useMetaobject - ? duck._metaobject.createGenfun(duck, target, name, null) - : _metaCreateGenfun(duck, target, name, null) + ? duck._metaobject.createGenfun(duck, target, name, null) + : _metaCreateGenfun(duck, target, name, null) target[name] = gf } else if (typeof target[name] === 'function' && !target[name].isGenfun) { // Turn non-gf functions into genfuns const gf = useMetaobject - ? duck._metaobject.createGenfun(duck, target, name, target[name]) - : _metaCreateGenfun(duck, target, name, target[name]) + ? duck._metaobject.createGenfun(duck, target, name, target[name]) + : _metaCreateGenfun(duck, target, name, target[name]) target[name] = gf } const fn = impls[name] || duck._defaultImpls[name] if (fn) { // checkImpls made sure this is safe useMetaobject - ? duck._metaobject.addMethod(duck, target, name, methodTypes, fn) - : _metaAddMethod(duck, target, name, methodTypes, fn) + ? duck._metaobject.addMethod(duck, target, name, methodTypes, fn) + : _metaAddMethod(duck, target, name, methodTypes, fn) } } @@ -256,8 +256,8 @@ function installMethodErrorMessage (proto, gf, target, name) { proto.name ? `${proto.name}#` : '' }${name}(${[].map.call(args, typeName).join(', ')}). You must implement ${ proto.name - ? formatMethod(proto, name, true) - : `the protocol ${formatMethod(proto, name)} belongs to` + ? formatMethod(proto, name, true) + : `the protocol ${formatMethod(proto, name)} belongs to` } in order to call ${typeName(thisArg)}#${name}(${ [].map.call(args, typeName).join(', ') }).` @@ -330,8 +330,8 @@ class Constraint { const thisType = ( this.thisIdx === 'this' || this.thisIdx == null ) - ? target - : types[this.thisIdx] + ? target + : types[this.thisIdx] const parentTypes = this.indices.map(idx => { if (idx === 'this') { return target diff --git a/node_modules/protoduck/package.json b/node_modules/protoduck/package.json index 2211df2086f94..3ee47ac6adbaa 100644 --- a/node_modules/protoduck/package.json +++ b/node_modules/protoduck/package.json @@ -1,28 +1,27 @@ { - "_from": "protoduck@^5.0.0", - "_id": "protoduck@5.0.0", + "_from": "protoduck@^5.0.1", + "_id": "protoduck@5.0.1", "_inBundle": false, - "_integrity": "sha512-agsGWD8/RZrS4ga6v82Fxb0RHIS2RZnbsSue6A9/MBRhB/jcqOANAMNrqM9900b8duj+Gx+T/JMy5IowDoO/hQ==", + "_integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", "_location": "/protoduck", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "protoduck@^5.0.0", + "raw": "protoduck@^5.0.1", "name": "protoduck", "escapedName": "protoduck", - "rawSpec": "^5.0.0", + "rawSpec": "^5.0.1", "saveSpec": null, - "fetchSpec": "^5.0.0" + "fetchSpec": "^5.0.1" }, "_requiredBy": [ - "/libcipm", "/pacote" ], - "_resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.0.tgz", - "_shasum": "752145e6be0ad834cb25716f670a713c860dce70", - "_spec": "protoduck@^5.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/libcipm", + "_resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", + "_shasum": "03c3659ca18007b69a50fd82a7ebcc516261151f", + "_spec": "protoduck@^5.0.1", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/pacote", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -32,16 +31,16 @@ }, "bundleDependencies": false, "dependencies": { - "genfun": "^4.0.1" + "genfun": "^5.0.0" }, "deprecated": false, "description": "Fancy duck typing for the most serious of ducks.", "devDependencies": { - "mocha": "^3.2.0", - "nyc": "^10.2.0", - "standard": "^10.0.2", + "mocha": "^5.2.0", + "nyc": "^13.1.0", + "standard": "^12.0.1", "standard-version": "^4.0.0", - "tap": "^10.3.2", + "tap": "^12.0.1", "weallbehave": "^1.0.3", "weallcontribute": "^1.0.8" }, @@ -85,5 +84,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": "5.0.0" + "version": "5.0.1" } diff --git a/package-lock.json b/package-lock.json index bcfc4c685d9f9..6f84a492b305d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1647,7 +1647,7 @@ }, "fs-access": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", "dev": true, "requires": { @@ -1758,9 +1758,9 @@ } }, "genfun": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/genfun/-/genfun-4.0.1.tgz", - "integrity": "sha1-7RAEHy5KfxsKOEZtF6XD4n3x38E=" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", + "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==" }, "gentle-fs": { "version": "2.0.1", @@ -2454,27 +2454,28 @@ } }, "libnpm": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/libnpm/-/libnpm-1.4.0.tgz", - "integrity": "sha512-Ja6WdFpIEvGmxL34fvAzNma/Kjl303nDIRolpOhHoVbi+s93ZIPyap3RvM8IYINEoeF06P1mGWagZDEedq3NEg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/libnpm/-/libnpm-2.0.1.tgz", + "integrity": "sha512-qTKoxyJvpBxHZQB6k0AhSLajyXq9ZE/lUsZzuHAplr2Bpv9G+k4YuYlExYdUCeVRRGqcJt8hvkPh4tBwKoV98w==", "requires": { "bin-links": "^1.1.2", + "bluebird": "^3.5.3", "find-npm-prefix": "^1.0.2", - "libnpmaccess": "^2.0.0", - "libnpmconfig": "^1.1.1", - "libnpmhook": "^5.0.0", + "libnpmaccess": "^3.0.1", + "libnpmconfig": "^1.2.1", + "libnpmhook": "^5.0.2", "libnpmorg": "^1.0.0", - "libnpmpublish": "^1.0.1", + "libnpmpublish": "^1.1.0", "libnpmsearch": "^2.0.0", - "libnpmteam": "^1.0.0", + "libnpmteam": "^1.0.1", "lock-verify": "^2.0.2", "npm-lifecycle": "^2.1.0", "npm-logical-tree": "^1.2.1", "npm-package-arg": "^6.1.0", - "npm-profile": "^4.0.0", - "npm-registry-fetch": "^3.3.0", + "npm-profile": "^4.0.1", + "npm-registry-fetch": "^3.8.0", "npmlog": "^4.1.2", - "pacote": "^9.1.0", + "pacote": "^9.2.3", "read-package-json": "^2.0.13", "stringify-package": "^1.0.0" }, @@ -2498,9 +2499,9 @@ } }, "libnpmaccess": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-2.0.1.tgz", - "integrity": "sha512-WJRlA7YGGCBK6zubJ8eajD7Wm6SaywiR0jnMjwp8QBwt1QxQOY+CCKpERw30opPkShjoesBLzQJ9Wf3MpXGR/A==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-3.0.1.tgz", + "integrity": "sha512-RlZ7PNarCBt+XbnP7R6PoVgOq9t+kou5rvhaInoNibhPO7eMlRfS0B8yjatgn2yaHIwWNyoJDolC/6Lc5L/IQA==", "requires": { "aproba": "^2.0.0", "get-stream": "^4.0.0", @@ -6069,43 +6070,75 @@ } }, "pacote": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.1.0.tgz", - "integrity": "sha512-AFXaSWhOtQf3jHqEvg+ZYH/dfT8TKq6TKspJ4qEFwVVuh5aGvMIk6SNF8vqfzz+cBceDIs9drOcpBbrPai7i+g==", + "version": "9.2.3", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.2.3.tgz", + "integrity": "sha512-Y3+yY3nBRAxMlZWvr62XLJxOwCmG9UmkGZkFurWHoCjqF0cZL72cTOCRJTvWw8T4OhJS2RTg13x4oYYriauvEw==", "requires": { - "bluebird": "^3.5.1", - "cacache": "^11.0.2", - "figgy-pudding": "^3.2.1", - "get-stream": "^3.0.0", - "glob": "^7.1.2", + "bluebird": "^3.5.2", + "cacache": "^11.2.0", + "figgy-pudding": "^3.5.1", + "get-stream": "^4.1.0", + "glob": "^7.1.3", "lru-cache": "^4.1.3", "make-fetch-happen": "^4.0.1", "minimatch": "^3.0.4", - "minipass": "^2.3.3", + "minipass": "^2.3.5", "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "normalize-package-data": "^2.4.0", "npm-package-arg": "^6.1.0", - "npm-packlist": "^1.1.10", - "npm-pick-manifest": "^2.1.0", - "npm-registry-fetch": "^3.0.0", + "npm-packlist": "^1.1.12", + "npm-pick-manifest": "^2.2.3", + "npm-registry-fetch": "^3.8.0", "osenv": "^0.1.5", "promise-inflight": "^1.0.1", "promise-retry": "^1.1.1", - "protoduck": "^5.0.0", + "protoduck": "^5.0.1", "rimraf": "^2.6.2", "safe-buffer": "^5.1.2", - "semver": "^5.5.0", - "ssri": "^6.0.0", - "tar": "^4.4.3", - "unique-filename": "^1.1.0", - "which": "^1.3.0" + "semver": "^5.6.0", + "ssri": "^6.0.1", + "tar": "^4.4.6", + "unique-filename": "^1.1.1", + "which": "^1.3.1" }, "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + "minipass": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "npm-pick-manifest": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz", + "integrity": "sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==", + "requires": { + "figgy-pudding": "^3.5.1", + "npm-package-arg": "^6.0.0", + "semver": "^5.4.1" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "requires": { + "unique-slug": "^2.0.0" + } + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" } } }, @@ -6366,11 +6399,11 @@ "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" }, "protoduck": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.0.tgz", - "integrity": "sha512-agsGWD8/RZrS4ga6v82Fxb0RHIS2RZnbsSue6A9/MBRhB/jcqOANAMNrqM9900b8duj+Gx+T/JMy5IowDoO/hQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", + "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", "requires": { - "genfun": "^4.0.1" + "genfun": "^5.0.0" } }, "prr": { diff --git a/package.json b/package.json index 1dcb9feb003b5..dbfc17b4f0f7e 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "json-parse-better-errors": "^1.0.2", "lazy-property": "~1.0.0", "libcipm": "^3.0.2", - "libnpm": "^1.4.0", + "libnpm": "^2.0.1", "libnpx": "^10.2.0", "lock-verify": "^2.0.2", "lockfile": "^1.0.4", @@ -103,7 +103,7 @@ "once": "~1.4.0", "opener": "^1.5.1", "osenv": "^0.1.5", - "pacote": "^9.1.0", + "pacote": "^9.2.3", "path-is-inside": "~1.0.2", "promise-inflight": "~1.0.1", "qrcode-terminal": "^0.12.0",