Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Use https URL for accessing NPM registry data #174

Merged
merged 2 commits into from
Dec 25, 2021
Merged
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
4 changes: 2 additions & 2 deletions lib/definitely-typed.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { existsSync, mkdirSync, writeFileSync } from 'fs';
import { get, STATUS_CODES } from "http";
import { get, STATUS_CODES } from "https";
import { homedir } from 'os';
import parseGitConfig = require('parse-git-config');
import { join as joinPaths } from "path";
Expand Down Expand Up @@ -48,7 +48,7 @@ async function getIndex(content: string, packageName: string): Promise<string> {
"(Does not have to be to GitHub, " +
"but prefer linking to a source code repository rather than to a project website.)";
try {
const reg: Registry = JSON.parse(await loadString(`http://registry.npmjs.org/${packageName}`));
const reg: Registry = JSON.parse(await loadString(`https://registry.npmjs.org/${packageName}`));
const { latest } = reg["dist-tags"];
const { homepage } = reg.versions[latest];

Expand Down