Skip to content
Merged
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
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,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 @@ -1628,7 +1628,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