GithubHelp home page GithubHelp logo

Node >10.17.0 support about d3-geo-polygon HOT 6 CLOSED

d3 avatar d3 commented on May 8, 2024
Node >10.17.0 support

from d3-geo-polygon.

Comments (6)

Fil avatar Fil commented on May 8, 2024 1

I'd rather move forward to node-canvas@2; the change is minor:

diff --git a/test/render-world b/test/render-world
index fbc4fc4..45a79cd 100755
--- a/test/render-world
+++ b/test/render-world
@@ -10,10 +10,10 @@ if (!/^[a-z0-9]+$/i.test(projectionName)) throw new Error;

 var fs = require("fs"),
     topojson = require("topojson-client"),
-    Canvas = require("canvas"),
+    {createCanvas} = require("canvas"),
     d3 = Object.assign({}, require("d3-geo"), require("../"));

-var canvas = new Canvas(width, height),
+var canvas = createCanvas(width, height),
     context = canvas.getContext("2d");

 var world = require("world-atlas/world/50m.json"),

but the idea is to keep in sync with d3-geo and d3-geo-projection, so I'd like to ask @mbostock for his opinion first.

from d3-geo-polygon.

Fil avatar Fil commented on May 8, 2024

(From memory) I think it's because the tests involve node-canvas@1 and would have to be rewritten to use node-canvas@2, with its slightly different API.

from d3-geo-polygon.

goszczynskip avatar goszczynskip commented on May 8, 2024

If tests are only concern here than maybe dropping this constraint is an option as short time fix. Adding preinstall step could keep local installs within a 6.x - 10.17.0 range while allowing npm usages.

from d3-geo-polygon.

Fil avatar Fil commented on May 8, 2024

A simpler solution at #41 (comment)

from d3-geo-polygon.

Fil avatar Fil commented on May 8, 2024

Related: #37

from d3-geo-polygon.

Fil avatar Fil commented on May 8, 2024

fixed by #41

from d3-geo-polygon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.