Skip to content

feat: replace ts-node with tsx for parsing user configuration #31520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: release/15.0.0
Choose a base branch
from

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Apr 15, 2025

Closes

Side effect of not using Node as the loader

Additional details

Introduces tsx as the new tool of choice to load and parse the end user's cypress.config.(js|ts), replacing ts-node. This solves a lot of issues around ESM projects using Cypress as we are now able to more easily run ESM based cypress configurations (TypeScript or JavaScript) within the Cypress child process. This means we don't need ts-node work arounds to try to run the user's config as commonjs, which results in configuration clashes in TypeScript, nor do we need nodes experimental loaders / options to run ESM JavaScript projects.

Steps to test

Go through some of the reproductions in the aforementioned issues and run the pre release binary installed in the project. Notice the project is now able to run

How has the user experience changed?

The TypeScript / ESM experience is greatly improved as users are now able to run Cypress in their project without having to commit to hacky workarounds!

PR Tasks

@AtofStryker AtofStryker force-pushed the feat/replace_tsnode_for_tsx_config_process branch 2 times, most recently from 463841e to 3f1487c Compare April 15, 2025 19:18
Copy link

cypress bot commented Apr 15, 2025

cypress    Run #61848

Run Properties:  status check passed Passed #61848  •  git commit 7670fed0bd: Merge branch 'release/15.0.0' of github.com:cypress-io/cypress into feat/replace...
Project cypress
Branch Review feat/replace_tsnode_for_tsx_config_process
Run status status check passed Passed #61848
Run duration 18m 01s
Commit git commit 7670fed0bd: Merge branch 'release/15.0.0' of github.com:cypress-io/cypress into feat/replace...
Committer AtofStryker
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 29
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 792
View all changes introduced in this branch ↗︎
UI Coverage  64.37%
  Untested elements 29  
  Tested elements 56  
Accessibility  96.21%
  Failed rules  0 critical   4 serious   1 moderate   0 minor
  Failed elements 196  

@AtofStryker AtofStryker force-pushed the feat/replace_tsnode_for_tsx_config_process branch from 3f1487c to 3803906 Compare April 16, 2025 03:47
@AtofStryker AtofStryker force-pushed the feat/replace_tsnode_for_tsx_config_process branch from 3803906 to dd4a87b Compare April 16, 2025 15:49
@AtofStryker AtofStryker force-pushed the feat/replace_tsnode_for_tsx_config_process branch from e069098 to 916a742 Compare April 18, 2025 19:46
@AtofStryker AtofStryker changed the title feat: (DRAFT) replace tsnode with tsx for parsing user configuration feat: replace tsn-ode with tsx for parsing user configuration Apr 21, 2025
@AtofStryker AtofStryker changed the title feat: replace tsn-ode with tsx for parsing user configuration feat: replace ts-node with tsx for parsing user configuration Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: replace ts-node with tsx for user configuration parsing and cypress runtime
1 participant