fix: #22038 support esm import for windows#22042
Merged
Conversation
Contributor
|
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
…ypress-io/cypress into tgriesser/fix/22038-esm-import-windows * 'tgriesser/fix/22038-esm-import-windows' of github.com:cypress-io/cypress: fix: Change ffmpeg to post process at priority 20 (#21587)
tgriesser
commented
Jun 2, 2022
| cy.contains('E2E Testing').click() | ||
| cy.contains('We added the following files to your project:') | ||
| cy.contains('Continue').click() | ||
| cy.contains('Choose a Browser') |
Member
Author
There was a problem hiding this comment.
We weren't confirming the flow completed, which meant we were missing a failure here
estrada9166
approved these changes
Jun 2, 2022
mjhenkes
approved these changes
Jun 2, 2022
flotwig
approved these changes
Jun 2, 2022
tgriesser
added a commit
that referenced
this pull request
Jun 2, 2022
…hub.com:cypress-io/cypress into tgriesser/fix/change-typescript-detection-rules * 'tgriesser/fix/change-typescript-detection-rules' of github.com:cypress-io/cypress: fix: do not watch specs on run mode (#22060) fix: #22038 support esm import for windows (#22042) fix: Change ffmpeg to post process at priority 20 (#21587)
lmiller1990
reviewed
Jun 3, 2022
| // Certain modules cannot be dynamically imported. | ||
|
|
||
| // pathToFileURL for windows interop: https://github.com/nodejs/node/issues/31710 | ||
| return await import(pathToFileURL(file).href) |
Contributor
There was a problem hiding this comment.
If the file is a .ts file, we will get a problem, though, since native imports do not support .ts.
#22071
I will look into it.
This file contains hidden or 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
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.
User facing changelog
Improved support for ESM imports in windows
Additional details
ESM imports on windows must be transformed to a proper
file://prefixed path. The recommended way to handle this is with thepathToFileURLutility exported fromurlSteps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?