Remove 'del' package (#33629)

* Remove 'del' package.

* Resolve tests errors.

* Remove unneeded package.json on vinyl-paths
This commit is contained in:
Nathan Shively-Sanders
2019-03-06 10:18:06 -08:00
committed by GitHub
12 changed files with 11 additions and 199 deletions
+6 -1
View File
@@ -420,6 +420,12 @@
"sourceRepoURL": "git@github.com:KyleAMathews/deepmerge.git",
"asOfVersion": "2.2.0"
},
{
"libraryName": "del",
"typingsPackageName": "del",
"sourceRepoURL": "https://github.com/sindresorhus/del",
"asOfVersion": "4.0.0"
},
{
"libraryName": "delay",
"typingsPackageName": "delay",
@@ -1181,7 +1187,6 @@
"typingsPackageName": "p-limit",
"sourceRepoURL": "https://github.com/sindresorhus/p-limit",
"asOfVersion": "2.2.0"
},
{
"libraryName": "p-map",
-47
View File
@@ -1,47 +0,0 @@
import del = require('del');
let paths = ['build', 'dist/**/*.js'];
del(['tmp/*.js', '!tmp/unicorn.js']);
del(['tmp/*.js', '!tmp/unicorn.js'], { force: true });
del(['tmp/*.js', '!tmp/unicorn.js'], { dryRun: true });
del(['tmp/*.js', '!tmp/unicorn.js'], { concurrency: 20 });
del(['tmp/*.js', '!tmp/unicorn.js'], { cwd: '' });
del(['tmp/*.js', '!tmp/unicorn.js']).then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
del(['tmp/*.js', '!tmp/unicorn.js'], { force: true }).then(
(paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
}
);
del('tmp/*.js');
del('tmp/*.js', { force: true });
del('tmp/*.js', { dryRun: true });
del('tmp/*.js', { concurrency: 20 });
del('tmp/*.js', { cwd: '' });
del('tmp/*.js').then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
del('tmp/*.js', { force: true }).then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
paths = del.sync(['tmp/*.js', '!tmp/unicorn.js']);
paths = del.sync(['tmp/*.js', '!tmp/unicorn.js'], { force: true });
paths = del.sync('tmp/*.js');
paths = del.sync('tmp/*.js', { force: true });
paths = del.sync('tmp/*.js', { dryRun: true });
paths = del.sync('tmp/*.js', { concurrency: 20 });
paths = del.sync('tmp/*.js', { cwd: '' });
const immutable: ReadonlyArray<string> = ['tmp/*.js', '!tmp/unicorn.js'];
const mutable = del(immutable);
const mutablePaths = del.sync(immutable);
mutable.then(paths => paths.push('test'));
mutablePaths.push('test');
-29
View File
@@ -1,29 +0,0 @@
// Type definitions for del 3.0
// Project: https://github.com/sindresorhus/del
// Definitions by: Asana <https://asana.com>
// Aya Morisawa <https://github.com/AyaMorisawa>
// BendingBender <https://github.com/BendingBender>
// Jason Dreyzehner <https://github.com/bitjson>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import glob = require('glob');
declare function del(
patterns: string | ReadonlyArray<string>,
options?: del.Options
): Promise<string[]>;
declare namespace del {
function sync(
patterns: string | ReadonlyArray<string>,
options?: Options
): string[];
interface Options extends glob.IOptions {
force?: boolean;
dryRun?: boolean;
concurrency?: number;
}
}
export = del;
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"del-tests.ts"
]
}
-6
View File
@@ -1,6 +0,0 @@
{
"extends": "dtslint/dt.json",
"rules": {
"dt-header": false
}
}
-37
View File
@@ -1,37 +0,0 @@
import del = require("del");
let paths = ["build", "dist/**/*.js"];
del(["tmp/*.js", "!tmp/unicorn.js"]);
del(["tmp/*.js", "!tmp/unicorn.js"], {force: true});
del(["tmp/*.js", "!tmp/unicorn.js"]).then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
del(["tmp/*.js", "!tmp/unicorn.js"], {force: true}).then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
del("tmp/*.js");
del("tmp/*.js", {force: true});
del("tmp/*.js").then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
del("tmp/*.js", {force: true}).then((paths: string[]) => {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"]);
paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"], {force: true});
paths = del.sync("tmp/*.js");
paths = del.sync("tmp/*.js", {force: true});
paths = del.sync("tmp/*.js", {dryRun: true});
-19
View File
@@ -1,19 +0,0 @@
// Type definitions for del 2.2
// Project: https://github.com/sindresorhus/del
// Definitions by: Asana <https://asana.com>, Aya Morisawa <https://github.com/AyaMorisawa>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import glob = require("glob");
declare function del(patterns: string | string[], options?: del.Options): Promise<string[]>;
declare namespace del {
function sync(patterns: string | string[], options?: Options): string[];
interface Options extends glob.IOptions {
force?: boolean;
dryRun?: boolean;
}
}
export = del;
-28
View File
@@ -1,28 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../../",
"typeRoots": [
"../../"
],
"paths": {
"del": [
"del/v2"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"del-tests.ts"
]
}
-6
View File
@@ -1,6 +0,0 @@
{
"extends": "dtslint/dt.json",
"rules": {
"dt-header": false
}
}
+1 -1
View File
@@ -1,12 +1,12 @@
import * as gulp from 'gulp';
import * as undertaker from 'undertaker';
import * as registry from 'undertaker-registry';
import del = require("del");
const minify: () => any = () => { };
const jade: () => any = () => { };
const someplugin: () => any = () => { };
const promisedDel: (list: string[]) => any = (list) => { };
const del: (pattern: string | string[]) => any = (pattern) => { };
gulp.src('client/templates/*.jade')
.pipe(jade())
+2 -1
View File
@@ -1,6 +1,7 @@
{
"private": true,
"dependencies": {
"rollup": ">=0.60.0"
"del": "*",
"rollup": ">=0.60.0 <1.2.0"
}
}
+2 -1
View File
@@ -1,7 +1,8 @@
import gulp = require('gulp');
import del = require('del');
import paths = require('vinyl-paths');
const del: (pattern: string | string[]) => any = (pattern) => { };
gulp.task('delete', function () {
return gulp.src('app/*')
.pipe(paths(del));