-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
AtofStryker
wants to merge
10
commits into
release/15.0.0
Choose a base branch
from
feat/replace_tsnode_for_tsx_config_process
base: release/15.0.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: replace ts-node
with tsx
for parsing user configuration
#31520
AtofStryker
wants to merge
10
commits into
release/15.0.0
from
feat/replace_tsnode_for_tsx_config_process
+1,635
−404
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
463841e
to
3f1487c
Compare
cypress
|
Project |
cypress
|
Branch Review |
feat/replace_tsnode_for_tsx_config_process
|
Run status |
|
Run duration | 18m 01s |
Commit |
|
Committer | AtofStryker |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
1
|
|
29
|
|
0
|
|
792
|
View all changes introduced in this branch ↗︎ |
UI Coverage
64.37%
|
|
---|---|
|
29
|
|
56
|
Accessibility
96.21%
|
|
---|---|
|
0 critical
4 serious
1 moderate
0 minor
|
|
196
|
3f1487c
to
3803906
Compare
3803906
to
dd4a87b
Compare
This was referenced Apr 18, 2025
…cypress 15 and allows us to not include the 18.19.0 workaround to use --import with tsx inside the ProjectConfigIpc
…s absolute drive paths are not recognized as a file protocol in the node context
… to this PR and should be merged into develop)
e069098
to
916a742
Compare
…not work but now do with tsx
ts-node
with tsx
for parsing user configuration
…eat/replace_tsnode_for_tsx_config_process
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes
ts-node
withtsx
for user configuration parsing and cypress runtime #31185--experimental-loader
" #30318 (no longer need the--experimental-loader
option)tsx
will be used to replacets-node
instead ofjiti
)"allowImportingTsExtensions": true
#28442Side effect of not using Node as the loader
--no-experimental-require-module
as we aren't using Node directly as the file loader. see https://nodejs.org/en/blog/release/v22.12.0#requireesm-is-now-enabled-by-default)-Reinforces
ERR_INTERNAL_ASSERTION
with Node.js >= v22.1.0 andexperimental-detect-module
set #30101 (don't need to worry about the--no-experimental-detect-module
option as we aren't using Node directly as the file loader. see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md?rgh-link-date=2024-08-22T15%3A58%3A27Z#module-syntax-detection-is-now-enabled-by-default)Additional details
Introduces
tsx
as the new tool of choice to load and parse the end user'scypress.config.(js|ts)
, replacingts-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 needts-node
work arounds to try to run the user's config ascommonjs
, 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
cypress-documentation
? chore: update typescript docs to tsx cypress-documentation#6155type definitions
? (N/A)