-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): refactor lock file parsing and pruning #13864
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
daa3cac
to
b36d029
Compare
b36d029
to
b1ecc3a
Compare
1e8abab
to
6b68cd7
Compare
6b68cd7
to
e4a1427
Compare
e4a1427
to
a198fab
Compare
949dbcd
to
92ce7ae
Compare
c842cea
to
94db30c
Compare
b727299
to
a069798
Compare
cf6d132
to
4a6026a
Compare
4a6026a
to
5533d83
Compare
e2e/node/src/node.test.ts
Outdated
const { combinedOutput: nestCombinedOutput } = await runCLIAsync( | ||
`build ${nestapp} --generatePackageJson` | ||
); | ||
expect(nestCombinedOutput).not.toMatch(/Graph is not consistent/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
packages/nx/package.json
Outdated
@@ -33,6 +33,7 @@ | |||
"homepage": "https://nx.dev", | |||
"dependencies": { | |||
"@parcel/watcher": "2.0.4", | |||
"@pnpm/lockfile-types": "^4.3.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
} | ||
}); | ||
} else { | ||
Object.entries(data.dependencies).forEach(([packageName, snapshot]) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider moving this to a separate file.
|
||
const output: NpmLockFile = { | ||
name: packageJson.name || rootLockFile.name, | ||
version: packageJson.version || '0.0.1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: If there is no version in packageJson
, npm
doesn't produce a version so we should probably do the same.
const child = keyMap.get(searchPath); | ||
if ( | ||
child.data.version === versionRange || | ||
satisfies(child.data.version, versionRange) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for? It shouldn't matter if the version matches.
If the node is there, then it will be depended upon; Correct version or not.
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Progress tracking:
Current Behavior
State of the existing implementation:
Expected Behavior
The goal of the rewriting:
Implementation clarification
Note, due to complexity and differences between PRs, the code is larger than 1000 loc (without warnings, etc.)
We can compress files more, but that would come at the expense of readability.
Related Issue(s)
Fixes #13863
Fixes #14096
Fixes #14275
Fixes #14721
Related to #9761
Related to #14106