Skip to content

test(e2e): fix Cypress config for Node.JS v20.19.0#6410

Merged
ashishjain0512 merged 1 commit intomermaid-js:developfrom
aloisklink:test/fix-cypress-on-nodejs-v20.19.0
Mar 25, 2025
Merged

test(e2e): fix Cypress config for Node.JS v20.19.0#6410
ashishjain0512 merged 1 commit intomermaid-js:developfrom
aloisklink:test/fix-cypress-on-nodejs-v20.19.0

Conversation

@aloisklink
Copy link
Copy Markdown
Member

📑 Summary

Node.JS v20.19.0 breaks import '@cypress/code-coverage/task' in the cypress.config.ts for some reason (this is probably due to the new experimental-require-module feature that is enabled by default in Node.JS v20.19.0).

As a work-around, we can change this to @cypress/code-coverage/task.js and cypress-image-snapshot/plugin.js'.

See: cypress-io/code-coverage#940
See: https://nodejs.org/en/blog/release/v20.19.0

📏 Design Decisions

The reason why we don't need to update @argos-ci/cypress/task is because they've set their exports in the package.json file:

https://github.com/argos-ci/argos-javascript/blob/af931a704908a48f49f375f92f23924a39792c7e/packages/cypress/package.json#L30-L43

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added necessary unit/e2e tests.
  • 📓 have added documentation. Make sure MERMAID_RELEASE_VERSION is used for all new features.
    • Test only change
  • 🦋 If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.
    • Test only change

Node.JS v20.19.0 breaks `import '@cypress/code-coverage/task'` in the
`cypress.config.ts` for some reason (this is probably due to the new
`experimental-require-module` feature that is enabled by default in
Node.JS v20.19.0).

As a work-around, we can change this to
`@cypress/code-coverage/task.js`.

See: cypress-io/code-coverage#940
See: https://nodejs.org/en/blog/release/v20.19.0
@github-actions github-actions Bot added the Type: Other Not an enhancement or a bug label Mar 25, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 25, 2025

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit ac625bd
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/67e27854a34c1b00088d6843
😎 Deploy Preview https://deploy-preview-6410--mermaid-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 25, 2025

Open in Stackblitz

npm i https://pkg.pr.new/mermaid-js/mermaid@6410
npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/mermaid-zenuml@6410
npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/layout-elk@6410
npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/parser@6410

commit: ac625bd

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 3.86%. Comparing base (40b85c3) to head (ac625bd).
Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6410   +/-   ##
=======================================
  Coverage     3.86%   3.86%           
=======================================
  Files          412     411    -1     
  Lines        43189   43178   -11     
  Branches       664     664           
=======================================
  Hits          1670    1670           
+ Misses       41519   41508   -11     
Flag Coverage Δ
unit 3.86% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented Mar 25, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 7 changed Mar 25, 2025, 9:43 AM

@ashishjain0512 ashishjain0512 added this pull request to the merge queue Mar 25, 2025
Merged via the queue into mermaid-js:develop with commit d1b1a67 Mar 25, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Other Not an enhancement or a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants