Skip to content

Commit

Permalink
fix: packages have node_modules prefix in lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
smarlhens committed Jan 7, 2023
1 parent 54dd7b1 commit 77443b2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion examples/with-only-dependencies/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/with-only-dev-dependencies/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions examples/with-versions-to-pin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/without-versions-to-pin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const pinDependenciesTasks = ({
}

for (const dependencyName of Object.keys(packageJson[dependencyType])) {
const packageLockDependency = packageLock.packages[dependencyName].version;
const packageLockDependency = packageLock.packages[`node_modules/${dependencyName}`].version;
if (!packageLockDependency) {
continue;
}
Expand Down

0 comments on commit 77443b2

Please sign in to comment.