Skip to content

chore(build): Use nx run-many instead of lerna run#1738

Merged
Tobbe merged 1 commit into
mainfrom
tobbe-chore-no-lerna-run
May 10, 2026
Merged

chore(build): Use nx run-many instead of lerna run#1738
Tobbe merged 1 commit into
mainfrom
tobbe-chore-no-lerna-run

Conversation

@Tobbe
Copy link
Copy Markdown
Member

@Tobbe Tobbe commented May 10, 2026

The "build:watch" script was the only script still using lerna. Update it to also use nx as the other scripts that executes package-level scripts.

Also gets rid of the tsc --build part which was effectively dead code. The first part of the command chain launched watch scripts that never exits. They stay running to watch for changes. So the first part of the command chain never exits, making the second part never execute.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 10, 2026

Deploy Preview for cedarjs canceled.

Name Link
🔨 Latest commit 99f61fe
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/6a00816fdcdfa0000866bd82

@github-actions github-actions Bot added this to the chore milestone May 10, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 10, 2026

Greptile Summary

This PR migrates the build:watch script in the root package.json from lerna run build:watch --parallel; tsc --build to nx run-many -t build:watch, aligning it with the rest of the monorepo's build scripts which already use Nx.

  • The dropped tsc --build step is effectively a no-op in practice: because build:watch spawns long-running watch processes, the semicolon-chained tsc --build would only execute after all watchers exit, which doesn't happen during normal development.
  • The new invocation follows the same pattern as existing scripts (build, build:pack, check:package), and Nx's run-many runs tasks in parallel by default, preserving the concurrency of the old --parallel flag.

Confidence Score: 5/5

Safe to merge — the change is a straightforward script migration with no functional regression.

The only behavioral difference is dropping tsc --build, which was chained with ; after long-running watch processes and therefore never executed in practice. The new nx run-many -t build:watch command matches the pattern of every other build script in the file and benefits from Nx's built-in parallelism.

No files require special attention.

Important Files Changed

Filename Overview
package.json Replaces lerna run build:watch --parallel; tsc --build with nx run-many -t build:watch, consistent with other scripts in the file; no functional regression.

Reviews (1): Last reviewed commit: "chore(build): Use nx run-many instead of..." | Re-trigger Greptile

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 10, 2026

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 99f61fe

Command Status Duration Result
nx run-many -t build:pack --exclude create-ceda... ✅ Succeeded 7s View ↗
nx run-many -t build ✅ Succeeded 3m 12s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-10 13:56:57 UTC

@Tobbe Tobbe enabled auto-merge (squash) May 10, 2026 13:03
@Tobbe Tobbe merged commit c2ec2c4 into main May 10, 2026
125 of 131 checks passed
@Tobbe Tobbe deleted the tobbe-chore-no-lerna-run branch May 10, 2026 14:03
@github-actions
Copy link
Copy Markdown

The changes in this PR are now available on npm.

Try them out by running yarn cedar upgrade -t 5.0.0-canary.13908

Or try it in a new app with yarn dlx create-cedar-app@5.0.0-canary.13908

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