From 4027070b03be3bdae2515f2291de89b91f901df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Thu, 17 Jan 2019 16:10:47 -0800 Subject: [PATCH 01/15] org: fix usage error --- lib/org.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/org.js b/lib/org.js index ea013cc3d5e9a..9947bcb5663ae 100644 --- a/lib/org.js +++ b/lib/org.js @@ -60,7 +60,7 @@ function org ([cmd, orgname, username, role], cb) { }).then( x => cb(null, x), err => err.code === 'EUSAGE' ? err.message : err - ) + ).catch(cb) } function orgSet (org, user, role, opts) { From 8543fc3576f64e91f7946d4c56a5ffb045b55156 Mon Sep 17 00:00:00 2001 From: Audrey Eschright Date: Thu, 17 Jan 2019 16:18:39 -0800 Subject: [PATCH 02/15] pacote@9.4.0 --- node_modules/pacote/CHANGELOG.md | 10 ++++++++++ .../pacote/lib/fetchers/registry/manifest.js | 10 ++++++---- .../pacote/lib/fetchers/registry/packument.js | 10 +++++++++- node_modules/pacote/package.json | 20 +++++++++---------- package-lock.json | 6 +++--- package.json | 2 +- 6 files changed, 39 insertions(+), 19 deletions(-) diff --git a/node_modules/pacote/CHANGELOG.md b/node_modules/pacote/CHANGELOG.md index 520b51b7a509a..50a0dbde402cb 100644 --- a/node_modules/pacote/CHANGELOG.md +++ b/node_modules/pacote/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +# [9.4.0](https://github.com/zkat/pacote/compare/v9.3.0...v9.4.0) (2019-01-14) + + +### Features + +* **registry:** fall back to fullfat if something might be wrong with corgis ([0e71d6b](https://github.com/zkat/pacote/commit/0e71d6b)) + + + # [9.3.0](https://github.com/zkat/pacote/compare/v9.2.3...v9.3.0) (2018-12-21) diff --git a/node_modules/pacote/lib/fetchers/registry/manifest.js b/node_modules/pacote/lib/fetchers/registry/manifest.js index dc7bdc76b18e2..d29ec71c3375e 100644 --- a/node_modules/pacote/lib/fetchers/registry/manifest.js +++ b/node_modules/pacote/lib/fetchers/registry/manifest.js @@ -16,9 +16,10 @@ function manifest (spec, opts) { } function getManifest (spec, opts) { - return fetchPackument(spec, opts.concat({ + opts = opts.concat({ fullMetadata: opts.enjoyBy ? true : opts.fullMetadata - })).then(packument => { + }) + return fetchPackument(spec, opts).then(packument => { try { return pickManifest(packument, spec.fetchSpec, { defaultTag: opts.defaultTag, @@ -29,14 +30,15 @@ function getManifest (spec, opts) { if (err.code === 'ETARGET' && packument._cached && !opts.offline) { opts.log.silly( 'registry:manifest', - `no matching version for ${spec.name}@${spec.fetchSpec} in the cache. Forcing revalidation` + `no matching version for ${spec.name}@${spec.fetchSpec} in the cache. Forcing revalidation.` ) opts = opts.concat({ preferOffline: false, preferOnline: true }) return fetchPackument(spec, opts.concat({ - fullMetadata: opts.enjoyBy ? true : opts.fullMetadata + // Fetch full metadata in case ETARGET was due to corgi delay + fullMetadata: true })).then(packument => { return pickManifest(packument, spec.fetchSpec, { defaultTag: opts.defaultTag, diff --git a/node_modules/pacote/lib/fetchers/registry/packument.js b/node_modules/pacote/lib/fetchers/registry/packument.js index bd067732c4b52..f5286c80371c3 100644 --- a/node_modules/pacote/lib/fetchers/registry/packument.js +++ b/node_modules/pacote/lib/fetchers/registry/packument.js @@ -59,7 +59,15 @@ function fetchPackument (uri, registry, spec, opts) { mem.set(memoKey, packument) } return packument - })) + })).catch(err => { + if (err.code === 'E404' && !opts.fullMetadata) { + return fetchPackument(uri, registry, spec, opts.concat({ + fullMetadata: true + })) + } else { + throw err + } + }) } class ObjProxy { diff --git a/node_modules/pacote/package.json b/node_modules/pacote/package.json index 48504d8fdbb32..32e8a07b094e1 100644 --- a/node_modules/pacote/package.json +++ b/node_modules/pacote/package.json @@ -1,8 +1,8 @@ { - "_from": "pacote@9.3.0", - "_id": "pacote@9.3.0", + "_from": "pacote@9.4.0", + "_id": "pacote@9.4.0", "_inBundle": false, - "_integrity": "sha512-uy5xghB5wUtmFS+uNhQGhlsIF9rfsfxw6Zsu2VpmSz4/f+8D2+5V1HwjHdSn7W6aQTrxNNmmoUF5qNE10/EVdA==", + "_integrity": "sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==", "_location": "/pacote", "_phantomChildren": { "safe-buffer": "5.1.2" @@ -10,12 +10,12 @@ "_requested": { "type": "version", "registry": true, - "raw": "pacote@9.3.0", + "raw": "pacote@9.4.0", "name": "pacote", "escapedName": "pacote", - "rawSpec": "9.3.0", + "rawSpec": "9.4.0", "saveSpec": null, - "fetchSpec": "9.3.0" + "fetchSpec": "9.4.0" }, "_requiredBy": [ "#USER", @@ -23,9 +23,9 @@ "/libcipm", "/libnpm" ], - "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.3.0.tgz", - "_shasum": "ec0d21b739a625d81a19ae546386fedee3300bc1", - "_spec": "pacote@9.3.0", + "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.4.0.tgz", + "_shasum": "af979abdeb175cd347c3e33be3241af1ed254807", + "_spec": "pacote@9.4.0", "_where": "/Users/aeschright/code/cli", "author": { "name": "Kat Marchán", @@ -116,5 +116,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "9.3.0" + "version": "9.4.0" } diff --git a/package-lock.json b/package-lock.json index deee5e1ae4c31..06882c2440651 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6170,9 +6170,9 @@ } }, "pacote": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.3.0.tgz", - "integrity": "sha512-uy5xghB5wUtmFS+uNhQGhlsIF9rfsfxw6Zsu2VpmSz4/f+8D2+5V1HwjHdSn7W6aQTrxNNmmoUF5qNE10/EVdA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.4.0.tgz", + "integrity": "sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==", "requires": { "bluebird": "^3.5.3", "cacache": "^11.3.2", diff --git a/package.json b/package.json index f2c1fbb21d403..2c6d6b7066cf2 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "once": "~1.4.0", "opener": "^1.5.1", "osenv": "^0.1.5", - "pacote": "^9.3.0", + "pacote": "^9.4.0", "path-is-inside": "~1.0.2", "promise-inflight": "~1.0.1", "qrcode-terminal": "^0.12.0", From cfea6ea5b67ec5e4ec57e3a9cb8c82d018cb5476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 18 Jan 2019 08:43:39 -0800 Subject: [PATCH 03/15] hook: fix default usage message for npm hook --- lib/hook.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/hook.js b/lib/hook.js index 098d323fd2bf8..54aea9f1e9d20 100644 --- a/lib/hook.js +++ b/lib/hook.js @@ -9,15 +9,14 @@ const otplease = require('./utils/otplease.js') const pudding = require('figgy-pudding') const relativeDate = require('tiny-relative-date') const Table = require('cli-table3') -const usage = require('./utils/usage.js') const validate = require('aproba') -hook.usage = usage([ +hook.usage = [ 'npm hook add [--type=]', 'npm hook ls [pkg]', 'npm hook rm ', 'npm hook update ' -]) +].join('\n') hook.completion = (opts, cb) => { validate('OF', [opts, cb]) @@ -32,7 +31,14 @@ const HookConfig = pudding({ unicode: {} }) -module.exports = (args, cb) => BB.try(() => hook(args)).nodeify(cb) +function UsageError () { + throw Object.assign(new Error(hook.usage), {code: 'EUSAGE'}) +} + +module.exports = (args, cb) => BB.try(() => hook(args)).then( + val => cb(null, val), + err => err.code === 'EUSAGE' ? cb(err.message) : cb(err) +) function hook (args) { return otplease(npmConfig(), opts => { opts = HookConfig(opts) @@ -46,6 +52,8 @@ function hook (args) { case 'update': case 'up': return update(args[1], args[2], args[3], opts) + default: + UsageError() } }) } From 50463f58b4b70180a85d6d8c10fcf50d8970ef5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 18 Jan 2019 09:05:41 -0800 Subject: [PATCH 04/15] org: improve usage errors and add org ls filtering --- lib/org.js | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/lib/org.js b/lib/org.js index 9947bcb5663ae..38b7dbd27c798 100644 --- a/lib/org.js +++ b/lib/org.js @@ -14,7 +14,7 @@ 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' + 'npm org ls orgname []' const OrgConfig = figgyPudding({ json: {}, @@ -53,17 +53,27 @@ function org ([cmd, orgname, username, role], cb) { case 'rm': return orgRm(orgname, username, opts) case 'ls': - return orgList(orgname, opts) + return orgList(orgname, username, opts) default: UsageError() } }).then( x => cb(null, x), - err => err.code === 'EUSAGE' ? err.message : err - ).catch(cb) + 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(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)) @@ -83,6 +93,12 @@ function orgSet (org, user, role, opts) { } 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 => { @@ -105,8 +121,18 @@ function orgRm (org, user, opts) { }) } -function orgList (org, opts) { +function orgList (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) { output(JSON.stringify(roster, null, 2)) } else if (opts.parseable) { From e959e14217d751ddb295565fd75cc81de1ee0d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 18 Jan 2019 09:05:58 -0800 Subject: [PATCH 05/15] doc: add manpage for npm-org --- doc/cli/npm-org.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 doc/cli/npm-org.md diff --git a/doc/cli/npm-org.md b/doc/cli/npm-org.md new file mode 100644 index 0000000000000..802df4df57da7 --- /dev/null +++ b/doc/cli/npm-org.md @@ -0,0 +1,50 @@ +npm-org(1) -- Manage orgs +=================================== + +## SYNOPSIS + + npm org set [developer | admin | owner] + npm org rm + npm org ls [] + +## EXAMPLE + +Add a new developer to an org: +``` +$ npm org set my-org @mx-smith +``` + +Add a new admin to an org (or change a developer to an admin): +``` +$ npm org set my-org @mx-santos admin +``` + +Remove a user from an org: +``` +$ npm org rm my-org mx-santos +``` + +List all users in an org: +``` +$ npm org ls my-org +``` + +List all users in JSON format: +``` +$ npm org ls my-org --json +``` + +See what role a user has in an org: +``` +$ npm org ls my-org @mx-santos +``` + +## DESCRIPTION + +You can use the `npm org` commands to manage and view users of an organization. +It supports adding and removing users, changing their roles, listing them, and +finding specific ones and their roles. + +## SEE ALSO + +* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/) From 46cdebedb13c0342a61c6d7eb76ac807af770a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 18 Jan 2019 09:35:16 -0800 Subject: [PATCH 06/15] test: use fakeRegistry to fix failing tests --- test/tap/404-private-registry-scoped.js | 2 +- test/tap/404-private-registry.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tap/404-private-registry-scoped.js b/test/tap/404-private-registry-scoped.js index 48889376caa37..f8a8c5b05a572 100644 --- a/test/tap/404-private-registry-scoped.js +++ b/test/tap/404-private-registry-scoped.js @@ -3,7 +3,7 @@ var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var mr = require('npm-registry-mock') +var mr = common.fakeRegistry.compat var server var testdir = path.join(__dirname, path.basename(__filename, '.js')) diff --git a/test/tap/404-private-registry.js b/test/tap/404-private-registry.js index a38fa02c12536..da6e446918f92 100644 --- a/test/tap/404-private-registry.js +++ b/test/tap/404-private-registry.js @@ -3,7 +3,7 @@ var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var mr = require('npm-registry-mock') +var mr = common.fakeRegistry.compat var server var packageName = path.basename(__filename, '.js') From 5948a10c01952289ad06eec72510199e5354845f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 18 Jan 2019 10:52:24 -0800 Subject: [PATCH 07/15] org: fix org set validation --- lib/org.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/org.js b/lib/org.js index 38b7dbd27c798..d8f857e3dfdd9 100644 --- a/lib/org.js +++ b/lib/org.js @@ -71,7 +71,7 @@ function orgSet (org, user, role, opts) { if (!user) { throw new Error('Second argument `username` is required.') } - if (!['owner', 'admin', 'developer'].find(role)) { + 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 => { From b52259796a2e8520fffb668b1708711a2fc148db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 18 Jan 2019 11:17:38 -0800 Subject: [PATCH 08/15] test: use fakeRegistry for org test --- test/tap/org.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tap/org.js b/test/tap/org.js index 7dd538aec671f..7315cf0b6faf1 100644 --- a/test/tap/org.js +++ b/test/tap/org.js @@ -1,10 +1,10 @@ 'use strict' -var mr = require('npm-registry-mock') - var test = require('tap').test var common = require('../common-tap.js') +var mr = common.fakeRegistry.compat + var server test('setup', function (t) { From 75475043b03a254b2e7db2c04c3f0baea31d8dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Tue, 22 Jan 2019 13:07:50 -0800 Subject: [PATCH 09/15] deps: bump to libnpmpublish@1.1.1 Fixes: https://npm.community/t/npm-6-6-0-broke-authentication-with-npm-registry-couchapp/4752 --- .../libnpm/node_modules/aproba/CHANGELOG.md | 4 - .../libnpm/node_modules/aproba/LICENSE | 14 - .../libnpm/node_modules/aproba/README.md | 94 ------ .../libnpm/node_modules/aproba/index.js | 105 ------- .../libnpm/node_modules/aproba/package.json | 63 ----- .../node_modules/libnpmhook/CHANGELOG.md | 96 ------- .../libnpm/node_modules/libnpmhook/LICENSE.md | 16 -- .../libnpm/node_modules/libnpmhook/README.md | 267 ------------------ .../libnpm/node_modules/libnpmhook/index.js | 80 ------ .../node_modules/libnpmhook/package.json | 80 ------ node_modules/libnpm/package.json | 18 +- .../node_modules/p-limit/index.js | 12 +- .../node_modules/p-limit/package.json | 16 +- .../node_modules/p-limit/readme.md | 15 + node_modules/libnpmpublish/CHANGELOG.md | 10 + node_modules/libnpmpublish/README.md | 8 +- .../node_modules/aproba/CHANGELOG.md | 4 - .../libnpmpublish/node_modules/aproba/LICENSE | 14 - .../node_modules/aproba/README.md | 94 ------ .../node_modules/aproba/index.js | 105 ------- .../node_modules/aproba/package.json | 66 ----- node_modules/libnpmpublish/package.json | 31 +- node_modules/libnpmpublish/publish.js | 2 +- node_modules/libnpmpublish/test/publish.js | 6 +- package-lock.json | 37 +-- 25 files changed, 79 insertions(+), 1178 deletions(-) delete mode 100644 node_modules/libnpm/node_modules/aproba/CHANGELOG.md delete mode 100644 node_modules/libnpm/node_modules/aproba/LICENSE delete mode 100644 node_modules/libnpm/node_modules/aproba/README.md delete mode 100644 node_modules/libnpm/node_modules/aproba/index.js delete mode 100644 node_modules/libnpm/node_modules/aproba/package.json delete mode 100644 node_modules/libnpm/node_modules/libnpmhook/CHANGELOG.md delete mode 100644 node_modules/libnpm/node_modules/libnpmhook/LICENSE.md delete mode 100644 node_modules/libnpm/node_modules/libnpmhook/README.md delete mode 100644 node_modules/libnpm/node_modules/libnpmhook/index.js delete mode 100644 node_modules/libnpm/node_modules/libnpmhook/package.json delete mode 100644 node_modules/libnpmpublish/node_modules/aproba/CHANGELOG.md delete mode 100644 node_modules/libnpmpublish/node_modules/aproba/LICENSE delete mode 100644 node_modules/libnpmpublish/node_modules/aproba/README.md delete mode 100644 node_modules/libnpmpublish/node_modules/aproba/index.js delete mode 100644 node_modules/libnpmpublish/node_modules/aproba/package.json diff --git a/node_modules/libnpm/node_modules/aproba/CHANGELOG.md b/node_modules/libnpm/node_modules/aproba/CHANGELOG.md deleted file mode 100644 index bab30ecb7e625..0000000000000 --- a/node_modules/libnpm/node_modules/aproba/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -2.0.0 - * Drop support for 0.10 and 0.12. They haven't been in travis but still, - since we _know_ we'll break with them now it's only polite to do a - major bump. diff --git a/node_modules/libnpm/node_modules/aproba/LICENSE b/node_modules/libnpm/node_modules/aproba/LICENSE deleted file mode 100644 index f4be44d881b2d..0000000000000 --- a/node_modules/libnpm/node_modules/aproba/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/libnpm/node_modules/aproba/README.md b/node_modules/libnpm/node_modules/aproba/README.md deleted file mode 100644 index 0bfc594c56a37..0000000000000 --- a/node_modules/libnpm/node_modules/aproba/README.md +++ /dev/null @@ -1,94 +0,0 @@ -aproba -====== - -A ridiculously light-weight function argument validator - -``` -var validate = require("aproba") - -function myfunc(a, b, c) { - // `a` must be a string, `b` a number, `c` a function - validate('SNF', arguments) // [a,b,c] is also valid -} - -myfunc('test', 23, function () {}) // ok -myfunc(123, 23, function () {}) // type error -myfunc('test', 23) // missing arg error -myfunc('test', 23, function () {}, true) // too many args error - -``` - -Valid types are: - -| type | description -| :--: | :---------- -| * | matches any type -| A | `Array.isArray` OR an `arguments` object -| S | typeof == string -| N | typeof == number -| F | typeof == function -| O | typeof == object and not type A and not type E -| B | typeof == boolean -| E | `instanceof Error` OR `null` **(special: see below)** -| Z | == `null` - -Validation failures throw one of three exception types, distinguished by a -`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. - -If you pass in an invalid type then it will throw with a code of -`EUNKNOWNTYPE`. - -If an **error** argument is found and is not null then the remaining -arguments are optional. That is, if you say `ESO` then that's like using a -non-magical `E` in: `E|ESO|ZSO`. - -### But I have optional arguments?! - -You can provide more than one signature by separating them with pipes `|`. -If any signature matches the arguments then they'll be considered valid. - -So for example, say you wanted to write a signature for -`fs.createWriteStream`. The docs for it describe it thusly: - -``` -fs.createWriteStream(path[, options]) -``` - -This would be a signature of `SO|S`. That is, a string and and object, or -just a string. - -Now, if you read the full `fs` docs, you'll see that actually path can ALSO -be a buffer. And options can be a string, that is: -``` -path | -options | -``` - -To reproduce this you have to fully enumerate all of the possible -combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The -awkwardness is a feature: It reminds you of the complexity you're adding to -your API when you do this sort of thing. - - -### Browser support - -This has no dependencies and should work in browsers, though you'll have -noisier stack traces. - -### Why this exists - -I wanted a very simple argument validator. It needed to do two things: - -1. Be more concise and easier to use than assertions - -2. Not encourage an infinite bikeshed of DSLs - -This is why types are specified by a single character and there's no such -thing as an optional argument. - -This is not intended to validate user data. This is specifically about -asserting the interface of your functions. - -If you need greater validation, I encourage you to write them by hand or -look elsewhere. - diff --git a/node_modules/libnpm/node_modules/aproba/index.js b/node_modules/libnpm/node_modules/aproba/index.js deleted file mode 100644 index fd947481ba557..0000000000000 --- a/node_modules/libnpm/node_modules/aproba/index.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' -module.exports = validate - -function isArguments (thingy) { - return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') -} - -const types = { - '*': {label: 'any', check: () => true}, - A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)}, - S: {label: 'string', check: _ => typeof _ === 'string'}, - N: {label: 'number', check: _ => typeof _ === 'number'}, - F: {label: 'function', check: _ => typeof _ === 'function'}, - O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)}, - B: {label: 'boolean', check: _ => typeof _ === 'boolean'}, - E: {label: 'error', check: _ => _ instanceof Error}, - Z: {label: 'null', check: _ => _ == null} -} - -function addSchema (schema, arity) { - const group = arity[schema.length] = arity[schema.length] || [] - if (group.indexOf(schema) === -1) group.push(schema) -} - -function validate (rawSchemas, args) { - if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) - if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') - if (!args) throw missingRequiredArg(1, 'args') - if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) - if (!types.A.check(args)) throw invalidType(1, ['array'], args) - const schemas = rawSchemas.split('|') - const arity = {} - - schemas.forEach(schema => { - for (let ii = 0; ii < schema.length; ++ii) { - const type = schema[ii] - if (!types[type]) throw unknownType(ii, type) - } - if (/E.*E/.test(schema)) throw moreThanOneError(schema) - addSchema(schema, arity) - if (/E/.test(schema)) { - addSchema(schema.replace(/E.*$/, 'E'), arity) - addSchema(schema.replace(/E/, 'Z'), arity) - if (schema.length === 1) addSchema('', arity) - } - }) - let matching = arity[args.length] - if (!matching) { - throw wrongNumberOfArgs(Object.keys(arity), args.length) - } - for (let ii = 0; ii < args.length; ++ii) { - let newMatching = matching.filter(schema => { - const type = schema[ii] - const typeCheck = types[type].check - return typeCheck(args[ii]) - }) - if (!newMatching.length) { - const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null) - throw invalidType(ii, labels, args[ii]) - } - matching = newMatching - } -} - -function missingRequiredArg (num) { - return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) -} - -function unknownType (num, type) { - return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) -} - -function invalidType (num, expectedTypes, value) { - let valueType - Object.keys(types).forEach(typeCode => { - if (types[typeCode].check(value)) valueType = types[typeCode].label - }) - return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + - englishList(expectedTypes) + ' but got ' + valueType) -} - -function englishList (list) { - return list.join(', ').replace(/, ([^,]+)$/, ' or $1') -} - -function wrongNumberOfArgs (expected, got) { - const english = englishList(expected) - const args = expected.every(ex => ex.length === 1) - ? 'argument' - : 'arguments' - return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) -} - -function moreThanOneError (schema) { - return newException('ETOOMANYERRORTYPES', - 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') -} - -function newException (code, msg) { - const err = new Error(msg) - err.code = code - /* istanbul ignore else */ - if (Error.captureStackTrace) Error.captureStackTrace(err, validate) - return err -} diff --git a/node_modules/libnpm/node_modules/aproba/package.json b/node_modules/libnpm/node_modules/aproba/package.json deleted file mode 100644 index e95e5374f7e06..0000000000000 --- a/node_modules/libnpm/node_modules/aproba/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "aproba@^2.0.0", - "_id": "aproba@2.0.0", - "_inBundle": false, - "_integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "_location": "/libnpm/aproba", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "aproba@^2.0.0", - "name": "aproba", - "escapedName": "aproba", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/libnpm/libnpmaccess" - ], - "_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "_shasum": "52520b8ae5b569215b354efc0caa3fe1e45a8adc", - "_spec": "aproba@^2.0.0", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpm/node_modules/libnpmaccess", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org" - }, - "bugs": { - "url": "https://github.com/iarna/aproba/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "A ridiculously light-weight argument validator (now browser friendly)", - "devDependencies": { - "standard": "^11.0.1", - "tap": "^12.0.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/iarna/aproba", - "keywords": [ - "argument", - "validate" - ], - "license": "ISC", - "main": "index.js", - "name": "aproba", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/aproba.git" - }, - "scripts": { - "pretest": "standard", - "test": "tap --100 -J test/*.js" - }, - "version": "2.0.0" -} diff --git a/node_modules/libnpm/node_modules/libnpmhook/CHANGELOG.md b/node_modules/libnpm/node_modules/libnpmhook/CHANGELOG.md deleted file mode 100644 index 251d1f996dbba..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmhook/CHANGELOG.md +++ /dev/null @@ -1,96 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [5.0.2](https://github.com/npm/libnpmhook/compare/v5.0.1...v5.0.2) (2018-08-24) - - - - -## [5.0.1](https://github.com/npm/libnpmhook/compare/v5.0.0...v5.0.1) (2018-08-23) - - -### Bug Fixes - -* **deps:** move JSONStream to prod deps ([bb63594](https://github.com/npm/libnpmhook/commit/bb63594)) - - - - -# [5.0.0](https://github.com/npm/libnpmhook/compare/v4.0.1...v5.0.0) (2018-08-21) - - -### Features - -* **api:** overhauled API ([46b271b](https://github.com/npm/libnpmhook/commit/46b271b)) - - -### BREAKING CHANGES - -* **api:** the API for ls() has changed, and rm() no longer errors on 404 - - - - -## [4.0.1](https://github.com/npm/libnpmhook/compare/v4.0.0...v4.0.1) (2018-04-09) - - - - -# [4.0.0](https://github.com/npm/libnpmhook/compare/v3.0.1...v4.0.0) (2018-04-08) - - -### meta - -* drop support for node 4 and 7 ([f2a301e](https://github.com/npm/libnpmhook/commit/f2a301e)) - - -### BREAKING CHANGES - -* node@4 and node@7 are no longer supported - - - - -## [3.0.1](https://github.com/npm/libnpmhook/compare/v3.0.0...v3.0.1) (2018-04-08) - - - - -# [3.0.0](https://github.com/npm/libnpmhook/compare/v2.0.1...v3.0.0) (2018-04-04) - - -### add - -* guess type based on name ([9418224](https://github.com/npm/libnpmhook/commit/9418224)) - - -### BREAKING CHANGES - -* hook type is now based on name prefix - - - - -## [2.0.1](https://github.com/npm/libnpmhook/compare/v2.0.0...v2.0.1) (2018-03-16) - - -### Bug Fixes - -* **urls:** was hitting the wrong URL endpoints ([10171a9](https://github.com/npm/libnpmhook/commit/10171a9)) - - - - -# [2.0.0](https://github.com/npm/libnpmhook/compare/v1.0.0...v2.0.0) (2018-03-16) - - - - -# 1.0.0 (2018-03-16) - - -### Features - -* **api:** baseline working api ([122658e](https://github.com/npm/npm-hooks/commit/122658e)) diff --git a/node_modules/libnpm/node_modules/libnpmhook/LICENSE.md b/node_modules/libnpm/node_modules/libnpmhook/LICENSE.md deleted file mode 100644 index 8d28acf866d93..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmhook/LICENSE.md +++ /dev/null @@ -1,16 +0,0 @@ -ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted, provided that the -above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS -ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/libnpm/node_modules/libnpmhook/README.md b/node_modules/libnpm/node_modules/libnpmhook/README.md deleted file mode 100644 index 9a13d055317a5..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmhook/README.md +++ /dev/null @@ -1,267 +0,0 @@ -# libnpmhook [![npm version](https://img.shields.io/npm/v/libnpmhook.svg)](https://npm.im/libnpmhook) [![license](https://img.shields.io/npm/l/libnpmhook.svg)](https://npm.im/libnpmhook) [![Travis](https://img.shields.io/travis/npm/libnpmhook.svg)](https://travis-ci.org/npm/libnpmhook) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmhook?svg=true)](https://ci.appveyor.com/project/zkat/libnpmhook) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmhook/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmhook?branch=latest) - -[`libnpmhook`](https://github.com/npm/libnpmhook) is a Node.js library for -programmatically managing the npm registry's server-side hooks. - -For a more general introduction to managing hooks, see [the introductory blog -post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm). - -## Example - -```js -const hooks = require('libnpmhook') - -console.log(await hooks.ls('mypkg', {token: 'deadbeef'})) -// array of hook objects on `mypkg`. -``` - -## Install - -`$ npm install libnpmhook` - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [API](#api) - * [hook opts](#opts) - * [`add()`](#add) - * [`rm()`](#rm) - * [`ls()`](#ls) - * [`ls.stream()`](#ls-stream) - * [`update()`](#update) - -### API - -#### `opts` for `libnpmhook` commands - -`libnpmhook` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). -All options are passed through directly to that library, so please refer to [its -own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -A couple of options of note for those in a hurry: - -* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs. -* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmhook` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}` -* `opts.Promise` - If you pass this in, the Promises returned by `libnpmhook` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}` - -#### `> hooks.add(name, endpoint, secret, [opts]) -> Promise` - -`name` is the name of the package, org, or user/org scope to watch. The type is -determined by the name syntax: `'@foo/bar'` and `'foo'` are treated as packages, -`@foo` is treated as a scope, and `~user` is treated as an org name or scope. -Each type will attach to different events. - -The `endpoint` should be a fully-qualified http URL for the endpoint the hook -will send its payload to when it fires. `secret` is a shared secret that the -hook will send to that endpoint to verify that it's actually coming from the -registry hook. - -The returned Promise resolves to the full hook object that was created, -including its generated `id`. - -See also: [`POST -/v1/hooks/hook`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#post-v1hookshook) - -##### Example - -```javascript -await hooks.add('~zkat', 'https://zkat.tech/api/added', 'supersekrit', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://zkat.tech/api/added', - secret: 'supersekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:05:25.125Z', - deleted: false, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } -``` - -#### `> hooks.find(id, [opts]) -> Promise` - -Returns the hook identified by `id`. - -The returned Promise resolves to the full hook object that was found, or error -with `err.code` of `'E404'` if it didn't exist. - -See also: [`GET -/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hookshookid) - -##### Example - -```javascript -await hooks.find('16f7xoal', {token: 'myregistrytoken'}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://zkat.tech/api/added', - secret: 'supersekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:05:25.125Z', - deleted: false, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } -``` - -#### `> hooks.rm(id, [opts]) -> Promise` - -Removes the hook identified by `id`. - -The returned Promise resolves to the full hook object that was removed, if it -existed, or `null` if no such hook was there (instead of erroring). - -See also: [`DELETE -/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#delete-v1hookshookid) - -##### Example - -```javascript -await hooks.rm('16f7xoal', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://zkat.tech/api/added', - secret: 'supersekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:05:25.125Z', - deleted: true, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } - -// Repeat it... -await hooks.rm('16f7xoal', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> null -``` - -#### `> hooks.update(id, endpoint, secret, [opts]) -> Promise` - -The `id` should be a hook ID from a previously-created hook. - -The `endpoint` should be a fully-qualified http URL for the endpoint the hook -will send its payload to when it fires. `secret` is a shared secret that the -hook will send to that endpoint to verify that it's actually coming from the -registry hook. - -The returned Promise resolves to the full hook object that was updated, if it -existed. Otherwise, it will error with an `'E404'` error code. - -See also: [`PUT -/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#put-v1hookshookid) - -##### Example - -```javascript -await hooks.update('16fxoal', 'https://zkat.tech/api/other', 'newsekrit', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://zkat.tech/api/other', - secret: 'newsekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:14:41.964Z', - deleted: false, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } -``` - -#### `> hooks.ls([opts]) -> Promise` - -Resolves to an array of hook objects associated with the account you're -authenticated as. - -Results can be further filtered with three values that can be passed in through -`opts`: - -* `opts.package` - filter results by package name -* `opts.limit` - maximum number of hooks to return -* `opts.offset` - pagination offset for results (use with `opts.limit`) - -See also: - * [`hooks.ls.stream()`](#ls-stream) - * [`GET -/v1/hooks`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hooks) - -##### Example - -```javascript -await hooks.ls({token: 'myregistrytoken'}) - -=> -[ - { id: '16f7xoal', ... }, - { id: 'wnyf98a1', ... }, - ... -] -``` - -#### `> hooks.ls.stream([opts]) -> Stream` - -Returns a stream of hook objects associated with the account you're -authenticated as. The returned stream is a valid `Symbol.asyncIterator` on -`node@>=10`. - -Results can be further filtered with three values that can be passed in through -`opts`: - -* `opts.package` - filter results by package name -* `opts.limit` - maximum number of hooks to return -* `opts.offset` - pagination offset for results (use with `opts.limit`) - -See also: - * [`hooks.ls()`](#ls) - * [`GET -/v1/hooks`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hooks) - -##### Example - -```javascript -for await (let hook of hooks.ls.stream({token: 'myregistrytoken'})) { - console.log('found hook:', hook.id) -} - -=> -// outputs: -// found hook: 16f7xoal -// found hook: wnyf98a1 -``` diff --git a/node_modules/libnpm/node_modules/libnpmhook/index.js b/node_modules/libnpm/node_modules/libnpmhook/index.js deleted file mode 100644 index b489294951dd0..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmhook/index.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict' - -const fetch = require('npm-registry-fetch') -const figgyPudding = require('figgy-pudding') -const getStream = require('get-stream') -const validate = require('aproba') - -const HooksConfig = figgyPudding({ - package: {}, - limit: {}, - offset: {}, - Promise: {default: () => Promise} -}) - -const eu = encodeURIComponent -const cmd = module.exports = {} -cmd.add = (name, endpoint, secret, opts) => { - opts = HooksConfig(opts) - validate('SSSO', [name, endpoint, secret, opts]) - let type = 'package' - if (name.match(/^@[^/]+$/)) { - type = 'scope' - } - if (name[0] === '~') { - type = 'owner' - name = name.substr(1) - } - return fetch.json('/-/npm/v1/hooks/hook', opts.concat({ - method: 'POST', - body: { type, name, endpoint, secret } - })) -} - -cmd.rm = (id, opts) => { - opts = HooksConfig(opts) - validate('SO', [id, opts]) - return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, opts.concat({ - method: 'DELETE' - }, opts)).catch(err => { - if (err.code === 'E404') { - return null - } else { - throw err - } - }) -} - -cmd.update = (id, endpoint, secret, opts) => { - opts = HooksConfig(opts) - validate('SSSO', [id, endpoint, secret, opts]) - return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, opts.concat({ - method: 'PUT', - body: {endpoint, secret} - }, opts)) -} - -cmd.find = (id, opts) => { - opts = HooksConfig(opts) - validate('SO', [id, opts]) - return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, opts) -} - -cmd.ls = (opts) => { - return getStream.array(cmd.ls.stream(opts)) -} - -cmd.ls.stream = (opts) => { - opts = HooksConfig(opts) - const {package: pkg, limit, offset} = opts - validate('S|Z', [pkg]) - validate('N|Z', [limit]) - validate('N|Z', [offset]) - return fetch.json.stream('/-/npm/v1/hooks', 'objects.*', opts.concat({ - query: { - package: pkg, - limit, - offset - } - })) -} diff --git a/node_modules/libnpm/node_modules/libnpmhook/package.json b/node_modules/libnpm/node_modules/libnpmhook/package.json deleted file mode 100644 index 5dd638e56c571..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmhook/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_args": [ - [ - "libnpmhook@5.0.2", - "/Users/zkat/Documents/code/work/npm" - ] - ], - "_from": "libnpmhook@5.0.2", - "_id": "libnpmhook@5.0.2", - "_inBundle": false, - "_integrity": "sha512-vLenmdFWhRfnnZiNFPNMog6CK7Ujofy2TWiM2CrpZUjBRIhHkJeDaAbJdYCT6W4lcHtyrJR8yXW8KFyq6UAp1g==", - "_location": "/libnpm/libnpmhook", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "libnpmhook@5.0.2", - "name": "libnpmhook", - "escapedName": "libnpmhook", - "rawSpec": "5.0.2", - "saveSpec": null, - "fetchSpec": "5.0.2" - }, - "_requiredBy": [ - "/libnpm" - ], - "_resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-5.0.2.tgz", - "_spec": "5.0.2", - "_where": "/Users/zkat/Documents/code/work/npm", - "author": { - "name": "Kat Marchán", - "email": "kzm@sykosomatic.org" - }, - "bugs": { - "url": "https://github.com/npm/libnpmhook/issues" - }, - "dependencies": { - "aproba": "^2.0.0", - "figgy-pudding": "^3.4.1", - "get-stream": "^4.0.0", - "npm-registry-fetch": "^3.8.0" - }, - "description": "programmatic API for managing npm registry hooks", - "devDependencies": { - "nock": "^9.6.1", - "standard": "^11.0.1", - "standard-version": "^4.4.0", - "tap": "^12.0.1", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" - }, - "files": [ - "*.js", - "lib" - ], - "homepage": "https://github.com/npm/libnpmhook#readme", - "keywords": [ - "npm", - "hooks", - "registry", - "npm api" - ], - "license": "ISC", - "main": "index.js", - "name": "libnpmhook", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/libnpmhook.git" - }, - "scripts": { - "postrelease": "npm publish && git push --follow-tags", - "prerelease": "npm t", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap -J --100 --coverage test/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" - }, - "version": "5.0.2" -} diff --git a/node_modules/libnpm/package.json b/node_modules/libnpm/package.json index 98968d38cf9d0..4c77e68097f38 100644 --- a/node_modules/libnpm/package.json +++ b/node_modules/libnpm/package.json @@ -1,23 +1,19 @@ { - "_from": "libnpm@latest", + "_from": "libnpm@^2.0.1", "_id": "libnpm@2.0.1", "_inBundle": false, "_integrity": "sha512-qTKoxyJvpBxHZQB6k0AhSLajyXq9ZE/lUsZzuHAplr2Bpv9G+k4YuYlExYdUCeVRRGqcJt8hvkPh4tBwKoV98w==", "_location": "/libnpm", - "_phantomChildren": { - "figgy-pudding": "3.5.1", - "get-stream": "4.1.0", - "npm-registry-fetch": "3.8.0" - }, + "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "range", "registry": true, - "raw": "libnpm@latest", + "raw": "libnpm@^2.0.1", "name": "libnpm", "escapedName": "libnpm", - "rawSpec": "latest", + "rawSpec": "^2.0.1", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "^2.0.1" }, "_requiredBy": [ "#USER", @@ -25,7 +21,7 @@ ], "_resolved": "https://registry.npmjs.org/libnpm/-/libnpm-2.0.1.tgz", "_shasum": "a48fcdee3c25e13c77eb7c60a0efe561d7fb0d8f", - "_spec": "libnpm@latest", + "_spec": "libnpm@^2.0.1", "_where": "/Users/zkat/Documents/code/work/npm", "author": { "name": "Kat Marchán", diff --git a/node_modules/libnpmconfig/node_modules/p-limit/index.js b/node_modules/libnpmconfig/node_modules/p-limit/index.js index c4f2c5fac1bcb..86decabbc0682 100644 --- a/node_modules/libnpmconfig/node_modules/p-limit/index.js +++ b/node_modules/libnpmconfig/node_modules/p-limit/index.js @@ -35,5 +35,15 @@ module.exports = concurrency => { } }; - return (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args)); + const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args)); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.length + } + }); + + return generator; }; diff --git a/node_modules/libnpmconfig/node_modules/p-limit/package.json b/node_modules/libnpmconfig/node_modules/p-limit/package.json index 24793748bbe83..233b3f13d75e1 100644 --- a/node_modules/libnpmconfig/node_modules/p-limit/package.json +++ b/node_modules/libnpmconfig/node_modules/p-limit/package.json @@ -1,8 +1,8 @@ { "_from": "p-limit@^2.0.0", - "_id": "p-limit@2.0.0", + "_id": "p-limit@2.1.0", "_inBundle": false, - "_integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "_integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", "_location": "/libnpmconfig/p-limit", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/libnpmconfig/p-locate" ], - "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "_shasum": "e624ed54ee8c460a778b3c9f3670496ff8a57aec", + "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "_shasum": "1d5a0d20fb12707c758a655f6bbc4386b5930d68", "_spec": "p-limit@^2.0.0", "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpmconfig/node_modules/p-locate", "author": { @@ -37,12 +37,12 @@ "deprecated": false, "description": "Run multiple promise-returning & async functions with limited concurrency", "devDependencies": { - "ava": "*", - "delay": "^3.0.0", + "ava": "^1.0.1", + "delay": "^4.1.0", "in-range": "^1.0.0", "random-int": "^1.0.0", "time-span": "^2.0.0", - "xo": "*" + "xo": "^0.23.0" }, "engines": { "node": ">=6" @@ -77,5 +77,5 @@ "scripts": { "test": "xo && ava" }, - "version": "2.0.0" + "version": "2.1.0" } diff --git a/node_modules/libnpmconfig/node_modules/p-limit/readme.md b/node_modules/libnpmconfig/node_modules/p-limit/readme.md index 9e16ff216b226..92a6dbf7741d2 100644 --- a/node_modules/libnpmconfig/node_modules/p-limit/readme.md +++ b/node_modules/libnpmconfig/node_modules/p-limit/readme.md @@ -60,6 +60,21 @@ Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. +### limit.activeCount + +The number of promises that are currently running. + +### limit.pendingCount + +The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + + +## FAQ + +### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package? + +This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause and clear the queue. + ## Related diff --git a/node_modules/libnpmpublish/CHANGELOG.md b/node_modules/libnpmpublish/CHANGELOG.md index 023ddc262c3ee..529fa805a0927 100644 --- a/node_modules/libnpmpublish/CHANGELOG.md +++ b/node_modules/libnpmpublish/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.1.1](https://github.com/npm/libnpmpublish/compare/v1.1.0...v1.1.1) (2019-01-22) + + +### Bug Fixes + +* **auth:** send username in correct key ([#3](https://github.com/npm/libnpmpublish/issues/3)) ([38422d0](https://github.com/npm/libnpmpublish/commit/38422d0)) + + + # [1.1.0](https://github.com/npm/libnpmpublish/compare/v1.0.1...v1.1.0) (2018-08-31) diff --git a/node_modules/libnpmpublish/README.md b/node_modules/libnpmpublish/README.md index b605bdc24e88b..1511b7c14e926 100644 --- a/node_modules/libnpmpublish/README.md +++ b/node_modules/libnpmpublish/README.md @@ -8,13 +8,13 @@ care of putting it up on a nice registry for you. ## Example ```js -const search = require('libnpmpublish') +const { publish, unpublish } = require('libnpmpublish') ``` ## Install -`$ npm install libnpmsearch` +`$ npm install libnpmpublish` ## Table of Contents @@ -22,8 +22,8 @@ const search = require('libnpmpublish') * [Install](#install) * [API](#api) * [publish/unpublish opts](#opts) - * [`search()`](#search) - * [`search.stream()`](#search-stream) + * [`publish()`](#publish) + * [`unpublish()`](#unpublish) ### API diff --git a/node_modules/libnpmpublish/node_modules/aproba/CHANGELOG.md b/node_modules/libnpmpublish/node_modules/aproba/CHANGELOG.md deleted file mode 100644 index bab30ecb7e625..0000000000000 --- a/node_modules/libnpmpublish/node_modules/aproba/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -2.0.0 - * Drop support for 0.10 and 0.12. They haven't been in travis but still, - since we _know_ we'll break with them now it's only polite to do a - major bump. diff --git a/node_modules/libnpmpublish/node_modules/aproba/LICENSE b/node_modules/libnpmpublish/node_modules/aproba/LICENSE deleted file mode 100644 index f4be44d881b2d..0000000000000 --- a/node_modules/libnpmpublish/node_modules/aproba/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/libnpmpublish/node_modules/aproba/README.md b/node_modules/libnpmpublish/node_modules/aproba/README.md deleted file mode 100644 index 0bfc594c56a37..0000000000000 --- a/node_modules/libnpmpublish/node_modules/aproba/README.md +++ /dev/null @@ -1,94 +0,0 @@ -aproba -====== - -A ridiculously light-weight function argument validator - -``` -var validate = require("aproba") - -function myfunc(a, b, c) { - // `a` must be a string, `b` a number, `c` a function - validate('SNF', arguments) // [a,b,c] is also valid -} - -myfunc('test', 23, function () {}) // ok -myfunc(123, 23, function () {}) // type error -myfunc('test', 23) // missing arg error -myfunc('test', 23, function () {}, true) // too many args error - -``` - -Valid types are: - -| type | description -| :--: | :---------- -| * | matches any type -| A | `Array.isArray` OR an `arguments` object -| S | typeof == string -| N | typeof == number -| F | typeof == function -| O | typeof == object and not type A and not type E -| B | typeof == boolean -| E | `instanceof Error` OR `null` **(special: see below)** -| Z | == `null` - -Validation failures throw one of three exception types, distinguished by a -`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. - -If you pass in an invalid type then it will throw with a code of -`EUNKNOWNTYPE`. - -If an **error** argument is found and is not null then the remaining -arguments are optional. That is, if you say `ESO` then that's like using a -non-magical `E` in: `E|ESO|ZSO`. - -### But I have optional arguments?! - -You can provide more than one signature by separating them with pipes `|`. -If any signature matches the arguments then they'll be considered valid. - -So for example, say you wanted to write a signature for -`fs.createWriteStream`. The docs for it describe it thusly: - -``` -fs.createWriteStream(path[, options]) -``` - -This would be a signature of `SO|S`. That is, a string and and object, or -just a string. - -Now, if you read the full `fs` docs, you'll see that actually path can ALSO -be a buffer. And options can be a string, that is: -``` -path | -options | -``` - -To reproduce this you have to fully enumerate all of the possible -combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The -awkwardness is a feature: It reminds you of the complexity you're adding to -your API when you do this sort of thing. - - -### Browser support - -This has no dependencies and should work in browsers, though you'll have -noisier stack traces. - -### Why this exists - -I wanted a very simple argument validator. It needed to do two things: - -1. Be more concise and easier to use than assertions - -2. Not encourage an infinite bikeshed of DSLs - -This is why types are specified by a single character and there's no such -thing as an optional argument. - -This is not intended to validate user data. This is specifically about -asserting the interface of your functions. - -If you need greater validation, I encourage you to write them by hand or -look elsewhere. - diff --git a/node_modules/libnpmpublish/node_modules/aproba/index.js b/node_modules/libnpmpublish/node_modules/aproba/index.js deleted file mode 100644 index fd947481ba557..0000000000000 --- a/node_modules/libnpmpublish/node_modules/aproba/index.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' -module.exports = validate - -function isArguments (thingy) { - return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') -} - -const types = { - '*': {label: 'any', check: () => true}, - A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)}, - S: {label: 'string', check: _ => typeof _ === 'string'}, - N: {label: 'number', check: _ => typeof _ === 'number'}, - F: {label: 'function', check: _ => typeof _ === 'function'}, - O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)}, - B: {label: 'boolean', check: _ => typeof _ === 'boolean'}, - E: {label: 'error', check: _ => _ instanceof Error}, - Z: {label: 'null', check: _ => _ == null} -} - -function addSchema (schema, arity) { - const group = arity[schema.length] = arity[schema.length] || [] - if (group.indexOf(schema) === -1) group.push(schema) -} - -function validate (rawSchemas, args) { - if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) - if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') - if (!args) throw missingRequiredArg(1, 'args') - if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) - if (!types.A.check(args)) throw invalidType(1, ['array'], args) - const schemas = rawSchemas.split('|') - const arity = {} - - schemas.forEach(schema => { - for (let ii = 0; ii < schema.length; ++ii) { - const type = schema[ii] - if (!types[type]) throw unknownType(ii, type) - } - if (/E.*E/.test(schema)) throw moreThanOneError(schema) - addSchema(schema, arity) - if (/E/.test(schema)) { - addSchema(schema.replace(/E.*$/, 'E'), arity) - addSchema(schema.replace(/E/, 'Z'), arity) - if (schema.length === 1) addSchema('', arity) - } - }) - let matching = arity[args.length] - if (!matching) { - throw wrongNumberOfArgs(Object.keys(arity), args.length) - } - for (let ii = 0; ii < args.length; ++ii) { - let newMatching = matching.filter(schema => { - const type = schema[ii] - const typeCheck = types[type].check - return typeCheck(args[ii]) - }) - if (!newMatching.length) { - const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null) - throw invalidType(ii, labels, args[ii]) - } - matching = newMatching - } -} - -function missingRequiredArg (num) { - return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) -} - -function unknownType (num, type) { - return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) -} - -function invalidType (num, expectedTypes, value) { - let valueType - Object.keys(types).forEach(typeCode => { - if (types[typeCode].check(value)) valueType = types[typeCode].label - }) - return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + - englishList(expectedTypes) + ' but got ' + valueType) -} - -function englishList (list) { - return list.join(', ').replace(/, ([^,]+)$/, ' or $1') -} - -function wrongNumberOfArgs (expected, got) { - const english = englishList(expected) - const args = expected.every(ex => ex.length === 1) - ? 'argument' - : 'arguments' - return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) -} - -function moreThanOneError (schema) { - return newException('ETOOMANYERRORTYPES', - 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') -} - -function newException (code, msg) { - const err = new Error(msg) - err.code = code - /* istanbul ignore else */ - if (Error.captureStackTrace) Error.captureStackTrace(err, validate) - return err -} diff --git a/node_modules/libnpmpublish/node_modules/aproba/package.json b/node_modules/libnpmpublish/node_modules/aproba/package.json deleted file mode 100644 index fcaab4f71e3d6..0000000000000 --- a/node_modules/libnpmpublish/node_modules/aproba/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_args": [ - [ - "aproba@2.0.0", - "/Users/zkat/Documents/code/work/npm" - ] - ], - "_from": "aproba@2.0.0", - "_id": "aproba@2.0.0", - "_inBundle": false, - "_integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "_location": "/libnpmpublish/aproba", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "aproba@2.0.0", - "name": "aproba", - "escapedName": "aproba", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/libnpmpublish" - ], - "_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/zkat/Documents/code/work/npm", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org" - }, - "bugs": { - "url": "https://github.com/iarna/aproba/issues" - }, - "dependencies": {}, - "description": "A ridiculously light-weight argument validator (now browser friendly)", - "devDependencies": { - "standard": "^11.0.1", - "tap": "^12.0.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/iarna/aproba", - "keywords": [ - "argument", - "validate" - ], - "license": "ISC", - "main": "index.js", - "name": "aproba", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/aproba.git" - }, - "scripts": { - "pretest": "standard", - "test": "tap --100 -J test/*.js" - }, - "version": "2.0.0" -} diff --git a/node_modules/libnpmpublish/package.json b/node_modules/libnpmpublish/package.json index ab2817778410b..4df1f0011dd13 100644 --- a/node_modules/libnpmpublish/package.json +++ b/node_modules/libnpmpublish/package.json @@ -1,32 +1,27 @@ { - "_args": [ - [ - "libnpmpublish@1.1.0", - "/Users/zkat/Documents/code/work/npm" - ] - ], - "_from": "libnpmpublish@1.1.0", - "_id": "libnpmpublish@1.1.0", + "_from": "libnpmpublish@^1.1.0", + "_id": "libnpmpublish@1.1.1", "_inBundle": false, - "_integrity": "sha512-mQ3LT2EWlpJ6Q8mgHTNqarQVCgcY32l6xadPVPMcjWLtVLz7II4WlWkzlbYg1nHGAf+xyABDwS+3aNUiRLkyaA==", + "_integrity": "sha512-nefbvJd/wY38zdt+b9SHL6171vqBrMtZ56Gsgfd0duEKb/pB8rDT4/ObUQLrHz1tOfht1flt2zM+UGaemzAG5g==", "_location": "/libnpmpublish", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "libnpmpublish@1.1.0", + "raw": "libnpmpublish@^1.1.0", "name": "libnpmpublish", "escapedName": "libnpmpublish", - "rawSpec": "1.1.0", + "rawSpec": "^1.1.0", "saveSpec": null, - "fetchSpec": "1.1.0" + "fetchSpec": "^1.1.0" }, "_requiredBy": [ "/libnpm" ], - "_resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-1.1.0.tgz", - "_spec": "1.1.0", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-1.1.1.tgz", + "_shasum": "ff0c6bb0b4ad2bda2ad1f5fba6760a4af37125f0", + "_spec": "libnpmpublish@^1.1.0", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpm", "author": { "name": "Kat Marchán", "email": "kzm@zkat.tech" @@ -34,6 +29,7 @@ "bugs": { "url": "https://github.com/npm/libnpmpublish/issues" }, + "bundleDependencies": false, "dependencies": { "aproba": "^2.0.0", "figgy-pudding": "^3.5.1", @@ -45,6 +41,7 @@ "semver": "^5.5.1", "ssri": "^6.0.1" }, + "deprecated": false, "description": "Programmatic API for the bits behind npm publish and unpublish", "devDependencies": { "bluebird": "^3.5.1", @@ -72,5 +69,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "1.1.0" + "version": "1.1.1" } diff --git a/node_modules/libnpmpublish/publish.js b/node_modules/libnpmpublish/publish.js index 22e94b17e8f0b..de5af4f5d3d6b 100644 --- a/node_modules/libnpmpublish/publish.js +++ b/node_modules/libnpmpublish/publish.js @@ -88,7 +88,7 @@ function patchedManifest (spec, auth, base, opts) { // currently gets filled in by the npm registry itself, based on auth // information. manifest._npmUser = { - username: auth.username, + name: auth.username, email: auth.email } } diff --git a/node_modules/libnpmpublish/test/publish.js b/node_modules/libnpmpublish/test/publish.js index 1fe6892be24af..65b8c82524dd2 100644 --- a/node_modules/libnpmpublish/test/publish.js +++ b/node_modules/libnpmpublish/test/publish.js @@ -197,7 +197,7 @@ test('retry after a conflict', t => { _nodeVersion: process.versions.node, _npmVersion: '6.9.0', _npmUser: { - username: 'other', + name: 'other', email: 'other@idk.tech' }, name: 'libnpmpublish', @@ -282,7 +282,7 @@ test('retry after a conflict -- no versions on remote', t => { _nodeVersion: process.versions.node, _npmVersion: '6.9.0', _npmUser: { - username: 'other', + name: 'other', email: 'other@idk.tech' }, name: 'libnpmpublish', @@ -432,7 +432,7 @@ test('publish with basic auth', t => { _nodeVersion: process.versions.node, _npmVersion: '6.9.0', _npmUser: { - username: 'zkat', + name: 'zkat', email: 'kat@example.tech' }, maintainers: [{ diff --git a/package-lock.json b/package-lock.json index 06882c2440651..5e1edf623be2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2572,24 +2572,6 @@ "pacote": "^9.2.3", "read-package-json": "^2.0.13", "stringify-package": "^1.0.0" - }, - "dependencies": { - "aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" - }, - "libnpmhook": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-5.0.2.tgz", - "integrity": "sha512-vLenmdFWhRfnnZiNFPNMog6CK7Ujofy2TWiM2CrpZUjBRIhHkJeDaAbJdYCT6W4lcHtyrJR8yXW8KFyq6UAp1g==", - "requires": { - "aproba": "^2.0.0", - "figgy-pudding": "^3.4.1", - "get-stream": "^4.0.0", - "npm-registry-fetch": "^3.8.0" - } - } } }, "libnpmaccess": { @@ -2638,9 +2620,9 @@ } }, "p-limit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", "requires": { "p-try": "^2.0.0" } @@ -2690,9 +2672,9 @@ } }, "libnpmpublish": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-1.1.0.tgz", - "integrity": "sha512-mQ3LT2EWlpJ6Q8mgHTNqarQVCgcY32l6xadPVPMcjWLtVLz7II4WlWkzlbYg1nHGAf+xyABDwS+3aNUiRLkyaA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-1.1.1.tgz", + "integrity": "sha512-nefbvJd/wY38zdt+b9SHL6171vqBrMtZ56Gsgfd0duEKb/pB8rDT4/ObUQLrHz1tOfht1flt2zM+UGaemzAG5g==", "requires": { "aproba": "^2.0.0", "figgy-pudding": "^3.5.1", @@ -2703,13 +2685,6 @@ "npm-registry-fetch": "^3.8.0", "semver": "^5.5.1", "ssri": "^6.0.1" - }, - "dependencies": { - "aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" - } } }, "libnpmsearch": { From 0af8c00acb01849362ffca25b567cc62447c7175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Tue, 22 Jan 2019 15:31:50 -0800 Subject: [PATCH 10/15] libcipm@3.0.3 Fixes: https://npm.community/t/npm-6-6-0-release-breaking-docker-npm-ci-commands/4746 --- node_modules/libcipm/CHANGELOG.md | 10 ++++++++++ node_modules/libcipm/index.js | 3 ++- node_modules/libcipm/package.json | 22 +++++++++++----------- package-lock.json | 6 +++--- package.json | 2 +- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/node_modules/libcipm/CHANGELOG.md b/node_modules/libcipm/CHANGELOG.md index 09ee6ac20f4d9..5f9d4906e4ae7 100644 --- a/node_modules/libcipm/CHANGELOG.md +++ b/node_modules/libcipm/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.0.3](https://github.com/zkat/cipm/compare/v3.0.2...v3.0.3) (2019-01-22) + + +### Bug Fixes + +* **scripts:** pass in opts.dir directly ([018df27](https://github.com/zkat/cipm/commit/018df27)) + + + ## [3.0.2](https://github.com/zkat/cipm/compare/v3.0.1...v3.0.2) (2018-08-31) diff --git a/node_modules/libcipm/index.js b/node_modules/libcipm/index.js index 838d072356151..7f4d13f74a34c 100644 --- a/node_modules/libcipm/index.js +++ b/node_modules/libcipm/index.js @@ -389,7 +389,8 @@ class Installer { pkg, stage, pkgPath, LifecycleOpts(this.opts).concat({ // TODO: can be removed once npm-lifecycle is updated to modern // config practices. - config: this.opts + config: this.opts, + dir: this.prefix })) ).tap(() => { this.timings.scripts += Date.now() - start }) } diff --git a/node_modules/libcipm/package.json b/node_modules/libcipm/package.json index 981a22234c9bb..153dc1acbaada 100644 --- a/node_modules/libcipm/package.json +++ b/node_modules/libcipm/package.json @@ -1,27 +1,27 @@ { - "_from": "libcipm@^3.0.2", - "_id": "libcipm@3.0.2", + "_from": "libcipm@latest", + "_id": "libcipm@3.0.3", "_inBundle": false, - "_integrity": "sha512-bK16Bynv5Ukg5sI9J70hH5KRF5/p9lNmYxKzeKgRNtx6sbwK6aozxFgGuXUBgiwu+N/ubo5KMqPy/LcXE8K2ZA==", + "_integrity": "sha512-71V5CpTI+zFydTc5IjJ/tx8JHbXEJvmYF2zaSVW1V3X1rRnRjXqh44iuiyry1xgi3ProUQ1vX1uwFiWs00+2og==", "_location": "/libcipm", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "tag", "registry": true, - "raw": "libcipm@^3.0.2", + "raw": "libcipm@latest", "name": "libcipm", "escapedName": "libcipm", - "rawSpec": "^3.0.2", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "^3.0.2" + "fetchSpec": "latest" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-3.0.2.tgz", - "_shasum": "baba173f02db659d60f58f34bcf605f22a39d9b8", - "_spec": "libcipm@^3.0.2", + "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-3.0.3.tgz", + "_shasum": "2e764effe0b90d458790dab3165794c804075ed3", + "_spec": "libcipm@latest", "_where": "/Users/zkat/Documents/code/work/npm", "author": { "name": "Kat Marchán", @@ -96,5 +96,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "3.0.2" + "version": "3.0.3" } diff --git a/package-lock.json b/package-lock.json index 5e1edf623be2b..fd53413c60dba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2526,9 +2526,9 @@ } }, "libcipm": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/libcipm/-/libcipm-3.0.2.tgz", - "integrity": "sha512-bK16Bynv5Ukg5sI9J70hH5KRF5/p9lNmYxKzeKgRNtx6sbwK6aozxFgGuXUBgiwu+N/ubo5KMqPy/LcXE8K2ZA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/libcipm/-/libcipm-3.0.3.tgz", + "integrity": "sha512-71V5CpTI+zFydTc5IjJ/tx8JHbXEJvmYF2zaSVW1V3X1rRnRjXqh44iuiyry1xgi3ProUQ1vX1uwFiWs00+2og==", "requires": { "bin-links": "^1.1.2", "bluebird": "^3.5.1", diff --git a/package.json b/package.json index 2c6d6b7066cf2..a6d55458971be 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "is-cidr": "^3.0.0", "json-parse-better-errors": "^1.0.2", "lazy-property": "~1.0.0", - "libcipm": "^3.0.2", + "libcipm": "^3.0.3", "libnpm": "^2.0.1", "libnpmhook": "^5.0.2", "libnpx": "^10.2.0", From 5a7962e46f582c6bd91784b0ddc941ed45e9f802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 23 Jan 2019 10:34:53 -0800 Subject: [PATCH 11/15] write-file-atomic@2.4.2 Fixes issues with leaking signal-exit instances and file descriptors. --- node_modules/write-file-atomic/CHANGELOG.md | 20 ++++ node_modules/write-file-atomic/README.md | 19 ++-- node_modules/write-file-atomic/index.js | 110 +++++++++++++------- node_modules/write-file-atomic/package.json | 36 +++---- package-lock.json | 6 +- package.json | 2 +- 6 files changed, 126 insertions(+), 67 deletions(-) create mode 100644 node_modules/write-file-atomic/CHANGELOG.md diff --git a/node_modules/write-file-atomic/CHANGELOG.md b/node_modules/write-file-atomic/CHANGELOG.md new file mode 100644 index 0000000000000..61fb4d22330e4 --- /dev/null +++ b/node_modules/write-file-atomic/CHANGELOG.md @@ -0,0 +1,20 @@ +# 2.4.2 + +* A pair of patches to fix some fd leaks. We would leak fds with sync use + when errors occured and with async use any time fsync was not in use. (#34) + +# 2.4.1 + +* Fix a bug where `signal-exit` instances would be leaked. This was fixed when addressing #35. + +# 2.4.0 + +## Features + +* Allow chown and mode options to be set to false to disable the defaulting behavior. (#20) +* Support passing encoding strings in options slot for compat with Node.js API. (#31) +* Add support for running inside of worker threads (#37) + +## Fixes + +* Remove unneeded call when returning success (#36) diff --git a/node_modules/write-file-atomic/README.md b/node_modules/write-file-atomic/README.md index af385f3b70c69..ca28e99a2b08e 100644 --- a/node_modules/write-file-atomic/README.md +++ b/node_modules/write-file-atomic/README.md @@ -8,20 +8,21 @@ atomic and allows you set ownership (uid/gid of the file). * filename **String** * data **String** | **Buffer** -* options **Object** - * chown **Object** +* options **Object** | **String** + * chown **Object** default, uid & gid of existing file, if any * uid **Number** * gid **Number** * encoding **String** | **Null** default = 'utf8' * fsync **Boolean** default = true - * mode **Number** default = 438 (aka 0666 in Octal) + * mode **Number** default, from existing file, if any * Promise **Object** default = native Promise object -callback **Function** +* callback **Function** Atomically and asynchronously writes data to a file, replacing the file if it already exists. data can be a string or a buffer. The file is initially named `filename + "." + murmurhex(__filename, process.pid, ++invocations)`. +Note that `require('worker_threads').threadId` is used in addition to `process.pid` if running inside of a worker thread. If writeFile completes successfully then, if passed the **chown** option it will change the ownership of the file. Finally it renames the file back to the filename you specified. If it encounters errors at any of these steps it will attempt to unlink the temporary file and then @@ -29,9 +30,15 @@ pass the error back to the caller. If multiple writes are concurrently issued to the same file, the write operations are put into a queue and serialized in the order they were called, using Promises. Native promises are used by default, but you can inject your own promise-like object with the **Promise** option. Writes to different files are still executed in parallel. If provided, the **chown** option requires both **uid** and **gid** properties or else -you'll get an error. +you'll get an error. If **chown** is not specified it will default to using +the owner of the previous file. To prevent chown from being ran you can +also pass `false`, in which case the file will be created with the current user's credentials. -The **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'. +If **mode** is not specified, it will default to using the permissions from +an existing file, if any. Expicitly setting this to `false` remove this default, resulting +in a file created with the system default permissions. + +If options is a String, it's assumed to be the **encoding** option. The **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'. If the **fsync** option is **false**, writeFile will skip the final fsync call. diff --git a/node_modules/write-file-atomic/index.js b/node_modules/write-file-atomic/index.js index 3b5607d154f46..fe9fdfb9db221 100644 --- a/node_modules/write-file-atomic/index.js +++ b/node_modules/write-file-atomic/index.js @@ -10,11 +10,26 @@ var onExit = require('signal-exit') var path = require('path') var activeFiles = {} +// if we run inside of a worker_thread, `process.pid` is not unique +/* istanbul ignore next */ +var threadId = (function getId () { + try { + var workerThreads = require('worker_threads') + + /// if we are in main thread, this is set to `0` + return workerThreads.threadId + } catch (e) { + // worker_threads are not available, fallback to 0 + return 0 + } +})() + var invocations = 0 function getTmpname (filename) { return filename + '.' + MurmurHash3(__filename) .hash(String(process.pid)) + .hash(String(threadId)) .hash(String(++invocations)) .result() } @@ -28,17 +43,23 @@ function cleanupOnExit (tmpfile) { } function writeFile (filename, data, options, callback) { - if (options instanceof Function) { - callback = options - options = null + if (options) { + if (options instanceof Function) { + callback = options + options = {} + } else if (typeof options === 'string') { + options = { encoding: options } + } + } else { + options = {} } - if (!options) options = {} var Promise = options.Promise || global.Promise var truename var fd var tmpfile - var removeOnExit = cleanupOnExit(() => tmpfile) + /* istanbul ignore next -- The closure only gets called when onExit triggers */ + var removeOnExitHandler = onExit(cleanupOnExit(() => tmpfile)) var absoluteName = path.resolve(filename) new Promise(function serializeSameFile (resolve) { @@ -66,10 +87,10 @@ function writeFile (filename, data, options, callback) { else { options = Object.assign({}, options) - if (!options.mode) { + if (options.mode == null) { options.mode = stats.mode } - if (!options.chown && process.getuid) { + if (options.chown == null && process.getuid) { options.chown = { uid: stats.uid, gid: stats.gid } } resolve() @@ -100,15 +121,18 @@ function writeFile (filename, data, options, callback) { } else resolve() }) }).then(function syncAndClose () { - if (options.fsync !== false) { - return new Promise(function (resolve, reject) { + return new Promise(function (resolve, reject) { + if (options.fsync !== false) { fs.fsync(fd, function (err) { - if (err) reject(err) + if (err) fs.close(fd, () => reject(err)) else fs.close(fd, resolve) }) - }) - } + } else { + fs.close(fd, resolve) + } + }) }).then(function chown () { + fd = null if (options.chown) { return new Promise(function (resolve, reject) { fs.chown(tmpfile, options.chown.uid, options.chown.gid, function (err) { @@ -134,12 +158,16 @@ function writeFile (filename, data, options, callback) { }) }) }).then(function success () { - removeOnExit() + removeOnExitHandler() callback() - }).catch(function fail (err) { - removeOnExit() - fs.unlink(tmpfile, function () { - callback(err) + }, function fail (err) { + return new Promise(resolve => { + return fd ? fs.close(fd, resolve) : resolve() + }).then(() => { + removeOnExitHandler() + fs.unlink(tmpfile, function () { + callback(err) + }) }) }).then(function checkQueue () { activeFiles[absoluteName].shift() // remove the element added by serializeSameFile @@ -150,7 +178,8 @@ function writeFile (filename, data, options, callback) { } function writeFileSync (filename, data, options) { - if (!options) options = {} + if (typeof options === 'string') options = { encoding: options } + else if (!options) options = {} try { filename = fs.realpathSync(filename) } catch (ex) { @@ -158,26 +187,30 @@ function writeFileSync (filename, data, options) { } var tmpfile = getTmpname(filename) - try { - if (!options.mode || !options.chown) { - // Either mode or chown is not explicitly set - // Default behavior is to copy it from original file - try { - var stats = fs.statSync(filename) - options = Object.assign({}, options) - if (!options.mode) { - options.mode = stats.mode - } - if (!options.chown && process.getuid) { - options.chown = { uid: stats.uid, gid: stats.gid } - } - } catch (ex) { - // ignore stat errors + if (!options.mode || !options.chown) { + // Either mode or chown is not explicitly set + // Default behavior is to copy it from original file + try { + var stats = fs.statSync(filename) + options = Object.assign({}, options) + if (!options.mode) { + options.mode = stats.mode + } + if (!options.chown && process.getuid) { + options.chown = { uid: stats.uid, gid: stats.gid } } + } catch (ex) { + // ignore stat errors } + } + + var fd + var cleanup = cleanupOnExit(tmpfile) + var removeOnExitHandler = onExit(cleanup) + + try { - var removeOnExit = onExit(cleanupOnExit(tmpfile)) - var fd = fs.openSync(tmpfile, 'w', options.mode) + fd = fs.openSync(tmpfile, 'w', options.mode) if (Buffer.isBuffer(data)) { fs.writeSync(fd, data, 0, data.length, 0) } else if (data != null) { @@ -190,10 +223,11 @@ function writeFileSync (filename, data, options) { if (options.chown) fs.chownSync(tmpfile, options.chown.uid, options.chown.gid) if (options.mode) fs.chmodSync(tmpfile, options.mode) fs.renameSync(tmpfile, filename) - removeOnExit() + removeOnExitHandler() } catch (err) { - removeOnExit() - try { fs.unlinkSync(tmpfile) } catch (e) {} + if (fd) fs.closeSync(fd) + removeOnExitHandler() + cleanup() throw err } } diff --git a/node_modules/write-file-atomic/package.json b/node_modules/write-file-atomic/package.json index cdf47414a40d1..f8f55fbd22bfc 100644 --- a/node_modules/write-file-atomic/package.json +++ b/node_modules/write-file-atomic/package.json @@ -1,35 +1,31 @@ { - "_args": [ - [ - "write-file-atomic@2.3.0", - "/Users/rebecca/code/npm" - ] - ], - "_from": "write-file-atomic@2.3.0", - "_id": "write-file-atomic@2.3.0", + "_from": "write-file-atomic@^2.3.0", + "_id": "write-file-atomic@2.4.2", "_inBundle": false, - "_integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "_integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==", "_location": "/write-file-atomic", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "write-file-atomic@2.3.0", + "raw": "write-file-atomic@^2.3.0", "name": "write-file-atomic", "escapedName": "write-file-atomic", - "rawSpec": "2.3.0", + "rawSpec": "^2.3.0", "saveSpec": null, - "fetchSpec": "2.3.0" + "fetchSpec": "^2.3.0" }, "_requiredBy": [ + "#USER", "/", "/bin-links", "/configstore", "/tap" ], - "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "_spec": "2.3.0", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz", + "_shasum": "a7181706dfba17855d221140a9c06e15fcdd87b9", + "_spec": "write-file-atomic@^2.3.0", + "_where": "/Users/zkat/Documents/code/work/npm", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org", @@ -38,18 +34,20 @@ "bugs": { "url": "https://github.com/iarna/write-file-atomic/issues" }, + "bundleDependencies": false, "dependencies": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", "signal-exit": "^3.0.2" }, + "deprecated": false, "description": "Write files in an atomic fashion w/configurable ownership", "devDependencies": { "mkdirp": "^0.5.1", "require-inject": "^1.4.0", "rimraf": "^2.5.4", - "standard": "^10.0.2", - "tap": "^10.3.2" + "standard": "^12.0.1", + "tap": "^12.1.3" }, "files": [ "index.js" @@ -69,5 +67,5 @@ "scripts": { "test": "standard && tap --100 test/*.js" }, - "version": "2.3.0" + "version": "2.4.2" } diff --git a/package-lock.json b/package-lock.json index fd53413c60dba..32d12d4932f2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8006,9 +8006,9 @@ } }, "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz", + "integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==", "requires": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", diff --git a/package.json b/package.json index a6d55458971be..5a485b9aab36e 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "validate-npm-package-name": "~3.0.0", "which": "^1.3.1", "worker-farm": "^1.6.0", - "write-file-atomic": "^2.3.0" + "write-file-atomic": "^2.4.2" }, "bundleDependencies": [ "abbrev", From b09bc8ce042d0cde3ea2c8db595134b5db9c86f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 18 Jan 2019 09:17:57 -0800 Subject: [PATCH 12/15] doc: update changelog for npm@6.7.0 --- CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c0192aee1e31..794ae1060441e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,53 @@ +## v6.7.0 (2019-01-23): + +Hey y'all! This is a quick hotfix release that includes some important fixes to +`npm@6.6.0` related to the large rewrite/refactor. We're tagging it as a feature +release because the changes involve some minor new features, and semver is +semver, but there's nothing major here. + +### NEW FEATURES + +* [`50463f58b`](https://github.com/npm/cli/commit/50463f58b4b70180a85d6d8c10fcf50d8970ef5e) + Improve usage errors to `npm org` commands and add optional filtering to `npm + org ls` subcommand. + ([@zkat](https://github.com/zkat)) + +### BUGFIXES + +* [`4027070b0`](https://github.com/npm/cli/commit/4027070b03be3bdae2515f2291de89b91f901df9) + Fix default usage printout for `npm org` so you actually see how it's supposed + to be used. + ([@zkat](https://github.com/zkat)) +* [`cfea6ea5b`](https://github.com/npm/cli/commit/cfea6ea5b67ec5e4ec57e3a9cb8c82d018cb5476) + fix default usage message for npm hook + ([@zkat](https://github.com/zkat)) + +### DOCS + +* [`e959e1421`](https://github.com/npm/cli/commit/e959e14217d751ddb295565fd75cc81de1ee0d5b) + Add manpage for `npm org` command. + ([@zkat](https://github.com/zkat)) + +### DEPENDENCY BUMPS + +* [`8543fc357`](https://github.com/npm/cli/commit/8543fc3576f64e91f7946d4c56a5ffb045b55156) + `pacote@9.4.0`: Fall back to "fullfat" packuments on ETARGET errors. This will + make it so that, when a package is published but the corgi follower hasn't + caught up, users can still install a freshly-published package. + ([@zkat](https://github.com/zkat)) +* [`75475043b`](https://github.com/npm/cli/commit/75475043b03a254b2e7db2c04c3f0baea31d8dc5) + [npm.community#4752](https://npm.community/t/npm-6-6-0-broke-authentication-with-npm-registry-couchapp/4752) + `libnpmpublish@1.1.1`: Fixes auth error for username/password legacy authentication. + ([@sreeramjayan](https://github.com/sreeramjayan)) +* [`0af8c00ac`](https://github.com/npm/cli/commit/0af8c00acb01849362ffca25b567cc62447c7175) + [npm.community#4746](https://npm.community/t/npm-6-6-0-release-breaking-docker-npm-ci-commands/4746) + `libcipm@3.0.3`: Fixes issue with "cannot run in wd" errors for run-scripts. + ([@zkat](https://github.com/zkat)) +* [`5a7962e46`](https://github.com/npm/cli/commit/5a7962e46f582c6bd91784b0ddc941ed45e9f802) + `write-file-atomic@2.4.2`: + Fixes issues with leaking `signal-exit` instances and file descriptors. + ([@iarna](https://github.com/iarna)) + ## v6.6.0 (2019-01-17): ### REFACTORING OUT npm-REGISTRY-CLIENT From f6e31a7bbb7e8ca882f126f5a0065b473300f8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 23 Jan 2019 13:52:16 -0800 Subject: [PATCH 13/15] 6.7.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 32d12d4932f2b..b5850bb68756c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "npm", - "version": "6.6.0", + "version": "6.7.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5a485b9aab36e..0b795b363e15c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "6.6.0", + "version": "6.7.0", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ From d72141080ec8fcf35bcc5650245efbe649de053e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 23 Jan 2019 13:58:08 -0800 Subject: [PATCH 14/15] npm-registry-couchapp@2.7.1 --- package-lock.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index b5850bb68756c..a2f2fd4a3c079 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,9 +20,9 @@ } }, "@types/node": { - "version": "10.12.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.12.tgz", - "integrity": "sha512-Pr+6JRiKkfsFvmU/LK68oBRCQeEg36TyAbPhc2xpez24OOZZCuoIhWGTd39VZy6nGafSbxzGouFPTFD/rR1A0A==", + "version": "10.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", + "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", "dev": true }, "@types/request": { @@ -38,9 +38,9 @@ } }, "@types/tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-Set5ZdrAaKI/qHdFlVMgm/GsAv/wkXhSTuZFkJ+JI7HK+wIkIlOaUXSXieIvJ0+OvGIqtREFoE+NHJtEq0gtEw==", + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.5.tgz", + "integrity": "sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg==", "dev": true }, "JSONStream": { @@ -608,9 +608,9 @@ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" }, "cloudant-follow": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.0.tgz", - "integrity": "sha512-jsplCsI0EpJvTrlgeuuYFrmrKGxm8TlSkyKzOLZa6fc6p+FNT8UDPAwYeh0yaT8IdI+sxT5DTdCD2G45HWpSaw==", + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.1.tgz", + "integrity": "sha512-hflb0VlRrHcSkkvsvCZt6UdjbsGnKjy3d6BA3VV3e+WIXZP63HO6mVtOUd+df5W25OkkaqFM191MqQDW2Y7Ikw==", "dev": true, "requires": { "browser-request": "~0.3.0", @@ -619,9 +619,9 @@ }, "dependencies": { "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" @@ -3079,9 +3079,9 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" }, "nano": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/nano/-/nano-7.1.1.tgz", - "integrity": "sha512-c8Pr5/08XnTMt2Uii6Fcj4nKgwL/19Tgh+ZzwnEq73bVToo9WnhpMX2u4a70y1lVM8KFwaWYRy6EbjsdaQ0NCQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/nano/-/nano-8.0.0.tgz", + "integrity": "sha512-NpBzSEkfQ6Amc1n0ySa8OiOtz7Q6F/kT9YUARmcJFwSiX8scKU4V6riP8Q80lQR5A8VT5h3Mk2+YZJHQ65IfxA==", "dev": true, "requires": { "@types/request": "^2.47.1", From 550bf703ae3e31ba6a300658ae95b6937f67b68f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 23 Jan 2019 14:07:05 -0800 Subject: [PATCH 15/15] misc: adding @types to ignore list to fix git clean -fd --- node_modules/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/node_modules/.gitignore b/node_modules/.gitignore index ac8c182e8fdc7..06e52612ce876 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -1,4 +1,5 @@ ## Automatically generated dev dependency ignores +/@types /@types/caseless /@types/form-data /@types/node