Skip to content

Commit 1974466

Browse files
Bump node-fetch from 3.0.0-beta.9 to 3.1.1 (#3264)
1 parent 0f74cc3 commit 1974466

File tree

4 files changed

+224
-170
lines changed

4 files changed

+224
-170
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@
16231623
"ts-loader": "8.0.18",
16241624
"tty": "1.0.1",
16251625
"typescript": "4.2.3",
1626-
"webpack": "5.26.3",
1626+
"webpack": "5.68.0",
16271627
"webpack-cli": "4.2.0"
16281628
},
16291629
"dependencies": {
@@ -1637,7 +1637,6 @@
16371637
"fast-deep-equal": "^3.1.3",
16381638
"lru-cache": "6.0.0",
16391639
"marked": "^0.8.0",
1640-
"node-fetch": "3.0.0-beta.9",
16411640
"react": "^16.12.0",
16421641
"react-dom": "^16.12.0",
16431642
"ssh-config": "^2.0.0-alpha.3",

src/authentication/githubServer.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import fetch, { RequestInit } from 'node-fetch';
1+
import fetch from 'cross-fetch';
22
import * as vscode from 'vscode';
33
import Logger from '../common/logger';
44
import { agent } from '../env/node/net';
@@ -55,16 +55,17 @@ export class GitHubManager {
5555
}
5656

5757
const uri = vscode.Uri.joinPath(await HostHelper.getApiHost(hostUri), HostHelper.getApiPath(hostUri, path));
58+
const requestInit = {
59+
hostname: uri.authority,
60+
port: 443,
61+
method,
62+
headers,
63+
agent
64+
};
5865

5966
return [
6067
uri,
61-
{
62-
hostname: uri.authority,
63-
port: 443,
64-
method,
65-
headers,
66-
agent,
67-
},
68+
requestInit as RequestInit,
6869
];
6970
}
7071
}

src/github/credentials.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Octokit } from '@octokit/rest';
77
import { ApolloClient, InMemoryCache, NormalizedCacheObject } from 'apollo-boost';
88
import { setContext } from 'apollo-link-context';
99
import { createHttpLink } from 'apollo-link-http';
10-
import fetch from 'node-fetch';
10+
import fetch from 'cross-fetch';
1111
import * as vscode from 'vscode';
1212
import Logger from '../common/logger';
1313
import * as PersistentState from '../common/persistentState';

0 commit comments

Comments
 (0)