Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove node-fetch #100

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"root": true,
"extends": ["xo", "xo-typescript", "prettier", "prettier/@typescript-eslint"],
"rules": {
"no-undef": 0,
"capitalized-comments": 0,
"@typescript-eslint/no-floating-promises": 0,
"@typescript-eslint/no-var-requires": 0,
Expand Down
140 changes: 22 additions & 118 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -51,8 +50,7 @@
"@types/hosted-git-info": "2.7.0",
"@types/inquirer": "^7.3.1",
"@types/jest": "^26.0.14",
"@types/node": "16",
"@types/node-fetch": "^2.6.2",
"@types/node": "18",
"@types/npm-package-arg": "6.1.0",
"@types/rimraf": "2.0.2",
"@types/semver": "5.5.0",
Expand Down
1 change: 0 additions & 1 deletion src/commands/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
3 changes: 1 addition & 2 deletions src/lib/util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import fs from 'fs';
import path from 'path';
import fetch from 'node-fetch';
import semver from 'semver';

export default {
Expand Down Expand Up @@ -85,7 +84,7 @@ export default {
throw new Error(`Failed to fetch NodeCG release information from npm, status code ${res.status}`);
}

return res.json();
return res.json() as Promise<NPMRelease>;
},
};

Expand Down
Loading