Skip to content

Improvements#480

Open
TriPSs wants to merge 3 commits into
masterfrom
improvements
Open

Improvements#480
TriPSs wants to merge 3 commits into
masterfrom
improvements

Conversation

@TriPSs

@TriPSs TriPSs commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Updated project and package metadata for newer Nx-compatible tooling.
    • Added a few generated/build-related paths to ignore lists.
    • Disabled analytics in workspace configuration.
    • Bumped the release marker value.
  • Refactor
    • Adjusted translations plugin integration to match the current node creation API.
    • Updated a few build-related implementations to use public package entry points.

TriPSs added 2 commits June 26, 2026 12:13
- Updated `@nx/*` packages and `nx` to `23.0.1` in `package.json`.
- Synchronized dependency changes in `yarn.lock`.

BREAKING CHANGE: Updated to Nx v23
… implementation

- Adjusted `webpackExecutor` import path to reflect latest structure in `@nx/webpack`.
- Replaced redundant `ExecutorContext` import with existing `@nx/devkit` re-export.
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Workspace ignore rules and Nx analytics settings were updated, root and package manifests moved to Nx 23-compatible versions, and selected GCP Functions, Translations, Vercel, and shadcn-ui code paths were adjusted to newer Nx import and type forms.

Changes

Nx 23 upgrade

Layer / File(s) Summary
Workspace config
.gitignore, .prettierignore, nx.json, force-release
Ignore patterns expand for new Nx-related directories, nx.json disables analytics, and force-release changes from 19 to 20.
Dependency bumps
package.json, packages/*/package.json
Root dependencies move to Nx 23.0.1 and Jest 30.3.0, and package manifests update @nx/devkit/@nx/workspace ranges to 23.x.
GCP Functions build flow
packages/gcp-functions/src/executors/build/build.impl.ts, packages/gcp-functions/src/utils/generate-package-json.ts
The GCP Functions build executor and package JSON helper switch to public Nx webpack/devkit import paths.
Translations plugin migration
packages/translations/src/plugins/plugin.ts
The translations plugin exports createNodes with V1 CreateNodes and CreateNodesContext types.
Executor and generator cleanup
packages/vercel/src/executors/build/build.impl.ts, packages/shadcn-ui/src/generators/init/init.impl.ts
The Vercel build executor uses public Nx import paths and reformatted calls, and the shadcn-ui init generator reformats imports, getLibRoot, and the clsx key.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • TriPSs/nx-extend#408: Updates the same translations plugin area with the createNodes / CreateNodesContext migration.
  • TriPSs/nx-extend#433: Touches the same Vercel build executor file and nearby Nx import-path code.

Poem

I hopped through ignores by moonlit reed,
and nibbled Nx carrots at coding speed.
With tidy imports, my burrow glows,
23 winds through every row.
Hooray, I stash my linty hay! 🐰

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too vague to convey the main change in this pull request. Use a concise, specific title that mentions the primary update, such as the Nx 23 dependency and related compatibility changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improvements

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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

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

- Updated all `@nx/devkit` peer dependency references from v22.0.0 to v23.0.0 across `yarn.lock`.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (2)
packages/translations/src/plugins/plugin.ts (1)

22-37: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Preserve the plugin option type on CreateNodes and handle undefined options.

CreateNodes is generic; omitting the type parameter defaults the options to unknown. The Nx 23 CreateNodesFunction receives options: T | undefined. The inner callback createTargets and normalizeOptions must explicitly accept undefined to match the runtime behavior where options might not be provided.

♻️ Proposed typing fix
-export const createNodes: CreateNodes = [
+export const createNodes: CreateNodes<TranslationPluginOptions> = [
   '**/.translationsrc.json',
   async (
     configFiles,
-    options: TranslationPluginOptions,
+    options, // Inherits T | undefined from CreateNodesFunction
     context
   ): Promise<CreateNodesResultArray> => {
     return createNodesFromFiles(createTargets, configFiles, options, context)
   }
]

function createTargets(
  projectConfigurationFile: string,
-  options: TranslationPluginOptions,
+  options: TranslationPluginOptions | undefined, // Must handle undefined
  context: CreateNodesContext
): CreateNodesResult {
  // ...
}

- function normalizeOptions(options: TranslationPluginOptions) {
+ function normalizeOptions(options: TranslationPluginOptions | undefined) {
  // ...
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/translations/src/plugins/plugin.ts` around lines 22 - 37, The
createNodes callback is losing its plugin option type because CreateNodes is
used without the generic, and the options parameter is not aligned with Nx 23’s
undefined-at-runtime behavior. Update createNodes in plugin.ts to preserve
TranslationPluginOptions in the CreateNodes type, and make both the inner
callback and createTargets/normalizeOptions explicitly accept
TranslationPluginOptions | undefined so they match CreateNodesFunction and
handle missing options safely.
packages/shadcn-ui/src/generators/init/init.impl.ts (1)

12-12: 📐 Maintainability & Code Quality | 🔵 Trivial

Encapsulate the @nx/devkit/internal import.

Verification confirms that determineProjectNameAndRootOptions is not exposed from the public @nx/devkit entrypoint in Nx 23.x; the /internal path is the only valid resolution given strict exports maps. However, since this entrypoint is explicitly a non-public escape hatch subject to instability, isolate the dependency to prevent scattered churn. Create a local re-export (e.g., init/internal-utils.ts) that wraps this import, ensuring future Nx upgrades only touch this single adapter.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/shadcn-ui/src/generators/init/init.impl.ts` at line 12, Encapsulate
the non-public `@nx/devkit/internal` dependency used by
determineProjectNameAndRootOptions so it is not imported directly from
init.impl.ts. Add a local adapter module such as init/internal-utils.ts that
re-exports this helper, then update init.impl.ts to import from that adapter
instead; this keeps the internal Nx dependency isolated in one place for future
upgrades.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 53-55: The Jest dependencies are out of sync, with jest pinned to
an older version than jest-environment-jsdom and jest-util, so update the jest
package in package.json to match the same 30.4.1 version used by the other Jest
ecosystem packages; keep the versions aligned across the Jest entries to avoid
internal API mismatches.

In `@packages/gcp-functions/src/executors/build/build.impl.ts`:
- Around line 1-2: The build executor currently imports webpackExecutor from an
internal `@nx/webpack` dist path, which will break under Nx 23’s exports
restrictions. Update the build.impl.ts executor to use the public
`@nx/webpack`:webpack target through runExecutor from `@nx/devkit` instead of
calling the internal implementation directly, and adjust any
WebpackExecutorEvent/type usage to rely on public types or inferred executor
output so the `@nx-extend/gcp-functions`:build executor remains compatible.

---

Nitpick comments:
In `@packages/shadcn-ui/src/generators/init/init.impl.ts`:
- Line 12: Encapsulate the non-public `@nx/devkit/internal` dependency used by
determineProjectNameAndRootOptions so it is not imported directly from
init.impl.ts. Add a local adapter module such as init/internal-utils.ts that
re-exports this helper, then update init.impl.ts to import from that adapter
instead; this keeps the internal Nx dependency isolated in one place for future
upgrades.

In `@packages/translations/src/plugins/plugin.ts`:
- Around line 22-37: The createNodes callback is losing its plugin option type
because CreateNodes is used without the generic, and the options parameter is
not aligned with Nx 23’s undefined-at-runtime behavior. Update createNodes in
plugin.ts to preserve TranslationPluginOptions in the CreateNodes type, and make
both the inner callback and createTargets/normalizeOptions explicitly accept
TranslationPluginOptions | undefined so they match CreateNodesFunction and
handle missing options safely.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 12f01c5c-a978-4bf7-a8ce-0d9ede33d8c9

📥 Commits

Reviewing files that changed from the base of the PR and between 28fe5c8 and 3d3383d.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (30)
  • .gitignore
  • .prettierignore
  • force-release
  • nx.json
  • package.json
  • packages/changelog-notify/package.json
  • packages/core/package.json
  • packages/docusaurus/package.json
  • packages/e2e-runner/package.json
  • packages/firebase-hosting/package.json
  • packages/gcp-cloud-run/package.json
  • packages/gcp-deployment-manager/package.json
  • packages/gcp-functions/package.json
  • packages/gcp-functions/src/executors/build/build.impl.ts
  • packages/gcp-functions/src/utils/generate-package-json.ts
  • packages/gcp-secrets/package.json
  • packages/gcp-storage/package.json
  • packages/gcp-task-runner/package.json
  • packages/github-pages/package.json
  • packages/playwright/package.json
  • packages/pulumi/package.json
  • packages/react-email/package.json
  • packages/shadcn-ui/package.json
  • packages/shadcn-ui/src/generators/init/init.impl.ts
  • packages/strapi/package.json
  • packages/terraform/package.json
  • packages/translations/package.json
  • packages/translations/src/plugins/plugin.ts
  • packages/vercel/package.json
  • packages/vercel/src/executors/build/build.impl.ts

Comment thread package.json
Comment on lines +53 to 55
"jest": "30.3.0",
"jest-environment-jsdom": "30.4.1",
"jest-util": "30.4.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.

🩺 Stability & Availability | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

python - <<'PY'
import json
from pathlib import Path

pkg = json.loads(Path("package.json").read_text())
print("repo devDependencies:")
for name in ["jest", "jest-environment-jsdom", "jest-util"]:
    print(f"  {name}: {pkg['devDependencies'].get(name)}")
PY

python - <<'PY'
import json, urllib.request

for name, version in [
    ("jest", "30.3.0"),
    ("jest-environment-jsdom", "30.4.1"),
    ("jest-util", "30.4.1"),
]:
    with urllib.request.urlopen(f"https://registry.npmjs.org/{name}/{version}") as r:
        meta = json.load(r)
    deps = {k: v for k, v in meta.get("dependencies", {}).items() if "jest" in k.lower()}
    print(f"\n{name}@{version}")
    print("peerDependencies:", meta.get("peerDependencies"))
    print("jest-related dependencies:", deps)
PY

Repository: TriPSs/nx-extend

Length of output: 2838


Align the Jest package versions.

jest is pinned to 30.3.0, while jest-environment-jsdom and jest-util are at 30.4.1. Core Jest ecosystem packages rely on strict version alignment for internal APIs and serialization. Mismatched minor versions can cause runtime failures. Update jest to 30.4.1.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 53 - 55, The Jest dependencies are out of sync,
with jest pinned to an older version than jest-environment-jsdom and jest-util,
so update the jest package in package.json to match the same 30.4.1 version used
by the other Jest ecosystem packages; keep the versions aligned across the Jest
entries to avoid internal API mismatches.

Comment on lines +1 to +2
import { ExecutorContext, runExecutor } from '@nx/devkit'
import webpackExecutor, { WebpackExecutorEvent } from '@nx/webpack/dist/src/executors/webpack/webpack.impl'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major

Reference the webpack executor by its public ID rather than importing internal implementation details.

The current import of webpackExecutor from @nx/webpack/dist/src/executors/webpack/webpack.impl accesses a private internal path that is blocked by Nx 23's strict exports map. This will cause resolution failures in the published @nx-extend/gcp-functions:build executor after upgrading to Nx 23, as direct access to dist/src files is no longer supported.

Replace this direct import with a programmatic invocation using runExecutor from @nx/devkit and the public executor specifier @nx/webpack:webpack. If type definitions are required, import WebpackExecutorOptions (or the relevant schema type) directly from @nx/webpack if available, or remove the type dependency by inferring types from the executor output stream.

Recommended correction
import { ExecutorContext, runExecutor } from '`@nx/devkit`'
// Remove: import webpackExecutor, { WebpackExecutorEvent } from '`@nx/webpack/dist/src/executors/webpack/webpack.impl`'

// Instead of calling the implementation function directly:
// const result = await webpackExecutor(options);

// Invoke via the public API:
// const results = await runExecutor({ project: 'project', target: 'build', configuration: '' }, options, context);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/gcp-functions/src/executors/build/build.impl.ts` around lines 1 - 2,
The build executor currently imports webpackExecutor from an internal
`@nx/webpack` dist path, which will break under Nx 23’s exports restrictions.
Update the build.impl.ts executor to use the public `@nx/webpack`:webpack target
through runExecutor from `@nx/devkit` instead of calling the internal
implementation directly, and adjust any WebpackExecutorEvent/type usage to rely
on public types or inferred executor output so the
`@nx-extend/gcp-functions`:build executor remains compatible.

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