updated npm modules

This commit is contained in:
2019-05-20 20:43:45 -05:00
parent 2319197b81
commit f166b72b7d
1113 changed files with 8758 additions and 12227 deletions

38
node_modules/del/index.js generated vendored
View File

@@ -11,29 +11,27 @@ const rimrafP = pify(rimraf);
function safeCheck(file) {
if (isPathCwd(file)) {
throw new Error('Cannot delete the current working directory. Can be overriden with the `force` option.');
throw new Error('Cannot delete the current working directory. Can be overridden with the `force` option.');
}
if (!isPathInCwd(file)) {
throw new Error('Cannot delete files/folders outside the current working directory. Can be overriden with the `force` option.');
throw new Error('Cannot delete files/folders outside the current working directory. Can be overridden with the `force` option.');
}
}
module.exports = (patterns, opts) => {
opts = Object.assign({}, opts);
const del = (patterns, options) => {
options = Object.assign({}, options);
const force = opts.force;
delete opts.force;
const dryRun = opts.dryRun;
delete opts.dryRun;
const {force, dryRun} = options;
delete options.force;
delete options.dryRun;
const mapper = file => {
if (!force) {
safeCheck(file);
}
file = path.resolve(opts.cwd || '', file);
file = path.resolve(options.cwd || '', file);
if (dryRun) {
return file;
@@ -42,24 +40,26 @@ module.exports = (patterns, opts) => {
return rimrafP(file, {glob: false}).then(() => file);
};
return globby(patterns, opts).then(files => pMap(files, mapper, opts));
return globby(patterns, options).then(files => pMap(files, mapper, options));
};
module.exports.sync = (patterns, opts) => {
opts = Object.assign({}, opts);
module.exports = del;
// TODO: Remove this for the next major release
module.exports.default = del;
const force = opts.force;
delete opts.force;
module.exports.sync = (patterns, options) => {
options = Object.assign({}, options);
const dryRun = opts.dryRun;
delete opts.dryRun;
const {force, dryRun} = options;
delete options.force;
delete options.dryRun;
return globby.sync(patterns, opts).map(file => {
return globby.sync(patterns, options).map(file => {
if (!force) {
safeCheck(file);
}
file = path.resolve(opts.cwd || '', file);
file = path.resolve(options.cwd || '', file);
if (!dryRun) {
rimraf.sync(file, {glob: false});

47
node_modules/del/package.json generated vendored
View File

@@ -1,26 +1,26 @@
{
"_from": "del@^3.0.0",
"_id": "del@3.0.0",
"_from": "del@^4.1.1",
"_id": "del@4.1.1",
"_inBundle": false,
"_integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=",
"_integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==",
"_location": "/del",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "del@^3.0.0",
"raw": "del@^4.1.1",
"name": "del",
"escapedName": "del",
"rawSpec": "^3.0.0",
"rawSpec": "^4.1.1",
"saveSpec": null,
"fetchSpec": "^3.0.0"
"fetchSpec": "^4.1.1"
},
"_requiredBy": [
"/webpack-dev-server"
],
"_resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz",
"_shasum": "53ecf699ffcbcb39637691ab13baf160819766e5",
"_spec": "del@^3.0.0",
"_resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz",
"_shasum": "9e8f117222ea44a31ff3a156c049b99052a9f0b4",
"_spec": "del@^4.1.1",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\webpack-dev-server",
"author": {
"name": "Sindre Sorhus",
@@ -32,26 +32,29 @@
},
"bundleDependencies": false,
"dependencies": {
"@types/glob": "^7.1.1",
"globby": "^6.1.0",
"is-path-cwd": "^1.0.0",
"is-path-in-cwd": "^1.0.0",
"p-map": "^1.1.1",
"pify": "^3.0.0",
"rimraf": "^2.2.8"
"is-path-cwd": "^2.0.0",
"is-path-in-cwd": "^2.0.0",
"p-map": "^2.0.0",
"pify": "^4.0.1",
"rimraf": "^2.6.3"
},
"deprecated": false,
"description": "Delete files and folders",
"devDependencies": {
"ava": "*",
"make-dir": "^1.0.0",
"tempy": "^0.1.0",
"xo": "*"
"ava": "^1.4.1",
"make-dir": "^2.1.0",
"tempy": "^0.2.1",
"tsd": "^0.7.1",
"xo": "^0.24.0"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"files": [
"index.js"
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/sindresorhus/del#readme",
"keywords": [
@@ -87,7 +90,7 @@
"url": "git+https://github.com/sindresorhus/del.git"
},
"scripts": {
"test": "xo && ava"
"test": "xo && ava && tsd"
},
"version": "3.0.0"
"version": "4.1.1"
}

24
node_modules/del/readme.md generated vendored
View File

@@ -1,4 +1,4 @@
# del [![Build Status](https://travis-ci.org/sindresorhus/del.svg?branch=master)](https://travis-ci.org/sindresorhus/del) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
# del [![Build Status](https://travis-ci.org/sindresorhus/del.svg?branch=master)](https://travis-ci.org/sindresorhus/del) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)
> Delete files and folders using [globs](https://github.com/isaacs/minimatch#usage)
@@ -15,7 +15,7 @@ Similar to [rimraf](https://github.com/isaacs/rimraf), but with a Promise API an
## Install
```
$ npm install --save del
$ npm install del
```
@@ -24,9 +24,11 @@ $ npm install --save del
```js
const del = require('del');
del(['tmp/*.js', '!tmp/unicorn.js']).then(paths => {
console.log('Deleted files and folders:\n', paths.join('\n'));
});
(async () => {
const deletedPaths = await del(['tmp/*.js', '!tmp/unicorn.js']);
console.log('Deleted files and folders:\n', deletedPaths.join('\n'));
})();
```
@@ -61,11 +63,11 @@ Returns an array of deleted paths.
#### patterns
Type: `string` `Array`
Type: `string` `string[]`
See supported minimatch [patterns](https://github.com/isaacs/minimatch#usage).
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test.js)
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test/test.js)
- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)
#### options
@@ -91,9 +93,11 @@ See what would be deleted.
```js
const del = require('del');
del(['tmp/*.js'], {dryRun: true}).then(paths => {
console.log('Files and folders that would be deleted:\n', paths.join('\n'));
});
(async () => {
const deletedPaths = await del(['tmp/*.js'], {dryRun: true});
console.log('Files and folders that would be deleted:\n', deletedPaths.join('\n'));
})();
```
##### concurrency