Merge pull request #41512 from ngyikp/npm-autocomplete-use-https

Use HTTPS for npm package.json auto-complete
pull/41528/head
Martin Aeschlimann 2018-01-12 10:12:25 +01:00 committed by GitHub
commit 0ec0da57c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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