Skip to content

fix(devkit): restore peer dep range to 2 majors#32406

Merged
AgentEnder merged 2 commits into
masterfrom
patch-devkit-release
Aug 20, 2025
Merged

fix(devkit): restore peer dep range to 2 majors#32406
AgentEnder merged 2 commits into
masterfrom
patch-devkit-release

Conversation

@AgentEnder
Copy link
Copy Markdown
Member

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)

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Aug 19, 2025 9:45pm

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Aug 19, 2025

View your CI Pipeline Execution ↗ for commit a21b3ab

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 15m 13s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 2m 1s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 6s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 5s View ↗
nx documentation ✅ Succeeded 1m 31s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-20 02:29:26 UTC

Comment thread scripts/nx-release.ts Outdated
Copy link
Copy Markdown
Contributor

@FrozenPandaz FrozenPandaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can remove quick and dirty from the function name lol

@AgentEnder
Copy link
Copy Markdown
Member Author

Maybe we can remove quick and dirty from the function name lol

Nah, its encouragement to get a real fix in

@AgentEnder AgentEnder force-pushed the patch-devkit-release branch from 2de32c7 to 825d0f7 Compare August 19, 2025 15:56
@Coly010
Copy link
Copy Markdown
Contributor

Coly010 commented Aug 19, 2025

Maybe we can remove quick and dirty from the function name lol

Nah, its encouragement to get a real fix in

We could prefix it with hack and add a todo for me

@AgentEnder
Copy link
Copy Markdown
Member Author

@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
Copy link
Copy Markdown
Contributor

claude Bot commented Aug 19, 2025

Claude finished @AgentEnder's task —— View job


Task: Rename function and add TODO ✅

Todo List:

  • Read scripts/nx-release.ts to locate the function
  • Rename function from quickAndDirty... to hack...
  • Add TODO comment for Colum
  • Commit and push changes

Changes Made:

  • Renamed quickAndDirtyFixForDevkitPeerDependencies to hackFixForDevkitPeerDependencies
  • Added TODO comment: // TODO(Coly010): Remove this function once peer dependency handling is properly fixed in nx release
  • Updated function call on line 203

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.


Comment thread scripts/nx-release.ts Outdated
@AgentEnder AgentEnder force-pushed the patch-devkit-release branch from 686f522 to f28794b Compare August 19, 2025 19:02
Comment thread scripts/nx-release.ts
);

const beforeVersion = devkitPackageJson.peerDependencies['nx'];
if (!beforeVersion.includes('<')) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
if (!beforeVersion.includes('<')) {
if (devkitPackageJson.peerDependencies?.nx && !devkitPackageJson.peerDependencies.nx.includes('<')) {

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@AgentEnder AgentEnder merged commit bdb466e into master Aug 20, 2025
6 of 8 checks passed
@AgentEnder AgentEnder deleted the patch-devkit-release branch August 20, 2025 05:10
FrozenPandaz pushed a commit that referenced this pull request Aug 22, 2025
## 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)
@github-actions
Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update @nx/s3-cache to use semver peer deps

3 participants