From 62154bf69dad65f96ec78e6196ece83bc6188f4f 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] 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": {