-
feat(misc)!: deprecate executors with inferred-plugin replacements (#35576)
发布于
2026-05-08 17:22:57 +00:00 Current Behavior
Most Nx executors that have an inferred-plugin alternative
(@nx/<pkg>/plugin) and aconvert-to-inferredgenerator 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 existingcypress/detoxdeprecation 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 atnx g @nx/<pkg>:convert-to-inferred. - Schema-root
x-deprecated. Surfaces in editor / Nx Console /nx show projectviews. - 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/webpackwebpack,dev-server@nx/vitebuild,dev-server,preview-server@nx/rolluprollup@nx/nextbuild,server@nx/remixbuild,serve@nx/jestjest@nx/playwrightplaywright@nx/eslintlint@nx/storybookstorybook,build@nx/rspackrspack,dev-server@nx/expobuild,export,install,prebuild,run,serve,start,submit@nx/react-nativebuild-android,build-ios,bundle,pod-install,run-android,run-ios,start,upgrade@nx/vitesttestGeneration-time warnings wired in
@nx/<pkg>:configurationfor webpack, vite, rollup, jest, playwright,
storybook, rspack, vitest@nx/<pkg>:applicationfor next, expo, react-native@nx/eslint:lint-projectlegacy 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/reactdoes 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/webpackand@nx/rolluponly expose
./index.jsin their packageexportsfield. The import would resolve
in source but throwCannot 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:testis intentionally not included — it is being
removed entirely by PR #35517 (deprecation messaging would ship as dead
code).@nx/vitest:testis now in scope: theconvert-to-inferred
generator for@nx/vitestis in place, so the deprecation has a real
migration target.@nx/cypress/@nx/detoxalready 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:storybookis intentionally not included. The
companion@nx/react-native:storybook-configurationgenerator 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-symlinkare
intentionally left as-is — none are covered byconvert-to-inferredand
they have no clean replacement (Nx-specific glue or non-migrating
utilities).@nx/esbuild:esbuildand@nx/nuxt:*ship neither an inferred plugin
nor aconvert-to-inferredgenerator yet, so they're out of scope.- Per-package READMEs, introduction-doc banners, per-package "migration
recipe" pages, andmigrations.jsonentries 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.
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
下载附件
- Runtime warning. The executor logs that it is deprecated, will be