feat(testing)!: deprecate the @nx/cypress:cypress executor#35531
feat(testing)!: deprecate the @nx/cypress:cypress executor#35531FrozenPandaz merged 3 commits intomasterfrom
Conversation
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit 0a614c9
☁️ Nx Cloud last updated this comment at |
Mark the @nx/cypress:cypress executor as deprecated with a v24 removal target. The @nx/cypress/plugin inferred plugin produces equivalent targets, and `nx g @nx/cypress:convert-to-inferred` is the one-shot migration tool. Adds: - CYPRESS_EXECUTOR_DEPRECATION_MESSAGE in src/utils/deprecation.ts - Schema-root x-deprecated on the cypress executor schema, naming convert-to-inferred as the migration path - Runtime warning at the top of cypress.impl.ts - Scaffold-time warnings in the configuration and component-configuration generators that fire when the inferred plugin isn't registered (i.e. when the generator is about to emit an executor-based target) The @nx/cypress package itself, the inferred plugin, the configuration and component-configuration generators, and convert-to-inferred all remain supported.
… convert-to-inferred path Adds a caution banner to the Cypress introduction page explaining that the @nx/cypress:cypress executor is deprecated, and points users at `nx g @nx/cypress:convert-to-inferred` as the migration path. Adds a new Guides/convert-to-inferred.mdoc page documenting the convert-to-inferred generator and a manual fallback that registers the plugin directly in nx.json. The @nx/cypress package and its inferred plugin stay supported.
b6efa81 to
fa81954
Compare
…o-inferred guide and drop cypress-specific docs
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud has identified a possible root cause for your failed CI:
We determined this failure is unrelated to the cypress executor deprecation changes in this PR. The test cache › should support using globs as outputs fails because the Nx core cache hit message no longer contains "local cache", and the identical failure was confirmed in branch 35533, establishing it as a pre-existing regression. No changes to this PR are needed.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
AgentEnder
left a comment
There was a problem hiding this comment.
Should we be deprecating the addPlugins nx json flag too?
Current Behavior
The
@nx/cypress:cypressexecutor runs silently with no signal that it's slated for removal. Users runningnx g @nx/cypress:configurationornx g @nx/cypress:component-configurationon workspaces that don't have@nx/cypress/pluginregistered get executor-basede2e(orcomponent-test) targets scaffolded into theirproject.jsonwith no warning.The
@nx/cypress:cypressexecutor is a thin wrapper over the Cypress CLI. The@nx/cypress/plugininferred plugin produces equivalente2eandcomponent-testtargets directly fromcypress.config.*, andnx g @nx/cypress:convert-to-inferredis the one-shot migration tool to move existing executor-based targets onto the inferred plugin.Expected Behavior
The
@nx/cypress:cypressexecutor is marked as deprecated for removal in Nx v24. Users see the deprecation message on three surfaces:cypress.impl.ts— fires every executor invocation, no throttling.configuration.tsandcomponent-configuration.ts— fires when the generators are about to emit an executor-based target (i.e., when@nx/cypress/pluginisn't innx.json).x-deprecatedonexecutors/cypress/schema.json— surfaces in IDE / docs metadata.All three messages link to the general convert-to-inferred guide at https://nx.dev/docs/guides/tasks--caching/convert-to-inferred.
The
@nx/cypresspackage itself, the@nx/cypress/plugininferred plugin, theconfigurationandcomponent-configurationscaffolding generators, and theconvert-to-inferredmigration tool all remain supported. Only the:cypressexecutor is deprecated. Removal is targeted for v24; this PR is warnings only, no behavior removal.The PR title uses
feat!so the deprecation surfaces in the v23 changelog / release notes; individual commits staychore/docs/fixfor clean per-commit history.Internal usage / dogfood note
graph/client-e2e/project.jsonuses@nx/cypress:cypressand is intentionally not migrated in this PR. Hitting the deprecation warning on every internal CI run is the team's continuous dogfood signal that the migration tool, the wording, and the suggested path actually work. If it's painful for us, it's painful for users; that pressure should drive iteration onconvert-to-inferred. The internal project will be migrated alongside the v24 removal PR (or earlier if the warning becomes legitimately disruptive).Surfaces explicitly NOT touched
ng-adde2e migrator — unchanged.migrations.json— no migration entry. Runtime warnings + docs are enough.npm deprecate— not run; the package isn't deprecated, only the executor.Test plan
pnpm nx build cypresspasses.pnpm nx test cypress— verify no regressions from the new warning calls.nx e2e <project>on a project that uses the executor (e.g.,graph/client-e2e).nx g @nx/cypress:configuration/:component-configurationin a workspace without@nx/cypress/plugin.convert-to-inferredstill works end-to-end as the migration path.Related Issue(s)
Fixes NXC-4264
This PR follows the canonical executor-deprecation pattern documented in Linear NXC-4422, established by the
@nx/detoxexecutor deprecation (NXC-4272 / #35529).Related Linear context:
@nx/detoxexecutor deprecation, the reference implementation.x-deprecatedon executors at runtime. Once landed, the explicitlogger.warnin this PR becomes redundant.