浏览代码

add comment

pull/30719/head
silverwind 1 个月前
父节点
当前提交
265bb8621c
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      tools/lint-lockfiles.js

+ 3
- 0
tools/lint-lockfiles.js 查看文件

const rootPath = fileURLToPath(new URL('..', import.meta.url)); const rootPath = fileURLToPath(new URL('..', import.meta.url));
let hadErrors = false; 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)))) { for (const file of files.map((file) => fileURLToPath(new URL(file, import.meta.url)))) {
const data = JSON.parse(readFileSync(file)); const data = JSON.parse(readFileSync(file));
for (const [pkg, {resolved}] of Object.entries(data.packages)) { for (const [pkg, {resolved}] of Object.entries(data.packages)) {

正在加载...
取消
保存