#2

Add Nx

Openashcoftwants to merge intofrom

Summary

Adds Nx for incremental adoption, following Nx's start with an existing project flow. This is task-running + caching only: nx.json is added and nx is added as a devDependency. Existing scripts are left untouched and no plugins are added.

What changed

  • nx.json (new) — Nx workspace config with the build target marked cacheable.
  • package.json — adds an nx devDependency and an empty "nx": {} field. Scripts unchanged.
  • .gitignore — adds .nx/cache, .nx/workspace-data, .nx/migrate-runs.
  • Lockfile — updated by the nx init install step (or, for repos with no package.json, Nx adds a standalone .nx/ install: nx.json, .nx/nxw.js, nx, nx.bat).

Try it

nx build <project-name>     # run a task
nx build <project-name>     # again - instant cache hit
nx run-many -t build test   # run tasks across all projects
nx graph                    # visualize project dependencies

Verification

  • nx init ran non-interactively; --plugins=skip was honored (no plugins in nx.json).
  • Confirmed on a representative repo: nx run-many -t build succeeds, and a second run is a 100% cache hit.

Notes

  • No plugins, no restructuring, no CI changes.
  • Merge this branch to enable Nx; nothing else is required.

This PR was created by an AI agent (OpenHands) on behalf of @ashcoft.



This change is 

Summary by Sourcery

Enable incremental Nx adoption with cached build tasks without changing existing scripts or adding plugins.

New Features:

  • Add Nx workspace support for task running and build caching.

Enhancements:

  • Configure build targets for caching while leaving existing project scripts and structure unchanged.

Build:

  • Add Nx as a development dependency and update the lockfile.

Chores:

  • Ignore Nx-generated cache and workspace files.

Summary by CodeRabbit

  • Chores
    • Updated project build configuration to enable caching for build tasks and support the latest workspace tooling.
    • Added generated workspace data to ignored files so it does not appear among project changes.

Confidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Adds Nx for running tasks and caching build, without changing existing scripts.

  • Developers can run and cache this site's build with Nx.

Reviews (1) · Last reviewed commit: "chore: add Nx" · Reviewed by Greptile

Activity

10
O
d24580a
aviator-app[bot]7d ago

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes. Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This pull request is currently open (not queued).

How to merge

To merge this PR, comment /aviator merge or add the mergequeue label.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.
pullfrog[bot]7d ago

Your Pullfrog Router balance is empty, and this repo has no API key to fall back on. Add Router credit, or connect your own provider key or subscription.

Billing and providers →

  | Rerun failed job ➔ | View workflow run | via Pullfrog

sourcery-ai[bot]7d ago

Reviewer's Guide

Configuration

Add Nx workspace configuration and ignore rules, and declare Nx as a development dependency while recording the installation in the lockfile.

  • .gitignore L39-43
  • nx.json L1-8
  • package-lock.json L8-278, L2166-2350, L3657-3752 (+41 small edits)
  • package.json L11-16, L21-23

Other changes

Files not grouped.

  • package.json L24

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an issue from a review comment by replying to it. You can also reply to a review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment @sourcery-ai summary on the pull request to (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

coderabbitai[bot]7d ago

No actionable comments were generated in the recent review.

Walkthrough

The repository adds Nx as a development dependency, configures build caching, and ignores three Nx workspace paths. The package keyword values remain unchanged.

Changes: Nx workspace setup

Layer / File(s)Summary
Configure Nx workspace
package.json, nx.json, .gitignore
package.json adds Nx version 24.0.6 and an empty nx configuration object. nx.json enables build caching. .gitignore adds three Nx paths. The keyword values are unchanged.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: Minimal · up to d2458

This adds Nx for task caching without changing existing scripts or runtime behavior. No concrete merge-blocking risk was found.

Pre-merge checks: 4

Check nameStatusExplanation
Title checkThe title "Add Nx" names the main change. The PR adds Nx through nx.json, an nx devDependency, an empty nx field in package.json, and Nx cache entries in .gitignore. The title is short and specific, b…
Linked Issues checkCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkCheck skipped because no linked issues were found for this pull request.
Description CheckCheck skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "Add Nx" names the main change. The PR adds Nx through nx.json, an nx devDependency, an empty nx field in package.json, and Nx cache entries in .gitignore. The title is short and specific, but it is brief and does not mention the cacheable build target. That detail is not required for a title.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b487eaf9-8f8d-43b5-b7a4-e812c4f9504b
Commits

Reviewing files that changed from the base of the PR and between bc9bd1662f3fccaae3c65a2e420c351e65f75025 and d24580a72e9ebec82c2fd6203672dd36ce4443e3.

Files ignored due to path filters: 1

  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 3

  • .gitignore
  • nx.json
  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

mergify[bot]7d ago

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request
devin-ai-integration[bot]reviewed7d ago
devin-ai-integration[bot]7d ago

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

sourcery-ai[bot]reviewed7d ago
sourcery-ai[bot]7d ago

Hey - I've found 3 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="nx.json" line_range="4" />
<code_context>
+{
+  "$schema": "./node_modules/nx/schemas/nx-schema.json",
+  "targetDefaults": {
+    "build": {
+      "cache": true
+    }
</code_context>
<issue_to_address>
**Suggested test task does not run**

When the suggested `nx run-many -t build test` command is run, nx has no `test` target: the package scripts define only `start`, `dev`, and `build`, and the Nx config defaults only `build`. The suggested command therefore does not run tests, despite saying it runs both tasks.

Remove `test` from the example or add a real test target before suggesting that command.
</issue_to_address>

### Comment 2
<location path="package.json" line_range="21" />
<code_context>
       "devDependencies": {
-        "live-server": "^1.2.2"
+        "live-server": "^1.2.2",
+        "nx": "24.0.6"
+      }
+    },
</code_context>
<issue_to_address>
**Suggested commands are unavailable**

When a user follows the suggested commands without Nx installed globally, a local `nx` devDependency does not put the `nx` executable on a normal shell’s `PATH`. Users without a globally installed Nx therefore get a command-not-found error when following the suggested commands.

Use `npx nx` in the examples or add npm scripts that invoke the local Nx executable.
</issue_to_address>

### Comment 3
<location path="package.json" line_range="21" />
<code_context>
       "devDependencies": {
-        "live-server": "^1.2.2"
+        "live-server": "^1.2.2",
+        "nx": "24.0.6"
+      }
+    },
</code_context>
<issue_to_address>
**Nx fails on older Node**

When nx commands are run with Node older than 20.12, nx 24 and its dependencies require Node 20.12 or newer, but this package declares no Node version requirement. Developers or build environments still using Node 18 cannot reliably run the newly added Nx commands and see task execution fail.

Declare and document Node >=20.12 (and configure supported build environments accordingly), or use an Nx version compatible with the repository's supported Node versions.
</issue_to_address>

Sourcery assessment

Approval pending. 3 findings to address first.

Blocking findings: nx.json:4, package.json:21, package.json:21


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
codacy-production[bot]1d ago

Up to standards :white_check_mark:

🟢 Issues 0 issues

Results: 0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

MetricResults
Complexity0
Duplication0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.