Skip to content

fix(release): restore packages/devkit/package.json after release#35598

Merged
FrozenPandaz merged 2 commits into
nrwl:masterfrom
FrozenPandaz:release-reset-devkit-package-json
May 6, 2026
Merged

fix(release): restore packages/devkit/package.json after release#35598
FrozenPandaz merged 2 commits into
nrwl:masterfrom
FrozenPandaz:release-reset-devkit-package-json

Conversation

@FrozenPandaz
Copy link
Copy Markdown
Contributor

Current Behavior

After running nx-release locally, packages/devkit/package.json is left modified in the working tree.

The nx-release.ts script snapshots and restores the source package.json for every package whose source folder is the publish root (so the temporary edits made during nx release version — real version, expanded workspace:* deps, etc. — don't leak into the working tree). The list of those packages lives in packagesToReset near the top of scripts/nx-release.ts.

When @nx/devkit was migrated to publish from its source folder in #34946, it was not added to that list, so its source package.json is no longer restored.

Expected Behavior

packages/devkit/package.json is restored to its committed contents after nx-release finishes (or is interrupted), matching the behavior already in place for nx, dotnet, maven, angular-rspack, and angular-rspack-compiler.

Related Issue(s)

N/A — internal release-tooling fix.

Devkit was migrated to publish from its source folder (packages/devkit)
in nrwl#34946, but it was not added to the packagesToReset snapshot/restore
list in scripts/nx-release.ts. As a result, the source package.json is
left modified in the working tree after running a release locally.

Also note this gotcha in the dist-build-migration skill so future
migrations don't forget the same step.
@FrozenPandaz FrozenPandaz requested a review from a team as a code owner May 6, 2026 18:34
@FrozenPandaz FrozenPandaz requested a review from leosvelperez May 6, 2026 18:34
@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5e798b0

@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

👷 Deploy request for nx-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5e798b0

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented May 6, 2026

View your CI Pipeline Execution ↗ for commit 5e798b0

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 45m 42s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 18s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 25s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 7s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-06 20:50:00 UTC

@FrozenPandaz FrozenPandaz merged commit 49955f4 into nrwl:master May 6, 2026
18 checks passed
@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 May 12, 2026
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.

2 participants