Use shrinkwrap for package locking (#8298)

This commit is contained in:
Tommaso Sciortino
2025-09-12 13:26:55 -07:00
committed by GitHub
parent c15774ce68
commit 21826010ef
8 changed files with 10 additions and 8 deletions

View File

@@ -94,7 +94,7 @@ function collectDependencies(packageName, packageLock, dependenciesMap) {
const packageInfo = packageLock.packages[`node_modules/${packageName}`];
if (!packageInfo) {
console.warn(
`Warning: Could not find package info for ${packageName} in package-lock.json.`,
`Warning: Could not find package info for ${packageName} in npm-shrinkwrap.json.`,
);
return;
}
@@ -114,7 +114,7 @@ async function main() {
const packageJsonContent = await fs.readFile(packageJsonPath, 'utf-8');
const packageJson = JSON.parse(packageJsonContent);
const packageLockJsonPath = path.join(projectRoot, 'package-lock.json');
const packageLockJsonPath = path.join(projectRoot, 'npm-shrinkwrap.json');
const packageLockJsonContent = await fs.readFile(
packageLockJsonPath,
'utf-8',