Skip to content

chore: upgrade nx 21.6.11 → 23.1.1, fix CI nx version - #59

Merged
ThePlenkov merged 1 commit into
mainfrom
chore/nx-23
Aug 13, 2026
Merged

ThePlenkov merged 1 commit into
mainfrom
chore/nx-23

Conversation

@ThePlenkov

@ThePlenkov ThePlenkov commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Upgrade nx from 21.6.11 to 23.1.1 (latest)
  • Fix CI: remove bunx nx@21.0.0 pinning — use nx from bun install
  • No migrations required (nx migrate latest reports none)

Why

CI was downloading nx 21.0.0 on every run instead of using the pinned devDependency (21.6.11). After this PR, CI uses the exact nx version from bun.lock. Stack branches will pick up nx 23 automatically when they rebase onto main.

Test plan

  • nx affected -t build passes (16 projects)
  • nx affected -t test passes
  • nx affected -t lint passes (16 projects)
  • CI green on this PR

Generated with Devin


Summary by cubic

Upgrades nx from 21.6.11 to 23.1.1 and makes CI use the installed nx instead of pinning bunx nx@21.0.0, ensuring consistent versions across local and CI.

  • Update package.json to nx ^23.1.1 and refresh bun.lock.
  • Replace bunx nx@21.0.0 with nx in CI (affected -t build, affected -t lint test, fix-ci) so jobs use the version from bun install.
  • No nx migrate changes were generated; no repo migrations are required.
  • After rebasing onto main, run bun install to pick up nx 23.1.1 before running nx tasks.

Written for commit e8b2cdb. Summary will update on new commits.

Review in cubic

CI was pinning bunx nx@21.0.0 — an older version than the devDependency.
Now uses nx from bun install (no bunx, no version pin). nx 23 has no
required migrations for this repo.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ThePlenkov, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b9e439a7-e545-4518-81b2-c45e6d7b9dad

📥 Commits

Reviewing files that changed from the base of the PR and between fac5bae and e8b2cdb.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • package.json

Comment @coderabbitai help to get the list of available commands.

@baz-reviewer

baz-reviewer Bot commented Aug 13, 2026

Copy link
Copy Markdown

Merger

Waiting for CI and review to complete.

Commit e8b2cdb · Updated 2026-08-13 16:04 UTC

Review this PR on Baz | Customize your next review

@ThePlenkov
ThePlenkov merged commit 15f29ae into main Aug 13, 2026
5 of 7 checks passed
@cubic-dev-ai

cubic-dev-ai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Running ultrareview automatically — Major Nx upgrade (21→23) and CI now uses local nx could affect all projects' builds/tests/lints — high risk of subtle breakage.. I'll post findings when complete.

@ThePlenkov
ThePlenkov deleted the chore/nx-23 branch August 13, 2026 16:05

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The nx upgrade from 21.6.11 to 23.1.1 and CI configuration changes are implemented correctly. The removal of hardcoded bunx nx@21.0.0 version pinning in CI aligns with the PR goal of using the exact nx version from bun.lock. All changed files are consistent with the upgrade, and no blocking defects were identified.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@sonarqubecloud

Copy link
Copy Markdown

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 high

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
Security 1 high

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Upgrade Nx to 23.1.1 and use locally installed Nx in CI

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Upgrade Nx to 23.1.1 and refresh Bun lockfile resolutions.
• Update CI to run Nx from installed dependencies (remove bunx nx@21.0.0).
• Ensure CI uses the exact Nx version pinned by bun.lock.
Diagram

graph TD
  CI["GitHub Actions CI"] --> Install["bun install"] --> NxBin["Local nx binary"] --> Tasks["nx affected (build/lint/test)"] --> Fix["nx fix-ci"]
  Lock[("bun.lock")] --> Install
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use `bunx nx ...` (no version pin)
  • ➕ Typically guarantees execution via Bun's runner (no PATH surprises)
  • ➕ Still avoids downloading an older pinned Nx version
  • ➕ Aligns with the previous CI invocation style
  • ➖ Still conceptually tied to an executor that may fetch packages if local resolution fails
  • ➖ Less explicit that CI must use the installed lockfile version
2. Use `bun run nx ...` via package scripts
  • ➕ Most deterministic way to ensure node_modules/.bin is on PATH
  • ➕ Allows centralizing Nx invocation flags in package.json scripts
  • ➖ Requires adding/maintaining scripts (small repo-wide convention change)
  • ➖ May be seen as extra indirection for simple CI steps
3. Pin Nx exactly in package.json (no caret)
  • ➕ Prevents accidental minor/patch upgrades when regenerating locks
  • ➕ Makes tooling version policy explicit
  • ➖ More manual updates; less flexibility for automated upgrades
  • ➖ bun.lock already provides practical pinning in CI when frozen

Recommendation: The PR’s direction (single source of truth via bun.lock + removing an explicit older Nx pin) is sound. The only strategic check: confirm nx resolves in GitHub Actions shells as expected; if PATH resolution is flaky, switch the CI steps to bunx nx ... (without a version) or bun run nx ... to make the execution environment deterministic.

Files changed (3) +78 / -64

Other (3) +78 / -64
ci.ymlRun Nx in CI without bunx version pin +3/-3

Run Nx in CI without bunx version pin

• Removes 'bunx nx@21.0.0' usage and runs 'nx' directly for affected build/lint/test and 'nx fix-ci'. This makes CI rely on the Nx version installed from the repo dependencies instead of downloading an older version each run.

.github/workflows/ci.yml

bun.lockRefresh lockfile for Nx 23.1.1 upgrade +74/-60

Refresh lockfile for Nx 23.1.1 upgrade

• Updates the locked Nx package from 21.6.11 to 23.1.1 and adjusts the transitive dependency graph accordingly. Ensures CI and local installs resolve the upgraded Nx toolchain consistently.

bun.lock

package.jsonBump Nx devDependency to ^23.1.1 +1/-1

Bump Nx devDependency to ^23.1.1

• Updates the Nx devDependency range from 21.6.11 to ^23.1.1. This drives the lockfile refresh and aligns developer tooling with the upgraded Nx version.

package.json

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This Pull Request is currently not up to standards. The modifications to the CI workflow will likely cause the build to fail because the 'nx' command is not available in the runner's PATH by default. Additionally, the update to 'package.json' introduces a non-pinned dependency version, which contradicts project policy and has been flagged as a quality issue. These items must be resolved to ensure CI stability and build reproducibility.

About this PR

  • The move away from pinned global binaries in CI is positive for consistency, but the current implementation relies on the 'nx' binary being in the system PATH. This requires an executor like 'bunx' or 'bun run' to correctly resolve the binary from node_modules.

Test suggestions

  • CI build step executes using the workspace Nx version
  • CI lint and test steps execute using the workspace Nx version
  • CI fix-ci step executes using the workspace Nx version
  • Nx dependency is correctly updated in package.json

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread package.json
"@types/node": "24.13.3",
"eslint": "9.39.5",
"nx": "21.6.11",
"nx": "^23.1.1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH RISK

Specify an exact version for 'nx' to maintain consistency with the existing dependency management strategy in this project and ensure build reproducibility across all environments.

Suggested change
"nx": "^23.1.1",
"nx": "23.1.1",

See Issue in Codacy

Comment thread .github/workflows/ci.yml
Comment on lines +32 to +34
- run: nx affected -t build
- run: nx affected -t lint test
- run: nx fix-ci

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH RISK

The nx command will not be found in the runner's PATH. Use bunx nx to execute the local version.

Try running the following prompt in your coding agent:

Prepend bunx to all nx commands in .github/workflows/ci.yml (lines 32-34) to ensure they use the local version installed in node_modules.

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. CI can't find nx 🐞 Bug ☼ Reliability
Description
The CI workflow now runs nx ... directly, but the job does not add node_modules/.bin to PATH or
use bunx/bun run, so the steps can fail with nx: command not found even after bun install.
This prevents build/lint/test from running in CI.
Code

.github/workflows/ci.yml[R32-34]

+      - run: nx affected -t build
+      - run: nx affected -t lint test
+      - run: nx fix-ci
Relevance

●●● Strong

CI reliability fix; team recently accepted multiple GitHub Actions hardening/reproducibility fixes
in workflows.

PR-#30
PR-#31

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The workflow calls nx as a bare command and does not add node_modules/.bin to PATH or wrap the
command with bunx/bun run, so Nx may not be resolvable in a GitHub Actions shell step.

.github/workflows/ci.yml[26-35]
package.json[7-13]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
CI invokes `nx` directly in `.github/workflows/ci.yml`, but the workflow does not ensure local binaries from `node_modules/.bin` are on `PATH`. This can cause `nx: command not found` and fail the job.

## Issue Context
The workflow installs dependencies with `bun install --frozen-lockfile`, but subsequent `run:` steps execute in a plain shell context.

## Fix
Update the workflow to execute Nx through Bun so it reliably resolves the local devDependency binary:
- Replace `nx ...` with `bunx nx ...` (preferred, keeps “use local nx” intent), or
- Replace with `bun run <script>` equivalents, or
- Export `PATH=$GITHUB_WORKSPACE/node_modules/.bin:$PATH` before calling `nx`.

## Fix Focus Areas
- .github/workflows/ci.yml[26-35]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context
✅ Compliance rules (platform): 8 rules
Review mode: ⚖️ Balanced: This is a runtime/toolchain and CI behavior change with a major Nx upgrade and broad dependency graph updates; it carries genuine compatibility and CI risk, but the logic is not dense enough to justify redundant extended passes.

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread .github/workflows/ci.yml
Comment on lines +32 to +34
- run: nx affected -t build
- run: nx affected -t lint test
- run: nx fix-ci

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Ci can't find nx 🐞 Bug ☼ Reliability

The CI workflow now runs nx ... directly, but the job does not add node_modules/.bin to PATH or
use bunx/bun run, so the steps can fail with nx: command not found even after bun install.
This prevents build/lint/test from running in CI.
Agent Prompt
## Issue description
CI invokes `nx` directly in `.github/workflows/ci.yml`, but the workflow does not ensure local binaries from `node_modules/.bin` are on `PATH`. This can cause `nx: command not found` and fail the job.

## Issue Context
The workflow installs dependencies with `bun install --frozen-lockfile`, but subsequent `run:` steps execute in a plain shell context.

## Fix
Update the workflow to execute Nx through Bun so it reliably resolves the local devDependency binary:
- Replace `nx ...` with `bunx nx ...` (preferred, keeps “use local nx” intent), or
- Replace with `bun run <script>` equivalents, or
- Export `PATH=$GITHUB_WORKSPACE/node_modules/.bin:$PATH` before calling `nx`.

## Fix Focus Areas
- .github/workflows/ci.yml[26-35]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant