Skip to content

Commit c75b393

Browse files
Merge pull request #842 from gjsjohnmurray/fix-841
Switch to `node-fetch-cjs` (fixes #841)
2 parents 5e6af88 + 4ca2a8c commit c75b393

File tree

3 files changed

+12
-97
lines changed

3 files changed

+12
-97
lines changed

package-lock.json

Lines changed: 8 additions & 91 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@
11891189
"glob": "^7.1.6",
11901190
"iconv-lite": "^0.6.0",
11911191
"mkdirp": "^1.0.4",
1192-
"node-fetch": "3.1.1",
1192+
"node-fetch-cjs": "3.1.1",
11931193
"vscode-cache": "^0.3.0",
11941194
"vscode-debugadapter": "^1.41.0",
11951195
"vscode-debugprotocol": "^1.41.0",

src/api/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// import fetch from "node-fetch";
2-
// mod.cjs
3-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
4-
// @ts-ignore
5-
const fetch = (...args) => import("node-fetch").then(({ default: fetch }) => fetch(...args));
1+
// eslint-disable-next-line @typescript-eslint/no-var-requires
2+
const { default: fetch } = require("node-fetch-cjs");
3+
64
import * as httpModule from "http";
75
import * as httpsModule from "https";
86
import * as url from "url";

0 commit comments

Comments
 (0)