Skip to content

chore(repo): deprecate executors with inferred-plugin replacements#35576

Merged
FrozenPandaz merged 20 commits into
masterfrom
deprecate-bundlers
May 8, 2026
Merged

chore(repo): deprecate executors with inferred-plugin replacements#35576
FrozenPandaz merged 20 commits into
masterfrom
deprecate-bundlers

Conversation

@FrozenPandaz
Copy link
Copy Markdown
Contributor

@FrozenPandaz FrozenPandaz commented May 5, 2026

Current Behavior

Most Nx executors that have an inferred-plugin alternative (@nx/<pkg>/plugin) and a convert-to-inferred generator are still wired up like first-class citizens. There is no signal — at scaffold time, schema browsing, or task execution — that they are on a path to removal, and the existing cypress/detox deprecation messages are inconsistent with the canonical pattern shipped most recently.

Expected Behavior

Every executor that has an inferred-plugin migration target is now deprecated through three surfaces, matching the canonical pattern:

  • Runtime warning. The executor logs that it is deprecated, will be removed in Nx v24, and points at nx g @nx/<pkg>:convert-to-inferred.
  • Schema-root x-deprecated. Surfaces in editor / Nx Console / nx show project views.
  • Generation-time warning. When a generator is about to scaffold a target that uses one of these executors because the corresponding inferred plugin isn't registered, it warns at generation time and points at the same migration path.

All warnings link to https://nx.dev/docs/guides/tasks--caching/convert-to-inferred.

Executors deprecated in this PR

Package Executors
@nx/webpack webpack, dev-server
@nx/vite build, dev-server, preview-server
@nx/rollup rollup
@nx/next build, server
@nx/remix build, serve
@nx/jest jest
@nx/playwright playwright
@nx/eslint lint
@nx/storybook storybook, build
@nx/rspack rspack, dev-server
@nx/expo build, export, install, prebuild, run, serve, start, submit
@nx/react-native build-android, build-ios, bundle, pod-install, run-android, run-ios, start, upgrade
@nx/vitest test

Generation-time warnings wired in

  • @nx/<pkg>:configuration for webpack, vite, rollup, jest, playwright, storybook, rspack, vitest
  • @nx/<pkg>:application for next, expo, react-native
  • @nx/eslint:lint-project legacy fallback path
  • @nx/react:application (webpack, rspack branches) and @nx/react:library (rollup legacy fallback) — warning text is inlined rather than imported. Two distinct reasons:
    • rspack: @nx/react does not declare a tsconfig project reference to @nx/rspack, so the deep import would not even type-check.
    • webpack and rollup: the project reference exists, so the deep import compiles, but @nx/webpack and @nx/rollup only expose ./index.js in their package exports field. The import would resolve in source but throw Cannot find module '@nx/<pkg>/src/utils/deprecation' at runtime in published packages.
  • @nx/react-native:web-configuration (webpack) — inline for the same reason as the rspack case (no project reference).

Scope notes

  • @nx/vite:test is intentionally not included — it is being removed entirely by PR feat(vite)!: remove vitest support in favor of @nx/vitest #35517 (deprecation messaging would ship as dead code). @nx/vitest:test is now in scope: the convert-to-inferred generator for @nx/vitest is in place, so the deprecation has a real migration target.
  • @nx/cypress/@nx/detox already shipped earlier; this PR retitles their generation-time messages to the new wording (drop the redundant "register the plugin first" guidance, swap "Scaffolding" for "Generating") and points the detox URL at the general convert-to-inferred guide.
  • @nx/react-native:storybook is intentionally not included. The companion @nx/react-native:storybook-configuration generator was already removed in v21 and no generator has emitted this target since Jan 2024 (RN 0.73 upgrade). It will be removed outright in a follow-up PR rather than going through the deprecate-now / remove-in-v24 cycle.
  • @nx/webpack:ssr-dev-server, @nx/expo:build-list, @nx/expo:sync-deps, @nx/expo:update, @nx/expo:ensure-symlink, @nx/react-native:sync-deps, and @nx/react-native:ensure-symlink are intentionally left as-is — none are covered by convert-to-inferred and they have no clean replacement (Nx-specific glue or non-migrating utilities).
  • @nx/esbuild:esbuild and @nx/nuxt:* ship neither an inferred plugin nor a convert-to-inferred generator yet, so they're out of scope.
  • Per-package READMEs, introduction-doc banners, per-package "migration recipe" pages, and migrations.json entries are intentionally skipped per the canonical pattern (NXC-4422). The runtime warning carries the migration story.

Related Issue(s)

Fixes NXC-4423.
Fixes NXC-4296.
Fixes NXC-4294.
Fixes NXC-4290.
Fixes NXC-4285.
Fixes NXC-4283.
Fixes NXC-4286.
Fixes NXC-4297.
Fixes NXC-4293.
Fixes NXC-4292.
Fixes NXC-4282.
Fixes NXC-4287.
Fixes NXC-4295.
Fixes NXC-4447.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit f4b44e4
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69fe0d5651d9d40008879a6c
😎 Deploy Preview https://deploy-preview-35576--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit f4b44e4
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69fe0d56f4f6b3000803a88e
😎 Deploy Preview https://deploy-preview-35576--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented May 5, 2026

View your CI Pipeline Execution ↗ for commit f4b44e4

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 34m 5s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 5s 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 27s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 10s View ↗
nx affected -t e2e-macos-local --parallel=1 --b... ✅ Succeeded 40m 44s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-08 17:12:05 UTC

@FrozenPandaz FrozenPandaz force-pushed the deprecate-bundlers branch from c789112 to 47ae35d Compare May 5, 2026 20:15
nx-cloud[bot]

This comment was marked as outdated.

@FrozenPandaz FrozenPandaz force-pushed the deprecate-bundlers branch from 563eed1 to 73cc1b8 Compare May 5, 2026 21:16
nx-cloud[bot]

This comment was marked as outdated.

@FrozenPandaz FrozenPandaz force-pushed the deprecate-bundlers branch from 73cc1b8 to 8c04e67 Compare May 5, 2026 21:47
nx-cloud[bot]

This comment was marked as outdated.

@FrozenPandaz FrozenPandaz force-pushed the deprecate-bundlers branch 2 times, most recently from 1a366cf to 2ecc5da Compare May 7, 2026 18:13
nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

@FrozenPandaz FrozenPandaz force-pushed the deprecate-bundlers branch from 213d916 to b20ba17 Compare May 7, 2026 19:41
nx-cloud[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@nx-cloud nx-cloud Bot left a comment

Choose a reason for hiding this comment

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

Nx Cloud has identified a flaky task in your failed CI:

🔂 Since the failure was identified as flaky, we triggered a CI rerun by adding an empty commit to this branch.

Nx Cloud View detailed reasoning in Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

…v-server executors

Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for @nx/webpack:webpack and @nx/webpack:dev-server. All
messages link to the general convert-to-inferred guide and point users
at `nx g @nx/webpack:convert-to-inferred` and the `@nx/webpack/plugin`
inferred plugin. Scaffold-time warnings fire from the @nx/webpack:configuration
generator and from the @nx/react / @nx/react-native scaffold paths that
bake the executor targets in directly.
…iew-server executors

Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for @nx/vite:build, @nx/vite:dev-server, and
@nx/vite:preview-server. All messages link to the general
convert-to-inferred guide and point users at `nx g @nx/vite:convert-to-inferred`
and the `@nx/vite/plugin` inferred plugin. The @nx/vite:test executor is
covered by the test-runner deprecation batch and is intentionally left out.
Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for @nx/rollup:rollup. The warnings link to the general
convert-to-inferred guide and point users at `nx g @nx/rollup:convert-to-inferred`
and the `@nx/rollup/plugin` inferred plugin. Scaffold-time warning fires
from @nx/rollup:configuration and from the @nx/react library generator's
legacy executor-target fallback when @nx/rollup/plugin is not registered.
…tors

Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for @nx/next:build and @nx/next:server. Warnings link to
the general convert-to-inferred guide and point users at
`nx g @nx/next:convert-to-inferred` and the `@nx/next/plugin` inferred
plugin. Scaffold-time warning fires from @nx/next:application when
@nx/next/plugin is not registered.
…tors

Add runtime deprecation warnings and a schema-root x-deprecated for
@nx/remix:build and @nx/remix:serve. Warnings link to the general
convert-to-inferred guide and point users at
`nx g @nx/remix:convert-to-inferred` and the `@nx/remix/plugin` inferred
plugin. No scaffold-time warning is needed because @nx/remix:application
already only registers the inferred plugin and never emits executor
targets directly.
…ion time

The previous wording started with "Scaffolding ..." and asked the user
to register `@nx/<pkg>/plugin` in `nx.json` first as a separate step.
Both points were noisy: "scaffolding" reads strangely in user-facing
output, and `convert-to-inferred` already registers the plugin in
nx.json, so directing users at the generator is enough.

Each generation-time warning now starts with "Generating ..." and reads
as a single ask: run `nx g @nx/<pkg>:convert-to-inferred` next, which
both migrates the just-generated targets to the inferred plugin and
prevents future generators from emitting executor targets.

Also retargets the detox warning's URL at the general
convert-to-inferred guide for consistency with the rest of the family.
Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for @nx/jest:jest. Warnings link to the general
convert-to-inferred guide and point users at
`nx g @nx/jest:convert-to-inferred` and the `@nx/jest/plugin` inferred
plugin. Scaffold-time warning fires from @nx/jest:configuration when
the inferred plugin is not registered or `addExplicitTargets` is set.
Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for @nx/playwright:playwright. Warnings link to the
general convert-to-inferred guide and point users at
`nx g @nx/playwright:convert-to-inferred` and the `@nx/playwright/plugin`
inferred plugin. Scaffold-time warning fires from
@nx/playwright:configuration when the inferred plugin is not registered.
Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for @nx/eslint:lint. Warnings link to the general
convert-to-inferred guide and point users at
`nx g @nx/eslint:convert-to-inferred` and the `@nx/eslint/plugin`
inferred plugin. Scaffold-time warning fires from
@nx/eslint:lint-project when it falls back to the executor target
because the inferred plugin is not registered.
…book:build executors

Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for both executors. Warnings link to the general
convert-to-inferred guide and point users at
`nx g @nx/storybook:convert-to-inferred` and the `@nx/storybook/plugin`
inferred plugin. Scaffold-time warning fires from
@nx/storybook:configuration when the inferred plugin is not registered
or `addExplicitTargets` is set.
…ver executors

Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for both executors. Warnings link to the general
convert-to-inferred guide and point users at
`nx g @nx/rspack:convert-to-inferred` and the `@nx/rspack/plugin`
inferred plugin. Scaffold-time warning fires from @nx/rspack:configuration
and from the @nx/react:application generator's rspack branch when
@nx/rspack/plugin is not registered. Inlined the warning in the
@nx/react caller because react does not declare a TypeScript project
reference to rspack.
…nferred

Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for the eight @nx/expo executors that have a migration
path through `@nx/expo:convert-to-inferred`: build, export, install,
prebuild, run, serve, start, and submit. Warnings link to the general
convert-to-inferred guide and point users at the `@nx/expo/plugin`
inferred plugin. Scaffold-time warning fires from @nx/expo:application
when the inferred plugin is not registered.

`@nx/expo:build-list`, `:sync-deps`, `:update`, and `:ensure-symlink`
are not covered by `convert-to-inferred`, so they stay as-is.
Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for @nx/vitest:test. Warnings link to the general
convert-to-inferred guide and point users at
`nx g @nx/vitest:convert-to-inferred` and the `@nx/vitest/plugin` inferred
plugin. Scaffold-time warning fires from @nx/vitest:configuration via
addOrChangeTestTarget when the inferred plugin isn't registered.
… by convert-to-inferred

Add runtime + scaffold-time deprecation warnings and a schema-root
x-deprecated for the eight @nx/react-native executors that have a
migration path through `@nx/react-native:convert-to-inferred`:
build-android, build-ios, bundle, pod-install, run-android, run-ios,
start, and upgrade. Warnings link to the general convert-to-inferred
guide and point users at the `@nx/react-native/plugin` inferred plugin.
Scaffold-time warning fires from @nx/react-native:application when the
inferred plugin is not registered.

`@nx/react-native:storybook`, `:sync-deps`, and `:ensure-symlink` are
not covered by `convert-to-inferred`, so they stay as-is.
FrozenPandaz and others added 4 commits May 8, 2026 10:52
Add a runtime warning and a schema-root x-deprecated for
@nx/react-native:storybook. The executor has no inferred-plugin
replacement in @nx/react-native/plugin and is not handled by the
convert-to-inferred generator, so the warning points users at running
the @storybook/react-native CLI directly via nx:run-commands.

Replaces the existing @deprecated JSDoc that pointed at @nx/react:storybook
(which never existed) with the canonical deprecation pattern.
Aligns the deprecation helper names with the user-facing message wording,
which already says "Generating a target..." rather than "Scaffolding...".
Also rewords the lone vitest scaffold-time message to match the canonical
"Generating a target..." phrasing used by every other package, and
updates the leading comments in deprecation.ts to talk about "generation
time" instead of "scaffold time".

No behavior change.
…untime import failure

@nx/react was deep-importing `@nx/webpack/src/utils/deprecation` and
`@nx/rollup/src/utils/deprecation`. Both compile fine inside the
monorepo (tsconfig project refs) but fail at runtime in published
packages with "Cannot find module" — neither @nx/webpack nor @nx/rollup
exposes internal `src/*` paths through its package.json exports field.

Inline the warning text in the two react generators that emit those
executor targets, matching the pattern already used for the rspack and
react-native:web-configuration cases.
…untime import failure [Self-Healing CI Rerun]
@FrozenPandaz FrozenPandaz force-pushed the deprecate-bundlers branch from 200934f to c6a1c55 Compare May 8, 2026 14:52
@FrozenPandaz FrozenPandaz marked this pull request as ready for review May 8, 2026 15:53
@FrozenPandaz FrozenPandaz requested a review from a team as a code owner May 8, 2026 15:53
@FrozenPandaz FrozenPandaz requested a review from JamesHenry May 8, 2026 15:53
@FrozenPandaz FrozenPandaz changed the title chore(bundling): deprecate @nx/webpack, @nx/vite, and @nx/rollup build executors chore(repo): deprecate executors with inferred-plugin replacements May 8, 2026
…orsGenerating

Aligns detox with the Scaffolding->Generating rename applied to the other
deprecation helpers; the earlier sed pass missed it because the helper is
plural (Executors) where the others were singular.
The companion @nx/react-native:storybook-configuration generator was already
removed in v21 and no generator has emitted this target since the RN 0.73
upgrade in Jan 2024. The executor will be removed outright in a follow-up PR
rather than going through the deprecate-now / remove-in-v24 cycle.
@FrozenPandaz FrozenPandaz merged commit a2dfac6 into master May 8, 2026
27 checks passed
@FrozenPandaz FrozenPandaz deleted the deprecate-bundlers branch May 8, 2026 17:23
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.

2 participants