Skip to content

Commit

Permalink
Bump node-fetch from 3.0.0-beta.9 to 3.1.1 (#3264)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Feb 4, 2022
1 parent 0f74cc3 commit 1974466
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 170 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@
"ts-loader": "8.0.18",
"tty": "1.0.1",
"typescript": "4.2.3",
"webpack": "5.26.3",
"webpack": "5.68.0",
"webpack-cli": "4.2.0"
},
"dependencies": {
Expand All @@ -1637,7 +1637,6 @@
"fast-deep-equal": "^3.1.3",
"lru-cache": "6.0.0",
"marked": "^0.8.0",
"node-fetch": "3.0.0-beta.9",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"ssh-config": "^2.0.0-alpha.3",
Expand Down
17 changes: 9 additions & 8 deletions src/authentication/githubServer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fetch, { RequestInit } from 'node-fetch';
import fetch from 'cross-fetch';
import * as vscode from 'vscode';
import Logger from '../common/logger';
import { agent } from '../env/node/net';
Expand Down Expand Up @@ -55,16 +55,17 @@ export class GitHubManager {
}

const uri = vscode.Uri.joinPath(await HostHelper.getApiHost(hostUri), HostHelper.getApiPath(hostUri, path));
const requestInit = {
hostname: uri.authority,
port: 443,
method,
headers,
agent
};

return [
uri,
{
hostname: uri.authority,
port: 443,
method,
headers,
agent,
},
requestInit as RequestInit,
];
}
}
2 changes: 1 addition & 1 deletion src/github/credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Octokit } from '@octokit/rest';
import { ApolloClient, InMemoryCache, NormalizedCacheObject } from 'apollo-boost';
import { setContext } from 'apollo-link-context';
import { createHttpLink } from 'apollo-link-http';
import fetch from 'node-fetch';
import fetch from 'cross-fetch';
import * as vscode from 'vscode';
import Logger from '../common/logger';
import * as PersistentState from '../common/persistentState';
Expand Down
Loading

0 comments on commit 1974466

Please sign in to comment.