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

[email protected] sideEffects breaks Delaunay class #99

Closed
jloveless63 opened this issue Jan 31, 2020 · 2 comments
Closed

[email protected] sideEffects breaks Delaunay class #99

jloveless63 opened this issue Jan 31, 2020 · 2 comments

Comments

@jloveless63
Copy link

I performed an investigation on our code base where I replaced our usage of d3-voronoi with the usage of d3-delaunay. When doing so, with versions 5.1.6 and 5.2.0, I found an issue when running End-to-End tests against our code:

ERROR in ./node_modules/d3-delaunay/src/delaunay.js 26:15
Module parse failed: Unexpected token (26:15)
You may need an appropriate loader to handle this file type.
| return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r];
| }
> export default const Delaunay = /*@__PURE__*/ function () {
| class Delaunay {
| constructor(points) {

I found that back-stepping to version 5.1.5 alleviates the error, which is before d3-delaunay was marked as having no side effects. I have also found that, in version 5.2.0, changing the setting of sideEffects to:

 "sideEffects": [
   "./src/delaunay.js"
 ],

also alleviates the error.

@mbostock
Copy link
Member

Does #100 fix this?

@jloveless63
Copy link
Author

#100 does fix it. Well done!

@Fil Fil closed this as completed Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants