diff --git a/.eslintrc.json b/.eslintrc.json index a709891..49588b4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,6 +4,7 @@ "rules": { "capitalized-comments": 0, "no-void": 0, + "no-undef": 0, "@typescript-eslint/no-floating-promises": 0, "@typescript-eslint/no-var-requires": 0, "@typescript-eslint/no-implicit-any-catch": 0, diff --git a/package-lock.json b/package-lock.json index 348156a..2bfc857 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,6 @@ "inquirer": "^7.3.3", "json-schema-defaults": "0.4.0", "json-schema-to-typescript": "11.0.3", - "node-fetch": "^2.0.0", "npm-package-arg": "6.1.0", "rimraf": "2.6.3", "semver": "5.7.0", @@ -31,7 +30,6 @@ "@types/hosted-git-info": "2.7.0", "@types/inquirer": "^7.3.1", "@types/node": "18", - "@types/node-fetch": "^2.6.2", "@types/npm-package-arg": "6.1.0", "@types/rimraf": "2.0.2", "@types/semver": "5.5.0", @@ -1177,17 +1175,6 @@ "undici-types": "~5.26.4" } }, - "node_modules/@types/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "form-data": "^4.0.0" - } - }, "node_modules/@types/npm-package-arg": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@types/npm-package-arg/-/npm-package-arg-6.1.0.tgz", @@ -2844,21 +2831,6 @@ "node": "*" } }, - "node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -3995,26 +3967,6 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -5301,12 +5253,6 @@ "node": ">=8.0" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" - }, "node_modules/tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", @@ -5666,22 +5612,6 @@ } } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index a9a7400..c80d148 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "inquirer": "^7.3.3", "json-schema-defaults": "0.4.0", "json-schema-to-typescript": "11.0.3", - "node-fetch": "^2.0.0", "npm-package-arg": "6.1.0", "rimraf": "2.6.3", "semver": "5.7.0", @@ -51,7 +50,6 @@ "@types/hosted-git-info": "2.7.0", "@types/inquirer": "^7.3.1", "@types/node": "18", - "@types/node-fetch": "^2.6.2", "@types/npm-package-arg": "6.1.0", "@types/rimraf": "2.0.2", "@types/semver": "5.5.0", diff --git a/src/commands/setup.ts b/src/commands/setup.ts index 2cf3b7c..524571e 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -7,7 +7,6 @@ import semver from "semver"; import fs from "fs"; import fetchTags from "../lib/fetch-tags"; import { Command } from "commander"; -import fetch from "node-fetch"; import tar from "tar"; import stream from "stream/promises"; diff --git a/src/lib/util.ts b/src/lib/util.ts index 3733b05..47ebbcf 100644 --- a/src/lib/util.ts +++ b/src/lib/util.ts @@ -1,6 +1,5 @@ import fs from "fs"; import path from "path"; -import fetch from "node-fetch"; import semver from "semver"; export default { @@ -96,7 +95,7 @@ export default { ); } - return res.json(); + return res.json() as Promise; }, };