Remove some unused deps and dead code (#50367)

This commit is contained in:
Jake Bailey
2022-08-19 09:42:14 -07:00
committed by GitHub
parent 5969ae9ef7
commit ef88fbb8ab
4 changed files with 2 additions and 90 deletions

View File

@@ -8,7 +8,6 @@ const del = require("del");
const rename = require("gulp-rename");
const concat = require("gulp-concat");
const merge2 = require("merge2");
const mkdirp = require("mkdirp");
const { src, dest, task, parallel, series, watch } = require("gulp");
const { append, transform } = require("gulp-insert");
const { prependFile } = require("./scripts/build/prepend");
@@ -27,9 +26,10 @@ task("scripts").description = "Builds files in the 'scripts' folder.";
const cleanScripts = () => cleanProject("scripts");
cleanTasks.push(cleanScripts);
/** @type {{ libs: string[]; paths: Record<string, string | undefined>; }} */
const libraries = readJson("./src/lib/libs.json");
const libs = libraries.libs.map(lib => {
const relativeSources = ["header.d.ts"].concat(libraries.sources && libraries.sources[lib] || [lib + ".d.ts"]);
const relativeSources = ["header.d.ts", lib + ".d.ts"];
const relativeTarget = libraries.paths && libraries.paths[lib] || ("lib." + lib + ".d.ts");
const sources = relativeSources.map(s => path.posix.join("src/lib", s));
const target = `built/local/${relativeTarget}`;

81
package-lock.json generated
View File

@@ -16,7 +16,6 @@
"@octokit/rest": "latest",
"@types/async": "latest",
"@types/chai": "latest",
"@types/convert-source-map": "latest",
"@types/fs-extra": "^9.0.13",
"@types/glob": "latest",
"@types/gulp": "^4.0.9",
@@ -26,14 +25,12 @@
"@types/gulp-sourcemaps": "latest",
"@types/merge2": "latest",
"@types/microsoft__typescript-etw": "latest",
"@types/minimatch": "latest",
"@types/minimist": "latest",
"@types/mkdirp": "latest",
"@types/mocha": "latest",
"@types/ms": "latest",
"@types/node": "latest",
"@types/node-fetch": "^2.6.2",
"@types/q": "latest",
"@types/source-map-support": "latest",
"@types/xml2js": "^0.4.11",
"@typescript-eslint/eslint-plugin": "^5.28.0",
@@ -43,7 +40,6 @@
"azure-devops-node-api": "^11.1.1",
"chai": "latest",
"chalk": "^4.1.2",
"convert-source-map": "latest",
"del": "6.1.1",
"diff": "^5.1.0",
"eslint": "8.17.0",
@@ -68,11 +64,9 @@
"ms": "^2.1.3",
"node-fetch": "^2.6.7",
"prex": "^0.4.7",
"q": "latest",
"source-map-support": "latest",
"typescript": "^4.5.5",
"vinyl": "latest",
"vinyl-sourcemaps-apply": "latest",
"which": "^2.0.2",
"xml2js": "^0.4.23"
},
@@ -448,12 +442,6 @@
"integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==",
"dev": true
},
"node_modules/@types/convert-source-map": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@types/convert-source-map/-/convert-source-map-1.5.2.tgz",
"integrity": "sha512-tHs++ZeXer40kCF2JpE51Hg7t4HPa18B1b1Dzy96S0eCw8QKECNMYMfwa1edK/x8yCN0r4e6ewvLcc5CsVGkdg==",
"dev": true
},
"node_modules/@types/expect": {
"version": "1.20.4",
"resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz",
@@ -614,12 +602,6 @@
"form-data": "^3.0.0"
}
},
"node_modules/@types/q": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz",
"integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==",
"dev": true
},
"node_modules/@types/source-map-support": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.4.tgz",
@@ -6571,16 +6553,6 @@
"node": ">=6"
}
},
"node_modules/q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==",
"dev": true,
"engines": {
"node": ">=0.6.0",
"teleport": ">=0.2.0"
}
},
"node_modules/qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
@@ -8337,24 +8309,6 @@
"node": ">=0.10.0"
}
},
"node_modules/vinyl-sourcemaps-apply": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz",
"integrity": "sha512-+oDh3KYZBoZC8hfocrbrxbLUeaYtQK7J5WU5Br9VqWqmCll3tFJqKp97GC9GmMsVIL0qnx2DgEDVxdo5EZ5sSw==",
"dev": true,
"dependencies": {
"source-map": "^0.5.1"
}
},
"node_modules/vinyl-sourcemaps-apply/node_modules/source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
@@ -8903,12 +8857,6 @@
"integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==",
"dev": true
},
"@types/convert-source-map": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@types/convert-source-map/-/convert-source-map-1.5.2.tgz",
"integrity": "sha512-tHs++ZeXer40kCF2JpE51Hg7t4HPa18B1b1Dzy96S0eCw8QKECNMYMfwa1edK/x8yCN0r4e6ewvLcc5CsVGkdg==",
"dev": true
},
"@types/expect": {
"version": "1.20.4",
"resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz",
@@ -9069,12 +9017,6 @@
"form-data": "^3.0.0"
}
},
"@types/q": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz",
"integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==",
"dev": true
},
"@types/source-map-support": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.4.tgz",
@@ -13700,12 +13642,6 @@
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true
},
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==",
"dev": true
},
"qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
@@ -15109,23 +15045,6 @@
}
}
},
"vinyl-sourcemaps-apply": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz",
"integrity": "sha512-+oDh3KYZBoZC8hfocrbrxbLUeaYtQK7J5WU5Br9VqWqmCll3tFJqKp97GC9GmMsVIL0qnx2DgEDVxdo5EZ5sSw==",
"dev": true,
"requires": {
"source-map": "^0.5.1"
},
"dependencies": {
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==",
"dev": true
}
}
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",

View File

@@ -32,7 +32,6 @@
"@octokit/rest": "latest",
"@types/async": "latest",
"@types/chai": "latest",
"@types/convert-source-map": "latest",
"@types/fs-extra": "^9.0.13",
"@types/glob": "latest",
"@types/gulp": "^4.0.9",
@@ -42,14 +41,12 @@
"@types/gulp-sourcemaps": "latest",
"@types/merge2": "latest",
"@types/microsoft__typescript-etw": "latest",
"@types/minimatch": "latest",
"@types/minimist": "latest",
"@types/mkdirp": "latest",
"@types/mocha": "latest",
"@types/ms": "latest",
"@types/node": "latest",
"@types/node-fetch": "^2.6.2",
"@types/q": "latest",
"@types/source-map-support": "latest",
"@types/xml2js": "^0.4.11",
"@typescript-eslint/eslint-plugin": "^5.28.0",
@@ -59,7 +56,6 @@
"azure-devops-node-api": "^11.1.1",
"chai": "latest",
"chalk": "^4.1.2",
"convert-source-map": "latest",
"del": "6.1.1",
"diff": "^5.1.0",
"eslint": "8.17.0",
@@ -84,11 +80,9 @@
"ms": "^2.1.3",
"node-fetch": "^2.6.7",
"prex": "^0.4.7",
"q": "latest",
"source-map-support": "latest",
"typescript": "^4.5.5",
"vinyl": "latest",
"vinyl-sourcemaps-apply": "latest",
"which": "^2.0.2",
"xml2js": "^0.4.23"
},

View File

@@ -1,5 +1,4 @@
// @ts-check
const gulp = require("gulp");
const del = require("del");
const fs = require("fs");
const os = require("os");