add comment

This commit is contained in:
silverwind 2024-04-26 14:47:04 +02:00
parent 04695bc990
commit 265bb8621c
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443
1 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,9 @@ const files = [
const rootPath = fileURLToPath(new URL('..', import.meta.url));
let hadErrors = false;
// This checks that all "resolved" URLs in package-lock.json point to the official npm registry.
// If a user is using a npm proxy (private or public), they would write that proxy's URL into
// the file which we do not want because it could cause issues during installation.
for (const file of files.map((file) => fileURLToPath(new URL(file, import.meta.url)))) {
const data = JSON.parse(readFileSync(file));
for (const [pkg, {resolved}] of Object.entries(data.packages)) {