From cc6f165f2d1c4bb4c8c152bbf8fb9a54ec143e97 Mon Sep 17 00:00:00 2001 From: Ng Yik Phang Date: Fri, 12 Jan 2018 14:41:59 +0800 Subject: [PATCH] Use HTTPS for npm package.json auto-complete Fixes https://github.com/Microsoft/vscode/issues/41511 --- extensions/javascript/src/features/packageJSONContribution.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/javascript/src/features/packageJSONContribution.ts b/extensions/javascript/src/features/packageJSONContribution.ts index ca9222dc0a3..e4b35802ecd 100644 --- a/extensions/javascript/src/features/packageJSONContribution.ts +++ b/extensions/javascript/src/features/packageJSONContribution.ts @@ -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 { - 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 -- GitLab