Skip to content

Use newer acorn version for building, to support newer JS syntax #7478

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

Merged
merged 1 commit into from
Jul 18, 2025

Conversation

emilykl
Copy link
Contributor

@emilykl emilykl commented Jul 18, 2025

Closes #7477

Adds an override to package.json so that we use a newer version of acorn for building Plotly.js, which allows the use of some newer JS syntax which otherwise fails (see discussion in #7474).

We still target 2016 JS for the build output.

@emilykl emilykl requested a review from archmoj July 18, 2025 20:53
@emilykl emilykl changed the title Use newer acorn version for bundling, to support newer JS syntax Use newer acorn version for building, to support newer JS syntax Jul 18, 2025
@@ -178,5 +178,10 @@
"transform-loader": "^0.2.4",
"true-case-path": "^2.2.1",
"virtual-webgl": "^1.0.6"
},
"overrides": {
"falafel": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively we should propose a PR to falafel repository.
But the repository seems missing at https://github.com/substack/node-falafel

Copy link
Contributor

Choose a reason for hiding this comment

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

npm ls falafel
plotly.js
├─┬ browserify-transform-tools@1.7.0
│ └── falafel@2.2.5 deduped
├── falafel@2.2.5 overridden
└─┬ regl-scatter2d@3.3.1
  └─┬ glslify@7.1.1
    └── falafel@2.2.5 deduped

This looks fine.

Also

npm run preversion

passes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I haven't been able to track down the falafel repository anywhere online.

Maybe we should switch away from falafel entirely?

A quick Google search brings up https://github.com/loilo/yufka as a possible replacement but it's not widely used at all.

Copy link
Contributor

@archmoj archmoj left a comment

Choose a reason for hiding this comment

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

💃

@archmoj archmoj merged commit f7c4692 into master Jul 18, 2025
6 checks passed
@archmoj archmoj deleted the upgrade-acorn branch July 18, 2025 21:13
@emilykl
Copy link
Contributor Author

emilykl commented Jul 18, 2025

@archmoj Now that this is merged, would you be OK with me opening another PR right away to update the syntax for the code added by #7474?

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.

Build pipeline does not support newer JS syntax
2 participants