Update node_modules

This commit is contained in:
crazy-max
2020-04-03 08:12:31 +00:00
parent c5091ccc7b
commit 4bcd932c28
129 changed files with 5485 additions and 3646 deletions

84
node_modules/pify/index.js generated vendored
View File

@@ -1,83 +1,67 @@
'use strict';
const processFn = (fn, opts) => function () {
const P = opts.promiseModule;
const args = new Array(arguments.length);
for (let i = 0; i < arguments.length; i++) {
args[i] = arguments[i];
}
const processFn = (fn, options) => function (...args) {
const P = options.promiseModule;
return new P((resolve, reject) => {
if (opts.errorFirst) {
args.push(function (err, result) {
if (opts.multiArgs) {
const results = new Array(arguments.length - 1);
for (let i = 1; i < arguments.length; i++) {
results[i - 1] = arguments[i];
}
if (err) {
results.unshift(err);
reject(results);
if (options.multiArgs) {
args.push((...result) => {
if (options.errorFirst) {
if (result[0]) {
reject(result);
} else {
resolve(results);
result.shift();
resolve(result);
}
} else if (err) {
reject(err);
} else {
resolve(result);
}
});
} else if (options.errorFirst) {
args.push((error, result) => {
if (error) {
reject(error);
} else {
resolve(result);
}
});
} else {
args.push(function (result) {
if (opts.multiArgs) {
const results = new Array(arguments.length - 1);
for (let i = 0; i < arguments.length; i++) {
results[i] = arguments[i];
}
resolve(results);
} else {
resolve(result);
}
});
args.push(resolve);
}
fn.apply(this, args);
});
};
module.exports = (obj, opts) => {
opts = Object.assign({
module.exports = (input, options) => {
options = Object.assign({
exclude: [/.+(Sync|Stream)$/],
errorFirst: true,
promiseModule: Promise
}, opts);
}, options);
const objType = typeof input;
if (!(input !== null && (objType === 'object' || objType === 'function'))) {
throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${input === null ? 'null' : objType}\``);
}
const filter = key => {
const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);
return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
return options.include ? options.include.some(match) : !options.exclude.some(match);
};
let ret;
if (typeof obj === 'function') {
ret = function () {
if (opts.excludeMain) {
return obj.apply(this, arguments);
}
return processFn(obj, opts).apply(this, arguments);
if (objType === 'function') {
ret = function (...args) {
return options.excludeMain ? input(...args) : processFn(input, options).apply(this, args);
};
} else {
ret = Object.create(Object.getPrototypeOf(obj));
ret = Object.create(Object.getPrototypeOf(input));
}
for (const key in obj) { // eslint-disable-line guard-for-in
const x = obj[key];
ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x;
for (const key in input) { // eslint-disable-line guard-for-in
const property = input[key];
ret[key] = typeof property === 'function' && filter(key) ? processFn(property, options) : property;
}
return ret;

34
node_modules/pify/package.json generated vendored
View File

@@ -1,34 +1,32 @@
{
"_args": [
[
"pify@3.0.0",
"pify@4.0.1",
"/home/runner/work/ghaction-upx/ghaction-upx"
]
],
"_from": "pify@3.0.0",
"_id": "pify@3.0.0",
"_from": "pify@4.0.1",
"_id": "pify@4.0.1",
"_inBundle": false,
"_integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
"_integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"_location": "/pify",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "pify@3.0.0",
"raw": "pify@4.0.1",
"name": "pify",
"escapedName": "pify",
"rawSpec": "3.0.0",
"rawSpec": "4.0.1",
"saveSpec": null,
"fetchSpec": "3.0.0"
"fetchSpec": "4.0.1"
},
"_requiredBy": [
"/download",
"/got",
"/make-dir",
"/npm-conf"
"/make-dir"
],
"_resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"_spec": "3.0.0",
"_resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"_spec": "4.0.1",
"_where": "/home/runner/work/ghaction-upx/ghaction-upx",
"author": {
"name": "Sindre Sorhus",
@@ -40,13 +38,13 @@
},
"description": "Promisify a callback-style function",
"devDependencies": {
"ava": "*",
"ava": "^0.25.0",
"pinkie-promise": "^2.0.0",
"v8-natives": "^1.0.0",
"xo": "*"
"v8-natives": "^1.1.0",
"xo": "^0.23.0"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"files": [
"index.js"
@@ -83,7 +81,7 @@
},
"scripts": {
"optimization-test": "node --allow-natives-syntax optimization-test.js",
"test": "xo && ava && npm run optimization-test"
"test": "xo && ava"
},
"version": "3.0.0"
"version": "4.0.1"
}

16
node_modules/pify/readme.md generated vendored
View File

@@ -2,11 +2,25 @@
> Promisify a callback-style function
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-pify?utm_source=npm-pify&utm_medium=referral&utm_campaign=readme">Get professional support for 'pify' with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
---
## Install
```
$ npm install --save pify
$ npm install pify
```