Skip to content

fix(cypress): scope Cypress configs to CommonJS under ESM root - #2239

Open
JohnyKid123 wants to merge 1 commit into
hackforla:developmentfrom
JohnyKid123:fix/cypress-commonjs-2224
Open

JohnyKid123 wants to merge 1 commit into
hackforla:developmentfrom
JohnyKid123:fix/cypress-commonjs-2224

Conversation

@JohnyKid123

Copy link
Copy Markdown

Fixes #2224

What changes did you make and why?

Added cypress/package.json with "type": "commonjs" to fix the module compatibility issue caused by the root package's "type": "module" setting.

This allows Cypress to load the existing CommonJS plugin export without renaming any files or changing plugin paths.

How to test

Run:

node -e "console.log(typeof require('./cypress/plugins/index.js'))"

Expected output: function

Verified using a minimal reproduction with Node.js 22.16.0. The full Cypress suite was not run.

Screenshots

Not applicable — configuration-only change.

AI assistance

This fix was prepared with AI assistance. The module-loading behavior was checked locally.

@JohnyKid123

Copy link
Copy Markdown
Author

Hi! I've submitted a fix for #2224.

The PR is ready for review, but the required checks are still pending, and the workflows appear to need approval.

Could a maintainer please take a look when available? Thanks!

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.

Cypress configs are CommonJS under root "type": "module" and will fail to load

1 participant