d3 / d3-geo-polygon

Clipping and geometric operations for spherical polygons.
https://d3.observablehq.cloud/d3-geo-polygon/
Other
113 stars 23 forks source link

Remove node constraint #41

Closed goszczynskip closed 4 years ago

goszczynskip commented 4 years ago

Removes node constraint and bumps canvas to "2.6.1".

Links to: #40

goszczynskip commented 4 years ago

"yarn test" run locally is passing (run on windows). Althoulgh I don't know if there are some false positives.

Fil commented 4 years ago

the test that fails is yarn prepublishOnly

goszczynskip commented 4 years ago

yarn prepublishOnly should pass now

Fil commented 4 years ago

ah yes, even simpler than https://github.com/d3/d3-geo-polygon/issues/40#issuecomment-652366638 :) so maybe a solution is possible that would be compatible with both node-canvas@1 and node-canvas@2, using:

Canvas = require("canvas")
if (Canvas.Canvas) Canvas = Canvas.Canvas;

and in package.json we would have canvas: "1 - 2"

goszczynskip commented 4 years ago

Good idea! I've made changes as you requested.

Fil commented 4 years ago

thank you!