Skip to content
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

Fix installing dependencies in node v22 #7381

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

chaigh-uk
Copy link

Fixes #7306

Bumps canvas to v3.1.0 and jsdom to v26.0.0

The key fix was in canvas and is detailed here

@gvwilson gvwilson added community community contribution P2 considered for next cycle fix fixes something broken dependencies Pull requests that update a dependency file labels Feb 28, 2025
@gvwilson
Copy link
Contributor

thanks @chaigh-uk - I'll try to prioritize review in the next cycle.

@@ -129,7 +129,7 @@
"browserify-transform-tools": "^1.7.0",
"bubleify": "^2.0.0",
"buffer": "^6.0.3",
"canvas": "^2.11.2",
"canvas": "^3.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that canvas v3 has dropped support for Node.js 16.x and below and "node": ">=18.0.0" is used in plotly.js's current package system

"node": ">=18.0.0"
, this change seems good to me.
💯 Thank you 🙏

@@ -148,7 +148,7 @@
"into-stream": "^6.0.0",
"jasmine": "3.5.0",
"jasmine-core": "3.5.0",
"jsdom": "^24.1.1",
"jsdom": "^26.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsdom v25 appears to improve security issues in regards to the "dangerously" option used by tasks/util/plotly_node.mjs
This dependency bump from v24 to v26 seems good to me.

@archmoj
Copy link
Contributor

archmoj commented Mar 31, 2025

@chaigh-uk Thanks very much for the PR.

You could fetch upstream/master and then add a test titled publish-dist-node-v22 to regenerate plot-schema similar to publish-dist.

publish-dist is declared at

publish-dist:

You also need to add your new publish-dist-node-v22 test below here:

- publish-dist

Thank you!

@chaigh-uk
Copy link
Author

@chaigh-uk Thanks very much for the PR.

You could fetch upstream/master and then add a test titled publish-dist-node-v22 to regenerate plot-schema similar to publish-dist.

publish-dist is declared at

publish-dist:

You also need to add your new publish-dist-node-v22 test below here:

- publish-dist

Thank you!

Thanks for taking a look @archmoj - I've had a go at this in 46e0277
Hopefully I've understood correctly, but let me know if I've missed anything 👍

@chaigh-uk chaigh-uk changed the base branch from master to pr_7005-test April 2, 2025 11:27
@chaigh-uk chaigh-uk changed the base branch from pr_7005-test to master April 2, 2025 11:27
@gvwilson gvwilson added P1 needed for current cycle and removed P2 considered for next cycle labels Apr 2, 2025
@archmoj
Copy link
Contributor

archmoj commented Apr 3, 2025

💯 🙏 Many thanks @chaigh-uk for the smart addition of node 22 tests.

Screenshot from 2025-04-03 10-47-15

It is interesting to see node v22 tests appear to run faster.
The failing baseline tests (listed https://app.circleci.com/pipelines/github/plotly/plotly.js/11881/workflows/222c9105-1ddf-48c3-8268-a66cbfc281c3) are not related to this PR.

It would be great if someone else from @plotly/plotly_js also help approve this PR.

On another note @chaigh-uk used a pattern in 46e0277 that simplified testing in different container versions.

IMHO - It would be of interest to apply similar pattern in other places in plotly.js and plotly.py and dash tests to reduce/avoid duplicated CircleCI config code
cc: @alexcjohnson @antoinerg @samhinshaw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution dependencies Pull requests that update a dependency file fix fixes something broken P1 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dependency Installation Fails on Node 22
3 participants