-
Notifications
You must be signed in to change notification settings - Fork 3.3k
spike: cjs to esm strategy #32052
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
spike: cjs to esm strategy #32052
Conversation
4c38341
to
c23239b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: TypeScript File Extension Causes Test Failures
The run_child_fixture.ts
file incorrectly uses require.resolve()
with a hardcoded .ts
extension for require_async_child.ts
. require.resolve()
expects compiled .js
files, not TypeScript source files, which will cause runtime failures. This also creates an inconsistency with ProjectConfigIpc.ts
, which uses environment-based conditional logic to resolve .js
in production and .ts
in development, potentially causing the test to fail in production environments or when CYPRESS_INTERNAL_ENV
is 'production'.
packages/server/test/unit/plugins/child/run_child_fixture.ts#L4-L5
const REQUIRE_ASYNC_CHILD_PATH = require.resolve('@packages/server/lib/plugins/child/require_async_child.ts') |
Was this report helpful? Give feedback by reacting with 👍 or 👎
Additional details
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?