diff --git a/.eslintrc.js b/.eslintrc.js index 92e00d7c9201d8..7574e1b4b6c7f7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -53,12 +53,6 @@ module.exports = { overrides: [ { files: [ - 'doc/api/esm.md/*.js', - 'doc/api/fs.md/*.js', - 'doc/api/module.md/*.js', - 'doc/api/modules.md/*.js', - 'doc/api/packages.md/*.js', - 'doc/api/wasi.md/*.js', 'test/es-module/test-esm-type-flag.js', 'test/es-module/test-esm-type-flag-alias.js', '*.mjs', @@ -71,10 +65,21 @@ module.exports = { processor: 'markdown/markdown', }, { - files: ['**/*.md/*.js'], - parserOptions: { ecmaFeatures: { impliedStrict: true } }, + files: ['**/*.md/*.cjs', '**/*.md/*.js'], + parserOptions: { + sourceType: 'script', + ecmaFeatures: { impliedStrict: true } + }, rules: { strict: 'off' }, }, + { + files: [ + '**/*.md/*.mjs', + 'doc/api/esm.md/*.js', + 'doc/api/packages.md/*.js', + ], + parserOptions: { sourceType: 'module' }, + }, ], rules: { // ESLint built-in rules @@ -310,6 +315,7 @@ module.exports = { }, globals: { AbortController: 'readable', + AbortSignal: 'readable', Atomics: 'readable', BigInt: 'readable', BigInt64Array: 'readable', diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 9bb9cd14bc1d0f..1b0f8c868db25f 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -50,10 +50,17 @@ jobs: node-version: ${{ env.NODE_VERSION }} - name: Environment Information run: npx envinfo + - name: Get release version numbers + if: ${{ github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch }} + id: get-released-versions + run: ./tools/node-lint-md-cli-rollup/src/list-released-versions-from-changelogs.mjs - name: Lint docs run: | echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json" NODE=$(command -v node) make lint-md + env: + NODE_RELEASED_VERSIONS: ${{ steps.get-released-versions.outputs.NODE_RELEASED_VERSIONS }} + lint-js: if: github.event.pull_request.draft == false runs-on: ubuntu-latest diff --git a/BUILDING.md b/BUILDING.md index f019d674c3a728..858f017d692f1a 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -116,7 +116,7 @@ platforms. This is true regardless of entries in the table below. | macOS | x64 | >= 10.13 | Tier 1 | | | macOS | arm64 | >= 11 | Experimental | | | SmartOS | x64 | >= 18 | Tier 2 | | -| AIX | ppc64be >=power7 | >= 7.2 TL02 | Tier 2 | | +| AIX | ppc64be >=power7 | >= 7.2 TL04 | Tier 2 | | | FreeBSD | x64 | >= 11 | Experimental | Downgraded as of Node.js 12 [7](#fn7) | 1: GCC 6 is not provided on the base platform. Users will @@ -171,7 +171,7 @@ Binaries at are produced on: | Binary package | Platform and Toolchain | | --------------------- | ------------------------------------------------------------------------------------------------------------- | -| aix-ppc64 | AIX 7.1 TL05 on PPC64BE with GCC 6 | +| aix-ppc64 | AIX 7.2 TL04 on PPC64BE with GCC 8 | | darwin-x64 (and .pkg) | macOS 10.15, Xcode Command Line Tools 11 with -mmacosx-version-min=10.13 | | linux-arm64 | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) | | linux-armv7l | Cross-compiled on Ubuntu 18.04 x64 with [custom GCC toolchain](https://github.com/rvagg/rpi-newer-crosstools) | diff --git a/CHANGELOG.md b/CHANGELOG.md index 25feec5a9458a6..6a0c7c5ec485a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,8 @@ release. -15.11.0
+15.12.0
+15.11.0
15.10.0
15.9.0
15.8.0
diff --git a/Makefile b/Makefile index 86bddc8452556d..d103773a616e1f 100644 --- a/Makefile +++ b/Makefile @@ -1220,6 +1220,7 @@ lint-js-fix: .PHONY: lint-js-doc # Note that on the CI `lint-js-ci` is run instead. # Lints the JavaScript code with eslint. +lint-js-doc: LINT_JS_TARGETS=doc lint-js lint-js-doc: @if [ "$(shell $(node_use_openssl))" != "true" ]; then \ echo "Skipping $@ (no crypto)"; \ diff --git a/README.md b/README.md index d35a7525d45773..a051128fe30edf 100644 --- a/README.md +++ b/README.md @@ -21,19 +21,19 @@ The Node.js project uses an [open governance model](./GOVERNANCE.md). The # Table of contents * [Support](#support) -* [Release Types](#release-types) +* [Release types](#release-types) * [Download](#download) - * [Current and LTS Releases](#current-and-lts-releases) - * [Nightly Releases](#nightly-releases) - * [API Documentation](#api-documentation) - * [Verifying Binaries](#verifying-binaries) + * [Current and LTS releases](#current-and-lts-releases) + * [Nightly releases](#nightly-releases) + * [API documentation](#api-documentation) + * [Verifying binaries](#verifying-binaries) * [Building Node.js](#building-nodejs) * [Security](#security) * [Contributing to Node.js](#contributing-to-nodejs) -* [Current Project Team Members](#current-project-team-members) +* [Current project team members](#current-project-team-members) * [TSC (Technical Steering Committee)](#tsc-technical-steering-committee) * [Collaborators](#collaborators) - * [Release Keys](#release-keys) + * [Release keys](#release-keys) * [License](#license) ## Support @@ -591,6 +591,8 @@ maintaining the Node.js project. ### Triagers +* [marsonya](https://github.com/marsonya) - +**Akhil Marsonya** <akhil.marsonya27@gmail.com> (he/him) * [PoojaDurgad](https://github.com/PoojaDurgad) - **Pooja Durgad** <Pooja.D.P@ibm.com> * [RaisinTen](https://github.com/RaisinTen) - diff --git a/benchmark/fs/readfile-promises.js b/benchmark/fs/readfile-promises.js new file mode 100644 index 00000000000000..28633c3f06427b --- /dev/null +++ b/benchmark/fs/readfile-promises.js @@ -0,0 +1,63 @@ +// Call fs.promises.readFile over and over again really fast. +// Then see how many times it got called. +// Yes, this is a silly benchmark. Most benchmarks are silly. +'use strict'; + +const path = require('path'); +const common = require('../common.js'); +const fs = require('fs'); +const assert = require('assert'); + +const tmpdir = require('../../test/common/tmpdir'); +tmpdir.refresh(); +const filename = path.resolve(tmpdir.path, + `.removeme-benchmark-garbage-${process.pid}`); + +const bench = common.createBenchmark(main, { + duration: [5], + len: [1024, 16 * 1024 * 1024], + concurrent: [1, 10] +}); + +function main({ len, duration, concurrent }) { + try { fs.unlinkSync(filename); } catch { } + let data = Buffer.alloc(len, 'x'); + fs.writeFileSync(filename, data); + data = null; + + let writes = 0; + let benchEnded = false; + bench.start(); + setTimeout(() => { + benchEnded = true; + bench.end(writes); + try { fs.unlinkSync(filename); } catch { } + process.exit(0); + }, duration * 1000); + + function read() { + fs.promises.readFile(filename) + .then((res) => afterRead(undefined, res)) + .catch((err) => afterRead(err)); + } + + function afterRead(er, data) { + if (er) { + if (er.code === 'ENOENT') { + // Only OK if unlinked by the timer from main. + assert.ok(benchEnded); + return; + } + throw er; + } + + if (data.length !== len) + throw new Error('wrong number of bytes returned'); + + writes++; + if (!benchEnded) + read(); + } + + while (concurrent--) read(); +} diff --git a/benchmark/fs/writefile-promises.js b/benchmark/fs/writefile-promises.js new file mode 100644 index 00000000000000..2ba25184ff3132 --- /dev/null +++ b/benchmark/fs/writefile-promises.js @@ -0,0 +1,76 @@ +// Call fs.promises.writeFile over and over again really fast. +// Then see how many times it got called. +// Yes, this is a silly benchmark. Most benchmarks are silly. +'use strict'; + +const path = require('path'); +const common = require('../common.js'); +const fs = require('fs'); +const assert = require('assert'); +const tmpdir = require('../../test/common/tmpdir'); + +tmpdir.refresh(); +const filename = path.resolve(tmpdir.path, + `.removeme-benchmark-garbage-${process.pid}`); +let filesWritten = 0; +const bench = common.createBenchmark(main, { + duration: [5], + encodingType: ['buf', 'asc', 'utf'], + size: [2, 1024, 65535, 1024 * 1024], + concurrent: [1, 10] +}); + +function main({ encodingType, duration, concurrent, size }) { + let encoding; + let chunk; + switch (encodingType) { + case 'buf': + chunk = Buffer.alloc(size, 'b'); + break; + case 'asc': + chunk = 'a'.repeat(size); + encoding = 'ascii'; + break; + case 'utf': + chunk = 'ü'.repeat(Math.ceil(size / 2)); + encoding = 'utf8'; + break; + default: + throw new Error(`invalid encodingType: ${encodingType}`); + } + + let writes = 0; + let benchEnded = false; + bench.start(); + setTimeout(() => { + benchEnded = true; + bench.end(writes); + for (let i = 0; i < filesWritten; i++) { + try { fs.unlinkSync(`${filename}-${i}`); } catch { } + } + process.exit(0); + }, duration * 1000); + + function write() { + fs.promises.writeFile(`${filename}-${filesWritten++}`, chunk, encoding) + .then(() => afterWrite()) + .catch((err) => afterWrite(err)); + } + + function afterWrite(er) { + if (er) { + if (er.code === 'ENOENT') { + // Only OK if unlinked by the timer from main. + assert.ok(benchEnded); + return; + } + throw er; + } + + writes++; + if (!benchEnded) + write(); + } + + while (concurrent--) write(); +} diff --git a/common.gypi b/common.gypi index d81bac25e30fb6..79a22ac0faca37 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.16', + 'v8_embedder_string': '-node.7', ##### V8 defaults for Node.js ##### diff --git a/deps/cjs-module-lexer/CHANGELOG.md b/deps/cjs-module-lexer/CHANGELOG.md index 0725f8652f1bd2..74c74426305944 100644 --- a/deps/cjs-module-lexer/CHANGELOG.md +++ b/deps/cjs-module-lexer/CHANGELOG.md @@ -1,3 +1,8 @@ +1.1.0 +- Support for Babel reexport conflict filter (https://github.com/guybedford/cjs-module-lexer/issues/36, @nicolo-ribaudo) +- Support trailing commas in getter patterns (https://github.com/guybedford/cjs-module-lexer/issues/31) +- Support for RollupJS reexports property checks (https://github.com/guybedford/cjs-module-lexer/issues/38) + 1.0.0 - Unsafe getter tracking (https://github.com/guybedford/cjs-module-lexer/pull/29) diff --git a/deps/cjs-module-lexer/README.md b/deps/cjs-module-lexer/README.md index 49aa836b234744..5e963988eac791 100755 --- a/deps/cjs-module-lexer/README.md +++ b/deps/cjs-module-lexer/README.md @@ -80,7 +80,7 @@ EXPORTS_DOT_ASSIGN: EXPORTS_IDENTIFIER `.` IDENTIFIER `=` EXPORTS_LITERAL_COMPUTED_ASSIGN: EXPORTS_IDENTIFIER `[` IDENTIFIER_STRING `]` `=` -EXPORTS_LITERAL_PROP: (IDENTIFIER `:` IDENTIFIER)?) | (IDENTIFIER_STRING `:` IDENTIFIER) +EXPORTS_LITERAL_PROP: (IDENTIFIER (`:` IDENTIFIER)?) | (IDENTIFIER_STRING `:` IDENTIFIER) EXPORTS_SPREAD: `...` (IDENTIFIER | REQUIRE) @@ -92,7 +92,7 @@ EXPORTS_DEFINE_VALUE: EXPORTS_DEFINE `, {` (`enumerable: true,`)? ( `value:` | - `get` (`: function` IDENTIFIER? )? `()` {` return IDENTIFIER (`.` IDENTIFIER | `[` IDENTIFIER_STRING `]`)? `;`? `}` + `get` (`: function` IDENTIFIER? )? `()` {` return IDENTIFIER (`.` IDENTIFIER | `[` IDENTIFIER_STRING `]`)? `;`? `}` `,`? ) `})` @@ -108,15 +108,18 @@ EXPORT_STAR: (`__export` | `__exportStar`) `(` REQUIRE EXPORT_STAR_LIB: `Object.keys(` IDENTIFIER$1 `).forEach(function (` IDENTIFIER$2 `) {` ( - `if (` IDENTIFIER$2 `===` ( `'default'` | `"default"` ) `||` IDENTIFIER$2 `===` ( '__esModule' | `"__esModule"` ) `) return` `;`? | - `if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) `)` + ( + `if (` IDENTIFIER$2 `===` ( `'default'` | `"default"` ) `||` IDENTIFIER$2 `===` ( '__esModule' | `"__esModule"` ) `) return` `;`? + ( + (`if (Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)) return` `;`?)? + (`if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`)? + )? + ) | + `if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` (`Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER$1 `, ` IDENTIFIER$2 `)` | IDENTIFIER$1 `.hasOwnProperty(` IDENTIFIER$2 `)`))? `)` ) - ( - `if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`? - )? ( EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? | - `Object.defineProperty(` EXPORTS_IDENTIFIER `, ` IDENTIFIER$2 `, { enumerable: true, get: function () { return ` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? } })` `;`? + `Object.defineProperty(` EXPORTS_IDENTIFIER `, ` IDENTIFIER$2 `, { enumerable: true, get: function () { return ` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? `}` `,`? `})` `;`? ) `})` ``` @@ -194,13 +197,23 @@ Object.defineProperty(exports, 'd', { value: 'd' }); Object.defineProperty(exports, '__esModule', { value: true }); ``` +Value properties are also detected specifically: + +```js +Object.defineProperty(exports, 'a', { + value: 'no problem' +}); +``` + To avoid matching getters that have side effects, any getter for an export name that does not support the forms above will opt-out of the getter matching: ```js // DETECTS: NO EXPORTS Object.defineProperty(exports, 'a', { - value: 'no problem' + get () { + return 'nope'; + } }); if (false) { diff --git a/deps/cjs-module-lexer/dist/lexer.js b/deps/cjs-module-lexer/dist/lexer.js index 2f195adf091dad..c344ef86d1fafb 100644 --- a/deps/cjs-module-lexer/dist/lexer.js +++ b/deps/cjs-module-lexer/dist/lexer.js @@ -1 +1 @@ -"use strict";exports.parse=parse;exports.init=init;const A=new Set(["implements","interface","let","package","private","protected","public","static","yield","enum"]);let Q;const B=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse(g,I="@"){if(!Q)throw new Error("Not initialized");const D=g.length+1,N=(Q.__heap_base.value||Q.__heap_base)+4*D-Q.memory.buffer.byteLength;N>0&&Q.memory.grow(Math.ceil(N/65536));const k=Q.sa(D);if((B?C:E)(g,new Uint16Array(Q.memory.buffer,k,D)),!Q.parseCJS(k,g.length,0,0,0))throw Object.assign(new Error(`Parse error ${I}${Q.e()}:${g.slice(0,Q.e()).split("\n").length}:${Q.e()-g.lastIndexOf("\n",Q.e()-1)}`),{idx:Q.e()});let w=new Set,J=new Set,H=new Set;for(;Q.rre();)J.add(g.slice(Q.res(),Q.ree()));for(;Q.ru();)H.add(g.slice(Q.us(),Q.ue()));for(;Q.re();){let B=g.slice(Q.es(),Q.ee());A.has(B)||H.has(B)||w.add(B)}return{exports:[...w],reexports:[...J]}}function E(A,Q){const B=A.length;let E=0;for(;E>>8}}function C(A,Q){const B=A.length;let E=0;for(;E{const A=await WebAssembly.compile((B="AGFzbQEAAAABhAEPYAJ/fwBgAABgAX8Bf2AAAX9gBn9/f39/fwF/YAF/AGAIf39/f39/f38Bf2AHf39/f39/fwF/YAN/f38Bf2AFf39/f38Bf2AOf39/f39/f39/f39/f38Bf2AKf39/f39/f39/fwF/YAt/f39/f39/f39/fwF/YAR/f39/AX9gAn9/AX8DQUACAwMDAwMDAwMDAwAAAAEEAgIFBAUBAQECAgICAQEBAQUBAQYBAgcDAgICCAkCAQoCCwwEDQcOBgICAgICAgMIBAUBcAEFBQUDAQABBg8CfwFB0JgCC38AQdCYAgsHXA4GbWVtb3J5AgACc2EAAAFlAAECZXMAAgJlZQADA3JlcwAEA3JlZQAFAnVzAAYCdWUABwJyZQAIA3JyZQAJAnJ1AAoIcGFyc2VDSlMADwtfX2hlYXBfYmFzZQMBCQoBAEEBCwQLDA0OCsyXAUB4AQF/QQAoApgfIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgLkH0EAIAA2AugfQQBBADYCwB9BAEEANgLIH0EAQQA2AsQfQQBBADYCzB9BAEEANgLUH0EAQQA2AtAfQQBBADYC2B9BAEEANgLgH0EAQQA2AtwfIAELCABBACgC7B8LFQBBACgCxB8oAgBBACgCmB9rQQF1CxUAQQAoAsQfKAIEQQAoApgfa0EBdQsVAEEAKALQHygCAEEAKAKYH2tBAXULFQBBACgC0B8oAgRBACgCmB9rQQF1CxUAQQAoAtwfKAIAQQAoApgfa0EBdQsVAEEAKALcHygCBEEAKAKYH2tBAXULJQEBf0EAQQAoAsQfIgBBCGpBwB8gABsoAgAiADYCxB8gAEEARwslAQF/QQBBACgC0B8iAEEIakHM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ABECdBOkcNAkEAQQAoArygAUECajYCvKABECdB9ABHDQJBACgCvKABIgAvAQJB8gBHDQIgAC8BBEH1AEcNAiAALwEGQeUARw0CQQAgAEEIajYCvKABECdBLEcNAkEAQQAoArygAUECajYCvKABECchAAsCQCAAQecARg0AIABB9gBHDQJBACgCvKABIgAvAQJB4QBHDQIgAC8BBEHsAEcNAiAALwEGQfUARw0CIAAvAQhB5QBHDQJBACAAQQpqNgK8oAEQJ0E6Rw0CIAMgAkEAKAKcHxEAAEEAIAE2ArygAQ8LQQAoArygASIALwECQeUARw0BIAAvAQRB9ABHDQFBACAAQQZqNgK8oAECQBAnIgBBOkcNAEEAQQAoArygAUECajYCvKABECdB5gBHDQJBACgCvKABIgBBAmpB9QBB7gBB4wBB9ABB6QBB7wBB7gAQI0UNAkEAIABBEGoiADYCvKABAkAQJyIEQShGDQAgAEEAKAK8oAFGDQMgBBAtRQ0DCxAnIQALIABBKEcNAUEAQQAoArygAUECajYCvKABECdBKUcNAUEAQQAoArygAUECajYCvKABECdB+wBHDQFBAEEAKAK8oAFBAmo2ArygARAnQfIARw0BQQAoArygASIAQQJqQeUAQfQAQfUAQfIAQe4AEBNFDQFBACAAQQxqNgK8oAEQJxAtRQ0BAkACQAJAECciAEHbAEYNACAAQS5HDQJBAEEAKAK8oAFBAmo2ArygARAnEC0NAQwEC0EAQQAoArygAUECajYCvKABAkACQBAnIgBBIkYNACAAQSdHDQUQHQwBCxAVC0EAQQAoArygAUECajYCvKABECdB3QBHDQNBAEEAKAK8oAFBAmo2ArygAQsQJyEACwJAIABBO0cNAEEAQQAoArygAUECajYCvKABECchAAsgAEH9AEcNAUEAQQAoArygAUECajYCvKABECdB/QBHDQFBAEEAKAK8oAFBAmo2ArygARAnQSlHDQEgAyACQQAoApwfEQAADwsgAkHrAEcNASAARQ0BQQAoArygASIALwECQeUARw0BIAAvAQRB+QBHDQEgAC8BBkHzAEcNASAAQQZqIQFBACAAQQhqNgK8oAEQJ0EoRw0BQQBBACgCvK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Q0DQQAgAEEQajYCvKABECdBKEcNA0EAQQAoArygAUECajYCvKABECdBKUcNA0EAQQAoArygAUECajYCvKABECdB+wBHDQNBAEEAKAK8oAFBAmo2ArygARAnQfIARw0DQQAoArygASIAQQJqQeUAQfQAQfUAQfIAQe4AEBNFDQNBACAAQQxqNgK8oAEQJxpBACgCvKABIgAgAiAFED8NA0EAIAAgB0EBdGo2ArygARAnQdsARw0DQQBBACgCvKABQQJqNgK8oAEQJxpBACgCvKABIgAgBCADED8NA0EAIAAgBkEBdGo2ArygARAnQd0ARw0DQQBBACgCvKABQQJqNgK8oAECQBAnIgBBO0cNAEEAQQAoArygAUECajYCvKABECchAAsgAEH9AEcNA0EAQQAoArygAUECajYCvKABECdB/QBHDQNBAEEAKAK8oAFBAmo2ArygARAnQSlHDQNBAEEAKAK8oAFBAmo2ArygARAnIgBBO0cNAUEAQQAoArygAUECajYCvKABCxAnIQALIABB/QBHDQFBAEEAKAK8oAFBAmo2ArygARAnQSlHDQFBACgCtKABIQRBgCAhAANAAkACQCAEIABGDQAgByAAQQxqKAIAIABBCGooAgAiA2tBAXVHDQEgAiADIAUQPw0BIAAoAgAgAEEEaigCAEEAKAKgHxEAAEEAIAE2ArygAQsPCyAAQRBqIQAMAAsLIAMgAkEAKAKkHxEAAAtBACABNgK8oAELlQEBBH9BACgCvKABIQBBACgCwKABIQECQANAIAAiAkECaiEAIAIgAU8NAQJAIAAvAQAiA0HcAEYNAAJAIANBdmoiAkEDTQ0AIANBIkcNAkEAIAA2ArygAQ8LIAIOBAIBAQICCyACQQRqIQAgAi8BBEENRw0AIAJBBmogACACLwEGQQpGGyEADAALC0EAIAA2ArygARAeC1MBBH9BACgCvKABQQJqIQBBACgCwKABIQECQANAIAAiAkF+aiABTw0BIAJBAmohACACLwEAQXZqIgNBA0sNACADDgQBAAABAQsLQQAgAjYCvKABC3wBAn9BAEEAKAK8oAEiAEECajYCvKABIABBBmohAEEAKALAoAEhAQNAAkACQAJAIABBfGogAU8NACAAQ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AAFMAAAAQAAAAEAAAAAkAAABSAAAADAAAAAkAAAAJAAAAVAAAAA4AAAAFAAAACQAAAPMAAAAOAAAApgAAAAkAAABHAAAABQAAAAIAAAABAAAAAwAAAAMAAAACAAAAAAAAAAIAAAABAAAADQAAAAkAAAB4AAAABgAAAAMAAAAGAAAABAAAAAAAAAAdAAAACQAAACkAAAAGAAAAAgAAAAMAAAAJAAAAAAAAAAoAAAAKAAAALwAAAA8AAACWAQAABwAAAAIAAAAHAAAAEQAAAAkAAAA5AAAAFQAAAAIAAAANAAAAewAAAAUAAAAEAAAAAAAAAAIAAAABAAAAAgAAAAYAAAACAAAAAAAAAAkAAAAJAAAAMQAAAAQAAAACAAAAAQAAAAIAAAAEAAAACQAAAAkAAABKAQAAAwAAAGpLAAAJAAAAhwAAAAQAAAA8AAAABgAAABoAAAAJAAAA9gMAAAAAAAACAAAANgAAAAgAAAADAAAAUgAAAAAAAAAMAAAAAQAAAKxMAAABAAAAxxQAAAQAAAAEAAAABQAAAAkAAAAHAAAAAwAAAAYAAAAfAAAAAwAAAJUAAAACAAAAigUAADEAAAABAgAANgAAAAUAAAAxAAAACQAAAAAAAAAPAAAAAAAAABcAAAAEAAAAAgAAAA4AAABRBQAABgAAAAIAAAAQAAAAAwAAAAYAAAACAAAAAQAAAAIAAAAEAAAABgEAAAYAAAAKAAAACQAAAKMBAAANAAAA1wUAAAYAAABuAAAABgAAAAYAAAAJAAAAlxIAAAkAAAAHBQwA7wAAAABBmB8LHFCMAAABAAAAAgAAAAMAAAAEAAAAAAQAAPAfAAA=","function"==typeof atob?Uint8Array.from(atob(B),A=>A.charCodeAt(0)):Buffer.from(B,"base64")));var B;const{exports:E}=await WebAssembly.instantiate(A);Q=E})())} \ No newline at end of file +"use strict";exports.parse=parse;exports.init=init;const A=new Set(["implements","interface","let","package","private","protected","public","static","yield","enum"]);let Q;const B=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse(g,I="@"){if(!Q)throw new Error("Not initialized");const D=g.length+1,N=(Q.__heap_base.value||Q.__heap_base)+4*D-Q.memory.buffer.byteLength;N>0&&Q.memory.grow(Math.ceil(N/65536));const k=Q.sa(D);if((B?C:E)(g,new Uint16Array(Q.memory.buffer,k,D)),!Q.parseCJS(k,g.length,0,0,0))throw Object.assign(new Error(`Parse error ${I}${Q.e()}:${g.slice(0,Q.e()).split("\n").length}:${Q.e()-g.lastIndexOf("\n",Q.e()-1)}`),{idx:Q.e()});let w=new Set,J=new Set,H=new Set;for(;Q.rre();)J.add(g.slice(Q.res(),Q.ree()));for(;Q.ru();)H.add(g.slice(Q.us(),Q.ue()));for(;Q.re();){let B=g.slice(Q.es(),Q.ee());A.has(B)||H.has(B)||w.add(B)}return{exports:[...w],reexports:[...J]}}function E(A,Q){const B=A.length;let E=0;for(;E>>8}}function C(A,Q){const B=A.length;let E=0;for(;E{const A=await WebAssembly.compile((B="AGFzbQEAAAABkQEQYAJ/fwBgAABgAX8Bf2AAAX9gBn9/f39/fwF/YAF/AGAIf39/f39/f38Bf2AHf39/f39/fwF/YAN/f38Bf2AFf39/f38Bf2AOf39/f39/f39/f39/f38Bf2AKf39/f39/f39/fwF/YAt/f39/f39/f39/fwF/YAJ/fwF/YAR/f39/AX9gCX9/f39/f39/fwF/A0NCAgMDAwMDAwMDAwMAAAABBAICBQQFAQEBAgICAgEBAQEFAQEGAQIHAwICAggJAgEKAgsMDQQOBw0GAgICAg8CAgMIBAUBcAEFBQUDAQABBg8CfwFB0JgCC38AQdCYAgsHXA4GbWVtb3J5AgACc2EAAAFlAAECZXMAAgJlZQADA3JlcwAEA3JlZQAFAnVzAAYCdWUABwJyZQAIA3JyZQAJAnJ1AAoIcGFyc2VDSlMADwtfX2hlYXBfYmFzZQMBCQoBAEEBCwQLDA0OCuOgAUJ4AQF/QQAoApgfIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgLkH0EAIAA2AugfQQBBADYCwB9BAEEANgLIH0EAQQA2AsQfQQBBADYCzB9BAEEANgLUH0EAQQA2A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ygARAnEDBFDQIQJ0EsRw0CQQBBACgCvKABQQJqNgK8oAECQBAnIgBBJ0YNACAAQSJHDQMLQQBBACgCvKABIgJBAmoiAzYCvKABIAIvAQIQLUUNAkEAKAK8oAEiAi8BACAARw0CQQAgAkECajYCvKABECdBLEcNAUEAQQAoArygAUECajYCvKABECdB+wBHDQFBAEEAKAK8oAFBAmo2ArygAQJAECciAEHlAEcNAEEAKAK8oAEiAEECakHuAEH1AEHtAEHlAEHyAEHhAEHiAEHsAEHlABAxRQ0CQQAgAEEUajYCvKABECdBOkcNAkEAQQAoArygAUECajYCvKABECdB9ABHDQJBACgCvKABIgAvAQJB8gBHDQIgAC8BBEH1AEcNAiAALwEGQeUARw0CQQAgAEEIajYCvKABECdBLEcNAkEAQQAoArygAUECajYCvKABECchAAsCQCAAQecARg0AIABB9gBHDQJBACgCvKABIgAvAQJB4QBHDQIgAC8BBEHsAEcNAiAALwEGQfUARw0CIAAvAQhB5QBHDQJBACAAQQpqNgK8oAEQJ0E6Rw0CIAMgAkEAKAKcHxEAAEEAIAE2ArygAQ8LQQAoArygASIALwECQeUARw0BIAAvAQRB9ABHDQFBACAAQQZqNgK8oAECQBAnIgBBOkcNAEEAQQAoArygAUECajYCvKABECdB5gBHDQJBACgCvKABIgBBAmpB9QBB7gBB4wBB9ABB6QBB7wBB7gAQI0UNAkEAIABBEGoiADYCvKABAkAQJyIEQShGDQAgAEEAKAK8oAFGDQMgBBAtRQ0DCxAnIQALIABBKEcNAUEAQQAoArygAUECajYCvKABECdBKUcNAUEAQQAoArygAUECajYCvKABECdB+wBHDQFBAEEAKAK8oAFBAmo2ArygARAnQfIARw0BQQAoArygASIAQQJqQeUAQfQAQfUAQfIAQe4AEBNFDQFBACAAQQxqNgK8oAEQJxAtRQ0BAkACQAJAECciAEHbAEYNACAAQS5HDQJBAEEAKAK8oAFBAmo2ArygARAnEC0NAQwEC0EAQQAoArygAUECajYCvKABAkACQBAnIgBBIkYNACAAQSdHDQUQHQwBCxAVC0EAQQAoArygAUECajYCvKABECdB3QBHDQNBAEEAKAK8oAFBAmo2ArygAQsQJyEACwJAIABBO0cNAEEAQQAoArygAUECajYCvKABECchAAsgAEH9AEcNAUEAQQAoArygAUECajYCvKABAkAQJyIAQSxHDQBBAEEAKAK8oAFBAmo2ArygARAnIQALIABB/QBHDQFBAEEAKAK8oAFBAmo2ArygARAnQSlHDQEgAyACQQAoApwfEQAADwsgAkHrAEcNASAARQ0BQQAoArygASIALwECQeUARw0BIAAvAQRB+QBHDQEgAC8BBkHzAEcNASAAQQZqIQFBACAAQQhqNgK8oAEQJ0EoRw0BQQBBACgCvKABQQJqNgK8oAEQJyEAQQAoArygASECIAAQLUUNAUEAKAK8oAEhABAnQSlHDQFBAEEAKAK8oAEiAUECajYCvKABECdBLkcNAUEAQQAoArygAUECajYCvKABECdB5gBHDQFBACgCvKABIgNBAmpB7wBB8gBBxQBB4QBB4wBB6AAQJkUNAUEAIANBDmo2ArygARAnIQNBACgCvKABIgRBfmohASADQShHDQFBACAEQQJqNgK8oAEQJ0HmAEcNAUEAKAK8oAEiA0ECakH1AEHuAEHjAEH0AEHpAEHvAEHuABAjRQ0BQQAgA0EQajYCvKABECdBKEcNAUEAQQAoArygAUECajYCvKABECchA0EAKAK8oAEhBCADEC1FDQFBACgCvKABIQMQJ0EpRw0BQQBBACgCvKABQQJqNgK8oAEQJ0H7AEcNAUEAQQAoArygAUECajYCvKABECdB6QBHDQFBACgCvKABIgUvAQJB5gBHDQFBACAFQQRqNgK8oAEQJ0EoRw0BQQBBACgCvKABQQJqNgK8oAEQJxpBACgCvKABIgUgBCADIARrIgMQQQ0BIAAgAmsiBkEBdSEHQQAgBSADQQF1IghBAXRqNgK8oAECQAJAAkAQJyIAQSFGDQAgAEE9Rw0EQQAoArygASIALwECQT1HDQQgAC8BBEE9Rw0EQQAgAEEGajYCvKABAkAQJyIAQSdGDQAgAEEiRw0FC0EAKAK8oAEiBUECakHkAEHlAEHmAEHhAEH1AEHsAEH0ABAjRQ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ArygARAnQfIARw0DQQAoArygASIAQQJqQeUAQfQAQfUAQfIAQe4AEBNFDQNBACAAQQxqNgK8oAEQJxpBACgCvKABIgAgAiAGEEENA0EAIAAgB0EBdGo2ArygARAnQdsARw0DQQBBACgCvKABQQJqNgK8oAEQJxpBACgCvKABIgAgBCADEEENA0EAIAAgCEEBdGo2ArygARAnQd0ARw0DQQBBACgCvKABQQJqNgK8oAECQBAnIgBBO0cNAEEAQQAoArygAUECajYCvKABECchAAsgAEH9AEcNA0EAQQAoArygAUECajYCvKABAkAQJyIAQSxHDQBBAEEAKAK8oAFBAmo2ArygARAnIQALIABB/QBHDQNBAEEAKAK8oAFBAmo2ArygARAnQSlHDQNBAEEAKAK8oAFBAmo2ArygARAnIgBBO0cNAUEAQQAoArygAUECajYCvKABCxAnIQALIABB/QBHDQFBAEEAKAK8oAFBAmo2ArygARAnQSlHDQFBACgCtKABIQRBgCAhAANAAkACQCAEIABGDQAgByAAQQxqKAIAIABBCGooAgAiA2tBAXVHDQEgAiADIAYQQQ0BIAAoAgAgAEEEaigCAEEAKAKgHxEAAEEAIAE2ArygAQsPCyAAQRBqIQAMAAsLIAMgAkEAKAKkHxEAAAtBACABNgK8oAELlQEBBH9BACgCvKABIQBBACgCwKABIQECQANAIAAiAkECaiEAIAIgAU8NAQJAIAAvAQAiA0HcAEYNAAJAIANBdmoiAkEDTQ0AIANBIkcNAkEAIAA2ArygAQ8LIAIOBAIBAQICCyACQQRqIQAgAi8BBEENRw0AIAJBBmogACACLwEGQQpGGyEADAALC0EAIAA2ArygARAeC1MBBH9BACgCvKABQQJqIQBBACgCwKABIQECQANAIAAiAkF+aiABTw0BIAJBAmohACACLwEAQXZqIgNBA0sNACADDgQBAAABAQsLQQAgAjYCvKABC3wBAn9BAEEAKAK8oAEiAEECajYCvKABIABBBmohAEEAKALAoAEhAQNAAkACQAJAIABBfGogAU8NACAAQX5qLwEAQSpHDQIgAC8BAEEvRw0CQQAgAEF+ajYCvKABDAELIABBfmohAAtBAC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AAABAAAAAIAAAABAAAAAgAAAAQAAAAJAAAACQAAAEoBAAADAAAAaksAAAkAAACHAAAABAAAADwAAAAGAAAAGgAAAAkAAAD2AwAAAAAAAAIAAAA2AAAACAAAAAMAAABSAAAAAAAAAAwAAAABAAAArEwAAAEAAADHFAAABAAAAAQAAAAFAAAACQAAAAcAAAADAAAABgAAAB8AAAADAAAAlQAAAAIAAACKBQAAMQAAAAECAAA2AAAABQAAADEAAAAJAAAAAAAAAA8AAAAAAAAAFwAAAAQAAAACAAAADgAAAFEFAAAGAAAAAgAAABAAAAADAAAABgAAAAIAAAABAAAAAgAAAAQAAAAGAQAABgAAAAoAAAAJAAAAowEAAA0AAADXBQAABgAAAG4AAAAGAAAABgAAAAkAAACXEgAACQAAAAcFDADvAAAAAEGYHwscUIwAAAEAAAACAAAAAwAAAAQAAAAABAAA8B8AAA==","undefined"!=typeof window&&"function"==typeof atob?Uint8Array.from(atob(B),A=>A.charCodeAt(0)):Buffer.from(B,"base64")));var B;const{exports:E}=await WebAssembly.instantiate(A);Q=E})())} \ No newline at end of file diff --git a/deps/cjs-module-lexer/dist/lexer.mjs b/deps/cjs-module-lexer/dist/lexer.mjs index ab2873cd8ba3ba..6a28641494658c 100644 --- a/deps/cjs-module-lexer/dist/lexer.mjs +++ b/deps/cjs-module-lexer/dist/lexer.mjs @@ -1,2 +1,2 @@ -/* cjs-module-lexer 1.0.0 */ -const A=new Set(["implements","interface","let","package","private","protected","public","static","yield","enum"]);let Q;const B=1===new Uint8Array(new Uint16Array([1]).buffer)[0];export function parse(g,I="@"){if(!Q)throw new Error("Not initialized");const D=g.length+1,N=(Q.__heap_base.value||Q.__heap_base)+4*D-Q.memory.buffer.byteLength;N>0&&Q.memory.grow(Math.ceil(N/65536));const k=Q.sa(D);if((B?C:E)(g,new Uint16Array(Q.memory.buffer,k,D)),!Q.parseCJS(k,g.length,0,0,0))throw Object.assign(new Error(`Parse error ${I}${Q.e()}:${g.slice(0,Q.e()).split("\n").length}:${Q.e()-g.lastIndexOf("\n",Q.e()-1)}`),{idx:Q.e()});let w=new Set,J=new Set,H=new Set;for(;Q.rre();)J.add(g.slice(Q.res(),Q.ree()));for(;Q.ru();)H.add(g.slice(Q.us(),Q.ue()));for(;Q.re();){let B=g.slice(Q.es(),Q.ee());A.has(B)||H.has(B)||w.add(B)}return{exports:[...w],reexports:[...J]}}function E(A,Q){const B=A.length;let E=0;for(;E>>8}}function C(A,Q){const B=A.length;let E=0;for(;E{const A=await WebAssembly.compile((B="AGFzbQEAAAABhAEPYAJ/fwBgAABgAX8Bf2AAAX9gBn9/f39/fwF/YAF/AGAIf39/f39/f38Bf2AHf39/f39/fwF/YAN/f38Bf2AFf39/f38Bf2AOf39/f39/f39/f39/f38Bf2AKf39/f39/f39/fwF/YAt/f39/f39/f39/fwF/YAR/f39/AX9gAn9/AX8DQUACAwMDAwMDAwMDAwAAAAEEAgIFBAUBAQECAgICAQEBAQUBAQYBAgcDAgICCAkCAQoCCwwEDQcOBgICAgICAgMIBAUBcAEFBQUDAQABBg8CfwFB0JgCC38AQdCYAgsHXA4GbWVtb3J5AgACc2EAAAFlAAECZXMAAgJlZQADA3JlcwAEA3JlZQAFAnVzAAYCdWUABwJyZQAIA3JyZQAJAnJ1AAoIcGFyc2VDSlMADwtfX2hlYXBfYmFzZQMBCQoBAEEBCwQLDA0OCsyXAUB4AQF/QQAoApgfIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgLkH0EAIAA2AugfQQBBADYCwB9BAEEANgLIH0EAQQA2AsQfQQBBADYCzB9BAEEANgLUH0EAQQA2AtAfQQBBADYC2B9BAEEANgLgH0EAQQA2AtwfIAELCABBACgC7B8LFQBBACgCxB8oAgBBACgCmB9rQQF1CxUAQQAoAsQfKAIEQQAoApgfa0EBdQsVAEEAKALQHygCAEEAKAKYH2tBAXULFQBBACgC0B8oAgRBACgCmB9rQQF1CxUAQQAoAtwfKAIAQQAoApgfa0EBdQsVAEEAKALcHygCBEEAKAKYH2tBAXULJQEB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AK8oAEiAEECakHuAEH1AEHtAEHlAEHyAEHhAEHiAEHsAEHlABAxRQ0CQQAgAEEUajYCvKABECdBOkcNAkEAQQAoArygAUECajYCvKABECdB9ABHDQJBACgCvKABIgAvAQJB8gBHDQIgAC8BBEH1AEcNAiAALwEGQeUARw0CQQAgAEEIajYCvKABECdBLEcNAkEAQQAoArygAUECajYCvKABECchAAsCQCAAQecARg0AIABB9gBHDQJBACgCvKABIgAvAQJB4QBHDQIgAC8BBEHsAEcNAiAALwEGQfUARw0CIAAvAQhB5QBHDQJBACAAQQpqNgK8oAEQJ0E6Rw0CIAMgAkEAKAKcHxEAAEEAIAE2ArygAQ8LQQAoArygASIALwECQeUARw0BIAAvAQRB9ABHDQFBACAAQQZqNgK8oAECQBAnIgBBOkcNAEEAQQAoArygAUECajYCvKABECdB5gBHDQJBACgCvKABIgBBAmpB9QBB7gBB4wBB9ABB6QBB7wBB7gAQI0UNAkEAIABBEGoiADYCvKABAkAQJyIEQShGDQAgAEEAKAK8oAFGDQMgBBAtRQ0DCxAnIQALIABBKEcNAUEAQQAoArygAUECajYCvKABECdBKUcNAUEAQQAoArygAUECajYCvKABECdB+wBHDQFBAEEAKAK8oAFBAmo2ArygARAnQfIARw0BQQAoArygASIAQQJqQeUAQfQAQfUAQfIAQe4AEBNFDQFBACAAQQxqNgK8oAEQJxAtRQ0BAkACQAJAECciAEHbAEYNACAAQS5HDQJBAEEAKAK8oAFBAmo2ArygARAnEC0NAQwEC0EAQQAoArygAUECajYCvKABAkACQBAnIgBBIkYNACAAQSdHDQUQHQwBCxAVC0EAQQAoArygAUECajYCvKABECdB3QBHDQNBAEEAKAK8oAFBAmo2ArygAQsQJyEACwJAIABBO0cNAEEAQQAoArygAUECajYCvKABECchAAsgAEH9AEcNAUEAQQAoArygAUECajYCvKABECdB/QBHDQFBAEEAKAK8oAFBAmo2ArygARAnQSlHDQEgAyACQQAoApwfEQAADwsgAkHrAEcNASAARQ0BQQAoArygASIALwECQeUARw0BIAAvAQ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QJqNgK8oAEQJ0HmAEcNA0EAKAK8oAEiAEECakH1AEHuAEHjAEH0AEHpAEHvAEHuABAjRQ0DQQAgAEEQajYCvKABECdBKEcNA0EAQQAoArygAUECajYCvKABECdBKUcNA0EAQQAoArygAUECajYCvKABECdB+wBHDQNBAEEAKAK8oAFBAmo2ArygARAnQfIARw0DQQAoArygASIAQQJqQeUAQfQAQfUAQfIAQe4AEBNFDQNBACAAQQxqNgK8oAEQJxpBACgCvKABIgAgAiAFED8NA0EAIAAgB0EBdGo2ArygARAnQdsARw0DQQBBACgCvKABQQJqNgK8oAEQJxpBACgCvKABIgAgBCADED8NA0EAIAAgBkEBdGo2ArygARAnQd0ARw0DQQBBACgCvKABQQJqNgK8oAECQBAnIgBBO0cNAEEAQQAoArygAUECajYCvKABECchAAsgAEH9AEcNA0EAQQAoArygAUECajYCvKABECdB/QBHDQNBAEEAKAK8oAFBAmo2ArygARAnQSlHDQNBAEEAKAK8oAFBAmo2ArygARAnIgBBO0cNAUEAQQAoArygAUECajYCvKABCxAnIQALIABB/QBHDQFBAEEAKAK8oAFBAmo2ArygARAnQSlHDQFBACgCtKABIQRBgCAhAANAAkACQCAEIABGDQAgByAAQQxqKAIAIABBCGooAgAiA2tBAXVHDQEgAiADIAUQPw0BIAAoAgAgAEEEaigCAEEAKAKgHxEAAEEAIAE2ArygAQsPCyAAQRBqIQAMAAsLIAMgAkEAKAKkHxEAAAtBACABNgK8oAELlQEBBH9BACgCvKABIQBBACgCwKABIQECQANAIAAiAkECaiEAIAIgAU8NAQJAIAAvAQAiA0HcAEYNAAJAIANBdmoiAkEDTQ0AIANBIkcNAkEAIAA2ArygAQ8LIAIOBAIBAQICCyACQQRqIQAgAi8BBEENRw0AIAJBBmogACACLwEGQQpGGyEADAALC0EAIAA2ArygARAeC1MBBH9BACgCvKABQQJqIQBBACgCwKABIQECQANAIAAiAkF+aiABTw0BIAJBAmohACACLwEAQXZqIgNBA0sNACADDgQBAAABAQsLQQAgAjYCvKABC3wBA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AAAACQAAAAUAAAAAAAAAUgAAABMAAAANAAAACQAAANYAAAAGAAAAAwAAAAgAAAAcAAAAAQAAAFMAAAAQAAAAEAAAAAkAAABSAAAADAAAAAkAAAAJAAAAVAAAAA4AAAAFAAAACQAAAPMAAAAOAAAApgAAAAkAAABHAAAABQAAAAIAAAABAAAAAwAAAAMAAAACAAAAAAAAAAIAAAABAAAADQAAAAkAAAB4AAAABgAAAAMAAAAGAAAABAAAAAAAAAAdAAAACQAAACkAAAAGAAAAAgAAAAMAAAAJAAAAAAAAAAoAAAAKAAAALwAAAA8AAACWAQAABwAAAAIAAAAHAAAAEQAAAAkAAAA5AAAAFQAAAAIAAAANAAAAewAAAAUAAAAEAAAAAAAAAAIAAAABAAAAAgAAAAYAAAACAAAAAAAAAAkAAAAJAAAAMQAAAAQAAAACAAAAAQAAAAIAAAAEAAAACQAAAAkAAABKAQAAAwAAAGpLAAAJAAAAhwAAAAQAAAA8AAAABgAAABoAAAAJAAAA9gMAAAAAAAACAAAANgAAAAgAAAADAAAAUgAAAAAAAAAMAAAAAQAAAKxMAAABAAAAxxQAAAQAAAAEAAAABQAAAAkAAAAHAAAAAwAAAAYAAAAfAAAAAwAAAJUAAAACAAAAigUAADEAAAABAgAANgAAAAUAAAAxAAAACQAAAAAAAAAPAAAAAAAAABcAAAAEAAAAAgAAAA4AAABRBQAABgAAAAIAAAAQAAAAAwAAAAYAAAACAAAAAQAAAAIAAAAEAAAABgEAAAYAAAAKAAAACQAAAKMBAAANAAAA1wUAAAYAAABuAAAABgAAAAYAAAAJAAAAlxIAAAkAAAAHBQwA7wAAAABBmB8LHFCMAAABAAAAAgAAAAMAAAAEAAAAAAQAAPAfAAA=","function"==typeof atob?Uint8Array.from(atob(B),A=>A.charCodeAt(0)):Buffer.from(B,"base64")));var B;const{exports:E}=await WebAssembly.instantiate(A);Q=E})())} \ No newline at end of file +/* cjs-module-lexer 1.1.0 */ +const A=new Set(["implements","interface","let","package","private","protected","public","static","yield","enum"]);let Q;const B=1===new Uint8Array(new Uint16Array([1]).buffer)[0];export function parse(g,I="@"){if(!Q)throw new Error("Not initialized");const D=g.length+1,N=(Q.__heap_base.value||Q.__heap_base)+4*D-Q.memory.buffer.byteLength;N>0&&Q.memory.grow(Math.ceil(N/65536));const k=Q.sa(D);if((B?C:E)(g,new Uint16Array(Q.memory.buffer,k,D)),!Q.parseCJS(k,g.length,0,0,0))throw Object.assign(new Error(`Parse error ${I}${Q.e()}:${g.slice(0,Q.e()).split("\n").length}:${Q.e()-g.lastIndexOf("\n",Q.e()-1)}`),{idx:Q.e()});let w=new Set,J=new Set,H=new Set;for(;Q.rre();)J.add(g.slice(Q.res(),Q.ree()));for(;Q.ru();)H.add(g.slice(Q.us(),Q.ue()));for(;Q.re();){let B=g.slice(Q.es(),Q.ee());A.has(B)||H.has(B)||w.add(B)}return{exports:[...w],reexports:[...J]}}function E(A,Q){const B=A.length;let E=0;for(;E>>8}}function C(A,Q){const B=A.length;let E=0;for(;E{const A=await WebAssembly.compile((B="AGFzbQEAAAABkQEQYAJ/fwBgAABgAX8Bf2AAAX9gBn9/f39/fwF/YAF/AGAIf39/f39/f38Bf2AHf39/f39/fwF/YAN/f38Bf2AFf39/f38Bf2AOf39/f39/f39/f39/f38Bf2AKf39/f39/f39/fwF/YAt/f39/f39/f39/fwF/YAJ/fwF/YAR/f39/AX9gCX9/f39/f39/fwF/A0NCAgMDAwMDAwMDAwMAAAABBAICBQQFAQEBAgICAgEBAQEFAQEGAQIHAwICAggJAgEKAgsMDQQOBw0GAgICAg8CAgMIBAUBcAEFBQUDAQABBg8CfwFB0JgCC38AQdCYAgsHXA4GbWVtb3J5AgACc2EAAAFlAAECZXMAAgJlZQADA3JlcwAEA3JlZQAFAnVzAAYCdWUABwJyZQAIA3JyZQAJAnJ1AAoIcGFyc2VDSlMADwtfX2hlYXBfYmFzZQMBCQoBAEEBCwQLDA0OCuOgAUJ4AQF/QQAoApgfIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgLkH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ARAnEC0NAQwEC0EAQQAoArygAUECajYCvKABAkACQBAnIgBBIkYNACAAQSdHDQUQHQwBCxAVC0EAQQAoArygAUECajYCvKABECdB3QBHDQNBAEEAKAK8oAFBAmo2ArygAQsQJyEACwJAIABBO0cNAEEAQQAoArygAUECajYCvKABECchAAsgAEH9AEcNAUEAQQAoArygAUECajYCvKABAkAQJyIAQSxHDQBBAEEAKAK8oAFBAmo2ArygARAnIQALIABB/QBHDQFBAEEAKAK8oAFBAmo2ArygARAnQSlHDQEgAyACQQAoApwfEQAADwsgAkHrAEcNASAARQ0BQQAoArygASIALwECQeUARw0BIAAvAQRB+QBHDQEgAC8BBkHzAEcNASAAQQZqIQFBACAAQQhqNgK8oAEQJ0EoRw0BQQBBACgCvKABQQJqNgK8oAEQJyEAQQAoArygASECIAAQLUUNAUEAKAK8oAEhABAnQSlHDQFBAEEAKAK8oAEiAUECajYCvKABECdBLkcNAUEAQQAoArygAUECajYCvKABECdB5gBHDQFBACgCvKABIgNBAmpB7wBB8gBBxQBB4QBB4wBB6AAQJkUNAUEAIANBDmo2ArygARAnIQNBACgCvKABIgRBfmohASADQShHDQFBACAEQQJqNgK8oAEQJ0HmAEcNAUEAKAK8oAEiA0ECakH1AEHuAEHjAEH0AEHpAEHvAEHuABAjRQ0BQQAgA0EQajYCvKABECdBKEcNAUEAQQAoArygAUECajYCvKABECchA0EAKAK8oAEhBCADEC1FDQFBACgCvKABIQMQJ0EpRw0BQQBBACgCvKABQQJqNgK8oAEQJ0H7AEcNAUEAQQAoArygAUECajYCvKABECdB6QBHDQFBACgCvKABIgUvAQJB5gBHDQFBACAFQQRqNgK8oAEQJ0EoRw0BQQBBACgCvKABQQJqNgK8oAEQJxpBACgCvKABIgUgBCADIARrIgMQQQ0BIAAgAmsiBkEBdSEHQQAgBSADQQF1IghBAXRqNgK8oAECQAJAAkAQJyIAQSFGDQAgAEE9Rw0EQQAoArygASIALwECQT1HDQQgAC8BBEE9Rw0EQQAgAEEGajYCvKABAkAQJ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AoArygAUECajYCvKABECdBKUcNA0EAQQAoArygAUECajYCvKABECdB+wBHDQNBAEEAKAK8oAFBAmo2ArygARAnQfIARw0DQQAoArygASIAQQJqQeUAQfQAQfUAQfIAQe4AEBNFDQNBACAAQQxqNgK8oAEQJxpBACgCvKABIgAgAiAGEEENA0EAIAAgB0EBdGo2ArygARAnQdsARw0DQQBBACgCvKABQQJqNgK8oAEQJxpBACgCvKABIgAgBCADEEENA0EAIAAgCEEBdGo2ArygARAnQd0ARw0DQQBBACgCvKABQQJqNgK8oAECQBAnIgBBO0cNAEEAQQAoArygAUECajYCvKABECchAAsgAEH9AEcNA0EAQQAoArygAUECajYCvKABAkAQJyIAQSxHDQBBAEEAKAK8oAFBAmo2ArygARAnIQALIABB/QBHDQNBAEEAKAK8oAFBAmo2ArygARAnQSlHDQNBAEEAKAK8oAFBAmo2ArygARAnIgBBO0cNAUEAQQAoArygAUECajYCvKABCxAnIQALIABB/QBHDQFBAEEAKAK8oAFBAmo2ArygARAnQSlHDQFBACgCtKABIQRBgCAhAANAAkACQCAEIABGDQAgByAAQQxqKAIAIABBCGooAgAiA2tBAXVHDQEgAiADIAYQQQ0BIAAoAgAgAEEEaigCAEEAKAKgHxEAAEEAIAE2ArygAQsPCyAAQRBqIQAMAAsLIAMgAkEAKAKkHxEAAAtBACABNgK8oAELlQEBBH9BACgCvKABIQBBACgCwKABIQECQANAIAAiAkECaiEAIAIgAU8NAQJAIAAvAQAiA0HcAEYNAAJAIANBdmoiAkEDTQ0AIANBIkcNAkEAIAA2ArygAQ8LIAIOBAIBAQICCyACQQRqIQAgAi8BBEENRw0AIAJBBmogACACLwEGQQpGGyEADAALC0EAIAA2ArygARAeC1MBBH9BACgCvKABQQJqIQBBACgCwKABIQECQANAIAAiAkF+aiABTw0BIAJBAmohACACLwEAQXZqIgNBA0sNACADDgQBAAABAQsLQQAgAjYCvKABC3wBAn9BAEEAKAK8oAEiAEECajYCvKABIABBBmohAEEAKALAoAEhAQNAAkACQAJAIABB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0AAAB7AAAABQAAAAQAAAAAAAAAAgAAAAEAAAACAAAABgAAAAIAAAAAAAAACQAAAAkAAAAxAAAABAAAAAIAAAABAAAAAgAAAAQAAAAJAAAACQAAAEoBAAADAAAAaksAAAkAAACHAAAABAAAADwAAAAGAAAAGgAAAAkAAAD2AwAAAAAAAAIAAAA2AAAACAAAAAMAAABSAAAAAAAAAAwAAAABAAAArEwAAAEAAADHFAAABAAAAAQAAAAFAAAACQAAAAcAAAADAAAABgAAAB8AAAADAAAAlQAAAAIAAACKBQAAMQAAAAECAAA2AAAABQAAADEAAAAJAAAAAAAAAA8AAAAAAAAAFwAAAAQAAAACAAAADgAAAFEFAAAGAAAAAgAAABAAAAADAAAABgAAAAIAAAABAAAAAgAAAAQAAAAGAQAABgAAAAoAAAAJAAAAowEAAA0AAADXBQAABgAAAG4AAAAGAAAABgAAAAkAAACXEgAACQAAAAcFDADvAAAAAEGYHwscUIwAAAEAAAACAAAAAwAAAAQAAAAABAAA8B8AAA==","undefined"!=typeof window&&"function"==typeof atob?Uint8Array.from(atob(B),A=>A.charCodeAt(0)):Buffer.from(B,"base64")));var B;const{exports:E}=await WebAssembly.instantiate(A);Q=E})())} \ No newline at end of file diff --git a/deps/cjs-module-lexer/lexer.js b/deps/cjs-module-lexer/lexer.js index ed814600c04149..2659ecb2661167 100755 --- a/deps/cjs-module-lexer/lexer.js +++ b/deps/cjs-module-lexer/lexer.js @@ -254,6 +254,48 @@ function tryBacktrackAddStarExportBinding (bPos) { } } +// `Object.` `prototype.`? hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)` +function tryParseObjectHasOwnProperty (it_id) { + ch = commentWhitespace(); + if (ch !== 79/*O*/ || !source.startsWith('bject', pos + 1)) return false; + pos += 6; + ch = commentWhitespace(); + if (ch !== 46/*.*/) return false; + pos++; + ch = commentWhitespace(); + if (ch === 112/*p*/) { + if (!source.startsWith('rototype', pos + 1)) return false; + pos += 9; + ch = commentWhitespace(); + if (ch !== 46/*.*/) return false; + pos++; + ch = commentWhitespace(); + } + if (ch !== 104/*h*/ || !source.startsWith('asOwnProperty', pos + 1)) return false; + pos += 14; + ch = commentWhitespace(); + if (ch !== 46/*.*/) return false; + pos++; + ch = commentWhitespace(); + if (ch !== 99/*c*/ || !source.startsWith('all', pos + 1)) return false; + pos += 4; + ch = commentWhitespace(); + if (ch !== 40/*(*/) return false; + pos++; + ch = commentWhitespace(); + if (!identifier()) return false; + ch = commentWhitespace(); + if (ch !== 44/*,*/) return false; + pos++; + ch = commentWhitespace(); + if (!source.startsWith(it_id, pos)) return false; + pos += it_id.length; + ch = commentWhitespace(); + if (ch !== 41/*)*/) return false; + pos++; + return true; +} + function tryParseObjectDefineOrKeys (keys) { pos += 6; let revertPos = pos - 1; @@ -366,6 +408,10 @@ function tryParseObjectDefineOrKeys (keys) { if (ch !== 125/*}*/) break; pos++; ch = commentWhitespace(); + if (ch === 44/*,*/) { + pos++; + ch = commentWhitespace(); + } if (ch !== 125/*}*/) break; pos++; ch = commentWhitespace(); @@ -469,8 +515,94 @@ function tryParseObjectDefineOrKeys (keys) { if (ch === 59/*;*/) pos++; ch = commentWhitespace(); + + // `if (` + if (ch === 105/*i*/ && source.charCodeAt(pos + 1) === 102/*f*/) { + let inIf = true; + pos += 2; + ch = commentWhitespace(); + if (ch !== 40/*(*/) break; + pos++; + const ifInnerPos = pos; + // `Object.prototype.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)) return` `;`? + if (tryParseObjectHasOwnProperty(it_id)) { + ch = commentWhitespace(); + if (ch !== 41/*)*/) break; + pos++; + ch = commentWhitespace(); + if (ch !== 114/*r*/ || !source.startsWith('eturn', pos + 1)) break; + pos += 6; + ch = commentWhitespace(); + if (ch === 59/*;*/) + pos++; + ch = commentWhitespace(); + // match next if + if (ch === 105/*i*/ && source.charCodeAt(pos + 1) === 102/*f*/) { + pos += 2; + ch = commentWhitespace(); + if (ch !== 40/*(*/) break; + pos++; + } + else { + inIf = false; + } + } + else { + pos = ifInnerPos; + } + + // IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`? + if (inIf) { + if (!source.startsWith(it_id, pos)) break; + pos += it_id.length; + ch = commentWhitespace(); + if (ch !== 105/*i*/ || !source.startsWith('n ', pos + 1)) break; + pos += 3; + ch = commentWhitespace(); + if (!readExportsOrModuleDotExports(ch)) break; + ch = commentWhitespace(); + if (ch !== 38/*&*/ || source.charCodeAt(pos + 1) !== 38/*&*/) break; + pos += 2; + ch = commentWhitespace(); + if (!readExportsOrModuleDotExports(ch)) break; + ch = commentWhitespace(); + if (ch !== 91/*[*/) break; + pos++; + ch = commentWhitespace(); + if (!source.startsWith(it_id, pos)) break; + pos += it_id.length; + ch = commentWhitespace(); + if (ch !== 93/*]*/) break; + pos++; + ch = commentWhitespace(); + if (ch !== 61/*=*/ || !source.startsWith('==', pos + 1)) break; + pos += 3; + ch = commentWhitespace(); + if (!source.startsWith(id, pos)) break; + pos += id.length; + ch = commentWhitespace(); + if (ch !== 91/*[*/) break; + pos++; + ch = commentWhitespace(); + if (!source.startsWith(it_id, pos)) break; + pos += it_id.length; + ch = commentWhitespace(); + if (ch !== 93/*]*/) break; + pos++; + ch = commentWhitespace(); + if (ch !== 41/*)*/) break; + pos++; + ch = commentWhitespace(); + if (ch !== 114/*r*/ || !source.startsWith('eturn', pos + 1)) break; + pos += 6; + ch = commentWhitespace(); + if (ch === 59/*;*/) + pos++; + ch = commentWhitespace(); + } + } } - // `if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) `)` + // `if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` IDENTIFIER `.hasOwnProperty(` IDENTIFIER$2 `)` )? `)` else if (ch === 33/*!*/) { if (!source.startsWith('==', pos + 1)) break; pos += 3; @@ -483,67 +615,40 @@ function tryParseObjectDefineOrKeys (keys) { if (ch !== quot) break; pos += 1; ch = commentWhitespace(); + if (ch === 38/*&*/) { + if (source.charCodeAt(pos + 1) !== 38/*&*/) break; + pos += 2; + ch = commentWhitespace(); + if (ch !== 33/*!*/) break; + pos += 1; + ch = commentWhitespace(); + if (source.startsWith(id, pos)) { + pos += id.length; + ch = commentWhitespace(); + if (ch !== 46/*.*/) break; + pos++; + ch = commentWhitespace(); + if (ch !== 104/*h*/ || !source.startsWith('asOwnProperty', pos + 1)) break; + pos += 14; + ch = commentWhitespace(); + if (ch !== 40/*(*/) break; + pos += 1; + ch = commentWhitespace(); + if (!source.startsWith(it_id, pos)) break; + pos += it_id.length; + ch = commentWhitespace(); + if (ch !== 41/*)*/) break; + pos += 1; + } + else if (!tryParseObjectHasOwnProperty(it_id)) break; + ch = commentWhitespace(); + } if (ch !== 41/*)*/) break; pos += 1; ch = commentWhitespace(); } else break; - // `if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`? - if (ch === 105/*i*/ && source.charCodeAt(pos + 1) === 102/*f*/) { - pos += 2; - ch = commentWhitespace(); - if (ch !== 40/*(*/) break; - pos++; - ch = commentWhitespace(); - if (!source.startsWith(it_id, pos)) break; - pos += it_id.length; - ch = commentWhitespace(); - if (ch !== 105/*i*/ || !source.startsWith('n ', pos + 1)) break; - pos += 3; - ch = commentWhitespace(); - if (!readExportsOrModuleDotExports(ch)) break; - ch = commentWhitespace(); - if (ch !== 38/*&*/ || source.charCodeAt(pos + 1) !== 38/*&*/) break; - pos += 2; - ch = commentWhitespace(); - if (!readExportsOrModuleDotExports(ch)) break; - ch = commentWhitespace(); - if (ch !== 91/*[*/) break; - pos++; - ch = commentWhitespace(); - if (!source.startsWith(it_id, pos)) break; - pos += it_id.length; - ch = commentWhitespace(); - if (ch !== 93/*]*/) break; - pos++; - ch = commentWhitespace(); - if (ch !== 61/*=*/ || !source.startsWith('==', pos + 1)) break; - pos += 3; - ch = commentWhitespace(); - if (!source.startsWith(id, pos)) break; - pos += id.length; - ch = commentWhitespace(); - if (ch !== 91/*[*/) break; - pos++; - ch = commentWhitespace(); - if (!source.startsWith(it_id, pos)) break; - pos += it_id.length; - ch = commentWhitespace(); - if (ch !== 93/*]*/) break; - pos++; - ch = commentWhitespace(); - if (ch !== 41/*)*/) break; - pos++; - ch = commentWhitespace(); - if (ch !== 114/*r*/ || !source.startsWith('eturn', pos + 1)) break; - pos += 6; - ch = commentWhitespace(); - if (ch === 59/*;*/) - pos++; - ch = commentWhitespace(); - } - // EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` if (readExportsOrModuleDotExports(ch)) { ch = commentWhitespace(); @@ -656,6 +761,10 @@ function tryParseObjectDefineOrKeys (keys) { if (ch !== 125/*}*/) break; pos++; ch = commentWhitespace(); + if (ch === 44/*,*/) { + pos++; + ch = commentWhitespace(); + } if (ch !== 125/*}*/) break; pos++; ch = commentWhitespace(); @@ -1039,7 +1148,6 @@ function throwIfImportStatement () { // import.meta case 46/*.*/: throw new Error('Unexpected import.meta in CJS module.'); - return; default: // no space after "import" -> not an import keyword diff --git a/deps/cjs-module-lexer/package.json b/deps/cjs-module-lexer/package.json index 8288b01557b024..4f32411d998832 100755 --- a/deps/cjs-module-lexer/package.json +++ b/deps/cjs-module-lexer/package.json @@ -1,6 +1,6 @@ { "name": "cjs-module-lexer", - "version": "1.0.0", + "version": "1.1.0", "description": "Lexes CommonJS modules, returning their named exports metadata", "main": "lexer.js", "exports": { diff --git a/deps/npm/.licensee.json b/deps/npm/.licensee.json deleted file mode 100644 index 05235667ca2df0..00000000000000 --- a/deps/npm/.licensee.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "licenses": { - "spdx": [ - "CC-BY-3.0" - ], - "blueOak": "bronze" - }, - "corrections": true -} diff --git a/deps/npm/.mailmap b/deps/npm/.mailmap deleted file mode 100644 index 725a59da655908..00000000000000 --- a/deps/npm/.mailmap +++ /dev/null @@ -1,77 +0,0 @@ -Alex K. Wolfe -Andrew Bradley -Andrew Lunny -Arlo Breault -Ashley Williams -Ashley Williams -Benjamin Coe -Benjamin Coe -Brian White -Cedric Nelson -Charlie Robbins -Claudia Hernández -Dalmais Maxence -Danila Gerasimov -Dave Galbraith -David Beitey -David Rousselie -Domenic Denicola -Einar Otto Stangvik -Emma Ramirez -Erik Wienhold -Evan Lucas -Evan Lucas -Faiq Raza -Forbes Lindesay -Forrest L Norvell -Forrest L Norvell -Gabriel Barros -Geoff Flarity -Gregers Gram Rygg -Ifeanyi Oraelosi -isaacs -isaacs -isaacs -Jake Verbaten -James Sanders -James Treworgy -Jason Smith -Jed Fox -Jonas Weber -Joshua Bennett -Joshua Bennett -Julien Meddah -Kat Marchán -Kevin Lorenz -Kris Windham -Leonardo Rojas -Lin Clark -Luke Arduini -Maciej Małecki -Martin Ek -Max Goodman -Maxim Bogushevich -Maximilian Antoni -Michael Hayes -Misha Kaletsky -Nicolas Morel -Olivier Melcher -Ra'Shaun Stovall -Rebecca Turner -Rebecca Turner -Ryan Emery -Sam Mikes -Sreenivas Alapati -Stephanie Snopek -Takaya Kobayashi -Ted Yavuzkurt -Thomas Reggi -Timo Weiß -Tony -Trent Mick -Visnu Pitiyanuvath -Will Elwood -Wout Mertens -Yeonghoon Park -Zeke Sikelianos -Zoujie Wzj diff --git a/deps/npm/.npmignore b/deps/npm/.npmignore index d1b1fde3d4e0d0..409905efd27762 100644 --- a/deps/npm/.npmignore +++ b/deps/npm/.npmignore @@ -15,8 +15,18 @@ node_modules/npm-registry-mock /coverage/ # don't need these in the npm package. +Makefile +.licensee.json +.mailmap +changelogs/* +configure +make.bat +scripts html/*.png docs/nav.yml +docs/config.json +docs/dockhand.js +docs/template.html # don't ignore .npmignore files # these are used in some tests. diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index e58d1dffaeaf1d..9e5ac7fcaff39c 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -755,3 +755,7 @@ Ikko Ashimine MrBrain295 <66077254+MrBrain295@users.noreply.github.com> kumavis Christof Lemke +Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> +Bjørn Johansen +Fraqe +Edward Grech diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 22e6018f0a86c7..0b20696a89b952 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,97 @@ +## v7.6.3 (2021-03-11) + +### DOCUMENTATION + +* [`8c44e999b`](https://github.com/npm/cli/commit/8c44e999bdf7639893535c55beebf7996da2c47f) + [#2855](https://github.com/npm/cli/issues/2855) + Correct "npm COMMAND help" to "npm help COMMAND" + ([@dwardu](https://github.com/dwardu)) + +### DEPENDENCIES + +* [`57ed390d6`](https://github.com/npm/cli/commit/57ed390d64a44ae0a1b2c4afd79d690170b194ec) + `@npmcli/arborist@2.2.8` + * Respect link deps when calculating peerDep sets + +## v7.6.2 (2021-03-09) + +### BUG FIXES + +* [`e0a3a5218`](https://github.com/npm/cli/commit/e0a3a5218cac7ca5850930aaaad8a939ddf75d4d) + [#2831](https://github.com/npm/cli/issues/2831) + Fix cb() never called in search with --json option + ([@fraqe](https://github.com/fraqe)) +* [`85a8694dd`](https://github.com/npm/cli/commit/85a8694dd9b4a924a474ba75261914511a216868) + [#2795](https://github.com/npm/cli/issues/2795) + fix(npm.output): make output go through npm.output + ([@wraithgar](https://github.com/wraithgar)) +* [`9fe0df5b5`](https://github.com/npm/cli/commit/9fe0df5b5d7606e5841288d9931be6c04767c9ca) + [#2821](https://github.com/npm/cli/issues/2821) + fix(usage): clean up usage declarations + ([@wraithgar](https://github.com/wraithgar)) + +### DEPENDENCIES + +* [`7f470b5c2`](https://github.com/npm/cli/commit/7f470b5c25d544e36d97b28e28ae20dfa1d4ab31) + `@npmcli/arborist@2.2.7` + * fix(install): Do not revert a file: dep to version on bare name re-install +* [`e9b7fc275`](https://github.com/npm/cli/commit/e9b7fc275a0bdf8f00dbcf5dd2283675776fc459) + `libnpmdiff@2.0.4` + * fix(diff): Gracefully handle packages with prepare script +* [`c7314aa62`](https://github.com/npm/cli/commit/c7314aa62195b7f0d8886776692e8a2c892413ed) + `byte-size@7.0.1` +* [`864f48d43`](https://github.com/npm/cli/commit/864f48d4327269f521161cf89888ea2b6db5fdab) + `pacote@11.3.0` + +## v7.6.1 (2021-03-04) + +### BUG FIXES + +* [`3c9a589b0`](https://github.com/npm/cli/commit/3c9a589b004fa828a304abaf52d1d781710e1143) + [#2807](https://github.com/npm/cli/issues/2807) + `npm explain` show when an edge is a bundled edge + ([@kumavis](https://github.com/kumavis)) +* [`b33c760ce`](https://github.com/npm/cli/commit/b33c760cea7fe2696d35b5530abc1b455980fef1) + [#2766](https://github.com/npm/cli/issues/2766) + unused arguments cleanup + ([@sandersn](https://github.com/sandersn)) +* [`4a5dd3a5a`](https://github.com/npm/cli/commit/4a5dd3a5a200b3f4f7b47168497d8e03dca3a2ca) + [#2772](https://github.com/npm/cli/issues/2772) + fix(npm) pass npm context everywhere + ([@wraithgar](https://github.com/wraithgar)) +* [`e69be2ac5`](https://github.com/npm/cli/commit/e69be2ac5c35e985732e2baa00b70d39332e4b9f) + [#2789](https://github.com/npm/cli/issues/2789) + fix npm prefix on all Windows unix shells + ([@isaacs](https://github.com/isaacs)) +* [`2d682e4ca`](https://github.com/npm/cli/commit/2d682e4cab0cf109a16332f3222f1e9a4027db69) + [#2803](https://github.com/npm/cli/issues/2803) + fix(search): don't pass unused args + ([@wraithgar](https://github.com/wraithgar)) +* [`b3e7dd19b`](https://github.com/npm/cli/commit/b3e7dd19bb4888dad2bfb6702aed6560a7f91bf8) + [#2822](https://github.com/npm/cli/issues/2822) + fix(diff): set option "where" for pacote + ([@ruyadorno](https://github.com/ruyadorno)) +* [`96006640b`](https://github.com/npm/cli/commit/96006640b902d31415260df5ce3ad8d066a64623) + [#2824](https://github.com/npm/cli/issues/2824) + fix(repo, auth.sso): don't promisify open-url + ([@wraithgar](https://github.com/wraithgar)) + +### DOCUMENTATION + +* [`c8b73db82`](https://github.com/npm/cli/commit/c8b73db82f0f2445c20a0a64110586253accd66b) + [#2690](https://github.com/npm/cli/issues/2690) + fix(docs): update scripts docs + ([@wraithgar](https://github.com/wraithgar)) +* [`5d922394b`](https://github.com/npm/cli/commit/5d922394b7874b2b38d34f03f2decbe0eb3e8583) + [#2809](https://github.com/npm/cli/issues/2809) + update republish timeout after unpublish + ([@BAJ-](https://github.com/BAJ-)) + +### DEPENDENCIES + +* [`2d4ae598f`](https://github.com/npm/cli/commit/2d4ae598f30049680797685f76154b16a7e15a66) + `@npmcli/arborist@2.2.6` + ## v7.6.0 (2021-02-25) ### FEATURES diff --git a/deps/npm/Makefile b/deps/npm/Makefile deleted file mode 100644 index 4c96615203b026..00000000000000 --- a/deps/npm/Makefile +++ /dev/null @@ -1,100 +0,0 @@ -# vim: set softtabstop=2 shiftwidth=2: -SHELL = bash - -PUBLISHTAG = $(shell node scripts/publish-tag.js) -BRANCH = $(shell git rev-parse --abbrev-ref HEAD) - -markdowns = $(shell find docs -name '*.md' | grep -v 'index') - -# these docs have the @VERSION@ tag in them, so they have to be rebuilt -# whenever the package.json is touched, in case the version changed. -version_mandocs = $(shell grep -rl '@VERSION@' docs/content \ - |sed 's|.md|.1|g' \ - |sed 's|docs/content/commands/|man/man1/|g' ) - -cli_mandocs = $(shell find docs/content/commands -name '*.md' \ - |sed 's|.md|.1|g' \ - |sed 's|docs/content/commands/|man/man1/|g' ) - -files_mandocs = $(shell find docs/content/configuring-npm -name '*.md' \ - |sed 's|.md|.5|g' \ - |sed 's|docs/content/configuring-npm/|man/man5/|g' ) \ - -misc_mandocs = $(shell find docs/content/using-npm -name '*.md' \ - |sed 's|.md|.7|g' \ - |sed 's|docs/content/using-npm/|man/man7/|g' ) \ - -mandocs = $(cli_mandocs) $(files_mandocs) $(misc_mandocs) - -all: docs - -docs: mandocs htmldocs - -mandocs: dev-deps $(mandocs) - -$(version_mandocs): package.json - -htmldocs: dev-deps - node bin/npm-cli.js rebuild - cd docs && node dockhand.js >&2 - -clean: docs-clean gitclean - -docsclean: docs-clean - -docs-clean: - rm -rf man - -## build-time dependencies for the documentation -dev-deps: - node bin/npm-cli.js install --only=dev --no-audit --ignore-scripts - -## targets for man files, these are encouraged to be only built by running `make docs` or `make mandocs` -man/man1/%.1: docs/content/commands/%.md scripts/docs-build.js - @[ -d man/man1 ] || mkdir -p man/man1 - node scripts/docs-build.js $< $@ - -man/man5/npm-json.5: man/man5/package.json.5 - cp $< $@ - -man/man5/npm-global.5: man/man5/folders.5 - cp $< $@ - -man/man5/%.5: docs/content/configuring-npm/%.md scripts/docs-build.js - @[ -d man/man5 ] || mkdir -p man/man5 - node scripts/docs-build.js $< $@ - -man/man7/%.7: docs/content/using-npm/%.md scripts/docs-build.js - @[ -d man/man7 ] || mkdir -p man/man7 - node scripts/docs-build.js $< $@ - -test: dev-deps - node bin/npm-cli.js test - -ls-ok: - node . ls --production >/dev/null - -gitclean: - git clean -fd - -uninstall: - node bin/npm-cli.js rm -g -f npm - -link: uninstall - node bin/npm-cli.js link -f --ignore-scripts - -prune: - node bin/npm-cli.js prune --production --no-save --no-audit - @[[ "$(shell git status -s)" != "" ]] && echo "ERR: found unpruned files" && exit 1 || echo "git status is clean" - - -publish: gitclean ls-ok link test docs prune - @git push origin :v$(shell node bin/npm-cli.js --no-timing -v) 2>&1 || true - git push origin $(BRANCH) &&\ - git push origin --tags &&\ - node bin/npm-cli.js publish --tag=$(PUBLISHTAG) - -release: gitclean ls-ok docs prune - @bash scripts/release.sh - -.PHONY: all latest install dev link docs clean uninstall test man docs-clean docsclean release ls-ok dev-deps prune diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm index 4183703a7857e9..a131a535434044 100755 --- a/deps/npm/bin/npm +++ b/deps/npm/bin/npm @@ -1,10 +1,10 @@ -#!/bin/sh +#!/usr/bin/env bash (set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix basedir=`dirname "$0"` case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; esac NODE_EXE="$basedir/node.exe" @@ -15,23 +15,30 @@ if ! [ -x "$NODE_EXE" ]; then NODE_EXE=node fi -NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" +# this path is passed to node.exe, so it needs to match whatever +# kind of paths Node.js thinks it's using, typically win32 paths. +CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')" +NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" -case `uname` in - *MINGW*) - NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` - NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" - if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then - NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" - fi - ;; - *CYGWIN*) - NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` - NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" - if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then - NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" - fi - ;; -esac +NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` +if [ $? -ne 0 ]; then + # if this didn't work, then everything else below will fail + echo "Could not determine Node.js install directory" >&2 + exit 1 +fi +NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + +# a path that will fail -f test on any posix bash +NPM_WSL_PATH="/.." + +# WSL can run Windows binaries, so we have to give it the win32 path +# however, WSL bash tests against posix paths, so we need to construct that +# to know if npm is installed globally. +if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then + NPM_WSL_PATH=`wslpath "$NPM_PREFIX_NPM_CLI_JS"` +fi +if [ -f "$NPM_PREFIX_NPM_CLI_JS" ] || [ -f "$NPM_WSL_PATH" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" +fi "$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/deps/npm/bin/npx b/deps/npm/bin/npx index f43754d620a8ad..4b58a104b9e421 100755 --- a/deps/npm/bin/npx +++ b/deps/npm/bin/npx @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # This is used by the Node.js installer, which expects the cygwin/mingw # shell script to already be present in the npm dependency folder. @@ -8,7 +8,7 @@ basedir=`dirname "$0"` case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; esac NODE_EXE="$basedir/node.exe" @@ -16,24 +16,30 @@ if ! [ -x "$NODE_EXE" ]; then NODE_EXE=node fi -NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" -NPX_CLI_JS="$basedir/node_modules/npm/bin/npx-cli.js" - -case `uname` in - *MINGW*) - NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` - NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js" - if [ -f "$NPM_PREFIX_NPX_CLI_JS" ]; then - NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS" - fi - ;; - *CYGWIN*) - NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` - NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js" - if [ -f "$NPM_PREFIX_NPX_CLI_JS" ]; then - NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS" - fi - ;; -esac +# these paths are passed to node.exe, so they need to match whatever +# kind of paths Node.js thinks it's using, typically win32 paths. +CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')" +if [ $? -ne 0 ]; then + # if this didn't work, then everything else below will fail + echo "Could not determine Node.js install directory" >&2 + exit 1 +fi +NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" +NPX_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npx-cli.js" +NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` +NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js" + +# a path that will fail -f test on any posix bash +NPX_WSL_PATH="/.." + +# WSL can run Windows binaries, so we have to give it the win32 path +# however, WSL bash tests against posix paths, so we need to construct that +# to know if npm is installed globally. +if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then + NPX_WSL_PATH=`wslpath "$NPM_PREFIX_NPX_CLI_JS"` +fi +if [ -f "$NPM_PREFIX_NPX_CLI_JS" ] || [ -f "$NPX_WSL_PATH" ]; then + NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS" +fi "$NODE_EXE" "$NPX_CLI_JS" "$@" diff --git a/deps/npm/changelogs/CHANGELOG-1.md b/deps/npm/changelogs/CHANGELOG-1.md deleted file mode 100644 index ea409c3d998b7b..00000000000000 --- a/deps/npm/changelogs/CHANGELOG-1.md +++ /dev/null @@ -1,743 +0,0 @@ -### v1.4.29 (2015-10-29): - -#### THINGS ARE HAPPENING IN LTS LAND - -In a special one-off release as part of the [strategy to get a version of npm -into Node LTS that works with the current -registry](https://github.com/nodejs/LTS/issues/37), modify npm to print out -this deprecation banner literally every time npm is invoked to do anything: - -``` -npm WARN deprecated This version of npm lacks support for important features, -npm WARN deprecated such as scoped packages, offered by the primary npm -npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the -npm WARN deprecated latest stable version. To upgrade to npm@2, run: -npm WARN deprecated -npm WARN deprecated npm -g install npm@latest-2 -npm WARN deprecated -npm WARN deprecated To upgrade to the latest stable version, run: -npm WARN deprecated -npm WARN deprecated npm -g install npm@latest -npm WARN deprecated -npm WARN deprecated (Depending on how Node.js was installed on your system, you -npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if -npm WARN deprecated on Windows, run them from an Administrator prompt.) -npm WARN deprecated -npm WARN deprecated If you're running the version of npm bundled with -npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS -npm WARN deprecated will be bundled with a version of npm@2, which has some small -npm WARN deprecated backwards-incompatible changes made to `npm run-script` and -npm WARN deprecated semver behavior. -``` - -The message basically tells the tale: Node 0.10 will finally be getting -`npm@2`, so those of you who haven't upgraded your build systems to deal with -its (relatively small) breaking changes should do so now. - -Also, this version doesn't even pretend that it can deal with scoped packages, -which, given the confusing behavior of older versions of `npm@1.4`, where it -would sometimes try to install packages from GitHub, is a distinct improvement. - -There is no good reason for you as an end user to upgrade to this version of -npm yourself. - -* [`709e9b4`](https://github.com/npm/npm/commit/709e9b44f5df9817a1c4babfbf26a2329bd265fb) - Print 20-line deprecation banner on all command invocations. - ([@othiym23](https://github.com/othiym23)) -* [`0c29d09`](https://github.com/npm/npm/commit/0c29d0906608e8e174bd30a7a245e19795326051) - Crash out immediately with an exhortation to upgrade on attempts to use - scoped packages. ([@othiym23](https://github.com/othiym23)) - -### v1.5.0-alpha-4 (2014-07-18): - -* fall back to `_auth` config as default auth when using default registry - ([@isaacs](https://github.com/isaacs)) -* support for 'init.version' for those who don't want to deal with semver 0.0.x - oddities ([@rvagg](https://github.com/rvagg)) -* [`be06213`](https://github.com/npm/npm/commit/be06213415f2d51a50d2c792b4cd0d3412a9a7b1) - remove residual support for `win` log level - ([@aterris](https://github.com/aterris)) - -### v1.5.0-alpha-3 (2014-07-17): - -* [`a3a85dd`](https://github.com/npm/npm/commit/a3a85dd004c9245a71ad2f0213bd1a9a90d64cd6) - `--save` scoped packages correctly ([@othiym23](https://github.com/othiym23)) -* [`18a3385`](https://github.com/npm/npm/commit/18a3385bcf8bfb8312239216afbffb7eec759150) - `npm-registry-client@3.0.2` ([@othiym23](https://github.com/othiym23)) -* [`375988b`](https://github.com/npm/npm/commit/375988b9bf5aa5170f06a790d624d31b1eb32c6d) - invalid package names are an early error for optional deps - ([@othiym23](https://github.com/othiym23)) -* consistently use `node-package-arg` instead of arbitrary package spec - splitting ([@othiym23](https://github.com/othiym23)) - -### v1.5.0-alpha-2 (2014-07-01): - -* [`54cf625`](https://github.com/npm/npm/commit/54cf62534e3331e3f454e609e44f0b944e819283) - fix handling for 301s in `npm-registry-client@3.0.1` - ([@Raynos](https://github.com/Raynos)) -* [`e410861`](https://github.com/npm/npm/commit/e410861c69a3799c1874614cb5b87af8124ff98d) - don't crash if no username set on `whoami` - ([@isaacs](https://github.com/isaacs)) -* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) - respect `--json` for output ([@isaacs](https://github.com/isaacs)) -* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) - outdated: Don't show headings if there's nothing to output - ([@isaacs](https://github.com/isaacs)) -* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) - outdated: Default to `latest` rather than `*` for unspecified deps - ([@isaacs](https://github.com/isaacs)) - -### v1.5.0-alpha-1 (2014-07-01): - -* [`eef4884`](https://github.com/npm/npm/commit/eef4884d6487ee029813e60a5f9c54e67925d9fa) - use the correct piece of the spec for GitHub shortcuts - ([@othiym23](https://github.com/othiym23)) - -### v1.5.0-alpha-0 (2014-07-01): - -* [`7f55057`](https://github.com/npm/npm/commit/7f55057807cfdd9ceaf6331968e666424f48116c) - install scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) - ([@othiym23](https://github.com/othiym23)) -* [`0df7e16`](https://github.com/npm/npm/commit/0df7e16c0232d8f4d036ebf4ec3563215517caac) - publish scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) - ([@othiym23](https://github.com/othiym23)) -* [`0689ba2`](https://github.com/npm/npm/commit/0689ba249b92b4c6279a26804c96af6f92b3a501) - support (and save) --scope=@s config - ([@othiym23](https://github.com/othiym23)) -* [`f34878f`](https://github.com/npm/npm/commit/f34878fc4cee29901e4daf7bace94be01e25cad7) - scope credentials to registry ([@othiym23](https://github.com/othiym23)) -* [`0ac7ca2`](https://github.com/npm/npm/commit/0ac7ca233f7a69751fe4386af6c4daa3ee9fc0da) - capture and store bearer tokens when sent by registry - ([@othiym23](https://github.com/othiym23)) -* [`63c3277`](https://github.com/npm/npm/commit/63c3277f089b2c4417e922826bdc313ac854cad6) - only delete files that are created by npm - ([@othiym23](https://github.com/othiym23)) -* [`4f54043`](https://github.com/npm/npm/commit/4f540437091d1cbca3915cd20c2da83c2a88bb8e) - `npm-package-arg@2.0.0` ([@othiym23](https://github.com/othiym23)) -* [`9e1460e`](https://github.com/npm/npm/commit/9e1460e6ac9433019758481ec031358f4af4cd44) - `read-package-json@1.2.3` ([@othiym23](https://github.com/othiym23)) -* [`719d8ad`](https://github.com/npm/npm/commit/719d8adb9082401f905ff4207ede494661f8a554) - `fs-vacuum@1.2.1` ([@othiym23](https://github.com/othiym23)) -* [`9ef8fe4`](https://github.com/npm/npm/commit/9ef8fe4d6ead3acb3e88c712000e2d3a9480ebec) - `async-some@1.0.0` ([@othiym23](https://github.com/othiym23)) -* [`a964f65`](https://github.com/npm/npm/commit/a964f65ab662107b62a4ca58535ce817e8cca331) - `npmconf@2.0.1` ([@othiym23](https://github.com/othiym23)) -* [`113765b`](https://github.com/npm/npm/commit/113765bfb7d3801917c1d9f124b8b3d942bec89a) - `npm-registry-client@3.0.0` ([@othiym23](https://github.com/othiym23)) - -### v1.4.28 (2014-09-12): - -* [`f4540b6`](https://github.com/npm/npm/commit/f4540b6537a87e653d7495a9ddcf72949fdd4d14) - [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just - before the CLI exits ([@isaacs](https://github.com/isaacs)) -* [`1eabfd5`](https://github.com/npm/npm/commit/1eabfd5c03f33c2bd28823714ff02059eeee3899) - [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all - callbacks have finished before proceeding - ([@othiym23](https://github.com/othiym23)) - -### v1.4.27 (2014-09-04): - -* [`4cf3c8f`](https://github.com/npm/npm/commit/4cf3c8fd78c9e2693a5f899f50c28f4823c88e2e) - [#6007](https://github.com/npm/npm/issues/6007) request@2.42.0: properly set - headers on proxy requests ([@isaacs](https://github.com/isaacs)) -* [`403cb52`](https://github.com/npm/npm/commit/403cb526be1472bb7545fa8e62d4976382cdbbe5) - [#6055](https://github.com/npm/npm/issues/6055) npmconf@1.1.8: restore - case-insensitivity of environmental config - ([@iarna](https://github.com/iarna)) - -### v1.4.26 (2014-08-28): - -* [`eceea95`](https://github.com/npm/npm/commit/eceea95c804fa15b18e91c52c0beb08d42a3e77d) - `github-url-from-git@1.4.0`: add support for git+https and git+ssh - ([@stefanbuck](https://github.com/stefanbuck)) -* [`e561758`](https://github.com/npm/npm/commit/e5617587e7d7ab686192391ce55357dbc7fed0a3) - `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) -* [`0c4fab3`](https://github.com/npm/npm/commit/0c4fab372ee76eab01dda83b6749429a8564902e) - `cmd-shim@2.0.0`: upgrade to graceful-fs 3 - ([@ForbesLindesay](https://github.com/ForbesLindesay)) -* [`2d69e4d`](https://github.com/npm/npm/commit/2d69e4d95777671958b5e08d3b2f5844109d73e4) - `github-url-from-username-repo@1.0.0`: accept slashes in branch names - ([@robertkowalski](https://github.com/robertkowalski)) -* [`81f9b2b`](https://github.com/npm/npm/commit/81f9b2bac9d34c223ea093281ba3c495f23f10d1) - ensure lifecycle spawn errors caught properly - ([@isaacs](https://github.com/isaacs)) -* [`bfaab8c`](https://github.com/npm/npm/commit/bfaab8c6e0942382a96b250634ded22454c36b5a) - `npm-registry-client@2.0.7`: properly encode % in passwords - ([@isaacs](https://github.com/isaacs)) -* [`91cfb58`](https://github.com/npm/npm/commit/91cfb58dda851377ec604782263519f01fd96ad8) - doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) - -### v1.4.25 (2014-08-21): - -* [`64c0ec2`](https://github.com/npm/npm/commit/64c0ec241ef5d83761ca8de54acb3c41b079956e) - `npm-registry-client@2.0.6`: Print the notification header returned by the - registry, and make sure status codes are printed without gratuitous quotes - around them. - ([@othiym23](https://github.com/othiym23)) -* [`a8ed12b`](https://github.com/npm/npm/commit/a8ed12b) `tar@1.0.1`: - Add test for removing an extract target immediately after unpacking. - ([@isaacs](https://github.com/isaacs)) -* [`70fd11d`](https://github.com/npm/npm/commit/70fd11d) - `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, - and `retries` options. Part 2 of race condition leading to `ENOENT` - errors. - ([@isaacs](https://github.com/isaacs)) -* [`0072c4d`](https://github.com/npm/npm/commit/0072c4d) - `fstream@1.0.2`: Fix a double-finish call which can result in excess - FS operations after the `close` event. Part 2 of race condition - leading to `ENOENT` errors. - ([@isaacs](https://github.com/isaacs)) - -### v1.4.24 (2014-08-14): - -* [`9344bd9`](https://github.com/npm/npm/commit/9344bd9b2929b5c399a0e0e0b34d45bce7bc24bb) - doc: add new changelog ([@othiym23](https://github.com/othiym23)) -* [`4be76fd`](https://github.com/npm/npm/commit/4be76fd65e895883c337a99f275ccc8c801adda3) - doc: update version doc to include `pre-*` increment args - ([@isaacs](https://github.com/isaacs)) -* [`e4f2620`](https://github.com/npm/npm/commit/e4f262036080a282ad60e236a9aeebd39fde9fe4) - build: add `make tag` to tag current release as `latest` - ([@isaacs](https://github.com/isaacs)) -* [`ec2596a`](https://github.com/npm/npm/commit/ec2596a7cb626772780b25b0a94a7e547a812bd5) - build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) -* [`9ee55f8`](https://github.com/npm/npm/commit/9ee55f892b8b473032a43c59912c5684fd1b39e6) - build: add script to output `v1.4-next` publish tag - ([@isaacs](https://github.com/isaacs)) -* [`aecb56f`](https://github.com/npm/npm/commit/aecb56f95a84687ea46920a0b98aaa587fee1568) - build: remove outdated `docpublish` make target - ([@isaacs](https://github.com/isaacs)) -* [`b57a9b7`](https://github.com/npm/npm/commit/b57a9b7ccd13e6b38831ed63595c8ea5763da247) - build: remove unpublish step from `make publish` - ([@isaacs](https://github.com/isaacs)) -* [`2c6acb9`](https://github.com/npm/npm/commit/2c6acb96c71c16106965d5cd829b67195dd673c7) - install: rename `.gitignore` when unpacking foreign tarballs - ([@isaacs](https://github.com/isaacs)) -* [`22f3681`](https://github.com/npm/npm/commit/22f3681923e993a47fc1769ba735bfa3dd138082) - cache: detect non-gzipped tar files more reliably - ([@isaacs](https://github.com/isaacs)) - -### v1.4.23 (2014-07-31): - -* [`8dd11d1`](https://github.com/npm/npm/commit/8dd11d1) update several - dependencies to avoid using `semver`s starting with 0. - -### v1.4.22 (2014-07-31): - -* [`d9a9e84`](https://github.com/npm/npm/commit/d9a9e84) `read-package-json@1.2.4` - ([@isaacs](https://github.com/isaacs)) -* [`86f0340`](https://github.com/npm/npm/commit/86f0340) - `github-url-from-git@1.2.0` ([@isaacs](https://github.com/isaacs)) -* [`a94136a`](https://github.com/npm/npm/commit/a94136a) `fstream@0.1.29` - ([@isaacs](https://github.com/isaacs)) -* [`bb82d18`](https://github.com/npm/npm/commit/bb82d18) `glob@4.0.5` - ([@isaacs](https://github.com/isaacs)) -* [`5b6bcf4`](https://github.com/npm/npm/commit/5b6bcf4) `cmd-shim@1.1.2` - ([@isaacs](https://github.com/isaacs)) -* [`c2aa8b3`](https://github.com/npm/npm/commit/c2aa8b3) license: Cleaned up - legalese with actual lawyer ([@isaacs](https://github.com/isaacs)) -* [`63fe0ee`](https://github.com/npm/npm/commit/63fe0ee) `init-package-json@1.0.0` - ([@isaacs](https://github.com/isaacs)) - -### v1.4.21 (2014-07-14): - -* [`88f51aa`](https://github.com/npm/npm/commit/88f51aa27eb9a958d1fa7ec50fee5cfdedd05110) - fix handling for 301s in `npm-registry-client@2.0.3` - ([@Raynos](https://github.com/Raynos)) - -### v1.4.20 (2014-07-02): - -* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) - respect `--json` for output ([@isaacs](https://github.com/isaacs)) -* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) - outdated: Don't show headings if there's nothing to output - ([@isaacs](https://github.com/isaacs)) -* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) - outdated: Default to `latest` rather than `*` for unspecified deps - ([@isaacs](https://github.com/isaacs)) - -### v1.4.19 (2014-07-01): - -* [`f687433`](https://github.com/npm/npm/commit/f687433) relative URLS for - working non-root registry URLS ([@othiym23](https://github.com/othiym23)) -* [`bea190c`](https://github.com/npm/npm/commit/bea190c) - [#5591](https://github.com/npm/npm/issues/5591) bump nopt and npmconf - ([@isaacs](https://github.com/isaacs)) - -### v1.4.18 (2014-06-29): - -* Bump glob dependency from 4.0.2 to 4.0.3. It now uses graceful-fs when - available, increasing resilience to [various filesystem - errors](https://github.com/isaacs/node-graceful-fs#improvements-over-fs-module). - ([@isaacs](https://github.com/isaacs)) - -### v1.4.17 (2014-06-27): - -* replace escape codes with ansicolors - ([@othiym23](https://github.com/othiym23)) -* Allow to build all the docs OOTB. ([@GeJ](https://github.com/GeJ)) -* Use core.longpaths on win32 git - fixes - [#5525](https://github.com/npm/npm/issues/5525) ([@bmeck](https://github.com/bmeck)) -* `npmconf@1.1.2` ([@isaacs](https://github.com/isaacs)) -* Consolidate color sniffing in config/log loading process - ([@isaacs](https://github.com/isaacs)) -* add verbose log when project config file is ignored - ([@isaacs](https://github.com/isaacs)) -* npmconf: Float patch to remove 'scope' from config defs - ([@isaacs](https://github.com/isaacs)) -* doc: npm-explore can't handle a version - ([@robertkowalski](https://github.com/robertkowalski)) -* Add user-friendly errors for ENOSPC and EROFS. - ([@voodootikigod](https://github.com/voodootikigod)) -* bump tar and fstream deps ([@isaacs](https://github.com/isaacs)) -* Run the npm-registry-couchapp tests along with npm tests - ([@isaacs](https://github.com/isaacs)) - -### v1.2.8000 (2014-06-17): - -* Same as v1.4.16, but with the spinner disabled, and a version number that - starts with v1.2. - -### v1.4.16 (2014-06-17): - -* `npm-registry-client@2.0.2` ([@isaacs](https://github.com/isaacs)) -* `fstream@0.1.27` ([@isaacs](https://github.com/isaacs)) -* `sha@1.2.4` ([@isaacs](https://github.com/isaacs)) -* `rimraf@2.2.8` ([@isaacs](https://github.com/isaacs)) -* `npmlog@1.0.1` ([@isaacs](https://github.com/isaacs)) -* `npm-registry-client@2.0.1` ([@isaacs](https://github.com/isaacs)) -* removed redundant dependency ([@othiym23](https://github.com/othiym23)) -* `npmconf@1.0.5` ([@isaacs](https://github.com/isaacs)) -* Properly handle errors that can occur in the config-loading process - ([@isaacs](https://github.com/isaacs)) - -### v1.4.15 (2014-06-10): - -* cache: atomic de-race-ified package.json writing - ([@isaacs](https://github.com/isaacs)) -* `fstream@0.1.26` ([@isaacs](https://github.com/isaacs)) -* `graceful-fs@3.0.2` ([@isaacs](https://github.com/isaacs)) -* `osenv@0.1.0` ([@isaacs](https://github.com/isaacs)) -* Only spin the spinner when we're fetching stuff - ([@isaacs](https://github.com/isaacs)) -* Update `osenv@0.1.0` which removes ~/tmp as possible tmp-folder - ([@robertkowalski](https://github.com/robertkowalski)) -* `ini@1.2.1` ([@isaacs](https://github.com/isaacs)) -* `graceful-fs@3` ([@isaacs](https://github.com/isaacs)) -* Update glob and things depending on glob - ([@isaacs](https://github.com/isaacs)) -* github-url-from-username-repo and read-package-json updates - ([@isaacs](https://github.com/isaacs)) -* `editor@0.1.0` ([@isaacs](https://github.com/isaacs)) -* `columnify@1.1.0` ([@isaacs](https://github.com/isaacs)) -* bump ansi and associated deps ([@isaacs](https://github.com/isaacs)) - -### v1.4.14 (2014-06-05): - -* char-spinner: update to not bork windows - ([@isaacs](https://github.com/isaacs)) - -### v1.4.13 (2014-05-23): - -* Fix `npm install` on a tarball. - ([`ed3abf1`](https://github.com/npm/npm/commit/ed3abf1aa10000f0f687330e976d78d1955557f6), - [#5330](https://github.com/npm/npm/issues/5330), - [@othiym23](https://github.com/othiym23)) -* Fix an issue with the spinner on Node 0.8. - ([`9f00306`](https://github.com/npm/npm/commit/9f003067909440390198c0b8f92560d84da37762), - [@isaacs](https://github.com/isaacs)) -* Re-add `npm.commands.cache.clean` and `npm.commands.cache.read` APIs, and - document `npm.commands.cache.*` as npm-cache(3). - ([`e06799e`](https://github.com/npm/npm/commit/e06799e77e60c1fc51869619083a25e074d368b3), - [@isaacs](https://github.com/isaacs)) - -### v1.4.12 (2014-05-23): - -* remove normalize-package-data from top level, de-^-ify inflight dep - ([@isaacs](https://github.com/isaacs)) -* Always sort saved bundleDependencies ([@isaacs](https://github.com/isaacs)) -* add inflight to bundledDependencies - ([@othiym23](https://github.com/othiym23)) - -### v1.4.11 (2014-05-22): - -* fix `npm ls` labeling issue -* `node-gyp@0.13.1` -* default repository to https:// instead of git:// -* addLocalTarball: Remove extraneous unpack - ([@isaacs](https://github.com/isaacs)) -* Massive cache folder refactor ([@othiym23](https://github.com/othiym23) and - [@isaacs](https://github.com/isaacs)) -* Busy Spinner, no http noise ([@isaacs](https://github.com/isaacs)) -* Per-project .npmrc file support ([@isaacs](https://github.com/isaacs)) -* `npmconf@1.0.0`, Refactor config/uid/prefix loading process - ([@isaacs](https://github.com/isaacs)) -* Allow once-disallowed characters in passwords - ([@isaacs](https://github.com/isaacs)) -* Send npm version as 'version' header ([@isaacs](https://github.com/isaacs)) -* fix cygwin encoding issue (Karsten Tinnefeld) -* Allow non-github repositories with `npm repo` - ([@evanlucas](https://github.com/evanlucas)) -* Allow peer deps to be satisfied by grandparent -* Stop optional deps moving into deps on `update --save` - ([@timoxley](https://github.com/timoxley)) -* Ensure only matching deps update with `update --save*` - ([@timoxley](https://github.com/timoxley)) -* Add support for `prerelease`, `preminor`, `prepatch` to `npm version` - -### v1.4.10 (2014-05-05): - -* Don't set referer if already set -* fetch: Send referer and npm-session headers -* `run-script`: Support `--parseable` and `--json` -* list runnable scripts ([@evanlucas](https://github.com/evanlucas)) -* Use marked instead of ronn for html docs - -### v1.4.9 (2014-05-01): - -* Send referer header (with any potentially private stuff redacted) -* Fix critical typo bug in previous npm release - -### v1.4.8 (2014-05-01): - -* Check SHA before using files from cache -* adduser: allow change of the saved password -* Make `npm install` respect `config.unicode` -* Fix lifecycle to pass `Infinity` for config env value -* Don't return 0 exit code on invalid command -* cache: Handle 404s and other HTTP errors as errors -* Resolve ~ in path configs to env.HOME -* Include npm version in default user-agent conf -* npm init: Use ISC as default license, use save-prefix for deps -* Many test and doc fixes - -### v1.4.7 (2014-04-15): - -* Add `--save-prefix` option that can be used to override the default of `^` - when using `npm install --save` and its counterparts. - ([`64eefdf`](https://github.com/npm/npm/commit/64eefdfe26bb27db8dc90e3ab5d27a5ef18a4470), - [@thlorenz](https://github.com/thlorenz)) -* Allow `--silent` to silence the echoing of commands that occurs with `npm - run`. - ([`c95cf08`](https://github.com/npm/npm/commit/c95cf086e5b97dbb48ff95a72517b203a8f29eab), - [@Raynos](https://github.com/Raynos)) -* Some speed improvements to the cache, which should improve install times. - ([`cb94310`](https://github.com/npm/npm/commit/cb94310a6adb18cb7b881eacb8d67171eda8b744), - [`3b0870f`](https://github.com/npm/npm/commit/3b0870fb2f40358b3051abdab6be4319d196b99d), - [`120f5a9`](https://github.com/npm/npm/commit/120f5a93437bbbea9249801574a2f33e44e81c33), - [@isaacs](https://github.com/isaacs)) -* Improve ability to retry registry requests when a subset of the registry - servers are down. - ([`4a5257d`](https://github.com/npm/npm/commit/4a5257de3870ac3dafa39667379f19f6dcd6093e), - https://github.com/npm/npm-registry-client/commit/7686d02cb0b844626d6a401e58c0755ef3bc8432, - [@isaacs](https://github.com/isaacs)) -* Fix marking of peer dependencies as extraneous. - ([`779b164`](https://github.com/npm/npm/commit/779b1649764607b062c031c7e5c972151b4a1754), - https://github.com/npm/read-installed/commit/6680ba6ef235b1ca3273a00b70869798ad662ddc, - [@isaacs](https://github.com/isaacs)) -* Fix npm crashing when doing `npm shrinkwrap` in the presence of a - `package.json` with no dependencies. - ([`a9d9fa5`](https://github.com/npm/npm/commit/a9d9fa5ad3b8c925a589422b7be28d2735f320b0), - [@kislyuk](https://github.com/kislyuk)) -* Fix error when using `npm view` on packages that have no versions or have - been unpublished. - ([`94df2f5`](https://github.com/npm/npm/commit/94df2f56d684b35d1df043660180fc321b743dc8), - [@juliangruber](https://github.com/juliangruber); - [`2241a09`](https://github.com/npm/npm/commit/2241a09c843669c70633c399ce698cec3add40b3), - [@isaacs](https://github.com/isaacs)) - -### v1.4.6 (2014-03-19): - -* Fix extraneous package detection to work in more cases. - ([`f671286`](https://github.com/npm/npm/commit/f671286), npm/read-installed#20, - [@LaurentVB](https://github.com/LaurentVB)) - -### v1.4.5 (2014-03-18): - -* Sort dependencies in `package.json` when doing `npm install --save` and all - its variants. - ([`6fd6ff7`](https://github.com/npm/npm/commit/6fd6ff7e536ea6acd33037b1878d4eca1f931985), - [@domenic](https://github.com/domenic)) -* Add `--save-exact` option, usable alongside `--save` and its variants, which - will write the exact version number into `package.json` instead of the - appropriate semver-compatibility range. - ([`17f07df`](https://github.com/npm/npm/commit/17f07df8ad8e594304c2445bf7489cb53346f2c5), - [@timoxley](https://github.com/timoxley)) -* Accept gzipped content from the registry to speed up downloads and save - bandwidth. - ([`a3762de`](https://github.com/npm/npm/commit/a3762de843b842be8fa0ab57cdcd6b164f145942), - npm/npm-registry-client#40, [@fengmk2](https://github.com/fengmk2)) -* Fix `npm ls`'s `--depth` and `--log` options. - ([`1d29b17`](https://github.com/npm/npm/commit/1d29b17f5193d52a5c4faa412a95313dcf41ed91), - npm/read-installed#13, [@zertosh](https://github.com/zertosh)) -* Fix "Adding a cache directory to the cache will make the world implode" in - certain cases. - ([`9a4b2c4`](https://github.com/npm/npm/commit/9a4b2c4667c2b1e0054e3d5611ab86acb1760834), - domenic/path-is-inside#1, [@pmarques](https://github.com/pmarques)) -* Fix readmes not being uploaded in certain rare cases. - ([`527b72c`](https://github.com/npm/npm/commit/527b72cca6c55762b51e592c48a9f28cc7e2ff8b), - [@isaacs](https://github.com/isaacs)) - -### v1.4.4 (2014-02-20): - -* Add `npm t` as an alias for `npm test` (which is itself an alias for `npm run - test`, or even `npm run-script test`). We like making running your tests - easy. ([`14e650b`](https://github.com/npm/npm/commit/14e650bce0bfebba10094c961ac104a61417a5de), [@isaacs](https://github.com/isaacs)) - -### v1.4.3 (2014-02-16): - -* Add back `npm prune --production`, which was removed in 1.3.24. - ([`acc4d02`](https://github.com/npm/npm/commit/acc4d023c57d07704b20a0955e4bf10ee91bdc83), - [@davglass](https://github.com/davglass)) -* Default `npm install --save` and its counterparts to use the `^` version - specifier, instead of `~`. - ([`0a3151c`](https://github.com/npm/npm/commit/0a3151c9cbeb50c1c65895685c2eabdc7e2608dc), - [@mikolalysenko](https://github.com/mikolalysenko)) -* Make `npm shrinkwrap` output dependencies in a sorted order, so that diffs - between shrinkwrap files should be saner now. - ([`059b2bf`](https://github.com/npm/npm/commit/059b2bfd06ae775205a37257dca80142596a0113), - [@Raynos](https://github.com/Raynos)) -* Fix `npm dedupe` not correctly respecting dependency constraints. - ([`86028e9`](https://github.com/npm/npm/commit/86028e9fd8524d5e520ce01ba2ebab5a030103fc), - [@rafeca](https://github.com/rafeca)) -* Fix `npm ls` giving spurious warnings when you used `"latest"` as a version - specifier. - (https://github.com/npm/read-installed/commit/d2956400e0386931c926e0f30c334840e0938f14, - [@bajtos](https://github.com/bajtos)) -* Fixed a bug where using `npm link` on packages without a `name` value could - cause npm to delete itself. - ([`401a642`](https://github.com/npm/npm/commit/401a64286aa6665a94d1d2f13604f7014c5fce87), - [@isaacs](https://github.com/isaacs)) -* Fixed `npm install ./pkg@1.2.3` to actually install the directory at - `pkg@1.2.3`; before it would try to find version `1.2.3` of the package - `./pkg` in the npm registry. - ([`46d8768`](https://github.com/npm/npm/commit/46d876821d1dd94c050d5ebc86444bed12c56739), - [@rlidwka](https://github.com/rlidwka); see also - [`f851b79`](https://github.com/npm/npm/commit/f851b79a71d9a5f5125aa85877c94faaf91bea5f)) -* Fix `npm outdated` to respect the `color` configuration option. - ([`d4f6f3f`](https://github.com/npm/npm/commit/d4f6f3ff83bd14fb60d3ac6392cb8eb6b1c55ce1), - [@timoxley](https://github.com/timoxley)) -* Fix `npm outdated --parseable`. - ([`9575a23`](https://github.com/npm/npm/commit/9575a23f955ce3e75b509c89504ef0bd707c8cf6), - [@yhpark](https://github.com/yhpark)) -* Fix a lockfile-related errors when using certain Git URLs. - ([`164b97e`](https://github.com/npm/npm/commit/164b97e6089f64e686db7a9a24016f245effc37f), - [@nigelzor](https://github.com/nigelzor)) - -### v1.4.2 (2014-02-13): - -* Fixed an issue related to mid-publish GET requests made against the registry. - (https://github.com/npm/npm-registry-client/commit/acbec48372bc1816c67c9e7cbf814cf50437ff93, - [@isaacs](https://github.com/isaacs)) - -### v1.4.1 (2014-02-13): - -* Fix `npm shrinkwrap` forgetting to shrinkwrap dependencies that were also - development dependencies. - ([`9c575c5`](https://github.com/npm/npm/commit/9c575c56efa9b0c8b0d4a17cb9c1de3833004bcd), - [@diwu1989](https://github.com/diwu1989)) -* Fixed publishing of pre-existing packages with uppercase characters in their - name. - (https://github.com/npm/npm-registry-client/commit/9345d3b6c3d8510dd5c4418f27ee1fce59acebad, - [@isaacs](https://github.com/isaacs)) - -### v1.4.0 (2014-02-12): - -* Remove `npm publish --force`. See - https://github.com/npm/npmjs.org/issues/148. - ([@isaacs](https://github.com/isaacs), - npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) -* Other changes to the registry client related to saved configs and couch - logins. ([@isaacs](https://github.com/isaacs); - npm/npm-registry-client@25e2b019a1588155e5f87d035c27e79963b75951, - npm/npm-registry-client@9e41e9101b68036e0f078398785f618575f3cdde, - npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) -* Show an error to the user when doing `npm update` and the `package.json` - specifies a version that does not exist. - ([@evanlucas](https://github.com/evanlucas), - [`027a33a`](https://github.com/npm/npm/commit/027a33a5c594124cc1d82ddec5aee2c18bc8dc32)) -* Fix some issues with cache ownership in certain installation configurations. - ([@outcoldman](https://github.com/outcoldman), - [`a132690`](https://github.com/npm/npm/commit/a132690a2876cda5dcd1e4ca751f21dfcb11cb9e)) -* Fix issues where GitHub shorthand dependencies `user/repo` were not always - treated the same as full Git URLs. - ([@robertkowalski](https://github.com/robertkowalski), - https://github.com/meryn/normalize-package-data/commit/005d0b637aec1895117fcb4e3b49185eebf9e240) - -### v1.3.26 (2014-02-02): - -* Fixes and updates to publishing code - ([`735427a`](https://github.com/npm/npm/commit/735427a69ba4fe92aafa2d88f202aaa42920a9e2) - and - [`c0ac832`](https://github.com/npm/npm/commit/c0ac83224d49aa62e55577f8f27d53bbfd640dc5), - [@isaacs](https://github.com/isaacs)) -* Fix `npm bugs` with no arguments. - ([`b99d465`](https://github.com/npm/npm/commit/b99d465221ac03bca30976cbf4d62ca80ab34091), - [@Hoops](https://github.com/Hoops)) - -### v1.3.25 (2014-01-25): - -* Remove gubblebum blocky font from documentation headers. - ([`6940c9a`](https://github.com/npm/npm/commit/6940c9a100160056dc6be8f54a7ad7fa8ceda7e2), - [@isaacs](https://github.com/isaacs)) - -### v1.3.24 (2014-01-19): - -* Make the search output prettier, with nice truncated columns, and a `--long` - option to create wrapping columns. - ([`20439b2`](https://github.com/npm/npm/commit/20439b2) and - [`3a6942d`](https://github.com/npm/npm/commit/3a6942d), - [@timoxley](https://github.com/timoxley)) -* Support multiple packagenames in `npm docs`. - ([`823010b`](https://github.com/npm/npm/commit/823010b), - [@timoxley](https://github.com/timoxley)) -* Fix the `npm adduser` bug regarding "Error: default value must be string or - number" again. ([`b9b4248`](https://github.com/npm/npm/commit/b9b4248), - [@isaacs](https://github.com/isaacs)) -* Fix `scripts` entries containing whitespaces on Windows. - ([`80282ed`](https://github.com/npm/npm/commit/80282ed), - [@robertkowalski](https://github.com/robertkowalski)) -* Fix `npm update` for Git URLs that have credentials in them - ([`93fc364`](https://github.com/npm/npm/commit/93fc364), - [@danielsantiago](https://github.com/danielsantiago)) -* Fix `npm install` overwriting `npm link`-ed dependencies when they are tagged - Git dependencies. ([`af9bbd9`](https://github.com/npm/npm/commit/af9bbd9), - [@evanlucas](https://github.com/evanlucas)) -* Remove `npm prune --production` since it buggily removed some dependencies - that were necessary for production; see - [#4509](https://github.com/npm/npm/issues/4509). Hopefully it can make its - triumphant return, one day. - ([`1101b6a`](https://github.com/npm/npm/commit/1101b6a), - [@isaacs](https://github.com/isaacs)) - -Dependency updates: -* [`909cccf`](https://github.com/npm/npm/commit/909cccf) `read-package-json@1.1.6` -* [`a3891b6`](https://github.com/npm/npm/commit/a3891b6) `rimraf@2.2.6` -* [`ac6efbc`](https://github.com/npm/npm/commit/ac6efbc) `sha@1.2.3` -* [`dd30038`](https://github.com/npm/npm/commit/dd30038) `node-gyp@0.12.2` -* [`c8c3ebe`](https://github.com/npm/npm/commit/c8c3ebe) `npm-registry-client@0.3.3` -* [`4315286`](https://github.com/npm/npm/commit/4315286) `npmconf@0.1.12` - -### v1.3.23 (2014-01-03): - -* Properly handle installations that contained a certain class of circular - dependencies. - ([`5dc93e8`](https://github.com/npm/npm/commit/5dc93e8c82604c45b6067b1acf1c768e0bfce754), - [@substack](https://github.com/substack)) - -### v1.3.22 (2013-12-25): - -* Fix a critical bug in `npm adduser` that would manifest in the error message - "Error: default value must be string or number." - ([`fba4bd2`](https://github.com/npm/npm/commit/fba4bd24bc2ab00ccfeda2043aa53af7d75ef7ce), - [@isaacs](https://github.com/isaacs)) -* Allow `npm bugs` in the current directory to open the current package's bugs - URL. - ([`d04cf64`](https://github.com/npm/npm/commit/d04cf6483932c693452f3f778c2fa90f6153a4af), - [@evanlucas](https://github.com/evanlucas)) -* Several fixes to various error messages to include more useful or updated - information. - ([`1e6f2a7`](https://github.com/npm/npm/commit/1e6f2a72ca058335f9f5e7ca22d01e1a8bb0f9f7), - [`ff46366`](https://github.com/npm/npm/commit/ff46366bd40ff0ef33c7bac8400bc912c56201d1), - [`8b4bb48`](https://github.com/npm/npm/commit/8b4bb4815d80a3612186dc5549d698e7b988eb03); - [@rlidwka](https://github.com/rlidwka), - [@evanlucas](https://github.com/evanlucas)) - -### v1.3.21 (2013-12-17): - -* Fix a critical bug that prevented publishing due to incorrect hash - calculation. - ([`4ca4a2c`](https://github.com/npm/npm-registry-client/commit/4ca4a2c6333144299428be6b572e2691aa59852e), - [@dominictarr](https://github.com/dominictarr)) - -### v1.3.20 (2013-12-17): - -* Fixes a critical bug in v1.3.19. Thankfully, due to that bug, no one could - install npm v1.3.19 :) - -### v1.3.19 (2013-12-16): - -* Adds atomic PUTs for publishing packages, which should result in far fewer - requests and less room for replication errors on the server-side. - -### v1.3.18 (2013-12-16): - -* Added an `--ignore-scripts` option, which will prevent `package.json` scripts - from being run. Most notably, this will work on `npm install`, so e.g. `npm - install --ignore-scripts` will not run preinstall and prepublish scripts. - ([`d7e67bf`](https://github.com/npm/npm/commit/d7e67bf0d94b085652ec1c87d595afa6f650a8f6), - [@sqs](https://github.com/sqs)) -* Fixed a bug introduced in 1.3.16 that would manifest with certain cache - configurations, by causing spurious errors saying "Adding a cache directory - to the cache will make the world implode." - ([`966373f`](https://github.com/npm/npm/commit/966373fad8d741637f9744882bde9f6e94000865), - [@domenic](https://github.com/domenic)) -* Re-fixed the multiple download of URL dependencies, whose fix was reverted in - 1.3.17. - ([`a362c3f`](https://github.com/npm/npm/commit/a362c3f1919987419ed8a37c8defa19d2e6697b0), - [@spmason](https://github.com/spmason)) - -### v1.3.17 (2013-12-11): - -* This release reverts - [`644c2ff`](https://github.com/npm/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), - which avoided re-downloading URL and shinkwrap dependencies when doing `npm - install`. You can see the in-depth reasoning in - [`d8c907e`](https://github.com/npm/npm/commit/d8c907edc2019b75cff0f53467e34e0ffd7e5fba); - the problem was, that the patch changed the behavior of `npm install -f` to - reinstall all dependencies. -* A new version of the no-re-downloading fix has been submitted as - [#4303](https://github.com/npm/npm/issues/4303) and will hopefully be - included in the next release. - -### v1.3.16 (2013-12-11): - -* Git URL dependencies are now updated on `npm install`, fixing a two-year old - bug - ([`5829ecf`](https://github.com/npm/npm/commit/5829ecf032b392d2133bd351f53d3c644961396b), - [@robertkowalski](https://github.com/robertkowalski)). Additional progress on - reducing the resulting Git-related I/O is tracked as - [#4191](https://github.com/npm/npm/issues/4191), but for now, this will be a - big improvement. -* Added a `--json` mode to `npm outdated` to give a parseable output. - ([`0b6c9b7`](https://github.com/npm/npm/commit/0b6c9b7c8c5579f4d7d37a0c24d9b7a12ccbe5fe), - [@yyx990803](https://github.com/yyx990803)) -* Made `npm outdated` much prettier and more useful. It now outputs a - color-coded and easy-to-read table. - ([`fd3017f`](https://github.com/npm/npm/commit/fd3017fc3e9d42acf6394a5285122edb4dc16106), - [@quimcalpe](https://github.com/quimcalpe)) -* Added the `--depth` option to `npm outdated`, so that e.g. you can do `npm - outdated --depth=0` to show only top-level outdated dependencies. - ([`1d184ef`](https://github.com/npm/npm/commit/1d184ef3f4b4bc309d38e9128732e3e6fb46d49c), - [@yyx990803](https://github.com/yyx990803)) -* Added a `--no-git-tag-version` option to `npm version`, for doing the usual - job of `npm version` minus the Git tagging. This could be useful if you need - to increase the version in other related files before actually adding the - tag. - ([`59ca984`](https://github.com/npm/npm/commit/59ca9841ba4f4b2f11b8e72533f385c77ae9f8bd), - [@evanlucas](https://github.com/evanlucas)) -* Made `npm repo` and `npm docs` work without any arguments, adding them to the - list of npm commands that work on the package in the current directory when - invoked without arguments. - ([`bf9048e`](https://github.com/npm/npm/commit/bf9048e2fa16d43fbc4b328d162b0a194ca484e8), - [@robertkowalski](https://github.com/robertkowalski); - [`07600d0`](https://github.com/npm/npm/commit/07600d006c652507cb04ac0dae9780e35073dd67), - [@wilmoore](https://github.com/wilmoore)). There are a few other commands we - still want to implement this for; see - [#4204](https://github.com/npm/npm/issues/4204). -* Pass through the `GIT_SSL_NO_VERIFY` environment variable to Git, if it is - set; we currently do this with a few other environment variables, but we - missed that one. - ([`c625de9`](https://github.com/npm/npm/commit/c625de91770df24c189c77d2e4bc821f2265efa8), - [@arikon](https://github.com/arikon)) -* Fixed `npm dedupe` on Windows due to incorrect path separators being used - ([`7677de4`](https://github.com/npm/npm/commit/7677de4583100bc39407093ecc6bc13715bf8161), - [@mcolyer](https://github.com/mcolyer)). -* Fixed the `npm help` command when multiple words were searched for; it - previously gave a `ReferenceError`. - ([`6a28dd1`](https://github.com/npm/npm/commit/6a28dd147c6957a93db12b1081c6e0da44fe5e3c), - [@dereckson](https://github.com/dereckson)) -* Stopped re-downloading URL and shrinkwrap dependencies, as demonstrated in - [#3463](https://github.com/npm/npm/issues/3463) - ([`644c2ff`](https://github.com/isaacs/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), - [@spmason](https://github.com/spmason)). You can use the `--force` option to - force re-download and installation of all dependencies. diff --git a/deps/npm/changelogs/CHANGELOG-2.md b/deps/npm/changelogs/CHANGELOG-2.md deleted file mode 100644 index c4d2b777ebf120..00000000000000 --- a/deps/npm/changelogs/CHANGELOG-2.md +++ /dev/null @@ -1,5344 +0,0 @@ -### v2.15.12 (2017-03-24): - -This version brings the latest `node-gyp` to a soon to be released Node.js -4.x. The `node-gyp` update is particularly important to Windows folks due to -its addition of Visual Studio 2017 support. - -* [`cdd60e733`](https://github.com/npm/npm/commit/cdd60e733905a9994e1d6d832996bfdd12abeaee) - `node-gyp@3.6.0`: - Improvements to how Python is located. New `--devdir` flag. - Support for VS2017. - Chakracore support on ARM. - Remove path-array dependency, reducing size significantly. - ([@bnoordhuis](https://github.com/bnoordhuis)) - ([@mhart](https://github.com/mhart)) - ([@refack](https://github.com/refack)) - ([@kunalspathak](https://github.com/kunalspathak)) - -### v2.15.11 (2016-09-08): - -On we go with our monthly release cadence! This week is pretty much all -dependency updates and some documentation changes, as can be expected by now. - -Note that `npm@4` will almost certainly be released next month! It's not final -what we'll end up doing as far as LTS support goes, but the current thinking is -that, considering how small and resource-constrained our team is, support for -`npm@2` will be reduced to essentially maintenance, so we can better focus on -`npm@3` as the new LTS version (which will go into `node@6`), and `npm@4` as our -next main development version. - -#### DOCUMENTATION UPDATES - -* [`8f71038`](https://github.com/npm/npm/commit/8f71038310501ad5bc7445b2fa2ff0eaa377919a) - [#13892](https://github.com/npm/npm/pull/13892) - Update `LICENSE` file to match license on `master`. - ([@rvagg](https://github.com/rvagg)) -* [`e81b4f1`](https://github.com/npm/npm/commit/e81b4f1d18a4d79b7af8342747f2ed7dc3e84f0a) - [#12438](https://github.com/npm/npm/issues/12438) - Remind folks to use `#!/usr/bin/env node` in their `bin` scripts to make files - executable directly. - ([@mxstbr](https://github.com/mxstbr)) -* [`f89789f`](https://github.com/npm/npm/commit/f89789f43d65bfc74f64f15a99356841377e1af3) - [#13655](https://github.com/npm/npm/pull/13655) - Document line comment syntax for `.npmrc`. - ([@mdjasper](https://github.com/mdjasper)) -* [`5cd3abc`](https://github.com/npm/npm/commit/5cd3abc3511515e09b4a1b781c0520e84c267c5b) - [#13493](https://github.com/npm/npm/pull/13493) - Document that the user config file can itself be configured either through the - `$NPM_CONFIG_USERCONFIG` environment variable, or `--userconfig` command line - flag. - ([@jasonkarns](https://github.com/jasonkarns)) -* [`dd71ca0`](https://github.com/npm/npm/commit/dd71ca0efc2094b824ccc9e23af0fc915499f2e6) - [#13911](https://github.com/npm/npm/pull/13911) - Minor documentation reword and cleanup. - ([@othiym23](https://github.com/othiym23)) -* [`f7a320c`](https://github.com/npm/npm/commit/f7a320c816947d578a050c97e0fb9878954be0e8) - [#13682](https://github.com/npm/npm/pull/13682) - Minor grammar fix in documentation for `npm scripts`. - ([@Ajedi32](https://github.com/Ajedi32)) -* [`e5cb5e8`](https://github.com/npm/npm/commit/e5cb5e8fcf4642836fedf3f3421c994a8e27e19b) - [#13717](https://github.com/npm/npm/pull/13717) - Document that `npm link` will link the files specified in the `bin` field of - `package.json` to `{prefix}/bin/{name}`. - ([@legodude17](https://github.com/legodude17)) - -#### DEPENDENCY UPDATES -* [`8bef026`](https://github.com/npm/npm/commit/8bef026603b6da888edf0d41308d9e532abfcd54) - `graceful-fs@4.1.6` - ([@francescoinfante](https://github.com/francescoinfante)) -* [`9f73f4a`](https://github.com/npm/npm/commit/9f73f4aab5f56b256c5cf9e461e81abfa2844945) - `glob@7.0.6` - ([@isaacs](https://github.com/isaacs)) -* [`5391b7e`](https://github.com/npm/npm/commit/5391b7e8cd4401fbadbf54e810fdc965a3662a21) - `which@1.2.1` - ([@isaacs](https://github.com/isaacs)) -* [`43bfec8`](https://github.com/npm/npm/commit/43bfec8376dd8ded7d56a8dabd6139919544760e) - `retry@0.10.0` - ([@tim-kos](https://github.com/tim-kos)) -* [`39305f1`](https://github.com/npm/npm/commit/39305f1c76f74bf9789c769ef72a94ea9a81d119) - `readable-stream@2.1.5` - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`a5512fa`](https://github.com/npm/npm/commit/a5512fafd72e23755e77e28f1122b008bc12a733) - `once@1.4.0` - ([@zkochan](https://github.com/zkochan)) -* [`06a208b`](https://github.com/npm/npm/commit/06a208b178c1de3d0da58bc35a854d200fea8ef0) - `npm-registry-client@7.2.1`: - * [npm/npm-registry-client#142](https://github.com/npm/npm-registry-client/pull/142) Fix `EventEmitter` warning spam from error handlers on socket. ([@addaleax](https://github.com/addaleax)) - * [npm/npm-registry-client#131](https://github.com/npm/npm-registry-client/pull/131) Adds support for streaming request bodies. ([@aredridel](https://github.com/aredridel)) - * Fixes [#13656](https://github.com/npm/npm/issues/13656). - * Dependency updates. - * Documentation improvements. - ([@othiym23](https://github.com/othiym23)) -* [`4f759be`](https://github.com/npm/npm/commit/4f759be1fb5e23180b970350e58f40a513daa680) - `inherits@2.0.3` - ([@isaacs](https://github.com/isaacs)) -* [`4258b76`](https://github.com/npm/npm/commit/4258b764e2565f6294ae1e34a5653895290b62e3) - `tap@7.1.1` - ([@isaacs](https://github.com/isaacs)) - -### v2.15.10 (2016-08-11): - -Hi all, today's our first release coming out of the new monthly release -cadence. See below for details. We're all recovered from conferences now and -raring to go! For LTS we see some bug fixes, documentation improvements and -a host of dependency updates. - -The most dramatic bug fix is probably the inclusion of scoped modules in -bundled dependencies. Prior to this release and -[v3.10.7](https://github.com/npm/npm/releases/v3.10.7), npm had ignored -scoped modules found in `bundleDependencies` entirely. - -#### NEW RELEASE CADENCE - -Releasing npm has been, for the most part, a very prominent part of our -weekly process process. As part of our efforts to find the most effective -ways to allocate our team's resources, we decided last month that we would -try and slow our releases down to a monthly cadence, and see if we found -ourselves with as much extra time and attention as we expected to have. -Process experiments are useful for finding more effective ways to do our -work, and we're at least going to keep doing this for a whole quarter, and -then measure how well it worked out. It's entirely likely that we'll switch -back to a more frequent cadence, specially if we find that the value that -weekly cadence was providing the community is not worth sacrificing for a -bit of extra time. Does this affect you significantly? Let us know! - -#### WINDOWS CORNER CASES - -* [`405c404`](https://github.com/npm/npm/commit/405c4048c69c14d66e6179aba0c8a35e504e8041) - [#13023](https://github.com/npm/npm/pull/13023) - Fixed a Windows issue with the cache where callbacks could be called more than once. - ([@zkat](https://github.com/zkat)) - -* [`bf348dc`](https://github.com/npm/npm/commit/bf348dcfb944dc4b9f71b779bf172f86a2e1f474) - [#13023](https://github.com/npm/npm/pull/13023) - Fixed a Windows corner case with correct-mkdir where if SUDO_UID or - SUDO_GID were set then we would try to chown things even though that can't - work on Windows. - ([@zkat](https://github.com/zkat)) - -#### RACES IN THE CACHE - -* [`68f29f1`](https://github.com/npm/npm/commit/68f29f18f65c7a7e1c58eb6933af41d786971379) - [#12669](https://github.com/npm/npm/issues/12669) - Ignore ENOENT errors on chownr while adding packages to cache. This change - works around problems with race conditions and local packages. - ([@julianduque](https://github.com/julianduque)) - -#### BETTER GIT ENVIRONMENT WHITELISTING - -* [`5e96566`](https://github.com/npm/npm/commit/5e96566088f0d88c1ed10c5a9cbb7c0cd4aa2aee) - [#13358](https://github.com/npm/npm/pull/13358) - Add GIT_EXEC_PATH to Git environment whitelist. - ([@mhart](https://github.com/mhart)) - -#### DOCUMENTATION - -* [`363e381`](https://github.com/npm/npm/commit/363e381a4076ead89707a00cc4a447b1d59df3bc) - [#13319](https://github.com/npm/npm/pull/13319) - As Node.js 0.8 is no longer supported, remove mention of it from the README. - ([@watilde](https://github.com/watilde)) -* [`e8fafa8`](https://github.com/npm/npm/commit/e8fafa887c60eb8842c76c4b3dffe85eb49fa434) - [#10167](https://github.com/npm/npm/pull/10167) - Clarify in scope documentation that npm@2 is required for scoped packages. - ([@danpaz](https://github.com/danpaz)) - -#### DEPENDENCIES - -* [`66ef279`](https://github.com/npm/npm/commit/66ef279b7c3b3e4f9454474dddd057cc1f21873b) - [npm/fstream-npm#22](https://github.com/npm/fstream-npm/pull/22) - `fstream@1.1.1`: - Always include NOTICE files now. Fix inclusion of scoped modules as bundled dependencies. - ([@kemitchell](https://github.com/kemitchell)) - ([@forivall](https://github.com/forivall)) -* [`fe8385b`](https://github.com/npm/npm/commit/fe8385bd655502feb175eed175a6a06cafb2247a) - `glob@7.0.5`: - Update minimatch dep for security fix. See the minimatch update below for details. - ([@isaacs](https://github.com/isaacs)) -* [`51d49d2`](https://github.com/npm/npm/commit/51d49d2f79b4c69264de73a492ed54f87188d554) - [isaacs/node-graceful-fs#71](https://github.com/isaacs/node-graceful-fs/pull/71) - `graceful-fs@4.1.5`: - `graceful-fs` had a [bug fix](https://github.com/isaacs/node-graceful-fs/pull/71) which - fixes a problem ([nodejs/node#7846](https://github.com/nodejs/node/pull/7846)) exposed - by recent changes to Node.js. - ([@thefourtheye](https://github.com/thefourtheye)) -* [`5c8f39d`](https://github.com/npm/npm/commit/5c8f39d152c43e96b9006ffe865646a36a433a8a) - `minimatch@3.0.3`: - Handle extremely long and terrible patterns more gracefully. - There were some magic numbers that assumed that every extglob pattern starts - and ends with a specific number of characters in the regular expression. - Since !(||) patterns are a little bit more complicated, this led to creating - an invalid regular expression and throwing. - ([@isaacs](https://github.com/isaacs)) -* [`d681e16`](https://github.com/npm/npm/commit/d681e16a475a49d6196af9a5cedaaf88712f3a9f) - [npm/npm-user-validate#9](https://github.com/npm/npm-user-validate/pull/9) - `npm-user-validate@0.1.5`: - Use correct, lower username length limit. - ([@aredridel](https://github.com/aredridel)) -* [`f918994`](https://github.com/npm/npm/commit/f918994bd05ca965766cd573606ac35fb3032d6e) - `request@2.74.0`: - Update `request` dependency `tough-cookie` to `2.3.0` to - to address [https://nodesecurity.io/advisories/130](https://nodesecurity.io/advisories/130). - Versions 0.9.7 through 2.2.2 contain a vulnerable regular expression that, - under certain conditions involving long strings of semicolons in the - "Set-Cookie" header, causes the event loop to block for excessive amounts of - time. - ([@stash-sfdc](https://github.com/stash-sfdc)) -* [`5540cc4`](https://github.com/npm/npm/commit/5540cc4d6bde65071fb6fc2cb074e8598bd1276f) - [isaacs/rimraf#111](https://github.com/isaacs/rimraf/issues/111) - `rimraf@2.5.4`: Clarify assertions: cb is required, options are not. - ([@isaacs](https://github.com/isaacs)) -* [`6357928`](https://github.com/npm/npm/commit/6357928673be85f520dae2104fea58c35742bd65) - `spdx-license-ids@1.2.2`: - New licenses synced from spdx.org. - ([@shinnn](https://github.com/shinnn)) - -### v2.15.9 (2016-06-30): - -What's this? An LTS release? Yes, that is indeed so. Small, as usual, and as -LTSs should be, really, but a release nonetheless! - -The star of the show is an updated `node-gyp` with some goodies. The rest is -just docs and some CI stuff. - -Happy hacking! - -#### DEPENDENCY UPDATE! - -* [`f9a07cc`](https://github.com/npm/npm/commit/f9a07cc873f1915827d8df97d0c43204d1eb128c) - [#13200](https://github.com/npm/npm/pull/13200) - [`node-gyp@3.4.0`](https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md): - AIX, Visual Studio 2015, and logging improvements. Oh my~! - ([@rvagg](https://github.com/rvagg)) - -#### CI TWEAKS - -* [`bee83b8`](https://github.com/npm/npm/commit/bee83b8500c31aba65451dfcb082f9b5d1d5ce34) - Globally install `rimraf` on CI to make the LTS self-install work better. - ([@othiym23](https://github.com/othiym23)) -* [`6b8c0ab`](https://github.com/npm/npm/commit/6b8c0ab6fcbf8a37e8693acb8bbac22293b10893) - This new Travis configuration only runs coverage checks against Node.js LTS, - which speeds up all the other test runs. By, like, a lot. Also, the entire - file has been extensively commented, so the next time we need to mess with it, - we'll be able to better remember why all the weird bits are there. - ([@othiym23](https://github.com/othiym23)) - -#### DOCUMENTATION FIXES - -* [`2c7a5be`](https://github.com/npm/npm/commit/2c7a5be080276e3fdca3375ab0f8f5edffff753e) - [#13156](https://github.com/npm/npm/pull/13156) - Fix old reference to `doc/install` in a source comment. - ([@sheerun](https://github.com/sheerun)) -* [`e1cf78c`](https://github.com/npm/npm/commit/e1cf78c5b77f95383bd4a7fc6eeb8adbbe68e12e) - [#13189](https://github.com/npm/npm/pull/13189) - [#13113](https://github.com/npm/npm/issues/13113) - [#13189](https://github.com/npm/npm/pull/13189) - Fixes a link to `npm-tag(3)` that was breaking to instead point to - `npm-dist-tag(1)`, as reported by [@SimenB](https://github.com/SimenB) - ([@macdonst](https://github.com/macdonst)) - -### v2.15.8 (2016-06-17): - -There's a very important bug fix and a long-awaited (and significant!) -deprecation in this hotfix release. [Hold on.](http://butt.holdings/) - -#### *WHOA* - -When Node.js 6.0.0 was released, the CLI team noticed an alarming upsurge in -bugs related to important files (like `README.md`) not being included in -published packages. The new bugs looked much like -[#5082](https://github.com/npm/npm/issues/5082), which had been around in one -form or another since April, 2014. #5082 used to be a very rare (and obnoxious) -bug that the CLI team hadn't had much luck reproducing, and we'd basically -marked it down as a race condition that arose on machines using slow and / or -rotating-media-based hard drives. - -Under 6.0.0, the behavior was reliable enough to be nearly deterministic, and -made it very difficult for publishers using `.npmignore` files in combination -with `"files"` stanzas in `package.json` to get their packages onto the -registry without one or more files missing from the packed tarball. The entire -saga is contained within [the issue](https://github.com/npm/npm/issues/5082), -but the summary is that an improvement to the performance of -[`fs.realpath()`](https://nodejs.org/api/fs.html#fs_fs_realpath_path_options_callback) -made it much more likely that the packing code would lose the race. - -Fixing this has proven to be very difficult, in part because the code used by -npm to produce package tarballs is more complicated than, strictly speaking, it -needs to be. [**@evanlucas**](https://github.com/evanlucas) contributed [a -patch](https://github.com/npm/fstream/pull/50) that passed the tests in a -[special test suite](https://github.com/othiym23/eliminate-5082) that I -([**@othiym23**](https://github.com/othiym23)) created (with help from -[**@addaleax**](https://github.com/addaleax)), but only _after_ we'd released -the fixed version of that package did we learn that it actually made the -problem _worse_ in other situations in npm proper. Eventually, -[**@rvagg**](https://github.com/rvagg) put together a more durable fix that -appears to completely address the errant behavior under Node.js 6.0.0. That's -the patch included in this release. Everybody should chip in for redback -insurance for Rod and his family; he's done the community a huge favor. - -Does this mean the long (2+ year) saga of #5082 is now over? At this point, I'm -going to quote from my latest summary on the issue: - -> The CLI team (mostly me, with input from the rest of the team) has decided that -> the overall complexity of the interaction between `fstream`, `fstream-ignore`, -> `fstream-npm`, and `node-tar` has grown more convoluted than the team is -> comfortable (maybe even capable of) supporting. -> -> - While I believe that @rvagg's (very targeted) fix addresses _this_ issue, I -> would be shocked if there aren't other race conditions in npm's packing -> logic. I've already identified a couple other places in the code that are -> most likely race conditions, even if they're harder to trigger than the -> current one. -> - The way that dependency bundling is integrated leads to a situation in -> which a bunch of logic is duplicated between `fstream-npm` and -> `lib/utils/tar.js` in npm itself, and the way `fstream`'s extension -> mechanism works makes this difficult to clean up. This caused a nasty -> regression ([#13088](https://github.com/npm/fstream/pull/50), see below) as -> of ~`npm@3.8.7` where the dependencies of `bundledDependencies` were no -> longer being included in the built package tarballs. -> - The interaction between `.npmignore`, `.gitignore`, and `files` is hopelessly -> complicated, scattered in many places throughout the code. We've been -> discussing [making the ignores and includes logic clearer and more -> predictable](https://github.com/npm/npm/wiki/Files-and-Ignores), and the -> current code fights our efforts to clean that up. -> -> So, our intention is still to replace `fstream`, `fstream-ignore`, and -> `fstream-npm` with something much simpler and purpose-built. There's no real -> reason to have a stream abstraction here when a simple recursive-descent -> filesystem visitor and a synchronous function that can answer whether a given -> path should be included in the packed tarball would do the job adequately. -> -> What's not yet clear is whether we'll need to replace `node-tar` in the -> process. `node-tar` is a very robust implementation of tar (it handles, like, -> everything), and it also includes some very important tweaks to prevent several -> classes of security exploits involving maliciously crafted packages. However, -> its packing API involves passing in an `fstream` instance, so we'd either need -> to produce something that follows enough of `fstream`'s contract for `node-tar` -> to keep working, or swap `node-tar` out for something like `tar-stream` (and -> then ensuring that our use of `tar-stream` is secure, which could involve -> security patches for either npm or `tar-stream`). - -The testing and review of `fstream@1.0.10` that the team has done leads us to -believe that this bug is fixed, but I'm feeling more than a little paranoid -about fstream now, so it's important that people keep a close eye on their -publishes for a while and let us know immediately if they notice any -irregularities. - -* [`2c49265`](https://github.com/npm/npm/commit/2c49265c6746d29ae0cd5f3532d28c5950f9847e) - [#5082](https://github.com/npm/npm/issues/5082) `fstream@1.0.10`: Ensure that - entries are collected after a paused stream resumes. - ([@rvagg](https://github.com/rvagg)) -* [`92e4344`](https://github.com/npm/npm/commit/92e43444d9204f749f83512aeab5d5e0a2d085a7) - [#5082](https://github.com/npm/npm/issues/5082) Remove the warning introduced - in `npm@3.10.0`, because it should no longer be necessary. - ([@othiym23](https://github.com/othiym23)) - -#### GOODBYE, FAITHFUL FRIEND - -At NodeConf Adventure 2016 (RIP in peace, Mikeal Rogers's NodeConf!), the CLI -team had an opportunity to talk to representatives from some of the larger -companies that we knew were still using Node.js 0.8 in production. After asking -them whether they were still using 0.8, we got back blank stares and questions -like, "0.8? You mean, from four years ago?" After establishing that being able -to run npm in their legacy environments was no longer necessary, the CLI team -made the decision to drop support for 0.8. (Faithful observers of our [team -meetings](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+npm+cli+team+meeting+) -will have known this was the plan for NodeConf since the beginning of 2016.) - -In practice, this means only what's in the commit below: we've removed 0.8 from -our continuous integration test matrix below, and will no longer be habitually -testing changes under Node 0.8. We may also give ourselves permission to use -`setImmediate()` in test code. However, since the project still supports -Node.js 0.10 and 0.12, it's unlikely that patches that rely on ES 2015 -functionality will land anytime soon. - -Looking forward, the team's current plan is to drop support for Node.js 0.10 -when its LTS maintenance window expires in October, 2016, and 0.12 when its -maintenance / LTS window ends at the end of 2016. We will also drop support for -Node.js 5.x when Node.js 6 becomes LTS and Node.js 7 is released, also in the -October-December 2016 timeframe. - -(Confused about Node.js's LTS policy? [Don't -be!](https://github.com/nodejs/LTS) If you look at [this -diagram](https://github.com/nodejs/LTS/blob/ce364a94b0e0619eba570cd57be396573e1ef889/schedule.png), -it should make all of the preceding clear.) - -If, in practice, this doesn't work with distribution packagers or other -community stakeholders responsible for packaging and distributing Node.js and -npm, please reach out to us. Aligning the npm CLI's LTS policy with Node's -helps everybody minimize the amount of work they need to do, and since all of -our teams are small and very busy, this is somewhere between a necessity and -non-negotiable. - -* [`4a1ecc0`](https://github.com/npm/npm/commit/4a1ecc068fb2660bd9bc3e2e2372aa0176d2193b) - Remove 0.8 from the Node.js testing matrix, and reorder to match real-world - priority, with comments. ([@othiym23](https://github.com/othiym23)) - -### v2.15.7 (2016-06-16): - -It pains me greatly that we haven't been able to fix -[#5082](https://github.com/npm/npm/issues/5082) yet, but warning you away from -potentially publishing incomplete packages takes priority over feeling cheesy -about landing a warning to help keep y'all out of trouble, so here you go -(_please read this next bit_ (_please clap_)): - -#### DANGER: PUBLISHING ON NODE 6.0.0 - -Publishing and packing are buggy under Node versions greater than 6.0.0. -Please use Node.js LTS (4.4.x) to publish packages. See -[#5082](https://github.com/npm/npm/issues/5082) for details and current -status. - -* [`dff00ce`](https://github.com/npm/npm/commit/dff00cedd56b9c04370f840299a7e657a7a835c6) - [#13077](https://github.com/npm/npm/pull/13077) - Warn when using Node 6+. - ([@othiym23](https://github.com/othiym23)) - -#### PACKAGING CHANGES - -* [`1877171`](https://github.com/npm/npm/commit/1877171648e20595a82de34073b643f7e01a339f) - [#12873](https://github.com/npm/npm/issues/12873) - Ignore `.nyc_output`. This will help avoid an accidental publish or commit filled with - code coverage data. - ([@TheAlphaNerd](https://github.com/TheAlphaNerd)) - -#### DOCUMENTATION CHANGES - -* [`470ae86`](https://github.com/npm/npm/commit/470ae86e052ae2f29ebec15b7547230b6240042e) - [#12983](https://github.com/npm/npm/pull/12983) - Describe how to run the lifecycle scripts of dependencies. How you do - this changed with `npm` v2. - ([@Tapppi](https://github.com/Tapppi)) -* [`9cedf37`](https://github.com/npm/npm/commit/9cedf37e5a3e26d0ffd6351af8cac974e3e011c2) - [#12776](https://github.com/npm/npm/pull/12776) - Remove mention of `` arg for `run-script`. - ([@fibo](https://github.com/fibo)) -* [`55b8424`](https://github.com/npm/npm/commit/55b8424d7229f2021cac55f0b03de72403e7c0ff) - [#12840](https://github.com/npm/npm/pull/12840) - Remove sexualized language from comment. - ([@geek](https://github.com/geek)) -* [`d6bf0c3`](https://github.com/npm/npm/commit/d6bf0c393788a6398bf80b41c57956f2dbcf3b39) - [#12802](https://github.com/npm/npm/pull/12802) - Small grammar fix in `doc/cli/npm.md`. - ([@andresilveira](https://github.com/andresilveira)) - -#### DEPENDENCY UPDATES - -* [`2c2c568`](https://github.com/npm/npm/commit/2c2c56857ff801d5fe1b6d3157870cd16e65891b) - `readable-stream@2.1.4`: Brought up to date with Node 6.1.0's streams implementation. - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`d682e64`](https://github.com/npm/npm/commit/d682e6445845b0a2584935d5e2942409c43f6916) - [npm/npm-user-validate#8](https://github.com/npm/npm-user-validate/pull/8) - `npm-user-validate@0.1.4`: Add a maximum length limit for usernames based on - the (arbitrary) limit imposed by the primary npm registry. - ([@aredridel](https://github.com/aredridel)) -* [`448b65b`](https://github.com/npm/npm/commit/448b65b48cda3b782b714057fb4b8311cc1fa36a) - `which@1.2.10`: Remove unused dependency `is-absolute`, bug fixes. - ([@isaacs](https://github.com/isaacs)) -* [`7d15434`](https://github.com/npm/npm/commit/7d15434f0b0af8e70b119835b21968217224664f) - `require-inject@1.4.0`: Add `requireInject.withEmptyCache` and - `requireInject.installGlobally.andClearCache` to support loading modules to be - injected with an empty cache. - ([@iarna](https://github.com/iarna)) -* [`31845c0`](https://github.com/npm/npm/commit/31845c081bc6f3f8a2f3d83a3c792dccffbaa2a8) - `init-package-json@1.9.4`: - Replace use of reserved identifier `package` in, uh, the package. - ([@adius](https://github.com/adius)) -* [`d73ef3e`](https://github.com/npm/npm/commit/d73ef3e6b18d4905de668c5115bc6042905a02d9) - `glob@7.0.4`: Use userland `fs.realpath` implementation to get glob working under Node 6. - ([@isaacs](https://github.com/isaacs)) -* [`b47da85`](https://github.com/npm/npm/commit/b47da85cf83b946f2c8d29ab612c92028f31f6b0) - `inflight@1.0.5`: Correct link to package repository, add `"files"` stanza. - ([@iarna](https://github.com/iarna), [@jamestalmage](https://github.com/jamestalmage)) -* [`04815e4`](https://github.com/npm/npm/commit/04815e436035de785279fd000cdbc821cc1f3447) - [npm/npmlog#32](https://github.com/npm/npmlog/pull/32) - `npmlog@2.0.4`: Add `"files"` stanza to `package.json`. - ([@jamestalmage](https://github.com/jamestalmage)) -* [`9e29ad2`](https://github.com/npm/npm/commit/9e29ad227300bb970e7bcd21029944d4733e40db) - `wrappy@1.0.2`: Add `"files"` stanza to `package.json`. - ([@jamestalmage](https://github.com/jamestalmage)) -* [`44af4d4`](https://github.com/npm/npm/commit/44af4d475ac65bdce6d088173273ce4a4f74a49e) - `abbrev@1.0.9` ([@jorrit](https://github.com/jorrit)) -* [`6c977c0`](https://github.com/npm/npm/commit/6c977c0031d074479a26c7bec6ec83fd6c6526b2) - `npm-registry-client@7.1.2`: Add support for newer versions of `npmlog`. - ([@iarna](https://github.com/iarna)) - -### v2.15.6 (2016-05-12): - -I have a couple of doc fixes and a shrinkwrap fix for you all this week. - -#### PEER DEPENDENCIES AND SHRINKWRAPS - -* [`55c998a`](https://github.com/npm/npm/commit/55c998a098a306b90a84beef163a8890f9a616b1) - [#5135](https://github.com/npm/npm/issues/5135) - Fix a bug where peerDependencies & shrinkwraps didn't play nice together. (Where - the peerDependency resolver would end up installing its dep when it wasn't needed.) - ([@majgis](https://github.com/majgis)) - -#### NPM AND `node-gyp` DOCS IMPROVEMENTS - -* [`1826908`](https://github.com/npm/npm/commit/1826908b991510d8fbc71a0d0f2c01ff24fd83c2) - [#12636](https://github.com/npm/npm/pull/12636) - Improve `npm-scripts` documentation regarding when `node-gyp` is used. - ([@reconbot](https://github.com/reconbot)) -* [`f9ff7f3`](https://github.com/npm/npm/commit/f9ff7f36cc2c2c3fbb4f6eef91491b589d049d5f) - [#12586](https://github.com/npm/npm/pull/12586) - Correct `package.json` documentation as to when `node-gyp rebuild` called. - This now matches https://docs.npmjs.com/misc/scripts#default-values - ([@reconbot](https://github.com/reconbot)) - -### v2.15.5 (2016-05-05): - -This is a minor LTS release, bringing dependencies up to date and updating -our CI matrix to match what we support. - -Some of the dependency updates come out of our getting the development -branch's tests passing on Windows and so bring in fixes for a few Windows -related corner cases. - -#### CI UPDATES - -* [`bb6f0e5`](https://github.com/npm/npm/commit/bb6f0e5c95d4ad186768b1c962dd4c399f90ddb1) - [#12487](https://github.com/npm/npm/pull/12487) - Remove iojs from CI, add Node.js 6, prioritize 4 over 5. - ([@othiym23](https://github.com/othiym23)) - -#### DEPENDENCY UPDATES - -* [`f2f8753`](https://github.com/npm/npm/commit/f2f8753c4aef2a604a4bdca2677711c940234b8f) - `which@1.2.8`: - Properly handle relative path executables. - ([@isaacs](https://github.com/isaacs)) -* [`e287ca9`](https://github.com/npm/npm/commit/e287ca99c37680d8e4cfacf4cfebe2da98884865) - `read-package-json@2.0.4`: - Fix Windows issue with ENOTDIR detection. - ([@zkat](https://github.com/zkat)) -* [`1a0ce6c`](https://github.com/npm/npm/commit/1a0ce6cff4c347bad035dc89bba2ceed9dacbf73) - `realize-package-specifier@3.0.3`: - Use npa with windows fix. - Fix relative path resolution when the local file might also be a tag. - ([@zkat](https://github.com/zkat)) - ([@iarna](https://github.com/iarna)) -* [`a475c9a`](https://github.com/npm/npm/commit/a475c9a4e4b36d00080b11f379657ce68185adc6) - `lru-cache@4.0.1`: - Use Symbol if available. - ([@isaacs](https://github.com/isaacs)) -* [`7141e08`](https://github.com/npm/npm/commit/7141e08816c620b1889d7537c30dc5b254de4d1f) - `sorted-object@2.0.0` - ([@iamstarkov](https://github.com/iamstarkov)) -* [`27c6190`](https://github.com/npm/npm/commit/27c6190216cc8a5a280f0efbabb3444581968d40) - `request@2.72.0` - ([@simov](https://github.com/simov)) -* [`ab90daf`](https://github.com/npm/npm/commit/ab90daf70ba51b51f722fb4cd74ac5267621c4b4) - `readable-stream@2.1.2` - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`b1715f8`](https://github.com/npm/npm/commit/b1715f805426403273225bcfa91d1a52d7b56eb8) - `graceful-fs@4.1.4` - ([@isaacs](https://github.com/isaacs)) -* [`ca97de6`](https://github.com/npm/npm/commit/ca97de6c18059ef420235f4706898ad8758904e6) - `block-stream@0.0.9` - ([@isaacs](https://github.com/isaacs)) - -### v2.15.4 (2016-04-21): - -Gosh, it's been a peaceful couple of weeks! - -Overall, the CLI team has been focused on the project to [get the test suite -passing on Windows](https://github.com/npm/npm/pull/11444). Our efforts should -be paying off soon -- there's only a couple of tests left! - -It's very unlikely those particular changes will make their way into our current -`npm@2` LTS release, I think, but it will help `npm@3` a lot, as well as -whatever version makes it into [`node@6`, which will eventually be the next -Node.js LTS](https://github.com/nodejs/node/pull/6155). - -As far as this week goes, we've got a couple of dep updates and doc fixes. -Always happy to see community contributions flying in. 💚 - -#### DEP UPDATE MAGIC - -* [`b178c4a`](https://github.com/npm/npm/commit/b178c4ac9ce91c0a0794526a38b553c759132d18) - `spdx-license-ids@1.2.1`: - Minor project-related tweaks -- no license changes. - ([@shinnn](https://github.com/shinnn)) -* [`1adf179`](https://github.com/npm/npm/commit/1adf179948ab8cb97dfb2f46a61e9f37d944c42a) - `normalize-git-url@3.0.2`: - Fixes `file://` URLs on Windows. Turns out stuff like `file://C:\hello` is - actually fairly weird for a URL (it's not actually a valid URL, but we're just - gonna pretend.😉) - ([@zkat](https://github.com/zkat)) -* [`9cfd56c`](https://github.com/npm/npm/commit/9cfd56cdadc040c0b2fa7654cdb5e7d22dbef7cb) - `fs-vacuum@1.2.9`: - This one goes out to our fans at Big Blue: There was an AIX-specific issue - where `fs.rmDir` was failing with `EEXIST` instead of `ENOTEMPTY` with - non-empty directories. - ([@richardlau](https://github.com/richardlau)) - -#### HOORAY DOC CONTRIBUTIONS - -No seriously, we love these. Keep 'em comin'! - -* [`2afe8bf`](https://github.com/npm/npm/commit/2afe8bf415a159baa181a8102f72c96e1d189bc9) - [#12415](https://github.com/npm/npm/pull/12415) - Clarify that the `--cert` and `--key` options are actual certs and keys, not - paths to files containing them. - ([@rvedotrc](https://github.com/rvedotrc)) -* [`3522560`](https://github.com/npm/npm/commit/3522560b0a4bb6c9717a34f9728f156fd9760cad) - [#12107](https://github.com/npm/npm/pull/12107) - Document `npm login` as an alias to `npm adduser`. People are still surprised - by this so often. - ([@gnerkus](https://github.com/gnerkus)) - -### v2.15.3 (2016-03-31): - -Hiiiiiii!~👋 - -We're really happy to be getting more and more community contributions! Keep it -up! We really appreciate folks trying to help us, and we'll do our best to help -point you in the right direction. Even things like documentation are a huge -help. And remember -- you get socks for it, too!🎁 - -This week is as quiet as usual, aside from fixing a regression to `npm -deprecate` you might want to pay attention to! Other than that, just docs and -deps, as any good LTS release train should be. 🙆 - -#### FIXME - -* [`6e0b66e`](https://github.com/npm/npm/commit/6e0b66e282aa27d1b5371e2babaa859924121730) - [#11884](https://github.com/npm/npm/pull/11884) - Include `node_modules` in the list of files and directories that npm won't - include in packages ordinarily. (Modules listed in `bundledDependencies` and - things that those modules rely on, ARE included of course.) - ([@Jameskmonger](https://github.com/Jameskmonger)) -* [`9896290`](https://github.com/npm/npm/commit/98962909b160364030705575202ad133971033c1) - [#12079](https://github.com/npm/npm/pull/12079) - Back in `npm@2.13.1` we included [a patch that made it so `npm install pkg` - was basically `npm install pkg@latest` instead of - `pkg@*`](https://github.com/npm/npm/pull/9170) This is probably what most - users expected, but it also ended up [breaking `npm - deprecate`](https://github.com/npm/npm/pull/9170) when no version was provided - for a package. In that case, we were using `*` to mean "deprecate all - versions" and relying on the `pkg` -> `pkg@*` conversion. This patch fixes - `npm deprecate pkg` to work as it used to by special casing that particular - command's behavior. - ([@polm](https://github.com/polm)) -* [`6c1628f`](https://github.com/npm/npm/commit/6c1628f62b657db6c116be13849d00933a3388cd) - [#12146](https://github.com/npm/npm/pull/12146) - Adds `make doc-clean` to `prepublish` script, to clear out previously built - docs before publishing a new npm version. - ([@watilde](https://github.com/watilde)) -* [`6d3017e`](https://github.com/npm/npm/commit/6d3017e6eed8a771b395d10130ac1f498e2d3211) - [#12146](https://github.com/npm/npm/pull/12146) - Adds `doc-clean` phony target to `make publish`. - ([@watilde](https://github.com/watilde)) - -#### DOCS - -* [`d43921c`](https://github.com/npm/npm/commit/d43921c546617cdb94bbee444d7d67ef55f38dc5) - [#12147](https://github.com/npm/npm/pull/12147) - Document that the current behavior of `engines` is just to warn if the node - platform is incompatible. - ([@reconbot](https://github.com/reconbot)) -* [`3cfe99e`](https://github.com/npm/npm/commit/3cfe99e3a757c5d8cbb1c2789410e9802563abac) - [#12093](https://github.com/npm/npm/pull/12093) - Update `bugs` url in `package.json` to use the `https` URL for Github. - ([@watilde](https://github.com/watilde)) -* [`ecf865f`](https://github.com/npm/npm/commit/ecf865f4eed1419c75442e0d52bc34ba1647de15) - [#12075](https://github.com/npm/npm/pull/12075) - Add the `--ignore-scripts` flag to the `npm install` docs. - ([@paulirish](https://github.com/paulirish)) -* [`f0e6db3`](https://github.com/npm/npm/commit/f0e6db32827d88680ef2320e60c0863754a4fbc5) - [#12063](https://github.com/npm/npm/pull/12063) - Various minor fixes to the html docs homepage. - ([@watilde](https://github.com/watilde)) - -#### DEPS - -* [`e2660de`](https://github.com/npm/npm/commit/e2660de1c08ed68a1c6fc4ee75d10376595979be) - `npmlog@2.0.3` - ([@iarna](https://github.com/iarna)) - -### v2.15.2 (2016-03-24): - -It's always nice to see new contributors. 💚 - -This week sees another small release, but we're still chugging along on our -[Windows efforts](https://github.com/npm/npm/pull/11444). - -There's also some small process changes to our LTS process relatively recently -that you might wanna know about! 💁 - -For one, the `2.x` branch was removed in favor of just `lts`. If you're making -PRs exclusively against npm's LTS, please use that name from now on. `2.x` was -deleted. - -Also, [@othiym23](https://github.com/othiym23) put some time into [writing down -our LTS process and policy](https://github.com/npm/npm/wiki/LTS). Check it out -and ping us if you have questions or comments about it! - -In general, we're trying to make sure all our policy and such for our -contributors is written down, and we hope it makes it easier in general for -y'all. Forrest is also working on a shiny new Contributor's Guide right now, but -we'll link to that in the (near?) future, when it's ready to roll out. - -#### TESTS - -* [`1d0e468`](https://github.com/npm/npm/commit/1d0e468c06c7b8e2b95b7fe874a3399a16d9db74) - [#11931](https://github.com/npm/npm/pull/11931) - Removes a bunch of old, disabled tests that have just been sitting around, - doing nothing. - ([@othiym23](https://github.com/othiym23)) -* [`7ae8aa1`](https://github.com/npm/npm/commit/7ae8aa1d9dc47761024f6756114205db3fb2c80b) - [#11987](https://github.com/npm/npm/pull/11987) - There was a failure in the `outdated-symlink` test caused by using the default - registry instead of the mock registry tests. - ([@yodeyer](https://github.com/yodeyer)) - -#### DOCS - -* [`b2649fb`](https://github.com/npm/npm/commit/b2649fb360f239aadef1ab51a580cbf4fdf29722) - [#12006](https://github.com/npm/npm/pull/12006) - Access was Team and Team was Access, but someone from the community rolled - around and corrected it for us. Thanks a bunch! - ([@yaelz](https://github.com/yaelz)) - -### v2.15.1 (2016-03-17): - -#### SECURITY ADVISORY: BEARER TOKEN DISCLOSURE - -This release includes [the fix for a -vulnerability](https://github.com/npm/npm/commit/fea8cc92cee02c720b58f95f14d315507ccad401) -that could cause the unintentional leakage of bearer tokens. - -Here are details on this vulnerability and how it affects you. - -##### DETAILS - -Since 2014, npm’s registry has used HTTP bearer tokens to authenticate requests -from the npm’s command-line interface. A design flaw meant that the CLI was -sending these bearer tokens with _every_ request made by logged-in users, -regardless of the destination of their request. (The bearers only should have -been included for requests made against a registry or registries used for the -current install.) - -An attacker could exploit this flaw by setting up an HTTP server that could -collect authentication information, then use this authentication information to -impersonate the users whose tokens they collected. This impersonation would -allow them to do anything the compromised users could do, including publishing -new versions of packages. - -With the fixes we’ve released, the CLI will only send bearer tokens with -requests made against a registry. - -##### THINK YOU'RE AT RISK? REGENERATE YOUR TOKENS - -If you believe that your bearer token may have been leaked, [invalidate your -current npm bearer tokens](https://www.npmjs.com/settings/tokens) and rerun -`npm login` to generate new tokens. Keep in mind that this may cause continuous -integration builds in services like Travis to break, in which case you’ll need -to update the tokens in your CI server’s configuration. - -##### WILL THIS BREAK MY CURRENT SETUP? - -Maybe. - -npm’s CLI team believes that the fix won’t break any existing registry setups. -Due to the large number of registry software suites out in the wild, though, -it’s possible our change will be breaking in some cases. - -If so, please [file an issue](https://github.com/npm/npm/issues/new) describing -the software you’re using and how it broke. Our team will work with you to -mitigate the breakage. - -##### CREDIT & THANKS - -Thanks to Mitar, Will White & the team at Mapbox, Max Motovilov, and James -Taylor for reporting this vulnerability to npm. - -### BACK TO YOUR REGULARLY SCHEDULED PROGRAMMING - -Aside from that, it's another one of those releases again! Docs and tests, it -turns out, have a pretty easy time getting into LTS releases, and boring is -exactly how LTS should be. 💁 - -#### DOCS - -* [`981c89c`](https://github.com/npm/npm/commit/981c89c8e398ca22ab6bf466123b25728ef6f543) - [#11820](https://github.com/npm/npm/pull/11820) - The basic explanation for how `npm link` works was a bit confusing, and - somewhat incorrect. It should be clearer now. - ([@rhgb](https://github.com/rhgb)) -* [`35b2b45`](https://github.com/npm/npm/commit/35b2b45f181dcbfb297f53b577dc1f26efcf3aba) - [#11787](https://github.com/npm/npm/pull/11787) - The `verison` alias for `npm version` no longer shows up in the command list - when you do `npm -h`. - ([@doug-wade](https://github.com/doug-wade)) -* [`1c9d00f`](https://github.com/npm/npm/commit/1c9d00f788298a81a8a7293d7dcf430f01bdd7fd) - [#11786](https://github.com/npm/npm/pull/11786) - Add a comment to the `npm-scope.md` docs about `npm@>=2` being required in - order to use scoped packaged. - ([@doug-wade](https://github.com/doug-wade)) -* [`7d64fb1`](https://github.com/npm/npm/commit/7d64fb1452d360aa736f31c85d6776ce570b2365) - [#11762](https://github.com/npm/npm/pull/11762) - Roll back patch that previously advised people to use `--depth Infinity` - instead of `--depth 9999`. Just keep using `--depth 9999`. - ([@GriffinSchneider](https://github.com/GriffinSchneider)) - -#### TESTS - -* [`98a9ee4`](https://github.com/npm/npm/commit/98a9ee4773f83994b8eb63c0ff75a9283408ba1a) - [#11912](https://github.com/npm/npm/pull/11912) - Did you know npm can install itself? `npm install -g npm` is the way to - upgrade! Turns out that one of the tests that verified this functionality got - rewritten as part of our recent push for better tests, and in the process - omitted a detail about *how* the test ran. We're testing that corner case - again, now, by moving the install folder to `/tmp`, where the original legacy - test ran. - ([@iarna](https://github.com/iarna)) - -### v2.15.0 (2016-03-10): - -#### WHY IS THIS SEMVER-MINOR I THOUGHT THIS WAS LTS - -A brief note about LTS this week! - -npm, as you may know if you're using this `2.x` branch, has an LTS process for -releases. We also try and play nice with [Node.js' own LTS release -process](https://github.com/nodejs/LTS#lts-plan). That means we generally try to -avoid things like minor version bumps on our `2.x` branch (which is also tagged -`lts` in the `dist-tag`s). - -That said, we had a minor-bump update recently for `npm@3.8.0` which added a -`maxsockets` option to allow users to configure the number of concurrent sockets -that npm would keep open at a time -- a setting that has the potential to help a -bunch for people with fussy routers or internet connections that aren't very -happy with Node.js applications' usual concurrency storm. This change was done -to `npm-registry-client`, which we don't have a parallel LTS-tracking branch -for. - -After talking it over, we ended up deciding that this was a reasonable enough -addition to LTS, even though it's *technically* a `semver-minor` bump, taking -into account both its potential for bugfixing (specially on `2.x`!) and the -general hassle it would be to maintain another branch for `npm-registry-client`. - - -* [`6dd61e7`](https://github.com/npm/npm/commit/6dd61e781c145480dc255a3e6a748729868443fd) - Expose `maxsockets` config setting from new `npm-registry-client`. - ([@misterbyrne](https://github.com/misterbyrne)) -* [`8a021c3`](https://github.com/npm/npm/commit/8a021c35184e665bd1f3f70ae2f478af812ab614) - `npm-registry-client@7.1.0`: - Adds support for configuring the max number of concurrent sockets, defaulting - to `50`. - ([@iarna](https://github.com/iarna)) - -#### DOC PATCH IS HERE TOO - -* [`0ae9f74`](https://github.com/npm/npm/commit/0ae9f740001a1bdf5920bc464cf9e284d5d139f0) - [#11748](https://github.com/npm/npm/pull/11748) - Add command aliases as a separate section in documentation for npm - subcommands. - ([@watilde](https://github.com/watilde)) - -#### DEP UPDATES - -* [`bfc3888`](https://github.com/npm/npm/commit/bfc38887f832f701c16b7ee410c4e0220a90399f) - `strip-ansi@3.0.1` - ([@jbnicolai](https://github.com/jbnicolai)) -* [`d5f4d51`](https://github.com/npm/npm/commit/d5f4d51a1b7ea78d7431c7ed4fed30200b2622f8) - `node-gyp@3.3.1`: Fixes Android generator - ([@bnoordhuis](https://github.com/bnoordhuis)) -* [`4119df8`](https://github.com/npm/npm/commit/4119df8aecd2ae57b0492ad8c9a480d900833008) - `glob@7.0.3`: Some path-related fixes for Windows. - ([@isaacs](https://github.com/isaacs)) - -### v2.14.22 (2016-03-03): - -This week is all documentation improvements. In case you hadn't noticed, we -*love* doc patches. We love them so much, we give socks away if you submit -documentation PRs! - -These folks are all getting socks if they ask for them. The socks are -super-sweet. Do you have yours yet? 👣 - -* [`3f3c7d0`](https://github.com/npm/npm/commit/3f3c7d080f052a5db91ff6091f8b1b13f26b53d6) - [#11441](https://github.com/npm/npm/pull/11441) - Add a link to the [Contribution - Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines) to the - main npm docs. - ([@watilde](https://github.com/watilde)) -* [`9f87bb1`](https://github.com/npm/npm/commit/9f87bb1934acb33b678c17b7827165b17c071a82) - [#11441](https://github.com/npm/npm/pull/11441) - Remove Google Group email from npm docs about contributing. - ([@watilde](https://github.com/watilde)) -* [`93eaab3`](https://github.com/npm/npm/commit/93eaab3ee5ad16c7d90d1a4b38a95403fcf3f0f6) - [#11474](https://github.com/npm/npm/pull/11474) - Fix an invalid JSON error overlooked in - [#11196](https://github.com/npm/npm/pull/11196). - ([@robludwig](https://github.com/robludwig)) -* [`a407ca2`](https://github.com/npm/npm/commit/a407ca2bcf6a05117e55cf2ab69376e09094995e) - [#11483](https://github.com/npm/npm/pull/11483) - Add more details and an example to the documentation for bundledDependencies. - ([@gnerkus](https://github.com/gnerkus)) -* [`2c851a2`](https://github.com/npm/npm/commit/2c851a231afd874baa77c42ea5ba539c454ac79c) - [#11490](https://github.com/npm/npm/pull/11490) - Document the `--registry` flag for `npm search`. - ([@plumlee](https://github.com/plumlee)) - -### v2.14.21 (2016-02-25): - -Good news, everyone! There's a new LTS release with a few shinies here and there! - -#### USE THIS ONE INSTEAD - -We had some cases where the versions of npm and node used in some scripting situations were different than the ideal, or what folks actually expected. These should be particularly helpful to our Windows friends! <3 - -* [`02813c5`](https://github.com/npm/npm/commit/02813c55782a9def23f7f1e614edc38c6c88aed3) [#9253](https://github.com/npm/npm/issues/9253) Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. ([@segrey](https://github.com/segrey) and [@narqo](https://github.com/narqo)) -* [`a985dd5`](https://github.com/npm/npm/commit/a985dd50e06ee51ba5544577f977c7440c227ba2) [#11526](https://github.com/npm/npm/pull/11526) Prefer locally installed npm in Git Bash -- previous behavior was to use the global one. This was done previously for other shells, but not for Git Bash. ([@destroyerofbuilds](https://github.com/destroyerofbuilds)) - -#### SOCKS FOR THE SOCK GOD - -* [`f961092`](https://github.com/npm/npm/commit/f9610920079d8b88ae464b30007a92c594bd85a8) - [#11636.](https://github.com/npm/npm/issues/11636.) - Document the `--save-bundle` option for `npm install`. - ([@datyayu](https://github.com/datyayu)) -* [`7c908b6`](https://github.com/npm/npm/commit/7c908b618f7123f0a3b860c71eb779e33df35964) - [#11644](https://github.com/npm/npm/pull/11644) - Add documentation for the `test` directory for packages. - ([@lewiscowper](https://github.com/lewiscowper)) - -#### INTERNAL TEST IMPROVEMENTS - -The npm CLI team's time recently has been sunk into npm's many years of tech debt. Specifically, we've been working on improving the test suite. This isn't user visible, but in future should mean a more stable, easier to contribute to npm. Ordinarily we don't report these kinds of changes in the change log, but I thought I might share this week as this chunk is bigger than usual. - -These patches were previously released for `npm@3`, and then ported back to `npm@2` LTS. - -* [`437c537`](https://github.com/npm/npm/commit/437c537e2be5923c6d2c2753154564ba13db8fd9) [#11613](https://github.com/npm/npm/pull/11613) Fix up one of the tests after rebasing the legacy test rewrite to `npm@2`. ([@zkat](https://github.com/zkat)) -* [`55abd0c`](https://github.com/npm/npm/commit/55abd0cc20e87a144d33ce2d459f65e7506da576) [#11613](https://github.com/npm/npm/pull/11613) Test that the `package.json` `files` section and `.npmignore` do what they're supposed to. ([@zkat](https://github.com/zkat)) -* [`a2b99b6`](https://github.com/npm/npm/commit/a2b99b6273ada14b2121ebc0acb7933e630edd9d) [#11613](https://github.com/npm/npm/pull/11613) Test that npm's distribution binary is complete and can be installed and used. ([@iarna](https://github.com/iarna)) -* [`8a8c36c`](https://github.com/npm/npm/commit/8a8c36ce51166006022e5c5d4f8655bbc458d651) [#11613](https://github.com/npm/npm/pull/11613) Test that environment variables are properly passed into scripts. - ([@iarna](https://github.com/zkat)) -* [`a95b550`](https://github.com/npm/npm/commit/a95b5507616bd51e83d7eab5f2337b1aff6480b1) [#11613](https://github.com/npm/npm/pull/11613) Test that we don't leak auth info into the environment. ([@iarna](https://github.com/iarna)) -* [`a1c1c52`](https://github.com/npm/npm/commit/a1c1c52efeab24f6dba154d054f85d9efc833486) [#11613](https://github.com/npm/npm/pull/11613) Remove all the relatively cryptic legacy tests and creates new tap tests that check the same functionality. The *legacy* tests were tests that were originally a shell script that was ported to javascript early in `npm`'s history. ([@iarna](https:\\github.com/iarna) and [@zkat](https://github.com/zkat)) -* [`9d89581`](https://github.com/npm/npm/commit/9d895811d3ee70c2e672f3d8fa06574495b5b488) [#11613](https://github.com/npm/npm/pull/11613) `tacks@1.0.9`: Add a package that provides a tool to generate fixtures from folders and, relatedly, a module that an create and tear down filesystem fixtures easily. ([@iarna](https://github.com/iarna)) - -### v2.14.20 (2016-02-18): - -Hope y'all are having a nice week! As usual, it's a fairly limited release. The -most notable thing is some dependency updates that might help the Node.js CI -setup for Windows run a little better, even if we have some work to do on that -path length things, still. - -#### WHITTLING AWAY AT PATH LENGTHS - -So for all of you who don't know -- Node.js does, in fact, support long Windows -paths. Unfortunately, depending on the tool and the Windows version, a lot of -external tooling does not. This means, for example, that some (all?) versions of -Windows Explorer *can literally never delete npm from their system entirely -because of deeply-nested npm dependencies*. Which is pretty gnarly. - -Incidentally, if you run into that in particularly, you can use -[rimraf](npm.im/rimraf) to remove such files 💁. - -The latest victim of this issue was the Node.js CI setup for testing on Windows, -which uses some tooling or another that croaks on the usual path length limit -for that OS: 255 characters. - -This issue, of course, is largely not a problem as of `npm@3`, with its flat -trees, but it still occasionally and viciously bites LTS. - -We've taken another baby step towards alleviating this in this release by -updating a couple of dependencies that were preventing `npmlog` from deduping, -and then doing a dedupe on that and `gauge`. Hopefully it helps. - -* [`4199551`](https://github.com/npm/npm/commit/41995517e617674710748ab6d262670c96124393) - [#11528](https://github.com/npm/npm/pull/11528) - `npm-install-checks@1.0.7`: Just updates the version of npmlog so we can - dedupe it better. - ([@zkat](https://github.com/zkat)) -* [`14d72c7`](https://github.com/npm/npm/commit/14d72c756b89e2d167eb52c1849263dbddcb9f35) - [#11552](https://github.com/npm/npm/pull/11552) - [#11528](https://github.com/npm/npm/pull/11528) - `node-gyp@3.3.0`: AIX support, new `gyp`, update `npmlog` (for the dedupe), - adds `--cafile` command line option, and allows configuration of Node.js and - io.js mirrors. - ([@rvagg](https://github.com/rvagg)) -* [`0453cb9`](https://github.com/npm/npm/commit/0453cb94b33520eb723b7072cd2654b1d0142533) - [#11528](https://github.com/npm/npm/pull/11528) - Do a `dedupe` on `gauge` to flatten our dependencies a bit more. - ([@zkat](https://github.com/zkat)) - -#### OTHER DEP STUFF - -* [`686c0b3`](https://github.com/npm/npm/commit/686c0b37ec3a7b65f9b3849e1099805e5221c408) - `rimraf@2.5.2`: Just updates to glob@7. - ([@isaacs](https://github.com/isaacs)) - -#### @wyze, DOCUMENTATION HERO OF THE PEOPLE, GETS THEIR OWN HEADER - -* [`7232948`](https://github.com/npm/npm/commit/72329484c775376cb40d5b348f453eaaf2f0b821) - [#11416](https://github.com/npm/npm/pull/11416) - Logout docs were using a section copy-pasted from the adduser docs. - ([@wyze](https://github.com/wyze)) -* [`922b33a`](https://github.com/npm/npm/commit/922b33aba4362e1e90f42e9348f061a1cc73eafb) - [#11414](https://github.com/npm/npm/pull/11414) - Add colon for consistency. - ([@wyze](https://github.com/wyze)) - -### v2.14.19 (2016-02-11): - -Really tiny micro-release this week! The main thing to note is a dependency -update that means we no longer have `graceful-fs@3` in our dependency tree. This -has some implications for being able to run on future Node.js releases, so -better to get this out the door. 😁 - -#### DEPS - -* [`a556e0f`](https://github.com/npm/npm/commit/a556e0f9dcb5d7b44224ba9c16c9d0dc6c8d2532) - `cmd-shim@2.0.2`: Final straggler using `graceful-fs@<4`. - ([@ForbesLindesay](https://github.com/ForbesLindesay)) - -#### DOCS - -* [`69a2d59`](https://github.com/npm/npm/commit/69a2d599bf0cba674ee268483e9bd5c14333b89f) - [#11391](https://github.com/npm/npm/pull/11391) - Fixed versions of `shrinkwrap.json` in examples in documentation for `npm - shrinkwrap`, which did not quite match up. - ([@xcatliu](https://github.com/xcatliu)) - -### v2.14.18 (2016-02-04): - -Clearly our docs are perfect after all those wonderful PRs, 'cause this week's -gonna be all about dependency updates. Note: There is a small security-related -fix included here! - -#### SECURITY-RELATED DEPENDENCY UPDATE - -* [`5c095ef`](https://github.com/npm/npm/commit/5c095eff8dc006980d4d083f2007e4dacff23be3) - [#11341](https://github.com/npm/npm/pull/11341) - `request@2.69.0`: Includes security-related dependency updates involving - `hawk` and `is-my-json-valid` - ([@remy](https://github.com/remy) and [@simov](https://github.com/simov)) - -#### OTHER DEPENDENCY UPDATES - -* [`f9c2668`](https://github.com/npm/npm/commit/f9c2668ca3e6e2602d91250ce61280e5e12d0a00) - `which@1.2.4` - ([@isaacs](https://github.com/isaacs)) -* [`2907c43`](https://github.com/npm/npm/commit/2907c43ad4ef87e5f730c2576f680d6837fcbad0) - `spdx-license-ids@1.2.0` - ([@shinnn](https://github.com/shinnn)) -* [`7734069`](https://github.com/npm/npm/commit/773406960bf7f4a87b2ecb6ebf593c62d0e9f95d) - `rimraf@2.5.1` - ([@isaacs](https://github.com/isaacs)) -* [`f4b39a7`](https://github.com/npm/npm/commit/f4b39a7dd5e1335d92aa22c46d99abb33f271b8b) - `retry@0.9.0` - ([@tim-kos](https://github.com/tim-kos)) -* [`ded1e7a`](https://github.com/npm/npm/commit/ded1e7a1c9c7bec29bb7c30a8f85546670e75b56) - Nest `retry@0.8.0` inside `npm-registry-client` to prevent invalid - dependency issue until the latter gets a dependency update. - ([@zkat](https://github.com/zkat)) -* [`ab9f867`](https://github.com/npm/npm/commit/ab9f8679f9687f91ad03adaab6211a897aeebbae) - `read-package-json@2.0.3` - ([@iarna](https://github.com/iarna)) -* [`b638c41`](https://github.com/npm/npm/commit/b638c41607bb936b9eaaceba2aeeda1d34e3a9b2) - `npmlog@2.0.2` - ([@iarna](https://github.com/iarna)) -* [`49f34af`](https://github.com/npm/npm/commit/49f34af463a674359269025d8438feb6a7c69960) - `init-package-json@1.9.3` - ([@iarna](https://github.com/iarna)) -* [`2305dab`](https://github.com/npm/npm/commit/2305dab4e7bff09bb7686cec653cf1e663dbf15d) - `graceful-fs@4.1.3`: Fixed `.close()` not being patched. - ([@isaacs](https://github.com/isaacs)) -* [`18496d9`](https://github.com/npm/npm/commit/18496d9a0fff94e3652655998e8333056aa52b15) - `fs-write-stream-atomic@1.0.8` - ([@iarna](https://github.com/iarna)) -* [`6637bc7`](https://github.com/npm/npm/commit/6637bc7a0e194d82554cd7c91e1794018fef5943) - `config-chain@1.1.10` - ([@dominictarr](https://github.com/dominictarr)) -* [`4222bad`](https://github.com/npm/npm/commit/4222badffed9e9edacea6a8a96a99a164d376158) - `columnify@1.5.4` - ([@timoxley](https://github.com/timoxley)) -* [`df9016f`](https://github.com/npm/npm/commit/df9016f327a2a9ce492ebc75b882b03069438e13) - `ansi@0.3.1`: Added a license file. - ([@TooTallNate](https://github.com/TooTallNate)) - -### v2.14.17 (2016-01-28): - -Another week, another small LTS release! - -#### BETTER ERROR REPORTING YAY - -So as it turns out, when stuff goes wrong, it's actually nice to give people a -better clue rather than just say "oh well 😏". - -* [`5b8ccb9`](https://github.com/npm/npm/commit/5b8ccb91cf11b4edb463609cd4ed1dee84ed4db0) - [#11289](https://github.com/npm/npm/pull/11289) - There is an obscure feature that lets you monkey-patch npm when it starts up. - If the module being required with this feature failed, it would previous just - make npm error out– this reduces that to a warning. - ([@evanlucas](https://github.com/evanlucas)) -* [`556e42a`](https://github.com/npm/npm/commit/556e42ac6bab078722ddc1dc6cce4428d001133b) - [#11300](https://github.com/npm/npm/pull/11300) - Report symlinked packages as 'linked' in the output for `npm outdated`. - ([@halhenke](https://github.com/halhenke)) -* [`3842317`](https://github.com/npm/npm/commit/3842317583e0ea2eca78e39aa03f5bc06ba21de7) - [#11290](https://github.com/npm/npm/pull/11290) - Suppress warnings about pre-release node versions. This should get node's CI - passing on non-Windows platforms without needing to modify the node version to - get rid of the pre-release suffix. - ([@iarna](https://github.com/iarna)) - -#### EVERYONE WANTS THOSE NPM SOCKS, GEEZE - -Did you know that you can get npm socks for contributing to our docs? I bet -these people do, and now so do you! - -* [`dcde451`](https://github.com/npm/npm/commit/dcde451cb85a6ca08acc6ef45782c652f1d8fc89) - [#11232](https://github.com/npm/npm/pull/11232) - Update automatically included/excluded packages in `package.json`. - ([@jscissr](https://github.com/jscissr)) -* [`e3f8d5b`](https://github.com/npm/npm/commit/e3f8d5be5ac5ec1d72db42f7abf50cc4a8c5935c) - [#11273](https://github.com/npm/npm/pull/11273) - Add an example for `npm view versions`. - ([@vedatmahir](https://github.com/vedatmahir)) -* [`6a06ef2`](https://github.com/npm/npm/commit/6a06ef2252748089f0013de951f2d06160b90306) - [#11272](https://github.com/npm/npm/pull/11272) - Fix a typo in `npm-update.md`. - ([@jonathanp](https://github.com/jonathanp)) -* [`2515ff1`](https://github.com/npm/npm/commit/2515ff1de28f0b261fb25c79a66bd762a65961c4) - [#11215](https://github.com/npm/npm/pull/11215) - Correct small thinko in docs for SPDX expressions. - ([@kemitchell](https://github.com/kemitchell)) -* [`70f897b`](https://github.com/npm/npm/commit/70f897b03da9a5d5d4fd34614e9ee40e6f9e9653) - [#11196](https://github.com/npm/npm/pull/11196) - Make JSON snippets valid JSON in `npm update` docs. - ([@s100](https://github.com/s100)) - -### v2.14.16 (2016-01-21): - -Good to see you all again! It's been a while since we had an LTS release, and -the team continues to work hard to both get the issue tracker under control, and -get our test suite to be awesome and reliable. - -This is also the first LTS release of this year. - -We're gonna have an interesting time -- most of our focus this year will be -around stability and maintainability of the CLI, so you might actually end up -seeing a number of updates even over here, just for the sake of making sure -we're stable, that bugs get fixed, and tests have proper coverage. - -What better way to start this effort, then, than getting Travis tests green, fix -a few things here and there, and tweak a bunch of documentation? 😁 - -#### FIX ALL THE BUGS AND TWEAK ALL THE THINGS - -* [`24b13fb`](https://github.com/npm/npm/commit/24b13fbc57d34db1d5b0a37bcca122c00deba978) - [#11158](https://github.com/npm/npm/pull/11158) - Fix custom node-gyp env var quoting on Windows. - ([@orangemocha](https://github.com/orangemocha)) -* [`e2503f2`](https://github.com/npm/npm/commit/e2503f2be40157b05a9c500ec3b5d16090ffee50) - [#11142](https://github.com/npm/npm/pull/11142) - Fix race condition with `correctMkdir` in the cache directory. - ([@Jimbly](https://github.com/Jimbly)) - -* [`5c0e4c4`](https://github.com/npm/npm/commit/5c0e4c45a29d774ab729e86044377d4e5e424252) - [#10940](https://github.com/npm/npm/pull/10940) - Ignore failures replacing `package.json`. writeFileAtomic is not atomic in - Windows, it fails if the file is being accessed concurrently. - ([@orangemocha](https://github.com/orangemocha)) -* [`2c44d8d`](https://github.com/npm/npm/commit/2c44d8dc8c267d5e054d0175ce2f4750f0986463) - [#10903](https://github.com/npm/npm/pull/10903) - Add tests for `npm adduser --scope`. - ([@ekmartin](https://github.com/ekmartin)) -* [`4cb25d0`](https://github.com/npm/npm/commit/4cb25d0fed5c7792dfd1aec891380ecc1f8a5761) - [#10903](https://github.com/npm/npm/pull/10903) - Add a message informing users when they have been successfully logged in. - ([@ekmartin](https://github.com/ekmartin)) -* [`fe3ec6d`](https://github.com/npm/npm/commit/fe3ec6d6658262054c0c19c55373c21e84ab9f17) - [#10628](https://github.com/npm/npm/pull/10628) - Tell users how to open an issue with a package that has errored. - ([@trodrigues](https://github.com/trodrigues)) - -#### DOCS DOCS DOCS - -We got a TON of lovely documentation patches, too! Thanks all for submitting! - -* [`22482a1`](https://github.com/npm/npm/commit/22482a1f22079d72c3f8ca55c2f0c153bdd024c0) - [#11188](https://github.com/npm/npm/pull/11188) - Briefly explain what's included when you publish. - ([@beaugunderson](https://github.com/beaugunderson)) -* [`fa47724`](https://github.com/npm/npm/commit/fa4772438df0c66a19309dd1c1a3ce43cbee5461) - [#11150](https://github.com/npm/npm/pull/11150) - Advise use of `--depth Infinity` instead of `--depth 9999` in `npm update`. - ([@halhenke](https://github.com/halhenke)) -* [`248ddfe`](https://github.com/npm/npm/commit/248ddfe8f7ddd3318e14bf61de41cab4a638c8a3) - [#11130](https://github.com/npm/npm/pull/11130) - Nuke "using npm programmatically" section from README. The programmatic npm - API is unsupported, and is not guaranteed not to break in non-major versions. - Removing this section so newcomers aren't encouraged to discover or use it. - ([@ljharb](https://github.com/ljharb)) -* [`ae9c452`](https://github.com/npm/npm/commit/ae9c4521222d60ab4a69c19fee5e361c62f41fae) - [#11128](https://github.com/npm/npm/pull/11128) - Add link to local paths section indocs for `package.json`. - ([@orangejulius](https://github.com/orangejulius)) -* [`663a8c6`](https://github.com/npm/npm/commit/663a8c6b4b1647f9b86c15ef32e30023edc8c060) - [#11044](https://github.com/npm/npm/pull/11044) - Update default value documentation for the color option in npm's config. - ([@scottaddie](https://github.com/scottaddie)) -* [`5c1dda0`](https://github.com/npm/npm/commit/5c1dda0d3a18b2954872dba33fbc696ff0700ffe) - [#11037](https://github.com/npm/npm/pull/11037) - Correct the name property max length constraint verbiage. - ([@scottaddie](https://github.com/scottaddie)) -* [`8288365`](https://github.com/npm/npm/commit/8288365d08e97fa3a5b0d31703c015a8be49e07f) - [#10990](https://github.com/npm/npm/pull/10990) - Update folder docs to reflect that process.installPrefix was removed as of - 0.8.x. - ([@jeffmcmahan](https://github.com/jeffmcmahan)) -* [`61d63fa`](https://github.com/npm/npm/commit/61d63fa22c4f09742180c2de460a4ffb6c32738e) - [#10790](https://github.com/npm/npm/pull/10790) - Clarify that `npm install foo` is the same as `npm install foo@latest` now. - ([@cvrebert](https://github.com/cvrebert)) -* [`442c920`](https://github.com/npm/npm/commit/442c9207f375354c91d36df8711ba2d33e1c97f3) - [#10789](https://github.com/npm/npm/pull/10789) - Link over to `npm-dist-tag(1)` in `npm install` docs when they talk about the - `pkg@` syntax. - ([@cvrebert](https://github.com/cvrebert)) -* [`dca7a5e`](https://github.com/npm/npm/commit/dca7a5e2be3bfa306a870a123707d35c732406c0) - [#10788](https://github.com/npm/npm/pull/10788) - Link to tag docs in docs for `npm publish --tag`. - ([@cvrebert](https://github.com/cvrebert)) -* [`a72904e`](https://github.com/npm/npm/commit/a72904e8d4ab1d43ae8150fbe3f6468b0cbb1efd) - [#10787](https://github.com/npm/npm/pull/10787) - Explain why the `latest` tag matters. - ([@cvrebert](https://github.com/cvrebert)) -* [`9d0697a`](https://github.com/npm/npm/commit/9d0697a534046df7efda32170014041bbc1f4e7d) - [#10785](https://github.com/npm/npm/pull/10785) - Replace some quite marks in `npm dist-tag` docs for the sake of consistency. - ([@cvrebert](https://github.com/cvrebert)) - -#### I REALLY LIKE GREEN. CAN YOU TELL? - -So Travis is all green now on `npm@2`, thanks to the removal of nock and a few -other test suite tweaks. This is a fantastic step towards making sure we can all -have confidence in our test suite! 🎉 - -* [`64995be`](https://github.com/npm/npm/commit/64995be6d874356b15c136f9867302d805dfe1e9) [`75ab216`](https://github.com/npm/npm/commit/75ab2164cf79e28ac7f7ebe714f3c5aee99c6626) [`a9f6fe9`](https://github.com/npm/npm/commit/a9f6fe9dc558f17c4a7b9eb83329ac080f7df4b7) [`649c193`](https://github.com/npm/npm/commit/649c193adadf714c2819837f9372a29d724a5ec0) [`94cb05e`](https://github.com/npm/npm/commit/94cb05eaa9e5ad6675cf15c4ac0a44fbdde05900) [`6541690`](https://github.com/npm/npm/commit/65416907008061ac5a5f66b1630a57776803b526) [`255be6f`](https://github.com/npm/npm/commit/255be6f5bca9e3d216f3a5cbdf6714c6c9fcf132) [`9e84fa4`](https://github.com/npm/npm/commit/9e84fa43c49d04cf86ca1678e2a61412f5559cb9) [`8a587b0`](https://github.com/npm/npm/commit/8a587b0c1696ae7302891fa6355fc3e8670e00d3) [`bf812a5`](https://github.com/npm/npm/commit/bf812a54e497a573493346399798aa0b9373ac24) - [#10903](https://github.com/npm/npm/pull/10903) - Get rid of nock from tests, and get Travis green. - ([@zkat](https://github.com/zkat) and [@iarna](https://github.com/iarna)) -* [`70a5310`](https://github.com/npm/npm/commit/70a5310712c6666e753ca8f3bfff4a780ec6292d) - `npm-registry-couchapp@2.6.12`: - Better 0.8 compatibility, and ability to run in travis docker stuff. This - means the test suite should run a lot faster, too! - ([@iarna](https://github.com/iarna)) -* [`28fae39`](https://github.com/npm/npm/commit/28fae399212eda5554e6c0ffd8c9591144ab7b9d) - Get rid of sudo, for Travis! - ([@zkat](https://github.com/zkat)) - -### v2.14.15 (2015-12-10): - -Did you know that Bob Ross reached the rank of master sergeant in the US Air -Force before becoming perhaps the most soothing painter of all time? - -#### TWO HAPPY LITTLE BUG FIXES - -* [`f482664`](https://github.com/npm/npm/commit/f4826645dc6b5c0f05c5f9187efb28c1a293554f) - [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` - now respects the depth parameter, when it is zero and when it is not zero. - ([@MarkReeder](https://github.com/MarkReeder)) -* [`529fa1f`](https://github.com/npm/npm/commit/529fa1ff2c6432a773af99a1c5209c0865f7a19c) - [#9099](https://github.com/npm/npm/issues/9099) I had always thought you - could run `npm version` from subdirectories in your project, which is great, - because now you can. I guess I was just ahead of my time. - ([@ekmartin](https://github.com/ekmartin)) - -#### NOW PAINT IN SOME NICE DOCS CHANGES - -* [`1fc7f2b`](https://github.com/npm/npm/commit/1fc7f2b523ea760e08adb9b861b28e3ba450e565) - [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were - cheeky and fun until you weren't! Don't worry: npm still loves everyone, - especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) -* [`7fe6950`](https://github.com/npm/npm/commit/7fe6950b44d241bb4d90857a44d89d750af1e2b3) - [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs - to be HTTPS everywhere sensible. No HTTP shall be spared! - ([@rsp](https://github.com/rsp)) -* [`96ebb90`](https://github.com/npm/npm/commit/96ebb902439e4f6f37f8beffb589769146fecf24) - [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there - are two lifecycle scripts run by an install phase in an example, instead of - three. ([@eymengunay](https://github.com/eymengunay)) -* [`5196893`](https://github.com/npm/npm/commit/5196893a7496f68a514b83641ff6b72f14d664dd) - [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can - be a little puzzling sometimes. I've attempted to make it clearer, with some - examples, of what's going on with "wanted" and "latest" in more cases. - ([@othiym23](https://github.com/othiym23)) -* [`8e6712d`](https://github.com/npm/npm/commit/8e6712d4ee128858cab36c77723e35bddbb977ba) - [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when - `search.npmjs.org` was a thing? I think I do? The last time I used it was in - like 2012, and it's gone now, so remove it from the docs. - ([@gagern](https://github.com/gagern)) -* [`27d2612`](https://github.com/npm/npm/commit/27d2612b3f5aa88b12c943d04e162ce4c3a350ae) - `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now - included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) - -#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND - -* [`fc6c3c5`](https://github.com/npm/npm/commit/fc6c3c53a31e9e11c2616fcd378202e5b80bf286) - `request@2.67.0` ([@simov](https://github.com/simov)) -* [`07013fd`](https://github.com/npm/npm/commit/07013fd0fd55a2eb31fb9334631ee5d0dd5c41bb) - [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` - ([@zerok](https://github.com/zerok)) -* [`bc149be`](https://github.com/npm/npm/commit/bc149bef871f0f00639509898cece531af3aa8b3) - [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` - ([@floatdrop](https://github.com/floatdrop)) -* [`ac598d3`](https://github.com/npm/npm/commit/ac598d36e1ad207bc0d8a7eadfd84b26146aec1f) - `lru-cache@3.2.0` ([@isaacs](https://github.com/isaacs)) -* [`1b915ce`](https://github.com/npm/npm/commit/1b915ce1e0787ccb6d8aa235d002d66565f2175d) - `npm-registry-client@7.0.9` ([@othiym23](https://github.com/othiym23)) -* [`df7dd78`](https://github.com/npm/npm/commit/df7dd78b8fe3cc58202996fa6c994fc55419bfa5) - `tap@2.3.1` ([@isaacs](https://github.com/isaacs)) - -### v2.14.14 (2015-12-03): - -#### FIX URL IN LICENSE - -The license incorrectly identified the registry URL as `registry.npmjs.com` and -this has been corrected to `registry.npmjs.org`. - -* [`6051a69`](https://github.com/npm/npm/commit/6051a69b1adc80f5f200077067e831643f655bd4) - [#10685](https://github.com/npm/npm/pull/10685) - Fix npm public registry URL in notices. - ([@kemitchell](https://github.com/kemitchell)) - -#### NO MORE MD5 - -We updated modules that had been using MD5 for non-security purposes. While -this is perfectly safe, if you compile Node in FIPS-compliance mode it will -explode if you try to use MD5. We've replaced MD5 with Murmur, which conveys -our intent better and is faster to boot. - -* [`30b5994`](https://github.com/npm/npm/commit/30b599496a9762482e1cef945a378e3a534fd366) - [#10629](https://github.com/npm/npm/issues/10629) - `write-file-atomic@1.1.4` - ([@othiym23](https://github.com/othiym23)) -* [`68c63ff`](https://github.com/npm/npm/commit/68c63ff1279d3d5ea7b2c970ab5562a8e0536f27) - [#10629](https://github.com/npm/npm/issues/10629) - `fs-write-stream-atomic@1.0.5` - ([@othiym23](https://github.com/othiym23)) - -#### DEPENDENCY UPDATES - -* [`e48e5a9`](https://github.com/npm/npm/commit/e48e5a90b4dcf76124b7e9ea3b295c1383e7f0c8) - [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) - `node-gyp@3.2.1`: Improved \*BSD support. - ([@bnoordhuis](https://github.com/bnoordhuis)) - -### v2.14.13 (2015-11-25): - -#### THE npm CLI !== THE npm REGISTRY !== npm, INC. - -npm-the-CLI is licensed under the terms of the [Artistic License -2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), -which is a liberal open-source license that allows you to take this code and do -pretty much whatever you like with it (that is, of course, not legal language, -and if you're doing anything with npm that leaves you in doubt about your legal -rights, please seek the review of qualified counsel, which is to say, not -members of the CLI team, none of whom have passed the bar, to my knowledge). At -the same time the primary registry the CLI uses when looking up and downloading -packages is a commercial service run by npm, Inc., and it has its own [Terms of -Use](https://www.npmjs.com/policies/terms). - -Aside from clarifying the terms of use (and trying to make sure they're more -widely known), the only recent changes to npm's licenses have been making the -split between the CLI and registry clearer. You are still free to do whatever -you like with the CLI's source, and you are free to view, download, and publish -packages to and from `registry.npmjs.org`, but now the existing terms under -which you can do so are more clearly documented. Aside from the two commits -below, see also [the release notes for -`npm@2.14.11`](https://github.com/npm/npm/releases/tag/v2.14.11), which is where -the split between the CLI's code and the terms of use for the registry was -first made more clear. - -* [`1f3e936`](https://github.com/npm/npm/commit/1f3e936aab6840667948ef281e0c3621df365131) - [#10532](https://github.com/npm/npm/issues/10532) Clarify that - `registry.npmjs.org` is the default, but that you're free to use the npm CLI - with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) -* [`6733539`](https://github.com/npm/npm/commit/6733539eeb9b32a5f2d1a6aa797987e2252fa760) - [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate - release information in `README.md` was confusing and potentially inaccurate, - so remove it. ([@kemitchell](https://github.com/kemitchell)) - -#### EASE UP ON WINDOWS BASH USERS - -It turns out that a fair number of us use bash on Windows (through MINGW or -bundled with Git, plz – Cygwin is still a bridge too far, for both npm and -Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed -the check for npm completion to support MINGW bash. Thanks, Jakub! - -* [`460cc09`](https://github.com/npm/npm/commit/460cc0950fd6a005c4e5c4f85af807814209b2bb) - [#10156](https://github.com/npm/npm/issues/10156) completion: enable on - Windows in git bash ([@jakub-g](https://github.com/jakub-g)) - -#### MAKE NODE-GYP A LITTLE BLUER - -* [`333e118`](https://github.com/npm/npm/commit/333e1181082842c21edc62f0ce515928424dff1f) - `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer - version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) - -#### WE LIKE SPDX AND ALL BUT IT'S NOT ACTUALLY A DIRECT DEP, SORRY - -* [`1f4b4bb`](https://github.com/npm/npm/commit/1f4b4bbdf8758281beecb7eaf75d05a6c4a77c15) - Removed `spdx` as a direct npm dependency, since we don't actually need it at - that level, and updated subdeps for `validate-npm-package-license` - ([@othiym23](https://github.com/othiym23)) - -#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS - -These are great! Keep them coming! Sorry for letting them pile up so deep, -everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy -Thanksgiving to all our friends in the USA. - -* [`6101f44`](https://github.com/npm/npm/commit/6101f44737645d9379c3396fae81bbc4d94e1f7e) - [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` - in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) -* [`e8769f9`](https://github.com/npm/npm/commit/e8769f9807b91582c15ef130733e2e72b6c7bda4) - [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate - link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) -* [`1ae2dbe`](https://github.com/npm/npm/commit/1ae2dbe759feb80d8634569221ec6ee2c6d1d1ff) - [#10419](https://github.com/npm/npm/issues/10419) Remove references to - nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) -* [`777a271`](https://github.com/npm/npm/commit/777a271830a42d4ee62540a89f764a6e7d62de19) - [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds - dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) -* [`dcf4b5c`](https://github.com/npm/npm/commit/dcf4b5cbece1b0ef55ab7665d9acacc0b6b7cd6e) - [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is - slightly. ([@aredridel](https://github.com/aredridel)) -* [`447b3d6`](https://github.com/npm/npm/commit/447b3d669b2b6c483b8203754ac0a002c67bf015) - [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously - capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) - -### v2.14.12 (2015-11-19): - -#### TEEN ORCS AT THE GATES - -This week heralds the general release of the primary npm registry's [new -support for private packages for -organizations](http://blog.npmjs.org/post/133542170540/private-packages-for-organizations). -For many potential users, it's the missing piece needed to make it easy for you -to move your organization's private work onto npm. And now it's here! The -functionality to support it has been in place in the CLI for a while now, -thanks to [@zkat](https://github.com/zkat)'s hard work. - -During our final testing before the release, our ace support team member -[@snopeks](https://github.com/snopeks) noticed that there had been some drift -between the CLI team's implementation and what npm was actually preparing to -ship. In the interests of everyone having a smooth experience with this -_extremely useful_ new feature, we quickly made a few changes to square up the -CLI and the web site experiences. - -* [`0e8b15e`](https://github.com/npm/npm/commit/0e8b15e9fbc89e31bd00e573b648846beddfb835) - [#9327](https://github.com/npm/npm/issues/9327) `npm access` no longer has - problems when run in a directory that doesn't contain a `package.json`. - ([@othiym23](https://github.com/othiym23)) -* [`c4e939c`](https://github.com/npm/npm/commit/c4e939c1d493601d25dcb88e6ffcca73076fd3fd) - [npm/npm-registry-client#126](https://github.com/npm/npm-registry-client/issues/126) - `npm-registry-client@7.0.8`: Allow the CLI to grant, revoke, and list - permissions on unscoped (public) packages on the primary registry. - ([@othiym23](https://github.com/othiym23)) - -#### A BRIEF NOTE ON NPM'S BACKWARDS COMPATIBILITY - -We don't often have much to say about the changes we make to our internal -testing and tooling, but I'm going to take this opportunity to reiterate that -npm tries hard to maintain compatibility with a wide variety of Node versions. -As this change shows, we want to ensure that npm works the same across: - -* Node.js 0.8 -* Node.js 0.10 -* Node.js 0.12 -* the latest io.js release -* Node.js 4 LTS -* Node.js 5 - -Contributors who send us pull requests often notice that it's very rare that -our tests pass across all of those versions (ironically, almost entirely due to -the packages we use for testing instead of any issues within npm itself). We're -currently beginning an effort, lasting the rest of 2015, to clean up our test -suite, and not only get it passing on all of the above versions of Node.js, but -working solidly on Windows as well. This is a compounding form of technical -debt that we're finally paying down, and our hope is that cleaning up the tests -will produce a more robust CLI that's a lot easier to write patches for. - -* [`d743620`](https://github.com/npm/npm/commit/d743620a0005213a65d25de771661b4d48a09717) - [#10233](https://github.com/npm/npm/issues/10233) Update Node.js versions - that Travis uses to test npm. ([@iarna](https://github.com/iarna)) - -#### TYPOS IN THE LICENSE, OH MY - -* [`58ac241`](https://github.com/npm/npm/commit/58ac241f556b2c202a8ee33321965e2540361ca7) - [#10478](https://github.com/npm/npm/issues/10478) Correct two typos in npm's - LICENSE. ([@jorrit](https://github.com/jorrit)) - -### v2.14.11 (2015-11-12): - -#### ASK FOR NOTHING, GET LATEST - -When you run `npm install foo`, you probably expect that you'll get the -`latest` version of `foo`, whatever that is. And good news! That's what this -change makes it do. - -We _think_ this is what everyone wants, but if this causes problems for you, we -want to know! If it proves problematic for people we will consider reverting it -(preferably before this becomes `npm@latest`). - -Previously, when you ran `npm install foo` we would act as if you typed `npm -install foo@*`. Now, like any range-type specifier, in addition to matching the -range, it would also have to be `<=` the value of the `latest` dist-tag. -Further, it would exclude prerelease versions from the list of versions -considered for a match. - -This worked as expected most of the time, unless your `latest` was a prerelease -version, in which case that version wouldn't be used, to everyone's surprise. - -* [`6f0a646`](https://github.com/npm/npm/commit/6f0a646cd865b24fe3ff25365bf5421780e63e01) - [#10189](https://github.com/npm/npm/issues/10189) `npm-package-arg@4.1.0`: - Change the default version from `*` to `latest`. - ([@zkat](https://github.com/zkat)) - -#### LICENSE CLARIFICATION - -* [`54a9046`](https://github.com/npm/npm/commit/54a90461f068ea89baa5d70248cdf1581897936d) - [#10326](https://github.com/npm/npm/issues/10326) Clarify what-all is covered - by npm's license and point to the registry's terms of use. - ([@kemitchell](https://github.com/kemitchell)) - -#### CLOSER TO GREEN TRAVIS - -* [`28efd3d`](https://github.com/npm/npm/commit/28efd3d7dfb2fa3755076ae706ea4d38c6ee6900) - [#10232](https://github.com/npm/npm/issues/10232) `nock@1.9.0`: Downgrade - nock to a version that doesn't depend on streams2 in core so that more of our - tests can pass in 0.8. ([@iarna](https://github.com/iarna)) - -#### A BUG FIX - -* [`eacac8f`](https://github.com/npm/npm/commit/eacac8f05014d15217c3d8264d0b00a72eafe2d2) - [#9965](https://github.com/npm/npm/issues/9965) Fix a corrupt `package.json` - file introduced by a merge conflict in - [`022691a`](https://github.com/npm/npm/commit/022691a). - ([@waynebloss](https://github.com/waynebloss)) - -#### A DEPENDENCY UPGRADE - -* [`ea7d8e0`](https://github.com/npm/npm/commit/ea7d8e00a67a3d5877ed72c9728909c848468a9b) - [npm/nopt#51](https://github.com/npm/nopt/pull/51) `nopt@3.0.6`: Allow - types checked to be validated by passed-in name in addition to the JS name of - the type / class. ([@wbecker](https://github.com/wbecker)) - -### v2.14.10 (2015-11-05): - -There's nothing in here that that isn't in the `npm@3.4.0` release notes, but -all of the commit shasums have been adjusted to be correct. Enjoy! - -#### BUG FIXES VIA DEPENDENCY UPDATES - -* [`204c558`](https://github.com/npm/npm/commit/204c558c06637a753c0b41d0cf19f564a1ac3715) - [#8640](https://github.com/npm/npm/issues/8640) - [npm/normalize-package-data#69](https://github.com/npm/normalize-package-data/pull/69) - `normalize-package-data@2.3.5`: Fix a bug where if you didn't specify the - name of a scoped module's binary, it would install it such that it was - impossible to call it. ([@iarna](https://github.com/iarna)) -* [`bbdf4ee`](https://github.com/npm/npm/commit/bbdf4ee0a3cd12be6a2ace255b67d573a72f1f8f) - [npm/fstream-npm#14](https://github.com/npm/fstream-npm/pull/14) - `fstream-npm@1.0.7`: Only filter `config.gypi` when it's in the build - directory. ([@mscdex](https://github.com/mscdex)) -* [`d82ff81`](https://github.com/npm/npm/commit/d82ff81403e906931fac701775723626dcb443b3) - [npm/fstream-npm#15](https://github.com/npm/fstream-npm/pull/15) - `fstream-npm@1.0.6`: Stop including directories that happened to have names - matching whitelisted npm files in npm module tarballs. The most common cause - was that if you had a README directory then everything in it would be - included if wanted it or not. ([@taion](https://github.com/taion)) - -#### DOCUMENTATION FIXES - -* [`16361d1`](https://github.com/npm/npm/commit/16361d122f2ff6d1a4729c66153b7c24c698fd19) - [#10036](https://github.com/npm/npm/pull/10036) Fix typo / over-abbreviation. - ([@ifdattic](https://github.com/ifdattic)) -* [`d1343dd`](https://github.com/npm/npm/commit/d1343dda42f113dc322f95687f5a8c7d71a97c35) - [#10176](https://github.com/npm/npm/pull/10176) Fix broken link, scopes => - scope. ([@ashleygwilliams](https://github.com/ashleygwilliams)) -* [`110663d`](https://github.com/npm/npm/commit/110663d000a3908a4853393d9abae481700cf4dc) - [#9460](https://github.com/npm/npm/issue/9460) Specifying the default command - run by "npm start" and the fact that you can pass it arguments. - ([@JuanCaicedo](https://github.com/JuanCaicedo)) - -#### DEPENDENCY UPDATES FOR THEIR OWN SAKE - -* [`7476d2d`](https://github.com/npm/npm/commit/7476d2d31552a41671c425aa7fcc2844e0381008) - [npm/npmlog#19](https://github.com/npm/npmlog/pull/19) - `npmlog@2.0.0`: Make it possible to emit log messages with `error` as the - prefix. - ([@bengl](https://github.com/bengl)) -* [`6ca7888`](https://github.com/npm/npm/commit/6ca7888862cfe8bf802dc7c66632c102acd94cf5) - `read-package-json@2.0.2`: Minor cleanups. - ([@KenanY](https://github.com/KenanY)) - -### v2.14.9 (2015-10-29): - -There's still life in `npm@2`, but for now, enjoy these dependency upgrades! -Also, [@othiym23](https://github.com/othiym23) says hi! _waves_ -[@zkat](https://github.com/zkat) has her hands full, and -[@iarna](https://github.com/iarna)'s handling `npm@3`, so I'm dealing with -`npm@2` and the totally nonexistent weird bridge `npm@1.4` LTS release that may -or may not be happening this week. - -#### CAN'T STOP WON'T STOP UPDATING THOSE DEPENDENCIES - -* [`f52f0cb`](https://github.com/npm/npm/commit/f52f0cb51526314197e9d67619feebbd82a397b7) - [#10150](https://github.com/npm/npm/issues/10150) `chmodr@1.0.2`: Use - `fs.lstat()` to check if an entry is a directory, making `chmodr()` work - properly with NFS mounts on Windows. ([@sheerun](https://github.com/sheerun)) -* [`f7011d7`](https://github.com/npm/npm/commit/f7011d7b3b1d9148a6cd8f7b8359d6fe3269a912) - [#10150](https://github.com/npm/npm/issues/10150) `which@1.2.0`: Additional - command-line parameters, which is nice but not used by npm. - ([@isaacs](https://github.com/isaacs)) -* [`ebcc0d8`](https://github.com/npm/npm/commit/ebcc0d8629388da0b849bbbad590382cd7268f51) - [#10150](https://github.com/npm/npm/issues/10150) `minimatch@3.0.0`: Don't - package browser version. ([@isaacs](https://github.com/isaacs)) -* [`8c98dce`](https://github.com/npm/npm/commit/8c98dce5ffe242bafbe92b849e73e8de1803e256) - [#10150](https://github.com/npm/npm/issues/10150) `fstream-ignore@1.0.3`: - Upgrade to use `minimatch@3` (for deduping purposes). - ([@othiym23](https://github.com/othiym23)) -* [`db9ef33`](https://github.com/npm/npm/commit/db9ef337c253ecf21c921055bf8742e10d1cb3bb) - [#10150](https://github.com/npm/npm/issues/10150) `request@2.65.0`: - Dependency upgrades and a few bug fixes, mostly related to cookie handling. - ([@simov](https://github.com/simov)) - -#### DEVDEPENDENCIES TOO, I GUESS, IT'S COOL - -* [`dfbf621`](https://github.com/npm/npm/commit/dfbf621afa09c46991249b4f9a995d1823ea7ede) - [#10150](https://github.com/npm/npm/issues/10150) `tap@2.2.0`: Better - handling of test order handling (including some test fixes for npm). - ([@isaacs](https://github.com/isaacs)) -* [`cf5ad5a`](https://github.com/npm/npm/commit/cf5ad5a8c88bfd72e30ef8a8d1d3c5508e0b3c23) - [#10150](https://github.com/npm/npm/issues/10150) `nock@2.16.0`: More - expectations, documentation, and bug fixes. - ([@pgte](https://github.com/pgte)) - -### v2.14.8 (2015-10-08): - -#### SLOWLY RECOVERING FROM FEELINGS - -OS&F is definitely my favorite convention I've gone to. Y'all should check it -out next year! Rebecca and Kat are back, although Forrest is out at -[&yet conf](http://andyetconf.com/). - -This week sees another tiny LTS release with non-code-related patches -- just -CI/release things. - -Meanwhile, have you heard? `npm@3` is much faster now! Go upgrade with `npm -install -g npm@latest` and give it a whirl if you haven't already! - -#### IF YOU CHANGE CASING ON A FILE, YOU ARE NOT MY FRIEND - -Seriously. I love me some case-sensitive filesystems, but a lot of us have to -deal with `git` and its funky support for case normalizing systems. Have mercy -and just don't bother if all you're changing is casing, please? Otherwise, I -have to do this little dance to prevent horrible conflicts. - -* [`c3a7b61`](https://github.com/npm/npm/commit/c3a7b619786650a45653c8b55b8741fc7bb5cfda) - [#9804](https://github.com/npm/npm/pulls/9804) Remove the readme file with - weird casing. - ([@zkat](https://github.com/zkat)) -* [`f3f619e`](https://github.com/npm/npm/commit/f3f619e06e4be1378dbf286f897b50e9c69c9557) - [#9804](https://github.com/npm/npm/pulls/9804) Add the readme file back in, - with desired casing. - ([@zkat](https://github.com/zkat)) - -#### IDK. OUR CI DOESN'T EVEN FULLY WORK YET BUT SURE - -Either way, it's nice to make sure we're running stuff on the latest Node. `4.2` -is getting released very soon, though (this week?), and that'll be the first -official LTS release! - -* [`bd0b9ab`](https://github.com/npm/npm/commit/bd0b9ab6e60a31448794bbd88f94672572c3cb55) - [#9827](https://github.com/npm/npm/pulls/9827) Add node `4.0` and `4.1` to - TravisCI - ([@JaKXz](https://github.com/JaKXz)) - -### v2.14.7 (2015-10-01): - -#### MORE RELEASE STAGGERING?! - -Hi all, and greetings from [Open Source & Feelings](http://osfeels.com)! - -So we're switching gears a little with how we handle our weekly releases: from -now on, we're going to stagger release weeks between dependency bumps and -regular patches. So, this week, aside from a doc change, we'll be doing only -version bumps. Expect actual patches next week! - -#### TOTALLY FOLLOWING THE RULES ALREADY - -So I snuck this in, because it's our own [@snopeks](https://github.com/snopeks)' -first contribution to the main `npm` repo. She's been helping with building -support documents for Orgs, and contributed her general intro guide to the new -feature so you can read it with `npm help orgs` right in your terminal! - -* [`8324ea0`](https://github.com/npm/npm/commit/8324ea023ace4e08b6b8959ad199e2457af9f9cf) - [#9761](https://github.com/npm/npm/pull/9761) Added general user guide for - Orgs. - ([@snopeks](https://github.com/snopeks)) - -#### JUST. ONE. MORE. - -* [`9a502ca`](https://github.com/npm/npm/commit/9a502ca96e2d43ec75a8f684c9ca33af7e910f0a) - Use unique package name in tests to work around weird test-state-based - failures. - ([@iarna](https://github.com/iarna)) - -#### OKAY ACTUALLY THE THING I WAS SUPPOSED TO DO - -Anyway -- here's your version bump! :) - -* [`4aeb94c`](https://github.com/npm/npm/commit/4aeb94c9f0df3f41802cf2e0397a998f3b527c25) - `request@2.64.0`: No longer defaulting to `application/json` for `json` - requests. Also some minor doc and packaging patches. - ([@simov](https://github.com/simov)) - `minimatch@3.0.0`: No longer packaging browser modules. - ([@isaacs](https://github.com/isaacs)) -* [`a18b213`](https://github.com/npm/npm/commit/a18b213e6945a8f5faf882927829ac95f844e2aa) - `glob@5.0.15`: Upgraded `minimatch` dependency. - ([@isaacs](https://github.com/isaacs)) -* [`9eb64d4`](https://github.com/npm/npm/commit/9eb64e44509519ca9d788502edb2eba4cea5c86b) - `nock@2.13.0` - ([@pgte](https://github.com/pgte)) - -### v2.14.6 (2015-09-24): - -#### `¯\_(ツ)_/¯` - -Since `2.x` is LTS now, you can expect a slowdown in overall release sizes. On -top of that, we had our all-company-npm-internal-conf thing on Monday and -Tuesday so there wasn't really time to do much at all. - -Still, we're bringing you a couple of tiny little changes this week! - -* [`7b7da13`](https://github.com/npm/npm/commit/7b7da13c6cdf5eae53c20d5c69afc4c16e6f715d) - [#9471](https://github.com/npm/npm/pull/9471) When the port for a tarball is - different than the registry it's in, but the hostname is the same, the - protocol is now allowed to change, too. - ([@fastest963](https://github.com/fastest963)) -* [`6643ada`](https://github.com/npm/npm/commit/6643adaf9f37f08893e3ad28b797c55a36b2a152) - `request@2.63.0`: Use `application/json` as the default content type when - making `json` requests. - ([@simov](https://github.com/simov)) - -### v2.14.5 (2015-09-17): - -#### NPM IS DEAD. LONG LIVE NPM - -That's right folks. As of this week, `npm@next` is `npm@3`, which means it'll be -`npm@latest` next week! There's some really great shiny new things over there, -and you should really take a look. - -Many kudos to [@iarna](https://github.com/iarna) for her hard work on `npm@3`! - -Don't worry, we'll keep `2.x` around for a while (as LTS), but you won't see -many, if any, new features on this end. From now on, we're going to use -`latest-2` and `next-2` as the dist tags for the `npm@2` branch. - -#### OKAY THAT'S FINE CAN I DEPRECATE THINGS NOW? - -Yes! Specially if you're using scoped packages. Apparently, deprecating them -never worked, but that should be better now. :) - -* [`eca7b24`](https://github.com/npm/npm/commit/eca7b24de9a0090da02a93a69726f5e70ab80543) - [#9558](https://github.com/npm/npm/issues/9558) Add tests for npm deprecate. - ([@zkat](https://github.com/zkat)) -* [`648fe16`](https://github.com/npm/npm/commit/648fe16157ef0db22395ae056d1dd4b4c1605bf4) - [#9558](https://github.com/npm/npm/issues/9558) `npm-registry-client@7.0.7`: - Fixes `npm deprecate` so you can actually deprecate scoped modules now (it - never worked). - ([@zkat](https://github.com/zkat)) - -#### WTF IS `node-waf` - -idk. Some old thing. We don't talk about it anymore. - -* [`cf1b39f`](https://github.com/npm/npm/commit/cf1b39fc95a9ffad7fba4c2fee705c53b19d1d16) - [#9584](https://github.com/npm/npm/issues/9584) Fix ancient references to - `node-waf` in the docs to refer to the `node-gyp` version of things. - ([@KenanY](https://github.com/KenanY)) - -#### THE `graceful-fs` AND `node-gyp` SAGA CONTINUES - -Last week had some sweeping `graceful-fs` upgrades, and this takes care of one -of the stragglers, as well as bumping `node-gyp`. `node@4` users might be -excited about this, or even `node@<4` users who previously had to cherry-pick a -bunch of patches to get the latest npm working. - -* [`e07354f`](https://github.com/npm/npm/commit/e07354f3ff3a6be568fe950f1f825897f72912d8) - `sha@2.0.1`: Upgraded graceful-fs! - ([@ForbesLindesay](https://github.com/ForbesLindesay)) -* [`83cb6ee`](https://github.com/npm/npm/commit/83cb6ee4045b85e565e9678ca1878877e1dc75bd) - `node-gyp@3.0.3` - ([@rvagg](https://github.com/rvagg)) - -#### DEPS! DEPS! MORE DEPS! OK STOP DEPS - -* [`0d60888`](https://github.com/npm/npm/commit/0d608889615a1cb63f5f852337e955053f201aeb) - `normalize-package-data@2.3.4`: Use an external package to check for built-in - node modules. - ([@sindresorhus](https://github.com/sindresorhus)) -* [`79b4dac`](https://github.com/npm/npm/commit/79b4dac11f1c2d8ad5489fc3104734e1c10d4793) - `retry@0.8.0` - ([@tim-kos](https://github.com/tim-kos)) -* [`c164941`](https://github.com/npm/npm/commit/c164941d3c792904d5b126a4fd36eefbe0699f52) - `request@2.62.0`: node 4 added to build targets. Option initialization issues - fixed. - ([@simov](https://github.com/simov)) -* [`0fd878a`](https://github.com/npm/npm/commit/0fd878a44d5ae303325808d1f00df4dce7549d50) - `lru-cache@2.7.0`: Cache serialization support and fixes a cache length bug. - ([@isaacs](https://github.com/isaacs)) -* [`6a7a114`](https://github.com/npm/npm/commit/6a7a114a45b4699995d6e09164fdfd0fa1274591) - `nock@2.12.0` - ([@pgte](https://github.com/pgte)) -* [`6b25e6d`](https://github.com/npm/npm/commit/6b25e6d2235c11f4444104db4545cb42a0267666) - `semver@5.0.3`: Removed uglify-js dead code. - ([@isaacs](https://github.com/isaacs)) - -### v2.14.4 (2015-09-10): - -#### THE GREAT NODEv4 SAGA - -So [Node 4 is out now](https://nodejs.org/en/blog/release/v4.0.0/) and that's -going to involve a number of things over in npm land. Most importantly, it's the -last major release that will include the `2.x` branch of npm. That also means -that `2.x` is going to go into LTS mode in the coming weeks -- once `npm@3` -becomes our official `latest` release. You can most likely expect Node 5 to -include `npm@3` by default, whenever that happens. We'll go into more detail -about LTS at that point, as well, so keep your eyes peeled for announcements! - -#### NODE IS DEAD. LONG LIVE NODE! - -Node 4 being released means that a few things that used to be floating patches -are finally making it right into npm proper. This week, we've got two such -updates, both to dependencies: - -* [`505d9e4`](https://github.com/npm/npm/commit/505d9e40c13b8b0bb3f70ee9886f7b73ba569407) - `node-gyp@3.0.1`: Support for node nightlies and compilation for both node and - io.js without extra patching - ([@rvagg](https://github.com/rvagg)) - -[@thefourtheye](https://github.com/thefourtheye) was kind enough to submit a -*bunch* of PRs to npm's dependencies updating them to `graceful-fs@4.1.2`, which -mainly makes it so we're no longer monkey-patching `fs`. The following are all -updates related to this: - -* [`10cb189`](https://github.com/npm/npm/commit/10cb189c773fef804214018d57509cc7a943184b) - `write-file-atomic@1.1.3` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`edfb80b`](https://github.com/npm/npm/commit/edfb80b39f8cfce9a993f139eb98248001198e09) - `tar@2.2.1` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`aa6e1ee`](https://github.com/npm/npm/commit/aa6e1eede7d71fa69d7256afdfbaa3406bc39a5b) - `read-package-json@2.0.1` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`18971a3`](https://github.com/npm/npm/commit/18971a361635ed3958ecd39b63930ae1e56f8612) - `read-installed@4.0.3` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`a4cba71`](https://github.com/npm/npm/commit/a4cba71bd2532236fda7385bf55e8790cafd4f0a) - `fstream@1.0.8` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`70a38e2`](https://github.com/npm/npm/commit/70a38e29418951ac61ab6cf269d188074fe8ac3a) - `fs-write-stream-atomic@1.0.4` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`9cbd20f`](https://github.com/npm/npm/commit/9cbd20f691e37960e4ba12d401abd1069657cb47) - `fs-vacuum@1.2.7` - ([@thefourtheye](https://github.com/thefourtheye)) - -#### OTHER PATCHES - -* [`c4dd521`](https://github.com/npm/npm/commit/c4dd5213b2f3283ea0392845e5f78cac4573529e) - [#9506](https://github.com/npm/npm/issues/9506) Make `npm link` work on - Windows when using node pre-release/RC releases. - ([@jon-hall](https://github.com/jon-hall)) -* [`b6bc29c`](https://github.com/npm/npm/commit/b6bc29c1401b3d6b570c09cbef1866bdb0436b59) - [#9544](https://github.com/npm/npm/issues/9549) `process.binding` is being - deprecated, so our only direct usage has been removed. - ([@ChALkeR](https://github.com/ChALkeR)) - -#### MORE DEPENDENCIES! - -* [`d940594`](https://github.com/npm/npm/commit/d940594e479a7f012b6dd6952e8ef985ba2a6216) - `tap@1.4.1` - ([@isaacs](https://github.com/isaacs)) -* [`ee38486`](https://github.com/npm/npm/commit/ee3848669331fd98879a3175789d963543f67ce3) - `which@1.1.2`: Added tests for Windows-related dead code that was previously - helping a silent failure happen. Travis stuff, too. - ([@isaacs](https://github.com/isaacs)) - -#### DOC UPDATES - -* [`475daf5`](https://github.com/npm/npm/commit/475daf54ad07777938d1d7ee1a3e576961e84510) - [#9492](https://github.com/npm/npm/issues/9492) Clarify how `.npmignore` and - `.gitignore` are found and used by npm. - ([@addaleax](https://github.com/addaleax)) -* [`b2c391d`](https://github.com/npm/npm/commit/b2c391d7833249626a6d7650363a83bcc778717a) - `nopt@3.0.4`: Minor clarifications to docs about how array and errors work. - ([@zkat](https://github.com/zkat)) - -### v2.14.3 (2015-09-03): - -#### TEAMS AND ORGS STILL BETA. CLI CODE STILL SOLID. - -Our closed beta for Teens and Orcs is happening! The web team is hard at work -making sure everything looks pretty and usable and such. Once we fix things -stemming from that beta, you can expect the feature to be available publicly. -Some time after that, it'll even be available for free for FOSS orgs. It'll Be -Done When It's Done™. - -#### OH GOOD, I CAN ACTUALLY UPSTREAM NOW - -Looks like last week's release foiled our own test suite when trying to upstream -it to Node! Just a friendly reminder that no, `.npmrc` is no longer included -then you pack/release a package! [@othiym23](https://github.com/othiym23) and -[@isaacs](https://github.com/isaacs) managed to suss the really strange test -failures resulting from that, and we've patched it in this release. - -* [`01a3428`](https://github.com/npm/npm/commit/01a3428534b754dca89a56fd1e49f55cb22f6f25) - [#9476](https://github.com/npm/npm/issues/9476) test: Recreate missing - `.npmrc` files when missing so downstream packagers can run tests on packed - npm. - ([@othiym23](https://github.com/othiym23)) - -#### TALKING ABOUT THE CHANGELOG IN THE CHANGELOG IS LIKE, POMO OR SOMETHING - -* [`c1e7a83`](https://github.com/npm/npm/commit/c1e7a83c0ae7aadf01aecc57cf8a0ae2009d4da8) - [#9431](https://github.com/npm/npm/issues/9431) CHANGELOG: clarify - windows-related nature of patch - ([@saper](https://github.com/saper)) - -#### devDependencies UPDATED - -No actual dep updates this week, but we're bumping a couple of devDeps: - -* [`8454835`](https://github.com/npm/npm/commit/84548351bfd63e3e305d195abbcad24c6b7c3e8e) - `tap@1.4.0`: Add `t.contains()` as alias to `t.match()` - ([@isaacs](https://github.com/isaacs)) -* [`13d2216`](https://github.com/npm/npm/commit/13d22161bcdeb6e1ed095d5ba2f77e6abfffa5eb) - `deep-equal@1.0.1`: Make `null == undefined` in non-strict mode - ([@isaacs](https://github.com/isaacs)) - -### v2.14.2 (2015-08-27): - -#### GETTING THAT PESKY `preferGlobal` WARNING RIGHT - -So apparently the `preferGlobal` option hasn't quite been warning correctly for -some time. But now it should be all better! tl;dr: if you try and install a -dependency with `preferGlobal: true`, and it's _not already_ in your -`package.json`, you'll get a warning that the author would really rather you -install it with `--global`. This should prevent Windows PowerShell from thinking -npm has failed just because of a benign warning. - -* [`bbb25f3`](https://github.com/npm/npm/commit/bbb25f30d582f8979168c79233a9f8f840974f90) - [#8841](https://github.com/npm/npm/issues/8841) - [#9409](https://github.com/npm/npm/issues/9409) The `preferGlobal` - warning shouldn't happen if the dependency being installed is listed in - `devDependencies`. ([@saper](https://github.com/saper)) -* [`222fcec`](https://github.com/npm/npm/commit/222fcec85ccd30d35899e5037079fb14625af4e2) - [#9409](https://github.com/npm/npm/issues/9409) `preferGlobal` now prints a - warning when there are no dependencies for the current package. - ([@zkat](https://github.com/zkat)) -* [`5cfed6d`](https://github.com/npm/npm/commit/5cfed6d7a1a5f2731688cfc8293b5e43a6355393) - [#9409](https://github.com/npm/npm/issues/9409) Verify that - `preferGlobal` is warning as expected (when a `preferGlobal` dependency is - installed, but isn't listed in either `dependencies` or `devDependencies`). - ([@zkat](https://github.com/zkat)) - -#### BUMP +1 - -* [`eeafce2`](https://github.com/npm/npm/commit/eeafce2d06883c0f51bf403415b6bc5f2647eba3) - `validate-npm-package-license@3.0.1`: Include additional metadata in parsed license object, - useful for license checkers. ([@kemitchell](https://github.com/kemitchell)) -* [`1502a28`](https://github.com/npm/npm/commit/1502a285f84aa548806b3eafc8889e6288e810f3) - `normalise-package-data@2.3.2`: Updated to use `validate-npm-package-license@3.0.1`. - ([@othiym23](https://github.com/othiym23)) -* [`cbde823`](https://github.com/npm/npm/commit/cbde8233436bf0ea62a4740869b4990322c20659) - `init-package-json@1.9.1`: Add a `silent` option to suppress output on writing the - generated `package.json`. Also, updated to use `validate-npm-package-license@3.0.1`. - ([@zkat](https://github.com/zkat)) -* [`08fda46`](https://github.com/npm/npm/commit/08fda465452b4d77f1ced8050ee3a35a77fc30a5) - `tar@2.2.0`: Minor improvements. ([@othiym23](https://github.com/othiym23)) -* [`dc2f20b`](https://github.com/npm/npm/commit/dc2f20b53fff77203139c863b48da0e959df2ac9) - `rimraf@2.4.3`: `EPERM` now triggers a delay / retry loop (since Windows throws - this when things still hold a handle). ([@isaacs](https://github.com/isaacs)) -* [`e8acb27`](https://github.com/npm/npm/commit/e8acb273aa67ee0394d0431650e1b2a7d09c8554) - `read@1.0.7`: Fix licensing ambiguity. ([@isaacs](https://github.com/isaacs)) - -#### OTHER STUFF THAT'S RELEVANT - -* [`73a1ee0`](https://github.com/npm/npm/commit/73a1ee0be90fa1928521b63f28bef83b8ffab61d) - [#9386](https://github.com/npm/npm/issues/9386) Include additional unignorable files in - documentation. - ([@mjhasbach](https://github.com/mjhasbach)) -* [`0313e40`](https://github.com/npm/npm/commit/0313e40ee0f757fce8861be590ad668c23d7be53) - [#9396](https://github.com/npm/npm/issues/9396) Improve the `EISDIR` error - message returned by npm's error-handling code to give users a better hint of - what's most likely going on. Usually, error reports with this error code are - about people trying to install things without a `package.json`. - ([@KenanY](https://github.com/KenanY)) -* [`2677457`](https://github.com/npm/npm/commit/26774579c739c5951351e58263cf4d6ea3d66ec8) - [#9360](https://github.com/npm/npm/issues/9360) Make it easier to run - only _some_ of npm tests with lifecycle scripts via `npm tap test/tap/testname.js`. - ([@iarna](https://github.com/iarna)) - -### v2.14.1 (2015-08-20): - -#### SECURITY FIX - -There are patches for two information leaks of moderate severity in `npm@2.14.1`: - -1. In some cases, npm was leaking sensitive credential information into the - child environment when running package and lifecycle scripts. This could - lead to packages being published with files (most notably `config.gypi`, a - file created by `node-gyp` that is a cache of environmental information - regenerated on every run) containing the bearer tokens used to authenticate - users to the registry. Users with affected packages have been notified (and - the affected tokens invalidated), and now npm has been modified to not - upload files that could contain this information, as well as scrubbing the - sensitive information out of the environment passed to child scripts. -2. Per-package `.npmrc` files are used by some maintainers as a way to scope - those packages to a specific registry and its credentials. This is a - reasonable use case, but by default `.npmrc` was packed into packages, - leaking those credentials. npm will no longer include `.npmrc` when packing - tarballs. - -If you maintain packages and believe you may be affected by either -of the above scenarios (especially if you've received a security -notification from npm recently), please upgrade to `npm@2.14.1` as -soon as possible. If you believe you may have inadvertently leaked -your credentials, upgrade to `npm@2.14.1` on the affected machine, -and run `npm logout` and then `npm login`. Your access tokens will be -invalidated, which will eliminate any risk posed by tokens inadvertently -included in published packages. We apologize for the inconvenience this -causes, as well as the oversight that led to the existence of this issue -in the first place. - -Huge thanks to [@ChALkeR](https://github.com/ChALkeR) for bringing these -issues to our attention, and for helping us identify affected packages -and maintainers. Thanks also to the Node.js security working group for -their coördination with the team in our response to this issue. We -appreciate everybody's patience and understanding tremendously. - -* [`b9474a8`](https://github.com/npm/npm/commit/b9474a843ca55b7c5fac6da33989e8eb39aff8b1) - `fstream-npm@1.0.5`: Stop publishing build cruft (`config.gypi`) and per-project - `.npmrc` files to keep local configuration out of published packages. - ([@othiym23](https://github.com/othiym23)) -* [`13c286d`](https://github.com/npm/npm/commit/13c286dbdc3fa8fec4cb79fc4d1ee505c8a41b2e) - [#9348](https://github.com/npm/npm/issues/9348) Filter "private" - (underscore-prefixed, even when scoped to a registry) configuration values - out of child environments. ([@othiym23](https://github.com/othiym23)) - -#### BETTER WINDOWS INTEGRATION, ONE STEP AT A TIME - -* [`e40e71f`](https://github.com/npm/npm/commit/e40e71f2f838a8a42392f44e3eeec04e323ab743) - [#6412](https://github.com/npm/npm/issues/6412) Improve the search strategy - used by the npm shims for Windows to prioritize your own local npm installs. - npm has really needed this tweak for a long time, so hammer on it and let us - know if you run into issues, but with luck it will Just Work. - ([@joaocgreis](https://github.com/joaocgreis)) -* [`204ebbb`](https://github.com/npm/npm/commit/204ebbb3e0cab696a429a878ceeb4a7e78ec2b94) - [#8751](https://github.com/npm/npm/issues/8751) - [#7333](https://github.com/npm/npm/issues/7333) Keep [autorun - scripts](https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) from - interfering with npm package and lifecycle script execution on Windows by - adding `/d` and `/s` when invoking `cmd.exe`. - ([@saper](https://github.com/saper)) - -#### IT SEEMED LIKE AN IDEA AT THE TIME - -* [`286f3d9`](https://github.com/npm/npm/commit/286f3d97103812f0fd84b70352addbe899e258f9) - [#9201](https://github.com/npm/npm/pull/9201) For a while npm was building - HTML partials for use on [`docs.npmjs.com`](https://docs.npmjs.com), but we - weren't actually using them. Stop building them, which makes running the full - test suite and installation process around a third faster. - ([@isaacs](https://github.com/isaacs)) - -#### A SINGLE LONELY DEPENDENCY UPGRADE - -* [`b343b95`](https://github.com/npm/npm/commit/b343b956ef777e321e4251ddc96ec6d80827d9e2) - `request@2.61.0`: Bug fixes and keep-alive tweaks. - ([@simov](https://github.com/simov)) - -### v2.14.0 (2015-08-13): - -#### IT'S HERE! KINDA! - -This release adds support for teens and orcs (err, teams and organizations) to -the npm CLI! Note that the web site and registry-side features of this are -still not ready for public consumption. - -A beta should be starting in the next couple of weeks, and the features -themselves will become public once all that's done. Keep an eye out for more -news! - -All of these changes were done under [`#9011`](https://github.com/npm/npm/pull/9011): - -* [`6424170`](https://github.com/npm/npm/commit/6424170fc17c666a6efc090370ec691e0cab1792) - Added new `npm team` command and subcommands. - ([@zkat](https://github.com/zkat)) -* [`52220d1`](https://github.com/npm/npm/commit/52220d146d474ec29b683bd99c06f75cbd46a9f4) - Added documentation for new `npm team` command. - ([@zkat](https://github.com/zkat)) -* [`4e66830`](https://github.com/npm/npm/commit/4e668304850d02df8eb27a779fda76fe5de645e7) - Updated `npm access` to support teams and organizations. - ([@zkat](https://github.com/zkat)) -* [`ea3eb87`](https://github.com/npm/npm/commit/ea3eb8733d9fa09ce34106b1b19fb1a8f95844a5) - Gussied up docs for `npm access` with new commands. - ([@zkat](https://github.com/zkat)) -* [`6e0b431`](https://github.com/npm/npm/commit/6e0b431c1de5e329c86e57d097aa88ebfedea864) - Fix up `npm whoami` to make the underlying API usable elsewhere. - ([@zkat](https://github.com/zkat)) -* [`f29c931`](https://github.com/npm/npm/commit/f29c931012ce5ccd69c29d83548f27e443bf7e62) - `npm-registry-client@7.0.1`: Upgrade `npm-registry-client` API to support - `team` and `access` calls against the registry. - ([@zkat](https://github.com/zkat)) - -#### A FEW EXTRA VERSION BUMPS - -* [`c977e12`](https://github.com/npm/npm/commit/c977e12cbfa50c2f52fc807f5cc19ba1cc1b39bf) - `init-package-json@1.8.0`: Checks for some `npm@3` metadata. - ([@iarna](https://github.com/iarna)) -* [`5c8c9e5`](https://github.com/npm/npm/commit/5c8c9e5ae177ba7d0d298cfa42f3fc7f0271e4ec) - `columnify@1.5.2`: Updated some dependencies. - ([@timoxley](https://github.com/timoxley)) -* [`5d56742`](https://github.com/npm/npm/commit/5d567425768b75aeab402c817a53d8b2bc60d8de) - `chownr@1.0.1`: Tests, docs, and minor style nits. - ([@isaacs](https://github.com/isaacs)) - -#### ALSO A DOC FIX - -* [`846fcc7`](https://github.com/npm/npm/commit/846fcc79b86984b109a97366b0422f995a45f8bf) - [`#9200`](https://github.com/npm/npm/pull/9200) Remove single quotes - around semver range, thus making it valid semver. - ([@KenanY](https://github.com/KenanY)) - -### v2.13.5 (2015-08-07): - -This is another quiet week for the `npm@2` release. -[@zkat](https://github.com/zkat) has been working hard on polishing the CLI -bits of the registry's new feature to support direct management of teams and -organizations, and [@iarna](https://github.com/iarna) continues to work through -the list of issues blocking the general release of `npm@3`, which is looking -more and more solid all the time. - -[@othiym23](https://github.com/othiym23) and [@zkat](https://github.com/zkat) -have also been at this week's Node.js / io.js [collaborator -summit](https://github.com/nodejs/summit/tree/master), both as facilitators and -participants. This is a valuable opportunity to get some face time with other -contributors and to work through a bunch of important discussions, but it does -leave us feeling kind of sleepy. Running meetings is hard! - -What does that leave for this release? A few of the more tricky bug fixes that -have been sitting around for a little while now, and a couple dependency -upgrades. Nothing too fancy, but most of these were contributed by developers -like _you_, which we think is swell. Thanks! - -#### BUG FIXES - -* [`d7271b8`](https://github.com/npm/npm/commit/d7271b8226712479cdd339bf85faf7e394923e0d) - [#4530](https://github.com/npm/npm/issues/4530) The bash completion script - for npm no longer alters global completion behavior around word breaks. - ([@whitty](https://github.com/whitty)) -* [`c9ce294`](https://github.com/npm/npm/commit/c9ce29415a0a8fc610690b6e9d91b64d6e36cfcc) - [#7198](https://github.com/npm/npm/issues/7198) When setting up dependencies - to be shared via `npm link `, only run the lifecycle scripts during - the original link, not when running `npm link ` or `npm install - --link` against them. ([@murgatroid99](https://github.com/murgatroid99)) -* [`422da66`](https://github.com/npm/npm/commit/422da664bd3ce71313da447f170507faf5aac46a) - [#9108](https://github.com/npm/npm/issues/9108) Clear up minor confusion - around wording in `bundledDependencies` section of `package.json` docs. - ([@derekpeterson](https://github.com/derekpeterson)) -* [`6b42d99`](https://github.com/npm/npm/commit/6b42d99460885e715772d3487b1c548d2bc8a738) - [#9146](https://github.com/npm/npm/issues/9146) Include scripts that run for - `preversion`, `version`, and `postversion` in the section for lifecycle - scripts rather than the generic `npm run-script` output. - ([@othiym23](https://github.com/othiym23)) - -#### NOPE, NOT DONE WITH DEPENDENCY UPDATES - -* [`91a48bb`](https://github.com/npm/npm/commit/91a48bb5ef5a990781c86f8b69b8a32cf4fac2d9) - `chmodr@1.0.1`: Ignore symbolic links when recursively changing mode, just - like the Unix command. ([@isaacs](https://github.com/isaacs)) -* [`4bbc86e`](https://github.com/npm/npm/commit/4bbc86e3825e2eee9a8758ba26bdea0cb6a2581e) - `nock@2.10.0` ([@pgte](https://github.com/pgte)) - -### v2.13.4 (2015-07-30): - -#### JULY ENDS ON A FAIRLY QUIET NOTE - -Hey everyone! I hope you've had a great week. We're having a fairly small -release this week while we wrap up Teams and Orgs (or, as we've taken to calling -it internally, _Teens and Orcs_). - -In other exciting news, a bunch of us are gonna be at the [Node.js Collaborator -Summit](https://github.com/nodejs/summit/issues/1), and you can also find us at -[wafflejs](https://wafflejs.com/) on Wednesday. Hopefully we'll be seeing some -of you there. :) - -#### THE PATCH!!! - -So here it is. The patch. Hope it helps. (Thanks, -[@ktarplee](https://github.com/ktarplee)!) - -* [`2e58c48`](https://github.com/npm/npm/commit/2e58c4819e3cafe4ae23ab7f4a520fe09258cfd7) - [#9033](https://github.com/npm/npm/pull/9033) `npm version` now works on git - submodules - ([@ktarplee](https://github.com/ktarplee)) - -#### OH AND THERE'S A DEV DEPENDENCIES UPDATE - -Hooray. - -* [`d204683`](https://github.com/npm/npm/commit/d2046839d471322e61e3ceb0f00e78e5c481f967) - `nock@2.9.1` - ([@pgte](https://github.com/pgte)) - -### v2.13.3 (2015-07-23): - -#### I'M SAVING THE GOOD JOKES FOR MORE INTERESTING RELEASES - -It's pretty hard to outdo last week's release buuuuut~ I promise I'll have a -treat when we release our shiny new **Teams and Organizations** feature! :D -(Coming Soon™). It'll be a real *gem*. - -That means it's a pretty low-key release this week. We got some nice -documentation tweaks, a few bugfixes, and other such things, though! - -Oh, and a _bunch of version bumps_. Thanks, `semver`! - -#### IT'S THE LITTLE THINGS THAT MATTER - -* [`2fac6ae`](https://github.com/npm/npm/commit/2fac6aeffefba2934c3db395b525d931599c34d8) - [#9012](https://github.com/npm/npm/issues/9012) A convenience for releases -- - using the globally-installed npm before now was causing minor annoyances, so - we just use the exact same npm we're releasing to build the new release. - ([@zkat](https://github.com/zkat)) - -#### WHAT DOES THIS BUTTON DO? - -There's a couple of doc updates! The last one might be interesting. - -* [`4cd3205`](https://github.com/npm/npm/commit/4cd32050c0f89b7f1ae486354fa2c35eea302ba5) - [#9002](https://github.com/npm/npm/issues/9002) Updated docs to list the - various files that npm automatically includes and excludes, regardless of - settings. - ([@SimenB](https://github.com/SimenB)) -* [`cf09e75`](https://github.com/npm/npm/commit/cf09e754931739af32647d667b671e72a4c79081) - [#9022](https://github.com/npm/npm/issues/9022) Document the `"access"` field - in `"publishConfig"`. Did you know you don't need to use `--access=public` - when publishing scoped packages?! Just put it in your `package.json`! - Go refresh yourself on scopes packages by [checking our docs](https://docs.npmjs.com/getting-started/scoped-packages) on them. - ([@boennemann](https://github.com/boennemann)) -* [`bfd73da`](https://github.com/npm/npm/commit/bfd73da33349cc2afb8278953b2ae16ea95023de) - [#9013](https://github.com/npm/npm/issues/9013) fixed typo in changelog - ([@radarhere](https://github.com/radarhere)) - -#### THE SEMVER MAJOR VERSION APOCALYPSE IS UPON US - -Basically, `semver` is up to `@5`, and that meant we needed to go in an update a -bunch of our dependencies manually. `node-gyp` is still pending update, since -it's not ours, though! - -* [`9232e58`](https://github.com/npm/npm/commit/9232e58d54c032c23716ef976023d36a42bfdcc9) - [#8972](https://github.com/npm/npm/issues/8972) `init-package-json@1.7.1` - ([@othiym23](https://github.com/othiym23)) -* [`ba44f6b`](https://github.com/npm/npm/commit/ba44f6b4201a4faee025341b123e372d8f45b6d9) - [#8972](https://github.com/npm/npm/issues/8972) `normalize-package-data@2.3.1` - ([@othiym23](https://github.com/othiym23)) -* [`3901d3c`](https://github.com/npm/npm/commit/3901d3cf191880bb4420b1d6b8aedbcd8fc26cdf) - [#8972](https://github.com/npm/npm/issues/8972) `npm-install-checks@1.0.6` - ([@othiym23](https://github.com/othiym23)) -* [`ffcc7dd`](https://github.com/npm/npm/commit/ffcc7dd12f8bb94ff0f64c465c57e460b3f24a24) - [#8972](https://github.com/npm/npm/issues/8972) `npm-package-arg@4.0.2` - ([@othiym23](https://github.com/othiym23)) -* [`7128f9e`](https://github.com/npm/npm/commit/7128f9ec10c0c8482087511b716dbddb54249626) - [#8972](https://github.com/npm/npm/issues/8972) `npm-registry-client@6.5.1` - ([@othiym23](https://github.com/othiym23)) -* [`af28911`](https://github.com/npm/npm/commit/af28911ecd54a844f848c6ae41887097d6aa2f3b) - [#8972](https://github.com/npm/npm/issues/8972) `read-installed@4.0.2` - ([@othiym23](https://github.com/othiym23)) -* [`3cc817a`](https://github.com/npm/npm/commit/3cc817a0f34f698b580ff6ff02308700efc54f7c) - [#8972](https://github.com/npm/npm/issues/8972) node-gyp needs its own version - of semver - ([@othiym23](https://github.com/othiym23)) -* [`f98eccc`](https://github.com/npm/npm/commit/f98eccc6e3a6699ca0aa9ecbad93a3b995583871) - [#8972](https://github.com/npm/npm/issues/8972) `semver@5.0.1`: Stop including - browser builds. - ([@isaacs](https://github.com/isaacs)) - -#### \*BUMP\* - -And some other version bumps for good measure. - -* [`254ecfb`](https://github.com/npm/npm/commit/254ecfb04f026c2fd16427db01a53600c1892c8b) - [#8990](https://github.com/npm/npm/issues/8990) `marked-man@0.1.5`: Fixes an - issue with documentation rendering where backticks in 2nd-level headers would - break rendering (?!?!) - ([@steveklabnik](https://github.com/steveklabnik)) -* [`79efd79`](https://github.com/npm/npm/commit/79efd79ac216da8cee8636fb2ed926b0196a4eb6) - `minimatch@2.0.10`: A pattern like `'*.!(x).!(y)'` should not match a name - like `'a.xyz.yab'`. - ([@isaacs](https://github.com/isaacs)) -* [`39c7dc9`](https://github.com/npm/npm/commit/39c7dc9a4e17cd35a5ed882ba671821c9a900f9e) - `request@2.60.0`: A few bug fixes and doc updates. - ([@simov](https://github.com/simov)) -* [`72d3c3a`](https://github.com/npm/npm/commit/72d3c3a9e1e461608aa21b14c01a650333330da9) - `rimraf@2.4.2`: Minor doc and dep updates - ([@isaacs](https://github.com/isaacs)) -* [`7513035`](https://github.com/npm/npm/commit/75130356a06f5f4fbec3786aac9f9f0b36dfe010) - `nock@2.9.1` - ([@pgte](https://github.com/pgte)) -* [`3d9aa82`](https://github.com/npm/npm/commit/3d9aa82260f0643a32c13d0c1ed16f644b6fd4ab) - Fixes this thing where Kat decided to save `nock` as a regular dependency ;) - ([@othiym23](https://github.com/othiym23)) - -### v2.13.2 (2015-07-16): - -#### HOLD ON TO YOUR TENTACLES... IT'S NPM RELEASE TIME! - -Kat: Hooray! Full team again, and we've got a pretty small patch release this -week, about everyone's favorite recurring issue: git URLs! - -Rebecca: No Way! Again? - -Kat: The ride never ends! In the meantime, there's some fun, exciting work in -the background to get orgs and teams out the door. Keep an eye out for news. :) - -Rebecca: And make sure to keep an eye out for patches for the super-fresh -`npm@3`! - -#### LET'S GIT INKY - -Rebecca: So what's this about another git URL issue? - -Kat: Welp, I apparently broke backwards-compatibility on what are actually -invalid `git+https` URLs! So I'm making it work, but we're gonna deprecate URLs -that look like `git+https://user@host:path/is/here`. - -Rebecca: What should we use instead?! - -Kat: Just do me a solid and use `git+ssh://user@host:path/here` or -`git+https://user@host/absolute/https/path` instead! - -* [`769f06e`](https://github.com/npm/npm/commit/769f06e5455d7a9fc738379de2e05868df0dab6f) - Updated tests for `getResolved` so the URLs are run through - `normalize-git-url`. - ([@zkat](https://github.com/zkat)) -* [`edbae68`](https://github.com/npm/npm/commit/edbae685bf48971e878ced373d6825fc1891ee47) - [#8881](https://github.com/npm/npm/issues/8881) Added tests to verify that `git+https:` URLs are handled compatibly. - ([@zkat](https://github.com/zkat)) - -#### NEWS FLASH! DOCUMENTATION IMPROVEMENTS! - -* [`bad4e014`](https://github.com/npm/npm/commit/bad4e0143cc95754a682f1da543b2b4e196e924b) - [#8924](https://github.com/npm/npm/pull/8924) Make sure documented default - values in `lib/cache.js` properly correspond to current code. - ([@watilde](https://github.com/watilde)) -* [`e7a11fd`](https://github.com/npm/npm/commit/e7a11fdf70e333cdfe3dac94a1a30907adb76d59) - [#8036](https://github.com/npm/npm/issues/8036) Clarify the documentation for - `.npmrc` to clarify that it's not read at the project level when doing global - installs. - ([@espadrine](https://github.com/espadrine)) - -#### STAY FRESH~ - -Kat: That's it for npm core changes! - -Rebecca: Great! Let's look at the fresh new dependencies, then! - -Kat: See you all next week! - -Both: Stay Freeesh~ - -(some cat form of Forrest can be seen snoring in the corner) - -* [`bfa1f45`](https://github.com/npm/npm/bfa1f45ee760d05039557d2245b7e3df9fda8def) - `normalize-git-url@3.0.1`: Fixes url normalization such that `git+https:` - accepts scp syntax, but get converted into absolute-path `https:` URLs. Also - fixes scp syntax so you can have absolute paths after the `:` - (`git@myhost.org:/some/absolute/place.git`) - ([@zkat](https://github.com/zkat)) -* [`6f757d2`](https://github.com/npm/npm/6f757d22b53f91da0bebec6b5d16c1f4dbe130b4) - `glob@5.0.15`: Better handling of ENOTSUP - ([@isaacs](https://github.com/isaacs)) -* [`0920819`](https://github.com/npm/npm/09208197fb8b0c6d5dbf6bd7f59970cf366de989) - `node-gyp@2.0.2`: Fixes an issue with long paths on Win32 - ([@TooTallNate](https://github.com/TooTallNate)) - -### v2.13.1 (2015-07-09): - -#### KAUAI WAS NICE. I MISS IT. - -But Forrest's still kinda on vacation, and not just mentally, because he's -hanging out with the fine meatbags at CascadiaFest. Enjoy this small bug -release. - -#### MAKE OURSELVES HAPPY - -* [`40981f2`](https://github.com/npm/npm/commit/40981f2e0c9c12bb003ccf188169afd1d201f5af) - [#8862](https://github.com/npm/npm/issues/8862) Make the lifecycle's safety - check work with scoped packages. ([@tcort](https://github.com/tcort)) -* [`5125856`](https://github.com/npm/npm/commit/512585622481dbbda9a0306932468d59efaff658) - [#8855](https://github.com/npm/npm/issues/8855) Make dependency versions of - `"*"` match `"latest"` when all versions are prerelease. - ([@iarna](https://github.com/iarna)) -* [`22fdc1d`](https://github.com/npm/npm/commit/22fdc1d52602ba7098af978c75fca8f7d1060141) - Visually emphasize the correct way to write lifecycle scripts. - ([@josh-egan](https://github.com/josh-egan)) - -#### MAKE TRAVIS HAPPY - -* [`413c3ac`](https://github.com/npm/npm/commit/413c3ac2ab2437f3011c6ca0d1630109ec14e604) - Use npm's `2.x` branch for testing its `2.x` branch. - ([@iarna](https://github.com/iarna)) -* [`7602f64`](https://github.com/npm/npm/commit/7602f64826f7a465d9f3a20bd87a376d992607e6) - Don't prompt for GnuPG passphrase in version lifecycle tests. - ([@othiym23](https://github.com/othiym23)) - -#### MAKE `npm outdated` HAPPY - -* [`d338668`](https://github.com/npm/npm/commit/d338668601d1ebe5247a26237106e80ea8cd7f48) - [#8796](https://github.com/npm/npm/issues/8796) `fstream-npm@1.0.4`: When packing the - package tarball, npm no longer crashes for packages with certain combinations of - `.npmignore` entries, `.gitignore` entries, and lifecycle scripts. - ([@iarna](https://github.com/iarna)) -* [`dbe7c9c`](https://github.com/npm/npm/commit/dbe7c9c74734be870d16dd61b9e7f746123011f6) - `nock@2.7.0`: Add matching based on query strings. - ([@othiym23](https://github.com/othiym23)) - -There are new versions of `strip-ansi` and `ansi-regex`, but npm only uses them -indirectly, so we pushed them down into their dependencies where they can get -updated at their own pace. - -* [`06b6ca5`](https://github.com/npm/npm/commit/06b6ca5b5333025f10c8d901628859bd4678e027) - undeduplicate `ansi-regex` ([@othiym23](https://github.com/othiym23)) -* [`b168e33`](https://github.com/npm/npm/commit/b168e33ad46faf47020a45f72ba8cec8c644bdb9) - undeduplicate `strip-ansi` ([@othiym23](https://github.com/othiym23)) - -### v2.13.0 (2015-07-02): - -#### FORREST IS OUT! LET'S SNEAK IN ALL THE THINGS! - -Well, not _everything_. Just a couple of goodies, like the new `npm ping` -command, and the ability to add files to the commits created by `npm version` -with the new version hooks. There's also a couple of bugfixes in `npm` itself -and some of its dependencies. Here we go! - -#### YES HELLO THIS IS NPM REGISTRY SORRY NO DOG HERE - -Yes, that's right! We now have a dedicated `npm ping` command. It's super simple -and super easy. You ping. We tell you whether you pinged right by saying hello -right back. This should help out folks dealing with things like proxy issues or -other registry-access debugging issues. Give it a shot! - -This addresses [#5750](https://github.com/npm/npm/issues/5750), and will help -with the `npm doctor` stuff described in -[#6756](https://github.com/npm/npm/issues/6756). - -* [`f1f7a85`](https://github.com/npm/npm/commit/f1f7a85) - Add ping command to CLI - ([@michaelnisi](https://github.com/michaelnisi)) -* [`8cec629`](https://github.com/npm/npm/commit/8cec629) - Add ping command to npm-registry-client - ([@michaelnisi](https://github.com/michaelnisi)) -* [`0c0c92d`](https://github.com/npm/npm/0c0c92d) - Fixed ping command issues (added docs, tests, fixed minor bugs, etc) - ([@zkat](https://github.com/zkat)) - -#### I'VE WANTED THIS FOR `version` SINCE LIKE LITERALLY FOREVER AND A DAY - -Seriously! This patch lets you add files to the `version` commit before it's -made, So you can add additional metadata files, more automated changes to -`package.json`, or even generate `CHANGELOG.md` automatically pre-commit if -you're into that sort of thing. I'm so happy this is there I can't even. Do you -have other fun usecases for this? Tell -[npmbot (@npmjs)](http://twitter.com/npmjs) about it! - -* [`582f170`](https://github.com/npm/npm/commit/582f170) - [#8620](https://github.com/npm/npm/issues/8620) version: Allow scripts to add - files to the commit. - ([@jamestalmage](https://github.com/jamestalmage)) - -#### ALL YOUR FILE DESCRIPTORS ARE BELONG TO US - -We've had problems in the past with things like `EMFILE` errors popping up when -trying to install packages with a bunch of dependencies. Isaac patched up -[`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to handle this case -better, so we should be seeing fewer of those. - -* [`022691a`](https://github.com/npm/npm/commit/022691a) - `graceful-fs@4.1.2`: Updated so we can monkey patch globally. - ([@isaacs](https://github.com/isaacs)) -* [`c9fb0fd`](https://github.com/npm/npm/commit/c9fb0fd) - Globally monkey-patch graceful-fs. This should fix some errors when installing - packages with lots of dependencies. - ([@isaacs](https://github.com/isaacs)) - -#### READ THE FINE DOCS. THEY'VE IMPROVED - -* [`5587d0d`](https://github.com/npm/npm/commit/5587d0d) - Nice clarification for `directories.bin` - ([@ujane](https://github.com/ujane)) -* [`20673c7`](https://github.com/npm/npm/commit/20673c7) - Hey, Windows folks! Check out - [`nvm-windows`](https://github.com/coreybutler/nvm-windows) - ([@ArtskydJ](https://github.com/ArtskydJ)) - -#### MORE NUMBERS! MORE VALUE! - -* [`5afa2d5`](https://github.com/npm/npm/commit/5afa2d5) - `validate-npm-package-name@2.2.2`: Documented package name rules in README - ([@zeusdeux](https://github.com/zeusdeux)) -* [`021f4d9`](https://github.com/npm/npm/commit/021f4d9) - `rimraf@2.4.1`: [#74](https://github.com/isaacs/rimraf/issues/74) Use async - function for bin (to better handle Window's `EBUSY`) - ([@isaacs](https://github.com/isaacs)) -* [`5223432`](https://github.com/npm/npm/commit/5223432) - `osenv@0.1.3`: Use `os.homedir()` polyfill for more reliable output. io.js - added the function and the polyfill does a better job than the prior solution. - ([@sindresorhus](https://github.com/sindresorhus)) -* [`8ebbc90`](https://github.com/npm/npm/commit/8ebbc90) - `npm-cache-filename@1.0.2`: Make sure different git references get different - cache folders. This should prevent `foo/bar#v1.0` and `foo/bar#master` from - sharing the same cache folder. - ([@tomekwi](https://github.com/tomekwi)) -* [`367b854`](https://github.com/npm/npm/commit/367b854) - `lru-cache@2.6.5`: Minor test/typo changes - ([@isaacs](https://github.com/isaacs)) -* [`9fcae61`](https://github.com/npm/npm/commit/9fcae61) - `glob@5.0.13`: Tiny doc change + stop firing 'match' events for ignored items. - ([@isaacs](https://github.com/isaacs)) - -#### OH AND ONE MORE THING - -* [`7827249`](https://github.com/npm/npm/commit/7827249) - `PeerDependencies` errors now include the package version. - ([@NickHeiner](https://github.com/NickHeiner)) - -### v2.12.1 (2015-06-25): - -#### HEY WHERE DID EVERYBODY GO - -I keep [hearing some commotion](https://github.com/npm/npm/releases/tag/v3.0.0). -Is there something going on? Like, a party or something? Anyway, here's a small -release with at least two significant bug fixes, at least one of which some of -you have been waiting for for quite a while. - -#### REMEMBER WHEN I SAID "REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS?"? - -`npm@2.12.0` has a change that introduces a fix for a permissions problem -whereby the `_locks` directory in the cache directory can up being owned by -root. The fix in 2.12.0 takes care of that problem, but introduces a new -problem for Windows users where npm tries to call `process.getuid()`, which -doesn't exist on Windows. It was easy enough to fix (but more or less -impossible to test, thanks to all the external dependencies involved with -permissions and platforms and whatnot), but as a result, Windows users might -want to skip `npm@2.12.0` and go straight to `npm@2.12.1`. Sorry about that! - -* [`7e5da23`](https://github.com/npm/npm/commit/7e5da238ee869201fdb9027c27b79b0f76b440a8) - When using the new, "fixed" cache directory creator, be extra-careful to not - call `process.getuid()` on platforms that lack it. - ([@othiym23](https://github.com/othiym23)) - -#### WHEW! ALL DONE FIXING GIT FOREVER! - -New npm CLI team hero [@zkat](https://github.com/zkat) has finally (FINALLY) -fixed the regression somebody (hi!) introduced a couple months ago whereby git -URLs of the format `git+ssh://user@githost.com:org/repo.git` suddenly stopped -working, and also started being saved (and cached) incorrectly. I am 100% sure -there are absolutely no more bugs in the git caching code at all ever. Mm hm. -Yep. Pretty sure. Maybe. Hmm... I hope. - -*Sighs audibly.* - -[Let us know](http://github.com/npm/npm/issues/new) if we broke something else -with this fix. - -* [`94ca4a7`](https://github.com/npm/npm/commit/94ca4a711619ba8e40ce3d20bc42b13cdb7611b7) - [#8031](https://github.com/npm/npm/issues/8031) Even though - `git+ssh://user@githost.com:org/repo.git` isn't a URL, treat it like one for - the purposes of npm. ([@zkat](https://github.com/zkat)) -* [`e7f56e5`](https://github.com/npm/npm/commit/e7f56e5a97fcf1c52d5c5bee71303b0126129815) - [#8031](https://github.com/npm/npm/issues/8031) `normalize-git-url@2.0.0`: - Handle git URLs (and URL-like remote refs) in a manner consistent with npm's - docs. ([@zkat](https://github.com/zkat)) - -#### YEP, THERE ARE STILL DEPENDENCY UPGRADES - -* [`679bf47`](https://github.com/npm/npm/commit/679bf4745ac2cfbb01c9ce273e189807fd04fa33) - [#40](http://github.com/npm/read-installed/issues/40) `read-installed@4.0.1`: - Handle prerelease versions in top-level dependencies not in `package.json` - without marking those packages as invalid. - ([@benjamn](https://github.com/benjamn)) -* [`3a67410`](https://github.com/npm/npm/commit/3a6741068c9119174c920496778aeee870ebdac0) - `tap@1.3.1` ([@isaacs](https://github.com/isaacs)) -* [`151904a`](https://github.com/npm/npm/commit/151904af39dc24567f8c98529a2a64a4dbcc960a) - `nopt@3.0.3` ([@isaacs](https://github.com/isaacs)) - -### v2.12.0 (2015-06-18): - -#### REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS? - -About [a million people](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+EACCES+_locks) -have filed issues related to having a tough time using npm after they've run -npm once or twice with sudo. "Don't worry about it!" I said. "We've fixed all -those permissions problems ages ago! Use this one weird trick and you'll never -have to deal with this again!" - -Well, uh, if you run npm with root the first time you run npm on a machine, it -turns out that the directory npm uses to store lockfiles ends up being owned by -the wrong user (almost always root), and that can, well, it can cause problems -sometimes. By which I mean every time you run npm without being root it'll barf -with `EACCES` errors. Whoops! - -This is an obnoxious regression, and to prevent it from recurring, we've made -it so that the cache, cached git remotes, and the lockfile directories are all -created and maintained using the same utilty module, which not only creates the -relevant paths with the correct permissions, but will fix the permissions on -those directories (if it can) when it notices that they're broken. An `npm -install` run as root ought to be sufficient to fix things up (and if that -doesn't work, first tell us about it, and then run `sudo chown -R $(whoami) -$HOME/.npm`) - -Also, I apologize for inadvertently gaslighting any of you by claiming this bug -wasn't actually a bug. I do think we've got this permanently dealt with now, -but I'll be paying extra-close attention to permissions issues related to the -cache for a while. - -* [`85d1a53`](https://github.com/npm/npm/commit/85d1a53d7b5e0fc04823187e522ae3711ede61fa) - Set permissions on lock directory to the owner of the process. - ([@othiym23](https://github.com/othiym23)) - -#### I WENT TO NODECONF AND ALL I GOT WAS THIS LOUSY SPDX T-SHIRT - -That's not literally true. We spent very little time discussing SPDX, -[@kemitchell](https://github.com/kemitchell) is a champ, and I had a lot of fun -playing drum & bass to a mostly empty Boogie Barn and only ended up with one -moderately severe cold for my pains. Another winner of a NodeConf! (I would -probably wear a SPDX T-shirt if somebody gave me one, though.) - -A bunch of us did have a spirited discussion of the basics of open-source -intellectual property, and the convergence of me, -[@kemitchell](https://github.com/kemitchell), and -[@jandrieu](https://github.com/jandrieu) in one place allowed us to hammmer out -a small but significant issue that had been bedeviling early adopters of the -new SPDX expression syntax in `package.json` license fields: how to deal with -packages that are left without a license on purpose. - -Refer to [the docs](https://github.com/npm/npm/blob/16a3dd545b10f8a2464e2037506ce39124739b41/doc/files/package.json.md#license) -for the specifics, but the short version is that instead of using -`LicenseRef-LICENSE` for proprietary licenses, you can now use either -`UNLICENSED` if you want to make it clear that you don't _want_ your software -to be licensed (and want npm to stop warning you about this), or `SEE LICENSE -IN ` if there's a license with custom text you want to use. At some -point in the near term, we'll be updating npm to verify that the mentioned -file actually exists, but for now you're all on the honor system. - -* [`4827fc7`](https://github.com/npm/npm/commit/4827fc784117c17f35dd9b51b21d1eff6094f661) - [#8557](https://github.com/npm/npm/issues/8557) - `normalize-package-data@2.2.1`: Allow `UNLICENSED` and `SEE LICENSE IN - ` in "license" field of `package.json`. - ([@kemitchell](https://github.com/kemitchell)) -* [`16a3dd5`](https://github.com/npm/npm/commit/16a3dd545b10f8a2464e2037506ce39124739b41) - [#8557](https://github.com/npm/npm/issues/8557) Document the new accepted - values for the "license" field. - ([@kemitchell](https://github.com/kemitchell)) -* [`8155311`](https://github.com/npm/npm/commit/81553119350deaf199e79e38e35b52a5c8ad206c) - [#8557](https://github.com/npm/npm/issues/8557) `init-package-json@1.7.0`: - Support new "license" field values at init time. - ([@kemitchell](https://github.com/kemitchell)) - -#### SMALLISH BUG FIXES - -* [`9d8cac9`](https://github.com/npm/npm/commit/9d8cac94a258db648a2b1069b1c8c6529c79d013) - [#8548](https://github.com/npm/npm/issues/8548) Remove extraneous newline - from `npm view` output, making it easier to use in shell scripts. - ([@eush77](https://github.com/eush77)) -* [`765fd4b`](https://github.com/npm/npm/commit/765fd4bfca8ea3e2a4a399765b17eec40a3d893d) - [#8521](https://github.com/npm/npm/issues/8521) When checking for outdated - packages, or updating packages, raise an error when the registry is - unreachable instead of silently "succeeding". - ([@ryantemple](https://github.com/ryantemple)) - -#### SMALLERISH DOCUMENTATION TWEAKS - -* [`5018335`](https://github.com/npm/npm/commit/5018335ce1754a9f771954ecbc1a93acde9b8c0a) - [#8365](https://github.com/npm/npm/issues/8365) Add details about which git - environment variables are whitelisted by npm. - ([@nmalaguti](https://github.com/nmalaguti)) -* [`bed9edd`](https://github.com/npm/npm/commit/bed9edddfdcc6d22a80feab33b53e4ef9172ec72) - [#8554](https://github.com/npm/npm/issues/8554) Fix typo in version docs. - ([@rainyday](https://github.com/rainyday)) - -#### WELL, I GUESS THERE ARE MORE DEPENDENCY UPGRADES - -* [`7ce2f06`](https://github.com/npm/npm/commit/7ce2f06f6f34d469b1d2e248084d4f3fef10c05e) - `request@2.58.0`: Refactor tunneling logic, and use `extend` instead of - abusing `util._extend`. ([@simov](https://github.com/simov)) -* [`e6c6195`](https://github.com/npm/npm/commit/e6c61954aad42e20eec49745615c7640b2026a6c) - `nock@2.6.0`: Refined interception behavior. - ([@pgte](https://github.com/pgte)) -* [`9583cc3`](https://github.com/npm/npm/commit/9583cc3cb192c2fced006927cfba7cd37b588605) - `fstream-npm@1.0.3`: Ensure that `main` entry in `package.json` is always - included in the bundled package tarball. - ([@coderhaoxin](https://github.com/coderhaoxin)) -* [`df89493`](https://github.com/npm/npm/commit/df894930f2716adac28740b29b2e863170919990) - `fstream@1.0.7` ([@isaacs](https://github.com/isaacs)) -* [`9744049`](https://github.com/npm/npm/commit/974404934758124aa8ae5b54f7d5257c3bd6b588) - `dezalgo@1.0.3`: `dezalgo` should be usable in the browser, and can be now - that `asap` has been upgraded to be browserifiable. - ([@mvayngrib](https://github.com/mvayngrib)) - -### v2.11.3 (2015-06-11): - -This was a very quiet week. This release was done by -[@iarna](https://github.com/iarna), while the rest of the team hangs out at -NodeConf Adventure! - -#### TESTS IN 0.8 FAIL LESS - -* [`5b3b3c2`](https://github.com/npm/npm/commit/5b3b3c2) - [#8491](//github.com/npm/npm/pull/8491) - Updates a test to use only 0.8 compatible features - ([@watilde](https://github.com/watilde)) - -#### THE TREADMILL OF UPDATES NEVER CEASES - -* [`9f439da`](https://github.com/npm/npm/commit/9f439da) - `spdx@0.4.1`: License range updates - ([@kemitchell](https://github.com/kemitchell)) -* [`2dd055b`](https://github.com/npm/npm/commit/2dd055b) - `normalize-package-data@2.2.1`: Fixes a crashing bug when the package.json - `scripts` property is not an object. - ([@iarna](https://github.com/iarna)) -* [`e02e85d`](https://github.com/npm/npm/commit/e02e85d) - `osenv@0.1.2`: Switches to using the `os-tmpdir` module instead of - `os.tmpdir()` for greater consistency in behavior between node versions. - ([@iarna](https://github.com/iarna)) -* [`a6f0265`](https://github.com/npm/npm/commit/a6f0265) - `ini@1.3.4` ([@isaacs](https://github.com/isaacs)) -* [`7395977`](https://github.com/npm/npm/commit/7395977) - `rimraf@2.4.0` ([@isaacs](https://github.com/isaacs)) - -### v2.11.2 (2015-06-04): - -Another small release this week, brought to you by the latest addition to the -CLI team, [@zkat](https://github.com/zkat) (Hi, all!) - -Mostly small documentation tweaks and version updates. Oh! And `npm outdated` -is actually sorted now. Rejoice! - -It's gonna be a while before we get another palindromic version number. Enjoy it -while it lasts. :3 - -#### QUALITY OF LIFE HAS NEVER BEEN BETTER - -* [`31aada4`](https://github.com/npm/npm/commit/31aada4ccc369c0903ff7f233f464955d12c6fe2) - [#8401](https://github.com/npm/npm/issues/8401) `npm outdated` output is just - that much nicer to consume now, due to sorting by name. - ([@watilde](https://github.com/watilde)) -* [`458a919`](https://github.com/npm/npm/commit/458a91925d8b20c5e672ba71a86745aad654abaf) - [#8469](https://github.com/npm/npm/pull/8469) Explicitly set `cwd` for - `preversion`, `version`, and `postversion` scripts. This makes the scripts - findable relative to the root dir. - ([@alexkwolfe](https://github.com/alexkwolfe)) -* [`55d6d71`](https://github.com/npm/npm/commit/55d6d71562e979e745c9db88861cc39f99b9f3ec) - Ensure package name and version are included in display during `npm version` - lifecycle execution. Gets rid of those little `undefined`s in the console. - ([@othiym23](https://github.com/othiym23)) - -#### WORDS HAVE NEVER BEEN QUITE THIS READABLE - -* [`3901e49`](https://github.com/npm/npm/commit/3901e4974c800e7f9fba4a5b2ff88da1126d5ef8) - [#8462](https://github.com/npm/npm/pull/8462) English apparently requires - correspondence between indefinite articles and attached nouns. - ([@Enet4](https://github.com/Enet4)) -* [`5a744e4`](https://github.com/npm/npm/commit/5a744e4b143ef7b2f50c80a1d96fdae4204d452b) - [#8421](https://github.com/npm/npm/pull/8421) The effect of `npm prune`'s - `--production` flag and how to use it have been documented a bit better. - ([@foiseworth](https://github.com/foiseworth)) -* [`eada625`](https://github.com/npm/npm/commit/eada625993485f0a2c5324b06f02bfa0a95ce4bc) - We've updated our `.mailmap` and `AUTHORS` files to make sure credit is given - where credit is due. ([@othiym23](https://github.com/othiym23)) - -#### VERSION NUMBERS HAVE NEVER BEEN BIGGER - -* [`c929fd1`](https://github.com/npm/npm/commit/c929fd1d0604b5878ed05706447e078d3e41f5b3) - `readable-stream@1.1.13`: Manually deduped `v1.1.13` (streams3) to make - deduping more reliable on `npm@<3`. ([@othiym23](https://github.com/othiym23)) -* [`a9b4b78`](https://github.com/npm/npm/commit/a9b4b78dcc85571fd1cdd737903f7f37a5e6a755) - `request@2.57.0`: Replace dependency on IncomingMessage's `.client` with - `.socket` as the former was deprecated in io.js 2.2.0. - ([@othiym23](https://github.com/othiym23)) -* [`4b5e557`](https://github.com/npm/npm/commit/4b5e557a23cdefd521ad154111e3d4dcc81f1cdb) - `abbrev@1.0.7`: Better testing, with coverage. - ([@othiym23](https://github.com/othiym23)) -* [`561affe`](https://github.com/npm/npm/commit/561affee21df9bbea5a47298f2452f533be8f359) - `semver@4.3.6`: .npmignore added for less cruft, and better testing, with coverage. - ([@othiym23](https://github.com/othiym23)) -* [`60aef3c`](https://github.com/npm/npm/commit/60aef3cf5d84d757752db3eb8ede2cb385469e7b) - `graceful-fs@3.0.8`: io.js fixes. - ([@zkat](https://github.com/zkat)) -* [`f8bd453`](https://github.com/npm/npm/commit/f8bd453b1a1c46ba7666cb166595e8a011eae443) - `config-chain@1.1.9`: Added MIT license to package.json - ([@zkat](https://github.com/zkat)) - -### v2.11.1 (2015-05-28): - -This release brought to you from poolside at the Omni Amelia Island Resort and -JSConf 2015, which is why it's so tiny. - -#### CONFERENCE WIFI CAN'T STOP THESE BUG FIXES - -* [`cf109a6`](https://github.com/npm/npm/commit/cf109a682f38a059a994da953d5c1b4aaece5e2f) - [#8381](https://github.com/npm/npm/issues/8381) Documented a subtle gotcha - with `.npmrc`, which is that it needs to have its permissions set such that - only the owner can read or write the file. - ([@colakong](https://github.com/colakong)) -* [`180da67`](https://github.com/npm/npm/commit/180da67c9fa53103d625e2f031626c2453c7ebcd) - [#8365](https://github.com/npm/npm/issues/8365) Git 2.3 adds support for - `GIT_SSH_COMMAND`, which allows you to pass an explicit git command (with, - for example, a specific identity passed in on the command line). - ([@nmalaguti](https://github.com/nmalaguti)) - -#### MY (VIRGIN) PINA COLADA IS GETTING LOW, BETTER UPGRADE THESE DEPENDENCIES - -* [`b72de41`](https://github.com/npm/npm/commit/b72de41c5cc9f0c46d3fa8f062c75bd273641474) - `node-gyp@2.0.0`: Use a newer version of `gyp`, and generally improve support - for Visual Studios and Windows. - ([@TooTallNate](https://github.com/TooTallNate)) -* [`8edbe21`](https://github.com/npm/npm/commit/8edbe210af41e8f248f5bb92c72de92f54fda3b1) - `node-gyp@2.0.1`: Don't crash when Python's version doesn't parse as valid - semver. ([@TooTallNate](https://github.com/TooTallNate)) -* [`ba0e0a8`](https://github.com/npm/npm/commit/ba0e0a845a4f29717aba566b416a27d1a22f5d08) - `glob@5.0.10`: Add coverage to tests. ([@isaacs](https://github.com/isaacs)) -* [`7333701`](https://github.com/npm/npm/commit/7333701b5d4f01673f37d64992c63c4e15864d6d) - `request@2.56.0`: Bug fixes and dependency upgrades. - ([@simov](https://github.com/simov)) - -### v2.11.0 (2015-05-21): - -For the first time in a very long time, we've added new events to the life -cycle used by `npm run-script`. Since running `npm version (major|minor|patch)` -is typically the last thing many developers do before publishing their updated -packages, it makes sense to add life cycle hooks to run tests or otherwise -preflight the package before doing a full publish. Thanks, as always, to the -indefatigable [@watilde](https://github.com/watilde) for yet another great -usability improvement for npm! - -#### FEATURELETS - -* [`b07f7c7`](https://github.com/npm/npm/commit/b07f7c7c1e5021730b3c320f1b3a46e70f8a21ff) - [#7906](https://github.com/npm/npm/issues/7906) - Add new [`scripts`](https://github.com/npm/npm/blob/master/doc/misc/npm-scripts.md) to - allow you to run scripts before and after - the [`npm version`](https://github.com/npm/npm/blob/master/doc/cli/npm-version.md) - command has run. This makes it easy to, for instance, require that your - test suite passes before bumping the version by just adding `"preversion": - "npm test"` to the scripts section of your `package.json`. - ([@watilde](https://github.com/watilde)) -* [`8a46136`](https://github.com/npm/npm/commit/8a46136f42e416cbadb533bcf89d73d681ed421d) - [#8185](https://github.com/npm/npm/issues/8185) - When we get a "not found" error from the registry, we'll now check to see - if the package name you specified is invalid and if so, give you a better - error message. ([@thefourtheye](https://github.com/thefourtheye)) - -#### BUG FIXES - -* [`9bcf573`](https://github.com/npm/npm/commit/9bcf5730bd0316f210dafea898afe9103849cea9) - [#8324](https://github.com/npm/npm/pull/8324) On Windows, when you've configured a - custom `node-gyp`, run it with node itself instead of using the default open action (which - is almost never what you want). ([@bangbang93](https://github.com/bangbang93)) -* [`1da9b04`](https://github.com/npm/npm/commit/1da9b0411d3416c7fca17d08cbbcfca7ae86e92d) - [#7195](https://github.com/npm/npm/issues/7195) - [#7260](https://github.com/npm/npm/issues/7260) `npm-registry-client@6.4.0`: - (Re-)allow publication of existing mixed-case packages (part 1). - ([@smikes](https://github.com/smikes)) -* [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) - [#7195](https://github.com/npm/npm/issues/7195) - [#7260](https://github.com/npm/npm/issues/7260) - `normalize-package-data@2.2.0`: (Re-)allow publication of existing mixed-case - packages (part 2). ([@smikes](https://github.com/smikes)) - -#### DOCUMENTATION IMPROVEMENTS - -* [`f62ee05`](https://github.com/npm/npm/commit/f62ee05333b141539a8e851c620dd2e82ff06860) - [#8314](https://github.com/npm/npm/issues/8314) Update the README to warn - folks away from using the CLI's internal API. For the love of glob, just use a - child process to run the CLI! ([@claycarpenter](https://github.com/claycarpenter)) -* [`1093921`](https://github.com/npm/npm/commit/1093921c04db41ab46db24a170a634a4b2acd8d9) - [#8279](https://github.com/npm/npm/pull/8279) - Update the documentation to note that, yes, you can publish scoped packages to the - public registry now! ([@mantoni](https://github.com/mantoni)) -* [`f87cde5`](https://github.com/npm/npm/commit/f87cde5234a760d3e515ffdaacaed6f5b71dbf44) - [#8292](https://github.com/npm/npm/pull/8292) - Fix typo in an example and grammar in the description in - the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). - ([@vshih](https://github.com/vshih)) -* [`d3526ce`](https://github.com/npm/npm/commit/d3526ceb09a0c29fdb7d4124536ae09057d033e7) - Improve the formatting in - the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). - ([@othiym23](https://github.com/othiym23)) -* [`19fe6d2`](https://github.com/npm/npm/commit/19fe6d20883e28956ff916fe4dae42d73ee6195b) - [#8311](https://github.com/npm/npm/pull/8311) - Update [README.md](https://github.com/npm/npm#readme) to use syntax highlighting in - its code samples and bits of shell scripts. ([@SimenB](https://github.com/SimenB)) - -#### DEPENDENCY UPDATES! ALWAYS AND FOREVER! - -* [`fc52160`](https://github.com/npm/npm/commit/fc52160d0223226fffe4166f42fdfd3b899b3c1e) - [#4700](https://github.com/npm/npm/issues/4700) [#5044](https://github.com/npm/npm/issues/5044) - `init-package-json@1.6.0`: Make entering an invalid version while running `npm init` give - you an immediate error and prompt you to correct it. ([@watilde](https://github.com/watilde)) -* [`738853e`](https://github.com/npm/npm/commit/738853eb1f55636476a2a410c2c04732eec9d51e) - [#7763](https://github.com/npm/npm/issues/7763) `fs-write-stream-atomic@1.0.3`: Fix a bug - where errors would not propagate, making error messages unhelpful. - ([@iarna](https://github.com/iarna)) -* [`6d74a2d`](https://github.com/npm/npm/commit/6d74a2d2ac7f92750cf6a2cfafae1af23b569098) - `npm-package-arg@4.0.1`: Fix tests on windows ([@Bacra](https://github.com)) and with - more recent `hosted-git-info`. ([@iarna](https://github.com/iarna)) -* [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) - `hosted-git-info@2.1.4`: Correct spelling in its documentation. - ([@iarna](https://github.com/iarna)) -* [`d7956ca`](https://github.com/npm/npm/commit/d7956ca17c057d5383ff0d3fc5cf6ac2940b034d) - `glob@5.0.7`: Fix a bug where unusual error conditions could make - further use of the module fail. ([@isaacs](https://github.com/isaacs)) -* [`44f7d74`](https://github.com/npm/npm/commit/44f7d74c5d3181d37da7ea7949c86b344153f8d9) - `tap@1.1.0`: Update to the most recent tap to get a whole host of bug - fixes and integration with [coveralls](https://coveralls.io/). - ([@isaacs](https://github.com/isaacs)) -* [`c21e8a8`](https://github.com/npm/npm/commit/c21e8a8d94bcf0ad79dc583ddc53f8366d4813b3) - `nock@2.2.0` ([@othiym23](https://github.com/othiym23)) - -#### LICENSE FILES FOR THE LICENSE GOD - -* Add missing ISC license file to package ([@kasicka](https://github.com/kasicka)): - * [`aa9908c`](https://github.com/npm/npm/commit/aa9908c20017729673b9d410b77f9a16b7aae8a4) `realize-package-specifier@3.0.1` - * [`23a3b1a`](https://github.com/npm/npm/commit/23a3b1a726b9176c70ce0ccf3cd9d25c54429bdf) `fs-vacuum@1.2.6` - * [`8e04bba`](https://github.com/npm/npm/commit/8e04bba830d4353d84751d21803cd127c96153a7) `dezalgo@1.0.2` - * [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) `hosted-git-info@2.1.4` - * [`6a54917`](https://github.com/npm/npm/commit/6a54917fbd4df995495a95d4b548defd44b77c93) `write-file-atomic@1.1.2` - * [`971f92c`](https://github.com/npm/npm/commit/971f92c4a4e5514217d1e4db45d1ccf71a60ff19) `async-some@1.0.2` - * [`67b50b7`](https://github.com/npm/npm/commit/67b50b7667a42bb3340a660eb2e617e1a554d2d4) `normalize-git-url@1.0.1` - -#### SPDX LICENSE UPDATES - -* Switch license to - [BSD-2-Clause](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) from - plain "BSD" ([@isaacs](https://github.com/isaacs)): - * [`efdb733`](https://github.com/npm/npm/commit/efdb73332eeedcad4c609796929070b62abb37ab) `npm-user-validate@0.1.2` - * [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) `normalize-package-data@2.2.0` -* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from - [BSD](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) - ([@isaacs](https://github.com/isaacs)): - * [`c300956`](https://github.com/npm/npm/commit/c3009565a964f0ead4ac4ab234b1a458e2365f17) `block-stream@0.0.8` - * [`1de1253`](https://github.com/npm/npm/commit/1de125355765fecd31e682ed0ff9d2edbeac0bb0) `lockfile@1.0.1` - * [`0d5698a`](https://github.com/npm/npm/commit/0d5698ab132e376c7aec93ae357c274932116220) `osenv@0.1.1` - * [`2e84921`](https://github.com/npm/npm/commit/2e84921474e1ffb18de9fce4616e73171fa8046d) `abbrev@1.0.6` - * [`872fac9`](https://github.com/npm/npm/commit/872fac9d10c11607e4d0348c08a683b84e64d30b) `chmodr@0.1.1` - * [`01eb7f6`](https://github.com/npm/npm/commit/01eb7f60acba584346ad8aae846657899f3b6887) `chownr@0.0.2` - * [`294336f`](https://github.com/npm/npm/commit/294336f0f31c7b9fe31a50075ed750db6db134d1) `read@1.0.6` - * [`ebdf6a1`](https://github.com/npm/npm/commit/ebdf6a14d17962cdb7128402c53b452f91d44ca7) `graceful-fs@3.0.7` -* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from - [MIT](http://spdx.org/licenses/MIT.html#licenseText) - ([@isaacs](https://github.com/isaacs)): - * [`e5d237f`](https://github.com/npm/npm/commit/e5d237fc0f436dd2a89437ebf8a9632a2e35ccbe) `nopt@3.0.2` - * [`79fef14`](https://github.com/npm/npm/commit/79fef1421b78f044980f0d1bf0e97039b6992710) `rimraf@2.3.4` - * [`22527da`](https://github.com/npm/npm/commit/22527da4816e7c2746cdc0317c5fb4a85152d554) `minimatch@2.0.8` - * [`882ac87`](https://github.com/npm/npm/commit/882ac87a6c4123ca985d7ad4394ea5085e5b0ef5) `lru-cache@2.6.4` - * [`9d9d015`](https://github.com/npm/npm/commit/9d9d015a2e972f68664dda54fbb204db28b21ede) `npmlog@1.2.1` - -### v2.10.1 (2015-05-14): - -#### BUG FIXES & DOCUMENTATION TWEAKS - -* [`dc77520`](https://github.com/npm/npm/commit/dc7752013ffce13a3d3f13e518a0052c22fc1158) - When getting back a 404 from a request to a private registry that uses a - registry path that extends past the root - (`http://registry.enterprise.co/path/to/registry`), display the name of the - nonexistent package, rather than the first element in the registry API path. - Sorry, Artifactory users! ([@hayes](https://github.com/hayes)) -* [`f70dea9`](https://github.com/npm/npm/commit/f70dea9b4766f6eaa55012c3e8087e9cb04fd4ce) - Make clearer that `--registry` can be used on a per-publish basis to push a - package to a non-default registry. ([@mischkl](https://github.com/mischkl)) -* [`a3e26f5`](https://github.com/npm/npm/commit/a3e26f5b4465991a941a325468ab7725670d2a94) - Did you know that GitHub shortcuts can have commit-ishes included - (`org/repo#branch`)? They can! ([@iarna](https://github.com/iarna)) -* [`0e2c091`](https://github.com/npm/npm/commit/0e2c091a539b61fdc60423b6bbaaf30c24e4b1b8) - Some errors from `readPackage` were being swallowed, potentially leading to - invalid package trees on disk. ([@smikes](https://github.com/smikes)) - -#### DEPENDENCY UPDATES! STILL! MORE! AGAIN! - -* [`0b901ad`](https://github.com/npm/npm/commit/0b901ad0811d84dda6ca0755a9adc8d47825edd0) - `lru-cache@2.6.3`: Removed some cruft from the published package. - ([@isaacs](https://github.com/isaacs)) -* [`d713e0b`](https://github.com/npm/npm/commit/d713e0b14930c563e3fdb6ac6323bae2a8924652) - `mkdirp@0.5.1`: Made compliant with `standard`, dropped support for Node 0.6, - added (Travis) support for Node 0.12 and io.js. - ([@isaacs](https://github.com/isaacs)) -* [`a2d6578`](https://github.com/npm/npm/commit/a2d6578b6554c5c9d48fe2006751759f4da57520) - `glob@1.0.3`: Updated to use `tap@1`. ([@isaacs](https://github.com/isaacs)) -* [`64cd1a5`](https://github.com/npm/npm/commit/64cd1a570aaa5f24ccba190948ec9456297c97f5) - `fstream@ 1.0.6`: Made compliant with [`standard`](http://npm.im/standard) - (done by [@othiym23](https://github.com/othiym23), and then debugged and - fixed by [@iarna](https://github.com/iarna)), and license changed to ISC. - ([@othiym23](https://github.com/othiym23) / - [@iarna](https://github.com/iarna)) -* [`b527a7c`](https://github.com/npm/npm/commit/b527a7c2ba3c4002f443dd2c536ff4ff41a38b86) - `which@1.1.1`: Callers can pass in their own `PATH` instead of relying on - `process.env`. ([@isaacs](https://github.com/isaacs)) - -### v2.10.0 (2015-05-8): - -#### THE IMPLICATIONS ARE MORE PROFOUND THAN THEY APPEAR - -If you've done much development in The Enterprise®™, you know that keeping -track of software licenses is far more important than one might expect / hope / -fear. Tracking licenses is a hassle, and while many (if not most) of us have -(reluctantly) gotten around to setting a license to use by default with all our -new projects (even if it's just WTFPL), that's about as far as most of us think -about it. In big enterprise shops, ensuring that projects don't inadvertently -use software with unacceptably encumbered licenses is serious business, and -developers spend a surprising (and appalling) amount of time ensuring that -licensing is covered by writing automated checkers and other license auditing -tools. - -The Linux Foundation has been working on a machine-parseable syntax for license -expressions in the form of [SPDX](https://spdx.org/), an appropriately -enterprisey acronym. IP attorney and JavaScript culture hero [Kyle -Mitchell](http://kemitchell.com/) has put a considerable amount of effort into -bringing SPDX to JavaScript and Node. He's written -[`spdx.js`](https://github.com/kemitchell/spdx.js), a JavaScript SPDX -expression parser, and has integrated it into npm in a few different ways. - -For you as a user of npm, this means: - -* npm now has proper support for dual licensing in `package.json`, due to - SPDX's compound expression syntax. Run `npm help package.json` for details. -* npm will warn you if the `package.json` for your project is either missing a - `"license"` field, or if the value of that field isn't a valid SPDX - expression (pro tip: `"BSD"` becomes `"BSD-2-Clause"` in SPDX (unless you - really want one of its variants); `"MIT"` and `"ISC"` are fine as-is; the - [full list](https://github.com/shinnn/spdx-license-ids/blob/master/spdx-license-ids.json) - is its own package). -* `npm init` now demands that you use a valid SPDX expression when using it - interactively (pro tip: I mostly use `npm init -y`, having previously run - `npm config set init.license=MIT` / `npm config set init.author.email=foo` / - `npm config set init.author.name=me`). -* The documentation for `package.json` has been updated to tell you how to use - the `"license"` field properly with SPDX. - -In general, this shouldn't be a big deal for anybody other than people trying -to run their own automated license validators, but in the long run, if -everybody switches to this format, many people's lives will be made much -simpler. I think this is an important improvement for npm and am very thankful -to Kyle for taking the lead on this. Also, even if you think all of this is -completely stupid, just [choose a license](http://en.wikipedia.org/wiki/License-free_software) -anyway. Future you will thank past you someday, unless you are -[djb](http://cr.yp.to/), in which case you are djb, and more power to you. - -* [`8669f7d`](https://github.com/npm/npm/commit/8669f7d88c472ccdd60e140106ac43cca636a648) - [#8179](https://github.com/npm/npm/issues/8179) Document how to use SPDX in - `license` stanzas in `package.json`, including how to migrate from old busted - license declaration arrays to fancy new compound-license clauses. - ([@kemitchell](https://github.com/kemitchell)) -* [`98ad98c`](https://github.com/npm/npm/commit/98ad98cb11f3d3ba29a488ef1ab050b066d9c7f6) - [#8197](https://github.com/npm/npm/issues/8197) `init-package-json@1.5.0` - Ensure that packages bootstrapped with `npm init` use an SPDX-compliant - license expression. ([@kemitchell](https://github.com/kemitchell)) -* [`2ad3905`](https://github.com/npm/npm/commit/2ad3905e9139b0be2b22accf707b814469de813e) - [#8197](https://github.com/npm/npm/issues/8197) - `normalize-package-data@2.1.0`: Warn when a package is missing a license - declaration, or using a license expression that isn't valid SPDX. - ([@kemitchell](https://github.com/kemitchell)) -* [`127bb73`](https://github.com/npm/npm/commit/127bb73ccccc59a1267851c702d8ebd3f3a97e81) - [#8197](https://github.com/npm/npm/issues/8197) `tar@2.1.1`: Switch from - `BSD` to `ISC` for license, where the latter is valid SPDX. - ([@othiym23](https://github.com/othiym23)) -* [`e9a933a`](https://github.com/npm/npm/commit/e9a933a9148180d9d799f99f4154f5110ff2cace) - [#8197](https://github.com/npm/npm/issues/8197) `once@1.3.2`: Switch from - `BSD` to `ISC` for license, where the latter is valid SPDX. - ([@othiym23](https://github.com/othiym23)) -* [`412401f`](https://github.com/npm/npm/commit/412401fb6a19b18f3e02d97a24d4dafed650c186) - [#8197](https://github.com/npm/npm/issues/8197) `semver@4.3.4`: Switch from - `BSD` to `ISC` for license, where the latter is valid SPDX. - ([@othiym23](https://github.com/othiym23)) - -As a corollary to the previous changes, I've put some work into making `npm -install` spew out fewer pointless warnings about missing values in transitive -dependencies. From now on, npm will only warn you about missing READMEs, -license fields, and the like for top-level projects (including packages you -directly install into your application, but we may relax that eventually). - -Practically _nobody_ liked having those warnings displayed for child -dependencies, for the simple reason that there was very little that anybody -could _do_ about those warnings, unless they happened to be the maintainers of -those dependencies themselves. Since many, many projects don't have -SPDX-compliant licenses, the number of warnings reached a level where they ran -the risk of turning into a block of visual noise that developers (read: me, and -probably you) would ignore forever. - -So I fixed it. If you still want to see the messages about child dependencies, -they're still there, but have been pushed down a logging level to `info`. You -can display them by running `npm install -d` or `npm install --loglevel=info`. - -* [`eb18245`](https://github.com/npm/npm/commit/eb18245f55fb4cd62a36867744bcd1b7be0a33e2) - Only warn on normalization errors for top-level dependencies. Transitive - dependency validation warnings are logged at `info` level. - ([@othiym23](https://github.com/othiym23)) - -#### BUG FIXES - -* [`e40e809`](https://github.com/npm/npm/commit/e40e8095d2bc9fa4eb8f01aa22067e0068fa8a54) - `tap@1.0.1`: TAP: The Next Generation. Fix up many tests to they work - properly with the new major version of `node-tap`. Look at all the colors! - ([@isaacs](https://github.com/isaacs)) -* [`f9314e9`](https://github.com/npm/npm/commit/f9314e97d26532c0ef2b03e98f3ed300b7cd5026) - `nock@1.9.0`: Minor tweaks and bug fixes. ([@pgte](https://github.com/pgte)) -* [`45c2b1a`](https://github.com/npm/npm/commit/45c2b1aaa051733fa352074994ae6e569fd51e8b) - [#8187](https://github.com/npm/npm/issues/8187) `npm ls` wasn't properly - recognizing dependencies installed from GitHub repositories as git - dependencies, and so wasn't displaying them as such. - ([@zornme](https://github.com/zornme)) -* [`1ab57c3`](https://github.com/npm/npm/commit/1ab57c38116c0403965c92bf60121f0f251433e4) - In some cases, `npm help` was using something that looked like a regular - expression where a glob pattern should be used, and vice versa. - ([@isaacs](https://github.com/isaacs)) - -### v2.9.1 (2015-04-30): - -#### WOW! MORE GIT FIXES! YOU LOVE THOSE! - -The first item below is actually a pretty big deal, as it fixes (with a -one-word change and a much, much longer test case (thanks again, -[@iarna](https://github.com/iarna))) a regression that's been around for months -now. If you're depending on multiple branches of a single git dependency in a -single project, you probably want to check out `npm@2.9.1` and verify that -things (again?) work correctly in your project. - -* [`178a6ad`](https://github.com/npm/npm/commit/178a6ad540215820d16217465a5f220d8c95a313) - [#7202](https://github.com/npm/npm/issues/7202) When caching git - dependencies, do so by the whole URL, including the branch name, so that if a - single application depends on multiple branches from the same repository (in - practice, multiple version tags), every install is of the correct version, - instead of reusing whichever branch the caching process happened to check out - first. ([@iarna](https://github.com/iarna)) -* [`63b79cc`](https://github.com/npm/npm/commit/63b79ccde092a9cb3b1f34abe43e1d2ba69c0dbf) - [#8084](https://github.com/npm/npm/issues/8084) Ensure that Bitbucket, - GitHub, and Gitlab dependencies are installed the same way as non-hosted git - dependencies, fixing `npm install --link`. - ([@laiso](https://github.com/laiso)) - -#### DOCUMENTATION FIXES AND TWEAKS - -These changes may seem simple and small (except Lin's fix to the package name -restrictions, which was more an egregious oversight on our part), but cleaner -documentation makes npm significantly more pleasant to use. I really appreciate -all the typo fixes, clarifications, and formatting tweaks people send us, and -am delighted that we get so many of these pull requests. Thanks, everybody! - -* [`ca478dc`](https://github.com/npm/npm/commit/ca478dcaa29b8f07cd6fe515a3c4518166819291) - [#8137](https://github.com/npm/npm/issues/8137) Somehow, we had failed to - clearly document the full restrictions on package names. - [@linclark](https://github.com/linclark) has now fixed that, although we will - take with us to our graves the reasons why the maximum package name length is 214 - characters (well, OK, it was that that was the longest name in the registry - when we decided to put a cap on the name length). - ([@linclark](https://github.com/linclark)) -* [`b574076`](https://github.com/npm/npm/commit/b5740767c320c1eff3576a8d63952534a0fbb936) - [#8079](https://github.com/npm/npm/issues/8079) Make the `npm shrinkwrap` - documentation use code formatting for examples consistently. It would be - great to do this for more commands HINT HINT. - ([@RichardLitt](https://github.com/RichardLitt)) -* [`1ff636e`](https://github.com/npm/npm/commit/1ff636e2db3852a53e38c866fed7eafdacd307fc) - [#8105](https://github.com/npm/npm/issues/8105) Document that the global - `npmrc` goes in `$PREFIX/etc/npmrc`, instead of `$PREFIX/npmrc`. - ([@anttti](https://github.com/anttti)) -* [`c3f2f7c`](https://github.com/npm/npm/commit/c3f2f7c299342e1c1eccc55a976a63c607f51621) - [#8127](https://github.com/npm/npm/issues/8127) Document how to use `npm run - build` directly (hint: it's different from `npm build`!). - ([@mikemaccana](https://github.com/mikemaccana)) -* [`873e467`](https://github.com/npm/npm/commit/873e46757e1986761b15353f94580a071adcb383) - [#8069](https://github.com/npm/npm/issues/8069) Take the old, dead npm - mailing list address out of `package.json`. It seems that people don't have - much trouble figuring out how to report errors to npm. - ([@robertkowalski](https://github.com/robertkowalski)) - -#### ENROBUSTIFICATIONMENT - -* [`5abfc9c`](https://github.com/npm/npm/commit/5abfc9c9017da714e47a3aece750836b4f9af6a9) - [#7973](https://github.com/npm/npm/issues/7973) `npm run-script` completion - will only suggest run scripts, instead of including dependencies. If for some - reason you still wanted it to suggest dependencies, let us know. - ([@mantoni](https://github.com/mantoni)) -* [`4b564f0`](https://github.com/npm/npm/commit/4b564f0ce979dc74c09604f4d46fd25a2ee63804) - [#8081](https://github.com/npm/npm/issues/8081) Use `osenv` to parse the - environment's `PATH` in a platform-neutral way. - ([@watilde](https://github.com/watilde)) -* [`a4b6238`](https://github.com/npm/npm/commit/a4b62387b41848818973eeed056fd5c6570274f3) - [#8094](https://github.com/npm/npm/issues/8094) When we refactored the - configuration code to split out checking for IPv4 local addresses, we - inadvertently completely broke it by failing to return the values. In - addition, just the call to `os.getInterfaces()` could throw on systems where - querying the network configuration requires elevated privileges (e.g. Amazon - Lambda). Add the return, and trap errors so they don't cause npm to explode. - Thanks to [@mhart](https://github.com/mhart) for bringing this to our - attention! ([@othiym23](https://github.com/othiym23)) - -#### DEPENDENCY UPDATES WAIT FOR NO SOPHONT - -* [`000cd8b`](https://github.com/npm/npm/commit/000cd8b52104942ac3404f0ad0651d82f573da37) - `rimraf@2.3.3`: More informative assertions on argument validation failure. - ([@isaacs](https://github.com/isaacs)) -* [`530a2e3`](https://github.com/npm/npm/commit/530a2e369128270f3e098f0e9be061533003b0eb) - `lru-cache@2.6.2`: Revert to old key access-time behavior, as it was correct - all along. ([@isaacs](https://github.com/isaacs)) -* [`d88958c`](https://github.com/npm/npm/commit/d88958ca02ce81b027b9919aec539d0145875a59) - `minimatch@2.0.7`: Feature detection and test improvements. - ([@isaacs](https://github.com/isaacs)) -* [`3fa39e4`](https://github.com/npm/npm/commit/3fa39e4d492609d5d045033896dcd99f7b875329) - `nock@1.7.1` ([@pgte](https://github.com/pgte)) - -### v2.9.0 (2015-04-23): - -This week was kind of a breather to concentrate on fixing up the tests on the -`multi-stage` branch, and not mess with git issues for a little while. -Unfortunately, There are now enough severe git issues that we'll probably have -to spend another couple weeks tackling them. In the meantime, enjoy these two -small features. They're just enough to qualify for a semver-minor bump: - -#### NANOFEATURES - -* [`2799322`](https://github.com/npm/npm/commit/279932298ce5b589c5eea9439ac40b88b99c6a4a) - [#7426](https://github.com/npm/npm/issues/7426) Include local modules in `npm - outdated` and `npm update`. ([@ArnaudRinquin](https://github.com/ArnaudRinquin)) -* [`2114862`](https://github.com/npm/npm/commit/21148620fa03a582f4ec436bb16bd472664f2737) - [#8014](https://github.com/npm/npm/issues/8014) The prefix used before the - version on version tags is now configurable via `tag-version-prefix`. Be - careful with this one and read the docs before using it. - ([@kkragenbrink](https://github.com/kkragenbrink)) - -#### OTHER MINOR TWEAKS - -* [`18ce0ec`](https://github.com/npm/npm/commit/18ce0ecd2d94ad3af01e997f1396515892dd363c) - [#3032](https://github.com/npm/npm/issues/3032) `npm unpublish` will now use - the registry set in `package.json`, just like `npm publish`. This only - applies, for now, when unpublishing the entire package, as unpublishing a - single version requires the name be included on the command line and - therefore doesn't read from `package.json`. ([@watilde](https://github.com/watilde)) -* [`9ad2100`](https://github.com/npm/npm/commit/9ad210042242e51d52b2a8b633d8e59248f5faa4) - [#8008](https://github.com/npm/npm/issues/8008) Once again, when considering - what to install on `npm install`, include `devDependencies`. - ([@smikes](https://github.com/smikes)) -* [`5466260`](https://github.com/npm/npm/commit/546626059909dca1906454e820ca4e315c1795bd) - [#8003](https://github.com/npm/npm/issues/8003) Clarify the documentation - around scopes to make it easier to understand how they support private - packages. ([@smikes](https://github.com/smikes)) - -#### DEPENDENCIES WILL NOT STOP UNTIL YOU ARE VERY SLEEPY - -* [`faf65a7`](https://github.com/npm/npm/commit/faf65a7bbb2fad13216f64ed8f1243bafe743f97) - `init-package-json@1.4.2`: If there are multiple validation errors and - warnings, ensure they all get displayed (includes a rad new way of testing - `init-package-json` contributed by - [@michaelnisi](https://github.com/michaelnisi)). - ([@MisumiRize](https://github.com/MisumiRize)) -* [`7f10f38`](https://github.com/npm/npm/commit/7f10f38d29a8423d7cde8103fa7b64ac728da1e0) - `editor@1.0.0`: `1.0.0` is literally more than `0.1.0` (no change aside from - version number). ([@substack](https://github.com/substack)) -* [`4979af3`](https://github.com/npm/npm/commit/4979af3fcae5a3962383b7fdad3162381e62eefe) - [#6805](https://github.com/npm/npm/issues/6805) `npm-registry-client@6.3.3`: - Decode scoped package names sent by the registry so they look nicer. - ([@mmalecki](https://github.com/mmalecki)) - -### v2.8.4 (2015-04-16): - -This is the fourth release of npm this week, so it's mostly just landing a few -small outstanding PRs on dependencies and some tiny documentation tweaks. -`npm@2.8.3` is where the real action is. - -* [`ee2bd77`](https://github.com/npm/npm/commit/ee2bd77f3c64d38735d1d31028224a5c40422a9b) - [#7983](https://github.com/npm/npm/issues/7983) `tar@2.1.0`: Better error - reporting in corrupted tar files, and add support for the `fromBase` flag - (rescued from the dustbin of history by - [@deanmarano](https://github.com/deanmarano)). - ([@othiym23](https://github.com/othiym23)) -* [`d8eee6c`](https://github.com/npm/npm/commit/d8eee6cf9d2ff7aca68dfaed2de76824a3e0d9af) - `init-package-json@1.4.1`: Add support for a default author, and only add - scope to a package name once. ([@othiym23](https://github.com/othiym23)) -* [`4fc5d98`](https://github.com/npm/npm/commit/4fc5d98b785f601c60d4dc0a2c8674f0cccf6262) - `lru-cache@2.6.1`: Small tweaks to cache value aging and entry counting that - are irrelevant to npm. ([@isaacs](https://github.com/isaacs)) -* [`1fe5840`](https://github.com/npm/npm/commit/1fe584089f5bef133de5518aa26eaf6064be2bf7) - [#7946](https://github.com/npm/npm/issues/7946) Make `npm init` text - friendlier. ([@sandfox](https://github.com/sandfox)) - -### v2.8.3 (2015-04-15): - -#### TWO SMALL GIT TWEAKS - -This is the last of a set of releases intended to ensure npm's git support is -robust enough that we can stop working on it for a while. These fixes are -small, but prevent a common crasher and clear up one of the more confusing -error messages coming out of npm when working with repositories hosted on git. - -* [`387f889`](https://github.com/npm/npm/commit/387f889c0e8fb617d9cc9a42ed0a3ec49424ab5d) - [#7961](https://github.com/npm/npm/issues/7961) Ensure that hosted git SSH - URLs always have a valid protocol when stored in `resolved` fields in - `npm-shrinkwrap.json`. ([@othiym23](https://github.com/othiym23)) -* [`394c2f5`](https://github.com/npm/npm/commit/394c2f5a1227232c0baf42fbba1402aafe0d6ffb) - Switch the order in which hosted Git providers are checked to `git:`, - `git+https:`, then `git+ssh:` (from `git:`, `git+ssh:`, then `git+https:`) in - an effort to go from most to least likely to succeed, to make for less - confusing error message. ([@othiym23](https://github.com/othiym23)) - -### v2.8.2 (2015-04-14): - -#### PEACE IN OUR TIME - -npm has been having an issue with CouchDB's web server since the release -of io.js and Node.js 0.12.0 that has consumed a huge amount of my time -to little visible effect. Sam Mikes picked up the thread from me, and -after a [_lot_ of effort](https://github.com/npm/npm/issues/7699#issuecomment-93091111) -figured out that ultimately there are probably a couple problems with -the new HTTP Agent keep-alive handling in new versions of Node. In -addition, `npm-registry-client` was gratuitously sending a body along -with a GET request which was triggering the bugs. Sam removed about 10 bytes from -one file in `npm-registry-client`, and this problem, which has been bugging us for months, -completely went away. - -In conclusion, Sam Mikes is great, and anybody using a private registry -hosted on CouchDB should thank him for his hard work. Also, thanks to -the community at large for pitching in on this bug, which has been -around for months now. - -* [`431c3bf`](https://github.com/npm/npm/commit/431c3bf6cdec50f9f0c735f478cb2f3f337d3313) - [#7699](https://github.com/npm/npm/issues/7699) `npm-registry-client@6.3.2`: - Don't send body with HTTP GET requests when logging in. - ([@smikes](https://github.com/smikes)) - -### v2.8.1 (2015-04-12): - -#### CORRECTION: NPM'S GIT INTEGRATION IS DOING OKAY - -A [helpful bug report](https://github.com/npm/npm/issues/7872#issuecomment-91809553) -led to another round of changes to -[`hosted-git-info`](https://github.com/npm/hosted-git-info/commit/827163c74531b69985d1ede7abced4861e7b0cd4), -some additional test-writing, and a bunch of hands-on testing against actual -private repositories. While the complexity of npm's git dependency handling is -nearly fractal (because npm is very complex, and git is even more complex), -it's feeling way more solid than it has for a while. We think this is a -substantial improvement over what we had before, so give `npm@2.8.1` a shot if -you have particularly complex git use cases and -[let us know](https://github.com/npm/npm/issues/new) how it goes. - -(NOTE: These changes mostly affect cloning and saving references to packages -hosted in git repositories, and don't address some known issues with things -like lifecycle scripts not being run on npm dependencies. Work continues on -other issues that affect parity between git and npm registry packages.) - -* [`66377c6`](https://github.com/npm/npm/commit/66377c6ece2cf4d53d9a618b7d9824e1452bc293) - [#7872](https://github.com/npm/npm/issues/7872) `hosted-git-info@2.1.2`: Pass - through credentials embedded in SSH and HTTPs git URLs. - ([@othiym23](https://github.com/othiym23)) -* [`15efe12`](https://github.com/npm/npm/commit/15efe124753257728a0ddc64074fa5a4b9c2eb30) - [#7872](https://github.com/npm/npm/issues/7872) Use the new version of - `hosted-git-info` to pass along credentials embedded in git URLs. Test it. - Test it a lot. ([@othiym23](https://github.com/othiym23)) - -#### SCOPED DEPENDENCIES AND PEER DEPENDENCIES: NOT QUITE REESE'S - -Big thanks to [@ewie](https://github.com/ewie) for identifying an issue with -how npm was handling `peerDependencies` that were implicitly installed from the -`package.json` files of scoped dependencies. This -[will be a moot point](https://github.com/npm/npm/issues/6565#issuecomment-74971689) -with the release of `npm@3`, but until then, it's important that -`peerDependency` auto-installation work as expected. - -* [`b027319`](https://github.com/npm/npm/commit/b0273190c71eba14395ddfdd1d9f7ba625297523) - [#7920](https://github.com/npm/npm/issues/7920) Scoped packages with - `peerDependencies` were installing the `peerDependencies` into the wrong - directory. ([@ewie](https://github.com/ewie)) -* [`649e31a`](https://github.com/npm/npm/commit/649e31ae4fd02568bae5dc6b4ea783431ce3d63e) - [#7920](https://github.com/npm/npm/issues/7920) Test `peerDependency` - installs involving scoped packages using `npm-package-arg` instead of simple - path tests, for consistency. ([@othiym23](https://github.com/othiym23)) - -#### MAKING IT EASIER TO WRITE NPM TESTS, VERSION 0.0.1 - -[@iarna](https://github.com/iarna) and I -([@othiym23](https://github.com/othiym23)) have been discussing a -[candidate plan](https://github.com/npm/npm/wiki/rewriting-npm's-tests:-a-plan-maybe) -for improving npm's test suite, with the goal of making it easier for new -contributors to get involved with npm by reducing the learning curve -necessary to be able to write good tests for proposed changes. This is the -first substantial piece of that effort. Here's what the commit message for -[`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) -had to say about this work: - -> It's too difficult for npm contributors to figure out what the conventional -> style is for tests. Part of the problem is that the documentation in -> CONTRIBUTING.md is inadequate, but another important factor is that the tests -> themselves are written in a variety of styles. One of the most notable -> examples of this is the fact that many tests use fixture directories to store -> precooked test scenarios and package.json files. -> -> This had some negative consequences: -> -> * tests weren't idempotent -> * subtle dependencies between tests existed -> * new tests get written in this deprecated style because it's not -> obvious that the style is out of favor -> * it's hard to figure out why a lot of those directories existed, -> because they served a variety of purposes, so it was difficult to -> tell when it was safe to remove them -> -> All in all, the fixture directories were a major source of technical debt, and -> cleaning them up, while time-consuming, makes the whole test suite much more -> approachable, and makes it more likely that new tests written by outside -> contributors will follow a conventional style. To support that, all of the -> tests touched by this changed were cleaned up to pass the `standard` style -> checker. - -And here's a little extra context from a comment I left on [#7929](https://github.com/npm/npm/issues/7929): - -> One of the other things that encouraged me was looking at this -> [presentation on technical debt](http://www.slideshare.net/nnja/pycon-2015-technical-debt-the-monster-in-your-closet) -> from Pycon 2015, especially slide 53, which I interpreted in terms of -> difficulty getting new contributors to submit patches to an OSS project like -> npm. npm has a long ways to go, but I feel good about this change. - -* [`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) - [#7929](https://github.com/npm/npm/issues/7929) Eliminate fixture directories - from `test/tap`, leaving each test self-contained. - ([@othiym23](https://github.com/othiym23)) -* [`4928d30`](https://github.com/npm/npm/commit/4928d30140821c63e03fffed73f8d88ebdc43710) - [#7929](https://github.com/npm/npm/issues/7929) Move fixture files from - `test/tap/*` to `test/fixtures`. ([@othiym23](https://github.com/othiym23)) -* [`e925deb`](https://github.com/npm/npm/commit/e925debca91092a814c1a00933babc3a8cf975be) - [#7929](https://github.com/npm/npm/issues/7929) Tweak the run scripts to stop - slaughtering the CPU on doc rebuild. - ([@othiym23](https://github.com/othiym23)) -* [`65bf7cf`](https://github.com/npm/npm/commit/65bf7cffaf91c426b676c47529eee796f8b8b75c) - [#7923](https://github.com/npm/npm/issues/7923) Use an alias of scripts and - run-scripts in `npm run test-all` ([@watilde](https://github.com/watilde)) -* [`756a3fb`](https://github.com/npm/npm/commit/756a3fbb852a2469afe706635ed88d22c37743e5) - [#7923](https://github.com/npm/npm/issues/7923) Sync timeout time of `npm - run-script test-all` to be the same as `test` and `tap` scripts. - ([@watilde](https://github.com/watilde)) -* [`8299b5f`](https://github.com/npm/npm/commit/8299b5fb6373354a7fbaab6f333863758812ae90) - Set a timeout for tap tests for `npm run-script test-all`. - ([@othiym23](https://github.com/othiym23)) - -#### THE EVER-BEATING DRUM OF DEPENDENCY UPDATES - -* [`d90d0b9`](https://github.com/npm/npm/commit/d90d0b992acbf62fd5d68debf9d1dbd6cfa20804) - [#7924](https://github.com/npm/npm/issues/7924) Remove `child-process-close`, - as it was included for Node 0.6 compatibility, and npm no longer supports - 0.6. ([@robertkowalski](https://github.com/robertkowalski)) -* [`16427c1`](https://github.com/npm/npm/commit/16427c1f3ea3d71ee753c62eb4c2663c7b32b84f) - `lru-cache@2.5.2`: More accurate updating of expiry times when `maxAge` is - set. ([@isaacs](https://github.com/isaacs)) -* [`03cce83`](https://github.com/npm/npm/commit/03cce83b64344a9e0fe036dce214f4d68cfcc9e7) - `nock@1.6.0`: Mocked network error handling. - ([@pgte](https://github.com/pgte)) -* [`f93b1f0`](https://github.com/npm/npm/commit/f93b1f0b7eb5d1b8a7967e837bbd756db1091d00) - `glob@5.0.5`: Use `path-is-absolute` polyfill, allowing newer Node.js and - io.js versions to use `path.isAbsolute()`. - ([@sindresorhus](https://github.com/sindresorhus)) -* [`a70d694`](https://github.com/npm/npm/commit/a70d69495a6e96997e64855d9e749d943ee6d64f) - `request@2.55.0`: Bug fixes and simplification. - ([@simov](https://github.com/simov)) -* [`2aecc6f`](https://github.com/npm/npm/commit/2aecc6f4083526feeb14615b4e5484edc66175b5) - `columnify@1.5.1`: Switch to using babel from 6to5. - ([@timoxley](https://github.com/timoxley)) - -### v2.8.0 (2015-04-09): - -#### WE WILL NEVER BE DONE FIXING NPM'S GIT SUPPORT - -If you look at [the last release's release -notes](https://github.com/npm/npm/blob/master/CHANGELOG.md#git-mean-git-tuff-git-all-the-way-away-from-my-stuff), -you will note that they confidently assert that it's perfectly OK to force all -GitHub URLs through the same `git:` -> `git+ssh:` fallback flow for cloning. It -turns out that many users depend on `git+https:` URLs in their build -environments because they use GitHub auth tokens instead of SSH keys. Also, in -some cases you just want to be able to explicitly say how a given dependency -should be cloned from GitHub. - -Because of the way we resolved the inconsistency in GitHub shorthand handling -[before](https://github.com/npm/npm/blob/master/CHANGELOG.md#bug-fixes-1), this -turned out to be difficult to work around. So instead of hacking around it, we -completely redid how git is handled within npm and its attendant packages. -Again. This time, we changed things so that `normalize-package-data` and -`read-package-json` leave more of the git logic to npm itself, which makes -handling shorthand syntax consistently much easier, and also allows users to -resume using explicit, fully-qualified git URLs without npm messing with them. - -Here's a summary of what's changed: - -* Instead of converting the GitHub shorthand syntax to a `git+ssh:`, `git:`, or - `git+https:` URL and saving that, save the shorthand itself to - `package.json`. -* If presented with shortcuts, try cloning via the git protocol, SSH, and HTTPS - (in that order). -* No longer prompt for credentials -- it didn't work right with the spinner, - and wasn't guaranteed to work anyway. We may experiment with doing this a - better way in the future. Users can override this by setting `GIT_ASKPASS` in - their environment if they want to experiment with interactive cloning, but - should also set `--no-spin` on the npm command line (or run `npm config set - spin=false`). -* **EXPERIMENTAL FEATURE**: Add support for `github:`, `gist:`, `bitbucket:`, - and `gitlab:` shorthand prefixes. GitHub shortcuts will continue to be - normalized to `org/repo` instead of being saved as `github:org/repo`, but - `gitlab:`, `gist:`, and `bitbucket:` prefixes will be used on the command - line and from `package.json`. BE CAREFUL WITH THIS. `package.json` files - published with the new shorthand syntax can _only_ be read by `npm@2.8.0` and - later, and this feature is mostly meant for playing around with it. If you - want to save git dependencies in a form that older versions of npm can read, - use `--save-exact`, which will save the git URL and resolved commit hash of - the head of the branch in a manner similar to the way that `--save-exact` - pins versions for registry dependencies. This is documented (so check `npm - help install` for details), but we're not going to make a lot of noise about - it until it has a chance to bake in a little more. - -It is [@othiym23](https://github.com/othiym23)'s sincere hope that this will -resolve all of the inconsistencies users were seeing with GitHub and git-hosted -packages, but given the level of change here, that may just be a fond wish. -Extra testing of this change is requested. - -* [`6b0f588`](https://github.com/npm/npm/commit/6b0f58877f37df9904490ffbaaad33862bd36dce) - [#7867](https://github.com/npm/npm/issues/7867) Use git shorthand and git - URLs as presented by user. Support new `hosted-git-info` shortcut syntax. - Save shorthand in `package.json`. Try cloning via `git:`, `git+ssh:`, and - `git+https:`, in that order, when supported by the underlying hosting - provider. ([@othiym23](https://github.com/othiym23)) -* [`75d4267`](https://github.com/npm/npm/commit/75d426787869d54ca7400408f562f971b34649ef) - [#7867](https://github.com/npm/npm/issues/7867) Document new GitHub, GitHub - gist, Bitbucket, and GitLab shorthand syntax. - ([@othiym23](https://github.com/othiym23)) -* [`7d92c75`](https://github.com/npm/npm/commit/7d92c7592998d90ec883fa989ca74f04ec1b93de) - [#7867](https://github.com/npm/npm/issues/7867) When `--save-exact` is used - with git shorthand or URLs, save the fully-resolved URL, with branch name - resolved to the exact hash for the commit checked out. - ([@othiym23](https://github.com/othiym23)) -* [`9220e59`](https://github.com/npm/npm/commit/9220e59f8def8c82c6d331a39ba29ad4c44e3a9b) - [#7867](https://github.com/npm/npm/issues/7867) Ensure that non-prefixed and - non-normalized GitHub shortcuts are saved to `package.json`. - ([@othiym23](https://github.com/othiym23)) -* [`dd398e9`](https://github.com/npm/npm/commit/dd398e98a8eba27eeba84378200da3d078fdf980) - [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.1`: - Ensure that `gist:` shorthand survives being round-tripped through - `package.json`. ([@othiym23](https://github.com/othiym23)) -* [`33d1420`](https://github.com/npm/npm/commit/33d1420bf2f629332fceb2ac7e174e63ac48f96a) - [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.0`: Add - support for auth embedded directly in git URLs. - ([@othiym23](https://github.com/othiym23)) -* [`23a1d5a`](https://github.com/npm/npm/commit/23a1d5a540e8db27f5cd0245de7c3694e2bddad1) - [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.0.2`: Make - it possible to determine in which form a hosted git URL was passed. - ([@iarna](https://github.com/iarna)) -* [`eaf75ac`](https://github.com/npm/npm/commit/eaf75acb718611ad5cfb360084ec86938d9c66c5) - [#7867](https://github.com/npm/npm/issues/7867) - `normalize-package-data@2.0.0`: Normalize GitHub specifiers so they pass - through shortcut syntax and preserve explicit URLs. - ([@iarna](https://github.com/iarna)) -* [`95e0535`](https://github.com/npm/npm/commit/95e0535e365e0aca49c634dd2061a0369b0475f1) - [#7867](https://github.com/npm/npm/issues/7867) `npm-package-arg@4.0.0`: Add - git URL and shortcut to hosted git spec and use `hosted-git-info@2.0.2`. - ([@iarna](https://github.com/iarna)) -* [`a808926`](https://github.com/npm/npm/commit/a8089268d5f3d57f42dbaba02ff6437da5121191) - [#7867](https://github.com/npm/npm/issues/7867) - `realize-package-specifier@3.0.0`: Use `npm-package-arg@4.0.0` and test - shortcut specifier behavior. ([@iarna](https://github.com/iarna)) -* [`6dd1e03`](https://github.com/npm/npm/commit/6dd1e039bddf8cf5383343f91d84bc5d78acd083) - [#7867](https://github.com/npm/npm/issues/7867) `init-package-json@1.4.0`: - Allow dependency on `read-package-json@2.0.0`. - ([@iarna](https://github.com/iarna)) -* [`63254bb`](https://github.com/npm/npm/commit/63254bb6358f66752aca6aa1a275271b3ae03f7c) - [#7867](https://github.com/npm/npm/issues/7867) `read-installed@4.0.0`: Use - `read-package-json@2.0.0`. ([@iarna](https://github.com/iarna)) -* [`254b887`](https://github.com/npm/npm/commit/254b8871f5a173bb464cc5b0ace460c7878b8097) - [#7867](https://github.com/npm/npm/issues/7867) `read-package-json@2.0.0`: - Use `normalize-package-data@2.0.0`. ([@iarna](https://github.com/iarna)) -* [`0b9f8be`](https://github.com/npm/npm/commit/0b9f8be62fe5252abe54d49e36a696f4816c2eca) - [#7867](https://github.com/npm/npm/issues/7867) `npm-registry-client@6.3.0`: - Mark compatibility with `normalize-package-data@2.0.0` and - `npm-package-arg@4.0.0`. ([@iarna](https://github.com/iarna)) -* [`f40ecaa`](https://github.com/npm/npm/commit/f40ecaad68f77abc50eb6f5b224e31dec3d250fc) - [#7867](https://github.com/npm/npm/issues/7867) Extract a common method to - use when cloning git repos for testing. - ([@othiym23](https://github.com/othiym23)) - -#### TEST FIXES FOR NODE 0.8 - -npm continues to [get closer](https://github.com/npm/npm/issues/7842) to being -completely green on Travis for Node 0.8. - -* [`26d36e9`](https://github.com/npm/npm/commit/26d36e9cf0eca69fe1863d2ea536c28555b9e8de) - [#7842](https://github.com/npm/npm/issues/7842) When spawning child - processes, map exit code 127 to ENOENT so Node 0.8 handles child process - failures the same as later versions. - ([@SonicHedgehog](https://github.com/SonicHedgehog)) -* [`54cd895`](https://github.com/npm/npm/commit/54cd8956ea783f96749e46597d8c2cb9397c5d5f) - [#7842](https://github.com/npm/npm/issues/7842) Node 0.8 requires -e with -p - when evaluating snippets; fix test. - ([@SonicHedgehog](https://github.com/SonicHedgehog)) - -#### SMALL FIX AND DOC TWEAK - -* [`20e9003`](https://github.com/npm/npm/commit/20e90031b847e9f7c7168f3dad8b1e526f9a2586) - `tar@2.0.1`: Fix regression where relative symbolic links within an - extraction root that pointed within an extraction root would get normalized - to absolute symbolic links. ([@isaacs](https://github.com/isaacs)) -* [`2ef8898`](https://github.com/npm/npm/commit/2ef88989c41bee1578570bb2172c90ede129dbd1) - [#7879](https://github.com/npm/npm/issues/7879) Better document that `npm - publish --tag=foo` will not set `latest` to that version. - ([@linclark](https://github.com/linclark)) - -### v2.7.6 (2015-04-02): - -#### GIT MEAN, GIT TUFF, GIT ALL THE WAY AWAY FROM MY STUFF - -Part of the reason that we're reluctant to take patches to how npm deals with -git dependencies is that every time we touch the git support, something breaks. -The last few releases are a case in point. `npm@2.7.4` completely broke -installing private modules from GitHub, and `npm@2.7.5` fixed them at the cost -of logging a misleading error message that caused many people to believe that -their dependencies hadn't been successfully installed when they actually had -been. - -This all started from a desire to ensure that GitHub shortcut syntax is being -handled correctly. The correct behavior is for npm to try to clone all -dependencies on GitHub (whether they're specified with the GitHub -`organization/repository` shortcut syntax or not) via the plain `git:` protocol -first, and to fall back to using `git+ssh:` if `git:` doesn't work. Previously, -sometimes npm would use `git:` and `git+ssh:` in some cases (most notably when -using GitHub shortcut syntax on the command line), and use `git+https:` in -others (when the GitHub shortcut syntax was present in `package.json`). This -led to subtle and hard-to-understand inconsistencies, and we're glad that as of -`npm@2.7.6`, we've finally gotten things to where they were before we started, -only slightly more consistent overall. - -We are now going to go back to our policy of being extremely reluctant to touch -the code that handles Git dependencies. - -* [`b747593`](https://github.com/npm/npm/commit/b7475936f473f029e6a027ba1b16277523747d0b) - [#7630](https://github.com/npm/npm/issues/7630) Don't automatically log all - git failures as errors. `maybeGithub` needs to be able to fail without - logging to support its fallback logic. - ([@othiym23](https://github.com/othiym23)) -* [`cd67a0d`](https://github.com/npm/npm/commit/cd67a0db07891d20871822696c26692c8a84866a) - [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote - URL, handle failures gracefully (without assuming standard output exists). - ([@othiym23](https://github.com/othiym23)) -* [`637c7d1`](https://github.com/npm/npm/commit/637c7d1411fe07f409cf91f2e65fd70685cb253c) - [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote - URL, handle failures gracefully (without assuming standard _error_ exists). - ([@othiym23](https://github.com/othiym23)) - -#### OTHER SIGNIFICANT FIXES - -* [`78005eb`](https://github.com/npm/npm/commit/78005ebb6f4103c20f077669c3929b7ea46a4c0d) - [#7743](https://github.com/npm/npm/issues/7743) Always quote arguments passed - to `npm run-script`. This allows build systems and the like to safely escape - glob patterns passed as arguments to `run-scripts` with `npm run-script - - - - -
-
-

{{ title }}

-{{ description }} -
- -
-

Table of contents

-{{ toc }} -
- -{{ content }} - - -
- - - diff --git a/deps/npm/lib/access.js b/deps/npm/lib/access.js index 10b1e21e0c5d7e..0df36beeac15f3 100644 --- a/deps/npm/lib/access.js +++ b/deps/npm/lib/access.js @@ -3,24 +3,9 @@ const path = require('path') const libaccess = require('libnpmaccess') const readPackageJson = require('read-package-json-fast') -const npm = require('./npm.js') -const output = require('./utils/output.js') const otplease = require('./utils/otplease.js') -const usageUtil = require('./utils/usage.js') const getIdentity = require('./utils/get-identity.js') - -const usage = usageUtil( - 'npm access', - 'npm access public []\n' + - 'npm access restricted []\n' + - 'npm access grant []\n' + - 'npm access revoke []\n' + - 'npm access 2fa-required []\n' + - 'npm access 2fa-not-required []\n' + - 'npm access ls-packages [||]\n' + - 'npm access ls-collaborators [ []]\n' + - 'npm access edit []' -) +const BaseCommand = require('./base-command.js') const subcommands = [ 'public', @@ -34,152 +19,183 @@ const subcommands = [ '2fa-not-required', ] -const UsageError = (msg) => - Object.assign(new Error(`\nUsage: ${msg}\n\n` + usage), { - code: 'EUSAGE', - }) +class Access extends BaseCommand { + static get name () { + return 'access' + } -const cmd = (args, cb) => - access(args) - .then(x => cb(null, x)) - .catch(err => err.code === 'EUSAGE' - ? cb(err.message) - : cb(err) - ) + static get usage () { + return [ + 'public []', + 'restricted []', + 'grant []', + 'revoke []', + '2fa-required []', + '2fa-not-required []', + 'ls-packages [||]', + 'ls-collaborators [ []]', + 'edit []', + ] + } -const access = async ([cmd, ...args], cb) => { - const fn = subcommands.includes(cmd) && access[cmd] + async completion (opts) { + const argv = opts.conf.argv.remain + if (argv.length === 2) + return subcommands + + switch (argv[2]) { + case 'grant': + if (argv.length === 3) + return ['read-only', 'read-write'] + else + return [] + + case 'public': + case 'restricted': + case 'ls-packages': + case 'ls-collaborators': + case 'edit': + case '2fa-required': + case '2fa-not-required': + case 'revoke': + return [] + default: + throw new Error(argv[2] + ' not recognized') + } + } - if (!cmd) - throw UsageError('Subcommand is required.') + exec (args, cb) { + this.access(args).then(() => cb()).catch(cb) + } - if (!fn) - throw UsageError(`${cmd} is not a recognized subcommand.`) + async access ([cmd, ...args]) { + if (!cmd) + throw this.usageError('Subcommand is required.') - return fn(args, { ...npm.flatOptions }) -} + if (!subcommands.includes(cmd) || !this[cmd]) + throw this.usageError(`${cmd} is not a recognized subcommand.`) -const completion = async (opts) => { - const argv = opts.conf.argv.remain - if (argv.length === 2) - return subcommands + return this[cmd](args, { ...this.npm.flatOptions }) + } - switch (argv[2]) { - case 'grant': - if (argv.length === 3) - return ['read-only', 'read-write'] - else - return [] + public ([pkg], opts) { + return this.modifyPackage(pkg, opts, libaccess.public) + } - case 'public': - case 'restricted': - case 'ls-packages': - case 'ls-collaborators': - case 'edit': - case '2fa-required': - case '2fa-not-required': - case 'revoke': - return [] - default: - throw new Error(argv[2] + ' not recognized') + restricted ([pkg], opts) { + return this.modifyPackage(pkg, opts, libaccess.restricted) } -} -access.public = ([pkg], opts) => - modifyPackage(pkg, opts, libaccess.public) + async grant ([perms, scopeteam, pkg], opts) { + if (!perms || (perms !== 'read-only' && perms !== 'read-write')) + throw this.usageError('First argument must be either `read-only` or `read-write`.') -access.restricted = ([pkg], opts) => - modifyPackage(pkg, opts, libaccess.restricted) + if (!scopeteam) + throw this.usageError('`` argument is required.') -access.grant = async ([perms, scopeteam, pkg], opts) => { - if (!perms || (perms !== 'read-only' && perms !== 'read-write')) - throw UsageError('First argument must be either `read-only` or `read-write`.') + const [, scope, team] = scopeteam.match(/^@?([^:]+):(.*)$/) || [] - if (!scopeteam) - throw UsageError('`` argument is required.') + if (!scope && !team) { + throw this.usageError( + 'Second argument used incorrect format.\n' + + 'Example: @example:developers' + ) + } - const [, scope, team] = scopeteam.match(/^@?([^:]+):(.*)$/) || [] + return this.modifyPackage(pkg, opts, (pkgName, opts) => + libaccess.grant(pkgName, scopeteam, perms, opts), false) + } + + async revoke ([scopeteam, pkg], opts) { + if (!scopeteam) + throw this.usageError('`` argument is required.') - if (!scope && !team) { - throw UsageError( - 'Second argument used incorrect format.\n' + - 'Example: @example:developers' - ) + const [, scope, team] = scopeteam.match(/^@?([^:]+):(.*)$/) || [] + + if (!scope || !team) { + throw this.usageError( + 'First argument used incorrect format.\n' + + 'Example: @example:developers' + ) + } + + return this.modifyPackage(pkg, opts, (pkgName, opts) => + libaccess.revoke(pkgName, scopeteam, opts)) } - return modifyPackage(pkg, opts, (pkgName, opts) => - libaccess.grant(pkgName, scopeteam, perms, opts), false) -} + get ['2fa-required'] () { + return this.tfaRequired + } -access.revoke = async ([scopeteam, pkg], opts) => { - if (!scopeteam) - throw UsageError('`` argument is required.') + tfaRequired ([pkg], opts) { + return this.modifyPackage(pkg, opts, libaccess.tfaRequired, false) + } - const [, scope, team] = scopeteam.match(/^@?([^:]+):(.*)$/) || [] + get ['2fa-not-required'] () { + return this.tfaNotRequired + } - if (!scope || !team) { - throw UsageError( - 'First argument used incorrect format.\n' + - 'Example: @example:developers' - ) + tfaNotRequired ([pkg], opts) { + return this.modifyPackage(pkg, opts, libaccess.tfaNotRequired, false) } - return modifyPackage(pkg, opts, (pkgName, opts) => - libaccess.revoke(pkgName, scopeteam, opts)) -} + get ['ls-packages'] () { + return this.lsPackages + } -access['2fa-required'] = access.tfaRequired = ([pkg], opts) => - modifyPackage(pkg, opts, libaccess.tfaRequired, false) + async lsPackages ([owner], opts) { + if (!owner) + owner = await getIdentity(this.npm, opts) -access['2fa-not-required'] = access.tfaNotRequired = ([pkg], opts) => - modifyPackage(pkg, opts, libaccess.tfaNotRequired, false) + const pkgs = await libaccess.lsPackages(owner, opts) -access['ls-packages'] = access.lsPackages = async ([owner], opts) => { - if (!owner) - owner = await getIdentity(opts) + // TODO - print these out nicely (breaking change) + this.npm.output(JSON.stringify(pkgs, null, 2)) + } - const pkgs = await libaccess.lsPackages(owner, opts) + get ['ls-collaborators'] () { + return this.lsCollaborators + } - // TODO - print these out nicely (breaking change) - output(JSON.stringify(pkgs, null, 2)) -} + async lsCollaborators ([pkg, usr], opts) { + const pkgName = await this.getPackage(pkg, false) + const collabs = await libaccess.lsCollaborators(pkgName, usr, opts) -access['ls-collaborators'] = access.lsCollaborators = async ([pkg, usr], opts) => { - const pkgName = await getPackage(pkg, false) - const collabs = await libaccess.lsCollaborators(pkgName, usr, opts) + // TODO - print these out nicely (breaking change) + this.npm.output(JSON.stringify(collabs, null, 2)) + } - // TODO - print these out nicely (breaking change) - output(JSON.stringify(collabs, null, 2)) -} + async edit () { + throw new Error('edit subcommand is not implemented yet') + } -access.edit = () => - Promise.reject(new Error('edit subcommand is not implemented yet')) - -const modifyPackage = (pkg, opts, fn, requireScope = true) => - getPackage(pkg, requireScope) - .then(pkgName => otplease(opts, opts => fn(pkgName, opts))) - -const getPackage = async (name, requireScope) => { - if (name && name.trim()) - return name.trim() - else { - try { - const pkg = await readPackageJson(path.resolve(npm.prefix, 'package.json')) - name = pkg.name - } catch (err) { - if (err.code === 'ENOENT') { - throw new Error( - 'no package name passed to command and no package.json found' - ) - } else - throw err - } + modifyPackage (pkg, opts, fn, requireScope = true) { + return this.getPackage(pkg, requireScope) + .then(pkgName => otplease(opts, opts => fn(pkgName, opts))) + } - if (requireScope && !name.match(/^@[^/]+\/.*$/)) - throw UsageError('This command is only available for scoped packages.') - else - return name + async getPackage (name, requireScope) { + if (name && name.trim()) + return name.trim() + else { + try { + const pkg = await readPackageJson(path.resolve(this.npm.prefix, 'package.json')) + name = pkg.name + } catch (err) { + if (err.code === 'ENOENT') { + throw new Error( + 'no package name passed to command and no package.json found' + ) + } else + throw err + } + + if (requireScope && !name.match(/^@[^/]+\/.*$/)) + throw this.usageError('This command is only available for scoped packages.') + else + return name + } } } -module.exports = Object.assign(cmd, { usage, completion, subcommands }) +module.exports = Access diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js index c68c2b80f8790b..da318a1f3feb85 100644 --- a/deps/npm/lib/adduser.js +++ b/deps/npm/lib/adduser.js @@ -1,8 +1,6 @@ const log = require('npmlog') -const npm = require('./npm.js') -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') const replaceInfo = require('./utils/replace-info.js') +const BaseCommand = require('./base-command.js') const authTypes = { legacy: require('./auth/legacy.js'), oauth: require('./auth/oauth.js'), @@ -10,66 +8,72 @@ const authTypes = { sso: require('./auth/sso.js'), } -const usage = usageUtil( - 'adduser', - 'npm adduser [--registry=url] [--scope=@orgname] [--always-auth]' -) +class AddUser extends BaseCommand { + static get name () { + return 'adduser' + } -const cmd = (args, cb) => adduser(args).then(() => cb()).catch(cb) + static get usage () { + return ['[--registry=url] [--scope=@orgname] [--always-auth]'] + } -const getRegistry = ({ scope, registry }) => { - if (scope) { - const scopedRegistry = npm.config.get(`${scope}:registry`) - const cliRegistry = npm.config.get('registry', 'cli') - if (scopedRegistry && !cliRegistry) - return scopedRegistry + exec (args, cb) { + this.adduser(args).then(() => cb()).catch(cb) } - return registry -} -const getAuthType = ({ authType }) => { - const type = authTypes[authType] + async adduser (args) { + const { scope } = this.npm.flatOptions + const registry = this.getRegistry(this.npm.flatOptions) + const auth = this.getAuthType(this.npm.flatOptions) + const creds = this.npm.config.getCredentialsByURI(registry) - if (!type) - throw new Error('no such auth module') + log.disableProgress() - return type -} + log.notice('', `Log in on ${replaceInfo(registry)}`) -const updateConfig = async ({ newCreds, registry, scope }) => { - npm.config.delete('_token', 'user') // prevent legacy pollution + const { message, newCreds } = await auth(this.npm, { + ...this.npm.flatOptions, + creds, + registry, + scope, + }) - if (scope) - npm.config.set(scope + ':registry', registry, 'user') + await this.updateConfig({ + newCreds, + registry, + scope, + }) - npm.config.setCredentialsByURI(registry, newCreds) - await npm.config.save('user') -} + this.npm.output(message) + } -const adduser = async (args) => { - const { scope } = npm.flatOptions - const registry = getRegistry(npm.flatOptions) - const auth = getAuthType(npm.flatOptions) - const creds = npm.config.getCredentialsByURI(registry) + getRegistry ({ scope, registry }) { + if (scope) { + const scopedRegistry = this.npm.config.get(`${scope}:registry`) + const cliRegistry = this.npm.config.get('registry', 'cli') + if (scopedRegistry && !cliRegistry) + return scopedRegistry + } + return registry + } - log.disableProgress() + getAuthType ({ authType }) { + const type = authTypes[authType] - log.notice('', `Log in on ${replaceInfo(registry)}`) + if (!type) + throw new Error('no such auth module') - const { message, newCreds } = await auth({ - ...npm.flatOptions, - creds, - registry, - scope, - }) + return type + } - await updateConfig({ - newCreds, - registry, - scope, - }) + async updateConfig ({ newCreds, registry, scope }) { + this.npm.config.delete('_token', 'user') // prevent legacy pollution - output(message) -} + if (scope) + this.npm.config.set(scope + ':registry', registry, 'user') -module.exports = Object.assign(cmd, { usage }) + this.npm.config.setCredentialsByURI(registry, newCreds) + await this.npm.config.save('user') + } +} +module.exports = AddUser diff --git a/deps/npm/lib/audit.js b/deps/npm/lib/audit.js index 1b31401b1a6b0b..6e64987b612ae5 100644 --- a/deps/npm/lib/audit.js +++ b/deps/npm/lib/audit.js @@ -1,55 +1,63 @@ const Arborist = require('@npmcli/arborist') const auditReport = require('npm-audit-report') -const npm = require('./npm.js') -const output = require('./utils/output.js') const reifyFinish = require('./utils/reify-finish.js') const auditError = require('./utils/audit-error.js') +const BaseCommand = require('./base-command.js') -const audit = async args => { - const arb = new Arborist({ - ...npm.flatOptions, - audit: true, - path: npm.prefix, - }) - const fix = args[0] === 'fix' - await arb.audit({ fix }) - if (fix) - await reifyFinish(arb) - else { - // will throw if there's an error, because this is an audit command - auditError(arb.auditReport) - const reporter = npm.flatOptions.json ? 'json' : 'detail' - const result = auditReport(arb.auditReport, { - ...npm.flatOptions, - reporter, - }) - process.exitCode = process.exitCode || result.exitCode - output(result.report) +class Audit extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'audit' } -} -const cmd = (args, cb) => audit(args).then(() => cb()).catch(cb) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + '[--json] [--production]', + 'fix [--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]', + ] + } -const usageUtil = require('./utils/usage') -const usage = usageUtil( - 'audit', - 'npm audit [--json] [--production]' + - '\nnpm audit fix ' + - '[--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]' -) + async completion (opts) { + const argv = opts.conf.argv.remain -const completion = async (opts) => { - const argv = opts.conf.argv.remain + if (argv.length === 2) + return ['fix'] - if (argv.length === 2) - return ['fix'] + switch (argv[2]) { + case 'fix': + return [] + default: + throw new Error(argv[2] + ' not recognized') + } + } - switch (argv[2]) { - case 'fix': - return [] - default: - throw new Error(argv[2] + ' not recognized') + exec (args, cb) { + this.audit(args).then(() => cb()).catch(cb) + } + + async audit (args) { + const arb = new Arborist({ + ...this.npm.flatOptions, + audit: true, + path: this.npm.prefix, + }) + const fix = args[0] === 'fix' + await arb.audit({ fix }) + if (fix) + await reifyFinish(this.npm, arb) + else { + // will throw if there's an error, because this is an audit command + auditError(this.npm, arb.auditReport) + const reporter = this.npm.flatOptions.json ? 'json' : 'detail' + const result = auditReport(arb.auditReport, { + ...this.npm.flatOptions, + reporter, + }) + process.exitCode = process.exitCode || result.exitCode + this.npm.output(result.report) + } } } -module.exports = Object.assign(cmd, { usage, completion }) +module.exports = Audit diff --git a/deps/npm/lib/auth/legacy.js b/deps/npm/lib/auth/legacy.js index f291ca794e7f1b..8659446dc4c021 100644 --- a/deps/npm/lib/auth/legacy.js +++ b/deps/npm/lib/auth/legacy.js @@ -4,11 +4,6 @@ const profile = require('npm-profile') const openUrl = require('../utils/open-url.js') const read = require('../utils/read-user-info.js') -// TODO: refactor lib/utils/open-url and its usages -const openerPromise = (url) => new Promise((resolve, reject) => { - openUrl(url, 'to complete your login please visit', (er) => er ? reject(er) : resolve()) -}) - const loginPrompter = async (creds) => { const opts = { log: log } @@ -19,7 +14,7 @@ const loginPrompter = async (creds) => { return creds } -const login = async (opts) => { +const login = async (npm, opts) => { let res const requestOTP = async () => { @@ -54,6 +49,7 @@ const login = async (opts) => { return newUser } + const openerPromise = (url) => openUrl(npm, url, 'to complete your login please visit') try { res = await profile.login(openerPromise, loginPrompter, opts) } catch (err) { diff --git a/deps/npm/lib/auth/oauth.js b/deps/npm/lib/auth/oauth.js index ee45317113421f..99c2ca0ca04b7a 100644 --- a/deps/npm/lib/auth/oauth.js +++ b/deps/npm/lib/auth/oauth.js @@ -1,9 +1,8 @@ const sso = require('./sso.js') -const npm = require('../npm.js') -const login = (opts) => { +const login = (npm, opts) => { npm.config.set('sso-type', 'oauth') - return sso(opts) + return sso(npm, opts) } module.exports = login diff --git a/deps/npm/lib/auth/saml.js b/deps/npm/lib/auth/saml.js index f30d82849dbf91..3dd31ca013f522 100644 --- a/deps/npm/lib/auth/saml.js +++ b/deps/npm/lib/auth/saml.js @@ -1,9 +1,8 @@ const sso = require('./sso.js') -const npm = require('../npm.js') -const login = (opts) => { +const login = (npm, opts) => { npm.config.set('sso-type', 'saml') - return sso(opts) + return sso(npm, opts) } module.exports = login diff --git a/deps/npm/lib/auth/sso.js b/deps/npm/lib/auth/sso.js index 378295f5f606f2..56cff3c06e2929 100644 --- a/deps/npm/lib/auth/sso.js +++ b/deps/npm/lib/auth/sso.js @@ -7,14 +7,11 @@ // CLI, we can remove this, and fold the lib/auth/legacy.js back into // lib/adduser.js -const { promisify } = require('util') - const log = require('npmlog') const profile = require('npm-profile') const npmFetch = require('npm-registry-fetch') -const npm = require('../npm.js') -const openUrl = promisify(require('../utils/open-url.js')) +const openUrl = require('../utils/open-url.js') const otplease = require('../utils/otplease.js') const pollForSession = ({ registry, token, opts }) => { @@ -38,7 +35,7 @@ function sleep (time) { return new Promise((resolve) => setTimeout(resolve, time)) } -const login = async ({ creds, registry, scope }) => { +const login = async (npm, { creds, registry, scope }) => { log.warn('deprecated', 'SSO --auth-type is deprecated') const opts = { ...npm.flatOptions, creds, registry, scope } @@ -65,7 +62,7 @@ const login = async ({ creds, registry, scope }) => { if (!sso) throw new Error('no SSO URL returned by services') - await openUrl(sso, 'to complete your login please visit') + await openUrl(npm, sso, 'to complete your login please visit') const username = await pollForSession({ registry, token, opts }) diff --git a/deps/npm/lib/base-command.js b/deps/npm/lib/base-command.js new file mode 100644 index 00000000000000..8e48caa2ef4c72 --- /dev/null +++ b/deps/npm/lib/base-command.js @@ -0,0 +1,38 @@ +// Base class for npm.commands[cmd] +const usageUtil = require('./utils/usage.js') + +class BaseCommand { + constructor (npm) { + this.npm = npm + } + + get usage () { + let usage = `npm ${this.constructor.name}\n\n` + if (this.constructor.description) + usage = `${usage}${this.constructor.description}\n\n` + + usage = `${usage}Usage:\n` + if (!this.constructor.usage) + usage = `${usage}npm ${this.constructor.name}` + else + usage = `${usage}${this.constructor.usage.map(u => `npm ${this.constructor.name} ${u}`).join('\n')}` + + // Mostly this just appends aliases, this could be more clear + usage = usageUtil(this.constructor.name, usage) + usage = `${usage}\n\nRun "npm help ${this.constructor.name}" for more info` + return usage + } + + usageError (msg) { + if (!msg) { + return Object.assign(new Error(`\nUsage: ${this.usage}`), { + code: 'EUSAGE', + }) + } + + return Object.assign(new Error(`\nUsage: ${msg}\n\n${this.usage}`), { + code: 'EUSAGE', + }) + } +} +module.exports = BaseCommand diff --git a/deps/npm/lib/bin.js b/deps/npm/lib/bin.js index e627ce22f13a68..1450fb539bffaf 100644 --- a/deps/npm/lib/bin.js +++ b/deps/npm/lib/bin.js @@ -1,13 +1,24 @@ -const npm = require('./npm.js') -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') -const PATH = require('./utils/path.js') -const cmd = (args, cb) => bin(args).then(() => cb()).catch(cb) -const usage = usageUtil('bin', 'npm bin [-g]') -const bin = async (args, cb) => { - const b = npm.bin - output(b) - if (npm.flatOptions.global && !PATH.includes(b)) - console.error('(not in PATH env variable)') +const envPath = require('./utils/path.js') +const BaseCommand = require('./base-command.js') + +class Bin extends BaseCommand { + static get name () { + return 'bin' + } + + static get usage () { + return ['[-g]'] + } + + exec (args, cb) { + this.bin(args).then(() => cb()).catch(cb) + } + + async bin (args) { + const b = this.npm.bin + this.npm.output(b) + if (this.npm.flatOptions.global && !envPath.includes(b)) + console.error('(not in PATH env variable)') + } } -module.exports = Object.assign(cmd, { usage }) +module.exports = Bin diff --git a/deps/npm/lib/birthday.js b/deps/npm/lib/birthday.js index 6c71a9e7156689..5ea855512f9f69 100644 --- a/deps/npm/lib/birthday.js +++ b/deps/npm/lib/birthday.js @@ -1,11 +1,18 @@ -const npm = require('./npm.js') -module.exports = (_, cb) => { - Object.defineProperty(npm, 'flatOptions', { - value: { - ...npm.flatOptions, - package: ['@npmcli/npm-birthday'], - yes: true, - }, - }) - return npm.commands.exec(['npm-birthday'], cb) +class Birthday { + constructor (npm) { + this.npm = npm + Object.defineProperty(this.npm, 'flatOptions', { + value: { + ...npm.flatOptions, + package: ['@npmcli/npm-birthday'], + yes: true, + }, + }) + } + + exec (args, cb) { + return this.npm.commands.exec(['npm-birthday'], cb) + } } + +module.exports = Birthday diff --git a/deps/npm/lib/bugs.js b/deps/npm/lib/bugs.js index 09856313ce883e..1814dd7bc461e1 100644 --- a/deps/npm/lib/bugs.js +++ b/deps/npm/lib/bugs.js @@ -1,46 +1,54 @@ const log = require('npmlog') const pacote = require('pacote') -const { promisify } = require('util') -const openUrl = promisify(require('./utils/open-url.js')) -const usageUtil = require('./utils/usage.js') -const npm = require('./npm.js') +const openUrl = require('./utils/open-url.js') const hostedFromMani = require('./utils/hosted-git-info-from-manifest.js') +const BaseCommand = require('./base-command.js') -const usage = usageUtil('bugs', 'npm bugs []') +class Bugs extends BaseCommand { + static get name () { + return 'bugs' + } -const cmd = (args, cb) => bugs(args).then(() => cb()).catch(cb) + static get usage () { + return ['[]'] + } -const bugs = async args => { - if (!args || !args.length) - args = ['.'] + exec (args, cb) { + this.bugs(args).then(() => cb()).catch(cb) + } - await Promise.all(args.map(pkg => getBugs(pkg))) -} + async bugs (args) { + if (!args || !args.length) + args = ['.'] -const getBugsUrl = mani => { - if (mani.bugs) { - if (typeof mani.bugs === 'string') - return mani.bugs + await Promise.all(args.map(pkg => this.getBugs(pkg))) + } - if (typeof mani.bugs === 'object' && mani.bugs.url) - return mani.bugs.url + async getBugs (pkg) { + const opts = { ...this.npm.flatOptions, fullMetadata: true } + const mani = await pacote.manifest(pkg, opts) + const url = this.getBugsUrl(mani) + log.silly('bugs', 'url', url) + await openUrl(this.npm, url, `${mani.name} bug list available at the following URL`) } - // try to get it from the repo, if possible - const info = hostedFromMani(mani) - if (info) - return info.bugs() + getBugsUrl (mani) { + if (mani.bugs) { + if (typeof mani.bugs === 'string') + return mani.bugs - // just send them to the website, hopefully that has some info! - return `https://www.npmjs.com/package/${mani.name}` -} + if (typeof mani.bugs === 'object' && mani.bugs.url) + return mani.bugs.url + } -const getBugs = async pkg => { - const opts = { ...npm.flatOptions, fullMetadata: true } - const mani = await pacote.manifest(pkg, opts) - const url = getBugsUrl(mani) - log.silly('bugs', 'url', url) - await openUrl(url, `${mani.name} bug list available at the following URL`) + // try to get it from the repo, if possible + const info = hostedFromMani(mani) + if (info) + return info.bugs() + + // just send them to the website, hopefully that has some info! + return `https://www.npmjs.com/package/${mani.name}` + } } -module.exports = Object.assign(cmd, { usage }) +module.exports = Bugs diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js index 7b84353b4a19b6..80a5c68ebc0e99 100644 --- a/deps/npm/lib/cache.js +++ b/deps/npm/lib/cache.js @@ -1,62 +1,70 @@ const cacache = require('cacache') const { promisify } = require('util') const log = require('npmlog') -const npm = require('./npm.js') -const output = require('./utils/output.js') const pacote = require('pacote') const path = require('path') const rimraf = promisify(require('rimraf')) +const BaseCommand = require('./base-command.js') -const usageUtil = require('./utils/usage.js') - -const usage = usageUtil('cache', - 'npm cache add ' + - '\nnpm cache add ' + - '\nnpm cache add ' + - '\nnpm cache add ' + - '\nnpm cache add @' + - '\nnpm cache clean' + - '\nnpm cache verify' -) - -const completion = async (opts) => { - const argv = opts.conf.argv.remain - if (argv.length === 2) - return ['add', 'clean', 'verify'] - - // TODO - eventually... - switch (argv[2]) { - case 'verify': - case 'clean': - case 'add': - return [] +class Cache extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'cache' } -} -const cmd = (args, cb) => cache(args).then(() => cb()).catch(cb) - -const cache = async (args) => { - const cmd = args.shift() - switch (cmd) { - case 'rm': case 'clear': case 'clean': - return await clean(args) - case 'add': - return await add(args) - case 'verify': case 'check': - return await verify() - default: - throw Object.assign(new Error(usage), { code: 'EUSAGE' }) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + 'add ', + 'add ', + 'add ', + 'add ', + 'add @', + 'clean', + 'verify', + ] + } + + async completion (opts) { + const argv = opts.conf.argv.remain + if (argv.length === 2) + return ['add', 'clean', 'verify'] + + // TODO - eventually... + switch (argv[2]) { + case 'verify': + case 'clean': + case 'add': + return [] + } + } + + exec (args, cb) { + this.cache(args).then(() => cb()).catch(cb) + } + + async cache (args) { + const cmd = args.shift() + switch (cmd) { + case 'rm': case 'clear': case 'clean': + return await this.clean(args) + case 'add': + return await this.add(args) + case 'verify': case 'check': + return await this.verify() + default: + throw Object.assign(new Error(this.usage), { code: 'EUSAGE' }) + } } -} -// npm cache clean [pkg]* -const clean = async (args) => { - if (args.length) - throw new Error('npm cache clear does not accept arguments') + // npm cache clean [pkg]* + async clean (args) { + if (args.length) + throw new Error('npm cache clear does not accept arguments') - const cachePath = path.join(npm.cache, '_cacache') - if (!npm.flatOptions.force) { - throw new Error(`As of npm@5, the npm cache self-heals from corruption issues + const cachePath = path.join(this.npm.cache, '_cacache') + if (!this.npm.flatOptions.force) { + throw new Error(`As of npm@5, the npm cache self-heals from corruption issues by treating integrity mismatches as cache misses. As a result, data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use \`npm cache verify\` @@ -70,52 +78,53 @@ temporary cache instead of nuking the actual one. If you're sure you want to delete the entire cache, rerun this command with --force.`) + } + return rimraf(cachePath) } - return rimraf(cachePath) -} -// npm cache add -// npm cache add -// npm cache add -// npm cache add -const add = async (args) => { - const usage = 'Usage:\n' + - ' npm cache add \n' + - ' npm cache add @\n' + - ' npm cache add \n' + - ' npm cache add \n' - log.silly('cache add', 'args', args) - const spec = args[0] && args[0] + - (args[1] === undefined || args[1] === null ? '' : `@${args[1]}`) - - if (!spec) - throw Object.assign(new Error(usage), { code: 'EUSAGE' }) - - log.silly('cache add', 'spec', spec) - const opts = { ...npm.flatOptions } - - // we ask pacote for the thing, and then just throw the data - // away so that it tee-pipes it into the cache like it does - // for a normal request. - await pacote.tarball.stream(spec, stream => { - stream.resume() - return stream.promise() - }, opts) -} + // npm cache add + // npm cache add + // npm cache add + // npm cache add + async add (args) { + const usage = 'Usage:\n' + + ' npm cache add \n' + + ' npm cache add @\n' + + ' npm cache add \n' + + ' npm cache add \n' + log.silly('cache add', 'args', args) + const spec = args[0] && args[0] + + (args[1] === undefined || args[1] === null ? '' : `@${args[1]}`) + + if (!spec) + throw Object.assign(new Error(usage), { code: 'EUSAGE' }) -const verify = async () => { - const cache = path.join(npm.cache, '_cacache') - const prefix = cache.indexOf(process.env.HOME) === 0 - ? `~${cache.substr(process.env.HOME.length)}` - : cache - const stats = await cacache.verify(cache) - output(`Cache verified and compressed (${prefix})`) - output(`Content verified: ${stats.verifiedContent} (${stats.keptSize} bytes)`) - stats.badContentCount && output(`Corrupted content removed: ${stats.badContentCount}`) - stats.reclaimedCount && output(`Content garbage-collected: ${stats.reclaimedCount} (${stats.reclaimedSize} bytes)`) - stats.missingContent && output(`Missing content: ${stats.missingContent}`) - output(`Index entries: ${stats.totalEntries}`) - output(`Finished in ${stats.runTime.total / 1000}s`) + log.silly('cache add', 'spec', spec) + const opts = { ...this.npm.flatOptions } + + // we ask pacote for the thing, and then just throw the data + // away so that it tee-pipes it into the cache like it does + // for a normal request. + await pacote.tarball.stream(spec, stream => { + stream.resume() + return stream.promise() + }, opts) + } + + async verify () { + const cache = path.join(this.npm.cache, '_cacache') + const prefix = cache.indexOf(process.env.HOME) === 0 + ? `~${cache.substr(process.env.HOME.length)}` + : cache + const stats = await cacache.verify(cache) + this.npm.output(`Cache verified and compressed (${prefix})`) + this.npm.output(`Content verified: ${stats.verifiedContent} (${stats.keptSize} bytes)`) + stats.badContentCount && this.npm.output(`Corrupted content removed: ${stats.badContentCount}`) + stats.reclaimedCount && this.npm.output(`Content garbage-collected: ${stats.reclaimedCount} (${stats.reclaimedSize} bytes)`) + stats.missingContent && this.npm.output(`Missing content: ${stats.missingContent}`) + this.npm.output(`Index entries: ${stats.totalEntries}`) + this.npm.output(`Finished in ${stats.runTime.total / 1000}s`) + } } -module.exports = Object.assign(cmd, { completion, usage }) +module.exports = Cache diff --git a/deps/npm/lib/ci.js b/deps/npm/lib/ci.js index 51c165accef7a6..3ea19937616e65 100644 --- a/deps/npm/lib/ci.js +++ b/deps/npm/lib/ci.js @@ -7,12 +7,6 @@ const fs = require('fs') const readdir = util.promisify(fs.readdir) const log = require('npmlog') -const npm = require('./npm.js') -const usageUtil = require('./utils/usage.js') - -const usage = usageUtil('ci', 'npm ci') - -const cmd = (args, cb) => ci().then(() => cb()).catch(cb) const removeNodeModules = async where => { const rimrafOpts = { glob: false } @@ -23,56 +17,68 @@ const removeNodeModules = async where => { await Promise.all(entries.map(f => rimraf(`${path}/${f}`, rimrafOpts))) process.emit('timeEnd', 'npm-ci:rm') } +const BaseCommand = require('./base-command.js') + +class CI extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'ci' + } -const ci = async () => { - if (npm.flatOptions.global) { - const err = new Error('`npm ci` does not work for global packages') - err.code = 'ECIGLOBAL' - throw err + exec (args, cb) { + this.ci().then(() => cb()).catch(cb) } - const where = npm.prefix - const { scriptShell, ignoreScripts } = npm.flatOptions - const arb = new Arborist({ ...npm.flatOptions, path: where }) + async ci () { + if (this.npm.flatOptions.global) { + const err = new Error('`npm ci` does not work for global packages') + err.code = 'ECIGLOBAL' + throw err + } + + const where = this.npm.prefix + const { scriptShell, ignoreScripts } = this.npm.flatOptions + const arb = new Arborist({ ...this.npm.flatOptions, path: where }) - await Promise.all([ - arb.loadVirtual().catch(er => { - log.verbose('loadVirtual', er.stack) - const msg = - 'The `npm ci` command can only install with an existing package-lock.json or\n' + - 'npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or\n' + - 'later to generate a package-lock.json file, then try again.' - throw new Error(msg) - }), - removeNodeModules(where), - ]) - // npm ci should never modify the lockfile or package.json - await arb.reify({ ...npm.flatOptions, save: false }) + await Promise.all([ + arb.loadVirtual().catch(er => { + log.verbose('loadVirtual', er.stack) + const msg = + 'The `npm ci` command can only install with an existing package-lock.json or\n' + + 'npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or\n' + + 'later to generate a package-lock.json file, then try again.' + throw new Error(msg) + }), + removeNodeModules(where), + ]) + // npm ci should never modify the lockfile or package.json + await arb.reify({ ...this.npm.flatOptions, save: false }) - // run the same set of scripts that `npm install` runs. - if (!ignoreScripts) { - const scripts = [ - 'preinstall', - 'install', - 'postinstall', - 'prepublish', // XXX should we remove this finally?? - 'preprepare', - 'prepare', - 'postprepare', - ] - for (const event of scripts) { - await runScript({ - path: where, - args: [], - scriptShell, - stdio: 'inherit', - stdioString: true, - banner: log.level !== 'silent', - event, - }) + // run the same set of scripts that `npm install` runs. + if (!ignoreScripts) { + const scripts = [ + 'preinstall', + 'install', + 'postinstall', + 'prepublish', // XXX should we remove this finally?? + 'preprepare', + 'prepare', + 'postprepare', + ] + for (const event of scripts) { + await runScript({ + path: where, + args: [], + scriptShell, + stdio: 'inherit', + stdioString: true, + banner: log.level !== 'silent', + event, + }) + } } + await reifyFinish(this.npm, arb) } - await reifyFinish(arb) } -module.exports = Object.assign(cmd, {usage}) +module.exports = CI diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js index b31867d988a69a..3ee68cdacaf95e 100644 --- a/deps/npm/lib/completion.js +++ b/deps/npm/lib/completion.js @@ -29,7 +29,6 @@ // as an array. // -const npm = require('./npm.js') const { types, shorthands } = require('./utils/config.js') const deref = require('./utils/deref-command.js') const { aliases, cmdList, plumbing } = require('./utils/cmd-list.js') @@ -40,119 +39,151 @@ const configNames = Object.keys(types) const shorthandNames = Object.keys(shorthands) const allConfs = configNames.concat(shorthandNames) const isWindowsShell = require('./utils/is-windows-shell.js') -const output = require('./utils/output.js') const fileExists = require('./utils/file-exists.js') -const usageUtil = require('./utils/usage.js') -const usage = usageUtil('completion', 'source <(npm completion)') const { promisify } = require('util') +const BaseCommand = require('./base-command.js') -const cmd = (args, cb) => compl(args).then(() => cb()).catch(cb) +class Completion extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'completion' + } -// completion for the completion command -const completion = async (opts) => { - if (opts.w > 2) - return + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get description () { + return 'npm command completion script. save to ~/.bashrc or ~/.zshrc' + } - const { resolve } = require('path') - const [bashExists, zshExists] = await Promise.all([ - fileExists(resolve(process.env.HOME, '.bashrc')), - fileExists(resolve(process.env.HOME, '.zshrc')), - ]) - const out = [] - if (zshExists) - out.push(['>>', '~/.zshrc']) - - if (bashExists) - out.push(['>>', '~/.bashrc']) - - return out -} + // completion for the completion command + async completion (opts) { + if (opts.w > 2) + return -const compl = async args => { - if (isWindowsShell) { - const msg = 'npm completion supported only in MINGW / Git bash on Windows' - throw Object.assign(new Error(msg), { - code: 'ENOTSUP', - }) + const { resolve } = require('path') + const [bashExists, zshExists] = await Promise.all([ + fileExists(resolve(process.env.HOME, '.bashrc')), + fileExists(resolve(process.env.HOME, '.zshrc')), + ]) + const out = [] + if (zshExists) + out.push(['>>', '~/.zshrc']) + + if (bashExists) + out.push(['>>', '~/.bashrc']) + + return out + } + + exec (args, cb) { + this.compl(args).then(() => cb()).catch(cb) } - const { COMP_CWORD, COMP_LINE, COMP_POINT } = process.env + async compl (args) { + if (isWindowsShell) { + const msg = 'npm completion supported only in MINGW / Git bash on Windows' + throw Object.assign(new Error(msg), { + code: 'ENOTSUP', + }) + } + + const { COMP_CWORD, COMP_LINE, COMP_POINT } = process.env - // if the COMP_* isn't in the env, then just dump the script. - if (COMP_CWORD === undefined || + // if the COMP_* isn't in the env, then just dump the script. + if (COMP_CWORD === undefined || COMP_LINE === undefined || COMP_POINT === undefined) - return dumpScript() - - // ok we're actually looking at the envs and outputting the suggestions - // get the partial line and partial word, - // if the point isn't at the end. - // ie, tabbing at: npm foo b|ar - const w = +COMP_CWORD - const words = args.map(unescape) - const word = words[w] - const line = COMP_LINE - const point = +COMP_POINT - const partialLine = line.substr(0, point) - const partialWords = words.slice(0, w) - - // figure out where in that last word the point is. - const partialWordRaw = args[w] - let i = partialWordRaw.length - while (partialWordRaw.substr(0, i) !== partialLine.substr(-1 * i) && i > 0) - i-- - - const partialWord = unescape(partialWordRaw.substr(0, i)) - partialWords.push(partialWord) - - const opts = { - words, - w, - word, - line, - lineLength: line.length, - point, - partialLine, - partialWords, - partialWord, - raw: args, - } + return dumpScript() + + // ok we're actually looking at the envs and outputting the suggestions + // get the partial line and partial word, + // if the point isn't at the end. + // ie, tabbing at: npm foo b|ar + const w = +COMP_CWORD + const words = args.map(unescape) + const word = words[w] + const line = COMP_LINE + const point = +COMP_POINT + const partialLine = line.substr(0, point) + const partialWords = words.slice(0, w) + + // figure out where in that last word the point is. + const partialWordRaw = args[w] + let i = partialWordRaw.length + while (partialWordRaw.substr(0, i) !== partialLine.substr(-1 * i) && i > 0) + i-- + + const partialWord = unescape(partialWordRaw.substr(0, i)) + partialWords.push(partialWord) + + const opts = { + words, + w, + word, + line, + lineLength: line.length, + point, + partialLine, + partialWords, + partialWord, + raw: args, + } - if (partialWords.slice(0, -1).indexOf('--') === -1) { - if (word.charAt(0) === '-') - return wrap(opts, configCompl(opts)) + if (partialWords.slice(0, -1).indexOf('--') === -1) { + if (word.charAt(0) === '-') + return this.wrap(opts, configCompl(opts)) - if (words[w - 1] && + if (words[w - 1] && words[w - 1].charAt(0) === '-' && !isFlag(words[w - 1])) { - // awaiting a value for a non-bool config. - // don't even try to do this for now - return wrap(opts, configValueCompl(opts)) + // awaiting a value for a non-bool config. + // don't even try to do this for now + return this.wrap(opts, configValueCompl(opts)) + } + } + + // try to find the npm command. + // it's the first thing after all the configs. + // take a little shortcut and use npm's arg parsing logic. + // don't have to worry about the last arg being implicitly + // boolean'ed, since the last block will catch that. + const parsed = opts.conf = + nopt(types, shorthands, partialWords.slice(0, -1), 0) + // check if there's a command already. + const cmd = parsed.argv.remain[1] + if (!cmd) + return this.wrap(opts, cmdCompl(opts)) + + Object.keys(parsed).forEach(k => this.npm.config.set(k, parsed[k])) + + // at this point, if words[1] is some kind of npm command, + // then complete on it. + // otherwise, do nothing + const impl = this.npm.commands[cmd] + if (impl && impl.completion) { + const comps = await impl.completion(opts) + return this.wrap(opts, comps) } } - // try to find the npm command. - // it's the first thing after all the configs. - // take a little shortcut and use npm's arg parsing logic. - // don't have to worry about the last arg being implicitly - // boolean'ed, since the last block will catch that. - const parsed = opts.conf = - nopt(types, shorthands, partialWords.slice(0, -1), 0) - // check if there's a command already. - const cmd = parsed.argv.remain[1] - if (!cmd) - return wrap(opts, cmdCompl(opts)) - - Object.keys(parsed).forEach(k => npm.config.set(k, parsed[k])) - - // at this point, if words[1] is some kind of npm command, - // then complete on it. - // otherwise, do nothing - const impl = npm.commands[cmd] - if (impl && impl.completion) { - const comps = await impl.completion(opts) - return wrap(opts, comps) + // The command should respond with an array. Loop over that, + // wrapping quotes around any that have spaces, and writing + // them to stdout. + // If any of the items are arrays, then join them with a space. + // Ie, returning ['a', 'b c', ['d', 'e']] would allow it to expand + // to: 'a', 'b c', or 'd' 'e' + wrap (opts, compls) { + if (!Array.isArray(compls)) + compls = compls ? [compls] : [] + + compls = compls.map(c => + Array.isArray(c) ? c.map(escape).join(' ') : escape(c)) + + if (opts.partialWord) + compls = compls.filter(c => c.startsWith(opts.partialWord)) + + if (compls.length > 0) + this.npm.output(compls.join('\n')) } } @@ -203,26 +234,6 @@ const unescape = w => w.charAt(0) === '\'' ? w.replace(/^'|'$/g, '') const escape = w => !/\s+/.test(w) ? w : '\'' + w + '\'' -// The command should respond with an array. Loop over that, -// wrapping quotes around any that have spaces, and writing -// them to stdout. -// If any of the items are arrays, then join them with a space. -// Ie, returning ['a', 'b c', ['d', 'e']] would allow it to expand -// to: 'a', 'b c', or 'd' 'e' -const wrap = (opts, compls) => { - if (!Array.isArray(compls)) - compls = compls ? [compls] : [] - - compls = compls.map(c => - Array.isArray(c) ? c.map(escape).join(' ') : escape(c)) - - if (opts.partialWord) - compls = compls.filter(c => c.startsWith(opts.partialWord)) - - if (compls.length > 0) - output(compls.join('\n')) -} - // the current word has a dash. Return the config names, // with the same number of dashes as the current word has. const configCompl = opts => { @@ -266,4 +277,4 @@ const cmdCompl = opts => { return fullList } -module.exports = Object.assign(cmd, { completion, usage }) +module.exports = Completion diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js index e4da296de8f88a..c29253e430a33a 100644 --- a/deps/npm/lib/config.js +++ b/deps/npm/lib/config.js @@ -1,7 +1,4 @@ -const npm = require('./npm.js') const { defaults, types } = require('./utils/config.js') -const usageUtil = require('./utils/usage.js') -const output = require('./utils/output.js') const mkdirp = require('mkdirp-infer-owner') const { dirname } = require('path') @@ -13,165 +10,173 @@ const { spawn } = require('child_process') const { EOL } = require('os') const ini = require('ini') -const usage = usageUtil( - 'config', - 'npm config set = [= ...]' + - '\nnpm config get [ [ ...]]' + - '\nnpm config delete [ ...]' + - '\nnpm config list [--json]' + - '\nnpm config edit' + - '\nnpm set = [= ...]' + - '\nnpm get [ [ ...]]' -) - -const cmd = (args, cb) => config(args).then(() => cb()).catch(cb) - -const completion = async (opts) => { - const argv = opts.conf.argv.remain - if (argv[1] !== 'config') - argv.unshift('config') - - if (argv.length === 2) { - const cmds = ['get', 'set', 'delete', 'ls', 'rm', 'edit'] - if (opts.partialWord !== 'l') - cmds.push('list') - - return cmds +// take an array of `[key, value, k2=v2, k3, v3, ...]` and turn into +// { key: value, k2: v2, k3: v3 } +const keyValues = args => { + const kv = {} + for (let i = 0; i < args.length; i++) { + const arg = args[i].split('=') + const key = arg.shift() + const val = arg.length ? arg.join('=') + : i < args.length - 1 ? args[++i] + : '' + kv[key.trim()] = val.trim() } + return kv +} - const action = argv[2] - switch (action) { - case 'set': - // todo: complete with valid values, if possible. - if (argv.length > 3) - return [] +const publicVar = k => !/^(\/\/[^:]+:)?_/.test(k) - // fallthrough - /* eslint no-fallthrough:0 */ - case 'get': - case 'delete': - case 'rm': - return Object.keys(types) - case 'edit': - case 'list': - case 'ls': - default: - return [] +const BaseCommand = require('./base-command.js') +class Config extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'config' } -} -const UsageError = () => - Object.assign(new Error(usage), { code: 'EUSAGE' }) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + 'set = [= ...]', + 'get [ [ ...]]', + 'delete [ ...]', + 'list [--json]', + 'edit', + ] + } + + async completion (opts) { + const argv = opts.conf.argv.remain + if (argv[1] !== 'config') + argv.unshift('config') + + if (argv.length === 2) { + const cmds = ['get', 'set', 'delete', 'ls', 'rm', 'edit'] + if (opts.partialWord !== 'l') + cmds.push('list') + + return cmds + } -const config = async ([action, ...args]) => { - npm.log.disableProgress() - try { + const action = argv[2] switch (action) { case 'set': - await set(args) - break + // todo: complete with valid values, if possible. + if (argv.length > 3) + return [] + + // fallthrough + /* eslint no-fallthrough:0 */ case 'get': - await get(args) - break case 'delete': case 'rm': - case 'del': - await del(args) - break + return Object.keys(types) + case 'edit': case 'list': case 'ls': - await (npm.flatOptions.json ? listJson() : list()) - break - case 'edit': - await edit() - break default: - throw UsageError() + return [] } - } finally { - npm.log.enableProgress() } -} -// take an array of `[key, value, k2=v2, k3, v3, ...]` and turn into -// { key: value, k2: v2, k3: v3 } -const keyValues = args => { - const kv = {} - for (let i = 0; i < args.length; i++) { - const arg = args[i].split('=') - const key = arg.shift() - const val = arg.length ? arg.join('=') - : i < args.length - 1 ? args[++i] - : '' - kv[key.trim()] = val.trim() + exec (args, cb) { + this.config(args).then(() => cb()).catch(cb) } - return kv -} -const set = async (args) => { - if (!args.length) - throw UsageError() - - const where = npm.flatOptions.global ? 'global' : 'user' - for (const [key, val] of Object.entries(keyValues(args))) { - npm.log.info('config', 'set %j %j', key, val) - npm.config.set(key, val || '', where) - if (!npm.config.validate(where)) - npm.log.warn('config', 'omitting invalid config values') + async config ([action, ...args]) { + this.npm.log.disableProgress() + try { + switch (action) { + case 'set': + await this.set(args) + break + case 'get': + await this.get(args) + break + case 'delete': + case 'rm': + case 'del': + await this.del(args) + break + case 'list': + case 'ls': + await (this.npm.flatOptions.json ? this.listJson() : this.list()) + break + case 'edit': + await this.edit() + break + default: + throw this.usageError() + } + } finally { + this.npm.log.enableProgress() + } } - await npm.config.save(where) -} + async set (args) { + if (!args.length) + throw this.usageError() + + const where = this.npm.flatOptions.global ? 'global' : 'user' + for (const [key, val] of Object.entries(keyValues(args))) { + this.npm.log.info('config', 'set %j %j', key, val) + this.npm.config.set(key, val || '', where) + if (!this.npm.config.validate(where)) + this.npm.log.warn('config', 'omitting invalid config values') + } + + await this.npm.config.save(where) + } -const get = async keys => { - if (!keys.length) - return list() + async get (keys) { + if (!keys.length) + return this.list() - const out = [] - for (const key of keys) { - if (!publicVar(key)) - throw `The ${key} option is protected, and cannot be retrieved in this way` + const out = [] + for (const key of keys) { + if (!publicVar(key)) + throw `The ${key} option is protected, and cannot be retrieved in this way` - const pref = keys.length > 1 ? `${key}=` : '' - out.push(pref + npm.config.get(key)) + const pref = keys.length > 1 ? `${key}=` : '' + out.push(pref + this.npm.config.get(key)) + } + this.npm.output(out.join('\n')) } - output(out.join('\n')) -} -const del = async keys => { - if (!keys.length) - throw UsageError() + async del (keys) { + if (!keys.length) + throw this.usageError() - const where = npm.flatOptions.global ? 'global' : 'user' - for (const key of keys) - npm.config.delete(key, where) - await npm.config.save(where) -} + const where = this.npm.flatOptions.global ? 'global' : 'user' + for (const key of keys) + this.npm.config.delete(key, where) + await this.npm.config.save(where) + } -const edit = async () => { - const { editor: e, global } = npm.flatOptions - const where = global ? 'global' : 'user' - const file = npm.config.data.get(where).source - - // save first, just to make sure it's synced up - // this also removes all the comments from the last time we edited it. - await npm.config.save(where) - - const data = ( - await readFile(file, 'utf8').catch(() => '') - ).replace(/\r\n/g, '\n') - const defData = Object.entries(defaults).reduce((str, [key, val]) => { - const obj = { [key]: val } - const i = ini.stringify(obj) - .replace(/\r\n/g, '\n') // normalizes output from ini.stringify - .replace(/\n$/m, '') - .replace(/^/g, '; ') - .replace(/\n/g, '\n; ') - .split('\n') - return str + '\n' + i - }, '') - - const tmpData = `;;;; + async edit () { + const { editor: e, global } = this.npm.flatOptions + const where = global ? 'global' : 'user' + const file = this.npm.config.data.get(where).source + + // save first, just to make sure it's synced up + // this also removes all the comments from the last time we edited it. + await this.npm.config.save(where) + + const data = ( + await readFile(file, 'utf8').catch(() => '') + ).replace(/\r\n/g, '\n') + const defData = Object.entries(defaults).reduce((str, [key, val]) => { + const obj = { [key]: val } + const i = ini.stringify(obj) + .replace(/\r\n/g, '\n') // normalizes output from ini.stringify + .replace(/\n$/m, '') + .replace(/^/g, '; ') + .replace(/\n/g, '\n; ') + .split('\n') + return str + '\n' + i + }, '') + + const tmpData = `;;;; ; npm ${where}config file: ${file} ; this is a simple ini-formatted file ; lines that start with semi-colons are comments @@ -190,64 +195,63 @@ ${data.split('\n').sort((a, b) => a.localeCompare(b)).join('\n').trim()} ${defData} `.split('\n').join(EOL) - await mkdirp(dirname(file)) - await writeFile(file, tmpData, 'utf8') - await new Promise((resolve, reject) => { - const [bin, ...args] = e.split(/\s+/) - const editor = spawn(bin, [...args, file], { stdio: 'inherit' }) - editor.on('exit', (code) => { - if (code) - return reject(new Error(`editor process exited with code: ${code}`)) - return resolve() + await mkdirp(dirname(file)) + await writeFile(file, tmpData, 'utf8') + await new Promise((resolve, reject) => { + const [bin, ...args] = e.split(/\s+/) + const editor = spawn(bin, [...args, file], { stdio: 'inherit' }) + editor.on('exit', (code) => { + if (code) + return reject(new Error(`editor process exited with code: ${code}`)) + return resolve() + }) }) - }) -} - -const publicVar = k => !/^(\/\/[^:]+:)?_/.test(k) + } -const list = async () => { - const msg = [] - const { long } = npm.flatOptions - for (const [where, { data, source }] of npm.config.data.entries()) { - if (where === 'default' && !long) - continue + async list () { + const msg = [] + const { long } = this.npm.flatOptions + for (const [where, { data, source }] of this.npm.config.data.entries()) { + if (where === 'default' && !long) + continue + + const keys = Object.keys(data).sort((a, b) => a.localeCompare(b)) + if (!keys.length) + continue + + msg.push(`; "${where}" config from ${source}`, '') + for (const k of keys) { + const v = publicVar(k) ? JSON.stringify(data[k]) : '(protected)' + const src = this.npm.config.find(k) + const overridden = src !== where + msg.push((overridden ? '; ' : '') + + `${k} = ${v} ${overridden ? `; overridden by ${src}` : ''}`) + } + msg.push('') + } - const keys = Object.keys(data).sort((a, b) => a.localeCompare(b)) - if (!keys.length) - continue - - msg.push(`; "${where}" config from ${source}`, '') - for (const k of keys) { - const v = publicVar(k) ? JSON.stringify(data[k]) : '(protected)' - const src = npm.config.find(k) - const overridden = src !== where - msg.push((overridden ? '; ' : '') + - `${k} = ${v} ${overridden ? `; overridden by ${src}` : ''}`) + if (!long) { + msg.push( + `; node bin location = ${process.execPath}`, + `; cwd = ${process.cwd()}`, + `; HOME = ${process.env.HOME}`, + '; Run `npm config ls -l` to show all defaults.' + ) } - msg.push('') - } - if (!long) { - msg.push( - `; node bin location = ${process.execPath}`, - `; cwd = ${process.cwd()}`, - `; HOME = ${process.env.HOME}`, - '; Run `npm config ls -l` to show all defaults.' - ) + this.npm.output(msg.join('\n').trim()) } - output(msg.join('\n').trim()) -} - -const listJson = async () => { - const publicConf = {} - for (const key in npm.config.list[0]) { - if (!publicVar(key)) - continue + async listJson () { + const publicConf = {} + for (const key in this.npm.config.list[0]) { + if (!publicVar(key)) + continue - publicConf[key] = npm.config.get(key) + publicConf[key] = this.npm.config.get(key) + } + this.npm.output(JSON.stringify(publicConf, null, 2)) } - output(JSON.stringify(publicConf, null, 2)) } -module.exports = Object.assign(cmd, { usage, completion }) +module.exports = Config diff --git a/deps/npm/lib/dedupe.js b/deps/npm/lib/dedupe.js index 2211fcac8b4819..50a56211fc8479 100644 --- a/deps/npm/lib/dedupe.js +++ b/deps/npm/lib/dedupe.js @@ -1,29 +1,36 @@ // dedupe duplicated packages, or find them in the tree -const npm = require('./npm.js') const Arborist = require('@npmcli/arborist') -const usageUtil = require('./utils/usage.js') const reifyFinish = require('./utils/reify-finish.js') -const usage = usageUtil('dedupe', 'npm dedupe') +const BaseCommand = require('./base-command.js') -const cmd = (args, cb) => dedupe(args).then(() => cb()).catch(cb) +class Dedupe extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'dedupe' + } -const dedupe = async (args) => { - if (npm.flatOptions.global) { - const er = new Error('`npm dedupe` does not work in global mode.') - er.code = 'EDEDUPEGLOBAL' - throw er + exec (args, cb) { + this.dedupe(args).then(() => cb()).catch(cb) } - const dryRun = (args && args.dryRun) || npm.flatOptions.dryRun - const where = npm.prefix - const arb = new Arborist({ - ...npm.flatOptions, - path: where, - dryRun, - }) - await arb.dedupe(npm.flatOptions) - await reifyFinish(arb) + async dedupe (args) { + if (this.npm.config.get('global')) { + const er = new Error('`npm dedupe` does not work in global mode.') + er.code = 'EDEDUPEGLOBAL' + throw er + } + + const dryRun = this.npm.config.get('dry-run') + const where = this.npm.prefix + const arb = new Arborist({ + ...this.npm.flatOptions, + path: where, + dryRun, + }) + await arb.dedupe(this.npm.flatOptions) + await reifyFinish(this.npm, arb) + } } -module.exports = Object.assign(cmd, { usage }) +module.exports = Dedupe diff --git a/deps/npm/lib/deprecate.js b/deps/npm/lib/deprecate.js index 42d099b544e31d..a0c67f805d2f92 100644 --- a/deps/npm/lib/deprecate.js +++ b/deps/npm/lib/deprecate.js @@ -1,73 +1,75 @@ -const npm = require('./npm.js') const fetch = require('npm-registry-fetch') const otplease = require('./utils/otplease.js') const npa = require('npm-package-arg') const semver = require('semver') const getIdentity = require('./utils/get-identity.js') const libaccess = require('libnpmaccess') -const usageUtil = require('./utils/usage.js') +const BaseCommand = require('./base-command.js') -const UsageError = () => - Object.assign(new Error(`\nUsage: ${usage}`), { - code: 'EUSAGE', - }) +class Deprecate extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'deprecate' + } -const usage = usageUtil( - 'deprecate', - 'npm deprecate [@] ' -) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[@] '] + } -const completion = async (opts) => { - if (opts.conf.argv.remain.length > 1) - return [] + async completion (opts) { + if (opts.conf.argv.remain.length > 1) + return [] - const username = await getIdentity(npm.flatOptions) - const packages = await libaccess.lsPackages(username, npm.flatOptions) - return Object.keys(packages) - .filter((name) => - packages[name] === 'write' && - (opts.conf.argv.remain.length === 0 || - name.startsWith(opts.conf.argv.remain[0]))) -} - -const cmd = (args, cb) => - deprecate(args) - .then(() => cb()) - .catch(err => cb(err.code === 'EUSAGE' ? err.message : err)) + const username = await getIdentity(this.npm, this.npm.flatOptions) + const packages = await libaccess.lsPackages(username, this.npm.flatOptions) + return Object.keys(packages) + .filter((name) => + packages[name] === 'write' && + (opts.conf.argv.remain.length === 0 || + name.startsWith(opts.conf.argv.remain[0]))) + } -const deprecate = async ([pkg, msg]) => { - if (!pkg || !msg) - throw UsageError() + exec (args, cb) { + this.deprecate(args) + .then(() => cb()) + .catch(err => cb(err.code === 'EUSAGE' ? err.message : err)) + } - // fetch the data and make sure it exists. - const p = npa(pkg) - // npa makes the default spec "latest", but for deprecation - // "*" is the appropriate default. - const spec = p.rawSpec === '' ? '*' : p.fetchSpec + async deprecate ([pkg, msg]) { + if (!pkg || !msg) + throw this.usageError() - if (semver.validRange(spec, true) === null) - throw new Error(`invalid version range: ${spec}`) + // fetch the data and make sure it exists. + const p = npa(pkg) + // npa makes the default spec "latest", but for deprecation + // "*" is the appropriate default. + const spec = p.rawSpec === '' ? '*' : p.fetchSpec - const uri = '/' + p.escapedName - const packument = await fetch.json(uri, { - ...npm.flatOptions, - spec: p, - query: { write: true }, - }) + if (semver.validRange(spec, true) === null) + throw new Error(`invalid version range: ${spec}`) - Object.keys(packument.versions) - .filter(v => semver.satisfies(v, spec, { includePrerelease: true })) - .forEach(v => { - packument.versions[v].deprecated = msg + const uri = '/' + p.escapedName + const packument = await fetch.json(uri, { + ...this.npm.flatOptions, + spec: p, + query: { write: true }, }) - return otplease(npm.flatOptions, opts => fetch(uri, { - ...opts, - spec: p, - method: 'PUT', - body: packument, - ignoreBody: true, - })) + Object.keys(packument.versions) + .filter(v => semver.satisfies(v, spec, { includePrerelease: true })) + .forEach(v => { + packument.versions[v].deprecated = msg + }) + + return otplease(this.npm.flatOptions, opts => fetch(uri, { + ...opts, + spec: p, + method: 'PUT', + body: packument, + ignoreBody: true, + })) + } } -module.exports = Object.assign(cmd, { completion, usage }) +module.exports = Deprecate diff --git a/deps/npm/lib/diff.js b/deps/npm/lib/diff.js index 9ef5a78a20ce9e..0e322ec6438494 100644 --- a/deps/npm/lib/diff.js +++ b/deps/npm/lib/diff.js @@ -8,258 +8,271 @@ const npmlog = require('npmlog') const pacote = require('pacote') const pickManifest = require('npm-pick-manifest') -const npm = require('./npm.js') -const usageUtil = require('./utils/usage.js') -const output = require('./utils/output.js') const readLocalPkg = require('./utils/read-local-package.js') +const BaseCommand = require('./base-command.js') -const usage = usageUtil( - 'diff', - 'npm diff [...]' + - '\nnpm diff --diff= [...]' + - '\nnpm diff --diff= [--diff=] [...]' + - '\nnpm diff --diff= [--diff=] [...]' + - '\nnpm diff [--diff-ignore-all-space] [--diff-name-only] [...] [...]' -) - -const cmd = (args, cb) => diff(args).then(() => cb()).catch(cb) - -const where = () => { - const globalTop = resolve(npm.globalDir, '..') - const { global } = npm.flatOptions - return global ? globalTop : npm.prefix -} +class Diff extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'diff' + } -const diff = async (args) => { - const specs = npm.flatOptions.diff.filter(d => d) - if (specs.length > 2) { - throw new TypeError( - 'Can\'t use more than two --diff arguments.\n\n' + - `Usage:\n${usage}` - ) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + '[...]', + '--diff= [...]', + '--diff= [--diff=] [...]', + '--diff= [--diff=] [...]', + '[--diff-ignore-all-space] [--diff-name-only] [...] [...]', + ] } - const [a, b] = await retrieveSpecs(specs) - npmlog.info('diff', { src: a, dst: b }) + get where () { + const globalTop = resolve(this.npm.globalDir, '..') + const { global } = this.npm.flatOptions + return global ? globalTop : this.npm.prefix + } - const res = await libdiff([a, b], { ...npm.flatOptions, diffFiles: args }) - return output(res) -} + exec (args, cb) { + this.diff(args).then(() => cb()).catch(cb) + } -const retrieveSpecs = ([a, b]) => { - // no arguments, defaults to comparing cwd - // to its latest published registry version - if (!a) - return defaultSpec() + async diff (args) { + const specs = this.npm.flatOptions.diff.filter(d => d) + if (specs.length > 2) { + throw new TypeError( + 'Can\'t use more than two --diff arguments.\n\n' + + `Usage:\n${this.usage}` + ) + } - // single argument, used to compare wanted versions of an - // installed dependency or to compare the cwd to a published version - if (!b) - return transformSingleSpec(a) + const [a, b] = await this.retrieveSpecs(specs) + npmlog.info('diff', { src: a, dst: b }) - return convertVersionsToSpecs([a, b]) - .then(findVersionsByPackageName) -} - -const defaultSpec = async () => { - let noPackageJson - let pkgName - try { - pkgName = await readLocalPkg() - } catch (e) { - npmlog.verbose('diff', 'could not read project dir package.json') - noPackageJson = true + const res = await libdiff([a, b], { + ...this.npm.flatOptions, + diffFiles: args, + where: this.where, + }) + return this.npm.output(res) } - if (!pkgName || noPackageJson) { - throw new Error( - 'Needs multiple arguments to compare or run from a project dir.\n\n' + - `Usage:\n${usage}` - ) - } + async retrieveSpecs ([a, b]) { + // no arguments, defaults to comparing cwd + // to its latest published registry version + if (!a) + return this.defaultSpec() - return [ - `${pkgName}@${npm.flatOptions.defaultTag}`, - `file:${npm.prefix}`, - ] -} + // single argument, used to compare wanted versions of an + // installed dependency or to compare the cwd to a published version + if (!b) + return this.transformSingleSpec(a) -const transformSingleSpec = async (a) => { - let noPackageJson - let pkgName - try { - pkgName = await readLocalPkg() - } catch (e) { - npmlog.verbose('diff', 'could not read project dir package.json') - noPackageJson = true + const specs = await this.convertVersionsToSpecs([a, b]) + return this.findVersionsByPackageName(specs) } - const missingPackageJson = new Error( - 'Needs multiple arguments to compare or run from a project dir.\n\n' + - `Usage:\n${usage}` - ) - const specSelf = () => { - if (noPackageJson) - throw missingPackageJson - - return `file:${npm.prefix}` - } + async defaultSpec () { + let noPackageJson + let pkgName + try { + pkgName = await readLocalPkg(this.npm) + } catch (e) { + npmlog.verbose('diff', 'could not read project dir package.json') + noPackageJson = true + } - // using a valid semver range, that means it should just diff - // the cwd against a published version to the registry using the - // same project name and the provided semver range - if (semver.validRange(a)) { - if (!pkgName) - throw missingPackageJson + if (!pkgName || noPackageJson) { + throw new Error( + 'Needs multiple arguments to compare or run from a project dir.\n\n' + + `Usage:\n${this.usage}` + ) + } return [ - `${pkgName}@${a}`, - specSelf(), + `${pkgName}@${this.npm.flatOptions.defaultTag}`, + `file:${this.npm.prefix}`, ] } - // when using a single package name as arg and it's part of the current - // install tree, then retrieve the current installed version and compare - // it against the same value `npm outdated` would suggest you to update to - const spec = npa(a) - if (spec.registry) { - let actualTree - let node + async transformSingleSpec (a) { + let noPackageJson + let pkgName try { - const opts = { - ...npm.flatOptions, - path: where(), - } - const arb = new Arborist(opts) - actualTree = await arb.loadActual(opts) - node = actualTree && - actualTree.inventory.query('name', spec.name) - .values().next().value + pkgName = await readLocalPkg(this.npm) } catch (e) { - npmlog.verbose('diff', 'failed to load actual install tree') + npmlog.verbose('diff', 'could not read project dir package.json') + noPackageJson = true + } + const missingPackageJson = new Error( + 'Needs multiple arguments to compare or run from a project dir.\n\n' + + `Usage:\n${this.usage}` + ) + + const specSelf = () => { + if (noPackageJson) + throw missingPackageJson + + return `file:${this.npm.prefix}` } - if (!node || !node.name || !node.package || !node.package.version) { + // using a valid semver range, that means it should just diff + // the cwd against a published version to the registry using the + // same project name and the provided semver range + if (semver.validRange(a)) { + if (!pkgName) + throw missingPackageJson + return [ - `${spec.name}@${spec.fetchSpec}`, + `${pkgName}@${a}`, specSelf(), ] } - const tryRootNodeSpec = () => - (actualTree && actualTree.edgesOut.get(spec.name) || {}).spec - - const tryAnySpec = () => { - for (const edge of node.edgesIn) - return edge.spec - } + // when using a single package name as arg and it's part of the current + // install tree, then retrieve the current installed version and compare + // it against the same value `npm outdated` would suggest you to update to + const spec = npa(a) + if (spec.registry) { + let actualTree + let node + try { + const opts = { + ...this.npm.flatOptions, + path: this.where, + } + const arb = new Arborist(opts) + actualTree = await arb.loadActual(opts) + node = actualTree && + actualTree.inventory.query('name', spec.name) + .values().next().value + } catch (e) { + npmlog.verbose('diff', 'failed to load actual install tree') + } - const aSpec = `file:${node.realpath}` - - // finds what version of the package to compare against, if a exact - // version or tag was passed than it should use that, otherwise - // work from the top of the arborist tree to find the original semver - // range declared in the package that depends on the package. - let bSpec - if (spec.rawSpec) - bSpec = spec.rawSpec - else { - const bTargetVersion = - tryRootNodeSpec() - || tryAnySpec() - - // figure out what to compare against, - // follows same logic to npm outdated "Wanted" results - const packument = await pacote.packument(spec, { - ...npm.flatOptions, - preferOnline: true, - }) - bSpec = pickManifest( - packument, - bTargetVersion, - { ...npm.flatOptions } - ).version - } + if (!node || !node.name || !node.package || !node.package.version) { + return [ + `${spec.name}@${spec.fetchSpec}`, + specSelf(), + ] + } - return [ - `${spec.name}@${aSpec}`, - `${spec.name}@${bSpec}`, - ] - } else if (spec.type === 'directory') { - return [ - `file:${spec.fetchSpec}`, - specSelf(), - ] - } else { - throw new Error( - 'Spec type not supported.\n\n' + - `Usage:\n${usage}` - ) - } -} + const tryRootNodeSpec = () => + (actualTree && actualTree.edgesOut.get(spec.name) || {}).spec -const convertVersionsToSpecs = async ([a, b]) => { - const semverA = semver.validRange(a) - const semverB = semver.validRange(b) + const tryAnySpec = () => { + for (const edge of node.edgesIn) + return edge.spec + } - // both specs are semver versions, assume current project dir name - if (semverA && semverB) { - let pkgName - try { - pkgName = await readLocalPkg() - } catch (e) { - npmlog.verbose('diff', 'could not read project dir package.json') - } + const aSpec = `file:${node.realpath}` + + // finds what version of the package to compare against, if a exact + // version or tag was passed than it should use that, otherwise + // work from the top of the arborist tree to find the original semver + // range declared in the package that depends on the package. + let bSpec + if (spec.rawSpec) + bSpec = spec.rawSpec + else { + const bTargetVersion = + tryRootNodeSpec() + || tryAnySpec() + + // figure out what to compare against, + // follows same logic to npm outdated "Wanted" results + const packument = await pacote.packument(spec, { + ...this.npm.flatOptions, + preferOnline: true, + }) + bSpec = pickManifest( + packument, + bTargetVersion, + { ...this.npm.flatOptions } + ).version + } - if (!pkgName) { + return [ + `${spec.name}@${aSpec}`, + `${spec.name}@${bSpec}`, + ] + } else if (spec.type === 'directory') { + return [ + `file:${spec.fetchSpec}`, + specSelf(), + ] + } else { throw new Error( - 'Needs to be run from a project dir in order to diff two versions.\n\n' + - `Usage:\n${usage}` + 'Spec type not supported.\n\n' + + `Usage:\n${this.usage}` ) } - return [`${pkgName}@${a}`, `${pkgName}@${b}`] } - // otherwise uses the name from the other arg to - // figure out the spec.name of what to compare - if (!semverA && semverB) - return [a, `${npa(a).name}@${b}`] + async convertVersionsToSpecs ([a, b]) { + const semverA = semver.validRange(a) + const semverB = semver.validRange(b) + + // both specs are semver versions, assume current project dir name + if (semverA && semverB) { + let pkgName + try { + pkgName = await readLocalPkg(this.npm) + } catch (e) { + npmlog.verbose('diff', 'could not read project dir package.json') + } + + if (!pkgName) { + throw new Error( + 'Needs to be run from a project dir in order to diff two versions.\n\n' + + `Usage:\n${this.usage}` + ) + } + return [`${pkgName}@${a}`, `${pkgName}@${b}`] + } - if (semverA && !semverB) - return [`${npa(b).name}@${a}`, b] + // otherwise uses the name from the other arg to + // figure out the spec.name of what to compare + if (!semverA && semverB) + return [a, `${npa(a).name}@${b}`] - // no valid semver ranges used - return [a, b] -} + if (semverA && !semverB) + return [`${npa(b).name}@${a}`, b] -const findVersionsByPackageName = async (specs) => { - let actualTree - try { - const opts = { - ...npm.flatOptions, - path: where(), - } - const arb = new Arborist(opts) - actualTree = await arb.loadActual(opts) - } catch (e) { - npmlog.verbose('diff', 'failed to load actual install tree') + // no valid semver ranges used + return [a, b] } - return specs.map(i => { - const spec = npa(i) - if (spec.rawSpec) - return i + async findVersionsByPackageName (specs) { + let actualTree + try { + const opts = { + ...this.npm.flatOptions, + path: this.where, + } + const arb = new Arborist(opts) + actualTree = await arb.loadActual(opts) + } catch (e) { + npmlog.verbose('diff', 'failed to load actual install tree') + } + + return specs.map(i => { + const spec = npa(i) + if (spec.rawSpec) + return i - const node = actualTree - && actualTree.inventory.query('name', spec.name) - .values().next().value + const node = actualTree + && actualTree.inventory.query('name', spec.name) + .values().next().value - const res = !node || !node.package || !node.package.version - ? spec.fetchSpec - : `file:${node.realpath}` + const res = !node || !node.package || !node.package.version + ? spec.fetchSpec + : `file:${node.realpath}` - return `${spec.name}@${res}` - }) + return `${spec.name}@${res}` + }) + } } -module.exports = Object.assign(cmd, { usage }) +module.exports = Diff diff --git a/deps/npm/lib/dist-tag.js b/deps/npm/lib/dist-tag.js index e958bb75442229..cdc95ac6f0cd7a 100644 --- a/deps/npm/lib/dist-tag.js +++ b/deps/npm/lib/dist-tag.js @@ -3,69 +3,77 @@ const npa = require('npm-package-arg') const regFetch = require('npm-registry-fetch') const semver = require('semver') -const npm = require('./npm.js') -const output = require('./utils/output.js') const otplease = require('./utils/otplease.js') const readLocalPkgName = require('./utils/read-local-package.js') -const usageUtil = require('./utils/usage.js') - -const usage = usageUtil( - 'dist-tag', - 'npm dist-tag add @ []' + - '\nnpm dist-tag rm ' + - '\nnpm dist-tag ls []' -) - -const completion = async (opts) => { - const argv = opts.conf.argv.remain - if (argv.length === 2) - return ['add', 'rm', 'ls'] - - switch (argv[2]) { - default: - return [] +const BaseCommand = require('./base-command.js') + +class DistTag extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'dist-tag' + } + + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + 'add @ []', + 'rm ', + 'ls []', + ] + } + + async completion (opts) { + const argv = opts.conf.argv.remain + if (argv.length === 2) + return ['add', 'rm', 'ls'] + + switch (argv[2]) { + default: + return [] + } } -} -const cmd = (args, cb) => distTag(args).then(() => cb()).catch(cb) + exec (args, cb) { + this.distTag(args).then(() => cb()).catch(cb) + } -const distTag = async ([cmdName, pkg, tag]) => { - const opts = npm.flatOptions - const has = (items) => new Set(items).has(cmdName) + async distTag ([cmdName, pkg, tag]) { + const opts = this.npm.flatOptions + const has = (items) => new Set(items).has(cmdName) - if (has(['add', 'a', 'set', 's'])) - return add(pkg, tag, opts) + if (has(['add', 'a', 'set', 's'])) + return this.add(pkg, tag, opts) - if (has(['rm', 'r', 'del', 'd', 'remove'])) - return remove(pkg, tag, opts) + if (has(['rm', 'r', 'del', 'd', 'remove'])) + return this.remove(pkg, tag, opts) - if (has(['ls', 'l', 'sl', 'list'])) - return list(pkg, opts) + if (has(['ls', 'l', 'sl', 'list'])) + return this.list(pkg, opts) - if (!pkg) { - // when only using the pkg name the default behavior - // should be listing the existing tags - return list(cmdName, opts) - } else - throw usage -} + if (!pkg) { + // when only using the pkg name the default behavior + // should be listing the existing tags + return this.list(cmdName, opts) + } else + throw this.usage + } -function add (spec, tag, opts) { - spec = npa(spec || '') - const version = spec.rawSpec - const defaultTag = tag || opts.defaultTag + async add (spec, tag, opts) { + spec = npa(spec || '') + const version = spec.rawSpec + const defaultTag = tag || opts.defaultTag - log.verbose('dist-tag add', defaultTag, 'to', spec.name + '@' + version) + log.verbose('dist-tag add', defaultTag, 'to', spec.name + '@' + version) - if (!spec.name || !version || !defaultTag) - throw usage + if (!spec.name || !version || !defaultTag) + throw this.usage - const t = defaultTag.trim() + const t = defaultTag.trim() - if (semver.validRange(t)) - throw new Error('Tag name must not be a valid SemVer range: ' + t) + if (semver.validRange(t)) + throw new Error('Tag name must not be a valid SemVer range: ' + t) - return fetchTags(spec, opts).then(tags => { + const tags = await this.fetchTags(spec, opts) if (tags[t] === version) { log.warn('dist-tag add', t, 'is already set to version', version) return @@ -82,20 +90,18 @@ function add (spec, tag, opts) { }, spec, } - return otplease(reqOpts, reqOpts => regFetch(url, reqOpts)).then(() => { - output(`+${t}: ${spec.name}@${version}`) - }) - }) -} + await otplease(reqOpts, reqOpts => regFetch(url, reqOpts)) + this.npm.output(`+${t}: ${spec.name}@${version}`) + } -function remove (spec, tag, opts) { - spec = npa(spec || '') - log.verbose('dist-tag del', tag, 'from', spec.name) + async remove (spec, tag, opts) { + spec = npa(spec || '') + log.verbose('dist-tag del', tag, 'from', spec.name) - if (!spec.name) - throw usage + if (!spec.name) + throw this.usage - return fetchTags(spec, opts).then(tags => { + const tags = await this.fetchTags(spec, opts) if (!tags[tag]) { log.info('dist-tag del', tag, 'is not a dist-tag on', spec.name) throw new Error(tag + ' is not a dist-tag on ' + spec.name) @@ -109,50 +115,43 @@ function remove (spec, tag, opts) { method: 'DELETE', spec, } - return otplease(reqOpts, reqOpts => regFetch(url, reqOpts)).then(() => { - output(`-${tag}: ${spec.name}@${version}`) - }) - }) -} + await otplease(reqOpts, reqOpts => regFetch(url, reqOpts)) + this.npm.output(`-${tag}: ${spec.name}@${version}`) + } -function list (spec, opts) { - if (!spec) { - return readLocalPkgName().then(pkg => { + async list (spec, opts) { + if (!spec) { + const pkg = await readLocalPkgName(this.npm) if (!pkg) - throw usage + throw this.usage - return list(pkg, opts) - }) + return this.list(pkg, opts) + } + spec = npa(spec) + + try { + const tags = await this.fetchTags(spec, opts) + const msg = + Object.keys(tags).map(k => `${k}: ${tags[k]}`).sort().join('\n') + this.npm.output(msg) + return tags + } catch (err) { + log.error('dist-tag ls', "Couldn't get dist-tag data for", spec) + throw err + } } - spec = npa(spec) - - return fetchTags(spec, opts).then(tags => { - const msg = - Object.keys(tags).map(k => `${k}: ${tags[k]}`).sort().join('\n') - output(msg) - return tags - }, err => { - log.error('dist-tag ls', "Couldn't get dist-tag data for", spec) - throw err - }) -} -function fetchTags (spec, opts) { - return regFetch.json( - `/-/package/${spec.escapedName}/dist-tags`, - { - ...opts, - 'prefer-online': true, - spec, - } - ).then(data => { + async fetchTags (spec, opts) { + const data = await regFetch.json( + `/-/package/${spec.escapedName}/dist-tags`, + { ...opts, 'prefer-online': true, spec } + ) if (data && typeof data === 'object') delete data._etag if (!data || !Object.keys(data).length) throw new Error('No dist-tags found for ' + spec.name) return data - }) + } } - -module.exports = Object.assign(cmd, { usage, completion }) +module.exports = DistTag diff --git a/deps/npm/lib/docs.js b/deps/npm/lib/docs.js index fa0adb3d373091..2dad7a26db4e74 100644 --- a/deps/npm/lib/docs.js +++ b/deps/npm/lib/docs.js @@ -1,39 +1,47 @@ const log = require('npmlog') const pacote = require('pacote') -const { promisify } = require('util') -const openUrl = promisify(require('./utils/open-url.js')) +const openUrl = require('./utils/open-url.js') const usageUtil = require('./utils/usage.js') -const npm = require('./npm.js') const hostedFromMani = require('./utils/hosted-git-info-from-manifest.js') -const usage = usageUtil('docs', 'npm docs [ [ ...]]') - -const cmd = (args, cb) => docs(args).then(() => cb()).catch(cb) - -const docs = async args => { - if (!args || !args.length) - args = ['.'] - - await Promise.all(args.map(pkg => getDocs(pkg))) -} - -const getDocsUrl = mani => { - if (mani.homepage) - return mani.homepage - - const info = hostedFromMani(mani) - if (info) - return info.docs() - - return 'https://www.npmjs.com/package/' + mani.name +class Docs { + constructor (npm) { + this.npm = npm + } + + /* istanbul ignore next - see test/lib/load-all-commands.js */ + get usage () { + return usageUtil('docs', 'npm docs [ [ ...]]') + } + + exec (args, cb) { + this.docs(args).then(() => cb()).catch(cb) + } + + async docs (args) { + if (!args || !args.length) + args = ['.'] + + await Promise.all(args.map(pkg => this.getDocs(pkg))) + } + + async getDocs (pkg) { + const opts = { ...this.npm.flatOptions, fullMetadata: true } + const mani = await pacote.manifest(pkg, opts) + const url = this.getDocsUrl(mani) + log.silly('docs', 'url', url) + await openUrl(this.npm, url, `${mani.name} docs available at the following URL`) + } + + getDocsUrl (mani) { + if (mani.homepage) + return mani.homepage + + const info = hostedFromMani(mani) + if (info) + return info.docs() + + return 'https://www.npmjs.com/package/' + mani.name + } } - -const getDocs = async pkg => { - const opts = { ...npm.flatOptions, fullMetadata: true } - const mani = await pacote.manifest(pkg, opts) - const url = getDocsUrl(mani) - log.silly('docs', 'url', url) - await openUrl(url, `${mani.name} docs available at the following URL`) -} - -module.exports = Object.assign(cmd, { usage }) +module.exports = Docs diff --git a/deps/npm/lib/doctor.js b/deps/npm/lib/doctor.js index e149aec1286d54..fbe44714140aad 100644 --- a/deps/npm/lib/doctor.js +++ b/deps/npm/lib/doctor.js @@ -1,79 +1,20 @@ -const npm = require('./npm.js') - +const cacache = require('cacache') const chalk = require('chalk') -const ansiTrim = require('./utils/ansi-trim.js') +const fs = require('fs') +const fetch = require('make-fetch-happen') const table = require('text-table') -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') -const usage = usageUtil('doctor', 'npm doctor') -const { resolve } = require('path') - -const ping = require('./utils/ping.js') -const checkPing = async () => { - const tracker = npm.log.newItem('checkPing', 1) - tracker.info('checkPing', 'Pinging registry') - try { - await ping(npm.flatOptions) - return '' - } catch (er) { - if (/^E\d{3}$/.test(er.code || '')) - throw er.code.substr(1) + ' ' + er.message - else - throw er.message - } finally { - tracker.finish() - } -} - +const which = require('which') const pacote = require('pacote') -const getLatestNpmVersion = async () => { - const tracker = npm.log.newItem('getLatestNpmVersion', 1) - tracker.info('getLatestNpmVersion', 'Getting npm package information') - try { - const latest = (await pacote.manifest('npm@latest', npm.flatOptions)).version - if (semver.gte(npm.version, latest)) - return `current: v${npm.version}, latest: v${latest}` - else - throw `Use npm v${latest}` - } finally { - tracker.finish() - } -} - +const { resolve } = require('path') const semver = require('semver') -const fetch = require('make-fetch-happen') -const getLatestNodejsVersion = async () => { - // XXX get the latest in the current major as well - const current = process.version - const currentRange = `^${current}` - const url = 'https://nodejs.org/dist/index.json' - const tracker = npm.log.newItem('getLatestNodejsVersion', 1) - tracker.info('getLatestNodejsVersion', 'Getting Node.js release information') - try { - const res = await fetch(url, { method: 'GET', ...npm.flatOptions }) - const data = await res.json() - let maxCurrent = '0.0.0' - let maxLTS = '0.0.0' - for (const { lts, version } of data) { - if (lts && semver.gt(version, maxLTS)) - maxLTS = version - - if (semver.satisfies(version, currentRange) && - semver.gt(version, maxCurrent)) - maxCurrent = version - } - const recommended = semver.gt(maxCurrent, maxLTS) ? maxCurrent : maxLTS - if (semver.gte(process.version, recommended)) - return `current: ${current}, recommended: ${recommended}` - else - throw `Use node ${recommended} (current: ${current})` - } finally { - tracker.finish() - } -} - const { promisify } = require('util') -const fs = require('fs') +const ansiTrim = require('./utils/ansi-trim.js') +const isWindows = require('./utils/is-windows.js') +const ping = require('./utils/ping.js') +const { defaults: { registry: defaultRegistry } } = require('./utils/config.js') +const lstat = promisify(fs.lstat) +const readdir = promisify(fs.readdir) +const access = promisify(fs.access) const { R_OK, W_OK, X_OK } = fs.constants const maskLabel = mask => { const label = [] @@ -88,200 +29,265 @@ const maskLabel = mask => { return label.join(', ') } -const lstat = promisify(fs.lstat) -const readdir = promisify(fs.readdir) -const access = promisify(fs.access) -const isWindows = require('./utils/is-windows.js') -const checkFilesPermission = async (root, shouldOwn, mask = null) => { - if (mask === null) - mask = shouldOwn ? R_OK | W_OK : R_OK - - let ok = true - - const tracker = npm.log.newItem(root, 1) - - try { - const uid = process.getuid() - const gid = process.getgid() - const files = new Set([root]) - for (const f of files) { - tracker.silly('checkFilesPermission', f.substr(root.length + 1)) - const st = await lstat(f) - .catch(er => { - ok = false - tracker.warn('checkFilesPermission', 'error getting info for ' + f) - }) - tracker.completeWork(1) - - if (!st) - continue - - if (shouldOwn && (uid !== st.uid || gid !== st.gid)) { - tracker.warn('checkFilesPermission', 'should be owner of ' + f) - ok = false - } +const BaseCommand = require('./base-command.js') +class Doctor extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'doctor' + } - if (!st.isDirectory() && !st.isFile()) - continue + exec (args, cb) { + this.doctor(args).then(() => cb()).catch(cb) + } + async doctor (args) { + this.npm.log.info('Running checkup') + + // each message is [title, ok, message] + const messages = [] + + const actions = [ + ['npm ping', 'checkPing', []], + ['npm -v', 'getLatestNpmVersion', []], + ['node -v', 'getLatestNodejsVersion', []], + ['npm config get registry', 'checkNpmRegistry', []], + ['which git', 'getGitPath', []], + ...(isWindows ? [] : [ + ['Perms check on cached files', 'checkFilesPermission', [this.npm.cache, true, R_OK]], + ['Perms check on local node_modules', 'checkFilesPermission', [this.npm.localDir, true]], + ['Perms check on global node_modules', 'checkFilesPermission', [this.npm.globalDir, false]], + ['Perms check on local bin folder', 'checkFilesPermission', [this.npm.localBin, false, R_OK | W_OK | X_OK]], + ['Perms check on global bin folder', 'checkFilesPermission', [this.npm.globalBin, false, X_OK]], + ]), + ['Verify cache contents', 'verifyCachedFiles', [this.npm.flatOptions.cache]], + // TODO: + // - ensure arborist.loadActual() runs without errors and no invalid edges + // - ensure package-lock.json matches loadActual() + // - verify loadActual without hidden lock file matches hidden lockfile + // - verify all local packages have bins linked + ] + + // Do the actual work + for (const [msg, fn, args] of actions) { + const line = [msg] try { - await access(f, mask) + line.push(true, await this[fn](...args)) } catch (er) { - ok = false - const msg = `Missing permissions on ${f} (expect: ${maskLabel(mask)})` - tracker.error('checkFilesPermission', msg) - continue + line.push(false, er) } + messages.push(line) + } - if (st.isDirectory()) { - const entries = await readdir(f) - .catch(er => { - ok = false - tracker.warn('checkFilesPermission', 'error reading directory ' + f) - return [] - }) - for (const entry of entries) - files.add(resolve(f, entry)) + const outHead = ['Check', 'Value', 'Recommendation/Notes'] + .map(!this.npm.color ? h => h : h => chalk.underline(h)) + let allOk = true + const outBody = messages.map(!this.npm.color + ? item => { + allOk = allOk && item[1] + item[1] = item[1] ? 'ok' : 'not ok' + item[2] = String(item[2]) + return item } + : item => { + allOk = allOk && item[1] + if (!item[1]) { + item[0] = chalk.red(item[0]) + item[2] = chalk.magenta(String(item[2])) + } + item[1] = item[1] ? chalk.green('ok') : chalk.red('not ok') + return item + }) + const outTable = [outHead, ...outBody] + const tableOpts = { + stringLength: s => ansiTrim(s).length, + } + + const silent = this.npm.log.levels[this.npm.log.level] > + this.npm.log.levels.error + if (!silent) { + this.npm.output(table(outTable, tableOpts)) + if (!allOk) + console.error('') } - } finally { - tracker.finish() - if (!ok) { - throw `Check the permissions of files in ${root}` + - (shouldOwn ? ' (should be owned by current user)' : '') - } else + if (!allOk) + throw 'Some problems found. See above for recommendations.' + } + + async checkPing () { + const tracker = this.npm.log.newItem('checkPing', 1) + tracker.info('checkPing', 'Pinging registry') + try { + await ping(this.npm.flatOptions) return '' + } catch (er) { + if (/^E\d{3}$/.test(er.code || '')) + throw er.code.substr(1) + ' ' + er.message + else + throw er.message + } finally { + tracker.finish() + } } -} -const which = require('which') -const getGitPath = async () => { - const tracker = npm.log.newItem('getGitPath', 1) - tracker.info('getGitPath', 'Finding git in your PATH') - try { - return await which('git').catch(er => { - tracker.warn(er) - throw "Install git and ensure it's in your PATH." - }) - } finally { - tracker.finish() + async getLatestNpmVersion () { + const tracker = this.npm.log.newItem('getLatestNpmVersion', 1) + tracker.info('getLatestNpmVersion', 'Getting npm package information') + try { + const latest = (await pacote.manifest('npm@latest', this.npm.flatOptions)).version + if (semver.gte(this.npm.version, latest)) + return `current: v${this.npm.version}, latest: v${latest}` + else + throw `Use npm v${latest}` + } finally { + tracker.finish() + } } -} -const cacache = require('cacache') -const verifyCachedFiles = async () => { - const tracker = npm.log.newItem('verifyCachedFiles', 1) - tracker.info('verifyCachedFiles', 'Verifying the npm cache') - try { - const stats = await cacache.verify(npm.flatOptions.cache) - const { - badContentCount, - reclaimedCount, - missingContent, - reclaimedSize, - } = stats - if (badContentCount || reclaimedCount || missingContent) { - if (badContentCount) - tracker.warn('verifyCachedFiles', `Corrupted content removed: ${badContentCount}`) - - if (reclaimedCount) - tracker.warn('verifyCachedFiles', `Content garbage-collected: ${reclaimedCount} (${reclaimedSize} bytes)`) - - if (missingContent) - tracker.warn('verifyCachedFiles', `Missing content: ${missingContent}`) - - tracker.warn('verifyCachedFiles', 'Cache issues have been fixed') + async getLatestNodejsVersion () { + // XXX get the latest in the current major as well + const current = process.version + const currentRange = `^${current}` + const url = 'https://nodejs.org/dist/index.json' + const tracker = this.npm.log.newItem('getLatestNodejsVersion', 1) + tracker.info('getLatestNodejsVersion', 'Getting Node.js release information') + try { + const res = await fetch(url, { method: 'GET', ...this.npm.flatOptions }) + const data = await res.json() + let maxCurrent = '0.0.0' + let maxLTS = '0.0.0' + for (const { lts, version } of data) { + if (lts && semver.gt(version, maxLTS)) + maxLTS = version + + if (semver.satisfies(version, currentRange) && + semver.gt(version, maxCurrent)) + maxCurrent = version + } + const recommended = semver.gt(maxCurrent, maxLTS) ? maxCurrent : maxLTS + if (semver.gte(process.version, recommended)) + return `current: ${current}, recommended: ${recommended}` + else + throw `Use node ${recommended} (current: ${current})` + } finally { + tracker.finish() } - tracker.info('verifyCachedFiles', `Verification complete. Stats: ${ - JSON.stringify(stats, null, 2) - }`) - return `verified ${stats.verifiedContent} tarballs` - } finally { - tracker.finish() } -} -const { defaults: { registry: defaultRegistry } } = require('./utils/config.js') -const checkNpmRegistry = async () => { - if (npm.flatOptions.registry !== defaultRegistry) - throw `Try \`npm config set registry=${defaultRegistry}\`` - else - return `using default registry (${defaultRegistry})` -} + async checkFilesPermission (root, shouldOwn, mask = null) { + if (mask === null) + mask = shouldOwn ? R_OK | W_OK : R_OK + + let ok = true + + const tracker = this.npm.log.newItem(root, 1) -const cmd = (args, cb) => doctor(args).then(() => cb()).catch(cb) - -const doctor = async args => { - npm.log.info('Running checkup') - - // each message is [title, ok, message] - const messages = [] - - const actions = [ - ['npm ping', checkPing, []], - ['npm -v', getLatestNpmVersion, []], - ['node -v', getLatestNodejsVersion, []], - ['npm config get registry', checkNpmRegistry, []], - ['which git', getGitPath, []], - ...(isWindows ? [] : [ - ['Perms check on cached files', checkFilesPermission, [npm.cache, true, R_OK]], - ['Perms check on local node_modules', checkFilesPermission, [npm.localDir, true]], - ['Perms check on global node_modules', checkFilesPermission, [npm.globalDir, false]], - ['Perms check on local bin folder', checkFilesPermission, [npm.localBin, false, R_OK | W_OK | X_OK]], - ['Perms check on global bin folder', checkFilesPermission, [npm.globalBin, false, X_OK]], - ]), - ['Verify cache contents', verifyCachedFiles, [npm.flatOptions.cache]], - // TODO: - // - ensure arborist.loadActual() runs without errors and no invalid edges - // - ensure package-lock.json matches loadActual() - // - verify loadActual without hidden lock file matches hidden lockfile - // - verify all local packages have bins linked - ] - - for (const [msg, fn, args] of actions) { - const line = [msg] try { - line.push(true, await fn(...args)) - } catch (er) { - line.push(false, er) + const uid = process.getuid() + const gid = process.getgid() + const files = new Set([root]) + for (const f of files) { + tracker.silly('checkFilesPermission', f.substr(root.length + 1)) + const st = await lstat(f) + .catch(er => { + ok = false + tracker.warn('checkFilesPermission', 'error getting info for ' + f) + }) + + tracker.completeWork(1) + + if (!st) + continue + + if (shouldOwn && (uid !== st.uid || gid !== st.gid)) { + tracker.warn('checkFilesPermission', 'should be owner of ' + f) + ok = false + } + + if (!st.isDirectory() && !st.isFile()) + continue + + try { + await access(f, mask) + } catch (er) { + ok = false + const msg = `Missing permissions on ${f} (expect: ${maskLabel(mask)})` + tracker.error('checkFilesPermission', msg) + continue + } + + if (st.isDirectory()) { + const entries = await readdir(f) + .catch(er => { + ok = false + tracker.warn('checkFilesPermission', 'error reading directory ' + f) + return [] + }) + for (const entry of entries) + files.add(resolve(f, entry)) + } + } + } finally { + tracker.finish() + if (!ok) { + throw `Check the permissions of files in ${root}` + + (shouldOwn ? ' (should be owned by current user)' : '') + } else + return '' } - messages.push(line) } - const silent = npm.log.levels[npm.log.level] > npm.log.levels.error - - const outHead = ['Check', 'Value', 'Recommendation/Notes'] - .map(!npm.color ? h => h : h => chalk.underline(h)) - let allOk = true - const outBody = messages.map(!npm.color - ? item => { - allOk = allOk && item[1] - item[1] = item[1] ? 'ok' : 'not ok' - item[2] = String(item[2]) - return item + async getGitPath () { + const tracker = this.npm.log.newItem('getGitPath', 1) + tracker.info('getGitPath', 'Finding git in your PATH') + try { + return await which('git').catch(er => { + tracker.warn(er) + throw "Install git and ensure it's in your PATH." + }) + } finally { + tracker.finish() } - : item => { - allOk = allOk && item[1] - if (!item[1]) { - item[0] = chalk.red(item[0]) - item[2] = chalk.magenta(String(item[2])) + } + + async verifyCachedFiles () { + const tracker = this.npm.log.newItem('verifyCachedFiles', 1) + tracker.info('verifyCachedFiles', 'Verifying the npm cache') + try { + const stats = await cacache.verify(this.npm.flatOptions.cache) + const { + badContentCount, + reclaimedCount, + missingContent, + reclaimedSize, + } = stats + if (badContentCount || reclaimedCount || missingContent) { + if (badContentCount) + tracker.warn('verifyCachedFiles', `Corrupted content removed: ${badContentCount}`) + + if (reclaimedCount) + tracker.warn('verifyCachedFiles', `Content garbage-collected: ${reclaimedCount} (${reclaimedSize} bytes)`) + + if (missingContent) + tracker.warn('verifyCachedFiles', `Missing content: ${missingContent}`) + + tracker.warn('verifyCachedFiles', 'Cache issues have been fixed') } - item[1] = item[1] ? chalk.green('ok') : chalk.red('not ok') - return item - }) - const outTable = [outHead, ...outBody] - const tableOpts = { - stringLength: s => ansiTrim(s).length, + tracker.info('verifyCachedFiles', `Verification complete. Stats: ${ + JSON.stringify(stats, null, 2) + }`) + return `verified ${stats.verifiedContent} tarballs` + } finally { + tracker.finish() + } } - if (!silent) { - output(table(outTable, tableOpts)) - if (!allOk) - console.error('') + async checkNpmRegistry () { + if (this.npm.flatOptions.registry !== defaultRegistry) + throw `Try \`npm config set registry=${defaultRegistry}\`` + else + return `using default registry (${defaultRegistry})` } - if (!allOk) - throw 'Some problems found. See above for recommendations.' } -module.exports = Object.assign(cmd, { usage }) +module.exports = Doctor diff --git a/deps/npm/lib/edit.js b/deps/npm/lib/edit.js index 9ae6349262c2d9..1dbe8e4c103ad5 100644 --- a/deps/npm/lib/edit.js +++ b/deps/npm/lib/edit.js @@ -4,33 +4,56 @@ const { resolve } = require('path') const fs = require('graceful-fs') const { spawn } = require('child_process') -const npm = require('./npm.js') -const usageUtil = require('./utils/usage.js') const splitPackageNames = require('./utils/split-package-names.js') - -const usage = usageUtil('edit', 'npm edit [/...]') const completion = require('./utils/completion/installed-shallow.js') - -function edit (args, cb) { - if (args.length !== 1) - return cb(usage) - - const path = splitPackageNames(args[0]) - const dir = resolve(npm.dir, path) - - fs.lstat(dir, (err) => { - if (err) - return cb(err) - - const [bin, ...args] = npm.config.get('editor').split(/\s+/) - const editor = spawn(bin, [...args, dir], { stdio: 'inherit' }) - editor.on('exit', (code) => { - if (code) - return cb(new Error(`editor process exited with code: ${code}`)) - - npm.commands.rebuild([dir], cb) +const BaseCommand = require('./base-command.js') + +class Edit extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'edit' + } + + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[/...]'] + } + + /* istanbul ignore next - see test/lib/load-all-commands.js */ + async completion (opts) { + return completion(this.npm, opts) + } + + exec (args, cb) { + this.edit(args).then(() => cb()).catch(cb) + } + + async edit (args) { + if (args.length !== 1) + throw new Error(this.usage) + + const path = splitPackageNames(args[0]) + const dir = resolve(this.npm.dir, path) + + // graceful-fs does not promisify + await new Promise((resolve, reject) => { + fs.lstat(dir, (err) => { + if (err) + return reject(err) + const [bin, ...args] = this.npm.config.get('editor').split(/\s+/) + const editor = spawn(bin, [...args, dir], { stdio: 'inherit' }) + editor.on('exit', (code) => { + if (code) + return reject(new Error(`editor process exited with code: ${code}`)) + this.npm.commands.rebuild([dir], (err) => { + if (err) + return reject(err) + + resolve() + }) + }) + }) }) - }) + } } - -module.exports = Object.assign(edit, { completion, usage }) +module.exports = Edit diff --git a/deps/npm/lib/exec.js b/deps/npm/lib/exec.js index dab65c23a37b27..b2443b17accd2f 100644 --- a/deps/npm/lib/exec.js +++ b/deps/npm/lib/exec.js @@ -1,28 +1,17 @@ -const npm = require('./npm.js') -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') -const usage = usageUtil('exec', - 'Run a command from a local or remote npm package.\n\n' + - - 'npm exec -- [@] [args...]\n' + - 'npm exec --package=[@] -- [args...]\n' + - 'npm exec -c \' [args...]\'\n' + - 'npm exec --package=foo -c \' [args...]\'\n' + - '\n' + - 'npx [@] [args...]\n' + - 'npx -p [@] [args...]\n' + - 'npx -c \' [args...]\'\n' + - 'npx -p [@] -c \' [args...]\'' + - '\n' + - 'Run without --call or positional args to open interactive subshell\n', - - '\n--package= (may be specified multiple times)\n' + - '-p is a shorthand for --package only when using npx executable\n' + - '-c --call= (may not be mixed with positional arguments)' -) - const { promisify } = require('util') const read = promisify(require('read')) +const mkdirp = require('mkdirp-infer-owner') +const readPackageJson = require('read-package-json-fast') +const Arborist = require('@npmcli/arborist') +const runScript = require('@npmcli/run-script') +const { resolve, delimiter } = require('path') +const ciDetect = require('@npmcli/ci-detect') +const crypto = require('crypto') +const pacote = require('pacote') +const npa = require('npm-package-arg') +const fileExists = require('./utils/file-exists.js') +const PATH = require('./utils/path.js') +const BaseCommand = require('./base-command.js') // it's like this: // @@ -49,237 +38,252 @@ const read = promisify(require('read')) // runScript({ pkg, event: 'npx', ... }) // process.env.npm_lifecycle_event = 'npx' -const mkdirp = require('mkdirp-infer-owner') -const readPackageJson = require('read-package-json-fast') -const Arborist = require('@npmcli/arborist') -const runScript = require('@npmcli/run-script') -const { resolve, delimiter } = require('path') -const ciDetect = require('@npmcli/ci-detect') -const crypto = require('crypto') -const pacote = require('pacote') -const npa = require('npm-package-arg') -const fileExists = require('./utils/file-exists.js') -const PATH = require('./utils/path.js') - -const cmd = (args, cb) => exec(args).then(() => cb()).catch(cb) - -const run = async ({ args, call, pathArr, shell }) => { - // turn list of args into command string - const script = call || args.shift() || shell - - // do the fakey runScript dance - // still should work if no package.json in cwd - const realPkg = await readPackageJson(`${npm.localPrefix}/package.json`) - .catch(() => ({})) - const pkg = { - ...realPkg, - scripts: { - ...(realPkg.scripts || {}), - npx: script, - }, +class Exec extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'exec' } - npm.log.disableProgress() - try { - if (script === shell) { - if (process.stdin.isTTY) { - if (ciDetect()) - return npm.log.warn('exec', 'Interactive mode disabled in CI environment') - output(`\nEntering npm script environment\nType 'exit' or ^D when finished\n`) - } - } - return await runScript({ - ...npm.flatOptions, - pkg, - banner: false, - // we always run in cwd, not --prefix - path: process.cwd(), - stdioString: true, - event: 'npx', - args, - env: { - PATH: pathArr.join(delimiter), - }, - stdio: 'inherit', - }) - } finally { - npm.log.enableProgress() + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get description () { + return 'Run a command from a local or remote npm package.' } -} -const exec = async args => { - const { package: packages, call, shell } = npm.flatOptions + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + '-- [@] [args...]', + '--package=[@] -- [args...]', + '-c \' [args...]\'', + '--package=foo -c \' [args...]\'', + ] + } - if (call && args.length) - throw usage + exec (args, cb) { + this._exec(args).then(() => cb()).catch(cb) + } - const pathArr = [...PATH] + // When commands go async and we can dump the boilerplate exec methods this + // can be named correctly + async _exec (args) { + const { package: packages, call, shell } = this.npm.flatOptions - // nothing to maybe install, skip the arborist dance - if (!call && !args.length && !packages.length) { - return await run({ - args, - call, - shell, - pathArr, - }) - } + if (call && args.length) + throw this.usage - const needPackageCommandSwap = args.length && !packages.length - // if there's an argument and no package has been explicitly asked for - // check the local and global bin paths for a binary named the same as - // the argument and run it if it exists, otherwise fall through to - // the behavior of treating the single argument as a package name - if (needPackageCommandSwap) { - let binExists = false - if (await fileExists(`${npm.localBin}/${args[0]}`)) { - pathArr.unshift(npm.localBin) - binExists = true - } else if (await fileExists(`${npm.globalBin}/${args[0]}`)) { - pathArr.unshift(npm.globalBin) - binExists = true - } + const pathArr = [...PATH] - if (binExists) { - return await run({ + // nothing to maybe install, skip the arborist dance + if (!call && !args.length && !packages.length) { + return await this.run({ args, call, - pathArr, shell, + pathArr, }) } - packages.push(args[0]) - } + const needPackageCommandSwap = args.length && !packages.length + // if there's an argument and no package has been explicitly asked for + // check the local and global bin paths for a binary named the same as + // the argument and run it if it exists, otherwise fall through to + // the behavior of treating the single argument as a package name + if (needPackageCommandSwap) { + let binExists = false + if (await fileExists(`${this.npm.localBin}/${args[0]}`)) { + pathArr.unshift(this.npm.localBin) + binExists = true + } else if (await fileExists(`${this.npm.globalBin}/${args[0]}`)) { + pathArr.unshift(this.npm.globalBin) + binExists = true + } - // If we do `npm exec foo`, and have a `foo` locally, then we'll - // always use that, so we don't really need to fetch the manifest. - // So: run npa on each packages entry, and if it is a name with a - // rawSpec==='', then try to readPackageJson at - // node_modules/${name}/package.json, and only pacote fetch if - // that fails. - const manis = await Promise.all(packages.map(async p => { - const spec = npa(p, npm.localPrefix) - if (spec.type === 'tag' && spec.rawSpec === '') { - // fall through to the pacote.manifest() approach - try { - const pj = resolve(npm.localPrefix, 'node_modules', spec.name) - return await readPackageJson(pj) - } catch (er) {} + if (binExists) { + return await this.run({ + args, + call, + pathArr, + shell, + }) + } + + packages.push(args[0]) } - // Force preferOnline to true so we are making sure to pull in the latest - // This is especially useful if the user didn't give us a version, and - // they expect to be running @latest - return await pacote.manifest(p, { - ...npm.flatOptions, - preferOnline: true, - }) - })) - - if (needPackageCommandSwap) - args[0] = getBinFromManifest(manis[0]) - - // figure out whether we need to install stuff, or if local is fine - const localArb = new Arborist({ - ...npm.flatOptions, - path: npm.localPrefix, - }) - const tree = await localArb.loadActual() - - // do we have all the packages in manifest list? - const needInstall = manis.some(mani => manifestMissing(tree, mani)) - - if (needInstall) { - const installDir = cacheInstallDir(packages) - await mkdirp(installDir) - const arb = new Arborist({ ...npm.flatOptions, path: installDir }) - const tree = await arb.loadActual() - - // at this point, we have to ensure that we get the exact same - // version, because it's something that has only ever been installed - // by npm exec in the cache install directory - const add = manis.filter(mani => manifestMissing(tree, { - ...mani, - _from: `${mani.name}@${mani.version}`, + + // If we do `npm exec foo`, and have a `foo` locally, then we'll + // always use that, so we don't really need to fetch the manifest. + // So: run npa on each packages entry, and if it is a name with a + // rawSpec==='', then try to readPackageJson at + // node_modules/${name}/package.json, and only pacote fetch if + // that fails. + const manis = await Promise.all(packages.map(async p => { + const spec = npa(p, this.npm.localPrefix) + if (spec.type === 'tag' && spec.rawSpec === '') { + // fall through to the pacote.manifest() approach + try { + const pj = resolve(this.npm.localPrefix, 'node_modules', spec.name) + return await readPackageJson(pj) + } catch (er) {} + } + // Force preferOnline to true so we are making sure to pull in the latest + // This is especially useful if the user didn't give us a version, and + // they expect to be running @latest + return await pacote.manifest(p, { + ...this.npm.flatOptions, + preferOnline: true, + }) })) - .map(mani => mani._from) - .sort((a, b) => a.localeCompare(b)) - - // no need to install if already present - if (add.length) { - if (!npm.flatOptions.yes) { - // set -n to always say no - if (npm.flatOptions.yes === false) - throw 'canceled' - - if (!process.stdin.isTTY || ciDetect()) { - npm.log.warn('exec', `The following package${ + + if (needPackageCommandSwap) + args[0] = this.getBinFromManifest(manis[0]) + + // figure out whether we need to install stuff, or if local is fine + const localArb = new Arborist({ + ...this.npm.flatOptions, + path: this.npm.localPrefix, + }) + const tree = await localArb.loadActual() + + // do we have all the packages in manifest list? + const needInstall = manis.some(mani => this.manifestMissing(tree, mani)) + + if (needInstall) { + const installDir = this.cacheInstallDir(packages) + await mkdirp(installDir) + const arb = new Arborist({ ...this.npm.flatOptions, path: installDir }) + const tree = await arb.loadActual() + + // at this point, we have to ensure that we get the exact same + // version, because it's something that has only ever been installed + // by npm exec in the cache install directory + const add = manis.filter(mani => this.manifestMissing(tree, { + ...mani, + _from: `${mani.name}@${mani.version}`, + })) + .map(mani => mani._from) + .sort((a, b) => a.localeCompare(b)) + + // no need to install if already present + if (add.length) { + if (!this.npm.flatOptions.yes) { + // set -n to always say no + if (this.npm.flatOptions.yes === false) + throw 'canceled' + + if (!process.stdin.isTTY || ciDetect()) { + this.npm.log.warn('exec', `The following package${ add.length === 1 ? ' was' : 's were' } not found and will be installed: ${ add.map((pkg) => pkg.replace(/@$/, '')).join(', ') }`) - } else { - const addList = add.map(a => ` ${a.replace(/@$/, '')}`) - .join('\n') + '\n' - const prompt = `Need to install the following packages:\n${ + } else { + const addList = add.map(a => ` ${a.replace(/@$/, '')}`) + .join('\n') + '\n' + const prompt = `Need to install the following packages:\n${ addList }Ok to proceed? ` - const confirm = await read({ prompt, default: 'y' }) - if (confirm.trim().toLowerCase().charAt(0) !== 'y') - throw 'canceled' + const confirm = await read({ prompt, default: 'y' }) + if (confirm.trim().toLowerCase().charAt(0) !== 'y') + throw 'canceled' + } } + await arb.reify({ ...this.npm.flatOptions, add }) } - await arb.reify({ ...npm.flatOptions, add }) + pathArr.unshift(resolve(installDir, 'node_modules/.bin')) } - pathArr.unshift(resolve(installDir, 'node_modules/.bin')) + + return await this.run({ args, call, pathArr, shell }) } - return await run({ args, call, pathArr, shell }) -} + async run ({ args, call, pathArr, shell }) { + // turn list of args into command string + const script = call || args.shift() || shell + + // do the fakey runScript dance + // still should work if no package.json in cwd + const realPkg = await readPackageJson(`${this.npm.localPrefix}/package.json`) + .catch(() => ({})) + const pkg = { + ...realPkg, + scripts: { + ...(realPkg.scripts || {}), + npx: script, + }, + } -const manifestMissing = (tree, mani) => { - // if the tree doesn't have a child by that name/version, return true - // true means we need to install it - const child = tree.children.get(mani.name) - // if no child, we have to load it - if (!child) - return true + this.npm.log.disableProgress() + try { + if (script === shell) { + if (process.stdin.isTTY) { + if (ciDetect()) + return this.npm.log.warn('exec', 'Interactive mode disabled in CI environment') + this.npm.output(`\nEntering npm script environment\nType 'exit' or ^D when finished\n`) + } + } + return await runScript({ + ...this.npm.flatOptions, + pkg, + banner: false, + // we always run in cwd, not --prefix + path: process.cwd(), + stdioString: true, + event: 'npx', + args, + env: { + PATH: pathArr.join(delimiter), + }, + stdio: 'inherit', + }) + } finally { + this.npm.log.enableProgress() + } + } - // if no version/tag specified, allow whatever's there - if (mani._from === `${mani.name}@`) - return false + manifestMissing (tree, mani) { + // if the tree doesn't have a child by that name/version, return true + // true means we need to install it + const child = tree.children.get(mani.name) + // if no child, we have to load it + if (!child) + return true - // otherwise the version has to match what we WOULD get - return child.version !== mani.version -} + // if no version/tag specified, allow whatever's there + if (mani._from === `${mani.name}@`) + return false -const getBinFromManifest = mani => { - // if we have a bin matching (unscoped portion of) packagename, use that - // otherwise if there's 1 bin or all bin value is the same (alias), use that, - // otherwise fail - const bin = mani.bin || {} - if (new Set(Object.values(bin)).size === 1) - return Object.keys(bin)[0] - - // XXX probably a util to parse this better? - const name = mani.name.replace(/^@[^/]+\//, '') - if (bin[name]) - return name - - // XXX need better error message - throw Object.assign(new Error('could not determine executable to run'), { - pkgid: mani._id, - }) -} + // otherwise the version has to match what we WOULD get + return child.version !== mani.version + } -// only packages not found in ${prefix}/node_modules -const cacheInstallDir = packages => - resolve(npm.config.get('cache'), '_npx', getHash(packages)) + getBinFromManifest (mani) { + // if we have a bin matching (unscoped portion of) packagename, use that + // otherwise if there's 1 bin or all bin value is the same (alias), use + // that, otherwise fail + const bin = mani.bin || {} + if (new Set(Object.values(bin)).size === 1) + return Object.keys(bin)[0] + + // XXX probably a util to parse this better? + const name = mani.name.replace(/^@[^/]+\//, '') + if (bin[name]) + return name + + // XXX need better error message + throw Object.assign(new Error('could not determine executable to run'), { + pkgid: mani._id, + }) + } -const getHash = packages => - crypto.createHash('sha512') - .update(packages.sort((a, b) => a.localeCompare(b)).join('\n')) - .digest('hex') - .slice(0, 16) + cacheInstallDir (packages) { + // only packages not found in ${prefix}/node_modules + return resolve(this.npm.config.get('cache'), '_npx', this.getHash(packages)) + } -module.exports = Object.assign(cmd, { usage }) + getHash (packages) { + return crypto.createHash('sha512') + .update(packages.sort((a, b) => a.localeCompare(b)).join('\n')) + .digest('hex') + .slice(0, 16) + } +} +module.exports = Exec diff --git a/deps/npm/lib/explain.js b/deps/npm/lib/explain.js index a0a4427bccf2cc..6af7611867786d 100644 --- a/deps/npm/lib/explain.js +++ b/deps/npm/lib/explain.js @@ -1,94 +1,108 @@ -const usageUtil = require('./utils/usage.js') -const npm = require('./npm.js') const { explainNode } = require('./utils/explain-dep.js') const completion = require('./utils/completion/installed-deep.js') -const output = require('./utils/output.js') const Arborist = require('@npmcli/arborist') const npa = require('npm-package-arg') const semver = require('semver') const { relative, resolve } = require('path') const validName = require('validate-npm-package-name') +const BaseCommand = require('./base-command.js') -const usage = usageUtil('explain', 'npm explain ') - -const cmd = (args, cb) => explain(args).then(() => cb()).catch(cb) +class Explain extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'explain' + } -const explain = async (args) => { - if (!args.length) - throw usage + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [''] + } - const arb = new Arborist({ path: npm.prefix, ...npm.flatOptions }) - const tree = await arb.loadActual() + /* istanbul ignore next - see test/lib/load-all-commands.js */ + async completion (opts) { + return completion(this.npm, opts) + } - const nodes = new Set() - for (const arg of args) { - for (const node of getNodes(tree, arg)) - nodes.add(node) + exec (args, cb) { + this.explain(args).then(() => cb()).catch(cb) } - if (nodes.size === 0) - throw `No dependencies found matching ${args.join(', ')}` - const expls = [] - for (const node of nodes) { - const { extraneous, dev, optional, devOptional, peer, inBundle } = node - const expl = node.explain() - if (extraneous) - expl.extraneous = true - else { - expl.dev = dev - expl.optional = optional - expl.devOptional = devOptional - expl.peer = peer - expl.bundled = inBundle + async explain (args) { + if (!args.length) + throw this.usage + + const arb = new Arborist({ path: this.npm.prefix, ...this.npm.flatOptions }) + const tree = await arb.loadActual() + + const nodes = new Set() + for (const arg of args) { + for (const node of this.getNodes(tree, arg)) + nodes.add(node) } - expls.push(expl) - } + if (nodes.size === 0) + throw `No dependencies found matching ${args.join(', ')}` - if (npm.flatOptions.json) - output(JSON.stringify(expls, null, 2)) - else { - output(expls.map(expl => { - return explainNode(expl, Infinity, npm.color) - }).join('\n\n')) + const expls = [] + for (const node of nodes) { + const { extraneous, dev, optional, devOptional, peer, inBundle } = node + const expl = node.explain() + if (extraneous) + expl.extraneous = true + else { + expl.dev = dev + expl.optional = optional + expl.devOptional = devOptional + expl.peer = peer + expl.bundled = inBundle + } + expls.push(expl) + } + + if (this.npm.flatOptions.json) + this.npm.output(JSON.stringify(expls, null, 2)) + else { + this.npm.output(expls.map(expl => { + return explainNode(expl, Infinity, this.npm.color) + }).join('\n\n')) + } } -} -const getNodes = (tree, arg) => { - // if it's just a name, return packages by that name - const { validForOldPackages: valid } = validName(arg) - if (valid) - return tree.inventory.query('name', arg) + getNodes (tree, arg) { + // if it's just a name, return packages by that name + const { validForOldPackages: valid } = validName(arg) + if (valid) + return tree.inventory.query('name', arg) - // if it's a location, get that node - const maybeLoc = arg.replace(/\\/g, '/').replace(/\/+$/, '') - const nodeByLoc = tree.inventory.get(maybeLoc) - if (nodeByLoc) - return [nodeByLoc] + // if it's a location, get that node + const maybeLoc = arg.replace(/\\/g, '/').replace(/\/+$/, '') + const nodeByLoc = tree.inventory.get(maybeLoc) + if (nodeByLoc) + return [nodeByLoc] - // maybe a path to a node_modules folder - const maybePath = relative(npm.prefix, resolve(maybeLoc)) - .replace(/\\/g, '/').replace(/\/+$/, '') - const nodeByPath = tree.inventory.get(maybePath) - if (nodeByPath) - return [nodeByPath] + // maybe a path to a node_modules folder + const maybePath = relative(this.npm.prefix, resolve(maybeLoc)) + .replace(/\\/g, '/').replace(/\/+$/, '') + const nodeByPath = tree.inventory.get(maybePath) + if (nodeByPath) + return [nodeByPath] - // otherwise, try to select all matching nodes - try { - return getNodesByVersion(tree, arg) - } catch (er) { - return [] + // otherwise, try to select all matching nodes + try { + return this.getNodesByVersion(tree, arg) + } catch (er) { + return [] + } } -} -const getNodesByVersion = (tree, arg) => { - const spec = npa(arg, npm.prefix) - if (spec.type !== 'version' && spec.type !== 'range') - return [] + getNodesByVersion (tree, arg) { + const spec = npa(arg, this.npm.prefix) + if (spec.type !== 'version' && spec.type !== 'range') + return [] - return tree.inventory.filter(node => { - return node.package.name === spec.name && - semver.satisfies(node.package.version, spec.rawSpec) - }) + return tree.inventory.filter(node => { + return node.package.name === spec.name && + semver.satisfies(node.package.version, spec.rawSpec) + }) + } } - -module.exports = Object.assign(cmd, { usage, completion }) +module.exports = Explain diff --git a/deps/npm/lib/explore.js b/deps/npm/lib/explore.js index e9b09707ec63bc..34f6d10793c7ea 100644 --- a/deps/npm/lib/explore.js +++ b/deps/npm/lib/explore.js @@ -1,69 +1,82 @@ // npm explore [@] // open a subshell to the package folder. -const usageUtil = require('./utils/usage.js') -const completion = require('./utils/completion/installed-shallow.js') -const usage = usageUtil('explore', 'npm explore [ -- ]') const rpj = require('read-package-json-fast') - -const cmd = (args, cb) => explore(args).then(() => cb()).catch(cb) - -const output = require('./utils/output.js') -const npm = require('./npm.js') - const runScript = require('@npmcli/run-script') const { join, resolve, relative } = require('path') +const completion = require('./utils/completion/installed-shallow.js') +const BaseCommand = require('./base-command.js') -const explore = async args => { - if (args.length < 1 || !args[0]) - throw usage +class Explore extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'explore' + } - const pkgname = args.shift() + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [' [ -- ]'] + } - // detect and prevent any .. shenanigans - const path = join(npm.dir, join('/', pkgname)) - if (relative(path, npm.dir) === '') - throw usage + /* istanbul ignore next - see test/lib/load-all-commands.js */ + async completion (opts) { + return completion(this.npm, opts) + } - // run as if running a script named '_explore', which we set to either - // the set of arguments, or the shell config, and let @npmcli/run-script - // handle all the escaping and PATH setup stuff. + exec (args, cb) { + this.explore(args).then(() => cb()).catch(cb) + } - const pkg = await rpj(resolve(path, 'package.json')).catch(er => { - npm.log.error('explore', `It doesn't look like ${pkgname} is installed.`) - throw er - }) + async explore (args) { + if (args.length < 1 || !args[0]) + throw this.usage - const { shell } = npm.flatOptions - pkg.scripts = { - ...(pkg.scripts || {}), - _explore: args.join(' ').trim() || shell, - } + const pkgname = args.shift() + + // detect and prevent any .. shenanigans + const path = join(this.npm.dir, join('/', pkgname)) + if (relative(path, this.npm.dir) === '') + throw this.usage + + // run as if running a script named '_explore', which we set to either + // the set of arguments, or the shell config, and let @npmcli/run-script + // handle all the escaping and PATH setup stuff. - if (!args.length) - output(`\nExploring ${path}\nType 'exit' or ^D when finished\n`) - npm.log.disableProgress() - try { - return await runScript({ - ...npm.flatOptions, - pkg, - banner: false, - path, - stdioString: true, - event: '_explore', - stdio: 'inherit', - }).catch(er => { - process.exitCode = typeof er.code === 'number' && er.code !== 0 ? er.code - : 1 - // if it's not an exit error, or non-interactive, throw it - const isProcExit = er.message === 'command failed' && - (typeof er.code === 'number' || /^SIG/.test(er.signal || '')) - if (args.length || !isProcExit) - throw er + const pkg = await rpj(resolve(path, 'package.json')).catch(er => { + this.npm.log.error('explore', `It doesn't look like ${pkgname} is installed.`) + throw er }) - } finally { - npm.log.enableProgress() + + const { shell } = this.npm.flatOptions + pkg.scripts = { + ...(pkg.scripts || {}), + _explore: args.join(' ').trim() || shell, + } + + if (!args.length) + this.npm.output(`\nExploring ${path}\nType 'exit' or ^D when finished\n`) + this.npm.log.disableProgress() + try { + return await runScript({ + ...this.npm.flatOptions, + pkg, + banner: false, + path, + stdioString: true, + event: '_explore', + stdio: 'inherit', + }).catch(er => { + process.exitCode = typeof er.code === 'number' && er.code !== 0 ? er.code + : 1 + // if it's not an exit error, or non-interactive, throw it + const isProcExit = er.message === 'command failed' && + (typeof er.code === 'number' || /^SIG/.test(er.signal || '')) + if (args.length || !isProcExit) + throw er + }) + } finally { + this.npm.log.enableProgress() + } } } - -module.exports = Object.assign(cmd, { completion, usage }) +module.exports = Explore diff --git a/deps/npm/lib/find-dupes.js b/deps/npm/lib/find-dupes.js index 19e7ea6a7c8cc5..ecb945f47bb41d 100644 --- a/deps/npm/lib/find-dupes.js +++ b/deps/npm/lib/find-dupes.js @@ -1,8 +1,15 @@ // dedupe duplicated packages, or find them in the tree -const dedupe = require('./dedupe.js') -const usageUtil = require('./utils/usage.js') +const BaseCommand = require('./base-command.js') -const usage = usageUtil('find-dupes', 'npm find-dupes') -const cmd = (args, cb) => dedupe({ dryRun: true }, cb) +class FindDupes extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'find-dupes' + } -module.exports = Object.assign(cmd, { usage }) + exec (args, cb) { + this.npm.config.set('dry-run', true) + this.npm.commands.dedupe([], cb) + } +} +module.exports = FindDupes diff --git a/deps/npm/lib/fund.js b/deps/npm/lib/fund.js index 41dd48c4653429..a723c62d2c3c51 100644 --- a/deps/npm/lib/fund.js +++ b/deps/npm/lib/fund.js @@ -11,200 +11,207 @@ const { isValidFunding, } = require('libnpmfund') -const npm = require('./npm.js') const completion = require('./utils/completion/installed-deep.js') -const output = require('./utils/output.js') const openUrl = require('./utils/open-url.js') -const usageUtil = require('./utils/usage.js') - -const usage = usageUtil( - 'fund', - 'npm fund', - 'npm fund [--json] [--browser] [--unicode] [[<@scope>/] [--which=]' -) - -const cmd = (args, cb) => fund(args).then(() => cb()).catch(cb) - -function printJSON (fundingInfo) { - return JSON.stringify(fundingInfo, null, 2) -} const getPrintableName = ({ name, version }) => { const printableVersion = version ? `@${version}` : '' return `${name}${printableVersion}` } -function printHuman (fundingInfo, { color, unicode }) { - const seenUrls = new Map() - - const tree = obj => - archy(obj, '', { unicode }) - - const result = depth({ - tree: fundingInfo, - - // composes human readable package name - // and creates a new archy item for readable output - visit: ({ name, version, funding }) => { - const [fundingSource] = [] - .concat(normalizeFunding(funding)) - .filter(isValidFunding) - const { url } = fundingSource || {} - const pkgRef = getPrintableName({ name, version }) - let item = { - label: pkgRef, - } - - if (url) { - item.label = tree({ - label: color ? chalk.bgBlack.white(url) : url, - nodes: [pkgRef], - }).trim() - - // stacks all packages together under the same item - if (seenUrls.has(url)) { - item = seenUrls.get(url) - item.label += `, ${pkgRef}` - return null - } else - seenUrls.set(url, item) - } +const BaseCommand = require('./base-command.js') - return item - }, - - // puts child nodes back into returned archy - // output while also filtering out missing items - leave: (item, children) => { - if (item) - item.nodes = children.filter(Boolean) - - return item - }, - - // turns tree-like object return by libnpmfund - // into children to be properly read by treeverse - getChildren: (node) => - Object.keys(node.dependencies || {}) - .map(key => ({ - name: key, - ...node.dependencies[key], - })), - }) - - const res = tree(result) - return color ? chalk.reset(res) : res -} +class Fund extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'fund' + } -async function openFundingUrl ({ path, tree, spec, fundingSourceNumber }) { - const arg = npa(spec, path) - const retrievePackageMetadata = () => { - if (arg.type === 'directory') { - if (tree.path === arg.fetchSpec) { - // matches cwd, e.g: npm fund . - return tree.package - } else { - // matches any file path within current arborist inventory - for (const item of tree.inventory.values()) { - if (item.path === arg.fetchSpec) - return item.package - } - } - } else { - // tries to retrieve a package from arborist inventory - // by matching resulted package name from the provided spec - const [item] = [...tree.inventory.query('name', arg.name)] - .filter(i => semver.valid(i.package.version)) - .sort((a, b) => semver.rcompare(a.package.version, b.package.version)) - - if (item) - return item.package - } + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[--json] [--browser] [--unicode] [[<@scope>/] [--which=]'] } - const { funding } = retrievePackageMetadata() || - await pacote.manifest(arg, npm.flatOptions).catch(() => ({})) - - const validSources = [] - .concat(normalizeFunding(funding)) - .filter(isValidFunding) - - const matchesValidSource = - validSources.length === 1 || - (fundingSourceNumber > 0 && fundingSourceNumber <= validSources.length) - - if (matchesValidSource) { - const index = fundingSourceNumber ? fundingSourceNumber - 1 : 0 - const { type, url } = validSources[index] - const typePrefix = type ? `${type} funding` : 'Funding' - const msg = `${typePrefix} available at the following URL` - return new Promise((resolve, reject) => - openUrl(url, msg, err => err - ? reject(err) - : resolve() - )) - } else if (validSources.length && !(fundingSourceNumber >= 1)) { - validSources.forEach(({ type, url }, i) => { - const typePrefix = type ? `${type} funding` : 'Funding' - const msg = `${typePrefix} available at the following URL` - output(`${i + 1}: ${msg}: ${url}`) - }) - output('Run `npm fund [<@scope>/] --which=1`, for example, to open the first funding URL listed in that package') - } else { - const noFundingError = new Error(`No valid funding method available for: ${spec}`) - noFundingError.code = 'ENOFUND' + /* istanbul ignore next - see test/lib/load-all-commands.js */ + async completion (opts) { + return completion(this.npm, opts) + } - throw noFundingError + exec (args, cb) { + this.fund(args).then(() => cb()).catch(cb) } -} -const fund = async (args) => { - const opts = npm.flatOptions - const spec = args[0] - const numberArg = opts.which + async fund (args) { + const opts = this.npm.flatOptions + const spec = args[0] + const numberArg = opts.which - const fundingSourceNumber = numberArg && parseInt(numberArg, 10) + const fundingSourceNumber = numberArg && parseInt(numberArg, 10) - const badFundingSourceNumber = - numberArg !== undefined && + const badFundingSourceNumber = + numberArg !== undefined && (String(fundingSourceNumber) !== numberArg || fundingSourceNumber < 1) - if (badFundingSourceNumber) { - const err = new Error('`npm fund [<@scope>/] [--which=fundingSourceNumber]` must be given a positive integer') - err.code = 'EFUNDNUMBER' - throw err + if (badFundingSourceNumber) { + const err = new Error('`npm fund [<@scope>/] [--which=fundingSourceNumber]` must be given a positive integer') + err.code = 'EFUNDNUMBER' + throw err + } + + if (opts.global) { + const err = new Error('`npm fund` does not support global packages') + err.code = 'EFUNDGLOBAL' + throw err + } + + const where = this.npm.prefix + const arb = new Arborist({ ...opts, path: where }) + const tree = await arb.loadActual() + + if (spec) { + await this.openFundingUrl({ + path: where, + tree, + spec, + fundingSourceNumber, + }) + return + } + + const print = opts.json + ? this.printJSON + : this.printHuman + + this.npm.output( + print( + getFundingInfo(tree), + opts + ) + ) } - if (opts.global) { - const err = new Error('`npm fund` does not support global packages') - err.code = 'EFUNDGLOBAL' - throw err + printJSON (fundingInfo) { + return JSON.stringify(fundingInfo, null, 2) } - const where = npm.prefix - const arb = new Arborist({ ...opts, path: where }) - const tree = await arb.loadActual() + printHuman (fundingInfo, { color, unicode }) { + const seenUrls = new Map() + + const tree = obj => + archy(obj, '', { unicode }) + + const result = depth({ + tree: fundingInfo, + + // composes human readable package name + // and creates a new archy item for readable output + visit: ({ name, version, funding }) => { + const [fundingSource] = [] + .concat(normalizeFunding(funding)) + .filter(isValidFunding) + const { url } = fundingSource || {} + const pkgRef = getPrintableName({ name, version }) + let item = { + label: pkgRef, + } + + if (url) { + item.label = tree({ + label: color ? chalk.bgBlack.white(url) : url, + nodes: [pkgRef], + }).trim() + + // stacks all packages together under the same item + if (seenUrls.has(url)) { + item = seenUrls.get(url) + item.label += `, ${pkgRef}` + return null + } else + seenUrls.set(url, item) + } - if (spec) { - await openFundingUrl({ - path: where, - tree, - spec, - fundingSourceNumber, + return item + }, + + // puts child nodes back into returned archy + // output while also filtering out missing items + leave: (item, children) => { + if (item) + item.nodes = children.filter(Boolean) + + return item + }, + + // turns tree-like object return by libnpmfund + // into children to be properly read by treeverse + getChildren: (node) => + Object.keys(node.dependencies || {}) + .map(key => ({ + name: key, + ...node.dependencies[key], + })), }) - return + + const res = tree(result) + return color ? chalk.reset(res) : res } - const print = opts.json - ? printJSON - : printHuman + async openFundingUrl ({ path, tree, spec, fundingSourceNumber }) { + const arg = npa(spec, path) + const retrievePackageMetadata = () => { + if (arg.type === 'directory') { + if (tree.path === arg.fetchSpec) { + // matches cwd, e.g: npm fund . + return tree.package + } else { + // matches any file path within current arborist inventory + for (const item of tree.inventory.values()) { + if (item.path === arg.fetchSpec) + return item.package + } + } + } else { + // tries to retrieve a package from arborist inventory + // by matching resulted package name from the provided spec + const [item] = [...tree.inventory.query('name', arg.name)] + .filter(i => semver.valid(i.package.version)) + .sort((a, b) => semver.rcompare(a.package.version, b.package.version)) + + if (item) + return item.package + } + } - output( - print( - getFundingInfo(tree), - opts - ) - ) -} + const { funding } = retrievePackageMetadata() || + await pacote.manifest(arg, this.npm.flatOptions).catch(() => ({})) + + const validSources = [] + .concat(normalizeFunding(funding)) + .filter(isValidFunding) -module.exports = Object.assign(cmd, { usage, completion }) + const matchesValidSource = + validSources.length === 1 || + (fundingSourceNumber > 0 && fundingSourceNumber <= validSources.length) + + if (matchesValidSource) { + const index = fundingSourceNumber ? fundingSourceNumber - 1 : 0 + const { type, url } = validSources[index] + const typePrefix = type ? `${type} funding` : 'Funding' + const msg = `${typePrefix} available at the following URL` + return openUrl(this.npm, url, msg) + } else if (validSources.length && !(fundingSourceNumber >= 1)) { + validSources.forEach(({ type, url }, i) => { + const typePrefix = type ? `${type} funding` : 'Funding' + const msg = `${typePrefix} available at the following URL` + this.npm.output(`${i + 1}: ${msg}: ${url}`) + }) + this.npm.output('Run `npm fund [<@scope>/] --which=1`, for example, to open the first funding URL listed in that package') + } else { + const noFundingError = new Error(`No valid funding method available for: ${spec}`) + noFundingError.code = 'ENOFUND' + + throw noFundingError + } + } +} +module.exports = Fund diff --git a/deps/npm/lib/get.js b/deps/npm/lib/get.js index 8a416027d7fbaa..a5d58accc83070 100644 --- a/deps/npm/lib/get.js +++ b/deps/npm/lib/get.js @@ -1,15 +1,23 @@ -const npm = require('./npm.js') -const config = require('./config.js') -const usageUtil = require('./utils/usage.js') +const BaseCommand = require('./base-command.js') -const usage = usageUtil( - 'get', - 'npm get [ ...] (See `npm config`)' -) +class Get extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'get' + } -const completion = config.completion + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[ ...] (See `npm config`)'] + } -const cmd = (args, cb) => - npm.commands.config(['get'].concat(args), cb) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + async completion (opts) { + return this.npm.commands.config.completion(opts) + } -module.exports = Object.assign(cmd, { usage, completion }) + exec (args, cb) { + this.npm.commands.config(['get'].concat(args), cb) + } +} +module.exports = Get diff --git a/deps/npm/lib/help-search.js b/deps/npm/lib/help-search.js index b1847350480439..4e727c3e72954a 100644 --- a/deps/npm/lib/help-search.js +++ b/deps/npm/lib/help-search.js @@ -1,203 +1,212 @@ const fs = require('fs') const path = require('path') -const npm = require('./npm.js') const color = require('ansicolors') -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') +const npmUsage = require('./utils/npm-usage.js') const { promisify } = require('util') const glob = promisify(require('glob')) const readFile = promisify(fs.readFile) const didYouMean = require('./utils/did-you-mean.js') const { cmdList } = require('./utils/cmd-list.js') +const BaseCommand = require('./base-command.js') -const usage = usageUtil('help-search', 'npm help-search ') - -const npmUsage = require('./utils/npm-usage.js') +class HelpSearch extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'help-search' + } -const cmd = (args, cb) => helpSearch(args).then(() => cb()).catch(cb) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [''] + } -const helpSearch = async args => { - if (!args.length) - throw usage + exec (args, cb) { + this.helpSearch(args).then(() => cb()).catch(cb) + } - const docPath = path.resolve(__dirname, '..', 'docs/content') + async helpSearch (args) { + if (!args.length) + throw this.usage + + const docPath = path.resolve(__dirname, '..', 'docs/content') + + const files = await glob(`${docPath}/*/*.md`) + const data = await this.readFiles(files) + const results = await this.searchFiles(args, data, files) + // if only one result, then just show that help section. + if (results.length === 1) { + return this.npm.commands.help([path.basename(results[0].file, '.md')], er => { + if (er) + throw er + }) + } - const files = await glob(`${docPath}/*/*.md`) - const data = await readFiles(files) - const results = await searchFiles(args, data, files) - // if only one result, then just show that help section. - if (results.length === 1) { - return npm.commands.help([path.basename(results[0].file, '.md')], er => { - if (er) - throw er - }) + const formatted = this.formatResults(args, results) + if (!formatted.trim()) + npmUsage(this.npm, false) + else { + this.npm.output(formatted) + this.npm.output(didYouMean(args[0], cmdList)) + } } - const formatted = formatResults(args, results) - if (!formatted.trim()) - npmUsage(false) - else { - output(formatted) - output(didYouMean(args[0], cmdList)) + async readFiles (files) { + const res = {} + await Promise.all(files.map(async file => { + res[file] = (await readFile(file, 'utf8')) + .replace(/^---\n(.*\n)*?---\n/, '').trim() + })) + return res } -} -const readFiles = async files => { - const res = {} - await Promise.all(files.map(async file => { - res[file] = (await readFile(file, 'utf8')) - .replace(/^---\n(.*\n)*?---\n/, '').trim() - })) - return res -} + async searchFiles (args, data, files) { + const results = [] + for (const [file, content] of Object.entries(data)) { + const lowerCase = content.toLowerCase() + // skip if no matches at all + if (!args.some(a => lowerCase.includes(a.toLowerCase()))) + continue + + const lines = content.split(/\n+/) + + // if a line has a search term, then skip it and the next line. + // if the next line has a search term, then skip all 3 + // otherwise, set the line to null. then remove the nulls. + for (let i = 0; i < lines.length; i++) { + const line = lines[i] + const nextLine = lines[i + 1] + let match = false + if (nextLine) { + match = args.some(a => + nextLine.toLowerCase().includes(a.toLowerCase())) + if (match) { + // skip over the next line, and the line after it. + i += 2 + continue + } + } + + match = args.some(a => line.toLowerCase().includes(a.toLowerCase())) -const searchFiles = async (args, data, files) => { - const results = [] - for (const [file, content] of Object.entries(data)) { - const lowerCase = content.toLowerCase() - // skip if no matches at all - if (!args.some(a => lowerCase.includes(a.toLowerCase()))) - continue - - const lines = content.split(/\n+/) - - // if a line has a search term, then skip it and the next line. - // if the next line has a search term, then skip all 3 - // otherwise, set the line to null. then remove the nulls. - for (let i = 0; i < lines.length; i++) { - const line = lines[i] - const nextLine = lines[i + 1] - let match = false - if (nextLine) { - match = args.some(a => nextLine.toLowerCase().includes(a.toLowerCase())) if (match) { - // skip over the next line, and the line after it. - i += 2 + // skip over the next line + i++ continue } - } - match = args.some(a => line.toLowerCase().includes(a.toLowerCase())) - - if (match) { - // skip over the next line - i++ - continue + lines[i] = null } - lines[i] = null - } - - // now squish any string of nulls into a single null - const pruned = lines.reduce((l, r) => { - if (!(r === null && l[l.length - 1] === null)) - l.push(r) + // now squish any string of nulls into a single null + const pruned = lines.reduce((l, r) => { + if (!(r === null && l[l.length - 1] === null)) + l.push(r) - return l - }, []) + return l + }, []) - if (pruned[pruned.length - 1] === null) - pruned.pop() + if (pruned[pruned.length - 1] === null) + pruned.pop() - if (pruned[0] === null) - pruned.shift() + if (pruned[0] === null) + pruned.shift() - // now count how many args were found - const found = {} - let totalHits = 0 - for (const line of pruned) { - for (const arg of args) { - const hit = (line || '').toLowerCase() - .split(arg.toLowerCase()).length - 1 + // now count how many args were found + const found = {} + let totalHits = 0 + for (const line of pruned) { + for (const arg of args) { + const hit = (line || '').toLowerCase() + .split(arg.toLowerCase()).length - 1 - if (hit > 0) { - found[arg] = (found[arg] || 0) + hit - totalHits += hit + if (hit > 0) { + found[arg] = (found[arg] || 0) + hit + totalHits += hit + } } } + + const cmd = 'npm help ' + + path.basename(file, '.md').replace(/^npm-/, '') + results.push({ + file, + cmd, + lines: pruned, + found: Object.keys(found), + hits: found, + totalHits, + }) } - const cmd = 'npm help ' + - path.basename(file, '.md').replace(/^npm-/, '') - results.push({ - file, - cmd, - lines: pruned, - found: Object.keys(found), - hits: found, - totalHits, - }) + // sort results by number of results found, then by number of hits + // then by number of matching lines + + // coverage is ignored here because the contents of results are + // nondeterministic due to either glob or readFiles or Object.entries + return results.sort(/* istanbul ignore next */ (a, b) => + a.found.length > b.found.length ? -1 + : a.found.length < b.found.length ? 1 + : a.totalHits > b.totalHits ? -1 + : a.totalHits < b.totalHits ? 1 + : a.lines.length > b.lines.length ? -1 + : a.lines.length < b.lines.length ? 1 + : 0).slice(0, 10) } - // sort results by number of results found, then by number of hits - // then by number of matching lines - - // coverage is ignored here because the contents of results are - // nondeterministic due to either glob or readFiles or Object.entries - return results.sort(/* istanbul ignore next */ (a, b) => - a.found.length > b.found.length ? -1 - : a.found.length < b.found.length ? 1 - : a.totalHits > b.totalHits ? -1 - : a.totalHits < b.totalHits ? 1 - : a.lines.length > b.lines.length ? -1 - : a.lines.length < b.lines.length ? 1 - : 0).slice(0, 10) -} - -const formatResults = (args, results) => { - const cols = Math.min(process.stdout.columns || Infinity, 80) + 1 + formatResults (args, results) { + const cols = Math.min(process.stdout.columns || Infinity, 80) + 1 - const out = results.map(res => { - const out = [res.cmd] - const r = Object.keys(res.hits) - .map(k => `${k}:${res.hits[k]}`) - .sort((a, b) => a > b ? 1 : -1) - .join(' ') + const out = results.map(res => { + const out = [res.cmd] + const r = Object.keys(res.hits) + .map(k => `${k}:${res.hits[k]}`) + .sort((a, b) => a > b ? 1 : -1) + .join(' ') - out.push(' '.repeat((Math.max(1, cols - out.join(' ').length - r.length - 1)))) - out.push(r) + out.push(' '.repeat((Math.max(1, cols - out.join(' ').length - r.length - 1)))) + out.push(r) - if (!npm.flatOptions.long) - return out.join('') + if (!this.npm.flatOptions.long) + return out.join('') - out.unshift('\n\n') - out.push('\n') - out.push('-'.repeat(cols - 1) + '\n') - res.lines.forEach((line, i) => { - if (line === null || i > 3) - return + out.unshift('\n\n') + out.push('\n') + out.push('-'.repeat(cols - 1) + '\n') + res.lines.forEach((line, i) => { + if (line === null || i > 3) + return - if (!npm.color) { - out.push(line + '\n') - return - } - const hilitLine = [] - for (const arg of args) { - const finder = line.toLowerCase().split(arg.toLowerCase()) - let p = 0 - for (const f of finder) { - hilitLine.push(line.substr(p, f.length)) - const word = line.substr(p + f.length, arg.length) - const hilit = color.bgBlack(color.red(word)) - hilitLine.push(hilit) - p += f.length + arg.length + if (!this.npm.color) { + out.push(line + '\n') + return } - } - out.push(hilitLine.join('') + '\n') - }) + const hilitLine = [] + for (const arg of args) { + const finder = line.toLowerCase().split(arg.toLowerCase()) + let p = 0 + for (const f of finder) { + hilitLine.push(line.substr(p, f.length)) + const word = line.substr(p + f.length, arg.length) + const hilit = color.bgBlack(color.red(word)) + hilitLine.push(hilit) + p += f.length + arg.length + } + } + out.push(hilitLine.join('') + '\n') + }) - return out.join('') - }).join('\n') + return out.join('') + }).join('\n') - const finalOut = results.length && !npm.flatOptions.long - ? 'Top hits for ' + (args.map(JSON.stringify).join(' ')) + '\n' + + const finalOut = results.length && !this.npm.flatOptions.long + ? 'Top hits for ' + (args.map(JSON.stringify).join(' ')) + '\n' + '—'.repeat(cols - 1) + '\n' + out + '\n' + '—'.repeat(cols - 1) + '\n' + '(run with -l or --long to see more context)' - : out + : out - return finalOut.trim() + return finalOut.trim() + } } - -module.exports = Object.assign(cmd, { usage }) +module.exports = HelpSearch diff --git a/deps/npm/lib/help.js b/deps/npm/lib/help.js index 6f215c76c1ead0..93abf878ba26fa 100644 --- a/deps/npm/lib/help.js +++ b/deps/npm/lib/help.js @@ -1,191 +1,224 @@ - -module.exports = help - -help.completion = async (opts) => { - if (opts.conf.argv.remain.length > 2) - return [] - const g = path.resolve(__dirname, '../man/man[0-9]/*.[0-9]') - const files = await new Promise((resolve, reject) => { - glob(g, function (er, files) { - if (er) - return reject(er) - resolve(files) - }) - }) - - return Object.keys(files.reduce(function (acc, file) { - file = path.basename(file).replace(/\.[0-9]+$/, '') - file = file.replace(/^npm-/, '') - acc[file] = true - return acc - }, { help: true })) -} - const npmUsage = require('./utils/npm-usage.js') const { spawn } = require('child_process') const path = require('path') -const npm = require('./npm.js') const log = require('npmlog') -const openUrl = require('./utils/open-url') +const openUrl = require('./utils/open-url.js') const glob = require('glob') -const output = require('./utils/output.js') - -const usage = require('./utils/usage.js') -help.usage = usage('help', 'npm help []') +const BaseCommand = require('./base-command.js') -function help (args, cb) { - const argv = npm.config.parsedArgv.cooked - - let argnum = 0 - if (args.length === 2 && ~~args[0]) - argnum = ~~args.shift() - - // npm help foo bar baz: search topics - if (args.length > 1 && args[0]) - return npm.commands['help-search'](args, cb) +class Help extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'help' + } - const affordances = { - 'find-dupes': 'dedupe', + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [' []'] } - let section = affordances[args[0]] || npm.deref(args[0]) || args[0] - // npm help : show basic usage - if (!section) { - npmUsage(argv[0] === 'help') - return cb() + async completion (opts) { + if (opts.conf.argv.remain.length > 2) + return [] + const g = path.resolve(__dirname, '../man/man[0-9]/*.[0-9]') + const files = await new Promise((resolve, reject) => { + glob(g, function (er, files) { + if (er) + return reject(er) + resolve(files) + }) + }) + + return Object.keys(files.reduce(function (acc, file) { + file = path.basename(file).replace(/\.[0-9]+$/, '') + file = file.replace(/^npm-/, '') + acc[file] = true + return acc + }, { help: true })) } - // npm -h: show command usage - if (npm.config.get('usage') && - npm.commands[section] && - npm.commands[section].usage) { - npm.config.set('loglevel', 'silent') - log.level = 'silent' - output(npm.commands[section].usage) - return cb() + exec (args, cb) { + this.help(args).then(() => cb()).catch(cb) } - let pref = [1, 5, 7] - if (argnum) - pref = [argnum].concat(pref.filter(n => n !== argnum)) - - // npm help
: Try to find the path - const manroot = path.resolve(__dirname, '..', 'man') - - // legacy - if (section === 'global') - section = 'folders' - else if (section.match(/.*json/)) - section = section.replace('.json', '-json') - - // find either /section.n or /npm-section.n - // The glob is used in the glob. The regexp is used much - // further down. Globs and regexps are different - const compextglob = '.+(gz|bz2|lzma|[FYzZ]|xz)' - const compextre = '\\.(gz|bz2|lzma|[FYzZ]|xz)$' - const f = '+(npm-' + section + '|' + section + ').[0-9]?(' + compextglob + ')' - return glob(manroot + '/*/' + f, (er, mans) => { - if (er) - return cb(er) - - if (!mans.length) - return npm.commands['help-search'](args, cb) - - mans = mans.map((man) => { - const ext = path.extname(man) - if (man.match(new RegExp(compextre))) - man = path.basename(man, ext) - - return man + async help (args) { + const argv = this.npm.config.parsedArgv.cooked + + let argnum = 0 + if (args.length === 2 && ~~args[0]) + argnum = ~~args.shift() + + // npm help foo bar baz: search topics + if (args.length > 1 && args[0]) + return this.helpSearch(args) + + const affordances = { + 'find-dupes': 'dedupe', + } + let section = affordances[args[0]] || this.npm.deref(args[0]) || args[0] + + // npm help : show basic usage + if (!section) { + npmUsage(this.npm, argv[0] === 'help') + return + } + + // npm -h: show command usage + if (this.npm.config.get('usage') && + this.npm.commands[section] && + this.npm.commands[section].usage) { + this.npm.config.set('loglevel', 'silent') + log.level = 'silent' + this.npm.output(this.npm.commands[section].usage) + return + } + + let pref = [1, 5, 7] + if (argnum) + pref = [argnum].concat(pref.filter(n => n !== argnum)) + + // npm help
: Try to find the path + const manroot = path.resolve(__dirname, '..', 'man') + + // legacy + if (section === 'global') + section = 'folders' + else if (section.match(/.*json/)) + section = section.replace('.json', '-json') + + // find either /section.n or /npm-section.n + // The glob is used in the glob. The regexp is used much + // further down. Globs and regexps are different + const compextglob = '.+(gz|bz2|lzma|[FYzZ]|xz)' + const compextre = '\\.(gz|bz2|lzma|[FYzZ]|xz)$' + const f = '+(npm-' + section + '|' + section + ').[0-9]?(' + compextglob + ')' + return new Promise((resolve, reject) => { + glob(manroot + '/*/' + f, async (er, mans) => { + if (er) + return reject(er) + + if (!mans.length) { + this.helpSearch(args).then(resolve).catch(reject) + return + } + + mans = mans.map((man) => { + const ext = path.extname(man) + if (man.match(new RegExp(compextre))) + man = path.basename(man, ext) + + return man + }) + + this.viewMan(this.pickMan(mans, pref), (err) => { + if (err) + return reject(err) + return resolve() + }) + }) }) + } - viewMan(pickMan(mans, pref), cb) - }) -} - -function pickMan (mans, pref_) { - const nre = /([0-9]+)$/ - const pref = {} - pref_.forEach((sect, i) => pref[sect] = i) - mans = mans.sort((a, b) => { - const an = a.match(nre)[1] - const bn = b.match(nre)[1] - return an === bn ? (a > b ? -1 : 1) - : pref[an] < pref[bn] ? -1 - : 1 - }) - return mans[0] -} + helpSearch (args) { + return new Promise((resolve, reject) => { + this.npm.commands['help-search'](args, (err) => { + // This would only error if args was empty, which it never is + /* istanbul ignore next */ + if (err) + return reject(err) -function viewMan (man, cb) { - const nre = /([0-9]+)$/ - const num = man.match(nre)[1] - const section = path.basename(man, '.' + num) - - // at this point, we know that the specified man page exists - const manpath = path.join(__dirname, '..', 'man') - const env = {} - Object.keys(process.env).forEach(function (i) { - env[i] = process.env[i] - }) - env.MANPATH = manpath - const viewer = npm.config.get('viewer') - - const opts = { - env, - stdio: 'inherit', + resolve() + }) + }) } - let bin = 'man' - const args = [] - switch (viewer) { - case 'woman': - bin = 'emacsclient' - args.push('-e', `(woman-find-file '${man}')`) - break - - case 'browser': - bin = false - try { - const url = htmlMan(man) - openUrl(url, 'help available at the following URL', cb) - } catch (err) { - return cb(err) - } - break - - default: - args.push(num, section) - break + pickMan (mans, pref_) { + const nre = /([0-9]+)$/ + const pref = {} + pref_.forEach((sect, i) => pref[sect] = i) + mans = mans.sort((a, b) => { + const an = a.match(nre)[1] + const bn = b.match(nre)[1] + return an === bn ? (a > b ? -1 : 1) + : pref[an] < pref[bn] ? -1 + : 1 + }) + return mans[0] } - if (bin) { - const proc = spawn(bin, args, opts) - proc.on('exit', (code) => { - if (code) - return cb(new Error(`help process exited with code: ${code}`)) + viewMan (man, cb) { + const nre = /([0-9]+)$/ + const num = man.match(nre)[1] + const section = path.basename(man, '.' + num) - return cb() + // at this point, we know that the specified man page exists + const manpath = path.join(__dirname, '..', 'man') + const env = {} + Object.keys(process.env).forEach(function (i) { + env[i] = process.env[i] }) + env.MANPATH = manpath + const viewer = this.npm.config.get('viewer') + + const opts = { + env, + stdio: 'inherit', + } + + let bin = 'man' + const args = [] + switch (viewer) { + case 'woman': + bin = 'emacsclient' + args.push('-e', `(woman-find-file '${man}')`) + break + + case 'browser': + bin = false + try { + const url = this.htmlMan(man) + openUrl(this.npm, url, 'help available at the following URL').then( + () => cb() + ).catch(cb) + } catch (err) { + cb(err) + } + break + + default: + args.push(num, section) + break + } + + if (bin) { + const proc = spawn(bin, args, opts) + proc.on('exit', (code) => { + if (code) + return cb(new Error(`help process exited with code: ${code}`)) + + return cb() + }) + } } -} -function htmlMan (man) { - let sect = +man.match(/([0-9]+)$/)[1] - const f = path.basename(man).replace(/[.]([0-9]+)$/, '') - switch (sect) { - case 1: - sect = 'commands' - break - case 5: - sect = 'configuring-npm' - break - case 7: - sect = 'using-npm' - break - default: - throw new Error('invalid man section: ' + sect) + htmlMan (man) { + let sect = +man.match(/([0-9]+)$/)[1] + const f = path.basename(man).replace(/[.]([0-9]+)$/, '') + switch (sect) { + case 1: + sect = 'commands' + break + case 5: + sect = 'configuring-npm' + break + case 7: + sect = 'using-npm' + break + default: + throw new Error('invalid man section: ' + sect) + } + return 'file://' + path.resolve(__dirname, '..', 'docs', 'output', sect, f + '.html') } - return 'file://' + path.resolve(__dirname, '..', 'docs', 'output', sect, f + '.html') } +module.exports = Help diff --git a/deps/npm/lib/hook.js b/deps/npm/lib/hook.js index 7d69ccbf2aa4c1..6cda3504f43d72 100644 --- a/deps/npm/lib/hook.js +++ b/deps/npm/lib/hook.js @@ -1,73 +1,81 @@ const hookApi = require('libnpmhook') -const npm = require('./npm.js') -const output = require('./utils/output.js') const otplease = require('./utils/otplease.js') const relativeDate = require('tiny-relative-date') const Table = require('cli-table3') -const usageUtil = require('./utils/usage.js') -const usage = usageUtil('hook', [ - 'npm hook add [--type=]', - 'npm hook ls [pkg]', - 'npm hook rm ', - 'npm hook update ', -].join('\n')) +const BaseCommand = require('./base-command.js') +class Hook extends BaseCommand { + static get name () { + return 'hook' + } + + static get usage () { + return [ + 'add [--type=]', + 'ls [pkg]', + 'rm ', + 'update ', + ] + } -const cmd = (args, cb) => hook(args).then(() => cb()).catch(cb) + exec (args, cb) { + this.hook(args).then(() => cb()).catch(cb) + } -const hook = async (args) => otplease(npm.flatOptions, opts => { - switch (args[0]) { - case 'add': - return add(args[1], args[2], args[3], opts) - case 'ls': - return ls(args[1], opts) - case 'rm': - return rm(args[1], opts) - case 'update': - case 'up': - return update(args[1], args[2], args[3], opts) - default: - throw usage + async hook (args) { + return otplease(this.npm.flatOptions, (opts) => { + switch (args[0]) { + case 'add': + return this.add(args[1], args[2], args[3], opts) + case 'ls': + return this.ls(args[1], opts) + case 'rm': + return this.rm(args[1], opts) + case 'update': + case 'up': + return this.update(args[1], args[2], args[3], opts) + default: + throw this.usage + } + }) } -}) -const add = (pkg, uri, secret, opts) => { - hookApi.add(pkg, uri, secret, opts).then(hook => { + async add (pkg, uri, secret, opts) { + const hook = await hookApi.add(pkg, uri, secret, opts) if (opts.json) - output(JSON.stringify(hook, null, 2)) + this.npm.output(JSON.stringify(hook, null, 2)) else if (opts.parseable) { - output(Object.keys(hook).join('\t')) - output(Object.keys(hook).map(k => hook[k]).join('\t')) + this.npm.output(Object.keys(hook).join('\t')) + this.npm.output(Object.keys(hook).map(k => hook[k]).join('\t')) } else if (!opts.silent && opts.loglevel !== 'silent') { - output(`+ ${hookName(hook)} ${ + this.npm.output(`+ ${this.hookName(hook)} ${ opts.unicode ? ' ➜ ' : ' -> ' } ${hook.endpoint}`) } - }) -} + } -const ls = (pkg, opts) => { - return hookApi.ls({ ...opts, package: pkg }).then(hooks => { + async ls (pkg, opts) { + const hooks = await hookApi.ls({ ...opts, package: pkg }) if (opts.json) - output(JSON.stringify(hooks, null, 2)) + this.npm.output(JSON.stringify(hooks, null, 2)) else if (opts.parseable) { - output(Object.keys(hooks[0]).join('\t')) + this.npm.output(Object.keys(hooks[0]).join('\t')) hooks.forEach(hook => { - output(Object.keys(hook).map(k => hook[k]).join('\t')) + this.npm.output(Object.keys(hook).map(k => hook[k]).join('\t')) }) } else if (!hooks.length) - output("You don't have any hooks configured yet.") + this.npm.output("You don't have any hooks configured yet.") else if (!opts.silent && opts.loglevel !== 'silent') { if (hooks.length === 1) - output('You have one hook configured.') + this.npm.output('You have one hook configured.') else - output(`You have ${hooks.length} hooks configured.`) + this.npm.output(`You have ${hooks.length} hooks configured.`) const table = new Table({ head: ['id', 'target', 'endpoint'] }) hooks.forEach((hook) => { table.push([ { rowSpan: 2, content: hook.id }, - hookName(hook), + this.hookName(hook), hook.endpoint, ]) if (hook.last_delivery) { @@ -81,48 +89,45 @@ const ls = (pkg, opts) => { } else table.push([{ colSpan: 2, content: 'never triggered' }]) }) - output(table.toString()) + this.npm.output(table.toString()) } - }) -} + } -const rm = (id, opts) => { - return hookApi.rm(id, opts).then(hook => { + async rm (id, opts) { + const hook = await hookApi.rm(id, opts) if (opts.json) - output(JSON.stringify(hook, null, 2)) + this.npm.output(JSON.stringify(hook, null, 2)) else if (opts.parseable) { - output(Object.keys(hook).join('\t')) - output(Object.keys(hook).map(k => hook[k]).join('\t')) + this.npm.output(Object.keys(hook).join('\t')) + this.npm.output(Object.keys(hook).map(k => hook[k]).join('\t')) } else if (!opts.silent && opts.loglevel !== 'silent') { - output(`- ${hookName(hook)} ${ + this.npm.output(`- ${this.hookName(hook)} ${ opts.unicode ? ' ✘ ' : ' X ' } ${hook.endpoint}`) } - }) -} + } -const update = (id, uri, secret, opts) => { - return hookApi.update(id, uri, secret, opts).then(hook => { + async update (id, uri, secret, opts) { + const hook = await hookApi.update(id, uri, secret, opts) if (opts.json) - output(JSON.stringify(hook, null, 2)) + this.npm.output(JSON.stringify(hook, null, 2)) else if (opts.parseable) { - output(Object.keys(hook).join('\t')) - output(Object.keys(hook).map(k => hook[k]).join('\t')) + this.npm.output(Object.keys(hook).join('\t')) + this.npm.output(Object.keys(hook).map(k => hook[k]).join('\t')) } else if (!opts.silent && opts.loglevel !== 'silent') { - output(`+ ${hookName(hook)} ${ + this.npm.output(`+ ${this.hookName(hook)} ${ opts.unicode ? ' ➜ ' : ' -> ' } ${hook.endpoint}`) } - }) -} + } -const hookName = (hook) => { - let target = hook.name - if (hook.type === 'scope') - target = '@' + target - if (hook.type === 'owner') - target = '~' + target - return target + hookName (hook) { + let target = hook.name + if (hook.type === 'scope') + target = '@' + target + if (hook.type === 'owner') + target = '~' + target + return target + } } - -module.exports = Object.assign(cmd, { usage }) +module.exports = Hook diff --git a/deps/npm/lib/init.js b/deps/npm/lib/init.js index a029779f89638f..42b02dfdc6a77d 100644 --- a/deps/npm/lib/init.js +++ b/deps/npm/lib/init.js @@ -1,88 +1,96 @@ const initJson = require('init-package-json') const npa = require('npm-package-arg') -const npm = require('./npm.js') -const usageUtil = require('./utils/usage.js') -const output = require('./utils/output.js') +const BaseCommand = require('./base-command.js') -const usage = usageUtil( - 'init', - '\nnpm init [--force|-f|--yes|-y|--scope]' + - '\nnpm init <@scope> (same as `npx <@scope>/create`)' + - '\nnpm init [<@scope>/] (same as `npx [<@scope>/]create-`)' -) - -const cmd = (args, cb) => init(args).then(() => cb()).catch(cb) +class Init extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'init' + } -const init = async args => { - // the new npx style way - if (args.length) { - const initerName = args[0] - let packageName = initerName - if (/^@[^/]+$/.test(initerName)) - packageName = initerName + '/create' - else { - const req = npa(initerName) - if (req.type === 'git' && req.hosted) { - const { user, project } = req.hosted - packageName = initerName - .replace(user + '/' + project, user + '/create-' + project) - } else if (req.registry) { - packageName = req.name.replace(/^(@[^/]+\/)?/, '$1create-') - if (req.rawSpec) - packageName += '@' + req.rawSpec - } else { - throw Object.assign(new Error( - 'Unrecognized initializer: ' + initerName + - '\nFor more package binary executing power check out `npx`:' + - '\nhttps://www.npmjs.com/package/npx' - ), { code: 'EUNSUPPORTED' }) - } - } - npm.config.set('package', []) - const newArgs = [packageName, ...args.slice(1)] - return new Promise((res, rej) => { - npm.commands.exec(newArgs, er => er ? rej(er) : res()) - }) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + '[--force|-f|--yes|-y|--scope]', + '<@scope> (same as `npx <@scope>/create`)', + '[<@scope>/] (same as `npx [<@scope>/]create-`)', + ] } - // the old way - const dir = process.cwd() - npm.log.pause() - npm.log.disableProgress() - const initFile = npm.config.get('init-module') - if (!npm.flatOptions.yes && !npm.flatOptions.force) { - output([ - 'This utility will walk you through creating a package.json file.', - 'It only covers the most common items, and tries to guess sensible defaults.', - '', - 'See `npm help init` for definitive documentation on these fields', - 'and exactly what they do.', - '', - 'Use `npm install ` afterwards to install a package and', - 'save it as a dependency in the package.json file.', - '', - 'Press ^C at any time to quit.', - ].join('\n')) + exec (args, cb) { + this.init(args).then(() => cb()).catch(cb) } - // XXX promisify init-package-json - await new Promise((res, rej) => { - initJson(dir, initFile, npm.config, (er, data) => { - npm.log.resume() - npm.log.enableProgress() - npm.log.silly('package data', data) - if (er && er.message === 'canceled') { - npm.log.warn('init', 'canceled') - return res() - } - if (er) - rej(er) + + async init (args) { + // the new npx style way + if (args.length) { + const initerName = args[0] + let packageName = initerName + if (/^@[^/]+$/.test(initerName)) + packageName = initerName + '/create' else { - npm.log.info('init', 'written successfully') - res(data) + const req = npa(initerName) + if (req.type === 'git' && req.hosted) { + const { user, project } = req.hosted + packageName = initerName + .replace(user + '/' + project, user + '/create-' + project) + } else if (req.registry) { + packageName = req.name.replace(/^(@[^/]+\/)?/, '$1create-') + if (req.rawSpec) + packageName += '@' + req.rawSpec + } else { + throw Object.assign(new Error( + 'Unrecognized initializer: ' + initerName + + '\nFor more package binary executing power check out `npx`:' + + '\nhttps://www.npmjs.com/package/npx' + ), { code: 'EUNSUPPORTED' }) + } } + this.npm.config.set('package', []) + const newArgs = [packageName, ...args.slice(1)] + return new Promise((res, rej) => { + this.npm.commands.exec(newArgs, er => er ? rej(er) : res()) + }) + } + + // the old way + const dir = process.cwd() + this.npm.log.pause() + this.npm.log.disableProgress() + const initFile = this.npm.config.get('init-module') + if (!this.npm.flatOptions.yes && !this.npm.flatOptions.force) { + this.npm.output([ + 'This utility will walk you through creating a package.json file.', + 'It only covers the most common items, and tries to guess sensible defaults.', + '', + 'See `npm help init` for definitive documentation on these fields', + 'and exactly what they do.', + '', + 'Use `npm install ` afterwards to install a package and', + 'save it as a dependency in the package.json file.', + '', + 'Press ^C at any time to quit.', + ].join('\n')) + } + // XXX promisify init-package-json + await new Promise((res, rej) => { + initJson(dir, initFile, this.npm.config, (er, data) => { + this.npm.log.resume() + this.npm.log.enableProgress() + this.npm.log.silly('package data', data) + if (er && er.message === 'canceled') { + this.npm.log.warn('init', 'canceled') + return res() + } + if (er) + rej(er) + else { + this.npm.log.info('init', 'written successfully') + res(data) + } + }) }) - }) + } } - -module.exports = Object.assign(cmd, { usage }) +module.exports = Init diff --git a/deps/npm/lib/install-ci-test.js b/deps/npm/lib/install-ci-test.js index 52c41c413a64cc..c52b5c9e8073f5 100644 --- a/deps/npm/lib/install-ci-test.js +++ b/deps/npm/lib/install-ci-test.js @@ -1,19 +1,20 @@ // npm install-ci-test // Runs `npm ci` and then runs `npm test` -const ci = require('./ci.js') -const test = require('./test.js') -const usageUtil = require('./utils/usage.js') +const CI = require('./ci.js') -const usage = usageUtil( - 'install-ci-test', - 'npm install-ci-test [args]' + - '\nSame args as `npm ci`' -) +class InstallCITest extends CI { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'install-ci-test' + } -const completion = ci.completion - -const ciTest = (args, cb) => - ci(args, er => er ? cb(er) : test([], cb)) - -module.exports = Object.assign(ciTest, { usage, completion }) + exec (args, cb) { + this.npm.commands.ci(args, (er) => { + if (er) + return cb(er) + this.npm.commands.test([], cb) + }) + } +} +module.exports = InstallCITest diff --git a/deps/npm/lib/install-test.js b/deps/npm/lib/install-test.js index 9593361e320b8e..76c6f367dd3c81 100644 --- a/deps/npm/lib/install-test.js +++ b/deps/npm/lib/install-test.js @@ -1,19 +1,20 @@ // npm install-test // Runs `npm install` and then runs `npm test` -const install = require('./install.js') -const test = require('./test.js') -const usageUtil = require('./utils/usage.js') +const Install = require('./install.js') -const usage = usageUtil( - 'install-test', - 'npm install-test [args]' + - '\nSame args as `npm install`' -) +class InstallTest extends Install { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'install-test' + } -const completion = install.completion - -const installTest = (args, cb) => - install(args, er => er ? cb(er) : test([], cb)) - -module.exports = Object.assign(installTest, { usage, completion }) + exec (args, cb) { + this.npm.commands.install(args, (er) => { + if (er) + return cb(er) + this.npm.commands.test([], cb) + }) + } +} +module.exports = InstallTest diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index 5f0137db1ceacb..8df63a219ef741 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -3,141 +3,148 @@ const fs = require('fs') const util = require('util') const readdir = util.promisify(fs.readdir) -const npm = require('./npm.js') -const usageUtil = require('./utils/usage.js') const reifyFinish = require('./utils/reify-finish.js') const log = require('npmlog') const { resolve, join } = require('path') const Arborist = require('@npmcli/arborist') const runScript = require('@npmcli/run-script') -const cmd = async (args, cb) => install(args).then(() => cb()).catch(cb) - -const install = async args => { - // the /path/to/node_modules/.. - const globalTop = resolve(npm.globalDir, '..') - const { ignoreScripts, global: isGlobalInstall } = npm.flatOptions - const where = isGlobalInstall ? globalTop : npm.prefix - - // don't try to install the prefix into itself - args = args.filter(a => resolve(a) !== npm.prefix) - - // `npm i -g` => "install this package globally" - if (where === globalTop && !args.length) - args = ['.'] - - // TODO: Add warnings for other deprecated flags? or remove this one? - if (npm.config.get('dev')) - log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--include=dev` instead.') - - const arb = new Arborist({ - ...npm.flatOptions, - path: where, - }) +const BaseCommand = require('./base-command.js') +class Install extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'install' + } - await arb.reify({ - ...npm.flatOptions, - add: args, - }) - if (!args.length && !isGlobalInstall && !ignoreScripts) { - const { scriptShell } = npm.flatOptions - const scripts = [ - 'preinstall', - 'install', - 'postinstall', - 'prepublish', // XXX should we remove this finally?? - 'preprepare', - 'prepare', - 'postprepare', + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + '[<@scope>/]', + '[<@scope>/]@', + '[<@scope>/]@', + '[<@scope>/]@', + '@npm:', + '', + '', + '', + '', + '/ [--save-prod|--save-dev|--save-optional|--save-peer] [--save-exact] [--no-save]', ] - for (const event of scripts) { - await runScript({ - path: where, - args: [], - scriptShell, - stdio: 'inherit', - stdioString: true, - banner: log.level !== 'silent', - event, - }) - } } - await reifyFinish(arb) -} -const usage = usageUtil( - 'install', - 'npm install (with no args, in package dir)' + - '\nnpm install [<@scope>/]' + - '\nnpm install [<@scope>/]@' + - '\nnpm install [<@scope>/]@' + - '\nnpm install [<@scope>/]@' + - '\nnpm install @npm:' + - '\nnpm install ' + - '\nnpm install ' + - '\nnpm install ' + - '\nnpm install ' + - '\nnpm install /', - '[--save-prod|--save-dev|--save-optional|--save-peer] [--save-exact] [--no-save]' -) + async completion (opts) { + const { partialWord } = opts + // install can complete to a folder with a package.json, or any package. + // if it has a slash, then it's gotta be a folder + // if it starts with https?://, then just give up, because it's a url + if (/^https?:\/\//.test(partialWord)) { + // do not complete to URLs + return [] + } -const completion = async (opts) => { - const { partialWord } = opts - // install can complete to a folder with a package.json, or any package. - // if it has a slash, then it's gotta be a folder - // if it starts with https?://, then just give up, because it's a url - if (/^https?:\/\//.test(partialWord)) { - // do not complete to URLs - return [] - } + if (/\//.test(partialWord)) { + // Complete fully to folder if there is exactly one match and it + // is a folder containing a package.json file. If that is not the + // case we return 0 matches, which will trigger the default bash + // complete. + const lastSlashIdx = partialWord.lastIndexOf('/') + const partialName = partialWord.slice(lastSlashIdx + 1) + const partialPath = partialWord.slice(0, lastSlashIdx) || '/' - if (/\//.test(partialWord)) { - // Complete fully to folder if there is exactly one match and it - // is a folder containing a package.json file. If that is not the - // case we return 0 matches, which will trigger the default bash - // complete. - const lastSlashIdx = partialWord.lastIndexOf('/') - const partialName = partialWord.slice(lastSlashIdx + 1) - const partialPath = partialWord.slice(0, lastSlashIdx) || '/' + const annotatePackageDirMatch = async (sibling) => { + const fullPath = join(partialPath, sibling) + if (sibling.slice(0, partialName.length) !== partialName) + return null // not name match - const annotatePackageDirMatch = async (sibling) => { - const fullPath = join(partialPath, sibling) - if (sibling.slice(0, partialName.length) !== partialName) - return null // not name match + try { + const contents = await readdir(fullPath) + return { + fullPath, + isPackage: contents.indexOf('package.json') !== -1, + } + } catch (er) { + return { isPackage: false } + } + } try { - const contents = await readdir(fullPath) - return { - fullPath, - isPackage: contents.indexOf('package.json') !== -1, + const siblings = await readdir(partialPath) + const matches = await Promise.all( + siblings.map(async sibling => { + return await annotatePackageDirMatch(sibling) + }) + ) + const match = matches.filter(el => !el || el.isPackage).pop() + if (match) { + // Success - only one match and it is a package dir + return [match.fullPath] + } else { + // no matches + return [] } } catch (er) { - return { isPackage: false } + return [] // invalid dir: no matching } } + // Note: there used to be registry completion here, + // but it stopped making sense somewhere around + // 50,000 packages on the registry + } + + exec (args, cb) { + this.install(args).then(() => cb()).catch(cb) + } + + async install (args) { + // the /path/to/node_modules/.. + const globalTop = resolve(this.npm.globalDir, '..') + const { ignoreScripts, global: isGlobalInstall } = this.npm.flatOptions + const where = isGlobalInstall ? globalTop : this.npm.prefix - try { - const siblings = await readdir(partialPath) - const matches = await Promise.all( - siblings.map(async sibling => { - return await annotatePackageDirMatch(sibling) + // don't try to install the prefix into itself + args = args.filter(a => resolve(a) !== this.npm.prefix) + + // `npm i -g` => "install this package globally" + if (where === globalTop && !args.length) + args = ['.'] + + // TODO: Add warnings for other deprecated flags? or remove this one? + if (this.npm.config.get('dev')) + log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--include=dev` instead.') + + const arb = new Arborist({ + ...this.npm.flatOptions, + path: where, + }) + + await arb.reify({ + ...this.npm.flatOptions, + add: args, + }) + if (!args.length && !isGlobalInstall && !ignoreScripts) { + const { scriptShell } = this.npm.flatOptions + const scripts = [ + 'preinstall', + 'install', + 'postinstall', + 'prepublish', // XXX should we remove this finally?? + 'preprepare', + 'prepare', + 'postprepare', + ] + for (const event of scripts) { + await runScript({ + path: where, + args: [], + scriptShell, + stdio: 'inherit', + stdioString: true, + banner: log.level !== 'silent', + event, }) - ) - const match = matches.filter(el => !el || el.isPackage).pop() - if (match) { - // Success - only one match and it is a package dir - return [match.fullPath] - } else { - // no matches - return [] } - } catch (er) { - return [] // invalid dir: no matching } + await reifyFinish(this.npm, arb) } - // Note: there used to be registry completion here, - // but it stopped making sense somewhere around - // 50,000 packages on the registry } - -module.exports = Object.assign(cmd, { usage, completion }) +module.exports = Install diff --git a/deps/npm/lib/link.js b/deps/npm/lib/link.js index 0bb3d87b5e7d48..66f83d9f5b0a77 100644 --- a/deps/npm/lib/link.js +++ b/deps/npm/lib/link.js @@ -8,145 +8,154 @@ const npa = require('npm-package-arg') const rpj = require('read-package-json-fast') const semver = require('semver') -const npm = require('./npm.js') -const usageUtil = require('./utils/usage.js') const reifyFinish = require('./utils/reify-finish.js') -const completion = async (opts) => { - const dir = npm.globalDir - const files = await readdir(dir) - return files.filter(f => !/^[._-]/.test(f)) -} +const BaseCommand = require('./base-command.js') +class Link extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'link' + } -const usage = usageUtil( - 'link', - 'npm link (in package dir)' + - '\nnpm link [<@scope>/][@]' -) - -const cmd = (args, cb) => link(args).then(() => cb()).catch(cb) - -const link = async args => { - if (npm.config.get('global')) { - throw Object.assign( - new Error( - 'link should never be --global.\n' + - 'Please re-run this command with --local' - ), - { code: 'ELINKGLOBAL' } - ) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + '(in package dir)', + '[<@scope>/][@]', + ] } - // link with no args: symlink the folder to the global location - // link with package arg: symlink the global to the local - args = args.filter(a => resolve(a) !== npm.prefix) - return args.length - ? linkInstall(args) - : linkPkg() -} + async completion (opts) { + const dir = this.npm.globalDir + const files = await readdir(dir) + return files.filter(f => !/^[._-]/.test(f)) + } -// Returns a list of items that can't be fulfilled by -// things found in the current arborist inventory -const missingArgsFromTree = (tree, args) => { - if (tree.isLink) - return missingArgsFromTree(tree.target, args) - - const foundNodes = [] - const missing = args.filter(a => { - const arg = npa(a) - const nodes = tree.children.values() - const argFound = [...nodes].every(node => { - // TODO: write tests for unmatching version specs, this is hard to test - // atm but should be simple once we have a mocked registry again - if (arg.name !== node.name /* istanbul ignore next */ || ( - arg.version && - !semver.satisfies(node.version, arg.version) - )) { - foundNodes.push(node) - return true - } - }) - return argFound - }) + exec (args, cb) { + this.link(args).then(() => cb()).catch(cb) + } - // remote nodes from the loaded tree in order - // to avoid dropping them later when reifying - for (const node of foundNodes) - node.parent = null + async link (args) { + if (this.npm.config.get('global')) { + throw Object.assign( + new Error( + 'link should never be --global.\n' + + 'Please re-run this command with --local' + ), + { code: 'ELINKGLOBAL' } + ) + } + + // link with no args: symlink the folder to the global location + // link with package arg: symlink the global to the local + args = args.filter(a => resolve(a) !== this.npm.prefix) + return args.length + ? this.linkInstall(args) + : this.linkPkg() + } - return missing -} + async linkInstall (args) { + // load current packages from the global space, + // and then add symlinks installs locally + const globalTop = resolve(this.npm.globalDir, '..') + const globalOpts = { + ...this.npm.flatOptions, + path: globalTop, + global: true, + prune: false, + } + const globalArb = new Arborist(globalOpts) + + // get only current top-level packages from the global space + const globals = await globalArb.loadActual({ + filter: (node, kid) => + !node.isRoot || args.some(a => npa(a).name === kid), + }) -const linkInstall = async args => { - // load current packages from the global space, - // and then add symlinks installs locally - const globalTop = resolve(npm.globalDir, '..') - const globalOpts = { - ...npm.flatOptions, - path: globalTop, - global: true, - prune: false, - } - const globalArb = new Arborist(globalOpts) - - // get only current top-level packages from the global space - const globals = await globalArb.loadActual({ - filter: (node, kid) => - !node.isRoot || args.some(a => npa(a).name === kid), - }) - - // any extra arg that is missing from the current - // global space should be reified there first - const missing = missingArgsFromTree(globals, args) - if (missing.length) { - await globalArb.reify({ - ...globalOpts, - add: missing, + // any extra arg that is missing from the current + // global space should be reified there first + const missing = this.missingArgsFromTree(globals, args) + if (missing.length) { + await globalArb.reify({ + ...globalOpts, + add: missing, + }) + } + + // get a list of module names that should be linked in the local prefix + const names = [] + for (const a of args) { + const arg = npa(a) + names.push( + arg.type === 'directory' + ? (await rpj(resolve(arg.fetchSpec, 'package.json'))).name + : arg.name + ) + } + + // npm link should not save=true by default unless you're + // using any of --save-dev or other types + const save = + Boolean(this.npm.config.find('save') !== 'default' || this.npm.flatOptions.saveType) + + // create a new arborist instance for the local prefix and + // reify all the pending names as symlinks there + const localArb = new Arborist({ + ...this.npm.flatOptions, + path: this.npm.prefix, + save, + }) + await localArb.reify({ + ...this.npm.flatOptions, + path: this.npm.prefix, + add: names.map(l => `file:${resolve(globalTop, 'node_modules', l)}`), + save, }) + + await reifyFinish(this.npm, localArb) } - // get a list of module names that should be linked in the local prefix - const names = [] - for (const a of args) { - const arg = npa(a) - names.push( - arg.type === 'directory' - ? (await rpj(resolve(arg.fetchSpec, 'package.json'))).name - : arg.name - ) + async linkPkg () { + const globalTop = resolve(this.npm.globalDir, '..') + const arb = new Arborist({ + ...this.npm.flatOptions, + path: globalTop, + global: true, + }) + await arb.reify({ add: [`file:${this.npm.prefix}`] }) + await reifyFinish(this.npm, arb) } - // npm link should not save=true by default unless you're - // using any of --save-dev or other types - const save = - Boolean(npm.config.find('save') !== 'default' || npm.flatOptions.saveType) - - // create a new arborist instance for the local prefix and - // reify all the pending names as symlinks there - const localArb = new Arborist({ - ...npm.flatOptions, - path: npm.prefix, - save, - }) - await localArb.reify({ - ...npm.flatOptions, - path: npm.prefix, - add: names.map(l => `file:${resolve(globalTop, 'node_modules', l)}`), - save, - }) - - await reifyFinish(localArb) -} + // Returns a list of items that can't be fulfilled by + // things found in the current arborist inventory + missingArgsFromTree (tree, args) { + if (tree.isLink) + return this.missingArgsFromTree(tree.target, args) + + const foundNodes = [] + const missing = args.filter(a => { + const arg = npa(a) + const nodes = tree.children.values() + const argFound = [...nodes].every(node => { + // TODO: write tests for unmatching version specs, this is hard to test + // atm but should be simple once we have a mocked registry again + if (arg.name !== node.name /* istanbul ignore next */ || ( + arg.version && + !semver.satisfies(node.version, arg.version) + )) { + foundNodes.push(node) + return true + } + }) + return argFound + }) -const linkPkg = async () => { - const globalTop = resolve(npm.globalDir, '..') - const arb = new Arborist({ - ...npm.flatOptions, - path: globalTop, - global: true, - }) - await arb.reify({ add: [`file:${npm.prefix}`] }) - await reifyFinish(arb) -} + // remote nodes from the loaded tree in order + // to avoid dropping them later when reifying + for (const node of foundNodes) + node.parent = null -module.exports = Object.assign(cmd, { completion, usage }) + return missing + } +} +module.exports = Link diff --git a/deps/npm/lib/ll.js b/deps/npm/lib/ll.js index 1d5a6217da9c79..3e3428a7ff5ebc 100644 --- a/deps/npm/lib/ll.js +++ b/deps/npm/lib/ll.js @@ -1,9 +1,20 @@ -const { usage, completion } = require('./ls.js') -const npm = require('./npm.js') +const LS = require('./ls.js') -const cmd = (args, cb) => { - npm.config.set('long', true) - return npm.commands.ls(args, cb) +class LL extends LS { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'll' + } + + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[[<@scope>/] ...]'] + } + + exec (args, cb) { + this.npm.config.set('long', true) + super.exec(args, cb) + } } -module.exports = Object.assign(cmd, { usage, completion }) +module.exports = LL diff --git a/deps/npm/lib/logout.js b/deps/npm/lib/logout.js index d2762c1ba3e5fa..b3f64f671d3266 100644 --- a/deps/npm/lib/logout.js +++ b/deps/npm/lib/logout.js @@ -1,44 +1,50 @@ -const eu = encodeURIComponent const log = require('npmlog') const getAuth = require('npm-registry-fetch/auth.js') const npmFetch = require('npm-registry-fetch') -const npm = require('./npm.js') -const usageUtil = require('./utils/usage.js') - -const usage = usageUtil( - 'logout', - 'npm logout [--registry=] [--scope=<@scope>]' -) - -const cmd = (args, cb) => logout(args).then(() => cb()).catch(cb) - -const logout = async (args) => { - const { registry, scope } = npm.flatOptions - const regRef = scope ? `${scope}:registry` : 'registry' - const reg = npm.flatOptions[regRef] || registry - - const auth = getAuth(reg, npm.flatOptions) - - if (auth.token) { - log.verbose('logout', `clearing token for ${reg}`) - await npmFetch(`/-/user/token/${eu(auth.token)}`, { - ...npm.flatOptions, - method: 'DELETE', - ignoreBody: true, - }) - } else if (auth.username || auth.password) - log.verbose('logout', `clearing user credentials for ${reg}`) - else { - const msg = `not logged in to ${reg}, so can't log out!` - throw Object.assign(new Error(msg), { code: 'ENEEDAUTH' }) +const BaseCommand = require('./base-command.js') + +class Logout extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'logout' } - if (scope) - npm.config.delete(regRef, 'user') + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[--registry=] [--scope=<@scope>]'] + } - npm.config.clearCredentialsByURI(reg) + exec (args, cb) { + this.logout(args).then(() => cb()).catch(cb) + } - await npm.config.save('user') + async logout (args) { + const { registry, scope } = this.npm.flatOptions + const regRef = scope ? `${scope}:registry` : 'registry' + const reg = this.npm.flatOptions[regRef] || registry + + const auth = getAuth(reg, this.npm.flatOptions) + + if (auth.token) { + log.verbose('logout', `clearing token for ${reg}`) + await npmFetch(`/-/user/token/${encodeURIComponent(auth.token)}`, { + ...this.npm.flatOptions, + method: 'DELETE', + ignoreBody: true, + }) + } else if (auth.username || auth.password) + log.verbose('logout', `clearing user credentials for ${reg}`) + else { + const msg = `not logged in to ${reg}, so can't log out!` + throw Object.assign(new Error(msg), { code: 'ENEEDAUTH' }) + } + + if (scope) + this.npm.config.delete(regRef, 'user') + + this.npm.config.clearCredentialsByURI(reg) + + await this.npm.config.save('user') + } } - -module.exports = Object.assign(cmd, { usage }) +module.exports = Logout diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js index 603c3b412ddc5e..9ff2761c2f9285 100644 --- a/deps/npm/lib/ls.js +++ b/deps/npm/lib/ls.js @@ -7,10 +7,7 @@ const Arborist = require('@npmcli/arborist') const { breadth } = require('treeverse') const npa = require('npm-package-arg') -const npm = require('./npm.js') -const usageUtil = require('./utils/usage.js') const completion = require('./utils/completion/installed-deep.js') -const output = require('./utils/output.js') const _depth = Symbol('depth') const _dedupe = Symbol('dedupe') @@ -23,21 +20,166 @@ const _parent = Symbol('parent') const _problems = Symbol('problems') const _required = Symbol('required') const _type = Symbol('type') +const BaseCommand = require('./base-command.js') -const usage = usageUtil( - 'ls', - 'npm ls [[<@scope>/] ...]' -) +class LS extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'ls' + } + + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['npm ls [[<@scope>/] ...]'] + } + + /* istanbul ignore next - see test/lib/load-all-commands.js */ + async completion (opts) { + return completion(this.npm, opts) + } + + exec (args, cb) { + this.ls(args).then(() => cb()).catch(cb) + } + + async ls (args) { + const { + all, + color, + depth, + json, + long, + global, + parseable, + prefix, + unicode, + } = this.npm.flatOptions + const path = global ? resolve(this.npm.globalDir, '..') : prefix + const dev = this.npm.config.get('dev') + const development = this.npm.config.get('development') + const link = this.npm.config.get('link') + const only = this.npm.config.get('only') + const prod = this.npm.config.get('prod') + const production = this.npm.config.get('production') + + const arb = new Arborist({ + global, + ...this.npm.flatOptions, + legacyPeerDeps: false, + path, + }) + const tree = await this.initTree({arb, args }) + + const seenItems = new Set() + const seenNodes = new Map() + const problems = new Set() + + // defines special handling of printed depth when filtering with args + const filterDefaultDepth = depth === null ? Infinity : depth + const depthToPrint = (all || args.length) + ? filterDefaultDepth + : (depth || 0) + + // add root node of tree to list of seenNodes + seenNodes.set(tree.path, tree) + + // tree traversal happens here, using treeverse.breadth + const result = await breadth({ + tree, + // recursive method, `node` is going to be the current elem (starting from + // the `tree` obj) that was just visited in the `visit` method below + // `nodeResult` is going to be the returned `item` from `visit` + getChildren (node, nodeResult) { + const seenPaths = new Set() + const shouldSkipChildren = + !(node instanceof Arborist.Node) || (node[_depth] > depthToPrint) + return (shouldSkipChildren) + ? [] + : [...(node.target || node).edgesOut.values()] + .filter(filterByEdgesTypes({ + dev, + development, + link, + node, + prod, + production, + only, + tree, + })) + .map(mapEdgesToNodes({ seenPaths })) + .concat(appendExtraneousChildren({ node, seenPaths })) + .sort(sortAlphabetically) + .map(augmentNodesWithMetadata({ + args, + currentDepth: node[_depth], + nodeResult, + seenNodes, + })) + }, + // visit each `node` of the `tree`, returning an `item` - these are + // the elements that will be used to build the final output + visit (node) { + node[_problems] = getProblems(node, { global }) + + const item = json + ? getJsonOutputItem(node, { global, long }) + : parseable + ? null + : getHumanOutputItem(node, { args, color, global, long }) + + // loop through list of node problems to add them to global list + if (node[_include]) { + for (const problem of node[_problems]) + problems.add(problem) + } + + seenItems.add(item) + + // return a promise so we don't blow the stack + return Promise.resolve(item) + }, + }) + + // handle the special case of a broken package.json in the root folder + const [rootError] = tree.errors.filter(e => + e.code === 'EJSONPARSE' && e.path === resolve(path, 'package.json')) + + this.npm.output( + json + ? jsonOutput({ path, problems, result, rootError, seenItems }) + : parseable + ? parseableOutput({ seenNodes, global, long }) + : humanOutput({ color, result, seenItems, unicode }) + ) + + // if filtering items, should exit with error code on no results + if (result && !result[_include] && args.length) + process.exitCode = 1 -const cmd = (args, cb) => ls(args).then(() => cb()).catch(cb) + if (rootError) { + throw Object.assign( + new Error('Failed to parse root package.json'), + { code: 'EJSONPARSE' } + ) + } -const initTree = async ({ arb, args, json }) => { - const tree = await arb.loadActual() - tree[_include] = args.length === 0 - tree[_depth] = 0 + if (problems.size) { + throw Object.assign( + new Error([...problems].join(EOL)), + { code: 'ELSPROBLEMS' } + ) + } + } - return tree + async initTree ({ arb, args }) { + const tree = await arb.loadActual() + tree[_include] = args.length === 0 + tree[_depth] = 0 + + return tree + } } +module.exports = LS const isGitNode = (node) => { if (!node.resolved) @@ -252,7 +394,6 @@ const augmentNodesWithMetadata = ({ args, currentDepth, nodeResult, - parseable, seenNodes, }) => (node) => { // if the original edge was a deduped dep, treeverse will fail to @@ -285,7 +426,7 @@ const augmentNodesWithMetadata = ({ // _filteredBy is used to apply extra color info to the item that // was used in args in order to filter node[_filteredBy] = node[_include] = - filterByPositionalArgs(args, { node: seenNodes.get(node.path), seenNodes }) + filterByPositionalArgs(args, { node: seenNodes.get(node.path) }) // _depth keeps track of how many levels deep tree traversal currently is // so that we can `npm ls --depth=1` node[_depth] = currentDepth + 1 @@ -359,140 +500,3 @@ const parseableOutput = ({ global, long, seenNodes }) => { } return out.trim() } - -const ls = async (args) => { - const { - all, - color, - depth, - json, - long, - global, - parseable, - prefix, - unicode, - } = npm.flatOptions - const path = global ? resolve(npm.globalDir, '..') : prefix - const dev = npm.config.get('dev') - const development = npm.config.get('development') - const link = npm.config.get('link') - const only = npm.config.get('only') - const prod = npm.config.get('prod') - const production = npm.config.get('production') - - const arb = new Arborist({ - global, - ...npm.flatOptions, - legacyPeerDeps: false, - path, - }) - const tree = await initTree({ - arb, - args, - global, - json, - }) - - const seenItems = new Set() - const seenNodes = new Map() - const problems = new Set() - - // defines special handling of printed depth when filtering with args - const filterDefaultDepth = depth === null ? Infinity : depth - const depthToPrint = (all || args.length) - ? filterDefaultDepth - : (depth || 0) - - // add root node of tree to list of seenNodes - seenNodes.set(tree.path, tree) - - // tree traversal happens here, using treeverse.breadth - const result = await breadth({ - tree, - // recursive method, `node` is going to be the current elem (starting from - // the `tree` obj) that was just visited in the `visit` method below - // `nodeResult` is going to be the returned `item` from `visit` - getChildren (node, nodeResult) { - const seenPaths = new Set() - const shouldSkipChildren = - !(node instanceof Arborist.Node) || (node[_depth] > depthToPrint) - return (shouldSkipChildren) - ? [] - : [...(node.target || node).edgesOut.values()] - .filter(filterByEdgesTypes({ - dev, - development, - link, - node, - prod, - production, - only, - tree, - })) - .map(mapEdgesToNodes({ seenPaths })) - .concat(appendExtraneousChildren({ node, seenPaths })) - .sort(sortAlphabetically) - .map(augmentNodesWithMetadata({ - args, - currentDepth: node[_depth], - nodeResult, - parseable, - seenNodes, - })) - }, - // visit each `node` of the `tree`, returning an `item` - these are - // the elements that will be used to build the final output - visit (node) { - node[_problems] = getProblems(node, { global }) - - const item = json - ? getJsonOutputItem(node, { global, long }) - : parseable - ? null - : getHumanOutputItem(node, { args, color, global, long }) - - // loop through list of node problems to add them to global list - if (node[_include]) { - for (const problem of node[_problems]) - problems.add(problem) - } - - seenItems.add(item) - - // return a promise so we don't blow the stack - return Promise.resolve(item) - }, - }) - - // handle the special case of a broken package.json in the root folder - const [rootError] = tree.errors.filter(e => - e.code === 'EJSONPARSE' && e.path === resolve(path, 'package.json')) - - output( - json - ? jsonOutput({ path, problems, result, rootError, seenItems }) - : parseable - ? parseableOutput({ seenNodes, global, long }) - : humanOutput({ color, result, seenItems, unicode }) - ) - - // if filtering items, should exit with error code on no results - if (result && !result[_include] && args.length) - process.exitCode = 1 - - if (rootError) { - throw Object.assign( - new Error('Failed to parse root package.json'), - { code: 'EJSONPARSE' } - ) - } - - if (problems.size) { - throw Object.assign( - new Error([...problems].join(EOL)), - { code: 'ELSPROBLEMS' } - ) - } -} - -module.exports = Object.assign(cmd, { usage, completion }) diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 85dc67a78aac68..0534e630606e45 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -13,40 +13,28 @@ require('graceful-fs').gracefulify(require('fs')) const procLogListener = require('./utils/proc-log-listener.js') -const hasOwnProperty = (obj, key) => - Object.prototype.hasOwnProperty.call(obj, key) - -// the first time `npm.commands.xyz` is loaded, it gets added -// to the cmds object, so we don't have to load it again. -const proxyCmds = (npm) => { - const cmds = {} - return new Proxy(cmds, { - get: (prop, cmd) => { - if (hasOwnProperty(cmds, cmd)) - return cmds[cmd] - - const actual = deref(cmd) - if (!actual) { - cmds[cmd] = undefined - return cmds[cmd] - } - if (cmds[actual]) { - cmds[cmd] = cmds[actual] - return cmds[cmd] - } - cmds[actual] = makeCmd(actual) - cmds[cmd] = cmds[actual] - return cmds[cmd] - }, - }) -} - -const makeCmd = cmd => { - const impl = require(`./${cmd}.js`) - const fn = (args, cb) => npm[_runCmd](cmd, impl, args, cb) - Object.assign(fn, impl) - return fn -} +const proxyCmds = new Proxy({}, { + get: (target, cmd) => { + const actual = deref(cmd) + if (actual && !Reflect.has(target, actual)) { + const Impl = require(`./${actual}.js`) + const impl = new Impl(npm) + // Our existing npm.commands[x] act like a function with attributes, but + // our modules have non-inumerable attributes so we can't just assign + // them to an anonymous function like we used to. This acts like that + // old way of doing things, until we can make breaking changes to the + // npm.commands[x] api + target[actual] = new Proxy( + (args, cb) => npm[_runCmd](cmd, impl, args, cb), + { + get: (target, attr, receiver) => { + return Reflect.get(impl, attr, receiver) + }, + }) + } + return target[actual] + }, +}) const { types, defaults, shorthands } = require('./utils/config.js') const { shellouts } = require('./utils/cmd-list.js') @@ -68,7 +56,7 @@ const npm = module.exports = new class extends EventEmitter { } this.started = Date.now() this.command = null - this.commands = proxyCmds(this) + this.commands = proxyCmds procLogListener() process.emit('time', 'npm') this.version = require('../package.json').version @@ -121,7 +109,7 @@ const npm = module.exports = new class extends EventEmitter { console.log(impl.usage) cb() } else { - impl(args, er => { + impl.exec(args, er => { process.emit('timeEnd', `command:${cmd}`) cb(er) }) @@ -193,7 +181,7 @@ const npm = module.exports = new class extends EventEmitter { this.title = tokrev ? 'npm token revoke' + (this.argv[2] ? ' ***' : '') : ['npm', ...this.argv].join(' ') - this.color = setupLog(this.config, this) + this.color = setupLog(this.config) process.env.COLOR = this.color ? '1' : '0' cleanUpLogFiles(this.cache, this.config.get('logs-max'), log.warn) @@ -294,6 +282,13 @@ const npm = module.exports = new class extends EventEmitter { } return resolve(this.config.get('tmp'), this[_tmpFolder]) } + + // output to stdout in a progress bar compatible way + output (...msg) { + this.log.clearProgress() + console.log(...msg) + this.log.showProgress() + } }() // now load everything required by the class methods diff --git a/deps/npm/lib/org.js b/deps/npm/lib/org.js index aa9c97d497bbfb..b9f84b060f8a83 100644 --- a/deps/npm/lib/org.js +++ b/deps/npm/lib/org.js @@ -1,139 +1,148 @@ const liborg = require('libnpmorg') -const npm = require('./npm.js') -const output = require('./utils/output.js') const otplease = require('./utils/otplease.js') const Table = require('cli-table3') +const BaseCommand = require('./base-command.js') -module.exports = org - -org.subcommands = ['set', 'rm', 'ls'] - -org.usage = - 'npm org set orgname username [developer | admin | owner]\n' + - 'npm org rm orgname username\n' + - 'npm org ls orgname []' - -org.completion = async (opts) => { - var argv = opts.conf.argv.remain - if (argv.length === 2) - return org.subcommands +class Org extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'org' + } - switch (argv[2]) { - case 'ls': - case 'add': - case 'rm': - case 'set': - return [] - default: - throw new Error(argv[2] + ' not recognized') + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + 'set orgname username [developer | admin | owner]', + 'rm orgname username', + 'ls orgname []', + ] } -} -function UsageError () { - throw Object.assign(new Error(org.usage), { code: 'EUSAGE' }) -} + async completion (opts) { + const argv = opts.conf.argv.remain + if (argv.length === 2) + return ['set', 'rm', 'ls'] -function org ([cmd, orgname, username, role], cb) { - return otplease(npm.flatOptions, opts => { - switch (cmd) { + switch (argv[2]) { + case 'ls': case 'add': - case 'set': - return orgSet(orgname, username, role, opts) case 'rm': - return orgRm(orgname, username, opts) - case 'ls': - return orgList(orgname, username, opts) + case 'set': + return [] default: - UsageError() + throw new Error(argv[2] + ' not recognized') } - }).then( - x => cb(null, x), - err => cb(err.code === 'EUSAGE' ? err.message : err) - ) -} + } -function orgSet (org, user, role, opts) { - role = role || 'developer' - if (!org) - throw new Error('First argument `orgname` is required.') - - if (!user) - throw new Error('Second argument `username` is required.') - - if (!['owner', 'admin', 'developer'].find(x => x === role)) - throw new Error('Third argument `role` must be one of `owner`, `admin`, or `developer`, with `developer` being the default value if omitted.') - - return liborg.set(org, user, role, opts).then(memDeets => { - if (opts.json) - output(JSON.stringify(memDeets, null, 2)) - else if (opts.parseable) { - output(['org', 'orgsize', 'user', 'role'].join('\t')) - output([ - memDeets.org.name, - memDeets.org.size, - memDeets.user, - memDeets.role, - ].join('\t')) - } else if (!opts.silent && opts.loglevel !== 'silent') - output(`Added ${memDeets.user} as ${memDeets.role} to ${memDeets.org.name}. You now have ${memDeets.org.size} member${memDeets.org.size === 1 ? '' : 's'} in this org.`) - - return memDeets - }) -} + exec (args, cb) { + this.org(args) + .then(x => cb(null, x)) + .catch(err => err.code === 'EUSAGE' + ? cb(err.message) + : cb(err) + ) + } -function orgRm (org, user, opts) { - if (!org) - throw new Error('First argument `orgname` is required.') - - if (!user) - throw new Error('Second argument `username` is required.') - - return liborg.rm(org, user, opts).then(() => { - return liborg.ls(org, opts) - }).then(roster => { - user = user.replace(/^[~@]?/, '') - org = org.replace(/^[~@]?/, '') - const userCount = Object.keys(roster).length - if (opts.json) { - output(JSON.stringify({ - user, - org, - userCount, - deleted: true, - })) - } else if (opts.parseable) { - output(['user', 'org', 'userCount', 'deleted'].join('\t')) - output([user, org, userCount, true].join('\t')) - } else if (!opts.silent && opts.loglevel !== 'silent') - output(`Successfully removed ${user} from ${org}. You now have ${userCount} member${userCount === 1 ? '' : 's'} in this org.`) - }) -} + async org ([cmd, orgname, username, role], cb) { + return otplease(this.npm.flatOptions, opts => { + switch (cmd) { + case 'add': + case 'set': + return this.set(orgname, username, role, opts) + case 'rm': + return this.rm(orgname, username, opts) + case 'ls': + return this.ls(orgname, username, opts) + default: + throw Object.assign(new Error(this.usage), { code: 'EUSAGE' }) + } + }) + } -function orgList (org, user, opts) { - if (!org) - throw new Error('First argument `orgname` is required.') + set (org, user, role, opts) { + role = role || 'developer' + if (!org) + throw new Error('First argument `orgname` is required.') + + if (!user) + throw new Error('Second argument `username` is required.') + + if (!['owner', 'admin', 'developer'].find(x => x === role)) + throw new Error('Third argument `role` must be one of `owner`, `admin`, or `developer`, with `developer` being the default value if omitted.') + + return liborg.set(org, user, role, opts).then(memDeets => { + if (opts.json) + this.npm.output(JSON.stringify(memDeets, null, 2)) + else if (opts.parseable) { + this.npm.output(['org', 'orgsize', 'user', 'role'].join('\t')) + this.npm.output([ + memDeets.org.name, + memDeets.org.size, + memDeets.user, + memDeets.role, + ].join('\t')) + } else if (!opts.silent && opts.loglevel !== 'silent') + this.npm.output(`Added ${memDeets.user} as ${memDeets.role} to ${memDeets.org.name}. You now have ${memDeets.org.size} member${memDeets.org.size === 1 ? '' : 's'} in this org.`) + + return memDeets + }) + } - return liborg.ls(org, opts).then(roster => { - if (user) { - const newRoster = {} - if (roster[user]) - newRoster[user] = roster[user] + rm (org, user, opts) { + if (!org) + throw new Error('First argument `orgname` is required.') + + if (!user) + throw new Error('Second argument `username` is required.') + + return liborg.rm(org, user, opts).then(() => { + return liborg.ls(org, opts) + }).then(roster => { + user = user.replace(/^[~@]?/, '') + org = org.replace(/^[~@]?/, '') + const userCount = Object.keys(roster).length + if (opts.json) { + this.npm.output(JSON.stringify({ + user, + org, + userCount, + deleted: true, + })) + } else if (opts.parseable) { + this.npm.output(['user', 'org', 'userCount', 'deleted'].join('\t')) + this.npm.output([user, org, userCount, true].join('\t')) + } else if (!opts.silent && opts.loglevel !== 'silent') + this.npm.output(`Successfully removed ${user} from ${org}. You now have ${userCount} member${userCount === 1 ? '' : 's'} in this org.`) + }) + } - roster = newRoster - } - if (opts.json) - output(JSON.stringify(roster, null, 2)) - else if (opts.parseable) { - output(['user', 'role'].join('\t')) - Object.keys(roster).forEach(user => { - output([user, roster[user]].join('\t')) - }) - } else if (!opts.silent && opts.loglevel !== 'silent') { - const table = new Table({ head: ['user', 'role'] }) - Object.keys(roster).sort().forEach(user => { - table.push([user, roster[user]]) - }) - output(table.toString()) - } - }) + ls (org, user, opts) { + if (!org) + throw new Error('First argument `orgname` is required.') + + return liborg.ls(org, opts).then(roster => { + if (user) { + const newRoster = {} + if (roster[user]) + newRoster[user] = roster[user] + + roster = newRoster + } + if (opts.json) + this.npm.output(JSON.stringify(roster, null, 2)) + else if (opts.parseable) { + this.npm.output(['user', 'role'].join('\t')) + Object.keys(roster).forEach(user => { + this.npm.output([user, roster[user]].join('\t')) + }) + } else if (!opts.silent && opts.loglevel !== 'silent') { + const table = new Table({ head: ['user', 'role'] }) + Object.keys(roster).sort().forEach(user => { + table.push([user, roster[user]]) + }) + this.npm.output(table.toString()) + } + }) + } } +module.exports = Org diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js index c10f63a12e3a27..7225577ea42d47 100644 --- a/deps/npm/lib/outdated.js +++ b/deps/npm/lib/outdated.js @@ -9,112 +9,133 @@ const pickManifest = require('npm-pick-manifest') const Arborist = require('@npmcli/arborist') -const npm = require('./npm.js') -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') const ansiTrim = require('./utils/ansi-trim.js') +const BaseCommand = require('./base-command.js') -const usage = usageUtil('outdated', - 'npm outdated [[<@scope>/] ...]' -) +class Outdated extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'outdated' + } -function cmd (args, cb) { - outdated(args) - .then(() => cb()) - .catch(cb) -} + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[[<@scope>/] ...]'] + } -async function outdated (args) { - const opts = npm.flatOptions - const global = path.resolve(npm.globalDir, '..') - const where = opts.global - ? global - : npm.prefix - - const arb = new Arborist({ - ...opts, - path: where, - }) - - const tree = await arb.loadActual() - const list = await outdated_(tree, args, opts) - - // sorts list alphabetically - const outdated = list.sort((a, b) => a.name.localeCompare(b.name)) - - // return if no outdated packages - if (outdated.length === 0 && !opts.json) - return - - // display results - if (opts.json) - output(makeJSON(outdated, opts)) - else if (opts.parseable) - output(makeParseable(outdated, opts)) - else { - const outList = outdated.map(x => makePretty(x, opts)) - const outHead = ['Package', - 'Current', - 'Wanted', - 'Latest', - 'Location', - 'Depended by', - ] - - if (opts.long) - outHead.push('Package Type', 'Homepage') - const outTable = [outHead].concat(outList) - - if (opts.color) - outTable[0] = outTable[0].map(heading => styles.underline(heading)) - - const tableOpts = { - align: ['l', 'r', 'r', 'r', 'l'], - stringLength: s => ansiTrim(s).length, - } - output(table(outTable, tableOpts)) + exec (args, cb) { + this.outdated(args).then(() => cb()).catch(cb) } -} -async function outdated_ (tree, deps, opts) { - const list = [] + async outdated (args) { + this.opts = this.npm.flatOptions + + const global = path.resolve(this.npm.globalDir, '..') + const where = this.opts.global + ? global + : this.npm.prefix + + const arb = new Arborist({ + ...this.opts, + path: where, + }) - const edges = new Set() - function getEdges (nodes, type) { - const getEdgesIn = (node) => { - for (const edge of node.edgesIn) - edges.add(edge) + this.edges = new Set() + this.list = [] + this.tree = await arb.loadActual() + + if (args.length !== 0) { + // specific deps + for (let i = 0; i < args.length; i++) { + const nodes = this.tree.inventory.query('name', args[i]) + this.getEdges(nodes, 'edgesIn') + } + } else { + if (this.opts.all) { + // all deps in tree + const nodes = this.tree.inventory.values() + this.getEdges(nodes, 'edgesOut') + } + // top-level deps + this.getEdges() } - const getEdgesOut = (node) => { - if (opts.global) { - for (const child of node.children.values()) - edges.add(child) - } else { - for (const edge of node.edgesOut.values()) - edges.add(edge) + await Promise.all(Array.from(this.edges).map((edge) => { + return this.getOutdatedInfo(edge) + })) + + // sorts list alphabetically + const outdated = this.list.sort((a, b) => a.name.localeCompare(b.name)) + + // return if no outdated packages + if (outdated.length === 0 && !this.opts.json) + return + + // display results + if (this.opts.json) + this.npm.output(this.makeJSON(outdated)) + else if (this.opts.parseable) + this.npm.output(this.makeParseable(outdated)) + else { + const outList = outdated.map(x => this.makePretty(x)) + const outHead = ['Package', + 'Current', + 'Wanted', + 'Latest', + 'Location', + 'Depended by', + ] + + if (this.opts.long) + outHead.push('Package Type', 'Homepage') + const outTable = [outHead].concat(outList) + + if (this.opts.color) + outTable[0] = outTable[0].map(heading => styles.underline(heading)) + + const tableOpts = { + align: ['l', 'r', 'r', 'r', 'l'], + stringLength: s => ansiTrim(s).length, } + this.npm.output(table(outTable, tableOpts)) } + } + getEdges (nodes, type) { if (!nodes) - return getEdgesOut(tree) + return this.getEdgesOut(this.tree) for (const node of nodes) { type === 'edgesOut' - ? getEdgesOut(node) - : getEdgesIn(node) + ? this.getEdgesOut(node) + : this.getEdgesIn(node) + } + } + + getEdgesIn (node) { + for (const edge of node.edgesIn) + this.edges.add(edge) + } + + getEdgesOut (node) { + if (this.opts.global) { + for (const child of node.children.values()) + this.edges.add(child) + } else { + for (const edge of node.edgesOut.values()) + this.edges.add(edge) } } - async function getPackument (spec) { + async getPackument (spec) { const packument = await pacote.packument(spec, { - ...npm.flatOptions, - fullMetadata: npm.flatOptions.long, + ...this.npm.flatOptions, + fullMetadata: this.npm.flatOptions.long, preferOnline: true, }) return packument } - async function getOutdatedInfo (edge) { + async getOutdatedInfo (edge) { const spec = npa(edge.name) const node = edge.to || edge const { path, location } = node @@ -125,7 +146,7 @@ async function outdated_ (tree, deps, opts) { : edge.dev ? 'devDependencies' : 'dependencies' - for (const omitType of opts.omit || []) { + for (const omitType of this.opts.omit || []) { if (node[omitType]) return } @@ -136,7 +157,7 @@ async function outdated_ (tree, deps, opts) { return try { - const packument = await getPackument(spec) + const packument = await this.getPackument(spec) const expected = edge.spec // if it's not a range, version, or tag, skip it try { @@ -145,15 +166,15 @@ async function outdated_ (tree, deps, opts) { } catch (err) { return null } - const wanted = pickManifest(packument, expected, npm.flatOptions) - const latest = pickManifest(packument, '*', npm.flatOptions) + const wanted = pickManifest(packument, expected, this.npm.flatOptions) + const latest = pickManifest(packument, '*', this.npm.flatOptions) if ( !current || current !== wanted.version || wanted.version !== latest.version ) { - list.push({ + this.list.push({ name: edge.name, path, type, @@ -167,7 +188,7 @@ async function outdated_ (tree, deps, opts) { } } catch (err) { // silently catch and ignore ETARGET, E403 & - // E404 errors, deps are just skipped { + // E404 errors, deps are just skipped if (!( err.code === 'ETARGET' || err.code === 'E403' || @@ -177,113 +198,89 @@ async function outdated_ (tree, deps, opts) { } } - const p = [] - if (deps.length !== 0) { - // specific deps - for (let i = 0; i < deps.length; i++) { - const nodes = tree.inventory.query('name', deps[i]) - getEdges(nodes, 'edgesIn') - } - } else { - if (opts.all) { - // all deps in tree - const nodes = tree.inventory.values() - getEdges(nodes, 'edgesOut') - } - // top-level deps - getEdges() - } - - for (const edge of edges) - p.push(getOutdatedInfo(edge)) - - await Promise.all(p) - return list -} - -// formatting functions -function makePretty (dep, opts) { - const { - current = 'MISSING', - location = '-', - homepage = '', - name, - wanted, - latest, - type, - dependent, - } = dep - - const columns = [name, current, wanted, latest, location, dependent] - - if (opts.long) { - columns[6] = type - columns[7] = homepage - } - - if (opts.color) { - columns[0] = color[current === wanted ? 'yellow' : 'red'](columns[0]) // current - columns[2] = color.green(columns[2]) // wanted - columns[3] = color.magenta(columns[3]) // latest - } - - return columns -} - -// --parseable creates output like this: -// :::: -function makeParseable (list, opts) { - return list.map(dep => { + // formatting functions + makePretty (dep) { const { + current = 'MISSING', + location = '-', + homepage = '', name, - current, wanted, latest, - path, - dependent, type, - homepage, - } = dep - const out = [ - path, - name + '@' + wanted, - current ? (name + '@' + current) : 'MISSING', - name + '@' + latest, dependent, - ] - if (opts.long) - out.push(type, homepage) + } = dep - return out.join(':') - }).join(os.EOL) -} + const columns = [name, current, wanted, latest, location, dependent] -function makeJSON (list, opts) { - const out = {} - list.forEach(dep => { - const { - name, - current, - wanted, - latest, - path, - type, - dependent, - homepage, - } = dep - out[name] = { - current, - wanted, - latest, - dependent, - location: path, + if (this.opts.long) { + columns[6] = type + columns[7] = homepage } - if (opts.long) { - out[name].type = type - out[name].homepage = homepage + + if (this.opts.color) { + columns[0] = color[current === wanted ? 'yellow' : 'red'](columns[0]) // current + columns[2] = color.green(columns[2]) // wanted + columns[3] = color.magenta(columns[3]) // latest } - }) - return JSON.stringify(out, null, 2) -} -module.exports = Object.assign(cmd, { usage }) + return columns + } + + // --parseable creates output like this: + // :::: + makeParseable (list) { + return list.map(dep => { + const { + name, + current, + wanted, + latest, + path, + dependent, + type, + homepage, + } = dep + const out = [ + path, + name + '@' + wanted, + current ? (name + '@' + current) : 'MISSING', + name + '@' + latest, + dependent, + ] + if (this.opts.long) + out.push(type, homepage) + + return out.join(':') + }).join(os.EOL) + } + + makeJSON (list) { + const out = {} + list.forEach(dep => { + const { + name, + current, + wanted, + latest, + path, + type, + dependent, + homepage, + } = dep + out[name] = { + current, + wanted, + latest, + dependent, + location: path, + } + if (this.opts.long) { + out[name].type = type + out[name].homepage = homepage + } + }) + return JSON.stringify(out, null, 2) + } +} +module.exports = Outdated diff --git a/deps/npm/lib/owner.js b/deps/npm/lib/owner.js index 6dce3ec70f3965..b62f125ac3bb68 100644 --- a/deps/npm/lib/owner.js +++ b/deps/npm/lib/owner.js @@ -3,229 +3,236 @@ const npa = require('npm-package-arg') const npmFetch = require('npm-registry-fetch') const pacote = require('pacote') -const npm = require('./npm.js') -const output = require('./utils/output.js') const otplease = require('./utils/otplease.js') const readLocalPkg = require('./utils/read-local-package.js') -const usageUtil = require('./utils/usage.js') - -const usage = usageUtil( - 'owner', - 'npm owner add [<@scope>/]' + - '\nnpm owner rm [<@scope>/]' + - '\nnpm owner ls [<@scope>/]' -) - -const completion = async (opts) => { - const argv = opts.conf.argv.remain - if (argv.length > 3) - return [] +const BaseCommand = require('./base-command.js') - if (argv[1] !== 'owner') - argv.unshift('owner') +class Owner extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'owner' + } - if (argv.length === 2) - return ['add', 'rm', 'ls'] + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + 'add [<@scope>/]', + 'rm [<@scope>/]', + 'ls [<@scope>/]', + ] + } - // reaches registry in order to autocomplete rm - if (argv[2] === 'rm') { - const opts = { - ...npm.flatOptions, - fullMetadata: true, - } - const pkgName = await readLocalPkg() - if (!pkgName) + async completion (opts) { + const argv = opts.conf.argv.remain + if (argv.length > 3) return [] - const spec = npa(pkgName) - const data = await pacote.packument(spec, opts) - if (data && data.maintainers && data.maintainers.length) - return data.maintainers.map(m => m.name) + if (argv[1] !== 'owner') + argv.unshift('owner') + + if (argv.length === 2) + return ['add', 'rm', 'ls'] + + // reaches registry in order to autocomplete rm + if (argv[2] === 'rm') { + const pkgName = await readLocalPkg(this.npm) + if (!pkgName) + return [] + + const spec = npa(pkgName) + const data = await pacote.packument(spec, { + ...this.npm.flatOptions, + fullMetadata: true, + }) + if (data && data.maintainers && data.maintainers.length) + return data.maintainers.map(m => m.name) + } + return [] } - return [] -} -const UsageError = () => - Object.assign(new Error(usage), { code: 'EUSAGE' }) - -const cmd = (args, cb) => owner(args).then(() => cb()).catch(cb) - -const owner = async ([action, ...args]) => { - const opts = npm.flatOptions - switch (action) { - case 'ls': - case 'list': - return ls(args[0], opts) - case 'add': - return add(args[0], args[1], opts) - case 'rm': - case 'remove': - return rm(args[0], args[1], opts) - default: - throw UsageError() + exec (args, cb) { + this.owner(args).then(() => cb()).catch(cb) } -} - -const ls = async (pkg, opts) => { - if (!pkg) { - const pkgName = await readLocalPkg() - if (!pkgName) - throw UsageError() - pkg = pkgName + async owner ([action, ...args]) { + const opts = this.npm.flatOptions + switch (action) { + case 'ls': + case 'list': + return this.ls(args[0], opts) + case 'add': + return this.add(args[0], args[1], opts) + case 'rm': + case 'remove': + return this.rm(args[0], args[1], opts) + default: + throw this.usageError() + } } - const spec = npa(pkg) + async ls (pkg, opts) { + if (!pkg) { + const pkgName = await readLocalPkg(this.npm) + if (!pkgName) + throw this.usageError() - try { - const packumentOpts = { ...opts, fullMetadata: true } - const { maintainers } = await pacote.packument(spec, packumentOpts) - if (!maintainers || !maintainers.length) - output('no admin found') - else - output(maintainers.map(o => `${o.name} <${o.email}>`).join('\n')) + pkg = pkgName + } - return maintainers - } catch (err) { - log.error('owner ls', "Couldn't get owner data", pkg) - throw err - } -} + const spec = npa(pkg) -const validateAddOwner = (newOwner, owners) => { - owners = owners || [] - for (const o of owners) { - if (o.name === newOwner.name) { - log.info( - 'owner add', - 'Already a package owner: ' + o.name + ' <' + o.email + '>' - ) - return false + try { + const packumentOpts = { ...opts, fullMetadata: true } + const { maintainers } = await pacote.packument(spec, packumentOpts) + if (!maintainers || !maintainers.length) + this.npm.output('no admin found') + else + this.npm.output(maintainers.map(o => `${o.name} <${o.email}>`).join('\n')) + + return maintainers + } catch (err) { + log.error('owner ls', "Couldn't get owner data", pkg) + throw err } } - return [ - ...owners, - newOwner, - ] -} -const add = async (user, pkg, opts) => { - if (!user) - throw UsageError() + async add (user, pkg, opts) { + if (!user) + throw this.usageError() + + if (!pkg) { + const pkgName = await readLocalPkg(this.npm) + if (!pkgName) + throw this.usageError() - if (!pkg) { - const pkgName = await readLocalPkg() - if (!pkgName) - throw UsageError() + pkg = pkgName + } + log.verbose('owner add', '%s to %s', user, pkg) - pkg = pkgName + const spec = npa(pkg) + return this.putOwners(spec, user, opts, + (newOwner, owners) => this.validateAddOwner(newOwner, owners)) } - log.verbose('owner add', '%s to %s', user, pkg) - const spec = npa(pkg) - return putOwners(spec, user, opts, validateAddOwner) -} + async rm (user, pkg, opts) { + if (!user) + throw this.usageError() -const validateRmOwner = (rmOwner, owners) => { - let found = false - const m = owners.filter(function (o) { - var match = (o.name === rmOwner.name) - found = found || match - return !match - }) - - if (!found) { - log.info('owner rm', 'Not a package owner: ' + rmOwner.name) - return false - } + if (!pkg) { + const pkgName = await readLocalPkg(this.npm) + if (!pkgName) + throw this.usageError() - if (!m.length) { - throw Object.assign( - new Error( - 'Cannot remove all owners of a package. Add someone else first.' - ), - { code: 'EOWNERRM' } - ) + pkg = pkgName + } + log.verbose('owner rm', '%s from %s', user, pkg) + + const spec = npa(pkg) + return this.putOwners(spec, user, opts, + (rmOwner, owners) => this.validateRmOwner(rmOwner, owners)) } - return m -} + async putOwners (spec, user, opts, validation) { + const uri = `/-/user/org.couchdb.user:${encodeURIComponent(user)}` + let u = '' -const rm = async (user, pkg, opts) => { - if (!user) - throw UsageError() + try { + u = await npmFetch.json(uri, opts) + } catch (err) { + log.error('owner mutate', `Error getting user data for ${user}`) + throw err + } - if (!pkg) { - const pkgName = await readLocalPkg() - if (!pkgName) - throw UsageError() + if (user && (!u || !u.name || u.error)) { + throw Object.assign( + new Error( + "Couldn't get user data for " + user + ': ' + JSON.stringify(u) + ), + { code: 'EOWNERUSER' } + ) + } - pkg = pkgName - } - log.verbose('owner rm', '%s from %s', user, pkg) + // normalize user data + u = { name: u.name, email: u.email } - const spec = npa(pkg) - return putOwners(spec, user, opts, validateRmOwner) -} + const data = await pacote.packument(spec, { ...opts, fullMetadata: true }) -const putOwners = async (spec, user, opts, validation) => { - const uri = `/-/user/org.couchdb.user:${encodeURIComponent(user)}` - let u = '' + // save the number of maintainers before validation for comparison + const before = data.maintainers ? data.maintainers.length : 0 - try { - u = await npmFetch.json(uri, opts) - } catch (err) { - log.error('owner mutate', `Error getting user data for ${user}`) - throw err - } + const m = validation(u, data.maintainers) + if (!m) + return // invalid owners - if (user && (!u || !u.name || u.error)) { - throw Object.assign( - new Error( - "Couldn't get user data for " + user + ': ' + JSON.stringify(u) - ), - { code: 'EOWNERUSER' } - ) + const body = { + _id: data._id, + _rev: data._rev, + maintainers: m, + } + const dataPath = `/${spec.escapedName}/-rev/${encodeURIComponent(data._rev)}` + const res = await otplease(opts, opts => { + return npmFetch.json(dataPath, { + ...opts, + method: 'PUT', + body, + spec, + }) + }) + + if (!res.error) { + if (m.length < before) + this.npm.output(`- ${user} (${spec.name})`) + else + this.npm.output(`+ ${user} (${spec.name})`) + } else { + throw Object.assign( + new Error('Failed to update package: ' + JSON.stringify(res)), + { code: 'EOWNERMUTATE' } + ) + } + return res } - // normalize user data - u = { name: u.name, email: u.email } + validateAddOwner (newOwner, owners) { + owners = owners || [] + for (const o of owners) { + if (o.name === newOwner.name) { + log.info( + 'owner add', + 'Already a package owner: ' + o.name + ' <' + o.email + '>' + ) + return false + } + } + return [ + ...owners, + newOwner, + ] + } - const data = await pacote.packument(spec, { ...opts, fullMetadata: true }) + validateRmOwner (rmOwner, owners) { + let found = false + const m = owners.filter(function (o) { + var match = (o.name === rmOwner.name) + found = found || match + return !match + }) - // save the number of maintainers before validation for comparison - const before = data.maintainers ? data.maintainers.length : 0 + if (!found) { + log.info('owner rm', 'Not a package owner: ' + rmOwner.name) + return false + } - const m = validation(u, data.maintainers) - if (!m) - return // invalid owners + if (!m.length) { + throw Object.assign( + new Error( + 'Cannot remove all owners of a package. Add someone else first.' + ), + { code: 'EOWNERRM' } + ) + } - const body = { - _id: data._id, - _rev: data._rev, - maintainers: m, + return m } - const dataPath = `/${spec.escapedName}/-rev/${encodeURIComponent(data._rev)}` - const res = await otplease(opts, opts => - npmFetch.json(dataPath, { - ...opts, - method: 'PUT', - body, - spec, - })) - - if (!res.error) { - if (m.length < before) - output(`- ${user} (${spec.name})`) - else - output(`+ ${user} (${spec.name})`) - } else { - throw Object.assign( - new Error('Failed to update package: ' + JSON.stringify(res)), - { code: 'EOWNERMUTATE' } - ) - } - return res } - -module.exports = Object.assign(cmd, { usage, completion }) +module.exports = Owner diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js index ff906cc2bd5a13..326fcc0cd1441f 100644 --- a/deps/npm/lib/pack.js +++ b/deps/npm/lib/pack.js @@ -4,46 +4,53 @@ const pacote = require('pacote') const libpack = require('libnpmpack') const npa = require('npm-package-arg') -const npm = require('./npm.js') const { getContents, logTar } = require('./utils/tar.js') const writeFile = util.promisify(require('fs').writeFile) -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') -const usage = usageUtil('pack', 'npm pack [[<@scope>/]...] [--dry-run]') +const BaseCommand = require('./base-command.js') -const cmd = (args, cb) => pack(args).then(() => cb()).catch(cb) +class Pack extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'pack' + } -const pack = async (args) => { - if (args.length === 0) - args = ['.'] + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[[<@scope>/]...] [--dry-run]'] + } - const { unicode } = npm.flatOptions + exec (args, cb) { + this.pack(args).then(() => cb()).catch(cb) + } - // clone the opts because pacote mutates it with resolved/integrity - const tarballs = await Promise.all(args.map((arg) => - pack_(arg, { ...npm.flatOptions }))) + async pack (args) { + if (args.length === 0) + args = ['.'] - for (const tar of tarballs) { - logTar(tar, { log, unicode }) - output(tar.filename.replace(/^@/, '').replace(/\//, '-')) - } -} + const { unicode } = this.npm.flatOptions -const pack_ = async (arg, opts) => { - const spec = npa(arg) - const { dryRun } = opts - const manifest = await pacote.manifest(spec, opts) - const filename = `${manifest.name}-${manifest.version}.tgz` - .replace(/^@/, '').replace(/\//, '-') - const tarballData = await libpack(arg, opts) - const pkgContents = await getContents(manifest, tarballData) + // clone the opts because pacote mutates it with resolved/integrity + const tarballs = await Promise.all(args.map(async (arg) => { + const spec = npa(arg) + const { dryRun } = this.npm.flatOptions + const manifest = await pacote.manifest(spec, this.npm.flatOptions) + const filename = `${manifest.name}-${manifest.version}.tgz` + .replace(/^@/, '').replace(/\//, '-') + const tarballData = await libpack(arg, this.npm.flatOptions) + const pkgContents = await getContents(manifest, tarballData) - if (!dryRun) - await writeFile(filename, tarballData) + if (!dryRun) + await writeFile(filename, tarballData) - return pkgContents -} + return pkgContents + })) -module.exports = Object.assign(cmd, { usage }) + for (const tar of tarballs) { + logTar(tar, { log, unicode }) + this.npm.output(tar.filename.replace(/^@/, '').replace(/\//, '-')) + } + } +} +module.exports = Pack diff --git a/deps/npm/lib/ping.js b/deps/npm/lib/ping.js index efa22631033c91..e60b1f1debd80c 100644 --- a/deps/npm/lib/ping.js +++ b/deps/npm/lib/ping.js @@ -1,27 +1,36 @@ const log = require('npmlog') -const npm = require('./npm.js') -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') +const pingUtil = require('./utils/ping.js') +const BaseCommand = require('./base-command.js') -const usage = usageUtil('ping', 'npm ping\nping registry') +class Ping extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'ping' + } -const cmd = (args, cb) => ping(args).then(() => cb()).catch(cb) -const pingUtil = require('./utils/ping.js') + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get description () { + return 'ping registry' + } -const ping = async args => { - log.notice('PING', npm.flatOptions.registry) - const start = Date.now() - const details = await pingUtil(npm.flatOptions) - const time = Date.now() - start - log.notice('PONG', `${time / 1000}ms`) - if (npm.flatOptions.json) { - output(JSON.stringify({ - registry: npm.flatOptions.registry, - time, - details, - }, null, 2)) - } else if (Object.keys(details).length) - log.notice('PONG', `${JSON.stringify(details, null, 2)}`) -} + exec (args, cb) { + this.ping(args).then(() => cb()).catch(cb) + } -module.exports = Object.assign(cmd, { usage }) + async ping (args) { + log.notice('PING', this.npm.flatOptions.registry) + const start = Date.now() + const details = await pingUtil(this.npm.flatOptions) + const time = Date.now() - start + log.notice('PONG', `${time / 1000}ms`) + if (this.npm.flatOptions.json) { + this.npm.output(JSON.stringify({ + registry: this.npm.flatOptions.registry, + time, + details, + }, null, 2)) + } else if (Object.keys(details).length) + log.notice('PONG', `${JSON.stringify(details, null, 2)}`) + } +} +module.exports = Ping diff --git a/deps/npm/lib/prefix.js b/deps/npm/lib/prefix.js index d108b9d423afd5..5ade87f6429f63 100644 --- a/deps/npm/lib/prefix.js +++ b/deps/npm/lib/prefix.js @@ -1,7 +1,22 @@ -const npm = require('./npm.js') -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') -const cmd = (args, cb) => prefix(args).then(() => cb()).catch(cb) -const usage = usageUtil('prefix', 'npm prefix [-g]') -const prefix = async (args, cb) => output(npm.prefix) -module.exports = Object.assign(cmd, { usage }) +const BaseCommand = require('./base-command.js') + +class Prefix extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'prefix' + } + + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[-g]'] + } + + exec (args, cb) { + this.prefix(args).then(() => cb()).catch(cb) + } + + async prefix (args) { + return this.npm.output(this.npm.prefix) + } +} +module.exports = Prefix diff --git a/deps/npm/lib/profile.js b/deps/npm/lib/profile.js index 3727ac0c8bdd41..1c0df498885406 100644 --- a/deps/npm/lib/profile.js +++ b/deps/npm/lib/profile.js @@ -6,71 +6,12 @@ const npmProfile = require('npm-profile') const qrcodeTerminal = require('qrcode-terminal') const Table = require('cli-table3') -const npm = require('./npm.js') const otplease = require('./utils/otplease.js') -const output = require('./utils/output.js') const pulseTillDone = require('./utils/pulse-till-done.js') const readUserInfo = require('./utils/read-user-info.js') -const usageUtil = require('./utils/usage.js') - -const usage = usageUtil( - 'npm profile enable-2fa [auth-only|auth-and-writes]\n', - 'npm profile disable-2fa\n', - 'npm profile get []\n', - 'npm profile set ' -) - -const completion = async (opts) => { - var argv = opts.conf.argv.remain - const subcommands = ['enable-2fa', 'disable-2fa', 'get', 'set'] - - if (!argv[2]) - return subcommands - - switch (argv[2]) { - case 'enable-2fa': - case 'enable-tfa': - return ['auth-and-writes', 'auth-only'] - - case 'disable-2fa': - case 'disable-tfa': - case 'get': - case 'set': - return [] - default: - throw new Error(argv[2] + ' not recognized') - } -} -const cmd = (args, cb) => profile(args).then(() => cb()).catch(cb) - -const profile = async (args) => { - if (args.length === 0) - throw new Error(usage) - - log.gauge.show('profile') - - const [subcmd, ...opts] = args - - switch (subcmd) { - case 'enable-2fa': - case 'enable-tfa': - case 'enable2fa': - case 'enabletfa': - return enable2fa(opts) - case 'disable-2fa': - case 'disable-tfa': - case 'disable2fa': - case 'disabletfa': - return disable2fa() - case 'get': - return get(opts) - case 'set': - return set(opts) - default: - throw new Error('Unknown profile command: ' + subcmd) - } -} +const qrcode = url => + new Promise((resolve) => qrcodeTerminal.generate(url, resolve)) const knownProfileKeys = [ 'name', @@ -85,64 +26,6 @@ const knownProfileKeys = [ 'updated', ] -const get = async args => { - const tfa = 'two-factor auth' - const conf = { ...npm.flatOptions } - - const info = await pulseTillDone.withPromise(npmProfile.get(conf)) - - if (!info.cidr_whitelist) - delete info.cidr_whitelist - - if (conf.json) { - output(JSON.stringify(info, null, 2)) - return - } - - // clean up and format key/values for output - const cleaned = {} - for (const key of knownProfileKeys) - cleaned[key] = info[key] || '' - - const unknownProfileKeys = Object.keys(info).filter((k) => !(k in cleaned)) - for (const key of unknownProfileKeys) - cleaned[key] = info[key] || '' - - delete cleaned.tfa - delete cleaned.email_verified - cleaned.email += info.email_verified ? ' (verified)' : '(unverified)' - - if (info.tfa && !info.tfa.pending) - cleaned[tfa] = info.tfa.mode - else - cleaned[tfa] = 'disabled' - - if (args.length) { - const values = args // comma or space separated - .join(',') - .split(/,/) - .filter((arg) => arg.trim() !== '') - .map((arg) => cleaned[arg]) - .join('\t') - output(values) - } else { - if (conf.parseable) { - for (const key of Object.keys(info)) { - if (key === 'tfa') - output(`${key}\t${cleaned[tfa]}`) - else - output(`${key}\t${info[key]}`) - } - } else { - const table = new Table() - for (const key of Object.keys(cleaned)) - table.push({ [ansistyles.bright(key)]: cleaned[key] }) - - output(table.toString()) - } - } -} - const writableProfileKeys = [ 'email', 'password', @@ -153,242 +36,366 @@ const writableProfileKeys = [ 'github', ] -const set = async (args) => { - const conf = { ...npm.flatOptions } - const prop = (args[0] || '').toLowerCase().trim() +const BaseCommand = require('./base-command.js') +class Profile extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'profile' + } - let value = args.length > 1 ? args.slice(1).join(' ') : null + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + 'enable-2fa [auth-only|auth-and-writes]', + 'disable-2fa', + 'get []', + 'set ', + ] + } - const readPasswords = async () => { - const newpassword = await readUserInfo.password('New password: ') - const confirmedpassword = await readUserInfo.password(' Again: ') + async completion (opts) { + var argv = opts.conf.argv.remain - if (newpassword !== confirmedpassword) { - log.warn('profile', 'Passwords do not match, please try again.') - return readPasswords() - } + if (!argv[2]) + return ['enable-2fa', 'disable-2fa', 'get', 'set'] - return newpassword - } + switch (argv[2]) { + case 'enable-2fa': + case 'enable-tfa': + return ['auth-and-writes', 'auth-only'] - if (prop !== 'password' && value === null) - throw new Error('npm profile set ') + case 'disable-2fa': + case 'disable-tfa': + case 'get': + case 'set': + return [] + default: + throw new Error(argv[2] + ' not recognized') + } + } - if (prop === 'password' && value !== null) { - throw new Error( - 'npm profile set password\n' + - 'Do not include your current or new passwords on the command line.') + exec (args, cb) { + this.profile(args).then(() => cb()).catch(cb) } - if (writableProfileKeys.indexOf(prop) === -1) { - throw new Error(`"${prop}" is not a property we can set. ` + - `Valid properties are: ` + writableProfileKeys.join(', ')) + async profile (args) { + if (args.length === 0) + throw new Error(this.usage) + + log.gauge.show('profile') + + const [subcmd, ...opts] = args + + switch (subcmd) { + case 'enable-2fa': + case 'enable-tfa': + case 'enable2fa': + case 'enabletfa': + return this.enable2fa(opts) + case 'disable-2fa': + case 'disable-tfa': + case 'disable2fa': + case 'disabletfa': + return this.disable2fa() + case 'get': + return this.get(opts) + case 'set': + return this.set(opts) + default: + throw new Error('Unknown profile command: ' + subcmd) + } } - if (prop === 'password') { - const current = await readUserInfo.password('Current password: ') - const newpassword = await readPasswords() + async get (args) { + const tfa = 'two-factor auth' + const conf = { ...this.npm.flatOptions } + + const info = await pulseTillDone.withPromise(npmProfile.get(conf)) + + if (!info.cidr_whitelist) + delete info.cidr_whitelist + + if (conf.json) { + this.npm.output(JSON.stringify(info, null, 2)) + return + } - value = { old: current, new: newpassword } + // clean up and format key/values for output + const cleaned = {} + for (const key of knownProfileKeys) + cleaned[key] = info[key] || '' + + const unknownProfileKeys = Object.keys(info).filter((k) => !(k in cleaned)) + for (const key of unknownProfileKeys) + cleaned[key] = info[key] || '' + + delete cleaned.tfa + delete cleaned.email_verified + cleaned.email += info.email_verified ? ' (verified)' : '(unverified)' + + if (info.tfa && !info.tfa.pending) + cleaned[tfa] = info.tfa.mode + else + cleaned[tfa] = 'disabled' + + if (args.length) { + const values = args // comma or space separated + .join(',') + .split(/,/) + .filter((arg) => arg.trim() !== '') + .map((arg) => cleaned[arg]) + .join('\t') + this.npm.output(values) + } else { + if (conf.parseable) { + for (const key of Object.keys(info)) { + if (key === 'tfa') + this.npm.output(`${key}\t${cleaned[tfa]}`) + else + this.npm.output(`${key}\t${info[key]}`) + } + } else { + const table = new Table() + for (const key of Object.keys(cleaned)) + table.push({ [ansistyles.bright(key)]: cleaned[key] }) + + this.npm.output(table.toString()) + } + } } - // FIXME: Work around to not clear everything other than what we're setting - const user = await pulseTillDone.withPromise(npmProfile.get(conf)) - const newUser = {} + async set (args) { + const conf = { ...this.npm.flatOptions } + const prop = (args[0] || '').toLowerCase().trim() - for (const key of writableProfileKeys) - newUser[key] = user[key] + let value = args.length > 1 ? args.slice(1).join(' ') : null - newUser[prop] = value + const readPasswords = async () => { + const newpassword = await readUserInfo.password('New password: ') + const confirmedpassword = await readUserInfo.password(' Again: ') - const result = await otplease(conf, conf => npmProfile.set(newUser, conf)) + if (newpassword !== confirmedpassword) { + log.warn('profile', 'Passwords do not match, please try again.') + return readPasswords() + } - if (conf.json) - output(JSON.stringify({ [prop]: result[prop] }, null, 2)) - else if (conf.parseable) - output(prop + '\t' + result[prop]) - else if (result[prop] != null) - output('Set', prop, 'to', result[prop]) - else - output('Set', prop) -} + return newpassword + } -const enable2fa = async (args) => { - if (args.length > 1) - throw new Error('npm profile enable-2fa [auth-and-writes|auth-only]') - - const mode = args[0] || 'auth-and-writes' - if (mode !== 'auth-only' && mode !== 'auth-and-writes') { - throw new Error( - `Invalid two-factor authentication mode "${mode}".\n` + - 'Valid modes are:\n' + - ' auth-only - Require two-factor authentication only when logging in\n' + - ' auth-and-writes - Require two-factor authentication when logging in ' + - 'AND when publishing' - ) - } + if (prop !== 'password' && value === null) + throw new Error('npm profile set ') - const conf = { ...npm.flatOptions } - if (conf.json || conf.parseable) { - throw new Error( - 'Enabling two-factor authentication is an interactive operation and ' + - (conf.json ? 'JSON' : 'parseable') + ' output mode is not available' - ) - } + if (prop === 'password' && value !== null) { + throw new Error( + 'npm profile set password\n' + + 'Do not include your current or new passwords on the command line.') + } - const info = { - tfa: { - mode: mode, - }, - } + if (writableProfileKeys.indexOf(prop) === -1) { + throw new Error(`"${prop}" is not a property we can set. ` + + `Valid properties are: ` + writableProfileKeys.join(', ')) + } - // if they're using legacy auth currently then we have to - // update them to a bearer token before continuing. - const auth = getAuth(conf) + if (prop === 'password') { + const current = await readUserInfo.password('Current password: ') + const newpassword = await readPasswords() - if (!auth.basic && !auth.token) { - throw new Error( - 'You need to be logged in to registry ' + - `${conf.registry} in order to enable 2fa` - ) + value = { old: current, new: newpassword } + } + + // FIXME: Work around to not clear everything other than what we're setting + const user = await pulseTillDone.withPromise(npmProfile.get(conf)) + const newUser = {} + + for (const key of writableProfileKeys) + newUser[key] = user[key] + + newUser[prop] = value + + const result = await otplease(conf, conf => npmProfile.set(newUser, conf)) + + if (conf.json) + this.npm.output(JSON.stringify({ [prop]: result[prop] }, null, 2)) + else if (conf.parseable) + this.npm.output(prop + '\t' + result[prop]) + else if (result[prop] != null) + this.npm.output('Set', prop, 'to', result[prop]) + else + this.npm.output('Set', prop) } - if (auth.basic) { - log.info('profile', 'Updating authentication to bearer token') - const result = await npmProfile.createToken( - auth.basic.password, false, [], conf - ) + async enable2fa (args) { + if (args.length > 1) + throw new Error('npm profile enable-2fa [auth-and-writes|auth-only]') - if (!result.token) { + const mode = args[0] || 'auth-and-writes' + if (mode !== 'auth-only' && mode !== 'auth-and-writes') { throw new Error( - `Your registry ${conf.registry} does not seem to ` + - 'support bearer tokens. Bearer tokens are required for ' + - 'two-factor authentication' + `Invalid two-factor authentication mode "${mode}".\n` + + 'Valid modes are:\n' + + ' auth-only - Require two-factor authentication only when logging in\n' + + ' auth-and-writes - Require two-factor authentication when logging in ' + + 'AND when publishing' ) } - npm.config.setCredentialsByURI(conf.registry, { token: result.token }) - await npm.config.save('user') - } + const conf = { ...this.npm.flatOptions } + if (conf.json || conf.parseable) { + throw new Error( + 'Enabling two-factor authentication is an interactive operation and ' + + (conf.json ? 'JSON' : 'parseable') + ' output mode is not available' + ) + } - log.notice('profile', 'Enabling two factor authentication for ' + mode) - const password = await readUserInfo.password() - info.tfa.password = password + const info = { + tfa: { + mode: mode, + }, + } - log.info('profile', 'Determine if tfa is pending') - const userInfo = await pulseTillDone.withPromise(npmProfile.get(conf)) + // if they're using legacy auth currently then we have to + // update them to a bearer token before continuing. + const creds = this.npm.config.getCredentialsByURI(conf.registry) + const auth = {} + + if (creds.token) + auth.token = creds.token + else if (creds.username) + auth.basic = { username: creds.username, password: creds.password } + else if (creds.auth) { + const basic = Buffer.from(creds.auth, 'base64').toString().split(':', 2) + auth.basic = { username: basic[0], password: basic[1] } + } - if (userInfo && userInfo.tfa && userInfo.tfa.pending) { - log.info('profile', 'Resetting two-factor authentication') - await pulseTillDone.withPromise( - npmProfile.set({ tfa: { password, mode: 'disable' } }, conf) - ) - } else if (userInfo && userInfo.tfa) { if (conf.otp) - conf.otp = conf.otp - else { - const otp = await readUserInfo.otp( - 'Enter one-time password from your authenticator app: ' + auth.otp = conf.otp + + if (!auth.basic && !auth.token) { + throw new Error( + 'You need to be logged in to registry ' + + `${conf.registry} in order to enable 2fa` ) - conf.otp = otp } - } - log.info('profile', 'Setting two-factor authentication to ' + mode) - const challenge = await pulseTillDone.withPromise(npmProfile.set(info, conf)) + if (auth.basic) { + log.info('profile', 'Updating authentication to bearer token') + const result = await npmProfile.createToken( + auth.basic.password, false, [], conf + ) - if (challenge.tfa === null) { - output('Two factor authentication mode changed to: ' + mode) - return - } + if (!result.token) { + throw new Error( + `Your registry ${conf.registry} does not seem to ` + + 'support bearer tokens. Bearer tokens are required for ' + + 'two-factor authentication' + ) + } - const badResponse = typeof challenge.tfa !== 'string' - || !/^otpauth:[/][/]/.test(challenge.tfa) - if (badResponse) { - throw new Error( - 'Unknown error enabling two-factor authentication. Expected otpauth URL' + - ', got: ' + inspect(challenge.tfa) - ) - } + this.npm.config.setCredentialsByURI( + conf.registry, + { token: result.token } + ) + await this.npm.config.save('user') + } - const otpauth = new URL(challenge.tfa) - const secret = otpauth.searchParams.get('secret') - const code = await qrcode(challenge.tfa) + log.notice('profile', 'Enabling two factor authentication for ' + mode) + const password = await readUserInfo.password() + info.tfa.password = password - output( - 'Scan into your authenticator app:\n' + code + '\n Or enter code:', secret - ) + log.info('profile', 'Determine if tfa is pending') + const userInfo = await pulseTillDone.withPromise(npmProfile.get(conf)) - const interactiveOTP = - await readUserInfo.otp('And an OTP code from your authenticator: ') + if (userInfo && userInfo.tfa && userInfo.tfa.pending) { + log.info('profile', 'Resetting two-factor authentication') + await pulseTillDone.withPromise( + npmProfile.set({ tfa: { password, mode: 'disable' } }, conf) + ) + } else if (userInfo && userInfo.tfa) { + if (conf.otp) + conf.otp = conf.otp + else { + const otp = await readUserInfo.otp( + 'Enter one-time password from your authenticator app: ' + ) + conf.otp = otp + } + } - log.info('profile', 'Finalizing two-factor authentication') + log.info('profile', 'Setting two-factor authentication to ' + mode) + const challenge = await pulseTillDone.withPromise( + npmProfile.set(info, conf) + ) - const result = await npmProfile.set({ tfa: [interactiveOTP] }, conf) + if (challenge.tfa === null) { + this.npm.output('Two factor authentication mode changed to: ' + mode) + return + } - output( - '2FA successfully enabled. Below are your recovery codes, ' + - 'please print these out.' - ) - output( - 'You will need these to recover access to your account ' + - 'if you lose your authentication device.' - ) + const badResponse = typeof challenge.tfa !== 'string' + || !/^otpauth:[/][/]/.test(challenge.tfa) + if (badResponse) { + throw new Error( + 'Unknown error enabling two-factor authentication. Expected otpauth URL' + + ', got: ' + inspect(challenge.tfa) + ) + } - for (const tfaCode of result.tfa) - output('\t' + tfaCode) -} + const otpauth = new URL(challenge.tfa) + const secret = otpauth.searchParams.get('secret') + const code = await qrcode(challenge.tfa) -const getAuth = conf => { - const creds = npm.config.getCredentialsByURI(conf.registry) - const auth = {} - - if (creds.token) - auth.token = creds.token - else if (creds.username) - auth.basic = { username: creds.username, password: creds.password } - else if (creds.auth) { - const basic = Buffer.from(creds.auth, 'base64').toString().split(':', 2) - auth.basic = { username: basic[0], password: basic[1] } - } + this.npm.output( + 'Scan into your authenticator app:\n' + code + '\n Or enter code:', secret + ) - if (conf.otp) - auth.otp = conf.otp + const interactiveOTP = + await readUserInfo.otp('And an OTP code from your authenticator: ') - return auth -} + log.info('profile', 'Finalizing two-factor authentication') -const disable2fa = async args => { - const conf = { ...npm.flatOptions } - const info = await pulseTillDone.withPromise(npmProfile.get(conf)) + const result = await npmProfile.set({ tfa: [interactiveOTP] }, conf) - if (!info.tfa || info.tfa.pending) { - output('Two factor authentication not enabled.') - return + this.npm.output( + '2FA successfully enabled. Below are your recovery codes, ' + + 'please print these out.' + ) + this.npm.output( + 'You will need these to recover access to your account ' + + 'if you lose your authentication device.' + ) + + for (const tfaCode of result.tfa) + this.npm.output('\t' + tfaCode) } - const password = await readUserInfo.password() + async disable2fa (args) { + const conf = { ...this.npm.flatOptions } + const info = await pulseTillDone.withPromise(npmProfile.get(conf)) - if (!conf.otp) { - const msg = 'Enter one-time password from your authenticator app: ' - conf.otp = await readUserInfo.otp(msg) - } + if (!info.tfa || info.tfa.pending) { + this.npm.output('Two factor authentication not enabled.') + return + } - log.info('profile', 'disabling tfa') + const password = await readUserInfo.password() - await pulseTillDone.withPromise(npmProfile.set({ - tfa: { password: password, mode: 'disable' }, - }, conf)) + if (!conf.otp) { + const msg = 'Enter one-time password from your authenticator app: ' + conf.otp = await readUserInfo.otp(msg) + } - if (conf.json) - output(JSON.stringify({ tfa: false }, null, 2)) - else if (conf.parseable) - output('tfa\tfalse') - else - output('Two factor authentication disabled.') -} + log.info('profile', 'disabling tfa') -const qrcode = url => - new Promise((resolve) => qrcodeTerminal.generate(url, resolve)) + await pulseTillDone.withPromise(npmProfile.set({ + tfa: { password: password, mode: 'disable' }, + }, conf)) -module.exports = Object.assign(cmd, { usage, completion }) + if (conf.json) + this.npm.output(JSON.stringify({ tfa: false }, null, 2)) + else if (conf.parseable) + this.npm.output('tfa\tfalse') + else + this.npm.output('Two factor authentication disabled.') + } +} +module.exports = Profile diff --git a/deps/npm/lib/prune.js b/deps/npm/lib/prune.js index 228fd3eebb1786..c2cddb1a22b335 100644 --- a/deps/npm/lib/prune.js +++ b/deps/npm/lib/prune.js @@ -1,24 +1,31 @@ // prune extraneous packages -const npm = require('./npm.js') const Arborist = require('@npmcli/arborist') -const usageUtil = require('./utils/usage.js') - const reifyFinish = require('./utils/reify-finish.js') -const usage = usageUtil('prune', - 'npm prune [[<@scope>/]...] [--production]' -) +const BaseCommand = require('./base-command.js') +class Prune extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'prune' + } -const cmd = (args, cb) => prune().then(() => cb()).catch(cb) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[[<@scope>/]...] [--production]'] + } -const prune = async () => { - const where = npm.prefix - const arb = new Arborist({ - ...npm.flatOptions, - path: where, - }) - await arb.prune(npm.flatOptions) - await reifyFinish(arb) -} + exec (args, cb) { + this.prune().then(() => cb()).catch(cb) + } -module.exports = Object.assign(cmd, { usage }) + async prune () { + const where = this.npm.prefix + const arb = new Arborist({ + ...this.npm.flatOptions, + path: where, + }) + await arb.prune(this.npm.flatOptions) + await reifyFinish(this.npm, arb) + } +} +module.exports = Prune diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js index 5ec66d42fa9a7c..f8e0eafe118864 100644 --- a/deps/npm/lib/publish.js +++ b/deps/npm/lib/publish.js @@ -8,8 +8,7 @@ const pacote = require('pacote') const npa = require('npm-package-arg') const npmFetch = require('npm-registry-fetch') -const npm = require('./npm.js') -const output = require('./utils/output.js') +const { flatten } = require('./utils/flat-options.js') const otplease = require('./utils/otplease.js') const { getContents, logTar } = require('./utils/tar.js') @@ -18,122 +17,127 @@ const { getContents, logTar } = require('./utils/tar.js') // defaults and metadata, like git sha's and default scripts and all that. const readJson = util.promisify(require('read-package-json')) -const usageUtil = require('./utils/usage.js') -const usage = usageUtil('publish', - 'npm publish [] [--tag ] [--access ] [--dry-run]' + - '\n\nPublishes \'.\' if no argument supplied' + - '\nSets tag `latest` if no --tag specified') +const BaseCommand = require('./base-command.js') +class Publish extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'publish' + } -const cmd = (args, cb) => publish(args).then(() => cb()).catch(cb) + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [ + '[] [--tag ] [--access ] [--dry-run]', + ] + } -const publish = async args => { - if (args.length === 0) - args = ['.'] - if (args.length !== 1) - throw usage + exec (args, cb) { + this.publish(args).then(() => cb()).catch(cb) + } - log.verbose('publish', args) + async publish (args) { + if (args.length === 0) + args = ['.'] + if (args.length !== 1) + throw this.usage - const opts = { ...npm.flatOptions } - const { json, defaultTag } = opts + log.verbose('publish', args) - if (semver.validRange(defaultTag)) - throw new Error('Tag name must not be a valid SemVer range: ' + defaultTag.trim()) + const opts = { ...this.npm.flatOptions } + const { unicode, dryRun, json, defaultTag } = opts - const tarball = await publish_(args[0], opts) - const silent = log.level === 'silent' - if (!silent && json) - output(JSON.stringify(tarball, null, 2)) - else if (!silent) - output(`+ ${tarball.id}`) + if (semver.validRange(defaultTag)) + throw new Error('Tag name must not be a valid SemVer range: ' + defaultTag.trim()) - return tarball -} + // you can publish name@version, ./foo.tgz, etc. + // even though the default is the 'file:.' cwd. + const spec = npa(args[0]) + let manifest = await this.getManifest(spec, opts) -// if it's a directory, read it from the file system -// otherwise, get the full metadata from whatever it is -const getManifest = (spec, opts) => - spec.type === 'directory' ? readJson(`${spec.fetchSpec}/package.json`) - : pacote.manifest(spec, { ...opts, fullMetadata: true }) + if (manifest.publishConfig) + Object.assign(opts, this.publishConfigToOpts(manifest.publishConfig)) -// for historical reasons, publishConfig in package.json can contain -// ANY config keys that npm supports in .npmrc files and elsewhere. -// We *may* want to revisit this at some point, and have a minimal set -// that's a SemVer-major change that ought to get a RFC written on it. -const { flatten } = require('./utils/flat-options.js') -const publishConfigToOpts = publishConfig => - // create a new object that inherits from the config stack - // then squash the css-case into camelCase opts, like we do - flatten(Object.assign(Object.create(npm.config.list[0]), publishConfig)) - -const publish_ = async (arg, opts) => { - const { unicode, dryRun, json } = opts - // you can publish name@version, ./foo.tgz, etc. - // even though the default is the 'file:.' cwd. - const spec = npa(arg) - - let manifest = await getManifest(spec, opts) - - if (manifest.publishConfig) - Object.assign(opts, publishConfigToOpts(manifest.publishConfig)) - - // only run scripts for directory type publishes - if (spec.type === 'directory') { - await runScript({ - event: 'prepublishOnly', - path: spec.fetchSpec, - stdio: 'inherit', - pkg: manifest, - banner: log.level !== 'silent', - }) - } + // only run scripts for directory type publishes + if (spec.type === 'directory') { + await runScript({ + event: 'prepublishOnly', + path: spec.fetchSpec, + stdio: 'inherit', + pkg: manifest, + banner: log.level !== 'silent', + }) + } - const tarballData = await pack(spec, opts) - const pkgContents = await getContents(manifest, tarballData) - - // The purpose of re-reading the manifest is in case it changed, - // so that we send the latest and greatest thing to the registry - // note that publishConfig might have changed as well! - manifest = await getManifest(spec, opts) - if (manifest.publishConfig) - Object.assign(opts, publishConfigToOpts(manifest.publishConfig)) - - // note that logTar calls npmlog.notice(), so if we ARE in silent mode, - // this will do nothing, but we still want it in the debuglog if it fails. - if (!json) - logTar(pkgContents, { log, unicode }) - - if (!dryRun) { - const resolved = npa.resolve(manifest.name, manifest.version) - const registry = npmFetch.pickRegistry(resolved, opts) - const creds = npm.config.getCredentialsByURI(registry) - if (!creds.token && !creds.username) { - throw Object.assign(new Error('This command requires you to be logged in.'), { - code: 'ENEEDAUTH', + const tarballData = await pack(spec, opts) + const pkgContents = await getContents(manifest, tarballData) + + // The purpose of re-reading the manifest is in case it changed, + // so that we send the latest and greatest thing to the registry + // note that publishConfig might have changed as well! + manifest = await this.getManifest(spec, opts) + if (manifest.publishConfig) + Object.assign(opts, this.publishConfigToOpts(manifest.publishConfig)) + + // note that logTar calls npmlog.notice(), so if we ARE in silent mode, + // this will do nothing, but we still want it in the debuglog if it fails. + if (!json) + logTar(pkgContents, { log, unicode }) + + if (!dryRun) { + const resolved = npa.resolve(manifest.name, manifest.version) + const registry = npmFetch.pickRegistry(resolved, opts) + const creds = this.npm.config.getCredentialsByURI(registry) + if (!creds.token && !creds.username) { + throw Object.assign(new Error('This command requires you to be logged in.'), { + code: 'ENEEDAUTH', + }) + } + await otplease(opts, opts => libpub(manifest, tarballData, opts)) + } + + if (spec.type === 'directory') { + await runScript({ + event: 'publish', + path: spec.fetchSpec, + stdio: 'inherit', + pkg: manifest, + banner: log.level !== 'silent', + }) + + await runScript({ + event: 'postpublish', + path: spec.fetchSpec, + stdio: 'inherit', + pkg: manifest, + banner: log.level !== 'silent', }) } - await otplease(opts, opts => libpub(manifest, tarballData, opts)) + + const silent = log.level === 'silent' + if (!silent && json) + this.npm.output(JSON.stringify(pkgContents, null, 2)) + else if (!silent) + this.npm.output(`+ ${pkgContents.id}`) + + return pkgContents } - if (spec.type === 'directory') { - await runScript({ - event: 'publish', - path: spec.fetchSpec, - stdio: 'inherit', - pkg: manifest, - banner: log.level !== 'silent', - }) - - await runScript({ - event: 'postpublish', - path: spec.fetchSpec, - stdio: 'inherit', - pkg: manifest, - banner: log.level !== 'silent', - }) + // if it's a directory, read it from the file system + // otherwise, get the full metadata from whatever it is + getManifest (spec, opts) { + if (spec.type === 'directory') + return readJson(`${spec.fetchSpec}/package.json`) + return pacote.manifest(spec, { ...opts, fullMetadata: true }) } - return pkgContents + // for historical reasons, publishConfig in package.json can contain + // ANY config keys that npm supports in .npmrc files and elsewhere. + // We *may* want to revisit this at some point, and have a minimal set + // that's a SemVer-major change that ought to get a RFC written on it. + publishConfigToOpts (publishConfig) { + // create a new object that inherits from the config stack + // then squash the css-case into camelCase opts, like we do + return flatten({...this.npm.config.list[0], ...publishConfig}) + } } - -module.exports = Object.assign(cmd, { usage }) +module.exports = Publish diff --git a/deps/npm/lib/rebuild.js b/deps/npm/lib/rebuild.js index ab34b7f3dfb518..74f5ae5f6eba59 100644 --- a/deps/npm/lib/rebuild.js +++ b/deps/npm/lib/rebuild.js @@ -2,64 +2,74 @@ const { resolve } = require('path') const Arborist = require('@npmcli/arborist') const npa = require('npm-package-arg') const semver = require('semver') +const completion = require('./utils/completion/installed-deep.js') -const npm = require('./npm.js') -const usageUtil = require('./utils/usage.js') -const output = require('./utils/output.js') - -const cmd = (args, cb) => rebuild(args).then(() => cb()).catch(cb) +const BaseCommand = require('./base-command.js') +class Rebuild extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'rebuild' + } -const usage = usageUtil('rebuild', 'npm rebuild [[<@scope>/][@] ...]') + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[[<@scope>/][@] ...]'] + } -const completion = require('./utils/completion/installed-deep.js') + /* istanbul ignore next - see test/lib/load-all-commands.js */ + async completion (opts) { + return completion(this.npm, opts) + } -const rebuild = async args => { - const globalTop = resolve(npm.globalDir, '..') - const where = npm.flatOptions.global ? globalTop : npm.prefix - const arb = new Arborist({ - ...npm.flatOptions, - path: where, - }) + exec (args, cb) { + this.rebuild(args).then(() => cb()).catch(cb) + } - if (args.length) { - // get the set of nodes matching the name that we want rebuilt - const tree = await arb.loadActual() - const filter = getFilterFn(args) - await arb.rebuild({ - nodes: tree.inventory.filter(filter), + async rebuild (args) { + const globalTop = resolve(this.npm.globalDir, '..') + const where = this.npm.flatOptions.global ? globalTop : this.npm.prefix + const arb = new Arborist({ + ...this.npm.flatOptions, + path: where, }) - } else - await arb.rebuild() - output('rebuilt dependencies successfully') -} + if (args.length) { + // get the set of nodes matching the name that we want rebuilt + const tree = await arb.loadActual() + const specs = args.map(arg => { + const spec = npa(arg) + if (spec.type === 'tag' && spec.rawSpec === '') + return spec -const getFilterFn = args => { - const specs = args.map(arg => { - const spec = npa(arg) - if (spec.type === 'tag' && spec.rawSpec === '') - return spec + if (spec.type !== 'range' && spec.type !== 'version' && spec.type !== 'directory') + throw new Error('`npm rebuild` only supports SemVer version/range specifiers') - if (spec.type !== 'range' && spec.type !== 'version' && spec.type !== 'directory') - throw new Error('`npm rebuild` only supports SemVer version/range specifiers') + return spec + }) + const nodes = tree.inventory.filter(node => this.isNode(specs, node)) - return spec - }) + await arb.rebuild({ nodes }) + } else + await arb.rebuild() - return node => specs.some(spec => { - if (spec.type === 'directory') - return node.path === spec.fetchSpec + this.npm.output('rebuilt dependencies successfully') + } - if (spec.name !== node.name) - return false + isNode (specs, node) { + return specs.some(spec => { + if (spec.type === 'directory') + return node.path === spec.fetchSpec - if (spec.rawSpec === '' || spec.rawSpec === '*') - return true + if (spec.name !== node.name) + return false - const { version } = node.package - // TODO: add tests for a package with missing version - return semver.satisfies(version, spec.fetchSpec) - }) -} + if (spec.rawSpec === '' || spec.rawSpec === '*') + return true -module.exports = Object.assign(cmd, { usage, completion }) + const { version } = node.package + // TODO: add tests for a package with missing version + return semver.satisfies(version, spec.fetchSpec) + }) + } +} +module.exports = Rebuild diff --git a/deps/npm/lib/repo.js b/deps/npm/lib/repo.js index e9074dca68d7ce..aa07e07a819f74 100644 --- a/deps/npm/lib/repo.js +++ b/deps/npm/lib/repo.js @@ -1,52 +1,64 @@ const log = require('npmlog') const pacote = require('pacote') -const { promisify } = require('util') -const openUrl = promisify(require('./utils/open-url.js')) -const usageUtil = require('./utils/usage.js') -const npm = require('./npm.js') -const hostedFromMani = require('./utils/hosted-git-info-from-manifest.js') const { URL } = require('url') -const usage = usageUtil('repo', 'npm repo [ [ ...]]') - -const cmd = (args, cb) => repo(args).then(() => cb()).catch(cb) +const hostedFromMani = require('./utils/hosted-git-info-from-manifest.js') +const openUrl = require('./utils/open-url.js') -const repo = async args => { - if (!args || !args.length) - args = ['.'] +const BaseCommand = require('./base-command.js') +class Repo extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'repo' + } - await Promise.all(args.map(pkg => getRepo(pkg))) -} + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[ [ ...]]'] + } -const getRepo = async pkg => { - const opts = { ...npm.flatOptions, fullMetadata: true } - const mani = await pacote.manifest(pkg, opts) + exec (args, cb) { + this.repo(args).then(() => cb()).catch(cb) + } - const r = mani.repository - const rurl = !r ? null - : typeof r === 'string' ? r - : typeof r === 'object' && typeof r.url === 'string' ? r.url - : null + async repo (args) { + if (!args || !args.length) + args = ['.'] - if (!rurl) { - throw Object.assign(new Error('no repository'), { - pkgid: pkg, - }) + await Promise.all(args.map(pkg => this.get(pkg))) } - const info = hostedFromMani(mani) - const url = info ? - info.browse(mani.repository.directory) : unknownHostedUrl(rurl) + async get (pkg) { + const opts = { ...this.npm.flatOptions, fullMetadata: true } + const mani = await pacote.manifest(pkg, opts) - if (!url) { - throw Object.assign(new Error('no repository: could not get url'), { - pkgid: pkg, - }) - } + const r = mani.repository + const rurl = !r ? null + : typeof r === 'string' ? r + : typeof r === 'object' && typeof r.url === 'string' ? r.url + : null + + if (!rurl) { + throw Object.assign(new Error('no repository'), { + pkgid: pkg, + }) + } + + const info = hostedFromMani(mani) + const url = info ? + info.browse(mani.repository.directory) : unknownHostedUrl(rurl) - log.silly('docs', 'url', url) - await openUrl(url, `${mani.name} repo available at the following URL`) + if (!url) { + throw Object.assign(new Error('no repository: could not get url'), { + pkgid: pkg, + }) + } + + log.silly('docs', 'url', url) + await openUrl(this.npm, url, `${mani.name} repo available at the following URL`) + } } +module.exports = Repo const unknownHostedUrl = url => { try { @@ -67,5 +79,3 @@ const unknownHostedUrl = url => { return null } } - -module.exports = Object.assign(cmd, { usage }) diff --git a/deps/npm/lib/restart.js b/deps/npm/lib/restart.js index 1462cf6051d0fb..1f3eb5af94f825 100644 --- a/deps/npm/lib/restart.js +++ b/deps/npm/lib/restart.js @@ -1,2 +1,10 @@ -const npm = require('./npm.js') -module.exports = require('./utils/lifecycle-cmd.js')(npm, 'restart') +const LifecycleCmd = require('./utils/lifecycle-cmd.js') + +// This ends up calling run-script(['restart', ...args]) +class Restart extends LifecycleCmd { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'restart' + } +} +module.exports = Restart diff --git a/deps/npm/lib/root.js b/deps/npm/lib/root.js index 631aef83867d1e..1fe82c6fad773a 100644 --- a/deps/npm/lib/root.js +++ b/deps/npm/lib/root.js @@ -1,7 +1,21 @@ -const npm = require('./npm.js') -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') -const cmd = (args, cb) => root(args).then(() => cb()).catch(cb) -const usage = usageUtil('root', 'npm root [-g]') -const root = async (args, cb) => output(npm.dir) -module.exports = Object.assign(cmd, { usage }) +const BaseCommand = require('./base-command.js') +class Root extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'root' + } + + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[-g]'] + } + + exec (args, cb) { + this.root(args).then(() => cb()).catch(cb) + } + + async root () { + this.npm.output(this.npm.dir) + } +} +module.exports = Root diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js index 4dfb854cad9fa1..3ea85b79ffd18f 100644 --- a/deps/npm/lib/run-script.js +++ b/deps/npm/lib/run-script.js @@ -1,144 +1,154 @@ const runScript = require('@npmcli/run-script') const { isServerPackage } = runScript -const npm = require('./npm.js') const readJson = require('read-package-json-fast') const { resolve } = require('path') -const output = require('./utils/output.js') const log = require('npmlog') -const usageUtil = require('./utils/usage') -const didYouMean = require('./utils/did-you-mean') +const didYouMean = require('./utils/did-you-mean.js') const isWindowsShell = require('./utils/is-windows-shell.js') -const usage = usageUtil( - 'run-script', - 'npm run-script [-- ]' -) - -const completion = async (opts) => { - const argv = opts.conf.argv.remain - if (argv.length === 2) { - // find the script name - const json = resolve(npm.localPrefix, 'package.json') - const { scripts = {} } = await readJson(json).catch(er => ({})) - return Object.keys(scripts) +const cmdList = [ + 'publish', + 'install', + 'uninstall', + 'test', + 'stop', + 'start', + 'restart', + 'version', +].reduce((l, p) => l.concat(['pre' + p, p, 'post' + p]), []) + +const BaseCommand = require('./base-command.js') +class RunScript extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'run-script' } -} -const cmd = (args, cb) => { - const fn = args.length ? doRun : list - return fn(args).then(() => cb()).catch(cb) -} + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return [' [-- ]'] + } -const doRun = async (args) => { - const path = npm.localPrefix - const event = args.shift() - const { scriptShell } = npm.flatOptions + async completion (opts) { + const argv = opts.conf.argv.remain + if (argv.length === 2) { + // find the script name + const json = resolve(this.npm.localPrefix, 'package.json') + const { scripts = {} } = await readJson(json).catch(er => ({})) + return Object.keys(scripts) + } + } - const pkg = await readJson(`${path}/package.json`) - const { scripts = {} } = pkg + exec (args, cb) { + if (args.length) + this.run(args).then(() => cb()).catch(cb) + else + this.list(args).then(() => cb()).catch(cb) + } - if (event === 'restart' && !scripts.restart) - scripts.restart = 'npm stop --if-present && npm start' - else if (event === 'env' && !scripts.env) - scripts.env = isWindowsShell ? 'SET' : 'env' + async run (args) { + const path = this.npm.localPrefix + const event = args.shift() + const { scriptShell } = this.npm.flatOptions - pkg.scripts = scripts + const pkg = await readJson(`${path}/package.json`) + const { scripts = {} } = pkg - if (!Object.prototype.hasOwnProperty.call(scripts, event) && !(event === 'start' && await isServerPackage(path))) { - if (npm.config.get('if-present')) - return + if (event === 'restart' && !scripts.restart) + scripts.restart = 'npm stop --if-present && npm start' + else if (event === 'env' && !scripts.env) + scripts.env = isWindowsShell ? 'SET' : 'env' - const suggestions = didYouMean(event, Object.keys(scripts)) - throw new Error(`missing script: ${event}${ - suggestions ? `\n${suggestions}` : ''}`) - } + pkg.scripts = scripts - // positional args only added to the main event, not pre/post - const events = [[event, args]] - if (!npm.flatOptions.ignoreScripts) { - if (scripts[`pre${event}`]) - events.unshift([`pre${event}`, []]) + if ( + !Object.prototype.hasOwnProperty.call(scripts, event) && + !(event === 'start' && await isServerPackage(path)) + ) { + if (this.npm.config.get('if-present')) + return - if (scripts[`post${event}`]) - events.push([`post${event}`, []]) - } + const suggestions = didYouMean(event, Object.keys(scripts)) + throw new Error(`missing script: ${event}${ + suggestions ? `\n${suggestions}` : ''}`) + } - const opts = { - path, - args, - scriptShell, - stdio: 'inherit', - stdioString: true, - pkg, - banner: log.level !== 'silent', - } + // positional args only added to the main event, not pre/post + const events = [[event, args]] + if (!this.npm.flatOptions.ignoreScripts) { + if (scripts[`pre${event}`]) + events.unshift([`pre${event}`, []]) + + if (scripts[`post${event}`]) + events.push([`post${event}`, []]) + } - for (const [event, args] of events) { - await runScript({ - ...opts, - event, + const opts = { + path, args, - }) + scriptShell, + stdio: 'inherit', + stdioString: true, + pkg, + banner: log.level !== 'silent', + } + + for (const [event, args] of events) { + await runScript({ + ...opts, + event, + args, + }) + } } -} -const list = async () => { - const path = npm.localPrefix - const { scripts, name } = await readJson(`${path}/package.json`) - const cmdList = [ - 'publish', - 'install', - 'uninstall', - 'test', - 'stop', - 'start', - 'restart', - 'version', - ].reduce((l, p) => l.concat(['pre' + p, p, 'post' + p]), []) - - if (!scripts) - return [] - - const allScripts = Object.keys(scripts) - if (log.level === 'silent') - return allScripts + async list () { + const path = this.npm.localPrefix + const { scripts, name } = await readJson(`${path}/package.json`) - if (npm.flatOptions.json) { - output(JSON.stringify(scripts, null, 2)) - return allScripts - } + if (!scripts) + return [] - if (npm.flatOptions.parseable) { - for (const [script, cmd] of Object.entries(scripts)) - output(`${script}:${cmd}`) + const allScripts = Object.keys(scripts) + if (log.level === 'silent') + return allScripts - return allScripts - } + if (this.npm.flatOptions.json) { + this.npm.output(JSON.stringify(scripts, null, 2)) + return allScripts + } - const indent = '\n ' - const prefix = ' ' - const cmds = [] - const runScripts = [] - for (const script of allScripts) { - const list = cmdList.includes(script) ? cmds : runScripts - list.push(script) - } + if (this.npm.flatOptions.parseable) { + for (const [script, cmd] of Object.entries(scripts)) + this.npm.output(`${script}:${cmd}`) - if (cmds.length) - output(`Lifecycle scripts included in ${name}:`) + return allScripts + } - for (const script of cmds) - output(prefix + script + indent + scripts[script]) + const indent = '\n ' + const prefix = ' ' + const cmds = [] + const runScripts = [] + for (const script of allScripts) { + const list = cmdList.includes(script) ? cmds : runScripts + list.push(script) + } - if (!cmds.length && runScripts.length) - output(`Scripts available in ${name} via \`npm run-script\`:`) - else if (runScripts.length) - output('\navailable via `npm run-script`:') + if (cmds.length) + this.npm.output(`Lifecycle scripts included in ${name}:`) - for (const script of runScripts) - output(prefix + script + indent + scripts[script]) + for (const script of cmds) + this.npm.output(prefix + script + indent + scripts[script]) - return allScripts -} + if (!cmds.length && runScripts.length) + this.npm.output(`Scripts available in ${name} via \`npm run-script\`:`) + else if (runScripts.length) + this.npm.output('\navailable via `npm run-script`:') + + for (const script of runScripts) + this.npm.output(prefix + script + indent + scripts[script]) -module.exports = Object.assign(cmd, { completion, usage }) + return allScripts + } +} +module.exports = RunScript diff --git a/deps/npm/lib/search.js b/deps/npm/lib/search.js index 3f8fd99fb8ad87..c24000156f67a7 100644 --- a/deps/npm/lib/search.js +++ b/deps/npm/lib/search.js @@ -5,69 +5,8 @@ const log = require('npmlog') const formatPackageStream = require('./search/format-package-stream.js') const packageFilter = require('./search/package-filter.js') -const npm = require('./npm.js') -const output = require('./utils/output.js') -const usageUtil = require('./utils/usage.js') - -const usage = usageUtil( - 'search', - 'npm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]' -) - -const cmd = (args, cb) => search(args).then(() => cb()).catch(cb) - -const search = async (args) => { - const opts = { - ...npm.flatOptions, - ...npm.flatOptions.search, - include: prepareIncludes(args, npm.flatOptions.search.opts), - exclude: prepareExcludes(npm.flatOptions.search.exclude), - } - - if (opts.include.length === 0) - throw new Error('search must be called with arguments') - - // Used later to figure out whether we had any packages go out - let anyOutput = false - - class FilterStream extends Minipass { - write (pkg) { - if (packageFilter(pkg, opts.include, opts.exclude)) - super.write(pkg) - } - } - const filterStream = new FilterStream() - - // Grab a configured output stream that will spit out packages in the - // desired format. - const outputStream = formatPackageStream({ - args, // --searchinclude options are not highlighted - ...opts, - }) - - log.silly('search', 'searching packages') - const p = new Pipeline( - libSearch.stream(opts.include, opts), - filterStream, - outputStream - ) - - p.on('data', chunk => { - if (!anyOutput) - anyOutput = true - output(chunk.toString('utf8')) - }) - - await p.promise() - if (!anyOutput && !opts.json && !opts.parseable) - output('No matches found for ' + (args.map(JSON.stringify).join(' '))) - - log.silly('search', 'search completed') - log.clearProgress() -} - -function prepareIncludes (args, searchopts) { +function prepareIncludes (args) { return args .map(s => s.toLowerCase()) .filter(s => s) @@ -85,4 +24,71 @@ function prepareExcludes (searchexclude) { .filter(s => s) } -module.exports = Object.assign(cmd, { usage }) +const BaseCommand = require('./base-command.js') +class Search extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get name () { + return 'search' + } + + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get usage () { + return ['[-l|--long] [--json] [--parseable] [--no-description] [search terms ...]'] + } + + exec (args, cb) { + this.search(args).then(() => cb()).catch(cb) + } + + async search (args) { + const opts = { + ...this.npm.flatOptions, + ...this.npm.flatOptions.search, + include: prepareIncludes(args), + exclude: prepareExcludes(this.npm.flatOptions.search.exclude), + } + + if (opts.include.length === 0) + throw new Error('search must be called with arguments') + + // Used later to figure out whether we had any packages go out + let anyOutput = false + + class FilterStream extends Minipass { + write (pkg) { + if (packageFilter(pkg, opts.include, opts.exclude)) + super.write(pkg) + } + } + + const filterStream = new FilterStream() + + // Grab a configured output stream that will spit out packages in the + // desired format. + const outputStream = formatPackageStream({ + args, // --searchinclude options are not highlighted + ...opts, + }) + + log.silly('search', 'searching packages') + const p = new Pipeline( + libSearch.stream(opts.include, opts), + filterStream, + outputStream + ) + + p.on('data', chunk => { + if (!anyOutput) + anyOutput = true + this.npm.output(chunk.toString('utf8')) + }) + + await p.promise() + if (!anyOutput && !opts.json && !opts.parseable) + this.npm.output('No matches found for ' + (args.map(JSON.stringify).join(' '))) + + log.silly('search', 'search completed') + log.clearProgress() + } +} +module.exports = Search diff --git a/deps/npm/lib/search/format-package-stream.js b/deps/npm/lib/search/format-package-stream.js index c908601144c235..c88df5eb4be04d 100644 --- a/deps/npm/lib/search/format-package-stream.js +++ b/deps/npm/lib/search/format-package-stream.js @@ -43,6 +43,7 @@ class JSONOutputStream extends Minipass { end () { super.write(this._didFirst ? ']\n' : '\n]\n') + super.end() } } diff --git a/deps/npm/lib/set-script.js b/deps/npm/lib/set-script.js index 7bac6eca50604e..6241981323c4af 100644 --- a/deps/npm/lib/set-script.js +++ b/deps/npm/lib/set-script.js @@ -1,52 +1,63 @@ const log = require('npmlog') -const usageUtil = require('./utils/usage.js') -const { localPrefix } = require('./npm.js') const fs = require('fs') -const usage = usageUtil('set-script', 'npm set-script [ - -``` - -To load the bundle that supports JSON Schema draft-2019-09: - -```html - - -``` - -To load the bundle that supports JSON Type Definition: - -```html - - -``` - -This bundle can be used with different module systems; it creates global `ajv` (or `ajv2019`) if no module system is found. - -The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv). - -**Please note**: some frameworks, e.g. Dojo, may redefine global require in a way that is not compatible with CommonJS module format. In this case Ajv bundle has to be loaded before the framework and then you can use global `ajv` (see issue [#234](https://github.com/ajv-validator/ajv/issues/234)). - -## Choosing schema language - -Both JSON Schema and JSON Type Definition are cross-platform specifications with implementations in multiple programming languages that help you define the shape and requirements to your JSON data. - -This section compares their pros/cons to help decide which specification fits your application better. - -### JSON Schema - -- Pros - - Wide specification adoption. - - Used as part of OpenAPI specification. - - Support of complex validation scenarios: - - untagged unions and boolean logic - - conditional schemas and dependencies - - restrictions on the number ranges and the size of strings, arrays and objects - - semantic validation with formats, patterns and content keywords - - distribute strict record definitions across multiple schemas (with unevaluatedProperties) - - Can be effectively used for validation of any JavaScript objects and configuration files. -- Cons - - Defines the collection of restrictions on the data, rather than the shape of the data. - - No standard support for tagged unions. - - Complex and error prone for the new users (Ajv has [strict mode](./docs/strict-mode) to compensate for it, but it is not cross-platform). - - Some parts of specification are difficult to implement, creating the risk of implementations divergence: - - reference resolution model - - unevaluatedProperties/unevaluatedItems - - dynamic recursive references - - Internet draft status (rather than RFC) - -See [JSON Schema](./docs/json-schema.md) for the list of defined keywords. - -### JSON Type Definition - -- Pros: - - Aligned with type systems of many languages - can be used to generate type definitions and efficient parsers and serializers to/from these types. - - Very simple, enforcing the best practices for cross-platform JSON API modelling. - - Simple to implement, ensuring consistency across implementations. - - Defines the shape of JSON data via strictly defined schema forms (rather than the collection of restrictions). - - Effective support for tagged unions. - - Designed to protect against user mistakes. - - Approved as [RFC8927](https://datatracker.ietf.org/doc/rfc8927/) -- Cons: - - Limited, compared with JSON Schema - no support for untagged unions\*, conditionals, references between different schema files\*\*, etc. - - No meta-schema in the specification\*. - - Brand new - limited industry adoption (as of January 2021). - -\* Ajv defines meta-schema for JTD schemas and non-standard keyword "union" that can be used inside "metadata" object. - -\*\* You can still combine schemas from multiple files in the application code. - -See [JSON Type Definition](./docs/json-type-definition.md) for the list of defined schema forms. - -## Using in ES5 environment - -You need to: - -- recompile Typescript to ES5 target - it is set to 2018 in the bundled compiled code. -- generate ES5 validation code: - -```javascript -const ajv = new Ajv({code: {es5: true}}) -``` - -See [Advanced options](https://github.com/ajv-validator/ajv/blob/master/docs/api.md#advanced-options). - -## Command line interface - -CLI is available as a separate npm package [ajv-cli](https://github.com/ajv-validator/ajv-cli). It supports: - -- compiling JSON Schemas to test their validity -- generating [standalone validation code](./docs/standalone.md) that exports validation function(s) to be used without Ajv -- migrating schemas to draft-07 and draft-2019-09 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) -- validating data file(s) against JSON Schema -- testing expected validity of data against JSON Schema -- referenced schemas -- user-defined meta-schemas, validation keywords and formats -- files in JSON, JSON5, YAML, and JavaScript format -- all Ajv options -- reporting changes in data after validation in [JSON-patch](https://datatracker.ietf.org/doc/rfc6902/) format +See more examples in [Guide: getting started](./docs/guide/getting-started) ## Extending Ajv ### User defined keywords -See section in [data validation](./docs/validation.md#user-defined-keywords) and the [detailed guide](./docs/keywords.md). +See section in [data validation](./docs/guide/user-keywords.md) and the [detailed guide](./docs/keywords.md). ### Plugins @@ -486,7 +301,7 @@ If you have published a useful plugin please submit a PR to add it to the next s ## Changes history -See https://github.com/ajv-validator/ajv/releases +See [https://github.com/ajv-validator/ajv/releases](https://github.com/ajv-validator/ajv/releases) **Please note**: [Changes in version 7.0.0](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0) diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/codegen/index.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/codegen/index.js index 6695ba041c45d6..d2ff4643de6330 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/codegen/index.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/codegen/index.js @@ -26,6 +26,7 @@ exports.operators = { NOT: new code_1._Code("!"), OR: new code_1._Code("||"), AND: new code_1._Code("&&"), + ADD: new code_1._Code("+"), }; class Node { optimizeNodes() { @@ -79,6 +80,15 @@ class Assign extends Node { return addExprNames(names, this.rhs); } } +class AssignOp extends Assign { + constructor(lhs, op, rhs, sideEffects) { + super(lhs, rhs, sideEffects); + this.op = op; + } + render({ _n }) { + return `${this.lhs} ${this.op}= ${this.rhs};` + _n; + } +} class Label extends Node { constructor(label) { super(); @@ -418,6 +428,10 @@ class CodeGen { assign(lhs, rhs, sideEffects) { return this._leafNode(new Assign(lhs, rhs, sideEffects)); } + // `+=` code + add(lhs, rhs) { + return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs)); + } // appends passed SafeExpr to code or executes Block code(c) { if (typeof c == "function") diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/index.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/index.js index 05a7a27df28242..1e3d4d967ebc43 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/index.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.resolveSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0; +exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0; const codegen_1 = require("./codegen"); const error_classes_1 = require("./error_classes"); const names_1 = require("./names"); @@ -57,6 +57,7 @@ function compileSchema(sch) { dataPathArr: [codegen_1.nil], dataLevel: 0, dataTypes: [], + definedProperties: new Set(), topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: codegen_1.stringify(sch.schema) } : { ref: sch.schema }), @@ -151,6 +152,7 @@ function getCompilingSchema(schEnv) { return sch; } } +exports.getCompilingSchema = getCompilingSchema; function sameSchemaEnv(s1, s2) { return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; } diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js new file mode 100644 index 00000000000000..f1427d66ddda12 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js @@ -0,0 +1,341 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const types_1 = require("./types"); +const __1 = require(".."); +const codegen_1 = require("../codegen"); +const error_classes_1 = require("../error_classes"); +const names_1 = require("../names"); +const code_1 = require("../../vocabularies/code"); +const ref_1 = require("../../vocabularies/jtd/ref"); +const type_1 = require("../../vocabularies/jtd/type"); +const parseJson_1 = require("../../runtime/parseJson"); +const util_1 = require("../util"); +const timestamp_1 = require("../timestamp"); +const genParse = { + elements: parseElements, + values: parseValues, + discriminator: parseDiscriminator, + properties: parseProperties, + optionalProperties: parseProperties, + enum: parseEnum, + type: parseType, + ref: parseRef, +}; +function compileParser(sch, definitions) { + const _sch = __1.getCompilingSchema.call(this, sch); + if (_sch) + return _sch; + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); + const parseName = gen.scopeName("parse"); + const cxt = { + self: this, + gen, + schema: sch.schema, + schemaEnv: sch, + definitions, + data: names_1.default.data, + parseName, + char: gen.name("c"), + }; + let sourceCode; + try { + this._compilations.add(sch); + sch.parseName = parseName; + parserFunction(cxt); + gen.optimize(this.opts.code.optimize); + const parseFuncCode = gen.toString(); + sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${parseFuncCode}`; + const makeParse = new Function(`${names_1.default.scope}`, sourceCode); + const parse = makeParse(this.scope.get()); + this.scope.value(parseName, { ref: parse }); + sch.parse = parse; + } + catch (e) { + if (sourceCode) + this.logger.error("Error compiling parser, function code:", sourceCode); + delete sch.parse; + delete sch.parseName; + throw e; + } + finally { + this._compilations.delete(sch); + } + return sch; +} +exports.default = compileParser; +const undef = codegen_1._ `undefined`; +function parserFunction(cxt) { + const { gen, parseName, char } = cxt; + gen.func(parseName, codegen_1._ `${names_1.default.json}, ${names_1.default.jsonPos}, ${names_1.default.jsonPart}`, false, () => { + gen.let(names_1.default.data); + gen.let(char); + gen.assign(codegen_1._ `${parseName}.message`, undef); + gen.assign(codegen_1._ `${parseName}.position`, undef); + gen.assign(names_1.default.jsonPos, codegen_1._ `${names_1.default.jsonPos} || 0`); + gen.const(names_1.default.jsonLen, codegen_1._ `${names_1.default.json}.length`); + parseCode(cxt); + skipWhitespace(cxt); + gen.if(names_1.default.jsonPart, () => { + gen.assign(codegen_1._ `${parseName}.position`, names_1.default.jsonPos); + gen.return(names_1.default.data); + }); + gen.if(codegen_1._ `${names_1.default.jsonPos} === ${names_1.default.jsonLen}`, () => gen.return(names_1.default.data)); + jsonSyntaxError(cxt); + }); +} +function parseCode(cxt) { + let form; + for (const key of types_1.jtdForms) { + if (key in cxt.schema) { + form = key; + break; + } + } + if (form) + parseNullable(cxt, genParse[form]); + else + parseEmpty(cxt); +} +const parseBoolean = parseBooleanToken(true, parseBooleanToken(false, jsonSyntaxError)); +function parseNullable(cxt, parseForm) { + const { gen, schema, data } = cxt; + if (!schema.nullable) + return parseForm(cxt); + tryParseToken(cxt, "null", parseForm, () => gen.assign(data, null)); +} +function parseElements(cxt) { + const { gen, schema, data } = cxt; + parseToken(cxt, "["); + const ix = gen.let("i", 0); + gen.assign(data, codegen_1._ `[]`); + parseItems(cxt, "]", () => { + const el = gen.let("el"); + parseCode({ ...cxt, schema: schema.elements, data: el }); + gen.assign(codegen_1._ `${data}[${ix}++]`, el); + }); +} +function parseValues(cxt) { + const { gen, schema, data } = cxt; + parseToken(cxt, "{"); + gen.assign(data, codegen_1._ `{}`); + parseItems(cxt, "}", () => parseKeyValue(cxt, schema.values)); +} +function parseItems(cxt, endToken, block) { + tryParseItems(cxt, endToken, block); + parseToken(cxt, endToken); +} +function tryParseItems(cxt, endToken, block) { + const { gen } = cxt; + gen.for(codegen_1._ `;${names_1.default.jsonPos}<${names_1.default.jsonLen} && ${jsonSlice(1)}!==${endToken};`, () => { + block(); + tryParseToken(cxt, ",", () => gen.break(), hasItem); + }); + function hasItem() { + tryParseToken(cxt, endToken, () => { }, jsonSyntaxError); + } +} +function parseKeyValue(cxt, schema) { + const { gen } = cxt; + const key = gen.let("key"); + parseString({ ...cxt, data: key }); + parseToken(cxt, ":"); + parsePropertyValue(cxt, key, schema); +} +function parseDiscriminator(cxt) { + const { gen, data, schema } = cxt; + const { discriminator, mapping } = schema; + parseToken(cxt, "{"); + gen.assign(data, codegen_1._ `{}`); + const startPos = gen.const("pos", names_1.default.jsonPos); + const value = gen.let("value"); + const tag = gen.let("tag"); + tryParseItems(cxt, "}", () => { + const key = gen.let("key"); + parseString({ ...cxt, data: key }); + parseToken(cxt, ":"); + gen.if(codegen_1._ `${key} === ${discriminator}`, () => { + parseString({ ...cxt, data: tag }); + gen.assign(codegen_1._ `${data}[${key}]`, tag); + gen.break(); + }, () => parseEmpty({ ...cxt, data: value }) // can be discarded/skipped + ); + }); + gen.assign(names_1.default.jsonPos, startPos); + gen.if(codegen_1._ `${tag} === undefined`); + parsingError(cxt, codegen_1.str `discriminator tag not found`); + for (const tagValue in mapping) { + gen.elseIf(codegen_1._ `${tag} === ${tagValue}`); + parseSchemaProperties({ ...cxt, schema: mapping[tagValue] }, discriminator); + } + gen.else(); + parsingError(cxt, codegen_1.str `discriminator value not in schema`); + gen.endIf(); +} +function parseProperties(cxt) { + const { gen, data } = cxt; + parseToken(cxt, "{"); + gen.assign(data, codegen_1._ `{}`); + parseSchemaProperties(cxt); +} +function parseSchemaProperties(cxt, discriminator) { + const { gen, schema, data } = cxt; + const { properties, optionalProperties, additionalProperties } = schema; + parseItems(cxt, "}", () => { + const key = gen.let("key"); + parseString({ ...cxt, data: key }); + parseToken(cxt, ":"); + gen.if(false); + parseDefinedProperty(cxt, key, properties); + parseDefinedProperty(cxt, key, optionalProperties); + if (discriminator) { + gen.elseIf(codegen_1._ `${key} === ${discriminator}`); + const tag = gen.let("tag"); + parseString({ ...cxt, data: tag }); // can be discarded, it is already assigned + } + gen.else(); + if (additionalProperties) { + parseEmpty({ ...cxt, data: codegen_1._ `${data}[${key}]` }); + } + else { + parsingError(cxt, codegen_1.str `property ${key} not allowed`); + } + gen.endIf(); + }); + if (properties) { + const hasProp = code_1.hasPropFunc(gen); + const allProps = codegen_1.and(...Object.keys(properties).map((p) => codegen_1._ `${hasProp}.call(${data}, ${p})`)); + gen.if(codegen_1.not(allProps), () => parsingError(cxt, codegen_1.str `missing required properties`)); + } +} +function parseDefinedProperty(cxt, key, schemas = {}) { + const { gen } = cxt; + for (const prop in schemas) { + gen.elseIf(codegen_1._ `${key} === ${prop}`); + parsePropertyValue(cxt, key, schemas[prop]); + } +} +function parsePropertyValue(cxt, key, schema) { + parseCode({ ...cxt, schema, data: codegen_1._ `${cxt.data}[${key}]` }); +} +function parseType(cxt) { + const { gen, schema, data } = cxt; + switch (schema.type) { + case "boolean": + parseBoolean(cxt); + break; + case "string": + parseString(cxt); + break; + case "timestamp": { + // TODO parse timestamp? + parseString(cxt); + const vts = util_1.func(gen, timestamp_1.default); + gen.if(codegen_1._ `!${vts}(${data})`, () => parsingError(cxt, codegen_1.str `invalid timestamp`)); + break; + } + case "float32": + case "float64": + parseNumber(cxt); + break; + default: { + const [min, max, maxDigits] = type_1.intRange[schema.type]; + parseNumber(cxt, maxDigits); + gen.if(codegen_1._ `${data} < ${min} || ${data} > ${max}`, () => parsingError(cxt, codegen_1.str `integer out of range`)); + } + } +} +function parseString(cxt) { + parseToken(cxt, '"'); + parseWith(cxt, parseJson_1.parseJsonString); +} +function parseEnum(cxt) { + const { gen, data, schema } = cxt; + const enumSch = schema.enum; + parseToken(cxt, '"'); + // TODO loopEnum + gen.if(false); + for (const value of enumSch) { + const valueStr = JSON.stringify(value).slice(1); // remove starting quote + gen.elseIf(codegen_1._ `${jsonSlice(valueStr.length)} === ${valueStr}`); + gen.assign(data, codegen_1.str `${value}`); + gen.add(names_1.default.jsonPos, valueStr.length); + } + gen.else(); + jsonSyntaxError(cxt); + gen.endIf(); +} +function parseNumber(cxt, maxDigits) { + const { gen } = cxt; + skipWhitespace(cxt); + gen.if(codegen_1._ `"-0123456789".indexOf(${jsonSlice(1)}) < 0`, () => jsonSyntaxError(cxt), () => parseWith(cxt, parseJson_1.parseJsonNumber, maxDigits)); +} +function parseBooleanToken(bool, fail) { + return (cxt) => { + const { gen, data } = cxt; + tryParseToken(cxt, `${bool}`, () => fail(cxt), () => gen.assign(data, bool)); + }; +} +function parseRef(cxt) { + const { gen, self, definitions, schema, schemaEnv } = cxt; + const { ref } = schema; + const refSchema = definitions[ref]; + if (!refSchema) + throw new error_classes_1.MissingRefError("", ref, `No definition ${ref}`); + if (!ref_1.hasRef(refSchema)) + return parseCode({ ...cxt, schema: refSchema }); + const { root } = schemaEnv; + const sch = compileParser.call(self, new __1.SchemaEnv({ schema: refSchema, root }), definitions); + partialParse(cxt, getParser(gen, sch), true); +} +function getParser(gen, sch) { + return sch.parse + ? gen.scopeValue("parse", { ref: sch.parse }) + : codegen_1._ `${gen.scopeValue("wrapper", { ref: sch })}.parse`; +} +function parseEmpty(cxt) { + parseWith(cxt, parseJson_1.parseJson); +} +function parseWith(cxt, parseFunc, args) { + const f = cxt.gen.scopeValue("func", { + ref: parseFunc, + code: parseFunc.code, + }); + partialParse(cxt, f, args); +} +function partialParse(cxt, parseFunc, args) { + const { gen, data } = cxt; + gen.assign(data, codegen_1._ `${parseFunc}(${names_1.default.json}, ${names_1.default.jsonPos}${args ? codegen_1._ `, ${args}` : codegen_1.nil})`); + gen.assign(names_1.default.jsonPos, codegen_1._ `${parseFunc}.position`); + gen.if(codegen_1._ `${data} === undefined`, () => parsingError(cxt, codegen_1._ `${parseFunc}.message`)); +} +function parseToken(cxt, tok) { + tryParseToken(cxt, tok, jsonSyntaxError); +} +function tryParseToken(cxt, tok, fail, success) { + const { gen } = cxt; + const n = tok.length; + skipWhitespace(cxt); + gen.if(codegen_1._ `${jsonSlice(n)} === ${tok}`, () => { + gen.add(names_1.default.jsonPos, n); + success === null || success === void 0 ? void 0 : success(cxt); + }, () => fail(cxt)); +} +function skipWhitespace({ gen, char: c }) { + gen.code(codegen_1._ `while((${c}=${names_1.default.json}[${names_1.default.jsonPos}],${c}===" "||${c}==="\\n"||${c}==="\\r"||${c}==="\\t"))${names_1.default.jsonPos}++;`); +} +function jsonSlice(len) { + return len === 1 + ? codegen_1._ `${names_1.default.json}[${names_1.default.jsonPos}]` + : codegen_1._ `${names_1.default.json}.slice(${names_1.default.jsonPos}, ${names_1.default.jsonPos}+${len})`; +} +function jsonSyntaxError(cxt) { + parsingError(cxt, codegen_1._ `"unexpected token " + ${names_1.default.json}[${names_1.default.jsonPos}]`); +} +function parsingError({ gen, parseName }, msg) { + gen.assign(codegen_1._ `${parseName}.message`, msg); + gen.assign(codegen_1._ `${parseName}.position`, names_1.default.jsonPos); + gen.return(undef); +} +//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js new file mode 100644 index 00000000000000..26148fef47c6f1 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js @@ -0,0 +1,223 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const types_1 = require("./types"); +const __1 = require(".."); +const codegen_1 = require("../codegen"); +const error_classes_1 = require("../error_classes"); +const names_1 = require("../names"); +const code_1 = require("../../vocabularies/code"); +const ref_1 = require("../../vocabularies/jtd/ref"); +const quote_1 = require("../../runtime/quote"); +const genSerialize = { + elements: serializeElements, + values: serializeValues, + discriminator: serializeDiscriminator, + properties: serializeProperties, + optionalProperties: serializeProperties, + enum: serializeString, + type: serializeType, + ref: serializeRef, +}; +function compileSerializer(sch, definitions) { + const _sch = __1.getCompilingSchema.call(this, sch); + if (_sch) + return _sch; + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); + const serializeName = gen.scopeName("serialize"); + const cxt = { + self: this, + gen, + schema: sch.schema, + schemaEnv: sch, + definitions, + data: names_1.default.data, + }; + let sourceCode; + try { + this._compilations.add(sch); + sch.serializeName = serializeName; + gen.func(serializeName, names_1.default.data, false, () => { + gen.let(names_1.default.json, codegen_1.str ``); + serializeCode(cxt); + gen.return(names_1.default.json); + }); + gen.optimize(this.opts.code.optimize); + const serializeFuncCode = gen.toString(); + sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${serializeFuncCode}`; + const makeSerialize = new Function(`${names_1.default.scope}`, sourceCode); + const serialize = makeSerialize(this.scope.get()); + this.scope.value(serializeName, { ref: serialize }); + sch.serialize = serialize; + } + catch (e) { + if (sourceCode) + this.logger.error("Error compiling serializer, function code:", sourceCode); + delete sch.serialize; + delete sch.serializeName; + throw e; + } + finally { + this._compilations.delete(sch); + } + return sch; +} +exports.default = compileSerializer; +function serializeCode(cxt) { + let form; + for (const key of types_1.jtdForms) { + if (key in cxt.schema) { + form = key; + break; + } + } + serializeNullable(cxt, form ? genSerialize[form] : serializeEmpty); +} +function serializeNullable(cxt, serializeForm) { + const { gen, schema, data } = cxt; + if (!schema.nullable) + return serializeForm(cxt); + gen.if(codegen_1._ `${data} === undefined || ${data} === null`, () => gen.add(names_1.default.json, codegen_1._ `"null"`), () => serializeForm(cxt)); +} +function serializeElements(cxt) { + const { gen, schema, data } = cxt; + gen.add(names_1.default.json, codegen_1.str `[`); + const first = gen.let("first", true); + gen.forOf("el", data, (el) => { + addComma(cxt, first); + serializeCode({ ...cxt, schema: schema.elements, data: el }); + }); + gen.add(names_1.default.json, codegen_1.str `]`); +} +function serializeValues(cxt) { + const { gen, schema, data } = cxt; + gen.add(names_1.default.json, codegen_1.str `{`); + const first = gen.let("first", true); + gen.forIn("key", data, (key) => serializeKeyValue(cxt, key, schema.values, first)); + gen.add(names_1.default.json, codegen_1.str `}`); +} +function serializeKeyValue(cxt, key, schema, first) { + const { gen, data } = cxt; + addComma(cxt, first); + serializeString({ ...cxt, data: key }); + gen.add(names_1.default.json, codegen_1.str `:`); + const value = gen.const("value", codegen_1._ `${data}${codegen_1.getProperty(key)}`); + serializeCode({ ...cxt, schema, data: value }); +} +function serializeDiscriminator(cxt) { + const { gen, schema, data } = cxt; + const { discriminator } = schema; + gen.add(names_1.default.json, codegen_1.str `{${JSON.stringify(discriminator)}:`); + const tag = gen.const("tag", codegen_1._ `${data}${codegen_1.getProperty(discriminator)}`); + serializeString({ ...cxt, data: tag }); + gen.if(false); + for (const tagValue in schema.mapping) { + gen.elseIf(codegen_1._ `${tag} === ${tagValue}`); + const sch = schema.mapping[tagValue]; + serializeSchemaProperties({ ...cxt, schema: sch }, discriminator); + } + gen.endIf(); + gen.add(names_1.default.json, codegen_1.str `}`); +} +function serializeProperties(cxt) { + const { gen } = cxt; + gen.add(names_1.default.json, codegen_1.str `{`); + serializeSchemaProperties(cxt); + gen.add(names_1.default.json, codegen_1.str `}`); +} +function serializeSchemaProperties(cxt, discriminator) { + const { gen, schema, data } = cxt; + const { properties, optionalProperties } = schema; + const props = keys(properties); + const optProps = keys(optionalProperties); + const allProps = allProperties(props.concat(optProps)); + let first = !discriminator; + for (const key of props) { + serializeProperty(key, properties[key], keyValue(key)); + } + for (const key of optProps) { + const value = keyValue(key); + gen.if(codegen_1.and(codegen_1._ `${value} !== undefined`, code_1.isOwnProperty(gen, data, key)), () => serializeProperty(key, optionalProperties[key], value)); + } + if (schema.additionalProperties) { + gen.forIn("key", data, (key) => gen.if(isAdditional(key, allProps), () => serializeKeyValue(cxt, key, {}, gen.let("first", first)))); + } + function keys(ps) { + return ps ? Object.keys(ps) : []; + } + function allProperties(ps) { + if (discriminator) + ps.push(discriminator); + if (new Set(ps).size !== ps.length) { + throw new Error("JTD: properties/optionalProperties/disciminator overlap"); + } + return ps; + } + function keyValue(key) { + return gen.const("value", codegen_1._ `${data}${codegen_1.getProperty(key)}`); + } + function serializeProperty(key, propSchema, value) { + if (first) + first = false; + else + gen.add(names_1.default.json, codegen_1.str `,`); + gen.add(names_1.default.json, codegen_1.str `${JSON.stringify(key)}:`); + serializeCode({ ...cxt, schema: propSchema, data: value }); + } + function isAdditional(key, ps) { + return ps.length ? codegen_1.and(...ps.map((p) => codegen_1._ `${key} !== ${p}`)) : true; + } +} +function serializeType(cxt) { + const { gen, schema, data } = cxt; + switch (schema.type) { + case "boolean": + gen.add(names_1.default.json, codegen_1._ `${data} ? "true" : "false"`); + break; + case "string": + serializeString(cxt); + break; + case "timestamp": + gen.if(codegen_1._ `${data} instanceof Date`, () => gen.add(names_1.default.json, codegen_1._ `${data}.toISOString()`), () => serializeString(cxt)); + break; + default: + serializeNumber(cxt); + } +} +function serializeString({ gen, data }) { + gen.add(names_1.default.json, codegen_1._ `${quoteFunc(gen)}(${data})`); +} +function serializeNumber({ gen, data }) { + gen.add(names_1.default.json, codegen_1._ `"" + ${data}`); +} +function serializeRef(cxt) { + const { gen, self, data, definitions, schema, schemaEnv } = cxt; + const { ref } = schema; + const refSchema = definitions[ref]; + if (!refSchema) + throw new error_classes_1.MissingRefError("", ref, `No definition ${ref}`); + if (!ref_1.hasRef(refSchema)) + return serializeCode({ ...cxt, schema: refSchema }); + const { root } = schemaEnv; + const sch = compileSerializer.call(self, new __1.SchemaEnv({ schema: refSchema, root }), definitions); + gen.add(names_1.default.json, codegen_1._ `${getSerialize(gen, sch)}(${data})`); +} +function getSerialize(gen, sch) { + return sch.serialize + ? gen.scopeValue("serialize", { ref: sch.serialize }) + : codegen_1._ `${gen.scopeValue("wrapper", { ref: sch })}.serialize`; +} +function serializeEmpty({ gen, data }) { + gen.add(names_1.default.json, codegen_1._ `JSON.stringify(${data})`); +} +function addComma({ gen }, first) { + gen.if(first, () => gen.assign(first, false), () => gen.add(names_1.default.json, codegen_1.str `,`)); +} +function quoteFunc(gen) { + return gen.scopeValue("func", { + ref: quote_1.default, + code: codegen_1._ `require("ajv/dist/runtime/quote").default`, + }); +} +//# sourceMappingURL=serialize.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/types.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/types.js new file mode 100644 index 00000000000000..b9c60a90fdd7ff --- /dev/null +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/types.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.jtdForms = void 0; +exports.jtdForms = [ + "elements", + "values", + "discriminator", + "properties", + "optionalProperties", + "enum", + "type", + "ref", +]; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/names.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/names.js index d40037194ae3d9..02e80b8e35d348 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/names.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/names.js @@ -18,6 +18,11 @@ const names = { // "globals" self: new codegen_1.Name("self"), scope: new codegen_1.Name("scope"), + // JTD serialize/parse name for JSON string and position + json: new codegen_1.Name("json"), + jsonPos: new codegen_1.Name("jsonPos"), + jsonLen: new codegen_1.Name("jsonLen"), + jsonPart: new codegen_1.Name("jsonPart"), }; exports.default = names; //# sourceMappingURL=names.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/subschema.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/subschema.js index 1d6de6358606b8..30044843893193 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/subschema.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/subschema.js @@ -75,6 +75,7 @@ function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, da subschema.data = _nextData; subschema.dataLevel = it.dataLevel + 1; subschema.dataTypes = []; + it.definedProperties = new Set(); subschema.parentData = it.data; subschema.dataNames = [...it.dataNames, _nextData]; } diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/timestamp.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/timestamp.js index fcb61fe51c793b..f280d4fdd5be86 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/timestamp.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/timestamp.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +const codegen_1 = require("./codegen"); const DATE_TIME = /^(\d\d\d\d)-(\d\d)-(\d\d)(?:t|\s)(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i; const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; function validTimestamp(str) { @@ -26,4 +27,5 @@ function validTimestamp(str) { (hr - tzH === 23 && min - tzM === 59 && sec === 60))); } exports.default = validTimestamp; +validTimestamp.code = codegen_1._ `require("ajv/dist/compile/timestamp").default`; //# sourceMappingURL=timestamp.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/util.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/util.js index e0c90c7e1475ab..40ac8fa2037890 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/util.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/util.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0; +exports.func = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0; const codegen_1 = require("./codegen"); const validate_1 = require("./validate"); // TODO refactor to use Set @@ -138,4 +138,11 @@ function setEvaluated(gen, props, ps) { Object.keys(ps).forEach((p) => gen.assign(codegen_1._ `${props}${codegen_1.getProperty(p)}`, true)); } exports.setEvaluated = setEvaluated; +function func(gen, f) { + return gen.scopeValue("func", { + ref: f, + code: f.code, + }); +} +exports.func = func; //# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js index 7a3ebde278aecc..6187dbbeeebb3f 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js @@ -12,7 +12,8 @@ function shouldUseGroup(schema, group) { exports.shouldUseGroup = shouldUseGroup; function shouldUseRule(schema, rule) { var _a; - return (schema[rule.keyword] !== undefined || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined))); + return (schema[rule.keyword] !== undefined || + ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined))); } exports.shouldUseRule = shouldUseRule; //# sourceMappingURL=applicability.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/core.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/core.js index 8f868c6771ddb0..d11577134fc51c 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/core.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/core.js @@ -21,6 +21,8 @@ const $dataRefSchema = require("./refs/data.json"); const META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"]; const EXT_SCOPE_NAMES = new Set([ "validate", + "serialize", + "parse", "wrapper", "root", "schema", diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/jtd.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/jtd.js index 6d7924b97ae931..32f2581b1f01e0 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/jtd.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/jtd.js @@ -14,6 +14,8 @@ Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { const core_1 = require("./core"); const jtd_1 = require("./vocabularies/jtd"); const jtd_schema_1 = require("./refs/jtd-schema"); +const serialize_1 = require("./compile/jtd/serialize"); +const parse_1 = require("./compile/jtd/parse"); // const META_SUPPORT_DATA = ["/properties"] const META_SCHEMA_ID = "JTD-meta-schema"; class Ajv extends core_1.default { @@ -39,6 +41,28 @@ class Ajv extends core_1.default { return (this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined)); } + compileSerializer(schema) { + const sch = this._addSchema(schema); + return sch.serialize || this._compileSerializer(sch); + } + compileParser(schema) { + const sch = this._addSchema(schema); + return (sch.parse || this._compileParser(sch)); + } + _compileSerializer(sch) { + serialize_1.default.call(this, sch, sch.schema.definitions || {}); + /* istanbul ignore if */ + if (!sch.serialize) + throw new Error("ajv implementation error"); + return sch.serialize; + } + _compileParser(sch) { + parse_1.default.call(this, sch, sch.schema.definitions || {}); + /* istanbul ignore if */ + if (!sch.parse) + throw new Error("ajv implementation error"); + return sch.parse; + } } exports.default = Ajv; //# sourceMappingURL=jtd.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/runtime/parseJson.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/runtime/parseJson.js new file mode 100644 index 00000000000000..cd4b8c1c9127ea --- /dev/null +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/runtime/parseJson.js @@ -0,0 +1,183 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseJsonString = exports.parseJsonNumber = exports.parseJson = void 0; +const codegen_1 = require("../compile/codegen"); +const rxParseJson = /position\s(\d+)$/; +function parseJson(s, pos) { + let endPos; + parseJson.message = undefined; + let matches; + if (pos) + s = s.slice(pos); + try { + parseJson.position = pos + s.length; + return JSON.parse(s); + } + catch (e) { + matches = rxParseJson.exec(e.message); + if (!matches) { + parseJson.message = "unexpected end"; + return undefined; + } + endPos = +matches[1]; + const c = s[endPos]; + s = s.slice(0, endPos); + parseJson.position = pos + endPos; + try { + return JSON.parse(s); + } + catch (e1) { + parseJson.message = `unexpected token ${c}`; + return undefined; + } + } +} +exports.parseJson = parseJson; +parseJson.message = undefined; +parseJson.position = 0; +parseJson.code = codegen_1._ `require("ajv/dist/runtime/parseJson").parseJson`; +function parseJsonNumber(s, pos, maxDigits) { + let numStr = ""; + let c; + parseJsonNumber.message = undefined; + if (s[pos] === "-") { + numStr += "-"; + pos++; + } + if (s[pos] === "0") { + numStr += "0"; + pos++; + } + else { + if (!parseDigits(maxDigits)) { + errorMessage(); + return undefined; + } + } + if (maxDigits) { + parseJsonNumber.position = pos; + return +numStr; + } + if (s[pos] === ".") { + numStr += "."; + pos++; + if (!parseDigits()) { + errorMessage(); + return undefined; + } + } + if (((c = s[pos]), c === "e" || c === "E")) { + numStr += "e"; + pos++; + if (((c = s[pos]), c === "+" || c === "-")) { + numStr += c; + pos++; + } + if (!parseDigits()) { + errorMessage(); + return undefined; + } + } + parseJsonNumber.position = pos; + return +numStr; + function parseDigits(maxLen) { + let digit = false; + while (((c = s[pos]), c >= "0" && c <= "9" && (maxLen === undefined || maxLen-- > 0))) { + digit = true; + numStr += c; + pos++; + } + return digit; + } + function errorMessage() { + parseJsonNumber.position = pos; + parseJsonNumber.message = pos < s.length ? `unexpected token ${s[pos]}` : "unexpected end"; + } +} +exports.parseJsonNumber = parseJsonNumber; +parseJsonNumber.message = undefined; +parseJsonNumber.position = 0; +parseJsonNumber.code = codegen_1._ `require("ajv/dist/runtime/parseJson").parseJsonNumber`; +const escapedChars = { + b: "\b", + f: "\f", + n: "\n", + r: "\r", + t: "\t", + '"': '"', + "/": "/", + "\\": "\\", +}; +const CODE_A = "a".charCodeAt(0); +const CODE_0 = "0".charCodeAt(0); +function parseJsonString(s, pos) { + let str = ""; + let c; + parseJsonString.message = undefined; + // eslint-disable-next-line no-constant-condition, @typescript-eslint/no-unnecessary-condition + while (true) { + c = s[pos++]; + if (c === '"') + break; + if (c === "\\") { + c = s[pos]; + if (c in escapedChars) { + str += escapedChars[c]; + pos++; + } + else if (c === "u") { + pos++; + let count = 4; + let code = 0; + while (count--) { + code <<= 4; + c = s[pos].toLowerCase(); + if (c >= "a" && c <= "f") { + code += c.charCodeAt(0) - CODE_A + 10; + } + else if (c >= "0" && c <= "9") { + code += c.charCodeAt(0) - CODE_0; + } + else if (c === undefined) { + errorMessage("unexpected end"); + return undefined; + } + else { + errorMessage(`unexpected token ${c}`); + return undefined; + } + pos++; + } + str += String.fromCharCode(code); + } + else { + errorMessage(`unexpected token ${c}`); + return undefined; + } + } + else if (c === undefined) { + errorMessage("unexpected end"); + return undefined; + } + else { + if (c.charCodeAt(0) >= 0x20) { + str += c; + } + else { + errorMessage(`unexpected token ${c}`); + return undefined; + } + } + } + parseJsonString.position = pos; + return str; + function errorMessage(msg) { + parseJsonString.position = pos; + parseJsonString.message = msg; + } +} +exports.parseJsonString = parseJsonString; +parseJsonString.message = undefined; +parseJsonString.position = 0; +parseJsonString.code = codegen_1._ `require("ajv/dist/runtime/parseJson").parseJsonString`; +//# sourceMappingURL=parseJson.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/runtime/quote.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/runtime/quote.js new file mode 100644 index 00000000000000..361280542bf95b --- /dev/null +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/runtime/quote.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +// eslint-disable-next-line no-control-regex, no-misleading-character-class +const rxEscapable = /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; +const escaped = { + "\b": "\\b", + "\t": "\\t", + "\n": "\\n", + "\f": "\\f", + "\r": "\\r", + '"': '\\"', + "\\": "\\\\", +}; +function quote(s) { + rxEscapable.lastIndex = 0; + return ('"' + + (rxEscapable.test(s) + ? s.replace(rxEscapable, (a) => { + const c = escaped[a]; + return typeof c === "string" + ? c + : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4); + }) + : s) + + '"'); +} +exports.default = quote; +//# sourceMappingURL=quote.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/types/jtd-schema.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/types/jtd-schema.js new file mode 100644 index 00000000000000..11338aa8a8f306 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/types/jtd-schema.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=jtd-schema.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js index 998b9666926b7b..bd8264b44d0bd4 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js @@ -41,13 +41,8 @@ const def = { let definedProp; if (props.length > 8) { // TODO maybe an option instead of hard-coded 8? - const hasProp = gen.scopeValue("func", { - // eslint-disable-next-line @typescript-eslint/unbound-method - ref: Object.prototype.hasOwnProperty, - code: codegen_1._ `Object.prototype.hasOwnProperty`, - }); const propsSchema = util_1.schemaRefOrVal(it, parentSchema.properties, "properties"); - definedProp = codegen_1._ `${hasProp}.call(${propsSchema}, ${key})`; + definedProp = code_1.isOwnProperty(gen, propsSchema, key); } else if (props.length) { definedProp = codegen_1.or(...props.map((p) => codegen_1._ `${key} === ${p}`)); diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js index 9ec12ab16cf4d9..af1479f1e1315e 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js @@ -12,7 +12,7 @@ exports.error = { params: ({ params: { property, depsCount, deps, missingProperty } }) => codegen_1._ `{property: ${property}, missingProperty: ${missingProperty}, depsCount: ${depsCount}, - deps: ${deps}}`, + deps: ${deps}}`, // TODO change to reference }; const def = { keyword: "dependencies", @@ -45,7 +45,7 @@ function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { const deps = propertyDeps[prop]; if (deps.length === 0) continue; - const hasProperty = code_1.propertyInData(data, prop, it.opts.ownProperties); + const hasProperty = code_1.propertyInData(gen, data, prop, it.opts.ownProperties); cxt.setParams({ property: prop, depsCount: deps.length, @@ -72,7 +72,7 @@ function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { for (const prop in schemaDeps) { if (util_1.alwaysValidSchema(it, schemaDeps[prop])) continue; - gen.if(code_1.propertyInData(data, prop, it.opts.ownProperties), () => { + gen.if(code_1.propertyInData(gen, data, prop, it.opts.ownProperties), () => { const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); cxt.mergeValidEvaluated(schCxt, valid); }, () => gen.var(valid, true) // TODO var diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js index 12fab3ce281970..7d127ae72ab762 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js @@ -14,6 +14,9 @@ const def = { additionalProperties_1.default.code(new context_1.default(it, additionalProperties_1.default, "additionalProperties")); } const allProps = code_1.allSchemaProperties(schema); + for (const prop of allProps) { + it.definedProperties.add(prop); + } if (it.opts.unevaluated && allProps.length && it.props !== true) { it.props = util_1.mergeEvaluated.props(gen, util_1.toHash(allProps), it.props); } @@ -26,12 +29,13 @@ const def = { applyPropertySchema(prop); } else { - gen.if(code_1.propertyInData(data, prop, it.opts.ownProperties)); + gen.if(code_1.propertyInData(gen, data, prop, it.opts.ownProperties)); applyPropertySchema(prop); if (!it.allErrors) gen.else().var(valid, true); gen.endIf(); } + cxt.it.definedProperties.add(prop); cxt.ok(valid); } function hasDefault(prop) { diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/code.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/code.js index a019e59b2115b7..9e8c5d92aab73b 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/code.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/code.js @@ -1,20 +1,20 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0; +exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0; const codegen_1 = require("../compile/codegen"); const util_1 = require("../compile/util"); const subschema_1 = require("../compile/subschema"); const names_1 = require("../compile/names"); function checkReportMissingProp(cxt, prop) { const { gen, data, it } = cxt; - gen.if(noPropertyInData(data, prop, it.opts.ownProperties), () => { + gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => { cxt.setParams({ missingProperty: codegen_1._ `${prop}` }, true); cxt.error(); }); } exports.checkReportMissingProp = checkReportMissingProp; -function checkMissingProp({ data, it: { opts } }, properties, missing) { - return codegen_1.or(...properties.map((prop) => codegen_1._ `${noPropertyInData(data, prop, opts.ownProperties)} && (${missing} = ${prop})`)); +function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { + return codegen_1.or(...properties.map((prop) => codegen_1._ `${noPropertyInData(gen, data, prop, opts.ownProperties)} && (${missing} = ${prop})`)); } exports.checkMissingProp = checkMissingProp; function reportMissingProp(cxt, missing) { @@ -22,17 +22,26 @@ function reportMissingProp(cxt, missing) { cxt.error(); } exports.reportMissingProp = reportMissingProp; -function isOwnProperty(data, property) { - return codegen_1._ `Object.prototype.hasOwnProperty.call(${data}, ${property})`; +function hasPropFunc(gen) { + return gen.scopeValue("func", { + // eslint-disable-next-line @typescript-eslint/unbound-method + ref: Object.prototype.hasOwnProperty, + code: codegen_1._ `Object.prototype.hasOwnProperty`, + }); +} +exports.hasPropFunc = hasPropFunc; +function isOwnProperty(gen, data, property) { + return codegen_1._ `${hasPropFunc(gen)}.call(${data}, ${property})`; } -function propertyInData(data, property, ownProperties) { +exports.isOwnProperty = isOwnProperty; +function propertyInData(gen, data, property, ownProperties) { const cond = codegen_1._ `${data}${codegen_1.getProperty(property)} !== undefined`; - return ownProperties ? codegen_1._ `${cond} && ${isOwnProperty(data, property)}` : cond; + return ownProperties ? codegen_1._ `${cond} && ${isOwnProperty(gen, data, property)}` : cond; } exports.propertyInData = propertyInData; -function noPropertyInData(data, property, ownProperties) { +function noPropertyInData(gen, data, property, ownProperties) { const cond = codegen_1._ `${data}${codegen_1.getProperty(property)} === undefined`; - return ownProperties ? codegen_1._ `${cond} || !${isOwnProperty(data, property)}` : cond; + return ownProperties ? codegen_1._ `${cond} || !${isOwnProperty(gen, data, property)}` : cond; } exports.noPropertyInData = noPropertyInData; function allSchemaProperties(schemaMap) { diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js index c9a29a01c5fec2..654a35b3caf591 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js @@ -58,7 +58,7 @@ function validateProperties(cxt) { function validateProps(props, keyword, required) { const _valid = gen.var("valid"); for (const prop of props) { - gen.if(code_1.propertyInData(data, prop, it.opts.ownProperties), () => applyPropertySchema(prop, keyword, _valid), missingProperty); + gen.if(code_1.propertyInData(gen, data, prop, it.opts.ownProperties), () => applyPropertySchema(prop, keyword, _valid), missingProperty); cxt.ok(_valid); } function missingProperty() { @@ -102,12 +102,7 @@ function validateProperties(cxt) { if (props.length > 8) { // TODO maybe an option instead of hard-coded 8? const propsSchema = util_1.schemaRefOrVal(it, parentSchema[keyword], keyword); - const hasProp = gen.scopeValue("func", { - // eslint-disable-next-line @typescript-eslint/unbound-method - ref: Object.prototype.hasOwnProperty, - code: codegen_1._ `Object.prototype.hasOwnProperty`, - }); - additional = codegen_1._ `!${hasProp}.call(${propsSchema}, ${key})`; + additional = code_1.isOwnProperty(gen, propsSchema, key); } else if (props.length) { additional = codegen_1.and(...props.map((p) => codegen_1._ `${key} !== ${p}`)); diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js index acfd31748dae6f..a3b341ab039044 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasRef = void 0; const compile_1 = require("../../compile"); const codegen_1 = require("../../compile/codegen"); const error_classes_1 = require("../../compile/error_classes"); @@ -50,15 +51,16 @@ const def = { errSchemaPath: `/definitions/${ref}`, }, valid); } - function hasRef(schema) { - for (const key in schema) { - let sch; - if (key === "ref" || (typeof (sch = schema[key]) == "object" && hasRef(sch))) - return true; - } - return false; - } }, }; +function hasRef(schema) { + for (const key in schema) { + let sch; + if (key === "ref" || (typeof (sch = schema[key]) == "object" && hasRef(sch))) + return true; + } + return false; +} +exports.hasRef = hasRef; exports.default = def; //# sourceMappingURL=ref.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js index 1eedbb86480e3c..96ff3a7e608069 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js @@ -1,15 +1,17 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.intRange = void 0; const codegen_1 = require("../../compile/codegen"); const timestamp_1 = require("../../compile/timestamp"); +const util_1 = require("../../compile/util"); const metadata_1 = require("./metadata"); -const intRange = { - int8: [-128, 127], - uint8: [0, 255], - int16: [-32768, 32767], - uint16: [0, 65535], - int32: [-2147483648, 2147483647], - uint32: [0, 4294967295], +exports.intRange = { + int8: [-128, 127, 3], + uint8: [0, 255, 3], + int16: [-32768, 32767, 5], + uint16: [0, 65535, 5], + int32: [-2147483648, 2147483647, 10], + uint32: [0, 4294967295, 10], }; const def = { keyword: "type", @@ -24,10 +26,7 @@ const def = { cond = codegen_1._ `typeof ${data} == ${schema}`; break; case "timestamp": { - const vts = gen.scopeValue("func", { - ref: timestamp_1.default, - code: codegen_1._ `require("ajv/dist/compile/timestamp").default`, - }); + const vts = util_1.func(gen, timestamp_1.default); cond = codegen_1._ `${data} instanceof Date || (typeof ${data} == "string" && ${vts}(${data}))`; break; } @@ -36,7 +35,7 @@ const def = { cond = codegen_1._ `typeof ${data} == "number"`; break; default: { - const [min, max] = intRange[schema]; + const [min, max] = exports.intRange[schema]; cond = codegen_1._ `typeof ${data} == "number" && isFinite(${data}) && ${data} >= ${min} && ${data} <= ${max} && !(${data} % 1)`; } } diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js index 2d385229fbcd17..687783fd8abba9 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js @@ -2,6 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const code_1 = require("../code"); const codegen_1 = require("../../compile/codegen"); +const validate_1 = require("../../compile/validate"); const error = { message: ({ params: { missingProperty } }) => codegen_1.str `should have required property '${missingProperty}'`, params: ({ params: { missingProperty } }) => codegen_1._ `{missingProperty: ${missingProperty}}`, @@ -22,6 +23,17 @@ const def = { allErrorsMode(); else exitOnErrorMode(); + if (opts.strictRequired) { + const props = cxt.parentSchema.properties; + const { definedProperties } = cxt.it; + for (const requiredKey of schema) { + if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) { + const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; + const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; + validate_1.checkStrictMode(it, msg, it.opts.strictRequired); + } + } + } function allErrorsMode() { if (useLoop || $data) { cxt.block$data(codegen_1.nil, loopAllRequired); @@ -48,13 +60,13 @@ const def = { function loopAllRequired() { gen.forOf("prop", schemaCode, (prop) => { cxt.setParams({ missingProperty: prop }); - gen.if(code_1.noPropertyInData(data, prop, opts.ownProperties), () => cxt.error()); + gen.if(code_1.noPropertyInData(gen, data, prop, opts.ownProperties), () => cxt.error()); }); } function loopUntilMissing(missing, valid) { cxt.setParams({ missingProperty: missing }); gen.forOf(missing, schemaCode, () => { - gen.assign(valid, code_1.propertyInData(data, missing, opts.ownProperties)); + gen.assign(valid, code_1.propertyInData(gen, data, missing, opts.ownProperties)); gen.if(codegen_1.not(valid), () => { cxt.error(); gen.break(); diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/package.json b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/package.json index 8ecc53dd8a97ec..2f1973e528c153 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/package.json +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/package.json @@ -1,71 +1,23 @@ { - "name": "ajv", - "version": "7.1.1", - "description": "Another JSON Schema Validator", - "main": "dist/ajv.js", - "types": "dist/ajv.d.ts", - "files": [ - "lib/", - "docs/", - "dist/", - "scripts/", - ".tonic_example.js" - ], - "scripts": { - "eslint": "eslint \"lib/**/*.ts\" \"spec/**/*.*s\" scripts --ignore-pattern spec/JSON-Schema-Test-Suite", - "prettier:write": "prettier --write \"./**/*.{md,json,yaml,js,ts}\"", - "prettier:check": "prettier --list-different \"./**/*.{md,json,yaml,js,ts}\"", - "test-spec": "cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register \"spec/**/*.spec.{ts,js}\" -R dot", - "test-codegen": "nyc cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register 'spec/codegen.spec.ts' -R spec", - "test-debug": "npm run test-spec -- --inspect-brk", - "test-cov": "nyc npm run test-spec", - "bundle": "rm -rf bundle && node ./scripts/bundle.js ajv ajv7 ajv7 && node ./scripts/bundle.js 2019 ajv2019 ajv2019 && node ./scripts/bundle.js jtd ajvJTD ajvJTD", - "build": "rm -rf dist && tsc && cp -r lib/refs dist && rm dist/refs/json-schema-2019-09/index.ts && rm dist/refs/jtd-schema.ts", - "json-tests": "rm -rf spec/_json/*.js && node scripts/jsontests", - "test-karma": "karma start", - "test-browser": "rm -rf .browser && npm run bundle && scripts/prepare-tests && karma start", - "test-all": "npm run test-cov && if-node-version 12 npm run test-browser", - "test": "npm link && npm link ajv && npm run json-tests && npm run eslint && npm run test-cov", - "test-ci": "AJV_FULL_TEST=true npm test", - "prepublish": "npm run build" - }, - "nyc": { - "exclude": [ - "**/spec/**", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/ajv-validator/ajv.git" + "author": { + "name": "Evgeny Poberezkin" }, - "keywords": [ - "JSON", - "schema", - "validator", - "validation", - "jsonschema", - "json-schema", - "json-schema-validator", - "json-schema-validation" - ], - "author": "Evgeny Poberezkin", - "license": "MIT", "bugs": { "url": "https://github.com/ajv-validator/ajv/issues" }, - "homepage": "https://github.com/ajv-validator/ajv", - "tonicExampleFilename": ".tonic_example.js", + "bundleDependencies": false, + "collective": { + "type": "opencollective", + "url": "https://opencollective.com/ajv" + }, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, + "deprecated": false, + "description": "Another JSON Schema Validator", "devDependencies": { "@ajv-validator/config": "^0.3.0", "@types/chai": "^4.2.12", @@ -74,6 +26,7 @@ "@types/require-from-string": "^1.2.0", "@typescript-eslint/eslint-plugin": "^3.8.0", "@typescript-eslint/parser": "^3.8.0", + "@vuepress/shared-utils": "^1.8.2", "ajv-formats": "^1.5.0", "browserify": "^17.0.0", "chai": "^4.0.1", @@ -95,23 +48,79 @@ "terser": "^5.2.1", "ts-node": "^9.0.0", "tsify": "^5.0.2", - "typescript": "^4.0.0" - }, - "collective": { - "type": "opencollective", - "url": "https://opencollective.com/ajv" + "typescript": "^4.2.0", + "vuepress": "^1.8.2" }, + "files": [ + "lib/", + "docs/", + "dist/", + "scripts/", + ".tonic_example.js" + ], "funding": { "type": "github", "url": "https://github.com/sponsors/epoberezkin" }, - "prettier": "@ajv-validator/config/prettierrc.json", + "homepage": "https://github.com/ajv-validator/ajv", "husky": { "hooks": { "pre-commit": "lint-staged && npm test" } }, + "keywords": [ + "JSON", + "schema", + "validator", + "validation", + "jsonschema", + "json-schema", + "json-schema-validator", + "json-schema-validation" + ], + "license": "MIT", "lint-staged": { - "*.{md,json,yaml,js,ts}": "prettier --write" - } -} + "*.{json,yaml,js,ts}": "prettier --write" + }, + "main": "dist/ajv.js", + "name": "ajv", + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "prettier": "@ajv-validator/config/prettierrc.json", + "repository": { + "type": "git", + "url": "git+https://github.com/ajv-validator/ajv.git" + }, + "scripts": { + "benchmark": "npm i && npm run build && npm link && cd ./benchmark && npm link ajv && npm i && node ./jtd", + "build": "rm -rf dist && tsc && cp -r lib/refs dist && rm dist/refs/json-schema-2019-09/index.ts && rm dist/refs/jtd-schema.ts", + "bundle": "rm -rf bundle && node ./scripts/bundle.js ajv ajv7 ajv7 && node ./scripts/bundle.js 2019 ajv2019 ajv2019 && node ./scripts/bundle.js jtd ajvJTD ajvJTD", + "docs:build": "vuepress build docs", + "docs:dev": "vuepress dev docs", + "eslint": "eslint \"lib/**/*.ts\" \"spec/**/*.*s\" scripts --ignore-pattern spec/JSON-Schema-Test-Suite", + "json-tests": "rm -rf spec/_json/*.js && node scripts/jsontests", + "prepublish": "npm run build", + "prettier:check": "prettier --list-different \"./**/*.{json,yaml,js,ts}\"", + "prettier:write": "prettier --write \"./**/*.{json,yaml,js,ts}\"", + "test": "npm link && npm link ajv && npm run json-tests && npm run eslint && npm run test-cov", + "test-all": "npm run test-cov && if-node-version 12 npm run test-browser", + "test-browser": "rm -rf .browser && npm run bundle && scripts/prepare-tests && karma start", + "test-ci": "AJV_FULL_TEST=true npm test", + "test-codegen": "nyc cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register 'spec/codegen.spec.ts' -R spec", + "test-cov": "nyc npm run test-spec", + "test-debug": "npm run test-spec -- --inspect-brk", + "test-karma": "karma start", + "test-spec": "cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register \"spec/**/*.spec.{ts,js}\" -R dot" + }, + "tonicExampleFilename": ".tonic_example.js", + "types": "dist/ajv.d.ts", + "version": "7.2.1" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/scripts/publish-bundles b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/scripts/publish-bundles index d91d01c034a813..311c21608d2bec 100755 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/scripts/publish-bundles +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/scripts/publish-bundles @@ -10,7 +10,7 @@ if [[ $GITHUB_REF == refs/tags/v* ]]; then git config --global user.name "$GIT_USER_NAME" git config --global user.email "$GIT_USER_EMAIL" - git clone https://${GH_TOKEN_PUBLIC}@github.com/ajv-validator/ajv-dist.git ../ajv-dist + git clone https://"${GH_TOKEN_PUBLIC}"@github.com/ajv-validator/ajv-dist.git ../ajv-dist rm -rf ../ajv-dist/dist mkdir ../ajv-dist/dist @@ -22,7 +22,7 @@ if [[ $GITHUB_REF == refs/tags/v* ]]; then sed -E "s/\"version\": \"([^\"]*)\"/\"version\": \"$VERSION\"/" package.json > new_package.json mv new_package.json package.json - if [[ `git status --porcelain` ]]; then + if [[ $(git status --porcelain) ]]; then echo "Changes detected. Updating master branch..." git add -A git commit -m "$VERSION: updated by ajv workflow https://github.com/ajv-validator/ajv/actions/runs/$GITHUB_RUN_ID" diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/scripts/publish-gh-pages b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/scripts/publish-gh-pages deleted file mode 100755 index 34e488a948aa94..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/scripts/publish-gh-pages +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -echo "About to publish $GITHUB_REF to gh-pages..." - -rm -rf ../gh-pages - -git config --global user.name "$GIT_USER_NAME" -git config --global user.email "$GIT_USER_EMAIL" -git clone -b gh-pages --single-branch https://${GH_TOKEN_PUBLIC}@github.com/ajv-validator/ajv.git ../gh-pages -SOURCE=../gh-pages/_source -mkdir -p $SOURCE -cp *.md $SOURCE -cp -R docs $SOURCE -cp LICENSE $SOURCE -cd ../gh-pages -node ./generate - -# remove logo from README -sed -E "s/]+ajv_logo[^>]+>//" index.md > new-index.md -mv new-index.md index.md - -if [[ `git status --porcelain` ]]; then - echo "Changes detected. Updating gh-pages branch..." - git add -A - git commit -m "updated by ajv workflow https://github.com/ajv-validator/ajv/actions/runs/$GITHUB_RUN_ID" - git push --quiet origin gh-pages > /dev/null 2>&1 -fi - -echo "Done" diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/scripts/publish-site b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/scripts/publish-site new file mode 100755 index 00000000000000..c09758432d5ba6 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/scripts/publish-site @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +set -ex + +echo "About to publish $GITHUB_REF to gh-pages..." +rm -rf ../gh-pages + +function copyReplace { + sed "s/](.\/docs\//](.\//g" $1 > $2 +} + +copyReplace README.md docs/README.md +copyReplace CODE_OF_CONDUCT.md docs/code_of_conduct.md +copyReplace CONTRIBUTING.md docs/contributing.md +copyReplace LICENSE docs/license.md + +npm run docs:build + +git config --global user.name "$GIT_USER_NAME" +git config --global user.email "$GIT_USER_EMAIL" +git clone -b gh-pages --single-branch https://"${GH_TOKEN_PUBLIC}"@github.com/ajv-validator/ajv.git ../gh-pages + +rsync -a ./docs/.vuepress/dist/ ../gh-pages/docs + +cd ../gh-pages + +if [[ $(git status --porcelain) ]]; then + echo "Changes detected. Updating gh-pages branch..." + git add -A + git commit -m "updated by ajv workflow https://github.com/ajv-validator/ajv/actions/runs/$GITHUB_RUN_ID" + git push --quiet origin gh-pages > /dev/null 2>&1 +fi + +echo "Done" diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/json-schema-traverse/package.json b/tools/node_modules/eslint/node_modules/table/node_modules/json-schema-traverse/package.json index e32dfbaeec58fb..98fee959b778b7 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/json-schema-traverse/package.json +++ b/tools/node_modules/eslint/node_modules/table/node_modules/json-schema-traverse/package.json @@ -1,35 +1,28 @@ { - "name": "json-schema-traverse", - "version": "1.0.0", - "description": "Traverse JSON Schema passing each schema object to callback", - "main": "index.js", - "types": "index.d.ts", - "scripts": { - "eslint": "eslint index.js spec", - "test-spec": "mocha spec -R spec", - "test": "npm run eslint && nyc npm run test-spec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/json-schema-traverse.git" + "author": { + "name": "Evgeny Poberezkin" }, - "keywords": [ - "JSON-Schema", - "traverse", - "iterate" - ], - "author": "Evgeny Poberezkin", - "license": "MIT", "bugs": { "url": "https://github.com/epoberezkin/json-schema-traverse/issues" }, - "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme", + "bundleDependencies": false, + "deprecated": false, + "description": "Traverse JSON Schema passing each schema object to callback", "devDependencies": { "eslint": "^7.3.1", "mocha": "^8.0.1", "nyc": "^15.0.0", "pre-commit": "^1.2.2" }, + "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme", + "keywords": [ + "JSON-Schema", + "traverse", + "iterate" + ], + "license": "MIT", + "main": "index.js", + "name": "json-schema-traverse", "nyc": { "exclude": [ "**/spec/**", @@ -39,5 +32,16 @@ "lcov", "text-summary" ] - } -} + }, + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/json-schema-traverse.git" + }, + "scripts": { + "eslint": "eslint index.js spec", + "test": "npm run eslint && nyc npm run test-spec", + "test-spec": "mocha spec -R spec" + }, + "types": "index.d.ts", + "version": "1.0.0" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/package.json b/tools/node_modules/eslint/node_modules/table/package.json index 85036e7f2e5bb9..892f772a2f312a 100644 --- a/tools/node_modules/eslint/node_modules/table/package.json +++ b/tools/node_modules/eslint/node_modules/table/package.json @@ -1,15 +1,20 @@ { "author": { - "email": "gajus@gajus.com", "name": "Gajus Kuizinas", + "email": "gajus@gajus.com", "url": "http://gajus.com" }, + "bugs": { + "url": "https://github.com/gajus/table/issues" + }, + "bundleDependencies": false, "dependencies": { "ajv": "^7.0.2", "lodash": "^4.17.20", "slice-ansi": "^4.0.0", "string-width": "^4.2.0" }, + "deprecated": false, "description": "Formats data into a string table.", "devDependencies": { "@babel/cli": "^7.12.10", @@ -41,6 +46,7 @@ "engines": { "node": ">=10.0.0" }, + "homepage": "https://github.com/gajus/table#readme", "husky": { "hooks": { "post-commit": "npm run create-readme && git add README.md && git commit -m 'docs: generate docs' --no-verify", @@ -72,7 +78,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/gajus/table" + "url": "git+https://github.com/gajus/table.git" }, "scripts": { "build": "rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps && npm run create-validators && flow-copy-source src dist", @@ -82,4 +88,4 @@ "test": "mocha --require @babel/register" }, "version": "6.0.7" -} +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/text-table/package.json b/tools/node_modules/eslint/node_modules/text-table/package.json index b4d17a4ff81316..f5c43b5d934ee1 100644 --- a/tools/node_modules/eslint/node_modules/text-table/package.json +++ b/tools/node_modules/eslint/node_modules/text-table/package.json @@ -1,44 +1,50 @@ { - "name": "text-table", - "version": "0.2.0", - "description": "borderless text tables with alignment", - "main": "index.js", - "devDependencies": { - "tap": "~0.4.0", - "tape": "~1.0.2", - "cli-color": "~0.2.3" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling" : { - "files" : "test/*.js", - "browsers" : [ - "ie/6..latest", - "chrome/20..latest", - "firefox/10..latest", - "safari/latest", - "opera/11.0..latest", - "iphone/6", "ipad/6" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/text-table.git" - }, - "homepage": "https://github.com/substack/text-table", - "keywords": [ - "text", - "table", - "align", - "ascii", - "rows", - "tabular" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT" -} + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/text-table/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "borderless text tables with alignment", + "devDependencies": { + "cli-color": "~0.2.3", + "tap": "~0.4.0", + "tape": "~1.0.2" + }, + "homepage": "https://github.com/substack/text-table", + "keywords": [ + "text", + "table", + "align", + "ascii", + "rows", + "tabular" + ], + "license": "MIT", + "main": "index.js", + "name": "text-table", + "repository": { + "type": "git", + "url": "git://github.com/substack/text-table.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "chrome/20..latest", + "firefox/10..latest", + "safari/latest", + "opera/11.0..latest", + "iphone/6", + "ipad/6" + ] + }, + "version": "0.2.0" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/type-check/package.json b/tools/node_modules/eslint/node_modules/type-check/package.json index 2a57ea0643dc58..a056438a760bad 100644 --- a/tools/node_modules/eslint/node_modules/type-check/package.json +++ b/tools/node_modules/eslint/node_modules/type-check/package.json @@ -1,8 +1,30 @@ { - "name": "type-check", - "version": "0.4.0", - "author": "George Zahariev ", + "author": { + "name": "George Zahariev", + "email": "z@georgezahariev.com" + }, + "bugs": { + "url": "https://github.com/gkz/type-check/issues" + }, + "bundleDependencies": false, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "deprecated": false, "description": "type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.", + "devDependencies": { + "browserify": "^16.5.1", + "livescript": "^1.6.0", + "mocha": "^7.1.1" + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "lib", + "README.md", + "LICENSE" + ], "homepage": "https://github.com/gkz/type-check", "keywords": [ "type", @@ -10,17 +32,9 @@ "checking", "library" ], - "files": [ - "lib", - "README.md", - "LICENSE" - ], - "main": "./lib/", - "bugs": "https://github.com/gkz/type-check/issues", "license": "MIT", - "engines": { - "node": ">= 0.8.0" - }, + "main": "./lib/", + "name": "type-check", "repository": { "type": "git", "url": "git://github.com/gkz/type-check.git" @@ -28,12 +42,5 @@ "scripts": { "test": "make test" }, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "devDependencies": { - "livescript": "^1.6.0", - "mocha": "^7.1.1", - "browserify": "^16.5.1" - } -} + "version": "0.4.0" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/type-fest/package.json b/tools/node_modules/eslint/node_modules/type-fest/package.json index ea6621129dc660..0164025631ef29 100644 --- a/tools/node_modules/eslint/node_modules/type-fest/package.json +++ b/tools/node_modules/eslint/node_modules/type-fest/package.json @@ -1,51 +1,60 @@ { - "name": "type-fest", - "version": "0.8.1", - "description": "A collection of essential TypeScript types", - "license": "(MIT OR CC0-1.0)", - "repository": "sindresorhus/type-fest", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && tsd" - }, - "files": [ - "index.d.ts", - "source" - ], - "keywords": [ - "typescript", - "ts", - "types", - "utility", - "util", - "utilities", - "omit", - "merge", - "json" - ], - "devDependencies": { - "@sindresorhus/tsconfig": "^0.4.0", - "@typescript-eslint/eslint-plugin": "^2.2.0", - "@typescript-eslint/parser": "^2.2.0", - "eslint-config-xo-typescript": "^0.18.0", - "tsd": "^0.7.3", - "xo": "^0.24.0" - }, - "xo": { - "extends": "xo-typescript", - "extensions": [ - "ts" - ], - "rules": { - "import/no-unresolved": "off", - "@typescript-eslint/indent": "off" - } - } -} + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/type-fest/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A collection of essential TypeScript types", + "devDependencies": { + "@sindresorhus/tsconfig": "^0.4.0", + "@typescript-eslint/eslint-plugin": "^2.2.0", + "@typescript-eslint/parser": "^2.2.0", + "eslint-config-xo-typescript": "^0.18.0", + "tsd": "^0.7.3", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=8" + }, + "files": [ + "index.d.ts", + "source" + ], + "homepage": "https://github.com/sindresorhus/type-fest#readme", + "keywords": [ + "typescript", + "ts", + "types", + "utility", + "util", + "utilities", + "omit", + "merge", + "json" + ], + "license": "(MIT OR CC0-1.0)", + "name": "type-fest", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/type-fest.git" + }, + "scripts": { + "test": "xo && tsd" + }, + "version": "0.8.1", + "xo": { + "extends": "xo-typescript", + "extensions": [ + "ts" + ], + "rules": { + "import/no-unresolved": "off", + "@typescript-eslint/indent": "off" + } + } +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/uri-js/package.json b/tools/node_modules/eslint/node_modules/uri-js/package.json index de95d91aa1a410..b97f667a234ea6 100755 --- a/tools/node_modules/eslint/node_modules/uri-js/package.json +++ b/tools/node_modules/eslint/node_modules/uri-js/package.json @@ -1,9 +1,30 @@ { - "name": "uri-js", - "version": "4.4.1", + "author": { + "name": "Gary Court", + "email": "gary.court@gmail.com" + }, + "bugs": { + "url": "https://github.com/garycourt/uri-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "punycode": "^2.1.0" + }, + "deprecated": false, "description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.", - "main": "dist/es5/uri.all.js", - "types": "dist/es5/uri.all.d.ts", + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-plugin-external-helpers": "^6.22.0", + "babel-preset-latest": "^6.24.1", + "mocha": "^8.2.1", + "mocha-qunit-ui": "^0.1.3", + "rollup": "^0.41.6", + "rollup-plugin-babel": "^2.7.1", + "rollup-plugin-node-resolve": "^2.0.0", + "sorcery": "^0.10.0", + "typescript": "^2.8.1", + "uglify-js": "^2.8.14" + }, "directories": { "test": "tests" }, @@ -15,19 +36,7 @@ "CHANGELOG", "LICENSE" ], - "scripts": { - "build:esnext": "tsc", - "build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap", - "build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js", - "build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts", - "build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min", - "clean": "rm -rf dist", - "test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/garycourt/uri-js" - }, + "homepage": "https://github.com/garycourt/uri-js", "keywords": [ "URI", "IRI", @@ -52,26 +61,22 @@ "RFC6455", "RFC6874" ], - "author": "Gary Court ", "license": "BSD-2-Clause", - "bugs": { - "url": "https://github.com/garycourt/uri-js/issues" + "main": "dist/es5/uri.all.js", + "name": "uri-js", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/garycourt/uri-js.git" }, - "homepage": "https://github.com/garycourt/uri-js", - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-plugin-external-helpers": "^6.22.0", - "babel-preset-latest": "^6.24.1", - "mocha": "^8.2.1", - "mocha-qunit-ui": "^0.1.3", - "rollup": "^0.41.6", - "rollup-plugin-babel": "^2.7.1", - "rollup-plugin-node-resolve": "^2.0.0", - "sorcery": "^0.10.0", - "typescript": "^2.8.1", - "uglify-js": "^2.8.14" + "scripts": { + "build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min", + "build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap", + "build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js", + "build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts", + "build:esnext": "tsc", + "clean": "rm -rf dist", + "test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js" }, - "dependencies": { - "punycode": "^2.1.0" - } -} + "types": "dist/es5/uri.all.d.ts", + "version": "4.4.1" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json b/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json index cfc665f109976b..13108425be015f 100644 --- a/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json @@ -1,25 +1,15 @@ { - "name": "v8-compile-cache", - "version": "2.2.0", - "description": "Require hook for automatic V8 compile cache persistence", - "main": "v8-compile-cache.js", - "scripts": { - "bench": "bench/run.sh", - "eslint": "eslint --max-warnings=0 .", - "tap": "tap test/*-test.js", - "test": "npm run tap", - "posttest": "npm run eslint" + "author": { + "name": "Andres Suarez", + "email": "zertosh@gmail.com" }, - "author": "Andres Suarez ", - "repository": { - "type": "git", - "url": "https://github.com/zertosh/v8-compile-cache.git" + "bugs": { + "url": "https://github.com/zertosh/v8-compile-cache/issues" }, - "files": [ - "v8-compile-cache.js" - ], - "license": "MIT", + "bundleDependencies": false, "dependencies": {}, + "deprecated": false, + "description": "Require hook for automatic V8 compile cache persistence", "devDependencies": { "babel-core": "6.26.3", "eslint": "^7.12.1", @@ -27,8 +17,27 @@ "rimraf": "^2.5.4", "rxjs": "6.6.3", "semver": "^5.3.0", - "tap": "^10.1.1", + "tap": "^9.0.0", "temp": "^0.8.3", "yarn": "1.22.10" - } -} + }, + "files": [ + "v8-compile-cache.js" + ], + "homepage": "https://github.com/zertosh/v8-compile-cache#readme", + "license": "MIT", + "main": "v8-compile-cache.js", + "name": "v8-compile-cache", + "repository": { + "type": "git", + "url": "git+https://github.com/zertosh/v8-compile-cache.git" + }, + "scripts": { + "bench": "bench/run.sh", + "eslint": "eslint --max-warnings=0 .", + "posttest": "npm run eslint", + "tap": "tap test/*-test.js", + "test": "npm run tap" + }, + "version": "2.3.0" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js b/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js index b9c09288cb310b..f094da40f8a1d7 100644 --- a/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js @@ -328,15 +328,15 @@ function getCacheDir() { return cacheDir; } -function getParentName() { - // `module.parent.filename` is undefined or null when: +function getMainName() { + // `require.main.filename` is undefined or null when: // * node -e 'require("v8-compile-cache")' // * node -r 'v8-compile-cache' // * Or, requiring from the REPL. - const parentName = module.parent && typeof module.parent.filename === 'string' - ? module.parent.filename + const mainName = require.main && typeof require.main.filename === 'string' + ? require.main.filename : process.cwd(); - return parentName; + return mainName; } //------------------------------------------------------------------------------ @@ -345,7 +345,7 @@ function getParentName() { if (!process.env.DISABLE_V8_COMPILE_CACHE && supportsCachedData()) { const cacheDir = getCacheDir(); - const prefix = getParentName(); + const prefix = getMainName(); const blobStore = new FileSystemBlobStore(cacheDir, prefix); const nativeCompileCache = new NativeCompileCache(); @@ -367,5 +367,5 @@ module.exports.__TEST__ = { slashEscape, supportsCachedData, getCacheDir, - getParentName, + getMainName, }; diff --git a/tools/node_modules/eslint/node_modules/which/package.json b/tools/node_modules/eslint/node_modules/which/package.json index 97ad7fbabc52b5..32eaa57575d680 100644 --- a/tools/node_modules/eslint/node_modules/which/package.json +++ b/tools/node_modules/eslint/node_modules/which/package.json @@ -1,43 +1,53 @@ { - "author": "Isaac Z. Schlueter (http://blog.izs.me)", - "name": "which", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "2.0.2", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" }, - "main": "which.js", "bin": { - "node-which": "./bin/node-which" + "node-which": "bin/node-which" }, - "license": "ISC", + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "bundleDependencies": false, "dependencies": { "isexe": "^2.0.0" }, + "deprecated": false, + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", "devDependencies": { "mkdirp": "^0.5.0", "rimraf": "^2.6.2", "tap": "^14.6.9" }, - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublish": "npm run changelog", - "prechangelog": "bash gen-changelog.sh", - "changelog": "git add CHANGELOG.md", - "postchangelog": "git commit -m 'update changelog - '${npm_package_version}", - "postpublish": "git push origin --follow-tags" + "engines": { + "node": ">= 8" }, "files": [ "which.js", "bin/node-which" ], + "homepage": "https://github.com/isaacs/node-which#readme", + "license": "ISC", + "main": "which.js", + "name": "which", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "scripts": { + "changelog": "git add CHANGELOG.md", + "postchangelog": "git commit -m 'update changelog - '${npm_package_version}", + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "prechangelog": "bash gen-changelog.sh", + "prepublish": "npm run changelog", + "preversion": "npm test", + "test": "tap" + }, "tap": { "check-coverage": true }, - "engines": { - "node": ">= 8" - } -} + "version": "2.0.2" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/word-wrap/package.json b/tools/node_modules/eslint/node_modules/word-wrap/package.json index 6f8f633c475f82..b53b03260e2797 100644 --- a/tools/node_modules/eslint/node_modules/word-wrap/package.json +++ b/tools/node_modules/eslint/node_modules/word-wrap/package.json @@ -1,39 +1,65 @@ { - "name": "word-wrap", - "description": "Wrap words to a specified length.", - "version": "1.2.3", - "homepage": "https://github.com/jonschlinkert/word-wrap", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Danilo Sampaio (localhost:8080)", - "Fede Ramirez (https://2fd.github.io)", - "Joe Hildebrand (https://twitter.com/hildjj)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Todd Kennedy (https://tck.io)", - "Waldemar Reusch (https://github.com/lordvlad)", - "Wolfgang Faust (http://www.linestarve.com)", - "Zach Hale (http://zachhale.com)" - ], - "repository": "jonschlinkert/word-wrap", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/jonschlinkert/word-wrap/issues" }, - "license": "MIT", - "files": [ - "index.js", - "index.d.ts" + "bundleDependencies": false, + "contributors": [ + { + "name": "Danilo Sampaio", + "email": "danilo.sampaio@gmail.com", + "url": "localhost:8080" + }, + { + "name": "Fede Ramirez", + "email": "i@2fd.me", + "url": "https://2fd.github.io" + }, + { + "name": "Joe Hildebrand", + "email": "joe-github@cursive.net", + "url": "https://twitter.com/hildjj" + }, + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Todd Kennedy", + "url": "https://tck.io" + }, + { + "name": "Waldemar Reusch", + "url": "https://github.com/lordvlad" + }, + { + "name": "Wolfgang Faust", + "url": "http://www.linestarve.com" + }, + { + "name": "Zach Hale", + "email": "zachhale@gmail.com", + "url": "http://zachhale.com" + } ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, + "deprecated": false, + "description": "Wrap words to a specified length.", "devDependencies": { "gulp-format-md": "^0.1.11", "mocha": "^3.2.0" }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/jonschlinkert/word-wrap", "keywords": [ "break", "carriage", @@ -48,6 +74,16 @@ "words", "wrap" ], + "license": "MIT", + "main": "index.js", + "name": "word-wrap", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/word-wrap.git" + }, + "scripts": { + "test": "mocha" + }, "typings": "index.d.ts", "verb": { "toc": false, @@ -73,5 +109,6 @@ "verb", "verb-generate-readme" ] - } -} + }, + "version": "1.2.3" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/wrappy/package.json b/tools/node_modules/eslint/node_modules/wrappy/package.json index 130752046714d6..e80b47520f24ec 100644 --- a/tools/node_modules/eslint/node_modules/wrappy/package.json +++ b/tools/node_modules/eslint/node_modules/wrappy/package.json @@ -1,29 +1,35 @@ { - "name": "wrappy", - "version": "1.0.2", - "description": "Callback wrapping utility", - "main": "wrappy.js", - "files": [ - "wrappy.js" - ], - "directories": { - "test": "test" + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/wrappy/issues" }, + "bundleDependencies": false, "dependencies": {}, + "deprecated": false, + "description": "Callback wrapping utility", "devDependencies": { "tap": "^2.3.1" }, - "scripts": { - "test": "tap --coverage test/*.js" + "directories": { + "test": "test" }, + "files": [ + "wrappy.js" + ], + "homepage": "https://github.com/npm/wrappy", + "license": "ISC", + "main": "wrappy.js", + "name": "wrappy", "repository": { "type": "git", - "url": "https://github.com/npm/wrappy" + "url": "git+https://github.com/npm/wrappy.git" }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/wrappy/issues" + "scripts": { + "test": "tap --coverage test/*.js" }, - "homepage": "https://github.com/npm/wrappy" -} + "version": "1.0.2" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/yallist/package.json b/tools/node_modules/eslint/node_modules/yallist/package.json index 8a083867d72e00..2d0ad3cb6e2f0c 100644 --- a/tools/node_modules/eslint/node_modules/yallist/package.json +++ b/tools/node_modules/eslint/node_modules/yallist/package.json @@ -1,8 +1,19 @@ { - "name": "yallist", - "version": "4.0.0", + "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", - "main": "yallist.js", + "devDependencies": { + "tap": "^12.1.0" + }, "directories": { "test": "test" }, @@ -10,20 +21,19 @@ "yallist.js", "iterator.js" ], - "dependencies": {}, - "devDependencies": { - "tap": "^12.1.0" - }, - "scripts": { - "test": "tap test/*.js --100", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, + "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" }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC" -} + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "4.0.0" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/package.json b/tools/node_modules/eslint/package.json index cdf5a4b180e1d7..e88d1b76c2f4fc 100644 --- a/tools/node_modules/eslint/package.json +++ b/tools/node_modules/eslint/package.json @@ -1,50 +1,15 @@ { - "name": "eslint", - "version": "7.21.0", - "author": "Nicholas C. Zakas ", - "description": "An AST-based pattern checker for JavaScript.", - "bin": { - "eslint": "./bin/eslint.js" - }, - "main": "./lib/api.js", - "scripts": { - "test": "node Makefile.js test", - "test:cli": "mocha", - "lint": "node Makefile.js lint", - "fix": "node Makefile.js lint -- fix", - "fuzz": "node Makefile.js fuzz", - "generate-release": "node Makefile.js generateRelease", - "generate-alpharelease": "node Makefile.js generatePrerelease -- alpha", - "generate-betarelease": "node Makefile.js generatePrerelease -- beta", - "generate-rcrelease": "node Makefile.js generatePrerelease -- rc", - "publish-release": "node Makefile.js publishRelease", - "docs": "node Makefile.js docs", - "gensite": "node Makefile.js gensite", - "webpack": "node Makefile.js webpack", - "perf": "node Makefile.js perf" + "author": { + "name": "Nicholas C. Zakas", + "email": "nicholas+npm@nczconsulting.com" }, - "gitHooks": { - "pre-commit": "lint-staged" + "bin": { + "eslint": "bin/eslint.js" }, - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ], - "*.md": "markdownlint" + "bugs": { + "url": "https://github.com/eslint/eslint/issues/" }, - "files": [ - "LICENSE", - "README.md", - "bin", - "conf", - "lib", - "messages" - ], - "repository": "eslint/eslint", - "funding": "https://opencollective.com/eslint", - "homepage": "https://eslint.org", - "bugs": "https://github.com/eslint/eslint/issues/", + "bundleDependencies": false, "dependencies": { "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.4.0", @@ -63,7 +28,7 @@ "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -71,7 +36,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.20", + "lodash": "^4.17.21", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -84,6 +49,8 @@ "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, + "deprecated": false, + "description": "An AST-based pattern checker for JavaScript.", "devDependencies": { "@babel/core": "^7.4.3", "@babel/preset-env": "^7.4.3", @@ -108,11 +75,11 @@ "fs-teardown": "^0.1.0", "glob": "^7.1.6", "jsdoc": "^3.5.5", - "karma": "^4.0.1", + "karma": "^6.1.1", "karma-chrome-launcher": "^3.1.0", - "karma-mocha": "^1.3.0", - "karma-mocha-reporter": "^2.2.3", - "karma-webpack": "^4.0.0-rc.6", + "karma-mocha": "^2.0.1", + "karma-mocha-reporter": "^2.2.5", + "karma-webpack": "^5.0.0", "lint-staged": "^10.1.2", "load-perf": "^0.2.0", "markdownlint": "^0.19.0", @@ -120,6 +87,7 @@ "memfs": "^3.0.1", "mocha": "^7.1.1", "mocha-junit-reporter": "^1.23.0", + "node-polyfill-webpack-plugin": "^1.0.3", "npm-license": "^0.3.3", "nyc": "^15.0.1", "proxyquire": "^2.0.1", @@ -129,10 +97,26 @@ "shelljs": "^0.8.2", "sinon": "^9.0.1", "temp": "^0.9.0", - "webpack": "^4.35.0", - "webpack-cli": "^3.3.5", + "webpack": "^5.23.0", + "webpack-cli": "^4.5.0", "yorkie": "^2.0.0" }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "files": [ + "LICENSE", + "README.md", + "bin", + "conf", + "lib", + "messages" + ], + "funding": "https://opencollective.com/eslint", + "gitHooks": { + "pre-commit": "lint-staged" + }, + "homepage": "https://eslint.org", "keywords": [ "ast", "lint", @@ -141,7 +125,34 @@ "espree" ], "license": "MIT", - "engines": { - "node": "^10.12.0 || >=12.0.0" - } -} + "lint-staged": { + "*.js": [ + "eslint --fix", + "git add" + ], + "*.md": "markdownlint" + }, + "main": "./lib/api.js", + "name": "eslint", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint.git" + }, + "scripts": { + "docs": "node Makefile.js docs", + "fix": "node Makefile.js lint -- fix", + "fuzz": "node Makefile.js fuzz", + "generate-alpharelease": "node Makefile.js generatePrerelease -- alpha", + "generate-betarelease": "node Makefile.js generatePrerelease -- beta", + "generate-rcrelease": "node Makefile.js generatePrerelease -- rc", + "generate-release": "node Makefile.js generateRelease", + "gensite": "node Makefile.js gensite", + "lint": "node Makefile.js lint", + "perf": "node Makefile.js perf", + "publish-release": "node Makefile.js publishRelease", + "test": "node Makefile.js test", + "test:cli": "mocha", + "webpack": "node Makefile.js webpack" + }, + "version": "7.22.0" +} \ No newline at end of file diff --git a/tools/update-babel-eslint.sh b/tools/update-babel-eslint.sh index b64b8f25d32f7c..36bfd918916ebd 100755 --- a/tools/update-babel-eslint.sh +++ b/tools/update-babel-eslint.sh @@ -2,8 +2,6 @@ # Shell script to update babel-eslint in the source tree to the latest release. -# Depends on npm, npx, and node being in $PATH. - # This script must be be in the tools directory when it runs because it uses # $0 to determine directories to work in. @@ -11,15 +9,20 @@ cd "$( dirname "${0}" )" || exit rm -rf node_modules/@babel mkdir babel-eslint-tmp cd babel-eslint-tmp || exit -npm init --yes -npm install --global-style --no-bin-links --production --no-package-lock @babel/core @babel/eslint-parser@latest @babel/plugin-syntax-class-properties@latest @babel/plugin-syntax-top-level-await@latest +ROOT="$PWD/../.." +[ -z "$NODE" ] && NODE="$ROOT/out/Release/node" +[ -x "$NODE" ] || NODE=`command -v node` +NPM="$ROOT/deps/npm" + +"$NODE" "$NPM" init --yes +"$NODE" "$NPM" install --global-style --no-bin-links --production --no-package-lock @babel/core @babel/eslint-parser@latest @babel/plugin-syntax-class-properties@latest @babel/plugin-syntax-top-level-await@latest # Use dmn to remove some unneeded files. -npx dmn@2.2.2 -f clean +"$NODE" "$NPM" exec -- dmn@2.2.2 -f clean # Use removeNPMAbsolutePaths to remove unused data in package.json. # This avoids churn as absolute paths can change from one dev to another. -npx removeNPMAbsolutePaths@1.0.4 . +"$NODE" "$NPM" exec -- removeNPMAbsolutePaths@1.0.4 . cd .. mv babel-eslint-tmp/node_modules/@babel node_modules/@babel diff --git a/tools/update-eslint.sh b/tools/update-eslint.sh index 109390d2b27baf..eb1045267f70fc 100755 --- a/tools/update-eslint.sh +++ b/tools/update-eslint.sh @@ -2,8 +2,6 @@ # Shell script to update ESLint in the source tree to the latest release. -# Depends on npm, npx, and node being in $PATH. - # This script must be in the tools directory when it runs because it uses the # script source file path to determine directories to work in. @@ -12,16 +10,22 @@ rm -rf node_modules/eslint node_modules/eslint-plugin-markdown ( mkdir eslint-tmp cd eslint-tmp || exit - npm init --yes - npm install --global-style --no-bin-links --production --no-package-lock eslint@latest - npm install --global-style --no-bin-links --production --no-package-lock eslint-plugin-markdown@latest + ROOT="$PWD/../.." + [ -z "$NODE" ] && NODE="$ROOT/out/Release/node" + [ -x "$NODE" ] || NODE=`command -v node` + NPM="$ROOT/deps/npm" + + "$NODE" "$NPM" init --yes + + "$NODE" "$NPM" install --global-style --no-bin-links --production --no-package-lock eslint@latest + "$NODE" "$NPM" install --global-style --no-bin-links --production --no-package-lock eslint-plugin-markdown@latest # Use dmn to remove some unneeded files. - npx dmn@2.2.2 -f clean + "$NODE" "$NPM" exec -- dmn@2.2.2 -f clean # Use removeNPMAbsolutePaths to remove unused data in package.json. # This avoids churn as absolute paths can change from one dev to another. - npx removeNPMAbsolutePaths@1.0.4 . + "$NODE" "$NPM" exec -- removeNPMAbsolutePaths@1.0.4 . ) mv eslint-tmp/node_modules/eslint node_modules/eslint diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi index b9b975ed3e7ec3..b21bf1d8ed7930 100644 --- a/tools/v8_gypfiles/features.gypi +++ b/tools/v8_gypfiles/features.gypi @@ -73,11 +73,6 @@ # Sets -DV8_ENABLE_FUTURE. 'v8_enable_future%': 0, - # Lite mode disables a number of performance optimizations to reduce memory - # at the cost of performance. - # Sets --DV8_LITE_MODE. - 'v8_enable_lite_mode%': 0, - # Sets -DVERIFY_HEAP. 'v8_enable_verify_heap%': 0, @@ -217,11 +212,27 @@ # Requires use_rtti = true 'v8_enable_precise_zone_stats%': 0, + # Experimental feature for tracking constness of properties in non-global + # dictionaries. Enabling this also always keeps prototypes in dict mode, + # meaning that they are not switched to fast mode. + # Sets -DV8_DICT_PROPERTY_CONST_TRACKING + 'v8_dict_property_const_tracking%': 0, + # Variables from v8.gni # Enable ECMAScript Internationalization API. Enabling this feature will # add a dependency on the ICU library. 'v8_enable_i18n_support%': 1, + + # Lite mode disables a number of performance optimizations to reduce memory + # at the cost of performance. + # Sets --DV8_LITE_MODE. + 'v8_enable_lite_mode%': 0, + + # Include support for WebAssembly. If disabled, the 'WebAssembly' global + # will not be available, and embedder APIs to generate WebAssembly modules + # will fail. + 'v8_enable_webassembly%': 1, }, 'target_defaults': { @@ -355,6 +366,12 @@ ['v8_enable_precise_zone_stats==1', { 'defines': ['V8_ENABLE_PRECISE_ZONE_STATS',], }], + ['v8_enable_webassembly==1', { + 'defines': ['V8_ENABLE_WEBASSEMBLY',], + }], + ['v8_dict_property_const_tracking==1', { + 'defines': ['V8_DICT_PROPERTY_CONST_TRACKING',], + }], ], # conditions 'defines': [ 'V8_GYP_BUILD', diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 9abbcc0289d9af..2b2d4234a665ea 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -66,22 +66,24 @@ 'outputs': [ "<(SHARED_INTERMEDIATE_DIR)/torque-generated/bit-fields.h", "<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtin-definitions.h", - "<(SHARED_INTERMEDIATE_DIR)/torque-generated/interface-descriptors.inc", - "<(SHARED_INTERMEDIATE_DIR)/torque-generated/factory.cc", - "<(SHARED_INTERMEDIATE_DIR)/torque-generated/factory.inc", - "<(SHARED_INTERMEDIATE_DIR)/torque-generated/field-offsets.h", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-debug-readers.cc", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-debug-readers.h", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-forward-declarations.h", "<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-verifiers.cc", "<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-verifiers.h", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/csa-types.h", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/debug-macros.cc", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/debug-macros.h", "<(SHARED_INTERMEDIATE_DIR)/torque-generated/enum-verifiers.cc", - "<(SHARED_INTERMEDIATE_DIR)/torque-generated/objects-printer.cc", - "<(SHARED_INTERMEDIATE_DIR)/torque-generated/objects-body-descriptors-inl.inc", - "<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-debug-readers.cc", - "<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-debug-readers.h", "<(SHARED_INTERMEDIATE_DIR)/torque-generated/exported-macros-assembler.cc", "<(SHARED_INTERMEDIATE_DIR)/torque-generated/exported-macros-assembler.h", - "<(SHARED_INTERMEDIATE_DIR)/torque-generated/csa-types.h", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/factory.cc", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/factory.inc", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/field-offsets.h", "<(SHARED_INTERMEDIATE_DIR)/torque-generated/instance-types.h", - "<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-forward-declarations.h", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/interface-descriptors.inc", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/objects-body-descriptors-inl.inc", + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/objects-printer.cc", '<@(torque_outputs_csa_cc)', '<@(torque_outputs_csa_h)', '<@(torque_outputs_inl_inc)', @@ -455,6 +457,8 @@ '<(V8_ROOT)/include/v8-cppgc.h', '<(V8_ROOT)/include/v8-fast-api-calls.h', '<(V8_ROOT)/include/v8-internal.h', + '<(V8_ROOT)/include/v8-profiler.h', + '<(V8_ROOT)/include/v8-util.h', '<(V8_ROOT)/include/v8.h', '<(V8_ROOT)/include/v8config.h', @@ -603,6 +607,19 @@ '<(V8_ROOT)/src/heap/third-party/heap-api-stub.cc', ], }], + ['v8_enable_webassembly==1', { + 'sources': [ + '<(V8_ROOT)/src/asmjs/asm-js.cc', + '<(V8_ROOT)/src/asmjs/asm-js.h', + '<(V8_ROOT)/src/asmjs/asm-names.h', + '<(V8_ROOT)/src/asmjs/asm-parser.cc', + '<(V8_ROOT)/src/asmjs/asm-parser.h', + '<(V8_ROOT)/src/asmjs/asm-scanner.cc', + '<(V8_ROOT)/src/asmjs/asm-scanner.h', + '<(V8_ROOT)/src/asmjs/asm-types.cc', + '<(V8_ROOT)/src/asmjs/asm-types.h', + ], + }], ['want_separate_host_toolset', { 'toolsets': ['host', 'target'], }], @@ -649,6 +666,13 @@ '