Skip to content

feat(testing)!: deprecate the @nx/cypress:cypress executor#35531

Merged
FrozenPandaz merged 3 commits intomasterfrom
deprecate-cypress-executor
May 4, 2026
Merged

feat(testing)!: deprecate the @nx/cypress:cypress executor#35531
FrozenPandaz merged 3 commits intomasterfrom
deprecate-cypress-executor

Conversation

@FrozenPandaz
Copy link
Copy Markdown
Contributor

@FrozenPandaz FrozenPandaz commented May 1, 2026

Current Behavior

The @nx/cypress:cypress executor runs silently with no signal that it's slated for removal. Users running nx g @nx/cypress:configuration or nx g @nx/cypress:component-configuration on workspaces that don't have @nx/cypress/plugin registered get executor-based e2e (or component-test) targets scaffolded into their project.json with no warning.

The @nx/cypress:cypress executor is a thin wrapper over the Cypress CLI. The @nx/cypress/plugin inferred plugin produces equivalent e2e and component-test targets directly from cypress.config.*, and nx g @nx/cypress:convert-to-inferred is the one-shot migration tool to move existing executor-based targets onto the inferred plugin.

Expected Behavior

The @nx/cypress:cypress executor is marked as deprecated for removal in Nx v24. Users see the deprecation message on three surfaces:

  • Runtime warning at the top of cypress.impl.ts — fires every executor invocation, no throttling.
  • Scaffold-time warning in configuration.ts and component-configuration.ts — fires when the generators are about to emit an executor-based target (i.e., when @nx/cypress/plugin isn't in nx.json).
  • Schema-root x-deprecated on executors/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/cypress package itself, the @nx/cypress/plugin inferred plugin, the configuration and component-configuration scaffolding generators, and the convert-to-inferred migration tool all remain supported. Only the :cypress executor 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 stay chore / docs / fix for clean per-commit history.

Internal usage / dogfood note

graph/client-e2e/project.json uses @nx/cypress:cypress and 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 on convert-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

  • Framework-specific cypress component-testing generators (angular / react / next / remix) — unchanged.
  • The Angular ng-add e2e migrator — unchanged.
  • migrations.json — no migration entry. Runtime warnings + docs are enough.
  • npm deprecate — not run; the package isn't deprecated, only the executor.
  • Cypress-specific docs page — no per-plugin convert-to-inferred page exists for any other plugin (Detox, Playwright, etc.). Pointing the warnings at the general guide keeps that consistent and avoids one more page to maintain.

Test plan

  • pnpm nx build cypress passes.
  • pnpm nx test cypress — verify no regressions from the new warning calls.
  • Verify the runtime warning fires when running nx e2e <project> on a project that uses the executor (e.g., graph/client-e2e).
  • Verify the scaffold-time warning fires on nx g @nx/cypress:configuration / :component-configuration in a workspace without @nx/cypress/plugin.
  • Verify convert-to-inferred still 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/detox executor deprecation (NXC-4272 / #35529).

Related Linear context:

  • NXC-4422 — Pattern: executor deprecation (canonical reference).
  • NXC-4272 / feat(detox)!: deprecate the @nx/detox build and test executors #35529@nx/detox executor deprecation, the reference implementation.
  • NXC-4420 — Nx core: surface schema-root x-deprecated on executors at runtime. Once landed, the explicit logger.warn in this PR becomes redundant.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 1, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 0a614c9
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69f52ebab8196700082e3c03
😎 Deploy Preview https://deploy-preview-35531--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.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 1, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 0a614c9
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69f52eba34d4aa0008be64c2
😎 Deploy Preview https://deploy-preview-35531--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.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented May 1, 2026

View your CI Pipeline Execution ↗ for commit 0a614c9

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 13m 15s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 16s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 21s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-02 12:40:54 UTC

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.
@FrozenPandaz FrozenPandaz force-pushed the deprecate-cypress-executor branch from b6efa81 to fa81954 Compare May 1, 2026 05:05
…o-inferred guide and drop cypress-specific docs
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.

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:

Rerun CI

Nx Cloud View detailed reasoning on Nx Cloud ↗


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

@FrozenPandaz FrozenPandaz marked this pull request as ready for review May 4, 2026 13:35
@FrozenPandaz FrozenPandaz requested a review from a team as a code owner May 4, 2026 13:35
@FrozenPandaz FrozenPandaz requested a review from leosvelperez May 4, 2026 13:35
Copy link
Copy Markdown
Member

@AgentEnder AgentEnder left a comment

Choose a reason for hiding this comment

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

Should we be deprecating the addPlugins nx json flag too?

@FrozenPandaz FrozenPandaz merged commit a5d4300 into master May 4, 2026
26 of 27 checks passed
@FrozenPandaz FrozenPandaz deleted the deprecate-cypress-executor branch May 4, 2026 18:09
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