fix(devkit): restore peer dep range to 2 majors#32406
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit a21b3ab
☁️ Nx Cloud last updated this comment at |
FrozenPandaz
left a comment
There was a problem hiding this comment.
Maybe we can remove quick and dirty from the function name lol
Nah, its encouragement to get a real fix in |
2de32c7 to
825d0f7
Compare
We could prefix it with |
|
@claude change the new function name from quickAndDirty.... to hack... and add a todo for Colum to come back and remove it after peer dep handling is fixed |
|
Claude finished @AgentEnder's task —— View job Task: Rename function and add TODO ✅Todo List:
Changes Made:
The function name now reflects that it's a temporary hack, and there's a clear TODO for Colum to remove it once the proper peer dependency handling is implemented. |
686f522 to
f28794b
Compare
| ); | ||
|
|
||
| const beforeVersion = devkitPackageJson.peerDependencies['nx']; | ||
| if (!beforeVersion.includes('<')) { |
There was a problem hiding this comment.
Consider adding a null check to prevent potential runtime errors. If devkitPackageJson.peerDependencies or devkitPackageJson.peerDependencies['nx'] is undefined, the current code will throw a TypeError.
Suggested change:
if (devkitPackageJson.peerDependencies?.nx && !devkitPackageJson.peerDependencies.nx.includes('<')) {This ensures the code gracefully handles cases where the peer dependency structure might not exist as expected.
| if (!beforeVersion.includes('<')) { | |
| if (devkitPackageJson.peerDependencies?.nx && !devkitPackageJson.peerDependencies.nx.includes('<')) { |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
## Current Behavior Nx release now updates peer dependency versions, which is great... but it broke the peer dep range in the published version of @nx/devkit. ## Expected Behavior @nx/devkit maintains a version range of +/- 1 major version of nx. We will fix release soon. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #31801 (already fixed, but comments on this highlighted the problem) (cherry picked from commit bdb466e)
|
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. |
Current Behavior
Nx release now updates peer dependency versions, which is great... but it broke the peer dep range in the published version of @nx/devkit.
Expected Behavior
@nx/devkit maintains a version range of +/- 1 major version of nx. We will fix release soon.
Related Issue(s)
Fixes #31801 (already fixed, but comments on this highlighted the problem)