mirror of
https://github.com/microsoft/vscode.git
synced 2026-03-01 06:06:04 +00:00
Use HTTPS for npm package.json auto-complete
Fixes https://github.com/Microsoft/vscode/issues/41511
This commit is contained in:
@@ -212,7 +212,7 @@ export class PackageJSONContribution implements IJSONContribution {
|
||||
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']) || location.matches(['optionalDependencies', '*']) || location.matches(['peerDependencies', '*']))) {
|
||||
const currentKey = location.path[location.path.length - 1];
|
||||
if (typeof currentKey === 'string') {
|
||||
const queryUrl = 'http://registry.npmjs.org/' + encodeURIComponent(currentKey).replace('%40', '@');
|
||||
const queryUrl = 'https://registry.npmjs.org/' + encodeURIComponent(currentKey).replace('%40', '@');
|
||||
return this.xhr({
|
||||
url: queryUrl,
|
||||
agent: USER_AGENT
|
||||
@@ -272,7 +272,7 @@ export class PackageJSONContribution implements IJSONContribution {
|
||||
|
||||
private getInfo(pack: string): Thenable<string[]> {
|
||||
|
||||
const queryUrl = 'http://registry.npmjs.org/' + encodeURIComponent(pack).replace('%40', '@');
|
||||
const queryUrl = 'https://registry.npmjs.org/' + encodeURIComponent(pack).replace('%40', '@');
|
||||
return this.xhr({
|
||||
url: queryUrl,
|
||||
agent: USER_AGENT
|
||||
|
||||
Reference in New Issue
Block a user