diff --git a/.eslintrc.json b/.eslintrc.json
index e493896..98d26e7 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -4,11 +4,6 @@
"sourceType": "module",
"ecmaVersion": 8
},
- "env": {
- "es6": true,
- "node": true,
- "browser": true
- },
"rules": {
"no-cond-assign": 0,
"no-constant-condition": 0,
diff --git a/.github/eslint.json b/.github/eslint.json
new file mode 100644
index 0000000..c280fdb
--- /dev/null
+++ b/.github/eslint.json
@@ -0,0 +1,18 @@
+{
+ "problemMatcher": [
+ {
+ "owner": "eslint-compact",
+ "pattern": [
+ {
+ "regexp": "^(.+):\\sline\\s(\\d+),\\scol\\s(\\d+),\\s(Error|Warning|Info)\\s-\\s(.+)\\s\\((.+)\\)$",
+ "file": 1,
+ "line": 2,
+ "column": 3,
+ "severity": 4,
+ "message": 5,
+ "code": 6
+ }
+ ]
+ }
+ ]
+}
diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml
new file mode 100644
index 0000000..7e5ee59
--- /dev/null
+++ b/.github/workflows/node.js.yml
@@ -0,0 +1,30 @@
+# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
+
+name: Node.js CI
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ branches: [ main ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [14.x]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - run: yarn --frozen-lockfile
+ - run: |
+ echo ::add-matcher::.github/eslint.json
+ yarn run eslint src test --format=compact
+ - run: yarn test
diff --git a/LICENSE b/LICENSE
index f9488eb..fcf1e63 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,30 +1,16 @@
-Copyright 2010-2016 Mike Bostock
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of the author nor the names of contributors may be used to
- endorse or promote products derived from this software without specific prior
- written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Copyright 2010-2021 Mike Bostock
+
+Permission to use, copy, modify, and/or distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright notice
+and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
This license applies to GeographicLib, versions 1.12 and later.
diff --git a/README.md b/README.md
index 3ccef2a..4441c51 100644
--- a/README.md
+++ b/README.md
@@ -22,15 +22,28 @@ D3 uses [GeoJSON](http://geojson.org/geojson-spec.html) to represent geographic
## Installing
-If you use NPM, `npm install d3-geo`. Otherwise, download the [latest release](https://github.com/d3/d3-geo/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-geo.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:
+If you use npm, `npm install d3-geo`. You can also download the [latest release on GitHub](https://github.com/d3/d3-geo/releases/latest). For vanilla HTML in modern browsers, import d3-geo from Skypack:
```html
-
-
+
+```
+
+For legacy environments, you can load d3-geo’s UMD bundle from an npm-based CDN such as jsDelivr; a `d3` global is exported:
+
+```html
+
+
```
diff --git a/d3-geo.sublime-project b/d3-geo.sublime-project
deleted file mode 100644
index 772dfa5..0000000
--- a/d3-geo.sublime-project
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "folders": [
- {
- "path": ".",
- "file_exclude_patterns": ["*.sublime-workspace"],
- "folder_exclude_patterns": ["dist"]
- }
- ],
- "build_systems": [
- {
- "name": "yarn test",
- "cmd": ["yarn", "test"],
- "file_regex": "\\((...*?):([0-9]*):([0-9]*)\\)",
- "working_dir": "$project_path"
- }
- ]
-}
diff --git a/package.json b/package.json
index 9ad37df..325d2d7 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,11 @@
"name": "d3-geo",
"version": "2.0.1",
"description": "Shapes and calculators for spherical coordinates.",
+ "homepage": "https://d3js.org/d3-geo/",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/d3/d3-geo.git"
+ },
"keywords": [
"d3",
"d3-module",
@@ -9,43 +14,44 @@
"maps",
"cartography"
],
- "homepage": "https://d3js.org/d3-geo/",
- "license": "BSD-3-Clause",
+ "license": "ISC",
"author": {
"name": "Mike Bostock",
"url": "https://bost.ocks.org/mike"
},
- "main": "dist/d3-geo.js",
- "unpkg": "dist/d3-geo.min.js",
- "jsdelivr": "dist/d3-geo.min.js",
- "module": "src/index.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/d3/d3-geo.git"
- },
+ "type": "module",
"files": [
"dist/**/*.js",
"src/**/*.js"
],
- "scripts": {
- "pretest": "rollup -c",
- "test": "tape -r esm 'test/**/*-test.js' && eslint src",
- "prepublishOnly": "rm -rf dist && yarn test && mkdir -p test/output && test/compare-images",
- "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js"
+ "module": "src/index.js",
+ "main": "src/index.js",
+ "jsdelivr": "dist/d3-geo.min.js",
+ "unpkg": "dist/d3-geo.min.js",
+ "exports": {
+ "umd": "./dist/d3-geo.min.js",
+ "default": "./src/index.js"
},
+ "sideEffects": false,
"dependencies": {
- "d3-array": "^2.5.0"
+ "d3-array": "2.5.0 - 3"
},
- "sideEffects": false,
"devDependencies": {
- "canvas": "1 - 2",
- "d3-format": "1 - 2",
- "eslint": "6",
- "esm": "3",
- "rollup": "1",
- "rollup-plugin-terser": "5",
- "tape": "4",
+ "canvas": "2",
+ "d3-format": "1 - 3",
+ "eslint": "7",
+ "mocha": "8",
+ "rollup": "2",
+ "rollup-plugin-terser": "7",
"topojson-client": "3",
"world-atlas": "1"
+ },
+ "scripts": {
+ "test": "mocha 'test/**/*-test.js' && eslint src test",
+ "prepublishOnly": "rm -rf dist && yarn test && rollup -c && mkdir -p test/output && test/compare-images",
+ "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd -"
+ },
+ "engines": {
+ "node": ">=12"
}
}
diff --git a/src/polygonContains.js b/src/polygonContains.js
index 117d200..59baee7 100644
--- a/src/polygonContains.js
+++ b/src/polygonContains.js
@@ -3,10 +3,7 @@ import {cartesian, cartesianCross, cartesianNormalizeInPlace} from "./cartesian.
import {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from "./math.js";
function longitude(point) {
- if (abs(point[0]) <= pi)
- return point[0];
- else
- return sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);
+ return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);
}
export default function(polygon, point) {
diff --git a/test/.eslintrc.json b/test/.eslintrc.json
new file mode 100644
index 0000000..8376ed8
--- /dev/null
+++ b/test/.eslintrc.json
@@ -0,0 +1,11 @@
+{
+ "extends": "eslint:recommended",
+ "parserOptions": {
+ "sourceType": "module",
+ "ecmaVersion": 8
+ },
+ "env": {
+ "mocha": true,
+ "node": true
+ }
+}
diff --git a/test/area-test.js b/test/area-test.js
index 54d8384..3dff89d 100644
--- a/test/area-test.js
+++ b/test/area-test.js
@@ -1,49 +1,43 @@
-var tape = require("tape"),
- array = require("d3-array"),
- d3 = require("../");
-
-require("./inDelta");
+import assert from "assert";
+import {range} from "d3-array";
+import {geoArea, geoCircle, geoGraticule} from "../src/index.js";
+import {assertInDelta} from "./asserts.js";
function stripes(a, b) {
return {type: "Polygon", coordinates: [a, b].map(function(d, i) {
- var stripe = array.range(-180, 180, 0.1).map(function(x) { return [x, d]; });
+ const stripe = range(-180, 180, 0.1).map(function(x) { return [x, d]; });
stripe.push(stripe[0]);
return i ? stripe.reverse() : stripe;
})};
}
-tape("area: Point", function(test) {
- test.equal(d3.geoArea({type: "Point", coordinates: [0, 0]}), 0);
- test.end();
+it("area: Point", () => {
+ assert.strictEqual(geoArea({type: "Point", coordinates: [0, 0]}), 0);
});
-tape("area: MultiPoint", function(test) {
- test.equal(d3.geoArea({type: "MultiPoint", coordinates: [[0, 1], [2, 3]]}), 0);
- test.end();
+it("area: MultiPoint", () => {
+ assert.strictEqual(geoArea({type: "MultiPoint", coordinates: [[0, 1], [2, 3]]}), 0);
});
-tape("area: LineString", function(test) {
- test.equal(d3.geoArea({type: "LineString", coordinates: [[0, 1], [2, 3]]}), 0);
- test.end();
+it("area: LineString", () => {
+ assert.strictEqual(geoArea({type: "LineString", coordinates: [[0, 1], [2, 3]]}), 0);
});
-tape("area: MultiLineString", function(test) {
- test.equal(d3.geoArea({type: "MultiLineString", coordinates: [[[0, 1], [2, 3]], [[4, 5], [6, 7]]]}), 0);
- test.end();
+it("area: MultiLineString", () => {
+ assert.strictEqual(geoArea({type: "MultiLineString", coordinates: [[[0, 1], [2, 3]], [[4, 5], [6, 7]]]}), 0);
});
-tape("area: Polygon - tiny", function(test) {
- test.inDelta(d3.geoArea({type: "Polygon", coordinates: [[
+it("area: Polygon - tiny", () => {
+ assertInDelta(geoArea({type: "Polygon", coordinates: [[
[-64.66070178517852, 18.33986913231323],
[-64.66079715091509, 18.33994007490749],
[-64.66074946804680, 18.33994007490749],
[-64.66070178517852, 18.33986913231323]
]]}), 4.890516e-13, 1e-13);
- test.end();
});
-tape("area: Polygon - zero area", function(test) {
- test.equal(d3.geoArea({
+it("area: Polygon - zero area", () => {
+ assert.strictEqual(geoArea({
"type": "Polygon",
"coordinates": [[
[96.79142432523281, 5.262704519048153],
@@ -53,184 +47,152 @@ tape("area: Polygon - zero area", function(test) {
[96.79142432523281, 5.262704519048153]
]]
}), 0);
- test.end();
});
-tape("area: Polygon - semilune", function(test) {
- test.inDelta(d3.geoArea({type: "Polygon", coordinates: [[[0, 0], [0, 90], [90, 0], [0, 0]]]}), Math.PI / 2, 1e-6);
- test.end();
+it("area: Polygon - semilune", () => {
+ assertInDelta(geoArea({type: "Polygon", coordinates: [[[0, 0], [0, 90], [90, 0], [0, 0]]]}), Math.PI / 2, 1e-6);
});
-tape("area: Polygon - lune", function(test) {
- test.inDelta(d3.geoArea({type: "Polygon", coordinates: [[[0, 0], [0, 90], [90, 0], [0, -90], [0, 0]]]}), Math.PI, 1e-6);
- test.end();
+it("area: Polygon - lune", () => {
+ assertInDelta(geoArea({type: "Polygon", coordinates: [[[0, 0], [0, 90], [90, 0], [0, -90], [0, 0]]]}), Math.PI, 1e-6);
});
-tape("area: Polygon - hemispheres North", function(test) {
- test.inDelta(d3.geoArea({type: "Polygon", coordinates: [[[0, 0], [-90, 0], [180, 0], [90, 0], [0, 0]]]}), 2 * Math.PI, 1e-6);
- test.end();
+it("area: Polygon - hemispheres North", () => {
+ assertInDelta(geoArea({type: "Polygon", coordinates: [[[0, 0], [-90, 0], [180, 0], [90, 0], [0, 0]]]}), 2 * Math.PI, 1e-6);
});
-tape("area: Polygon - hemispheres South", function(test) {
- test.inDelta(d3.geoArea({type: "Polygon", coordinates: [[[0, 0], [90, 0], [180, 0], [-90, 0], [0, 0]]]}), 2 * Math.PI, 1e-6);
- test.end();
+it("area: Polygon - hemispheres South", () => {
+ assertInDelta(geoArea({type: "Polygon", coordinates: [[[0, 0], [90, 0], [180, 0], [-90, 0], [0, 0]]]}), 2 * Math.PI, 1e-6);
});
-tape("area: Polygon - hemispheres East", function(test) {
- test.inDelta(d3.geoArea({type: "Polygon", coordinates: [[[0, 0], [0, 90], [180, 0], [0, -90], [0, 0]]]}), 2 * Math.PI, 1e-6);
- test.end();
+it("area: Polygon - hemispheres East", () => {
+ assertInDelta(geoArea({type: "Polygon", coordinates: [[[0, 0], [0, 90], [180, 0], [0, -90], [0, 0]]]}), 2 * Math.PI, 1e-6);
});
-tape("area: Polygon - hemispheres West", function(test) {
- test.inDelta(d3.geoArea({type: "Polygon", coordinates: [[[0, 0], [0, -90], [180, 0], [0, 90], [0, 0]]]}), 2 * Math.PI, 1e-6);
- test.end();
+it("area: Polygon - hemispheres West", () => {
+ assertInDelta(geoArea({type: "Polygon", coordinates: [[[0, 0], [0, -90], [180, 0], [0, 90], [0, 0]]]}), 2 * Math.PI, 1e-6);
});
-tape("area: Polygon - graticule outline sphere", function(test) {
- test.inDelta(d3.geoArea(d3.geoGraticule().extent([[-180, -90], [180, 90]]).outline()), 4 * Math.PI, 1e-5);
- test.end();
+it("area: Polygon - graticule outline sphere", () => {
+ assertInDelta(geoArea(geoGraticule().extent([[-180, -90], [180, 90]]).outline()), 4 * Math.PI, 1e-5);
});
-tape("area: Polygon - graticule outline hemisphere", function(test) {
- test.inDelta(d3.geoArea(d3.geoGraticule().extent([[-180, 0], [180, 90]]).outline()), 2 * Math.PI, 1e-5);
- test.end();
+it("area: Polygon - graticule outline hemisphere", () => {
+ assertInDelta(geoArea(geoGraticule().extent([[-180, 0], [180, 90]]).outline()), 2 * Math.PI, 1e-5);
});
-tape("area: Polygon - graticule outline semilune", function(test) {
- test.inDelta(d3.geoArea(d3.geoGraticule().extent([[0, 0], [90, 90]]).outline()), Math.PI / 2, 1e-5);
- test.end();
+it("area: Polygon - graticule outline semilune", () => {
+ assertInDelta(geoArea(geoGraticule().extent([[0, 0], [90, 90]]).outline()), Math.PI / 2, 1e-5);
});
-tape("area: Polygon - circles hemisphere", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(90)()), 2 * Math.PI, 1e-5);
- test.end();
+it("area: Polygon - circles hemisphere", () => {
+ assertInDelta(geoArea(geoCircle().radius(90)()), 2 * Math.PI, 1e-5);
});
-tape("area: Polygon - circles 60°", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(60).precision(0.1)()), Math.PI, 1e-5);
- test.end();
+it("area: Polygon - circles 60°", () => {
+ assertInDelta(geoArea(geoCircle().radius(60).precision(0.1)()), Math.PI, 1e-5);
});
-tape("area: Polygon - circles 60° North", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(60).precision(0.1).center([0, 90])()), Math.PI, 1e-5);
- test.end();
+it("area: Polygon - circles 60° North", () => {
+ assertInDelta(geoArea(geoCircle().radius(60).precision(0.1).center([0, 90])()), Math.PI, 1e-5);
});
-tape("area: Polygon - circles 45°", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(45).precision(0.1)()), Math.PI * (2 - Math.SQRT2), 1e-5);
- test.end();
+it("area: Polygon - circles 45°", () => {
+ assertInDelta(geoArea(geoCircle().radius(45).precision(0.1)()), Math.PI * (2 - Math.SQRT2), 1e-5);
});
-tape("area: Polygon - circles 45° North", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(45).precision(0.1).center([0, 90])()), Math.PI * (2 - Math.SQRT2), 1e-5);
- test.end();
+it("area: Polygon - circles 45° North", () => {
+ assertInDelta(geoArea(geoCircle().radius(45).precision(0.1).center([0, 90])()), Math.PI * (2 - Math.SQRT2), 1e-5);
});
-tape("area: Polygon - circles 45° South", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(45).precision(0.1).center([0, -90])()), Math.PI * (2 - Math.SQRT2), 1e-5);
- test.end();
+it("area: Polygon - circles 45° South", () => {
+ assertInDelta(geoArea(geoCircle().radius(45).precision(0.1).center([0, -90])()), Math.PI * (2 - Math.SQRT2), 1e-5);
});
-tape("area: Polygon - circles 135°", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(135).precision(0.1)()), Math.PI * (2 + Math.SQRT2), 1e-5);
- test.end();
+it("area: Polygon - circles 135°", () => {
+ assertInDelta(geoArea(geoCircle().radius(135).precision(0.1)()), Math.PI * (2 + Math.SQRT2), 1e-5);
});
-tape("area: Polygon - circles 135° North", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(135).precision(0.1).center([0, 90])()), Math.PI * (2 + Math.SQRT2), 1e-5);
- test.end();
+it("area: Polygon - circles 135° North", () => {
+ assertInDelta(geoArea(geoCircle().radius(135).precision(0.1).center([0, 90])()), Math.PI * (2 + Math.SQRT2), 1e-5);
});
-tape("area: Polygon - circles 135° South", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(135).precision(0.1).center([0, -90])()), Math.PI * (2 + Math.SQRT2), 1e-5);
- test.end();
+it("area: Polygon - circles 135° South", () => {
+ assertInDelta(geoArea(geoCircle().radius(135).precision(0.1).center([0, -90])()), Math.PI * (2 + Math.SQRT2), 1e-5);
});
-tape("area: Polygon - circles tiny", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(1e-6).precision(0.1)()), 0, 1e-6);
- test.end();
+it("area: Polygon - circles tiny", () => {
+ assertInDelta(geoArea(geoCircle().radius(1e-6).precision(0.1)()), 0, 1e-6);
});
-tape("area: Polygon - circles huge", function(test) {
- test.inDelta(d3.geoArea(d3.geoCircle().radius(180 - 1e-6).precision(0.1)()), 4 * Math.PI, 1e-6);
- test.end();
+it("area: Polygon - circles huge", () => {
+ assertInDelta(geoArea(geoCircle().radius(180 - 1e-6).precision(0.1)()), 4 * Math.PI, 1e-6);
});
-tape("area: Polygon - circles 60° with 45° hole", function(test) {
- var circle = d3.geoCircle().precision(0.1);
- test.inDelta(d3.geoArea({
+it("area: Polygon - circles 60° with 45° hole", () => {
+ const circle = geoCircle().precision(0.1);
+ assertInDelta(geoArea({
type: "Polygon",
coordinates: [
circle.radius(60)().coordinates[0],
circle.radius(45)().coordinates[0].reverse()
]
}), Math.PI * (Math.SQRT2 - 1), 1e-5);
- test.end();
});
-tape("area: Polygon - circles 45° holes at [0°, 0°] and [0°, 90°]", function(test) {
- var circle = d3.geoCircle().precision(0.1).radius(45);
- test.inDelta(d3.geoArea({
+it("area: Polygon - circles 45° holes at [0°, 0°] and [0°, 90°]", () => {
+ const circle = geoCircle().precision(0.1).radius(45);
+ assertInDelta(geoArea({
type: "Polygon",
coordinates: [
circle.center([0, 0])().coordinates[0].reverse(),
circle.center([0, 90])().coordinates[0].reverse()
]
}), Math.PI * 2 * Math.SQRT2, 1e-5);
- test.end();
});
-tape("area: Polygon - circles 45° holes at [0°, 90°] and [0°, 0°]", function(test) {
- var circle = d3.geoCircle().precision(0.1).radius(45);
- test.inDelta(d3.geoArea({
+it("area: Polygon - circles 45° holes at [0°, 90°] and [0°, 0°]", () => {
+ const circle = geoCircle().precision(0.1).radius(45);
+ assertInDelta(geoArea({
type: "Polygon",
coordinates: [
circle.center([0, 90])().coordinates[0].reverse(),
circle.center([0, 0])().coordinates[0].reverse()
]
}), Math.PI * 2 * Math.SQRT2, 1e-5);
- test.end();
});
-tape("area: Polygon - stripes 45°, -45°", function(test) {
- test.inDelta(d3.geoArea(stripes(45, -45)), Math.PI * 2 * Math.SQRT2, 1e-5);
- test.end();
+it("area: Polygon - stripes 45°, -45°", () => {
+ assertInDelta(geoArea(stripes(45, -45)), Math.PI * 2 * Math.SQRT2, 1e-5);
});
-tape("area: Polygon - stripes -45°, 45°", function(test) {
- test.inDelta(d3.geoArea(stripes(-45, 45)), Math.PI * 2 * (2 - Math.SQRT2), 1e-5);
- test.end();
+it("area: Polygon - stripes -45°, 45°", () => {
+ assertInDelta(geoArea(stripes(-45, 45)), Math.PI * 2 * (2 - Math.SQRT2), 1e-5);
});
-tape("area: Polygon - stripes 45°, 30°", function(test) {
- test.inDelta(d3.geoArea(stripes(45, 30)), Math.PI * (Math.SQRT2 - 1), 1e-5);
- test.end();
+it("area: Polygon - stripes 45°, 30°", () => {
+ assertInDelta(geoArea(stripes(45, 30)), Math.PI * (Math.SQRT2 - 1), 1e-5);
});
-tape("area: MultiPolygon two hemispheres", function(test) {
- test.equal(d3.geoArea({type: "MultiPolygon", coordinates: [
+it("area: MultiPolygon two hemispheres", () => {
+ assert.strictEqual(geoArea({type: "MultiPolygon", coordinates: [
[[[0, 0], [-90, 0], [180, 0], [90, 0], [0, 0]]],
[[[0, 0], [90, 0], [180, 0], [-90, 0], [0, 0]]]
]}), 4 * Math.PI);
- test.end();
});
-tape("area: Sphere", function(test) {
- test.equal(d3.geoArea({type: "Sphere"}), 4 * Math.PI);
- test.end();
+it("area: Sphere", () => {
+ assert.strictEqual(geoArea({type: "Sphere"}), 4 * Math.PI);
});
-tape("area: GeometryCollection", function(test) {
- test.equal(d3.geoArea({type: "GeometryCollection", geometries: [{type: "Sphere"}]}), 4 * Math.PI);
- test.end();
+it("area: GeometryCollection", () => {
+ assert.strictEqual(geoArea({type: "GeometryCollection", geometries: [{type: "Sphere"}]}), 4 * Math.PI);
});
-tape("area: FeatureCollection", function(test) {
- test.equal(d3.geoArea({type: "FeatureCollection", features: [{type: "Feature", geometry: {type: "Sphere"}}]}), 4 * Math.PI);
- test.end();
+it("area: FeatureCollection", () => {
+ assert.strictEqual(geoArea({type: "FeatureCollection", features: [{type: "Feature", geometry: {type: "Sphere"}}]}), 4 * Math.PI);
});
-tape("area: Feature", function(test) {
- test.equal(d3.geoArea({type: "Feature", geometry: {type: "Sphere"}}), 4 * Math.PI);
- test.end();
+it("area: Feature", () => {
+ assert.strictEqual(geoArea({type: "Feature", geometry: {type: "Sphere"}}), 4 * Math.PI);
});
diff --git a/test/asserts.js b/test/asserts.js
new file mode 100644
index 0000000..1720a72
--- /dev/null
+++ b/test/asserts.js
@@ -0,0 +1,42 @@
+import assert from "assert";
+
+export function assertPathEqual(actual, expected) {
+ assert.strictEqual(normalizePath(actual + ""), normalizePath(expected + ""));
+}
+
+const reNumber = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g;
+
+function normalizePath(path) {
+ return path.replace(reNumber, formatNumber);
+}
+
+function formatNumber(s) {
+ return Math.abs((s = +s) - Math.round(s)) < 1e-6 ? Math.round(s) : s.toFixed(6);
+}
+
+export function assertInDelta(actual, expected, delta = 1e-6) {
+ assert(inDelta(actual, expected, delta), `${actual} should be within ${delta} of ${expected}`);
+}
+
+function inDelta(actual, expected, delta) {
+ return (Array.isArray(expected) ? inDeltaArray
+ : typeof expected === "object" ? inDeltaObject
+ : inDeltaNumber)(actual, expected, delta);
+}
+
+function inDeltaArray(actual, expected, delta) {
+ let n = expected.length, i = -1;
+ if (actual.length !== n) return false;
+ while (++i < n) if (!inDelta(actual[i], expected[i], delta)) return false;
+ return true;
+}
+
+function inDeltaObject(actual, expected, delta) {
+ for (let i in expected) if (!inDelta(actual[i], expected[i], delta)) return false;
+ for (let i in actual) if (!(i in expected)) return false;
+ return true;
+}
+
+function inDeltaNumber(actual, expected, delta) {
+ return actual >= expected - delta && actual <= expected + delta;
+}
diff --git a/test/bounds-test.js b/test/bounds-test.js
index 41c2bf7..beb8815 100644
--- a/test/bounds-test.js
+++ b/test/bounds-test.js
@@ -1,21 +1,19 @@
-var tape = require("tape"),
- d3 = require("../");
+import assert from "assert";
+import {geoBounds} from "../src/index.js";
+import {assertInDelta} from "./asserts.js";
-require("./inDelta");
-
-tape("bounds: Feature", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: Feature", () => {
+ assert.deepStrictEqual(geoBounds({
type: "Feature",
geometry: {
type: "MultiPoint",
coordinates: [[-123, 39], [-122, 38]]
}
}), [[-123, 38], [-122, 39]]);
- test.end();
});
-tape("bounds: FeatureCollection", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: FeatureCollection", () => {
+ assert.deepStrictEqual(geoBounds({
type: "FeatureCollection",
features: [
{
@@ -34,11 +32,10 @@ tape("bounds: FeatureCollection", function(test) {
}
]
}), [[-123, 38], [-122, 39]]);
- test.end();
});
-tape("bounds: GeometryCollection", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: GeometryCollection", () => {
+ assert.deepStrictEqual(geoBounds({
type: "GeometryCollection",
geometries: [
{
@@ -51,219 +48,193 @@ tape("bounds: GeometryCollection", function(test) {
}
]
}), [[-123, 38], [-122, 39]]);
- test.end();
});
-tape("bounds: LineString - simple", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: LineString - simple", () => {
+ assert.deepStrictEqual(geoBounds({
type: "LineString",
coordinates: [[-123, 39], [-122, 38]]
}), [[-123, 38], [-122, 39]]);
- test.end();
});
-tape("bounds: LineString - symmetry", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: LineString - symmetry", () => {
+ assert.deepStrictEqual(geoBounds({
type: "LineString",
coordinates: [[-30, -20], [130, 40]]
- }), d3.geoBounds({
+ }), geoBounds({
type: "LineString",
coordinates: [[-30, -20], [130, 40]].reverse()
}));
- test.end();
});
-tape("bounds: LineString - containing coincident points", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: LineString - containing coincident points", () => {
+ assert.deepStrictEqual(geoBounds({
type: "LineString",
coordinates: [[-123, 39], [-122, 38], [-122, 38]]
}), [[-123, 38], [-122, 39]]);
- test.end();
});
-tape("bounds: LineString - meridian", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: LineString - meridian", () => {
+ assert.deepStrictEqual(geoBounds({
type: "LineString",
coordinates: [[0, 0], [0, 1], [0, 60]]
}), [[0, 0], [0, 60]]);
- test.end();
});
-tape("bounds: LineString - equator", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: LineString - equator", () => {
+ assert.deepStrictEqual(geoBounds({
type: "LineString",
coordinates: [[0, 0], [1, 0], [60, 0]]
}), [[0, 0], [60, 0]]);
- test.end();
});
-tape("bounds: LineString - containing an inflection point in the Northern hemisphere", function(test) {
- test.inDelta(d3.geoBounds({
+it("bounds: LineString - containing an inflection point in the Northern hemisphere", () => {
+ assertInDelta(geoBounds({
type: "LineString",
coordinates: [[-45, 60], [45, 60]]
}), [[-45, 60], [45, 67.792345]], 1e-6);
- test.end();
});
-tape("bounds: LineString - containing an inflection point in the Southern hemisphere", function(test) {
- test.inDelta(d3.geoBounds({
+it("bounds: LineString - containing an inflection point in the Southern hemisphere", () => {
+ assertInDelta(geoBounds({
type: "LineString",
coordinates: [[-45, -60], [45, -60]]
}), [[-45, -67.792345], [45, -60]], 1e-6);
- test.end();
});
-tape("bounds: MultiLineString", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: MultiLineString", () => {
+ assert.deepStrictEqual(geoBounds({
type: "MultiLineString",
coordinates: [[[-123, 39], [-122, 38]]]
}), [[-123, 38], [-122, 39]]);
- test.end();
});
-tape("bounds: MultiPoint - simple", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: MultiPoint - simple", () => {
+ assert.deepStrictEqual(geoBounds({
type: "MultiPoint",
coordinates: [[-123, 39], [-122, 38]]
}), [[-123, 38], [-122, 39]]);
- test.end();
});
-tape("bounds: MultiPoint - two points near antimeridian", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: MultiPoint - two points near antimeridian", () => {
+ assert.deepStrictEqual(geoBounds({
type: "MultiPoint",
coordinates: [[-179, 39], [179, 38]]
}), [[179, 38], [-179, 39]]);
- test.end();
});
-tape("bounds: MultiPoint - two points near antimeridian, two points near primary meridian", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: MultiPoint - two points near antimeridian, two points near primary meridian", () => {
+ assert.deepStrictEqual(geoBounds({
type: "MultiPoint",
coordinates: [[-179, 39], [179, 38], [-1, 0], [1, 0]]
}), [[-1, 0], [-179, 39]]);
- test.end();
});
-tape("bounds: MultiPoint - two points near primary meridian, two points near antimeridian", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: MultiPoint - two points near primary meridian, two points near antimeridian", () => {
+ assert.deepStrictEqual(geoBounds({
type: "MultiPoint",
coordinates: [[-1, 0], [1, 0], [-179, 39], [179, 38]]
}), [[-1, 0], [-179, 39]]);
- test.end();
});
-tape("bounds: MultiPoint - four mixed points near primary meridian and antimeridian", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: MultiPoint - four mixed points near primary meridian and antimeridian", () => {
+ assert.deepStrictEqual(geoBounds({
type: "MultiPoint",
coordinates: [[-1, 0], [-179, 39], [1, 0], [179, 38]]
}), [[-1, 0], [-179, 39]]);
- test.end();
});
-tape("bounds: MultiPoint - three points near antimeridian", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: MultiPoint - three points near antimeridian", () => {
+ assert.deepStrictEqual(geoBounds({
type: "MultiPoint",
coordinates: [[178, 38], [179, 39], [-179, 37]]
}), [[178, 37], [-179, 39]]);
- test.end();
});
-tape("bounds: MultiPoint - various points near antimeridian", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: MultiPoint - various points near antimeridian", () => {
+ assert.deepStrictEqual(geoBounds({
type: "MultiPoint",
coordinates: [[-179, 39], [-179, 38], [178, 39], [-178, 38]]
}), [[178, 38], [-178, 39]]);
- test.end();
});
-tape("bounds: MultiPolygon", function(test) {
- test.inDelta(d3.geoBounds({
+it("bounds: MultiPolygon", () => {
+ assertInDelta(geoBounds({
type: "MultiPolygon",
coordinates: [
[[[-123, 39], [-122, 39], [-122, 38], [-123, 39]],
[[10, 20], [20, 20], [20, 10], [10, 10], [10, 20]]]
]
}), [[-123, 10], [20, 39.001067]], 1e-6);
- test.end();
});
-tape("bounds: Point", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: Point", () => {
+ assert.deepStrictEqual(geoBounds({
type: "Point",
coordinates: [-123, 39]
}), [[-123, 39], [-123, 39]]);
- test.end();
});
-tape("bounds: Polygon - simple", function(test) {
- test.inDelta(d3.geoBounds({
+it("bounds: Polygon - simple", () => {
+ assertInDelta(geoBounds({
type: "Polygon",
coordinates: [[[-123, 39], [-122, 39], [-122, 38], [-123, 39]]]
}), [[-123, 38], [-122, 39.001067]], 1e-6);
- test.end();
});
-tape("bounds: Polygon - larger than a hemisphere, small, counter-clockwise", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: Polygon - larger than a hemisphere, small, counter-clockwise", () => {
+ assert.deepStrictEqual(geoBounds({
type: "Polygon",
coordinates: [[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]]
}), [[-180, -90], [180, 90]]);
- test.end();
});
-tape("bounds: Polygon - larger than a hemisphere, large lat-lon rectangle", function(test) {
- test.inDelta(d3.geoBounds({
+it("bounds: Polygon - larger than a hemisphere, large lat-lon rectangle", () => {
+ assertInDelta(geoBounds({
type: "Polygon",
coordinates: [[[-170, 80], [0, 80], [170, 80], [170, -80], [0, -80], [-170, -80], [-170, 80]]]
}), [[-170, -89.119552], [170, 89.119552]], 1e-6);
- test.end();
});
-tape("bounds: Polygon - larger than a hemisphere, South pole", function(test) {
- test.inDelta(d3.geoBounds({
+it("bounds: Polygon - larger than a hemisphere, South pole", () => {
+ assertInDelta(geoBounds({
type: "Polygon",
coordinates: [[[10, 80], [170, 80], [-170, 80], [-10, 80], [10, 80]]]
}), [[-180, -90], [180, 88.246216]], 1e-6);
- test.end();
});
-tape("bounds: Polygon - larger than a hemisphere, excluding both poles", function(test) {
- test.inDelta(d3.geoBounds({
+it("bounds: Polygon - larger than a hemisphere, excluding both poles", () => {
+ assertInDelta(geoBounds({
type: "Polygon",
coordinates: [[[10, 80], [170, 80], [-170, 80], [-10, 80], [-10, 0], [-10, -80], [-170, -80], [170, -80], [10, -80], [10, 0], [10, 80]]]
}), [[10, -88.246216], [-10, 88.246216]], 1e-6);
- test.end();
});
-tape("bounds: Polygon - South pole", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: Polygon - South pole", () => {
+ assert.deepStrictEqual(geoBounds({
type: "Polygon",
coordinates: [[[-60, -80], [60, -80], [180, -80], [-60, -80]]]
}), [[-180, -90], [180, -80]]);
- test.end();
});
-tape("bounds: Polygon - ring", function(test) {
- test.inDelta(d3.geoBounds({
+it("bounds: Polygon - ring", () => {
+ assertInDelta(geoBounds({
type: "Polygon",
coordinates: [
[[-60, -80], [60, -80], [180, -80], [-60, -80]],
[[-60, -89], [180, -89], [60, -89], [-60, -89]]
]
}), [[-180, -89.499961], [180, -80]], 1e-6);
- test.end();
});
-tape("bounds: Sphere", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: Sphere", () => {
+ assert.deepStrictEqual(geoBounds({
type: "Sphere"
}), [[-180, -90], [180, 90]]);
- test.end();
});
-tape("bounds: NestedCollection", function(test) {
- test.deepEqual(d3.geoBounds({
+it("bounds: NestedCollection", () => {
+ assert.deepStrictEqual(geoBounds({
type: "FeatureCollection",
features: [
{
@@ -284,41 +255,36 @@ tape("bounds: NestedCollection", function(test) {
}
]
}), [[-120,46], [-119,47]]);
- test.end();
-});
-
-tape("bounds: null geometries - Feature", function(test) {
- var b = d3.geoBounds({type: "Feature", geometry: null});
- test.assert(isNaN(b[0][0]));
- test.assert(isNaN(b[0][1]));
- test.assert(isNaN(b[1][0]));
- test.assert(isNaN(b[1][1]));
- test.end();
-});
-
-tape("bounds: null geometries - MultiPoint", function(test) {
- var b = d3.geoBounds({type: "MultiPoint", coordinates: []});
- test.assert(isNaN(b[0][0]));
- test.assert(isNaN(b[0][1]));
- test.assert(isNaN(b[1][0]));
- test.assert(isNaN(b[1][1]));
- test.end();
-});
-
-tape("bounds: null geometries - MultiLineString", function(test) {
- var b = d3.geoBounds({type: "MultiLineString", coordinates: []});
- test.assert(isNaN(b[0][0]));
- test.assert(isNaN(b[0][1]));
- test.assert(isNaN(b[1][0]));
- test.assert(isNaN(b[1][1]));
- test.end();
-});
-
-tape("bounds: null geometries - MultiPolygon", function(test) {
- var b = d3.geoBounds({type: "MultiPolygon", coordinates: []});
- test.assert(isNaN(b[0][0]));
- test.assert(isNaN(b[0][1]));
- test.assert(isNaN(b[1][0]));
- test.assert(isNaN(b[1][1]));
- test.end();
+});
+
+it("bounds: null geometries - Feature", () => {
+ const b = geoBounds({type: "Feature", geometry: null});
+ assert(isNaN(b[0][0]));
+ assert(isNaN(b[0][1]));
+ assert(isNaN(b[1][0]));
+ assert(isNaN(b[1][1]));
+});
+
+it("bounds: null geometries - MultiPoint", () => {
+ const b = geoBounds({type: "MultiPoint", coordinates: []});
+ assert(isNaN(b[0][0]));
+ assert(isNaN(b[0][1]));
+ assert(isNaN(b[1][0]));
+ assert(isNaN(b[1][1]));
+});
+
+it("bounds: null geometries - MultiLineString", () => {
+ const b = geoBounds({type: "MultiLineString", coordinates: []});
+ assert(isNaN(b[0][0]));
+ assert(isNaN(b[0][1]));
+ assert(isNaN(b[1][0]));
+ assert(isNaN(b[1][1]));
+});
+
+it("bounds: null geometries - MultiPolygon", () => {
+ const b = geoBounds({type: "MultiPolygon", coordinates: []});
+ assert(isNaN(b[0][0]));
+ assert(isNaN(b[0][1]));
+ assert(isNaN(b[1][0]));
+ assert(isNaN(b[1][1]));
});
diff --git a/test/centroid-test.js b/test/centroid-test.js
index e4c2150..1268645 100644
--- a/test/centroid-test.js
+++ b/test/centroid-test.js
@@ -1,218 +1,187 @@
-var tape = require("tape"),
- array = require("d3-array"),
- d3 = require("../");
+import assert from "assert";
+import {readFileSync} from "fs";
+import {range} from "d3-array";
+import {geoCentroid, geoCircle} from "../src/index.js";
+import {assertInDelta} from "./asserts.js";
-require("./inDelta");
-
-tape("the centroid of a point is itself", function(test) {
- test.inDelta(d3.geoCentroid({type: "Point", coordinates: [0, 0]}), [0, 0], 1e-6);
- test.inDelta(d3.geoCentroid({type: "Point", coordinates: [1, 1]}), [1, 1], 1e-6);
- test.inDelta(d3.geoCentroid({type: "Point", coordinates: [2, 3]}), [2, 3], 1e-6);
- test.inDelta(d3.geoCentroid({type: "Point", coordinates: [-4, -5]}), [-4, -5], 1e-6);
- test.end();
+it("the centroid of a point is itself", () => {
+ assertInDelta(geoCentroid({type: "Point", coordinates: [0, 0]}), [0, 0], 1e-6);
+ assertInDelta(geoCentroid({type: "Point", coordinates: [1, 1]}), [1, 1], 1e-6);
+ assertInDelta(geoCentroid({type: "Point", coordinates: [2, 3]}), [2, 3], 1e-6);
+ assertInDelta(geoCentroid({type: "Point", coordinates: [-4, -5]}), [-4, -5], 1e-6);
});
-tape("the centroid of a set of points is the (spherical) average of its constituent members", function(test) {
- test.inDelta(d3.geoCentroid({type: "GeometryCollection", geometries: [{type: "Point", coordinates: [0, 0]}, {type: "Point", coordinates: [1, 2]}]}), [0.499847, 1.000038], 1e-6);
- test.inDelta(d3.geoCentroid({type: "MultiPoint", coordinates: [[0, 0], [1, 2]]}), [0.499847, 1.000038], 1e-6);
- test.inDelta(d3.geoCentroid({type: "MultiPoint", coordinates: [[179, 0], [-179, 0]]}), [180, 0], 1e-6);
- test.end();
+it("the centroid of a set of points is the (spherical) average of its constituent members", () => {
+ assertInDelta(geoCentroid({type: "GeometryCollection", geometries: [{type: "Point", coordinates: [0, 0]}, {type: "Point", coordinates: [1, 2]}]}), [0.499847, 1.000038], 1e-6);
+ assertInDelta(geoCentroid({type: "MultiPoint", coordinates: [[0, 0], [1, 2]]}), [0.499847, 1.000038], 1e-6);
+ assertInDelta(geoCentroid({type: "MultiPoint", coordinates: [[179, 0], [-179, 0]]}), [180, 0], 1e-6);
});
-tape("the centroid of a set of points and their antipodes is ambiguous", function(test) {
- test.ok(d3.geoCentroid({type: "MultiPoint", coordinates: [[0, 0], [180, 0]]}).every(isNaN));
- test.ok(d3.geoCentroid({type: "MultiPoint", coordinates: [[0, 0], [90, 0], [180, 0], [-90, 0]]}).every(isNaN));
- test.ok(d3.geoCentroid({type: "MultiPoint", coordinates: [[0, 0], [0, 90], [180, 0], [0, -90]]}).every(isNaN));
- test.end();
+it("the centroid of a set of points and their antipodes is ambiguous", () => {
+ assert(geoCentroid({type: "MultiPoint", coordinates: [[0, 0], [180, 0]]}).every(isNaN));
+ assert(geoCentroid({type: "MultiPoint", coordinates: [[0, 0], [90, 0], [180, 0], [-90, 0]]}).every(isNaN));
+ assert(geoCentroid({type: "MultiPoint", coordinates: [[0, 0], [0, 90], [180, 0], [0, -90]]}).every(isNaN));
});
-tape("the centroid of the empty set of points is ambiguous", function(test) {
- test.ok(d3.geoCentroid({type: "MultiPoint", coordinates: []}).every(isNaN));
- test.end();
+it("the centroid of the empty set of points is ambiguous", () => {
+ assert(geoCentroid({type: "MultiPoint", coordinates: []}).every(isNaN));
});
-tape("the centroid of a line string is the (spherical) average of its constituent great arc segments", function(test) {
- test.inDelta(d3.geoCentroid({type: "LineString", coordinates: [[0, 0], [1, 0]]}), [0.5, 0], 1e-6);
- test.inDelta(d3.geoCentroid({type: "LineString", coordinates: [[0, 0], [0, 90]]}), [0, 45], 1e-6);
- test.inDelta(d3.geoCentroid({type: "LineString", coordinates: [[0, 0], [0, 45], [0, 90]]}), [0, 45], 1e-6);
- test.inDelta(d3.geoCentroid({type: "LineString", coordinates: [[-1, -1], [1, 1]]}), [0, 0], 1e-6);
- test.inDelta(d3.geoCentroid({type: "LineString", coordinates: [[-60, -1], [60, 1]]}), [0, 0], 1e-6);
- test.inDelta(d3.geoCentroid({type: "LineString", coordinates: [[179, -1], [-179, 1]]}), [180, 0], 1e-6);
- test.inDelta(d3.geoCentroid({type: "LineString", coordinates: [[-179, 0], [0, 0], [179, 0]]}), [0, 0], 1e-6);
- test.inDelta(d3.geoCentroid({type: "LineString", coordinates: [[-180, -90], [0, 0], [0, 90]]}), [0, 0], 1e-6);
- test.end();
+it("the centroid of a line string is the (spherical) average of its constituent great arc segments", () => {
+ assertInDelta(geoCentroid({type: "LineString", coordinates: [[0, 0], [1, 0]]}), [0.5, 0], 1e-6);
+ assertInDelta(geoCentroid({type: "LineString", coordinates: [[0, 0], [0, 90]]}), [0, 45], 1e-6);
+ assertInDelta(geoCentroid({type: "LineString", coordinates: [[0, 0], [0, 45], [0, 90]]}), [0, 45], 1e-6);
+ assertInDelta(geoCentroid({type: "LineString", coordinates: [[-1, -1], [1, 1]]}), [0, 0], 1e-6);
+ assertInDelta(geoCentroid({type: "LineString", coordinates: [[-60, -1], [60, 1]]}), [0, 0], 1e-6);
+ assertInDelta(geoCentroid({type: "LineString", coordinates: [[179, -1], [-179, 1]]}), [180, 0], 1e-6);
+ assertInDelta(geoCentroid({type: "LineString", coordinates: [[-179, 0], [0, 0], [179, 0]]}), [0, 0], 1e-6);
+ assertInDelta(geoCentroid({type: "LineString", coordinates: [[-180, -90], [0, 0], [0, 90]]}), [0, 0], 1e-6);
});
-tape("the centroid of a great arc from a point to its antipode is ambiguous", function(test) {
- test.ok(d3.geoCentroid({type: "LineString", coordinates: [[180, 0], [0, 0]]}).every(isNaN));
- test.ok(d3.geoCentroid({type: "MultiLineString", coordinates: [[[0, -90], [0, 90]]]}).every(isNaN));
- test.end();
+it("the centroid of a great arc from a point to its antipode is ambiguous", () => {
+ assert(geoCentroid({type: "LineString", coordinates: [[180, 0], [0, 0]]}).every(isNaN));
+ assert(geoCentroid({type: "MultiLineString", coordinates: [[[0, -90], [0, 90]]]}).every(isNaN));
});
-tape("the centroid of a set of line strings is the (spherical) average of its constituent great arc segments", function(test) {
- test.inDelta(d3.geoCentroid({type: "MultiLineString", coordinates: [[[0, 0], [0, 2]]]}), [0, 1], 1e-6);
- test.end();
+it("the centroid of a set of line strings is the (spherical) average of its constituent great arc segments", () => {
+ assertInDelta(geoCentroid({type: "MultiLineString", coordinates: [[[0, 0], [0, 2]]]}), [0, 1], 1e-6);
});
-tape("a line of zero length is treated as points", function(test) {
- test.inDelta(d3.geoCentroid({type: "LineString", coordinates: [[1, 1], [1, 1]]}), [1, 1], 1e-6);
- test.inDelta(d3.geoCentroid({type: "GeometryCollection", geometries: [{type: "Point", coordinates: [0, 0]}, {type: "LineString", coordinates: [[1, 2], [1, 2]]}]}), [0.666534, 1.333408], 1e-6);
- test.end();
+it("a line of zero length is treated as points", () => {
+ assertInDelta(geoCentroid({type: "LineString", coordinates: [[1, 1], [1, 1]]}), [1, 1], 1e-6);
+ assertInDelta(geoCentroid({type: "GeometryCollection", geometries: [{type: "Point", coordinates: [0, 0]}, {type: "LineString", coordinates: [[1, 2], [1, 2]]}]}), [0.666534, 1.333408], 1e-6);
});
-tape("an empty polygon with non-zero extent is treated as a line", function(test) {
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [[[1, 1], [2, 1], [3, 1], [2, 1], [1, 1]]]}), [2, 1.000076], 1e-6);
- test.inDelta(d3.geoCentroid({type: "GeometryCollection", geometries: [{type: "Point", coordinates: [0, 0]}, {type: "Polygon", coordinates: [[[1, 2], [1, 2], [1, 2], [1, 2]]]}]}), [0.799907, 1.600077], 1e-6);
- test.end();
+it("an empty polygon with non-zero extent is treated as a line", () => {
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [[[1, 1], [2, 1], [3, 1], [2, 1], [1, 1]]]}), [2, 1.000076], 1e-6);
+ assertInDelta(geoCentroid({type: "GeometryCollection", geometries: [{type: "Point", coordinates: [0, 0]}, {type: "Polygon", coordinates: [[[1, 2], [1, 2], [1, 2], [1, 2]]]}]}), [0.799907, 1.600077], 1e-6);
});
-tape("an empty polygon with zero extent is treated as a point", function(test) {
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [[[1, 1], [1, 1], [1, 1], [1, 1]]]}), [1, 1], 1e-6);
- test.inDelta(d3.geoCentroid({type: "GeometryCollection", geometries: [{type: "Point", coordinates: [0, 0]}, {type: "Polygon", coordinates: [[[1, 2], [1, 2], [1, 2], [1, 2]]]}]}), [0.799907, 1.600077], 1e-6);
- test.end();
+it("an empty polygon with zero extent is treated as a point", () => {
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [[[1, 1], [1, 1], [1, 1], [1, 1]]]}), [1, 1], 1e-6);
+ assertInDelta(geoCentroid({type: "GeometryCollection", geometries: [{type: "Point", coordinates: [0, 0]}, {type: "Polygon", coordinates: [[[1, 2], [1, 2], [1, 2], [1, 2]]]}]}), [0.799907, 1.600077], 1e-6);
});
-tape("the centroid of the equator is ambiguous", function(test) {
- test.ok(d3.geoCentroid({type: "LineString", coordinates: [[0, 0], [120, 0], [-120, 0], [0, 0]]}).every(isNaN));
- test.end();
+it("the centroid of the equator is ambiguous", () => {
+ assert(geoCentroid({type: "LineString", coordinates: [[0, 0], [120, 0], [-120, 0], [0, 0]]}).every(isNaN));
});
-tape("the centroid of a polygon is the (spherical) average of its surface", function(test) {
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [[[0, -90], [0, 0], [0, 90], [1, 0], [0, -90]]]}), [0.5, 0], 1e-6);
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [array.range(-180, 180 + 1 / 2, 1).map(function(x) { return [x, -60]; })]})[1], -90, 1e-6);
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [[[0, -10], [0, 10], [10, 10], [10, -10], [0, -10]]]}), [5, 0], 1e-6);
- test.end();
+it("the centroid of a polygon is the (spherical) average of its surface", () => {
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [[[0, -90], [0, 0], [0, 90], [1, 0], [0, -90]]]}), [0.5, 0], 1e-6);
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [range(-180, 180 + 1 / 2, 1).map(function(x) { return [x, -60]; })]})[1], -90, 1e-6);
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [[[0, -10], [0, 10], [10, 10], [10, -10], [0, -10]]]}), [5, 0], 1e-6);
});
-tape("the centroid of a set of polygons is the (spherical) average of its surface", function(test) {
- var circle = d3.geoCircle();
- test.inDelta(d3.geoCentroid({
+it("the centroid of a set of polygons is the (spherical) average of its surface", () => {
+ const circle = geoCircle();
+ assertInDelta(geoCentroid({
type: "MultiPolygon",
coordinates: [
circle.radius(45).center([90, 0])().coordinates,
circle.radius(60).center([-90, 0])().coordinates
]
}), [-90, 0], 1e-6);
- test.end();
});
-tape("the centroid of a lune is the (spherical) average of its surface", function(test) {
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [[[0, -90], [0, 0], [0, 90], [1, 0], [0, -90]]]}), [0.5, 0], 1e-6);
- test.end();
+it("the centroid of a lune is the (spherical) average of its surface", () => {
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [[[0, -90], [0, 0], [0, 90], [1, 0], [0, -90]]]}), [0.5, 0], 1e-6);
});
-tape("the centroid of a small circle is its center: 5°", function(test) {
- test.inDelta(d3.geoCentroid(d3.geoCircle().radius(5).center([30, 45])()), [30, 45], 1e-6);
- test.end();
+it("the centroid of a small circle is its center: 5°", () => {
+ assertInDelta(geoCentroid(geoCircle().radius(5).center([30, 45])()), [30, 45], 1e-6);
});
-tape("the centroid of a small circle is its center: 135°", function(test) {
- test.inDelta(d3.geoCentroid(d3.geoCircle().radius(135).center([30, 45])()), [30, 45], 1e-6);
- test.end();
+it("the centroid of a small circle is its center: 135°", () => {
+ assertInDelta(geoCentroid(geoCircle().radius(135).center([30, 45])()), [30, 45], 1e-6);
});
-tape("the centroid of a small circle is its center: South Pole", function(test) {
- test.equal(d3.geoCentroid({type: "Polygon", coordinates: [array.range(-180, 180 + 1 / 2, 1).map(function(x) { return [x, -60]; })]})[1], -90);
- test.end();
+it("the centroid of a small circle is its center: South Pole", () => {
+ assert.strictEqual(geoCentroid({type: "Polygon", coordinates: [range(-180, 180 + 1 / 2, 1).map(function(x) { return [x, -60]; })]})[1], -90);
});
-tape("the centroid of a small circle is its center: equator", function(test) {
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [[[0, -10], [0, 10], [10, 10], [10, -10], [0, -10]]]}), [5, 0], 1e-6);
- test.end();
+it("the centroid of a small circle is its center: equator", () => {
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [[[0, -10], [0, 10], [10, 10], [10, -10], [0, -10]]]}), [5, 0], 1e-6);
});
-tape("the centroid of a small circle is its center: equator with coincident points", function(test) {
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [[[0, -10], [0, 10], [0, 10], [10, 10], [10, -10], [0, -10]]]}), [5, 0], 1e-6);
- test.end();
+it("the centroid of a small circle is its center: equator with coincident points", () => {
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [[[0, -10], [0, 10], [0, 10], [10, 10], [10, -10], [0, -10]]]}), [5, 0], 1e-6);
});
-tape("the centroid of a small circle is its center: other", function(test) {
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [[[-180, 0], [-180, 10], [-179, 10], [-179, 0], [-180, 0]]]}), [-179.5, 4.987448], 1e-6);
- test.end();
+it("the centroid of a small circle is its center: other", () => {
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [[[-180, 0], [-180, 10], [-179, 10], [-179, 0], [-180, 0]]]}), [-179.5, 4.987448], 1e-6);
});
-tape("the centroid of a small circle is its center: concentric rings", function(test) {
- var circle = d3.geoCircle().center([0, 45]),
+it("the centroid of a small circle is its center: concentric rings", () => {
+ const circle = geoCircle().center([0, 45]),
coordinates = circle.radius(60)().coordinates;
coordinates.push(circle.radius(45)().coordinates[0].reverse());
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: coordinates}), [0, 45], 1e-6);
- test.end();
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: coordinates}), [0, 45], 1e-6);
});
-tape("the centroid of a spherical square on the equator", function(test) {
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [[[0, -10], [0, 10], [10, 10], [10, -10], [0, -10]]]}), [5, 0], 1e-6);
- test.end();
+it("the centroid of a spherical square on the equator", () => {
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [[[0, -10], [0, 10], [10, 10], [10, -10], [0, -10]]]}), [5, 0], 1e-6);
});
-tape("the centroid of a spherical square touching the antimeridian", function(test) {
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: [[[-180, 0], [-180, 10], [-179, 10], [-179, 0], [-180, 0]]]}), [-179.5, 4.987448], 1e-6);
- test.end();
+it("the centroid of a spherical square touching the antimeridian", () => {
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: [[[-180, 0], [-180, 10], [-179, 10], [-179, 0], [-180, 0]]]}), [-179.5, 4.987448], 1e-6);
});
-tape("concentric rings", function(test) {
- var circle = d3.geoCircle().center([0, 45]),
+it("concentric rings", () => {
+ const circle = geoCircle().center([0, 45]),
coordinates = circle.radius(60)().coordinates;
coordinates.push(circle.radius(45)().coordinates[0].reverse());
- test.inDelta(d3.geoCentroid({type: "Polygon", coordinates: coordinates}), [0, 45], 1e-6);
- test.end();
+ assertInDelta(geoCentroid({type: "Polygon", coordinates: coordinates}), [0, 45], 1e-6);
});
-tape("the centroid of a sphere is ambiguous", function(test) {
- test.ok(d3.geoCentroid({type: "Sphere"}).every(isNaN));
- test.end();
+it("the centroid of a sphere is ambiguous", () => {
+ assert(geoCentroid({type: "Sphere"}).every(isNaN));
});
-tape("the centroid of a feature is the centroid of its constituent geometry", function(test) {
- test.inDelta(d3.geoCentroid({type: "Feature", geometry: {type: "LineString", coordinates: [[1, 1], [1, 1]]}}), [1, 1], 1e-6);
- test.inDelta(d3.geoCentroid({type: "Feature", geometry: {type: "Point", coordinates: [1, 1]}}), [1, 1], 1e-6);
- test.inDelta(d3.geoCentroid({type: "Feature", geometry: {type: "Polygon", coordinates: [[[0, -90], [0, 0], [0, 90], [1, 0], [0, -90]]]}}), [0.5, 0], 1e-6);
- test.end();
+it("the centroid of a feature is the centroid of its constituent geometry", () => {
+ assertInDelta(geoCentroid({type: "Feature", geometry: {type: "LineString", coordinates: [[1, 1], [1, 1]]}}), [1, 1], 1e-6);
+ assertInDelta(geoCentroid({type: "Feature", geometry: {type: "Point", coordinates: [1, 1]}}), [1, 1], 1e-6);
+ assertInDelta(geoCentroid({type: "Feature", geometry: {type: "Polygon", coordinates: [[[0, -90], [0, 0], [0, 90], [1, 0], [0, -90]]]}}), [0.5, 0], 1e-6);
});
-tape("the centroid of a feature collection is the centroid of its constituent geometry", function(test) {
- test.inDelta(d3.geoCentroid({type: "FeatureCollection", features: [
+it("the centroid of a feature collection is the centroid of its constituent geometry", () => {
+ assertInDelta(geoCentroid({type: "FeatureCollection", features: [
{type: "Feature", geometry: {type: "LineString", coordinates: [[179, 0], [180, 0]]}},
{type: "Feature", geometry: {type: "Point", coordinates: [0, 0]}}
]}), [179.5, 0], 1e-6);
- test.end();
});
-tape("the centroid of a non-empty line string and a point only considers the line string", function(test) {
- test.inDelta(d3.geoCentroid({type: "GeometryCollection", geometries: [
+it("the centroid of a non-empty line string and a point only considers the line string", () => {
+ assertInDelta(geoCentroid({type: "GeometryCollection", geometries: [
{type: "LineString", coordinates: [[179, 0], [180, 0]]},
{type: "Point", coordinates: [0, 0]}
]}), [179.5, 0], 1e-6);
- test.end();
});
-tape("the centroid of a non-empty polygon, a non-empty line string and a point only considers the polygon", function(test) {
- test.inDelta(d3.geoCentroid({type: "GeometryCollection", geometries: [
+it("the centroid of a non-empty polygon, a non-empty line string and a point only considers the polygon", () => {
+ assertInDelta(geoCentroid({type: "GeometryCollection", geometries: [
{type: "Polygon", coordinates: [[[-180, 0], [-180, 1], [-179, 1], [-179, 0], [-180, 0]]]},
{type: "LineString", coordinates: [[179, 0], [180, 0]]},
{type: "Point", coordinates: [0, 0]}
]}), [-179.5, 0.500006], 1e-6);
- test.inDelta(d3.geoCentroid({type: "GeometryCollection", geometries: [
+ assertInDelta(geoCentroid({type: "GeometryCollection", geometries: [
{type: "Point", coordinates: [0, 0]},
{type: "LineString", coordinates: [[179, 0], [180, 0]]},
{type: "Polygon", coordinates: [[[-180, 0], [-180, 1], [-179, 1], [-179, 0], [-180, 0]]]}
]}), [-179.5, 0.500006], 1e-6);
- test.end();
});
-tape("the centroid of the sphere and a point is the point", function(test) {
- test.deepEqual(d3.geoCentroid({type: "GeometryCollection", geometries: [
+it("the centroid of the sphere and a point is the point", () => {
+ assert.deepStrictEqual(geoCentroid({type: "GeometryCollection", geometries: [
{type: "Sphere"},
{type: "Point", coordinates: [0, 0]}
]}), [0, 0]);
- test.deepEqual(d3.geoCentroid({type: "GeometryCollection", geometries: [
+ assert.deepStrictEqual(geoCentroid({type: "GeometryCollection", geometries: [
{type: "Point", coordinates: [0, 0]},
{type: "Sphere"}
]}), [0, 0]);
- test.end();
});
-tape("the centroid of a detailed feature is correct", function(test) {
- var ny = require("./data/ny.json");
- test.inDelta(d3.geoCentroid(ny), [-73.93079, 40.69447], 1e-5);
- test.end();
+it("the centroid of a detailed feature is correct", () => {
+ const ny = JSON.parse(readFileSync("./test/data/ny.json"));
+ assertInDelta(geoCentroid(ny), [-73.93079, 40.69447], 1e-5);
});
diff --git a/test/circle-test.js b/test/circle-test.js
index 8f9928d..af3bd20 100644
--- a/test/circle-test.js
+++ b/test/circle-test.js
@@ -1,32 +1,27 @@
-var tape = require("tape"),
- d3 = require("../"),
- array = require("d3-array");
+import assert from "assert";
+import {range} from "d3-array";
+import {geoCircle} from "../src/index.js";
+import {assertInDelta} from "./asserts.js";
-require("./inDelta");
-
-tape("circle generates a Polygon", function(test) {
- var o = d3.geoCircle()();
- test.equal(o.type, "Polygon");
- test.inDelta(o.coordinates, [[[-78.69007,-90],[-90,-84],[-90,-78],[-90,-72],[-90,-66],[-90,-60],[-90,-54],[-90,-48],[-90,-42],[-90,-36],[-90,-30],[-90,-24],[-90,-18],[-90,-12],[-90,-6],[-90,0],[-90,6],[-90,12],[-90,18],[-90,24],[-90,30],[-90,36],[-90,42],[-90,48],[-90,54],[-90,60],[-90,66],[-90,72],[-90,78],[-90,84],[-89.59666,90],[90,84],[90,78],[90,72],[90,66],[90,60],[90,54],[90,48],[90,42],[90,36],[90,30],[90,24],[90,18],[90,12],[90,6],[90,0],[90,-6],[90,-12],[90,-18],[90,-24],[90,-30],[90,-36],[90,-42],[90,-48],[90,-54],[90,-60],[90,-66],[90,-72],[90,-78],[90,-84],[89.56977,-90]]], 1e-5);
- test.end();
+it("circle generates a Polygon", () => {
+ const o = geoCircle()();
+ assert.strictEqual(o.type, "Polygon");
+ assertInDelta(o.coordinates, [[[-78.69007,-90],[-90,-84],[-90,-78],[-90,-72],[-90,-66],[-90,-60],[-90,-54],[-90,-48],[-90,-42],[-90,-36],[-90,-30],[-90,-24],[-90,-18],[-90,-12],[-90,-6],[-90,0],[-90,6],[-90,12],[-90,18],[-90,24],[-90,30],[-90,36],[-90,42],[-90,48],[-90,54],[-90,60],[-90,66],[-90,72],[-90,78],[-90,84],[-89.59666,90],[90,84],[90,78],[90,72],[90,66],[90,60],[90,54],[90,48],[90,42],[90,36],[90,30],[90,24],[90,18],[90,12],[90,6],[90,0],[90,-6],[90,-12],[90,-18],[90,-24],[90,-30],[90,-36],[90,-42],[90,-48],[90,-54],[90,-60],[90,-66],[90,-72],[90,-78],[90,-84],[89.56977,-90]]], 1e-5);
});
-tape("circle.center([0, 90])", function(test) {
- var o = d3.geoCircle().center([0, 90])();
- test.equal(o.type, "Polygon");
- test.inDelta(o.coordinates, [array.range(360, -1, -6).map(function(x) { return [x >= 180 ? x - 360 : x, 0]; })], 1e-6);
- test.end();
+it("circle.center([0, 90])", () => {
+ const o = geoCircle().center([0, 90])();
+ assert.strictEqual(o.type, "Polygon");
+ assertInDelta(o.coordinates, [range(360, -1, -6).map(function(x) { return [x >= 180 ? x - 360 : x, 0]; })], 1e-6);
});
-tape("circle.center([45, 45])", function(test) {
- var o = d3.geoCircle().center([45, 45]).radius(0)();
- test.equal(o.type, "Polygon");
- test.inDelta(o.coordinates[0][0], [45, 45], 1e-6);
- test.end();
+it("circle.center([45, 45])", () => {
+ const o = geoCircle().center([45, 45]).radius(0)();
+ assert.strictEqual(o.type, "Polygon");
+ assertInDelta(o.coordinates[0][0], [45, 45], 1e-6);
});
-tape("circle: first and last points are coincident", function(test) {
- var o = d3.geoCircle().center([0, 0]).radius(0.02).precision(45)();
- test.inDelta(o.coordinates[0][0], o.coordinates[0].pop(), 1e-6);
- test.end();
+it("circle: first and last points are coincident", () => {
+ const o = geoCircle().center([0, 0]).radius(0.02).precision(45)();
+ assertInDelta(o.coordinates[0][0], o.coordinates[0].pop(), 1e-6);
});
diff --git a/test/compare-images b/test/compare-images
index dd06eb4..4ab331b 100755
--- a/test/compare-images
+++ b/test/compare-images
@@ -15,7 +15,7 @@ for i in \
orthographic \
stereographic \
transverseMercator; do
- test/render-world $i > test/output/$i.png \
+ node test/render-world.js $i > test/output/$i.png \
&& [ "$(gm compare -metric rmse img/$i.png test/output/$i.png 2>&1)" = "Image Difference (RootMeanSquaredError):
Normalized Absolute
============ ==========
@@ -32,7 +32,7 @@ done
for i in \
albers \
albersUsa; do
- test/render-us $i > test/output/$i.png \
+ node test/render-us.js $i > test/output/$i.png \
&& [ "$(gm compare -metric rmse img/$i.png test/output/$i.png 2>&1)" = "Image Difference (RootMeanSquaredError):
Normalized Absolute
============ ==========
diff --git a/test/compute-scale b/test/compute-scale.js
similarity index 62%
rename from test/compute-scale
rename to test/compute-scale.js
index d6bba61..00d7d40 100755
--- a/test/compute-scale
+++ b/test/compute-scale.js
@@ -1,19 +1,18 @@
#!/usr/bin/env node
-var width = 960 - 1,
- height = 500 - 1,
- projectionName = process.argv[2],
- projectionSymbol = "geo" + projectionName[0].toUpperCase() + projectionName.slice(1);
+import {format} from "d3-format";
+import * as d3 from "../src/index.js";
-if (!/^[a-z0-9]+$/i.test(projectionName)) throw new Error;
+const width = 960 - 1;
+const height = 500 - 1;
+const projectionName = process.argv[2];
+const projectionSymbol = "geo" + projectionName[0].toUpperCase() + projectionName.slice(1);
-var topojson = require("topojson-client"),
- d3_format = require("d3-format"),
- d3_geo = require("../");
+if (!/^[a-z0-9]+$/i.test(projectionName)) throw new Error;
-var formatNumber = d3_format.format(".6");
+const formatNumber = format(".6");
-var projection = d3_geo[projectionSymbol]()
+const projection = d3[projectionSymbol]()
.precision(0.01)
.scale(1)
.translate([0, 0])
@@ -21,7 +20,7 @@ var projection = d3_geo[projectionSymbol]()
if (projection.rotate) projection.rotate([0, 0]);
-var land = {type: "Sphere"};
+const land = {type: "Sphere"};
switch (projectionName) {
case "conicConformal":
@@ -31,10 +30,10 @@ switch (projectionName) {
}
}
-var path = d3_geo.geoPath()
+const path = d3.geoPath()
.projection(projection);
-var bounds = path.bounds(land),
+const bounds = path.bounds(land),
dx = bounds[1][0] - bounds[0][0],
dy = bounds[1][1] - bounds[0][1],
cx = (bounds[1][0] + bounds[0][0]) / 2,
diff --git a/test/contains-test.js b/test/contains-test.js
index 7864963..4cf22dc 100644
--- a/test/contains-test.js
+++ b/test/contains-test.js
@@ -1,124 +1,110 @@
-var tape = require("tape"),
- array = require("d3-array"),
- d3 = require("../");
+import assert from "assert";
+import {geoCircle, geoContains, geoInterpolate} from "../src/index.js";
-tape("a sphere contains any point", function(test) {
- test.equal(d3.geoContains({type: "Sphere"}, [0, 0]), true);
- test.end();
+it("a sphere contains any point", () => {
+ assert.strictEqual(geoContains({type: "Sphere"}, [0, 0]), true);
});
-tape("a point contains itself (and not some other point)", function(test) {
- test.equal(d3.geoContains({type: "Point", coordinates: [0, 0]}, [0, 0]), true);
- test.equal(d3.geoContains({type: "Point", coordinates: [1, 2]}, [1, 2]), true);
- test.equal(d3.geoContains({type: "Point", coordinates: [0, 0]}, [0, 1]), false);
- test.equal(d3.geoContains({type: "Point", coordinates: [1, 1]}, [1, 0]), false);
- test.end();
+it("a point contains itself (and not some other point)", () => {
+ assert.strictEqual(geoContains({type: "Point", coordinates: [0, 0]}, [0, 0]), true);
+ assert.strictEqual(geoContains({type: "Point", coordinates: [1, 2]}, [1, 2]), true);
+ assert.strictEqual(geoContains({type: "Point", coordinates: [0, 0]}, [0, 1]), false);
+ assert.strictEqual(geoContains({type: "Point", coordinates: [1, 1]}, [1, 0]), false);
});
-tape("a MultiPoint contains any of its points", function(test) {
- test.equal(d3.geoContains({type: "MultiPoint", coordinates: [[0, 0], [1,2]]}, [0, 0]), true);
- test.equal(d3.geoContains({type: "MultiPoint", coordinates: [[0, 0], [1,2]]}, [1, 2]), true);
- test.equal(d3.geoContains({type: "MultiPoint", coordinates: [[0, 0], [1,2]]}, [1, 3]), false);
- test.end();
+it("a MultiPoint contains any of its points", () => {
+ assert.strictEqual(geoContains({type: "MultiPoint", coordinates: [[0, 0], [1,2]]}, [0, 0]), true);
+ assert.strictEqual(geoContains({type: "MultiPoint", coordinates: [[0, 0], [1,2]]}, [1, 2]), true);
+ assert.strictEqual(geoContains({type: "MultiPoint", coordinates: [[0, 0], [1,2]]}, [1, 3]), false);
});
-tape("a LineString contains any point on the Great Circle path", function(test) {
- test.equal(d3.geoContains({type: "LineString", coordinates: [[0, 0], [1,2]]}, [0, 0]), true);
- test.equal(d3.geoContains({type: "LineString", coordinates: [[0, 0], [1,2]]}, [1, 2]), true);
- test.equal(d3.geoContains({type: "LineString", coordinates: [[0, 0], [1,2]]}, d3.geoInterpolate([0, 0], [1,2])(0.3)), true);
- test.equal(d3.geoContains({type: "LineString", coordinates: [[0, 0], [1,2]]}, d3.geoInterpolate([0, 0], [1,2])(1.3)), false);
- test.equal(d3.geoContains({type: "LineString", coordinates: [[0, 0], [1,2]]}, d3.geoInterpolate([0, 0], [1,2])(-0.3)), false);
- test.end();
+it("a LineString contains any point on the Great Circle path", () => {
+ assert.strictEqual(geoContains({type: "LineString", coordinates: [[0, 0], [1,2]]}, [0, 0]), true);
+ assert.strictEqual(geoContains({type: "LineString", coordinates: [[0, 0], [1,2]]}, [1, 2]), true);
+ assert.strictEqual(geoContains({type: "LineString", coordinates: [[0, 0], [1,2]]}, geoInterpolate([0, 0], [1,2])(0.3)), true);
+ assert.strictEqual(geoContains({type: "LineString", coordinates: [[0, 0], [1,2]]}, geoInterpolate([0, 0], [1,2])(1.3)), false);
+ assert.strictEqual(geoContains({type: "LineString", coordinates: [[0, 0], [1,2]]}, geoInterpolate([0, 0], [1,2])(-0.3)), false);
});
-tape("a LineString with 2+ points contains those points", function(test) {
- var points = [[0, 0], [1,2], [3, 4], [5, 6]];
- var feature = {type: "LineString", coordinates: points};
+it("a LineString with 2+ points contains those points", () => {
+ const points = [[0, 0], [1,2], [3, 4], [5, 6]];
+ const feature = {type: "LineString", coordinates: points};
points.forEach(point => {
- test.equal(d3.geoContains(feature, point), true);
+ assert.strictEqual(geoContains(feature, point), true);
});
- test.end();
});
-tape("a LineString contains epsilon-distant points", function(test) {
- var epsilon = 1e-6;
- var line = [[0, 0], [0, 10], [10, 10], [10, 0]];
- var points = [[0, 5], [epsilon * 1, 5], [0, epsilon], [epsilon * 1, epsilon]];
+it("a LineString contains epsilon-distant points", () => {
+ const epsilon = 1e-6;
+ const line = [[0, 0], [0, 10], [10, 10], [10, 0]];
+ const points = [[0, 5], [epsilon * 1, 5], [0, epsilon], [epsilon * 1, epsilon]];
points.forEach(point => {
- test.true(d3.geoContains({type:"LineString", coordinates: line}, point));
+ assert(geoContains({type:"LineString", coordinates: line}, point));
});
- test.end();
});
-tape("a LineString does not contain 10*epsilon-distant points", function(test) {
- var epsilon = 1e-6;
- var line = [[0, 0], [0, 10], [10, 10], [10, 0]];
- var points = [[epsilon * 10, 5], [epsilon * 10, epsilon]];
+it("a LineString does not contain 10*epsilon-distant points", () => {
+ const epsilon = 1e-6;
+ const line = [[0, 0], [0, 10], [10, 10], [10, 0]];
+ const points = [[epsilon * 10, 5], [epsilon * 10, epsilon]];
points.forEach(point => {
- test.false(d3.geoContains({type:"LineString", coordinates: line}, point));
+ assert(!geoContains({type:"LineString", coordinates: line}, point));
});
- test.end();
});
-tape("a MultiLineString contains any point on one of its components", function(test) {
- test.equal(d3.geoContains({type: "MultiLineString", coordinates: [[[0, 0], [1,2]], [[2, 3], [4,5]]]}, [2, 3]), true);
- test.equal(d3.geoContains({type: "MultiLineString", coordinates: [[[0, 0], [1,2]], [[2, 3], [4,5]]]}, [5, 6]), false);
- test.end();
+it("a MultiLineString contains any point on one of its components", () => {
+ assert.strictEqual(geoContains({type: "MultiLineString", coordinates: [[[0, 0], [1,2]], [[2, 3], [4,5]]]}, [2, 3]), true);
+ assert.strictEqual(geoContains({type: "MultiLineString", coordinates: [[[0, 0], [1,2]], [[2, 3], [4,5]]]}, [5, 6]), false);
});
-tape("a Polygon contains a point", function(test) {
- var polygon = d3.geoCircle().radius(60)();
- test.equal(d3.geoContains(polygon, [1, 1]), true);
- test.equal(d3.geoContains(polygon, [-180, 0]), false);
- test.end();
+it("a Polygon contains a point", () => {
+ const polygon = geoCircle().radius(60)();
+ assert.strictEqual(geoContains(polygon, [1, 1]), true);
+ assert.strictEqual(geoContains(polygon, [-180, 0]), false);
});
-tape("a Polygon with a hole doesn't contain a point", function(test) {
- var outer = d3.geoCircle().radius(60)().coordinates[0],
- inner = d3.geoCircle().radius(3)().coordinates[0],
+it("a Polygon with a hole doesn't contain a point", () => {
+ const outer = geoCircle().radius(60)().coordinates[0],
+ inner = geoCircle().radius(3)().coordinates[0],
polygon = {type:"Polygon", coordinates: [outer, inner]};
- test.equal(d3.geoContains(polygon, [1, 1]), false);
- test.equal(d3.geoContains(polygon, [5, 0]), true);
- test.equal(d3.geoContains(polygon, [65, 0]), false);
- test.end();
+ assert.strictEqual(geoContains(polygon, [1, 1]), false);
+ assert.strictEqual(geoContains(polygon, [5, 0]), true);
+ assert.strictEqual(geoContains(polygon, [65, 0]), false);
});
-tape("a MultiPolygon contains a point", function(test) {
- var p1 = d3.geoCircle().radius(6)().coordinates,
- p2 = d3.geoCircle().radius(6).center([90,0])().coordinates,
+it("a MultiPolygon contains a point", () => {
+ const p1 = geoCircle().radius(6)().coordinates,
+ p2 = geoCircle().radius(6).center([90,0])().coordinates,
polygon = {type:"MultiPolygon", coordinates: [p1, p2]};
- test.equal(d3.geoContains(polygon, [1, 0]), true);
- test.equal(d3.geoContains(polygon, [90, 1]), true);
- test.equal(d3.geoContains(polygon, [90, 45]), false);
- test.end();
+ assert.strictEqual(geoContains(polygon, [1, 0]), true);
+ assert.strictEqual(geoContains(polygon, [90, 1]), true);
+ assert.strictEqual(geoContains(polygon, [90, 45]), false);
});
-tape("a GeometryCollection contains a point", function(test) {
- var collection = {
+it("a GeometryCollection contains a point", () => {
+ const collection = {
type: "GeometryCollection", geometries: [
{type: "GeometryCollection", geometries: [{type: "LineString", coordinates: [[-45, 0], [0, 0]]}]},
{type: "LineString", coordinates: [[0, 0], [45, 0]]}
]
};
- test.equal(d3.geoContains(collection, [-45, 0]), true);
- test.equal(d3.geoContains(collection, [45, 0]), true);
- test.equal(d3.geoContains(collection, [12, 25]), false);
- test.end();
+ assert.strictEqual(geoContains(collection, [-45, 0]), true);
+ assert.strictEqual(geoContains(collection, [45, 0]), true);
+ assert.strictEqual(geoContains(collection, [12, 25]), false);
});
-tape("a Feature contains a point", function(test) {
- var feature = {
+it("a Feature contains a point", () => {
+ const feature = {
type: "Feature", geometry: {
type: "LineString", coordinates: [[0, 0], [45, 0]]
}
};
- test.equal(d3.geoContains(feature, [45, 0]), true);
- test.equal(d3.geoContains(feature, [12, 25]), false);
- test.end();
+ assert.strictEqual(geoContains(feature, [45, 0]), true);
+ assert.strictEqual(geoContains(feature, [12, 25]), false);
});
-tape("a FeatureCollection contains a point", function(test) {
- var feature1 = {
+it("a FeatureCollection contains a point", () => {
+ const feature1 = {
type: "Feature", geometry: {
type: "LineString", coordinates: [[0, 0], [45, 0]]
}
@@ -132,14 +118,12 @@ tape("a FeatureCollection contains a point", function(test) {
type: "FeatureCollection",
features: [ feature1, feature2 ]
};
- test.equal(d3.geoContains(featureCollection, [45, 0]), true);
- test.equal(d3.geoContains(featureCollection, [-45, 0]), true);
- test.equal(d3.geoContains(featureCollection, [12, 25]), false);
- test.end();
+ assert.strictEqual(geoContains(featureCollection, [45, 0]), true);
+ assert.strictEqual(geoContains(featureCollection, [-45, 0]), true);
+ assert.strictEqual(geoContains(featureCollection, [12, 25]), false);
});
-tape("null contains nothing", function(test) {
- test.equal(d3.geoContains(null, [0, 0]), false);
- test.end();
+it("null contains nothing", () => {
+ assert.strictEqual(geoContains(null, [0, 0]), false);
});
diff --git a/test/distance-test.js b/test/distance-test.js
index 34a3889..11d13ee 100644
--- a/test/distance-test.js
+++ b/test/distance-test.js
@@ -1,15 +1,12 @@
-var tape = require("tape"),
- d3 = require("../");
+import assert from "assert";
+import {geoDistance} from "../src/index.js";
+import {assertInDelta} from "./asserts.js";
-require("./inDelta");
-
-tape("geoDistance(a, b) computes the great-arc distance in radians between the two points a and b", function(test) {
- test.equal(d3.geoDistance([0, 0], [0, 0]), 0);
- test.inDelta(d3.geoDistance([118 + 24 / 60, 33 + 57 / 60], [73 + 47 / 60, 40 + 38 / 60]), 3973 / 6371, 0.5);
- test.end();
+it("geoDistance(a, b) computes the great-arc distance in radians between the two points a and b", () => {
+ assert.strictEqual(geoDistance([0, 0], [0, 0]), 0);
+ assertInDelta(geoDistance([118 + 24 / 60, 33 + 57 / 60], [73 + 47 / 60, 40 + 38 / 60]), 3973 / 6371, 0.5);
});
-tape("geoDistance(a, b) correctly computes small distances", function(test) {
- test.assert(d3.geoDistance([0, 0], [0, 1e-12]) > 0);
- test.end();
+it("geoDistance(a, b) correctly computes small distances", () => {
+ assert(geoDistance([0, 0], [0, 1e-12]) > 0);
});
diff --git a/test/graticule-test.js b/test/graticule-test.js
index b0bbeee..b0e6736 100644
--- a/test/graticule-test.js
+++ b/test/graticule-test.js
@@ -1,158 +1,137 @@
-var tape = require("tape"),
- array = require("d3-array"),
- d3 = require("../");
+import assert from "assert";
+import {extent} from "d3-array";
+import {geoGraticule} from "../src/index.js";
-require("./inDelta");
-
-tape("graticule.extent(…) sets extentMinor and extentMajor", function(test) {
- var g = d3.geoGraticule().extent([[-90, -45], [90, 45]]);
- test.deepEqual(g.extentMinor(), [[-90, -45], [90, 45]]);
- test.deepEqual(g.extentMajor(), [[-90, -45], [90, 45]]);
- test.end();
+it("graticule.extent(…) sets extentMinor and extentMajor", () => {
+ const g = geoGraticule().extent([[-90, -45], [90, 45]]);
+ assert.deepStrictEqual(g.extentMinor(), [[-90, -45], [90, 45]]);
+ assert.deepStrictEqual(g.extentMajor(), [[-90, -45], [90, 45]]);
});
-tape("graticule.extent() gets extentMinor", function(test) {
- var g = d3.geoGraticule().extentMinor([[-90, -45], [90, 45]]);
- test.deepEqual(g.extent(), [[-90, -45], [90, 45]]);
- test.end();
+it("graticule.extent() gets extentMinor", () => {
+ const g = geoGraticule().extentMinor([[-90, -45], [90, 45]]);
+ assert.deepStrictEqual(g.extent(), [[-90, -45], [90, 45]]);
});
-tape("graticule.extentMajor() default longitude ranges from 180°W (inclusive) to 180°E (exclusive)", function(test) {
- var extent = d3.geoGraticule().extentMajor();
- test.equal(extent[0][0], -180);
- test.equal(extent[1][0], +180);
- test.end();
+it("graticule.extentMajor() default longitude ranges from 180°W (inclusive) to 180°E (exclusive)", () => {
+ const e = geoGraticule().extentMajor();
+ assert.strictEqual(e[0][0], -180);
+ assert.strictEqual(e[1][0], +180);
});
-tape("graticule.extentMajor() default latitude ranges from 90°S (exclusive) to 90°N (exclusive)", function(test) {
- var extent = d3.geoGraticule().extentMajor();
- test.equal(extent[0][1], -90 + 1e-6);
- test.equal(extent[1][1], +90 - 1e-6);
- test.end();
+it("graticule.extentMajor() default latitude ranges from 90°S (exclusive) to 90°N (exclusive)", () => {
+ const e = geoGraticule().extentMajor();
+ assert.strictEqual(e[0][1], -90 + 1e-6);
+ assert.strictEqual(e[1][1], +90 - 1e-6);
});
-tape("graticule.extentMajor(…) coerces input values to numbers", function(test) {
- var g = d3.geoGraticule().extentMajor([["-90", "-45"], ["+90", "+45"]]),
- extent = g.extentMajor();
- test.strictEqual(extent[0][0], -90);
- test.strictEqual(extent[0][1], -45);
- test.strictEqual(extent[1][0], +90);
- test.strictEqual(extent[1][1], +45);
- test.end();
+it("graticule.extentMajor(…) coerces input values to numbers", () => {
+ const g = geoGraticule().extentMajor([["-90", "-45"], ["+90", "+45"]]);
+ const e = g.extentMajor();
+ assert.strictEqual(e[0][0], -90);
+ assert.strictEqual(e[0][1], -45);
+ assert.strictEqual(e[1][0], +90);
+ assert.strictEqual(e[1][1], +45);
});
-tape("graticule.extentMinor() default longitude ranges from 180°W (inclusive) to 180°E (exclusive)", function(test) {
- var extent = d3.geoGraticule().extentMinor();
- test.equal(extent[0][0], -180);
- test.equal(extent[1][0], +180);
- test.end();
+it("graticule.extentMinor() default longitude ranges from 180°W (inclusive) to 180°E (exclusive)", () => {
+ const e = geoGraticule().extentMinor();
+ assert.strictEqual(e[0][0], -180);
+ assert.strictEqual(e[1][0], +180);
});
-tape("graticule.extentMinor() default latitude ranges from 80°S (inclusive) to 80°N (inclusive)", function(test) {
- var extent = d3.geoGraticule().extentMinor();
- test.equal(extent[0][1], -80 - 1e-6);
- test.equal(extent[1][1], +80 + 1e-6);
- test.end();
+it("graticule.extentMinor() default latitude ranges from 80°S (inclusive) to 80°N (inclusive)", () => {
+ const e = geoGraticule().extentMinor();
+ assert.strictEqual(e[0][1], -80 - 1e-6);
+ assert.strictEqual(e[1][1], +80 + 1e-6);
});
-tape("graticule.extentMinor(…) coerces input values to numbers", function(test) {
- var g = d3.geoGraticule().extentMinor([["-90", "-45"], ["+90", "+45"]]),
- extent = g.extentMinor();
- test.strictEqual(extent[0][0], -90);
- test.strictEqual(extent[0][1], -45);
- test.strictEqual(extent[1][0], +90);
- test.strictEqual(extent[1][1], +45);
- test.end();
+it("graticule.extentMinor(…) coerces input values to numbers", () => {
+ const g = geoGraticule().extentMinor([["-90", "-45"], ["+90", "+45"]]);
+ const e = g.extentMinor();
+ assert.strictEqual(e[0][0], -90);
+ assert.strictEqual(e[0][1], -45);
+ assert.strictEqual(e[1][0], +90);
+ assert.strictEqual(e[1][1], +45);
});
-tape("graticule.step(…) sets the minor and major step", function(test) {
- var g = d3.geoGraticule().step([22.5, 22.5]);
- test.deepEqual(g.stepMinor(), [22.5, 22.5]);
- test.deepEqual(g.stepMajor(), [22.5, 22.5]);
- test.end();
+it("graticule.step(…) sets the minor and major step", () => {
+ const g = geoGraticule().step([22.5, 22.5]);
+ assert.deepStrictEqual(g.stepMinor(), [22.5, 22.5]);
+ assert.deepStrictEqual(g.stepMajor(), [22.5, 22.5]);
});
-tape("graticule.step() gets the minor step", function(test) {
- var g = d3.geoGraticule().stepMinor([22.5, 22.5]);
- test.deepEqual(g.step(), [22.5, 22.5]);
- test.end();
+it("graticule.step() gets the minor step", () => {
+ const g = geoGraticule().stepMinor([22.5, 22.5]);
+ assert.deepStrictEqual(g.step(), [22.5, 22.5]);
});
-tape("graticule.stepMinor() defaults to 10°, 10°", function(test) {
- test.deepEqual(d3.geoGraticule().stepMinor(), [10, 10]);
- test.end();
+it("graticule.stepMinor() defaults to 10°, 10°", () => {
+ assert.deepStrictEqual(geoGraticule().stepMinor(), [10, 10]);
});
-tape("graticule.stepMinor(…) coerces input values to numbers", function(test) {
- var g = d3.geoGraticule().stepMinor(["45", "11.25"]),
- step = g.stepMinor();
- test.strictEqual(step[0], 45);
- test.strictEqual(step[1], 11.25);
- test.end();
+it("graticule.stepMinor(…) coerces input values to numbers", () => {
+ const g = geoGraticule().stepMinor(["45", "11.25"]);
+ const s = g.stepMinor();
+ assert.strictEqual(s[0], 45);
+ assert.strictEqual(s[1], 11.25);
});
-tape("graticule.stepMajor() defaults to 90°, 360°", function(test) {
- test.deepEqual(d3.geoGraticule().stepMajor(), [90, 360]);
- test.end();
+it("graticule.stepMajor() defaults to 90°, 360°", () => {
+ assert.deepStrictEqual(geoGraticule().stepMajor(), [90, 360]);
});
-tape("graticule.stepMajor(…) coerces input values to numbers", function(test) {
- var g = d3.geoGraticule().stepMajor(["45", "11.25"]),
- step = g.stepMajor();
- test.strictEqual(step[0], 45);
- test.strictEqual(step[1], 11.25);
- test.end();
+it("graticule.stepMajor(…) coerces input values to numbers", () => {
+ const g = geoGraticule().stepMajor(["45", "11.25"]);
+ const s = g.stepMajor();
+ assert.strictEqual(s[0], 45);
+ assert.strictEqual(s[1], 11.25);
});
-tape("graticule.lines() default longitude ranges from 180°W (inclusive) to 180°E (exclusive)", function(test) {
- var lines = d3.geoGraticule().lines()
- .filter(function(line) { return line.coordinates[0][0] === line.coordinates[1][0]; })
- .sort(function(a, b) { return a.coordinates[0][0] - b.coordinates[0][0]; });
- test.equal(lines[0].coordinates[0][0], -180);
- test.equal(lines[lines.length - 1].coordinates[0][0], +170);
- test.end();
+it("graticule.lines() default longitude ranges from 180°W (inclusive) to 180°E (exclusive)", () => {
+ const lines = geoGraticule().lines()
+ .filter((line) => line.coordinates[0][0] === line.coordinates[1][0])
+ .sort((a, b) => a.coordinates[0][0] - b.coordinates[0][0]);
+ assert.strictEqual(lines[0].coordinates[0][0], -180);
+ assert.strictEqual(lines[lines.length - 1].coordinates[0][0], +170);
});
-tape("graticule.lines() default latitude ranges from 90°S (exclusive) to 90°N (exclusive)", function(test) {
- var lines = d3.geoGraticule().lines()
- .filter(function(line) { return line.coordinates[0][1] === line.coordinates[1][1]; })
- .sort(function(a, b) { return a.coordinates[0][1] - b.coordinates[0][1]; });
- test.equal(lines[0].coordinates[0][1], -80);
- test.equal(lines[lines.length - 1].coordinates[0][1], +80);
- test.end();
+it("graticule.lines() default latitude ranges from 90°S (exclusive) to 90°N (exclusive)", () => {
+ const lines = geoGraticule().lines()
+ .filter(line => line.coordinates[0][1] === line.coordinates[1][1])
+ .sort((a, b) => a.coordinates[0][1] - b.coordinates[0][1]);
+ assert.strictEqual(lines[0].coordinates[0][1], -80);
+ assert.strictEqual(lines[lines.length - 1].coordinates[0][1], +80);
});
-tape("graticule.lines() default minor longitude lines extend from 80°S to 80°N", function(test) {
- var lines = d3.geoGraticule().lines()
- .filter(function(line) { return line.coordinates[0][0] === line.coordinates[1][0]; })
- .filter(function(line) { return Math.abs(line.coordinates[0][0] % 90) > 1e-6; });
+it("graticule.lines() default minor longitude lines extend from 80°S to 80°N", () => {
+ const lines = geoGraticule().lines()
+ .filter(line => line.coordinates[0][0] === line.coordinates[1][0])
+ .filter(line => Math.abs(line.coordinates[0][0] % 90) > 1e-6);
lines.forEach(function(line) {
- test.deepEqual(array.extent(line.coordinates, function(p) { return p[1]; }), [-80 - 1e-6, +80 + 1e-6]);
+ assert.deepStrictEqual(extent(line.coordinates, p => p[1]), [-80 - 1e-6, +80 + 1e-6]);
});
- test.end();
});
-tape("graticule.lines() default major longitude lines extend from 90°S to 90°N", function(test) {
- var lines = d3.geoGraticule().lines()
- .filter(function(line) { return line.coordinates[0][0] === line.coordinates[1][0]; })
- .filter(function(line) { return Math.abs(line.coordinates[0][0] % 90) < 1e-6; });
+it("graticule.lines() default major longitude lines extend from 90°S to 90°N", () => {
+ const lines = geoGraticule().lines()
+ .filter(line => line.coordinates[0][0] === line.coordinates[1][0])
+ .filter(line => Math.abs(line.coordinates[0][0] % 90) < 1e-6);
lines.forEach(function(line) {
- test.deepEqual(array.extent(line.coordinates, function(p) { return p[1]; }), [-90 + 1e-6, +90 - 1e-6]);
+ assert.deepStrictEqual(extent(line.coordinates, p => p[1]), [-90 + 1e-6, +90 - 1e-6]);
});
- test.end();
});
-tape("graticule.lines() default latitude lines extend from 180°W to 180°E", function(test) {
- var lines = d3.geoGraticule().lines()
- .filter(function(line) { return line.coordinates[0][1] === line.coordinates[1][1]; });
+it("graticule.lines() default latitude lines extend from 180°W to 180°E", () => {
+ const lines = geoGraticule().lines()
+ .filter(line => line.coordinates[0][1] === line.coordinates[1][1]);
lines.forEach(function(line) {
- test.deepEqual(array.extent(line.coordinates, function(p) { return p[0]; }), [-180, +180]);
+ assert.deepStrictEqual(extent(line.coordinates, p => p[0]), [-180, +180]);
});
- test.end();
});
-tape("graticule.lines() returns an array of LineStrings", function(test) {
- test.deepEqual(d3.geoGraticule()
+it("graticule.lines() returns an array of LineStrings", () => {
+ assert.deepStrictEqual(geoGraticule()
.extent([[-90, -45], [90, 45]])
.step([45, 45])
.precision(3)
@@ -164,23 +143,21 @@ tape("graticule.lines() returns an array of LineStrings", function(test) {
{type: "LineString", coordinates: [[-90,-45],[-87,-45],[-84,-45],[-81,-45],[-78,-45],[-75,-45],[-72,-45],[-69,-45],[-66,-45],[-63,-45],[-60,-45],[-57,-45],[-54,-45],[-51,-45],[-48,-45],[-45,-45],[-42,-45],[-39,-45],[-36,-45],[-33,-45],[-30,-45],[-27,-45],[-24,-45],[-21,-45],[-18,-45],[-15,-45],[-12,-45],[-9,-45],[-6,-45],[-3,-45],[0,-45],[3,-45],[6,-45],[9,-45],[12,-45],[15,-45],[18,-45],[21,-45],[24,-45],[27,-45],[30,-45],[33,-45],[36,-45],[39,-45],[42,-45],[45,-45],[48,-45],[51,-45],[54,-45],[57,-45],[60,-45],[63,-45],[66,-45],[69,-45],[72,-45],[75,-45],[78,-45],[81,-45],[84,-45],[87,-45],[90,-45]]},
{type: "LineString", coordinates: [[-90,0],[-87,0],[-84,0],[-81,0],[-78,0],[-75,0],[-72,0],[-69,0],[-66,0],[-63,0],[-60,0],[-57,0],[-54,0],[-51,0],[-48,0],[-45,0],[-42,0],[-39,0],[-36,0],[-33,0],[-30,0],[-27,0],[-24,0],[-21,0],[-18,0],[-15,0],[-12,0],[-9,0],[-6,0],[-3,0],[0,0],[3,0],[6,0],[9,0],[12,0],[15,0],[18,0],[21,0],[24,0],[27,0],[30,0],[33,0],[36,0],[39,0],[42,0],[45,0],[48,0],[51,0],[54,0],[57,0],[60,0],[63,0],[66,0],[69,0],[72,0],[75,0],[78,0],[81,0],[84,0],[87,0],[90,0]]}
]);
- test.end();
});
-tape("graticule() returns a MultiLineString of all lines", function(test) {
- var g = d3.geoGraticule()
+it("graticule() returns a MultiLineString of all lines", () => {
+ const g = geoGraticule()
.extent([[-90, -45], [90, 45]])
.step([45, 45])
.precision(3);
- test.deepEqual(g(), {
+ assert.deepStrictEqual(g(), {
type: "MultiLineString",
- coordinates: g.lines().map(function(line) { return line.coordinates; })
+ coordinates: g.lines().map(line => line.coordinates)
});
- test.end();
});
-tape("graticule.outline() returns a Polygon encompassing the major extent", function(test) {
- test.deepEqual(d3.geoGraticule()
+it("graticule.outline() returns a Polygon encompassing the major extent", () => {
+ assert.deepStrictEqual(geoGraticule()
.extentMajor([[-90, -45], [90, 45]])
.precision(3)
.outline(), {
@@ -192,5 +169,4 @@ tape("graticule.outline() returns a Polygon encompassing the major extent", func
[87,-45],[84,-45],[81,-45],[78,-45],[75,-45],[72,-45],[69,-45],[66,-45],[63,-45],[60,-45],[57,-45],[54,-45],[51,-45],[48,-45],[45,-45],[42,-45],[39,-45],[36,-45],[33,-45],[30,-45],[27,-45],[24,-45],[21,-45],[18,-45],[15,-45],[12,-45],[9,-45],[6,-45],[3,-45],[0,-45],[-3,-45],[-6,-45],[-9,-45],[-12,-45],[-15,-45],[-18,-45],[-21,-45],[-24,-45],[-27,-45],[-30,-45],[-33,-45],[-36,-45],[-39,-45],[-42,-45],[-45,-45],[-48,-45],[-51,-45],[-54,-45],[-57,-45],[-60,-45],[-63,-45],[-66,-45],[-69,-45],[-72,-45],[-75,-45],[-78,-45],[-81,-45],[-84,-45],[-87,-45],[-90,-45]
]]
});
- test.end();
});
diff --git a/test/inDelta.js b/test/inDelta.js
deleted file mode 100644
index 9df0b7f..0000000
--- a/test/inDelta.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var tape = require("tape");
-
-tape.Test.prototype.inDelta = function(actual, expected, delta) {
- delta = delta || 1e-6;
- this._assert(inDelta(actual, expected, delta), {
- message: "should be in delta " + delta,
- operator: "inDelta",
- actual: actual,
- expected: expected
- });
-};
-
-function inDelta(actual, expected, delta) {
- return (Array.isArray(expected) ? inDeltaArray : inDeltaNumber)(actual, expected, delta);
-}
-
-function inDeltaArray(actual, expected, delta) {
- var n = expected.length, i = -1;
- if (actual.length !== n) return false;
- while (++i < n) if (!inDelta(actual[i], expected[i], delta)) return false;
- return true;
-}
-
-function inDeltaNumber(actual, expected, delta) {
- return actual >= expected - delta && actual <= expected + delta;
-}
diff --git a/test/interpolate-test.js b/test/interpolate-test.js
index 9b040ea..ff378a8 100644
--- a/test/interpolate-test.js
+++ b/test/interpolate-test.js
@@ -1,19 +1,15 @@
-var tape = require("tape"),
- d3 = require("../");
+import assert from "assert";
+import {geoInterpolate} from "../src/index.js";
+import {assertInDelta} from "./asserts.js";
-require("./inDelta");
-
-tape("geoInterpolate(a, a) returns a", function(test) {
- test.deepEqual(d3.geoInterpolate([140.63289, -29.95101], [140.63289, -29.95101])(0.5), [140.63289, -29.95101]);
- test.end();
+it("geoInterpolate(a, a) returns a", () => {
+ assert.deepStrictEqual(geoInterpolate([140.63289, -29.95101], [140.63289, -29.95101])(0.5), [140.63289, -29.95101]);
});
-tape("geoInterpolate(a, b) returns the expected values when a and b lie on the equator", function(test) {
- test.inDelta(d3.geoInterpolate([10, 0], [20, 0])(0.5), [15, 0], 1e-6);
- test.end();
+it("geoInterpolate(a, b) returns the expected values when a and b lie on the equator", () => {
+ assertInDelta(geoInterpolate([10, 0], [20, 0])(0.5), [15, 0], 1e-6);
});
-tape("geoInterpolate(a, b) returns the expected values when a and b lie on a meridian", function(test) {
- test.inDelta(d3.geoInterpolate([10, -20], [10, 40])(0.5), [10, 10], 1e-6);
- test.end();
+it("geoInterpolate(a, b) returns the expected values when a and b lie on a meridian", () => {
+ assertInDelta(geoInterpolate([10, -20], [10, 40])(0.5), [10, 10], 1e-6);
});
diff --git a/test/length-test.js b/test/length-test.js
index 01752c6..b980e13 100644
--- a/test/length-test.js
+++ b/test/length-test.js
@@ -1,61 +1,50 @@
-var tape = require("tape"),
- d3 = require("../");
+import {geoLength} from "../src/index.js";
+import {assertInDelta} from "./asserts.js";
-require("./inDelta");
-
-tape("geoLength(Point) returns zero", function(test) {
- test.inDelta(d3.geoLength({type: "Point", coordinates: [0, 0]}), 0, 1e-6);
- test.end();
+it("geoLength(Point) returns zero", () => {
+ assertInDelta(geoLength({type: "Point", coordinates: [0, 0]}), 0, 1e-6);
});
-tape("geoLength(MultiPoint) returns zero", function(test) {
- test.inDelta(d3.geoLength({type: "MultiPoint", coordinates: [[0, 1], [2, 3]]}), 0, 1e-6);
- test.end();
+it("geoLength(MultiPoint) returns zero", () => {
+ assertInDelta(geoLength({type: "MultiPoint", coordinates: [[0, 1], [2, 3]]}), 0, 1e-6);
});
-tape("geoLength(LineString) returns the sum of its great-arc segments", function(test) {
- test.inDelta(d3.geoLength({type: "LineString", coordinates: [[-45, 0], [45, 0]]}), Math.PI / 2, 1e-6);
- test.inDelta(d3.geoLength({type: "LineString", coordinates: [[-45, 0], [-30, 0], [-15, 0], [0, 0]]}), Math.PI / 4, 1e-6);
- test.end();
+it("geoLength(LineString) returns the sum of its great-arc segments", () => {
+ assertInDelta(geoLength({type: "LineString", coordinates: [[-45, 0], [45, 0]]}), Math.PI / 2, 1e-6);
+ assertInDelta(geoLength({type: "LineString", coordinates: [[-45, 0], [-30, 0], [-15, 0], [0, 0]]}), Math.PI / 4, 1e-6);
});
-tape("geoLength(MultiLineString) returns the sum of its great-arc segments", function(test) {
- test.inDelta(d3.geoLength({type: "MultiLineString", coordinates: [[[-45, 0], [-30, 0]], [[-15, 0], [0, 0]]]}), Math.PI / 6, 1e-6);
- test.end();
+it("geoLength(MultiLineString) returns the sum of its great-arc segments", () => {
+ assertInDelta(geoLength({type: "MultiLineString", coordinates: [[[-45, 0], [-30, 0]], [[-15, 0], [0, 0]]]}), Math.PI / 6, 1e-6);
});
-tape("geoLength(Polygon) returns the length of its perimeter", function(test) {
- test.inDelta(d3.geoLength({type: "Polygon", coordinates: [[[0, 0], [3, 0], [3, 3], [0, 3], [0, 0]]]}), 0.157008, 1e-6);
- test.end();
+it("geoLength(Polygon) returns the length of its perimeter", () => {
+ assertInDelta(geoLength({type: "Polygon", coordinates: [[[0, 0], [3, 0], [3, 3], [0, 3], [0, 0]]]}), 0.157008, 1e-6);
});
-tape("geoLength(Polygon) returns the length of its perimeter, including holes", function(test) {
- test.inDelta(d3.geoLength({type: "Polygon", coordinates: [[[0, 0], [3, 0], [3, 3], [0, 3], [0, 0]], [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]]}), 0.209354, 1e-6);
- test.end();
+it("geoLength(Polygon) returns the length of its perimeter, including holes", () => {
+ assertInDelta(geoLength({type: "Polygon", coordinates: [[[0, 0], [3, 0], [3, 3], [0, 3], [0, 0]], [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]]}), 0.209354, 1e-6);
});
-tape("geoLength(MultiPolygon) returns the summed length of the perimeters", function(test) {
- test.inDelta(d3.geoLength({type: "MultiPolygon", coordinates: [[[[0, 0], [3, 0], [3, 3], [0, 3], [0, 0]]]]}), 0.157008, 1e-6);
- test.inDelta(d3.geoLength({type: "MultiPolygon", coordinates: [[[[0, 0], [3, 0], [3, 3], [0, 3], [0, 0]]], [[[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]]]}), 0.209354, 1e-6);
- test.end();
+it("geoLength(MultiPolygon) returns the summed length of the perimeters", () => {
+ assertInDelta(geoLength({type: "MultiPolygon", coordinates: [[[[0, 0], [3, 0], [3, 3], [0, 3], [0, 0]]]]}), 0.157008, 1e-6);
+ assertInDelta(geoLength({type: "MultiPolygon", coordinates: [[[[0, 0], [3, 0], [3, 3], [0, 3], [0, 0]]], [[[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]]]}), 0.209354, 1e-6);
});
-tape("geoLength(FeatureCollection) returns the sum of its features’ lengths", function(test) {
- test.inDelta(d3.geoLength({
+it("geoLength(FeatureCollection) returns the sum of its features’ lengths", () => {
+ assertInDelta(geoLength({
type: "FeatureCollection", features: [
{type: "Feature", geometry: {type: "LineString", coordinates: [[-45, 0], [0, 0]]}},
{type: "Feature", geometry: {type: "LineString", coordinates: [[0, 0], [45, 0]]}}
]
}), Math.PI / 2, 1e-6);
- test.end();
});
-tape("geoLength(GeometryCollection) returns the sum of its geometries’ lengths", function(test) {
- test.inDelta(d3.geoLength({
+it("geoLength(GeometryCollection) returns the sum of its geometries’ lengths", () => {
+ assertInDelta(geoLength({
type: "GeometryCollection", geometries: [
{type: "GeometryCollection", geometries: [{type: "LineString", coordinates: [[-45, 0], [0, 0]]}]},
{type: "LineString", coordinates: [[0, 0], [45, 0]]}
]
}), Math.PI / 2, 1e-6);
- test.end();
});
diff --git a/test/path/area-test.js b/test/path/area-test.js
index 37498ae..222c80b 100644
--- a/test/path/area-test.js
+++ b/test/path/area-test.js
@@ -1,35 +1,32 @@
-var tape = require("tape"),
- d3_geo = require("../../");
+import assert from "assert";
+import {geoEquirectangular, geoPath} from "../../src/index.js";
-var equirectangular = d3_geo.geoEquirectangular()
+const equirectangular = geoEquirectangular()
.scale(900 / Math.PI)
.precision(0);
function testArea(projection, object) {
- return d3_geo.geoPath()
+ return geoPath()
.projection(projection)
.area(object);
}
-tape("geoPath.area(…) of a polygon with no holes", function(test) {
- test.equal(testArea(equirectangular, {
+it("geoPath.area(…) of a polygon with no holes", () => {
+ assert.strictEqual(testArea(equirectangular, {
type: "Polygon",
coordinates: [[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]]]
}), 25);
- test.end();
});
-tape("geoPath.area(…) of a polygon with holes", function(test) {
- test.equal(testArea(equirectangular, {
+it("geoPath.area(…) of a polygon with holes", () => {
+ assert.strictEqual(testArea(equirectangular, {
type: "Polygon",
coordinates: [[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]], [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]
}), 16);
- test.end();
});
-tape("geoPath.area(…) of a sphere", function(test) {
- test.equal(testArea(equirectangular, {
+it("geoPath.area(…) of a sphere", () => {
+ assert.strictEqual(testArea(equirectangular, {
type: "Sphere",
}), 1620000);
- test.end();
});
diff --git a/test/path/bounds-test.js b/test/path/bounds-test.js
index 566c8be..e6f681d 100644
--- a/test/path/bounds-test.js
+++ b/test/path/bounds-test.js
@@ -1,36 +1,32 @@
-var tape = require("tape"),
- d3_geo = require("../../"),
- testContext = require("./test-context");
+import assert from "assert";
+import {geoEquirectangular, geoPath} from "../../src/index.js";
-var equirectangular = d3_geo.geoEquirectangular()
+const equirectangular = geoEquirectangular()
.scale(900 / Math.PI)
.precision(0);
function testBounds(projection, object) {
- return d3_geo.geoPath()
+ return geoPath()
.projection(projection)
.bounds(object);
}
-tape("geoPath.bounds(…) of a polygon with no holes", function(test) {
- test.deepEqual(testBounds(equirectangular, {
+it("geoPath.bounds(…) of a polygon with no holes", () => {
+ assert.deepStrictEqual(testBounds(equirectangular, {
type: "Polygon",
coordinates: [[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]]]
}), [[980, 245], [985, 250]]);
- test.end();
});
-tape("geoPath.bounds(…) of a polygon with holes", function(test) {
- test.deepEqual(testBounds(equirectangular, {
+it("geoPath.bounds(…) of a polygon with holes", () => {
+ assert.deepStrictEqual(testBounds(equirectangular, {
type: "Polygon",
coordinates: [[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]], [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]
}), [[980, 245], [985, 250]]);
- test.end();
});
-tape("geoPath.bounds(…) of a sphere", function(test) {
- test.deepEqual(testBounds(equirectangular, {
+it("geoPath.bounds(…) of a sphere", () => {
+ assert.deepStrictEqual(testBounds(equirectangular, {
type: "Sphere"
}), [[-420, -200], [1380, 700]]);
- test.end();
});
diff --git a/test/path/centroid-test.js b/test/path/centroid-test.js
index ca6765c..cc3e72e 100644
--- a/test/path/centroid-test.js
+++ b/test/path/centroid-test.js
@@ -1,171 +1,144 @@
-var tape = require("tape"),
- d3_geo = require("../../"),
- testContext = require("./test-context");
+import assert from "assert";
+import {geoEquirectangular, geoPath} from "../../src/index.js";
+import {assertInDelta} from "../asserts.js";
-require("../inDelta");
-
-var equirectangular = d3_geo.geoEquirectangular()
+const equirectangular = geoEquirectangular()
.scale(900 / Math.PI)
.precision(0);
function testCentroid(projection, object) {
- return d3_geo.geoPath()
+ return geoPath()
.projection(projection)
.centroid(object);
}
-tape("geoPath.centroid(…) of a point", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "Point", coordinates: [0, 0]}), [480, 250]);
- test.end();
+it("geoPath.centroid(…) of a point", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "Point", coordinates: [0, 0]}), [480, 250]);
});
-tape("geoPath.centroid(…) of an empty multipoint", function(test) {
- test.equal(testCentroid(equirectangular, {type: "MultiPoint", coordinates: []}).every(isNaN), true);
- test.end();
+it("geoPath.centroid(…) of an empty multipoint", () => {
+ assert.strictEqual(testCentroid(equirectangular, {type: "MultiPoint", coordinates: []}).every(isNaN), true);
});
-tape("geoPath.centroid(…) of a singleton multipoint", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "MultiPoint", coordinates: [[0, 0]]}), [480, 250]);
- test.end();
+it("geoPath.centroid(…) of a singleton multipoint", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "MultiPoint", coordinates: [[0, 0]]}), [480, 250]);
});
-tape("geoPath.centroid(…) of a multipoint with two points", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "MultiPoint", coordinates: [[-122, 37], [-74, 40]]}), [-10, 57.5]);
- test.end();
+it("geoPath.centroid(…) of a multipoint with two points", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "MultiPoint", coordinates: [[-122, 37], [-74, 40]]}), [-10, 57.5]);
});
-tape("geoPath.centroid(…) of an empty linestring", function(test) {
- test.equal(testCentroid(equirectangular, {type: "LineString", coordinates: []}).every(isNaN), true);
- test.end();
+it("geoPath.centroid(…) of an empty linestring", () => {
+ assert.strictEqual(testCentroid(equirectangular, {type: "LineString", coordinates: []}).every(isNaN), true);
});
-tape("geoPath.centroid(…) of a linestring with two points", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "LineString", coordinates: [[100, 0], [0, 0]]}), [730, 250]);
- test.deepEqual(testCentroid(equirectangular, {type: "LineString", coordinates: [[0, 0], [100, 0], [101, 0]]}), [732.5, 250]);
- test.end();
+it("geoPath.centroid(…) of a linestring with two points", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "LineString", coordinates: [[100, 0], [0, 0]]}), [730, 250]);
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "LineString", coordinates: [[0, 0], [100, 0], [101, 0]]}), [732.5, 250]);
});
-tape("geoPath.centroid(…) of a linestring with two points, one unique", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "LineString", coordinates: [[-122, 37], [-122, 37]]}), [-130, 65]);
- test.deepEqual(testCentroid(equirectangular, {type: "LineString", coordinates: [[-74, 40], [-74, 40]]}), [110, 50]);
- test.end();
+it("geoPath.centroid(…) of a linestring with two points, one unique", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "LineString", coordinates: [[-122, 37], [-122, 37]]}), [-130, 65]);
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "LineString", coordinates: [[-74, 40], [-74, 40]]}), [110, 50]);
});
-tape("geoPath.centroid(…) of a linestring with three points; two unique", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "LineString", coordinates: [[-122, 37], [-74, 40], [-74, 40]]}), [-10, 57.5]);
- test.end();
+it("geoPath.centroid(…) of a linestring with three points; two unique", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "LineString", coordinates: [[-122, 37], [-74, 40], [-74, 40]]}), [-10, 57.5]);
});
-tape("geoPath.centroid(…) of a linestring with three points", function(test) {
- test.inDelta(testCentroid(equirectangular, {type: "LineString", coordinates: [[-122, 37], [-74, 40], [-100, 0]]}), [17.389135, 103.563545], 1e-6);
- test.end();
+it("geoPath.centroid(…) of a linestring with three points", () => {
+ assertInDelta(testCentroid(equirectangular, {type: "LineString", coordinates: [[-122, 37], [-74, 40], [-100, 0]]}), [17.389135, 103.563545], 1e-6);
});
-tape("geoPath.centroid(…) of a multilinestring", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "MultiLineString", coordinates: [[[100, 0], [0, 0]], [[-10, 0], [0, 0]]]}), [705, 250]);
- test.end();
+it("geoPath.centroid(…) of a multilinestring", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "MultiLineString", coordinates: [[[100, 0], [0, 0]], [[-10, 0], [0, 0]]]}), [705, 250]);
});
-tape("geoPath.centroid(…) of a single-ring polygon", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "Polygon", coordinates: [[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]]]}), [982.5, 247.5]);
- test.end();
+it("geoPath.centroid(…) of a single-ring polygon", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "Polygon", coordinates: [[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]]]}), [982.5, 247.5]);
});
-tape("geoPath.centroid(…) of a zero-area polygon", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "Polygon", coordinates: [[[1, 0], [2, 0], [3, 0], [1, 0]]]}), [490, 250]);
- test.end();
+it("geoPath.centroid(…) of a zero-area polygon", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "Polygon", coordinates: [[[1, 0], [2, 0], [3, 0], [1, 0]]]}), [490, 250]);
});
-tape("geoPath.centroid(…) of a polygon with two rings, one with zero area", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "Polygon", coordinates: [
+it("geoPath.centroid(…) of a polygon with two rings, one with zero area", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "Polygon", coordinates: [
[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]],
[[100.1, 0], [100.2, 0], [100.3, 0], [100.1, 0]
]]}), [982.5, 247.5]);
- test.end();
});
-tape("geoPath.centroid(…) of a polygon with clockwise exterior and anticlockwise interior", function(test) {
- test.inDelta(testCentroid(equirectangular, {
+it("geoPath.centroid(…) of a polygon with clockwise exterior and anticlockwise interior", () => {
+ assertInDelta(testCentroid(equirectangular, {
type: "Polygon",
coordinates: [
[[-2, -2], [2, -2], [2, 2], [-2, 2], [-2, -2]].reverse(),
[[ 0, -1], [1, -1], [1, 1], [ 0, 1], [ 0, -1]]
]
}), [479.642857, 250], 1e-6);
- test.end();
});
-tape("geoPath.centroid(…) of an empty multipolygon", function(test) {
- test.equal(testCentroid(equirectangular, {type: "MultiPolygon", coordinates: []}).every(isNaN), true);
- test.end();
+it("geoPath.centroid(…) of an empty multipolygon", () => {
+ assert.strictEqual(testCentroid(equirectangular, {type: "MultiPolygon", coordinates: []}).every(isNaN), true);
});
-tape("geoPath.centroid(…) of a singleton multipolygon", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "MultiPolygon", coordinates: [[[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]]]]}), [982.5, 247.5]);
- test.end();
+it("geoPath.centroid(…) of a singleton multipolygon", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "MultiPolygon", coordinates: [[[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]]]]}), [982.5, 247.5]);
});
-tape("geoPath.centroid(…) of a multipolygon with two polygons", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "MultiPolygon", coordinates: [
+it("geoPath.centroid(…) of a multipolygon with two polygons", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "MultiPolygon", coordinates: [
[[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]]],
[[[0, 0], [1, 0], [1, -1], [0, -1], [0, 0]]]
]}), [732.5, 250]);
- test.end();
});
-tape("geoPath.centroid(…) of a multipolygon with two polygons, one zero area", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "MultiPolygon", coordinates: [
+it("geoPath.centroid(…) of a multipolygon with two polygons, one zero area", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "MultiPolygon", coordinates: [
[[[100, 0], [100, 1], [101, 1], [101, 0], [100, 0]]],
[[[0, 0], [1, 0], [2, 0], [0, 0]]]
]}), [982.5, 247.5]);
- test.end();
});
-tape("geoPath.centroid(…) of a geometry collection with a single point", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "GeometryCollection", geometries: [{type: "Point", coordinates: [0, 0]}]}), [480, 250]);
- test.end();
+it("geoPath.centroid(…) of a geometry collection with a single point", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "GeometryCollection", geometries: [{type: "Point", coordinates: [0, 0]}]}), [480, 250]);
});
-tape("geoPath.centroid(…) of a geometry collection with a point and a linestring", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "GeometryCollection", geometries: [
+it("geoPath.centroid(…) of a geometry collection with a point and a linestring", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "GeometryCollection", geometries: [
{type: "LineString", coordinates: [[179, 0], [180, 0]]},
{type: "Point", coordinates: [0, 0]}
]}), [1377.5, 250]);
- test.end();
});
-tape("geoPath.centroid(…) of a geometry collection with a point, linestring and polygon", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "GeometryCollection", geometries: [
+it("geoPath.centroid(…) of a geometry collection with a point, linestring and polygon", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "GeometryCollection", geometries: [
{type: "Polygon", coordinates: [[[-180, 0], [-180, 1], [-179, 1], [-179, 0], [-180, 0]]]},
{type: "LineString", coordinates: [[179, 0], [180, 0]]},
{type: "Point", coordinates: [0, 0]}
]}), [-417.5, 247.5]);
- test.end();
});
-tape("geoPath.centroid(…) of a feature collection with a point", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "FeatureCollection", features: [{type: "Feature", geometry: {type: "Point", coordinates: [0, 0]}}]}), [480, 250]);
- test.end();
+it("geoPath.centroid(…) of a feature collection with a point", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "FeatureCollection", features: [{type: "Feature", geometry: {type: "Point", coordinates: [0, 0]}}]}), [480, 250]);
});
-tape("geoPath.centroid(…) of a feature collection with a point and a line string", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "FeatureCollection", features: [
+it("geoPath.centroid(…) of a feature collection with a point and a line string", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "FeatureCollection", features: [
{type: "Feature", geometry: {type: "LineString", coordinates: [[179, 0], [180, 0]]}},
{type: "Feature", geometry: {type: "Point", coordinates: [0, 0]}}
]}), [1377.5, 250]);
- test.end();
});
-tape("geoPath.centroid(…) of a feature collection with a point, line string and polygon", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "FeatureCollection", features: [
+it("geoPath.centroid(…) of a feature collection with a point, line string and polygon", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "FeatureCollection", features: [
{type: "Feature", geometry: {type: "Polygon", coordinates: [[[-180, 0], [-180, 1], [-179, 1], [-179, 0], [-180, 0]]]}},
{type: "Feature", geometry: {type: "LineString", coordinates: [[179, 0], [180, 0]]}},
{type: "Feature", geometry: {type: "Point", coordinates: [0, 0]}}
]}), [-417.5, 247.5]);
- test.end();
});
-tape("geoPath.centroid(…) of a sphere", function(test) {
- test.deepEqual(testCentroid(equirectangular, {type: "Sphere"}), [480, 250]);
- test.end();
+it("geoPath.centroid(…) of a sphere", () => {
+ assert.deepStrictEqual(testCentroid(equirectangular, {type: "Sphere"}), [480, 250]);
});
diff --git a/test/path/index-test.js b/test/path/index-test.js
index c772223..ab0e263 100644
--- a/test/path/index-test.js
+++ b/test/path/index-test.js
@@ -1,60 +1,54 @@
-var tape = require("tape"),
- d3_geo = require("../../"),
- testContext = require("./test-context");
+import assert from "assert";
+import {geoAlbers, geoEquirectangular, geoPath} from "../../src/index.js";
+import {testContext} from "./test-context.js";
-var equirectangular = d3_geo.geoEquirectangular()
+const equirectangular = geoEquirectangular()
.scale(900 / Math.PI)
.precision(0);
function testPath(projection, object) {
- var context = testContext();
+ const context = testContext();
- d3_geo.geoPath()
+ geoPath()
.projection(projection)
- .context(context)
- (object);
+ .context(context) (object);
return context.result();
}
-tape("geoPath.projection() defaults to null", function(test) {
- var path = d3_geo.geoPath();
- test.strictEqual(path.projection(), null);
- test.end();
+it("geoPath.projection() defaults to null", () => {
+ const path = geoPath();
+ assert.strictEqual(path.projection(), null);
});
-tape("geoPath.context() defaults to null", function(test) {
- var path = d3_geo.geoPath();
- test.strictEqual(path.context(), null);
- test.end();
+it("geoPath.context() defaults to null", () => {
+ const path = geoPath();
+ assert.strictEqual(path.context(), null);
});
-tape("d3.geoPath(projection) sets the initial projection", function(test) {
- var projection = d3_geo.geoAlbers(), path = d3_geo.geoPath(projection);
- test.strictEqual(path.projection(), projection);
- test.end();
+it("geoPath(projection) sets the initial projection", () => {
+ const projection = geoAlbers(), path = geoPath(projection);
+ assert.strictEqual(path.projection(), projection);
});
-tape("d3.geoPath(projection, context) sets the initial projection and context", function(test) {
- var context = testContext(), projection = d3_geo.geoAlbers(), path = d3_geo.geoPath(projection, context);
- test.strictEqual(path.projection(), projection);
- test.strictEqual(path.context(), context);
- test.end();
+it("geoPath(projection, context) sets the initial projection and context", () => {
+ const context = testContext(), projection = geoAlbers(), path = geoPath(projection, context);
+ assert.strictEqual(path.projection(), projection);
+ assert.strictEqual(path.context(), context);
});
-tape("geoPath(Point) renders a point", function(test) {
- test.deepEqual(testPath(equirectangular, {
+it("geoPath(Point) renders a point", () => {
+ assert.deepStrictEqual(testPath(equirectangular, {
type: "Point",
coordinates: [-63, 18]
}), [
{type: "moveTo", x: 170, y: 160},
{type: "arc", x: 165, y: 160, r: 4.5}
]);
- test.end();
});
-tape("geoPath(MultiPoint) renders a point", function(test) {
- test.deepEqual(testPath(equirectangular, {
+it("geoPath(MultiPoint) renders a point", () => {
+ assert.deepStrictEqual(testPath(equirectangular, {
type: "MultiPoint",
coordinates: [[-63, 18], [-62, 18], [-62, 17]]
}), [
@@ -62,11 +56,10 @@ tape("geoPath(MultiPoint) renders a point", function(test) {
{type: "moveTo", x: 175, y: 160}, {type: "arc", x: 170, y: 160, r: 4.5},
{type: "moveTo", x: 175, y: 165}, {type: "arc", x: 170, y: 165, r: 4.5}
]);
- test.end();
});
-tape("geoPath(LineString) renders a line string", function(test) {
- test.deepEqual(testPath(equirectangular, {
+it("geoPath(LineString) renders a line string", () => {
+ assert.deepStrictEqual(testPath(equirectangular, {
type: "LineString",
coordinates: [[-63, 18], [-62, 18], [-62, 17]]
}), [
@@ -74,11 +67,10 @@ tape("geoPath(LineString) renders a line string", function(test) {
{type: "lineTo", x: 170, y: 160},
{type: "lineTo", x: 170, y: 165}
]);
- test.end();
});
-tape("geoPath(Polygon) renders a polygon", function(test) {
- test.deepEqual(testPath(equirectangular, {
+it("geoPath(Polygon) renders a polygon", () => {
+ assert.deepStrictEqual(testPath(equirectangular, {
type: "Polygon",
coordinates: [[[-63, 18], [-62, 18], [-62, 17], [-63, 18]]]
}), [
@@ -87,11 +79,10 @@ tape("geoPath(Polygon) renders a polygon", function(test) {
{type: "lineTo", x: 170, y: 165},
{type: "closePath"}
]);
- test.end();
});
-tape("geoPath(GeometryCollection) renders a geometry collection", function(test) {
- test.deepEqual(testPath(equirectangular, {
+it("geoPath(GeometryCollection) renders a geometry collection", () => {
+ assert.deepStrictEqual(testPath(equirectangular, {
type: "GeometryCollection",
geometries: [{
type: "Polygon",
@@ -103,11 +94,10 @@ tape("geoPath(GeometryCollection) renders a geometry collection", function(test)
{type: "lineTo", x: 170, y: 165},
{type: "closePath"}
]);
- test.end();
});
-tape("geoPath(Feature) renders a feature", function(test) {
- test.deepEqual(testPath(equirectangular, {
+it("geoPath(Feature) renders a feature", () => {
+ assert.deepStrictEqual(testPath(equirectangular, {
type: "Feature",
geometry: {
type: "Polygon",
@@ -119,11 +109,10 @@ tape("geoPath(Feature) renders a feature", function(test) {
{type: "lineTo", x: 170, y: 165},
{type: "closePath"}
]);
- test.end();
});
-tape("geoPath(FeatureCollection) renders a feature collection", function(test) {
- test.deepEqual(testPath(equirectangular, {
+it("geoPath(FeatureCollection) renders a feature collection", () => {
+ assert.deepStrictEqual(testPath(equirectangular, {
type: "FeatureCollection",
features: [{
type: "Feature",
@@ -138,22 +127,20 @@ tape("geoPath(FeatureCollection) renders a feature collection", function(test) {
{type: "lineTo", x: 170, y: 165},
{type: "closePath"}
]);
- test.end();
});
-tape("geoPath(…) wraps longitudes outside of ±180°", function(test) {
- test.deepEqual(testPath(equirectangular, {
+it("geoPath(…) wraps longitudes outside of ±180°", () => {
+ assert.deepStrictEqual(testPath(equirectangular, {
type: "Point",
coordinates: [180 + 1e-6, 0]
}), [
{type: "moveTo", x: -415, y: 250},
{type: "arc", x: -420, y: 250, r: 4.5}
]);
- test.end();
});
-tape("geoPath(…) observes the correct winding order of a tiny polygon", function(test) {
- test.deepEqual(testPath(equirectangular, {
+it("geoPath(…) observes the correct winding order of a tiny polygon", () => {
+ assert.deepStrictEqual(testPath(equirectangular, {
type: "Polygon",
coordinates: [[
[-0.06904102953339501, 0.346043661846373],
@@ -169,11 +156,10 @@ tape("geoPath(…) observes the correct winding order of a tiny polygon", functi
{type: "lineTo", x: 479, y: 251},
{type: "closePath"}
]);
- test.end();
});
-tape("geoPath.projection(null)(…) does not transform coordinates", function(test) {
- test.deepEqual(testPath(null, {
+it("geoPath.projection(null)(…) does not transform coordinates", () => {
+ assert.deepStrictEqual(testPath(null, {
type: "Polygon",
coordinates: [[[-63, 18], [-62, 18], [-62, 17], [-63, 18]]]
}), [
@@ -182,31 +168,28 @@ tape("geoPath.projection(null)(…) does not transform coordinates", function(te
{type: "lineTo", x: -62, y: 17},
{type: "closePath"}
]);
- test.end();
});
-tape("geoPath.context(null)(null) returns null", function(test) {
- var path = d3_geo.geoPath();
- test.strictEqual(path(), null);
- test.strictEqual(path(null), null);
- test.strictEqual(path(undefined), null);
- test.end();
+it("geoPath.context(null)(null) returns null", () => {
+ const path = geoPath();
+ assert.strictEqual(path(), null);
+ assert.strictEqual(path(null), null);
+ assert.strictEqual(path(undefined), null);
});
-tape("geoPath.context(null)(Unknown) returns null", function(test) {
- var path = d3_geo.geoPath();
- test.strictEqual(path({type: "Unknown"}), null);
- test.strictEqual(path({type: "__proto__"}), null);
- test.end();
+it("geoPath.context(null)(Unknown) returns null", () => {
+ const path = geoPath();
+ assert.strictEqual(path({type: "Unknown"}), null);
+ assert.strictEqual(path({type: "__proto__"}), null);
});
-tape("geoPath(LineString) then geoPath(Point) does not treat the point as part of a line", function(test) {
- var context = testContext(), path = d3_geo.geoPath().projection(equirectangular).context(context);
+it("geoPath(LineString) then geoPath(Point) does not treat the point as part of a line", () => {
+ const context = testContext(), path = geoPath().projection(equirectangular).context(context);
path({
type: "LineString",
coordinates: [[-63, 18], [-62, 18], [-62, 17]]
});
- test.deepEqual(context.result(), [
+ assert.deepStrictEqual(context.result(), [
{type: "moveTo", x: 165, y: 160},
{type: "lineTo", x: 170, y: 160},
{type: "lineTo", x: 170, y: 165}
@@ -215,9 +198,8 @@ tape("geoPath(LineString) then geoPath(Point) does not treat the point as part o
type: "Point",
coordinates: [-63, 18]
});
- test.deepEqual(context.result(), [
+ assert.deepStrictEqual(context.result(), [
{type: "moveTo", x: 170, y: 160},
{type: "arc", x: 165, y: 160, r: 4.5}
]);
- test.end();
});
diff --git a/test/path/measure-test.js b/test/path/measure-test.js
index 22da109..b7c9257 100644
--- a/test/path/measure-test.js
+++ b/test/path/measure-test.js
@@ -1,58 +1,51 @@
-var tape = require("tape"),
- d3_geo = require("../../");
+import assert from "assert";
+import {geoPath} from "../../src/index.js";
-tape("geoPath.measure(…) of a Point", function(test) {
- test.equal(d3_geo.geoPath().measure({
+it("geoPath.measure(…) of a Point", () => {
+ assert.strictEqual(geoPath().measure({
type: "Point",
coordinates: [0, 0]
}), 0);
- test.end();
});
-tape("geoPath.measure(…) of a MultiPoint", function(test) {
- test.equal(d3_geo.geoPath().measure({
+it("geoPath.measure(…) of a MultiPoint", () => {
+ assert.strictEqual(geoPath().measure({
type: "Point",
coordinates: [[0, 0], [0, 1], [1, 1], [1, 0]]
}), 0);
- test.end();
});
-tape("geoPath.measure(…) of a LineString", function(test) {
- test.equal(d3_geo.geoPath().measure({
+it("geoPath.measure(…) of a LineString", () => {
+ assert.strictEqual(geoPath().measure({
type: "LineString",
coordinates: [[0, 0], [0, 1], [1, 1], [1, 0]]
}), 3);
- test.end();
});
-tape("geoPath.measure(…) of a MultiLineString", function(test) {
- test.equal(d3_geo.geoPath().measure({
+it("geoPath.measure(…) of a MultiLineString", () => {
+ assert.strictEqual(geoPath().measure({
type: "MultiLineString",
coordinates: [[[0, 0], [0, 1], [1, 1], [1, 0]]]
}), 3);
- test.end();
});
-tape("geoPath.measure(…) of a Polygon", function(test) {
- test.equal(d3_geo.geoPath().measure({
+it("geoPath.measure(…) of a Polygon", () => {
+ assert.strictEqual(geoPath().measure({
type: "Polygon",
coordinates: [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]]
}), 4);
- test.end();
});
-tape("geoPath.measure(…) of a Polygon with a hole", function(test) {
- test.equal(d3_geo.geoPath().measure({
+it("geoPath.measure(…) of a Polygon with a hole", () => {
+ assert.strictEqual(geoPath().measure({
type: "Polygon",
coordinates: [[[-1, -1], [-1, 2], [2, 2], [2, -1], [-1, -1]], [[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]]
}), 16);
- test.end();
});
-tape("geoPath.measure(…) of a MultiPolygon", function(test) {
- test.equal(d3_geo.geoPath().measure({
+it("geoPath.measure(…) of a MultiPolygon", () => {
+ assert.strictEqual(geoPath().measure({
type: "MultiPolygon",
coordinates: [[[[-1, -1], [-1, 2], [2, 2], [2, -1], [-1, -1]]], [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]]]
}), 16);
- test.end();
});
diff --git a/test/path/string-test.js b/test/path/string-test.js
index 26caa60..1042c38 100644
--- a/test/path/string-test.js
+++ b/test/path/string-test.js
@@ -1,84 +1,74 @@
-var tape = require("tape"),
- d3_geo = require("../../");
+import {geoEquirectangular, geoPath} from "../../src/index.js";
+import {assertPathEqual} from "../asserts.js";
-require("../pathEqual");
-
-var equirectangular = d3_geo.geoEquirectangular()
+const equirectangular = geoEquirectangular()
.scale(900 / Math.PI)
.precision(0);
function testPath(projection, object) {
- return d3_geo.geoPath()
- .projection(projection)
- (object);
+ return geoPath()
+ .projection(projection) (object);
}
-tape("geoPath(Point) renders a point", function(test) {
- test.pathEqual(testPath(equirectangular, {
+it("geoPath(Point) renders a point", () => {
+ assertPathEqual(testPath(equirectangular, {
type: "Point",
coordinates: [-63, 18]
}), "M165,160m0,4.500000a4.500000,4.500000 0 1,1 0,-9a4.500000,4.500000 0 1,1 0,9z");
- test.end();
});
-tape("geoPath.pointRadius(radius)(Point) renders a point of the given radius", function(test) {
- test.pathEqual(d3_geo.geoPath()
+it("geoPath.pointRadius(radius)(Point) renders a point of the given radius", () => {
+ assertPathEqual(geoPath()
.projection(equirectangular)
.pointRadius(10)({
type: "Point",
coordinates: [-63, 18]
}), "M165,160m0,10a10,10 0 1,1 0,-20a10,10 0 1,1 0,20z");
- test.end();
});
-tape("geoPath(MultiPoint) renders a point", function(test) {
- test.pathEqual(testPath(equirectangular, {
+it("geoPath(MultiPoint) renders a point", () => {
+ assertPathEqual(testPath(equirectangular, {
type: "MultiPoint",
coordinates: [[-63, 18], [-62, 18], [-62, 17]]
}), "M165,160m0,4.500000a4.500000,4.500000 0 1,1 0,-9a4.500000,4.500000 0 1,1 0,9zM170,160m0,4.500000a4.500000,4.500000 0 1,1 0,-9a4.500000,4.500000 0 1,1 0,9zM170,165m0,4.500000a4.500000,4.500000 0 1,1 0,-9a4.500000,4.500000 0 1,1 0,9z");
- test.end();
});
-tape("geoPath(LineString) renders a line string", function(test) {
- test.pathEqual(testPath(equirectangular, {
+it("geoPath(LineString) renders a line string", () => {
+ assertPathEqual(testPath(equirectangular, {
type: "LineString",
coordinates: [[-63, 18], [-62, 18], [-62, 17]]
}), "M165,160L170,160L170,165");
- test.end();
});
-tape("geoPath(Polygon) renders a polygon", function(test) {
- test.pathEqual(testPath(equirectangular, {
+it("geoPath(Polygon) renders a polygon", () => {
+ assertPathEqual(testPath(equirectangular, {
type: "Polygon",
coordinates: [[[-63, 18], [-62, 18], [-62, 17], [-63, 18]]]
}), "M165,160L170,160L170,165Z");
- test.end();
});
-tape("geoPath(GeometryCollection) renders a geometry collection", function(test) {
- test.pathEqual(testPath(equirectangular, {
+it("geoPath(GeometryCollection) renders a geometry collection", () => {
+ assertPathEqual(testPath(equirectangular, {
type: "GeometryCollection",
geometries: [{
type: "Polygon",
coordinates: [[[-63, 18], [-62, 18], [-62, 17], [-63, 18]]]
}]
}), "M165,160L170,160L170,165Z");
- test.end();
});
-tape("geoPath(Feature) renders a feature", function(test) {
- test.pathEqual(testPath(equirectangular, {
+it("geoPath(Feature) renders a feature", () => {
+ assertPathEqual(testPath(equirectangular, {
type: "Feature",
geometry: {
type: "Polygon",
coordinates: [[[-63, 18], [-62, 18], [-62, 17], [-63, 18]]]
}
}), "M165,160L170,160L170,165Z");
- test.end();
});
-tape("geoPath(FeatureCollection) renders a feature collection", function(test) {
- test.pathEqual(testPath(equirectangular, {
+it("geoPath(FeatureCollection) renders a feature collection", () => {
+ assertPathEqual(testPath(equirectangular, {
type: "FeatureCollection",
features: [{
type: "Feature",
@@ -88,18 +78,16 @@ tape("geoPath(FeatureCollection) renders a feature collection", function(test) {
}
}]
}), "M165,160L170,160L170,165Z");
- test.end();
});
-tape("geoPath(LineString) then geoPath(Point) does not treat the point as part of a line", function(test) {
- var path = d3_geo.geoPath().projection(equirectangular);
- test.pathEqual(path({
+it("geoPath(LineString) then geoPath(Point) does not treat the point as part of a line", () => {
+ const path = geoPath().projection(equirectangular);
+ assertPathEqual(path({
type: "LineString",
coordinates: [[-63, 18], [-62, 18], [-62, 17]]
}), "M165,160L170,160L170,165");
- test.pathEqual(path({
+ assertPathEqual(path({
type: "Point",
coordinates: [-63, 18]
}), "M165,160m0,4.500000a4.500000,4.500000 0 1,1 0,-9a4.500000,4.500000 0 1,1 0,9z");
- test.end();
});
diff --git a/test/path/test-context.js b/test/path/test-context.js
index e25f50f..891cac6 100644
--- a/test/path/test-context.js
+++ b/test/path/test-context.js
@@ -1,10 +1,10 @@
-module.exports = function() {
- var buffer = [];
+export function testContext() {
+ let buffer = [];
return {
- arc: function(x, y, r, a0, a1) { buffer.push({type: "arc", x: Math.round(x), y: Math.round(y), r: r}); },
- moveTo: function(x, y) { buffer.push({type: "moveTo", x: Math.round(x), y: Math.round(y)}); },
- lineTo: function(x, y) { buffer.push({type: "lineTo", x: Math.round(x), y: Math.round(y)}); },
- closePath: function() { buffer.push({type: "closePath"}); },
- result: function() { var result = buffer; buffer = []; return result; }
+ arc(x, y, r) { buffer.push({type: "arc", x: Math.round(x), y: Math.round(y), r: r}); },
+ moveTo(x, y) { buffer.push({type: "moveTo", x: Math.round(x), y: Math.round(y)}); },
+ lineTo(x, y) { buffer.push({type: "lineTo", x: Math.round(x), y: Math.round(y)}); },
+ closePath() { buffer.push({type: "closePath"}); },
+ result() { let result = buffer; buffer = []; return result; }
};
-};
+}
diff --git a/test/pathEqual.js b/test/pathEqual.js
deleted file mode 100644
index 1f064cf..0000000
--- a/test/pathEqual.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var tape = require("tape");
-
-var reNumber = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g;
-
-tape.Test.prototype.pathEqual = function(actual, expected) {
- actual = normalizePath(actual + "");
- // expected = normalizePath(expected + "");
- this._assert(actual === expected, {
- message: "should be equal",
- operator: "pathEqual",
- actual: actual,
- expected: expected
- });
-};
-
-function normalizePath(path) {
- return path.replace(reNumber, formatNumber);
-}
-
-function formatNumber(s) {
- return Math.abs((s = +s) - Math.round(s)) < 1e-6 ? Math.round(s) : s.toFixed(6);
-}
diff --git a/test/polygonContains-test.js b/test/polygonContains-test.js
index 9d2af9b..263999c 100644
--- a/test/polygonContains-test.js
+++ b/test/polygonContains-test.js
@@ -1,262 +1,233 @@
-import tape from "tape";
-import geoCircle from "../src/circle.js";
+import assert from "assert";
+import {geoCircle} from "../src/index.js";
import contains from "../src/polygonContains.js";
function polygonContains(polygon, point) {
return contains(polygon.map(ringRadians), pointRadians(point));
}
-tape("geoPolygonContains(empty, point) returns false", function(test) {
- test.equal(polygonContains([], [0, 0]), 0);
- test.end();
+it("geoPolygonContains(empty, point) returns false", () => {
+ assert.strictEqual(polygonContains([], [0, 0]), 0);
});
-tape("geoPolygonContains(simple, point) returns the expected value", function(test) {
- var polygon = [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]];
- test.equal(polygonContains(polygon, [0.1, 2]), 0);
- test.equal(polygonContains(polygon, [0.1, 0.1]), 1);
- test.end();
+it("geoPolygonContains(simple, point) returns the expected value", () => {
+ const polygon = [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]];
+ assert.strictEqual(polygonContains(polygon, [0.1, 2]), 0);
+ assert.strictEqual(polygonContains(polygon, [0.1, 0.1]), 1);
});
-tape("geoPolygonContains(smallCircle, point) returns the expected value", function(test) {
- var polygon = geoCircle().radius(60)().coordinates;
- test.equal(polygonContains(polygon, [-180, 0]), 0);
- test.equal(polygonContains(polygon, [1, 1]), 1);
- test.end();
+it("geoPolygonContains(smallCircle, point) returns the expected value", () => {
+ const polygon = geoCircle().radius(60)().coordinates;
+ assert.strictEqual(polygonContains(polygon, [-180, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [1, 1]), 1);
});
-tape("geoPolygonContains wraps longitudes", function(test) {
- var polygon = geoCircle().center([300, 0])().coordinates;
- test.equal(polygonContains(polygon, [300, 0]), 1);
- test.equal(polygonContains(polygon, [-60, 0]), 1);
- test.equal(polygonContains(polygon, [-420, 0]), 1);
- test.end();
+it("geoPolygonContains wraps longitudes", () => {
+ const polygon = geoCircle().center([300, 0])().coordinates;
+ assert.strictEqual(polygonContains(polygon, [300, 0]), 1);
+ assert.strictEqual(polygonContains(polygon, [-60, 0]), 1);
+ assert.strictEqual(polygonContains(polygon, [-420, 0]), 1);
});
-tape("geoPolygonContains(southPole, point) returns the expected value", function(test) {
- var polygon = [[[-60, -80], [60, -80], [180, -80], [-60, -80]]];
- test.equal(polygonContains(polygon, [0, 0]), 0);
- test.equal(polygonContains(polygon, [0, -85]), 1);
- test.equal(polygonContains(polygon, [0, -90]), 1);
- test.end();
+it("geoPolygonContains(southPole, point) returns the expected value", () => {
+ const polygon = [[[-60, -80], [60, -80], [180, -80], [-60, -80]]];
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, -85]), 1);
+ assert.strictEqual(polygonContains(polygon, [0, -90]), 1);
});
-tape("geoPolygonContains(northPole, point) returns the expected value", function(test) {
- var polygon = [[[60, 80], [-60, 80], [-180, 80], [60, 80]]];
- test.equal(polygonContains(polygon, [0, 0]), 0);
- test.equal(polygonContains(polygon, [0, 85]), 1);
- test.equal(polygonContains(polygon, [0, 90]), 1);
- test.equal(polygonContains(polygon, [-100, 90]), 1);
- test.equal(polygonContains(polygon, [0, -90]), 0);
- test.end();
+it("geoPolygonContains(northPole, point) returns the expected value", () => {
+ const polygon = [[[60, 80], [-60, 80], [-180, 80], [60, 80]]];
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 85]), 1);
+ assert.strictEqual(polygonContains(polygon, [0, 90]), 1);
+ assert.strictEqual(polygonContains(polygon, [-100, 90]), 1);
+ assert.strictEqual(polygonContains(polygon, [0, -90]), 0);
});
-tape("geoPolygonContains(touchingPole, Pole) returns true (issue #105)", function(test) {
- var polygon = [[[0, -30], [120, -30], [0, -90], [0, -30]]];
- test.equal(polygonContains(polygon, [0, -90]), 0);
- test.equal(polygonContains(polygon, [-60, -90]), 0);
- test.equal(polygonContains(polygon, [60, -90]), 0);
- polygon = [[[0, 30], [-120, 30], [0, 90], [0, 30]]];
- test.equal(polygonContains(polygon, [0, 90]), 0);
- test.equal(polygonContains(polygon, [-60, 90]), 0);
- test.equal(polygonContains(polygon, [60, 90]), 0);
- test.end();
+it("geoPolygonContains(touchingPole, Pole) returns true (issue #105)", () => {
+ const polygon = [[[0, -30], [120, -30], [0, -90], [0, -30]]];
+ assert.strictEqual(polygonContains(polygon, [0, -90]), 0);
+ assert.strictEqual(polygonContains(polygon, [-60, -90]), 0);
+ assert.strictEqual(polygonContains(polygon, [60, -90]), 0);
+ const polygon2 = [[[0, 30], [-120, 30], [0, 90], [0, 30]]];
+ assert.strictEqual(polygonContains(polygon2, [0, 90]), 0);
+ assert.strictEqual(polygonContains(polygon2, [-60, 90]), 0);
+ assert.strictEqual(polygonContains(polygon2, [60, 90]), 0);
});
-tape("geoPolygonContains(southHemispherePoly) returns the expected value", function(test) {
- var polygon = [[[0, 0], [10, -40], [-10, -40], [0, 0]]];
- test.equal(polygonContains(polygon, [0,-40.2]), 1);
- test.equal(polygonContains(polygon, [0,-40.5]), 0);
- test.end();
+it("geoPolygonContains(southHemispherePoly) returns the expected value", () => {
+ const polygon = [[[0, 0], [10, -40], [-10, -40], [0, 0]]];
+ assert.strictEqual(polygonContains(polygon, [0,-40.2]), 1);
+ assert.strictEqual(polygonContains(polygon, [0,-40.5]), 0);
});
-tape("geoPolygonContains(largeNearOrigin, point) returns the expected value", function(test) {
- var polygon = [[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]];
- test.equal(polygonContains(polygon, [0.1, 0.1]), 0);
- test.equal(polygonContains(polygon, [2, 0.1]), 1);
- test.end();
+it("geoPolygonContains(largeNearOrigin, point) returns the expected value", () => {
+ const polygon = [[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]];
+ assert.strictEqual(polygonContains(polygon, [0.1, 0.1]), 0);
+ assert.strictEqual(polygonContains(polygon, [2, 0.1]), 1);
});
-tape("geoPolygonContains(largeNearSouthPole, point) returns the expected value", function(test) {
- var polygon = [[[-60, 80], [60, 80], [180, 80], [-60, 80]]];
- test.equal(polygonContains(polygon, [0, 85]), 0);
- test.equal(polygonContains(polygon, [0, 0]), 1);
- test.end();
+it("geoPolygonContains(largeNearSouthPole, point) returns the expected value", () => {
+ const polygon = [[[-60, 80], [60, 80], [180, 80], [-60, 80]]];
+ assert.strictEqual(polygonContains(polygon, [0, 85]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 1);
});
-tape("geoPolygonContains(largeNearNorthPole, point) returns the expected value", function(test) {
- var polygon = [[[60, -80], [-60, -80], [-180, -80], [60, -80]]];
- test.equal(polygonContains(polygon, [0, -85]), 0);
- test.equal(polygonContains(polygon, [0, 0]), 1);
- test.end();
+it("geoPolygonContains(largeNearNorthPole, point) returns the expected value", () => {
+ const polygon = [[[60, -80], [-60, -80], [-180, -80], [60, -80]]];
+ assert.strictEqual(polygonContains(polygon, [0, -85]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 1);
});
-tape("geoPolygonContains(largeCircle, point) returns the expected value", function(test) {
- var polygon = geoCircle().radius(120)().coordinates;
- test.equal(polygonContains(polygon, [-180, 0]), 0);
- test.equal(polygonContains(polygon, [-90, 0]), 1);
- test.end();
+it("geoPolygonContains(largeCircle, point) returns the expected value", () => {
+ const polygon = geoCircle().radius(120)().coordinates;
+ assert.strictEqual(polygonContains(polygon, [-180, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [-90, 0]), 1);
});
-tape("geoPolygonContains(largeNarrowStripHole, point) returns the expected value", function(test) {
- var polygon = [[[-170, -1], [0, -1], [170, -1], [170, 1], [0, 1], [-170, 1], [-170, -1]]];
- test.equal(polygonContains(polygon, [0, 0]), 0);
- test.equal(polygonContains(polygon, [0, 20]), 1);
- test.end();
+it("geoPolygonContains(largeNarrowStripHole, point) returns the expected value", () => {
+ const polygon = [[[-170, -1], [0, -1], [170, -1], [170, 1], [0, 1], [-170, 1], [-170, -1]]];
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 20]), 1);
});
-tape("geoPolygonContains(largeNarrowEquatorialHole, point) returns the expected value", function(test) {
- var circle = geoCircle().center([0, -90]),
+it("geoPolygonContains(largeNarrowEquatorialHole, point) returns the expected value", () => {
+ const circle = geoCircle().center([0, -90]),
ring0 = circle.radius(90 - 0.01)().coordinates[0],
ring1 = circle.radius(90 + 0.01)().coordinates[0].reverse(),
polygon = [ring0, ring1];
- test.equal(polygonContains(polygon, [0, 0]), 0);
- test.equal(polygonContains(polygon, [0, -90]), 1);
- test.end();
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, -90]), 1);
});
-tape("geoPolygonContains(largeNarrowEquatorialStrip, point) returns the expected value", function(test) {
- var circle = geoCircle().center([0, -90]),
+it("geoPolygonContains(largeNarrowEquatorialStrip, point) returns the expected value", () => {
+ const circle = geoCircle().center([0, -90]),
ring0 = circle.radius(90 + 0.01)().coordinates[0],
ring1 = circle.radius(90 - 0.01)().coordinates[0].reverse(),
polygon = [ring0, ring1];
- test.equal(polygonContains(polygon, [0, -90]), 0);
- test.equal(polygonContains(polygon, [0, 0]), 1);
- test.end();
+ assert.strictEqual(polygonContains(polygon, [0, -90]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 1);
});
-tape("geoPolygonContains(ringNearOrigin, point) returns the expected value", function(test) {
- var ring0 = [[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]],
+it("geoPolygonContains(ringNearOrigin, point) returns the expected value", () => {
+ const ring0 = [[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]],
ring1 = [[0.4, 0.4], [0.6, 0.4], [0.6, 0.6], [0.4, 0.6], [0.4, 0.4]],
polygon = [ring0, ring1];
- test.equal(polygonContains(polygon, [0.5, 0.5]), 0);
- test.equal(polygonContains(polygon, [0.1, 0.5]), 1);
- test.end();
+ assert.strictEqual(polygonContains(polygon, [0.5, 0.5]), 0);
+ assert.strictEqual(polygonContains(polygon, [0.1, 0.5]), 1);
});
-tape("geoPolygonContains(ringEquatorial, point) returns the expected value", function(test) {
- var ring0 = [[0, -10], [-120, -10], [120, -10], [0, -10]],
+it("geoPolygonContains(ringEquatorial, point) returns the expected value", () => {
+ const ring0 = [[0, -10], [-120, -10], [120, -10], [0, -10]],
ring1 = [[0, 10], [120, 10], [-120, 10], [0, 10]],
polygon = [ring0, ring1];
- test.equal(polygonContains(polygon, [0, 20]), 0);
- test.equal(polygonContains(polygon, [0, 0]), 1);
- test.end();
+ assert.strictEqual(polygonContains(polygon, [0, 20]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 1);
});
-tape("geoPolygonContains(ringExcludingBothPoles, point) returns the expected value", function(test) {
- var ring0 = [[10, 10], [-10, 10], [-10, -10], [10, -10], [10, 10]].reverse(),
+it("geoPolygonContains(ringExcludingBothPoles, point) returns the expected value", () => {
+ const ring0 = [[10, 10], [-10, 10], [-10, -10], [10, -10], [10, 10]].reverse(),
ring1 = [[170, 10], [170, -10], [-170, -10], [-170, 10], [170, 10]].reverse(),
polygon = [ring0, ring1];
- test.equal(polygonContains(polygon, [0, 90]), 0);
- test.equal(polygonContains(polygon, [0, 0]), 1);
- test.end();
+ assert.strictEqual(polygonContains(polygon, [0, 90]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 1);
});
-tape("geoPolygonContains(ringContainingBothPoles, point) returns the expected value", function(test) {
- var ring0 = [[10, 10], [-10, 10], [-10, -10], [10, -10], [10, 10]],
+it("geoPolygonContains(ringContainingBothPoles, point) returns the expected value", () => {
+ const ring0 = [[10, 10], [-10, 10], [-10, -10], [10, -10], [10, 10]],
ring1 = [[170, 10], [170, -10], [-170, -10], [-170, 10], [170, 10]],
polygon = [ring0, ring1];
- test.equal(polygonContains(polygon, [0, 0]), 0);
- test.equal(polygonContains(polygon, [0, 20]), 1);
- test.end();
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 20]), 1);
});
-tape("geoPolygonContains(ringContainingSouthPole, point) returns the expected value", function(test) {
- var ring0 = [[10, 10], [-10, 10], [-10, -10], [10, -10], [10, 10]],
+it("geoPolygonContains(ringContainingSouthPole, point) returns the expected value", () => {
+ const ring0 = [[10, 10], [-10, 10], [-10, -10], [10, -10], [10, 10]],
ring1 = [[0, 80], [120, 80], [-120, 80], [0, 80]],
polygon = [ring0, ring1];
- test.equal(polygonContains(polygon, [0, 90]), 0);
- test.equal(polygonContains(polygon, [0, -90]), 1);
- test.end();
+ assert.strictEqual(polygonContains(polygon, [0, 90]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, -90]), 1);
});
-tape("geoPolygonContains(ringContainingNorthPole, point) returns the expected value", function(test) {
- var ring0 = [[10, 10], [-10, 10], [-10, -10], [10, -10], [10, 10]].reverse(),
+it("geoPolygonContains(ringContainingNorthPole, point) returns the expected value", () => {
+ const ring0 = [[10, 10], [-10, 10], [-10, -10], [10, -10], [10, 10]].reverse(),
ring1 = [[0, 80], [120, 80], [-120, 80], [0, 80]].reverse(),
polygon = [ring0, ring1];
- test.equal(polygonContains(polygon, [0, -90]), 0);
- test.equal(polygonContains(polygon, [0, 90]), 1);
- test.end();
-});
-
-tape("geoPolygonContains(selfIntersectingNearOrigin, point) returns the expected value", function(test) {
- var polygon = [[[0, 0], [1, 0], [1, 3], [3, 3], [3, 1], [0, 1], [0, 0]]];
- test.equal(polygonContains(polygon, [15, 0.5]), 0);
- test.equal(polygonContains(polygon, [12, 2]), 0);
- test.equal(polygonContains(polygon, [0.5, 0.5]), 1);
- test.equal(polygonContains(polygon, [2, 2]), 1);
- test.end();
-});
-
-tape("geoPolygonContains(selfIntersectingNearSouthPole, point) returns the expected value", function(test) {
- var polygon = [[[-10, -80], [120, -80], [-120, -80], [10, -85], [10, -75], [-10, -75], [-10, -80]]];
- test.equal(polygonContains(polygon, [0, 0]), 0);
- test.equal(polygonContains(polygon, [0, -76]), 1);
- test.equal(polygonContains(polygon, [0, -89]), 1);
- test.end();
-});
-
-tape("geoPolygonContains(selfIntersectingNearNorthPole, point) returns the expected value", function(test) {
- var polygon = [[[-10, 80], [-10, 75], [10, 75], [10, 85], [-120, 80], [120, 80], [-10, 80]]];
- test.equal(polygonContains(polygon, [0, 0]), 0);
- test.equal(polygonContains(polygon, [0, 76]), 1);
- test.equal(polygonContains(polygon, [0, 89]), 1);
- test.end();
-});
-
-tape("geoPolygonContains(hemisphereTouchingTheSouthPole, point) returns the expected value", function(test) {
- var polygon = geoCircle().radius(90)().coordinates;
- test.equal(polygonContains(polygon, [0, 0]), 1);
- test.end();
-});
-
-tape("geoPolygonContains(triangleTouchingTheSouthPole, point) returns the expected value", function(test) {
- var polygon = [[[180, -90], [-45, 0], [45, 0], [180, -90]]];
- test.equal(polygonContains(polygon, [-46, 0]), 0);
- test.equal(polygonContains(polygon, [0, 1]), 0);
- test.equal(polygonContains(polygon, [-90, -80]), 0);
- test.equal(polygonContains(polygon, [-44, 0]), 1);
- test.equal(polygonContains(polygon, [0, 0]), 1);
- test.equal(polygonContains(polygon, [0, -30]), 1);
- test.equal(polygonContains(polygon, [30, -80]), 1);
- test.end();
-});
-
-tape("geoPolygonContains(triangleTouchingTheSouthPole2, point) returns the expected value", function(test) {
- var polygon = [[[-45, 0], [45, 0], [180, -90], [-45, 0]]];
- test.equal(polygonContains(polygon, [-46, 0]), 0);
- test.equal(polygonContains(polygon, [0, 1]), 0);
- test.equal(polygonContains(polygon, [-90, -80]), 0);
- test.equal(polygonContains(polygon, [-44, 0]), 1);
- test.equal(polygonContains(polygon, [0, 0]), 1);
- test.equal(polygonContains(polygon, [0, -30]), 1);
- test.equal(polygonContains(polygon, [30, -80]), 1);
- test.end();
-});
-
-tape("geoPolygonContains(triangleTouchingTheSouthPole3, point) returns the expected value", function(test) {
- var polygon = [[[180, -90], [-135, 0], [135, 0], [180, -90]]];
- test.equal(polygonContains(polygon, [180, 0]), 0);
- test.equal(polygonContains(polygon, [150, 0]), 0);
- test.equal(polygonContains(polygon, [180, -30]), 0);
- test.equal(polygonContains(polygon, [150, -80]), 0);
- test.equal(polygonContains(polygon, [0, 0]), 1);
- test.equal(polygonContains(polygon, [180, 1]), 1);
- test.equal(polygonContains(polygon, [-90, -80]), 1);
- test.end();
-});
-
-tape("geoPolygonContains(triangleTouchingTheNorthPole, point) returns the expected value", function(test) {
- var polygon = [[[180, 90], [45, 0], [-45, 0], [180, 90]]];
- test.equal(polygonContains(polygon, [-90, 0]), 0);
- test.equal(polygonContains(polygon, [0, -1]), 0);
- test.equal(polygonContains(polygon, [0, -80]), 0);
- test.equal(polygonContains(polygon, [-90, 1]), 0);
- test.equal(polygonContains(polygon, [-90, 80]), 0);
- test.equal(polygonContains(polygon, [-44, 10]), 1);
- test.equal(polygonContains(polygon, [0, 10]), 1);
- test.equal(polygonContains(polygon, [30, 80]), 1);
- test.end();
+ assert.strictEqual(polygonContains(polygon, [0, -90]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 90]), 1);
+});
+
+it("geoPolygonContains(selfIntersectingNearOrigin, point) returns the expected value", () => {
+ const polygon = [[[0, 0], [1, 0], [1, 3], [3, 3], [3, 1], [0, 1], [0, 0]]];
+ assert.strictEqual(polygonContains(polygon, [15, 0.5]), 0);
+ assert.strictEqual(polygonContains(polygon, [12, 2]), 0);
+ assert.strictEqual(polygonContains(polygon, [0.5, 0.5]), 1);
+ assert.strictEqual(polygonContains(polygon, [2, 2]), 1);
+});
+
+it("geoPolygonContains(selfIntersectingNearSouthPole, point) returns the expected value", () => {
+ const polygon = [[[-10, -80], [120, -80], [-120, -80], [10, -85], [10, -75], [-10, -75], [-10, -80]]];
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, -76]), 1);
+ assert.strictEqual(polygonContains(polygon, [0, -89]), 1);
+});
+
+it("geoPolygonContains(selfIntersectingNearNorthPole, point) returns the expected value", () => {
+ const polygon = [[[-10, 80], [-10, 75], [10, 75], [10, 85], [-120, 80], [120, 80], [-10, 80]]];
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 76]), 1);
+ assert.strictEqual(polygonContains(polygon, [0, 89]), 1);
+});
+
+it("geoPolygonContains(hemisphereTouchingTheSouthPole, point) returns the expected value", () => {
+ const polygon = geoCircle().radius(90)().coordinates;
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 1);
+});
+
+it("geoPolygonContains(triangleTouchingTheSouthPole, point) returns the expected value", () => {
+ const polygon = [[[180, -90], [-45, 0], [45, 0], [180, -90]]];
+ assert.strictEqual(polygonContains(polygon, [-46, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 1]), 0);
+ assert.strictEqual(polygonContains(polygon, [-90, -80]), 0);
+ assert.strictEqual(polygonContains(polygon, [-44, 0]), 1);
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 1);
+ assert.strictEqual(polygonContains(polygon, [0, -30]), 1);
+ assert.strictEqual(polygonContains(polygon, [30, -80]), 1);
+});
+
+it("geoPolygonContains(triangleTouchingTheSouthPole2, point) returns the expected value", () => {
+ const polygon = [[[-45, 0], [45, 0], [180, -90], [-45, 0]]];
+ assert.strictEqual(polygonContains(polygon, [-46, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 1]), 0);
+ assert.strictEqual(polygonContains(polygon, [-90, -80]), 0);
+ assert.strictEqual(polygonContains(polygon, [-44, 0]), 1);
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 1);
+ assert.strictEqual(polygonContains(polygon, [0, -30]), 1);
+ assert.strictEqual(polygonContains(polygon, [30, -80]), 1);
+});
+
+it("geoPolygonContains(triangleTouchingTheSouthPole3, point) returns the expected value", () => {
+ const polygon = [[[180, -90], [-135, 0], [135, 0], [180, -90]]];
+ assert.strictEqual(polygonContains(polygon, [180, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [150, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [180, -30]), 0);
+ assert.strictEqual(polygonContains(polygon, [150, -80]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, 0]), 1);
+ assert.strictEqual(polygonContains(polygon, [180, 1]), 1);
+ assert.strictEqual(polygonContains(polygon, [-90, -80]), 1);
+});
+
+it("geoPolygonContains(triangleTouchingTheNorthPole, point) returns the expected value", () => {
+ const polygon = [[[180, 90], [45, 0], [-45, 0], [180, 90]]];
+ assert.strictEqual(polygonContains(polygon, [-90, 0]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, -1]), 0);
+ assert.strictEqual(polygonContains(polygon, [0, -80]), 0);
+ assert.strictEqual(polygonContains(polygon, [-90, 1]), 0);
+ assert.strictEqual(polygonContains(polygon, [-90, 80]), 0);
+ assert.strictEqual(polygonContains(polygon, [-44, 10]), 1);
+ assert.strictEqual(polygonContains(polygon, [0, 10]), 1);
+ assert.strictEqual(polygonContains(polygon, [30, 80]), 1);
});
function ringRadians(ring) {
diff --git a/test/projection/albersUsa-test.js b/test/projection/albersUsa-test.js
index a544e0b..e8fcf43 100644
--- a/test/projection/albersUsa-test.js
+++ b/test/projection/albersUsa-test.js
@@ -1,15 +1,13 @@
-var tape = require("tape"),
- d3 = require("../../");
+import assert from "assert";
+import {geoAlbersUsa} from "../../src/index.js";
+import {assertProjectionEqual} from "./asserts.js";
-require("./projectionEqual");
-
-tape("albersUsa(point) and albersUsa.invert(point) returns the expected result", function(test) {
- var albersUsa = d3.geoAlbersUsa();
- test.projectionEqual(albersUsa, [-122.4194, 37.7749], [107.4, 214.1], 0.1); // San Francisco, CA
- test.projectionEqual(albersUsa, [ -74.0059, 40.7128], [794.6, 176.5], 0.1); // New York, NY
- test.projectionEqual(albersUsa, [ -95.9928, 36.1540], [488.8, 298.0], 0.1); // Tulsa, OK
- test.projectionEqual(albersUsa, [-149.9003, 61.2181], [171.2, 446.9], 0.1); // Anchorage, AK
- test.projectionEqual(albersUsa, [-157.8583, 21.3069], [298.5, 451.0], 0.1); // Honolulu, HI
- test.equal(albersUsa([2.3522, 48.8566]), null); // Paris, France
- test.end();
+it("albersUsa(point) and albersUsa.invert(point) returns the expected result", () => {
+ const albersUsa = geoAlbersUsa();
+ assertProjectionEqual(albersUsa, [-122.4194, 37.7749], [107.4, 214.1], 0.1); // San Francisco, CA
+ assertProjectionEqual(albersUsa, [ -74.0059, 40.7128], [794.6, 176.5], 0.1); // New York, NY
+ assertProjectionEqual(albersUsa, [ -95.9928, 36.1540], [488.8, 298.0], 0.1); // Tulsa, OK
+ assertProjectionEqual(albersUsa, [-149.9003, 61.2181], [171.2, 446.9], 0.1); // Anchorage, AK
+ assertProjectionEqual(albersUsa, [-157.8583, 21.3069], [298.5, 451.0], 0.1); // Honolulu, HI
+ assert.strictEqual(albersUsa([2.3522, 48.8566]), null); // Paris, France
});
diff --git a/test/projection/angle-test.js b/test/projection/angle-test.js
index d88f398..bb09f87 100644
--- a/test/projection/angle-test.js
+++ b/test/projection/angle-test.js
@@ -1,66 +1,60 @@
-var tape = require("tape"),
- d3 = require("../../");
+import assert from "assert";
+import {geoGnomonic, geoIdentity} from "../../src/index.js";
+import {assertInDelta} from "../asserts.js";
+import {assertProjectionEqual} from "./asserts.js";
-require("../inDelta");
-require("./projectionEqual");
-
-tape("projection.angle(…) defaults to zero", function(test) {
- var projection = d3.geoGnomonic().scale(1).translate([0, 0]);
- test.equal(projection.angle(), 0);
- test.projectionEqual(projection, [0, 0], [0, 0]);
- test.projectionEqual(projection, [10, 0], [0.17632698070846498, 0]);
- test.projectionEqual(projection, [-10, 0], [-0.17632698070846498, 0]);
- test.projectionEqual(projection, [0, 10], [0, -0.17632698070846498]);
- test.projectionEqual(projection, [0, -10], [0, 0.17632698070846498]);
- test.projectionEqual(projection, [10, 10], [0.17632698070846495, -0.17904710860483972]);
- test.projectionEqual(projection, [10, -10], [0.17632698070846495, 0.17904710860483972]);
- test.projectionEqual(projection, [-10, 10], [-0.17632698070846495, -0.17904710860483972]);
- test.projectionEqual(projection, [-10, -10], [-0.17632698070846495, 0.17904710860483972]);
- test.end();
+it("projection.angle(…) defaults to zero", () => {
+ const projection = geoGnomonic().scale(1).translate([0, 0]);
+ assert.strictEqual(projection.angle(), 0);
+ assertProjectionEqual(projection, [0, 0], [0, 0]);
+ assertProjectionEqual(projection, [10, 0], [0.17632698070846498, 0]);
+ assertProjectionEqual(projection, [-10, 0], [-0.17632698070846498, 0]);
+ assertProjectionEqual(projection, [0, 10], [0, -0.17632698070846498]);
+ assertProjectionEqual(projection, [0, -10], [0, 0.17632698070846498]);
+ assertProjectionEqual(projection, [10, 10], [0.17632698070846495, -0.17904710860483972]);
+ assertProjectionEqual(projection, [10, -10], [0.17632698070846495, 0.17904710860483972]);
+ assertProjectionEqual(projection, [-10, 10], [-0.17632698070846495, -0.17904710860483972]);
+ assertProjectionEqual(projection, [-10, -10], [-0.17632698070846495, 0.17904710860483972]);
});
-tape("projection.angle(…) rotates by the specified degrees after projecting", function(test) {
- var projection = d3.geoGnomonic().scale(1).translate([0, 0]).angle(30);
- test.inDelta(projection.angle(), 30);
- test.projectionEqual(projection, [0, 0], [0, 0]);
- test.projectionEqual(projection, [10, 0], [0.1527036446661393, -0.08816349035423247]);
- test.projectionEqual(projection, [-10, 0], [-0.1527036446661393, 0.08816349035423247]);
- test.projectionEqual(projection, [0, 10], [-0.08816349035423247, -0.1527036446661393]);
- test.projectionEqual(projection, [0, -10], [0.08816349035423247, 0.1527036446661393]);
- test.projectionEqual(projection, [10, 10], [0.06318009036371944, -0.24322283488017502]);
- test.projectionEqual(projection, [10, -10], [0.24222719896855913, 0.0668958541717101]);
- test.projectionEqual(projection, [-10, 10], [-0.24222719896855913, -0.0668958541717101]);
- test.projectionEqual(projection, [-10, -10], [-0.06318009036371944, 0.24322283488017502]);
- test.end();
+it("projection.angle(…) rotates by the specified degrees after projecting", () => {
+ const projection = geoGnomonic().scale(1).translate([0, 0]).angle(30);
+ assertInDelta(projection.angle(), 30);
+ assertProjectionEqual(projection, [0, 0], [0, 0]);
+ assertProjectionEqual(projection, [10, 0], [0.1527036446661393, -0.08816349035423247]);
+ assertProjectionEqual(projection, [-10, 0], [-0.1527036446661393, 0.08816349035423247]);
+ assertProjectionEqual(projection, [0, 10], [-0.08816349035423247, -0.1527036446661393]);
+ assertProjectionEqual(projection, [0, -10], [0.08816349035423247, 0.1527036446661393]);
+ assertProjectionEqual(projection, [10, 10], [0.06318009036371944, -0.24322283488017502]);
+ assertProjectionEqual(projection, [10, -10], [0.24222719896855913, 0.0668958541717101]);
+ assertProjectionEqual(projection, [-10, 10], [-0.24222719896855913, -0.0668958541717101]);
+ assertProjectionEqual(projection, [-10, -10], [-0.06318009036371944, 0.24322283488017502]);
});
-tape("projection.angle(…) rotates by the specified degrees after projecting", function(test) {
- var projection = d3.geoGnomonic().scale(1).translate([0, 0]).angle(-30);
- test.inDelta(projection.angle(), -30);
- test.projectionEqual(projection, [0, 0], [0, 0]);
- test.projectionEqual(projection, [10, 0], [0.1527036446661393, 0.08816349035423247]);
- test.projectionEqual(projection, [-10, 0], [-0.1527036446661393, -0.08816349035423247]);
- test.projectionEqual(projection, [0, 10], [0.08816349035423247, -0.1527036446661393]);
- test.projectionEqual(projection, [0, -10], [-0.08816349035423247, 0.1527036446661393]);
- test.projectionEqual(projection, [10, 10], [0.24222719896855913, -0.0668958541717101]);
- test.projectionEqual(projection, [10, -10], [0.06318009036371944, 0.24322283488017502]);
- test.projectionEqual(projection, [-10, 10], [-0.06318009036371944, -0.24322283488017502]);
- test.projectionEqual(projection, [-10, -10], [-0.24222719896855913, 0.0668958541717101]);
- test.end();
+it("projection.angle(…) rotates by the specified degrees after projecting", () => {
+ const projection = geoGnomonic().scale(1).translate([0, 0]).angle(-30);
+ assertInDelta(projection.angle(), -30);
+ assertProjectionEqual(projection, [0, 0], [0, 0]);
+ assertProjectionEqual(projection, [10, 0], [0.1527036446661393, 0.08816349035423247]);
+ assertProjectionEqual(projection, [-10, 0], [-0.1527036446661393, -0.08816349035423247]);
+ assertProjectionEqual(projection, [0, 10], [0.08816349035423247, -0.1527036446661393]);
+ assertProjectionEqual(projection, [0, -10], [-0.08816349035423247, 0.1527036446661393]);
+ assertProjectionEqual(projection, [10, 10], [0.24222719896855913, -0.0668958541717101]);
+ assertProjectionEqual(projection, [10, -10], [0.06318009036371944, 0.24322283488017502]);
+ assertProjectionEqual(projection, [-10, 10], [-0.06318009036371944, -0.24322283488017502]);
+ assertProjectionEqual(projection, [-10, -10], [-0.24222719896855913, 0.0668958541717101]);
});
-tape("projection.angle(…) wraps around 360°", function(test) {
- var projection = d3.geoGnomonic().scale(1).translate([0, 0]).angle(360);
- test.equal(projection.angle(), 0);
- test.end();
+it("projection.angle(…) wraps around 360°", () => {
+ const projection = geoGnomonic().scale(1).translate([0, 0]).angle(360);
+ assert.strictEqual(projection.angle(), 0);
});
-tape("identity.angle(…) rotates geoIdentity", function(test) {
- var projection = d3.geoIdentity().angle(-45), SQRT2_2 = Math.sqrt(2) / 2;
- test.inDelta(projection.angle(), -45);
- test.projectionEqual(projection, [0, 0], [0, 0]);
- test.projectionEqual(projection, [1, 0], [SQRT2_2, SQRT2_2]);
- test.projectionEqual(projection, [-1, 0], [-SQRT2_2, -SQRT2_2]);
- test.projectionEqual(projection, [0, 1], [-SQRT2_2, SQRT2_2]);
- test.end();
+it("identity.angle(…) rotates geoIdentity", () => {
+ const projection = geoIdentity().angle(-45), SQRT2_2 = Math.sqrt(2) / 2;
+ assertInDelta(projection.angle(), -45);
+ assertProjectionEqual(projection, [0, 0], [0, 0]);
+ assertProjectionEqual(projection, [1, 0], [SQRT2_2, SQRT2_2]);
+ assertProjectionEqual(projection, [-1, 0], [-SQRT2_2, -SQRT2_2]);
+ assertProjectionEqual(projection, [0, 1], [-SQRT2_2, SQRT2_2]);
});
diff --git a/test/projection/projectionEqual.js b/test/projection/asserts.js
similarity index 66%
rename from test/projection/projectionEqual.js
rename to test/projection/asserts.js
index 6e2c6ef..0fec35d 100644
--- a/test/projection/projectionEqual.js
+++ b/test/projection/asserts.js
@@ -1,14 +1,10 @@
-var tape = require("tape");
+import assert from "assert";
-tape.Test.prototype.projectionEqual = function(projection, location, point, delta) {
- this._assert(planarEqual(projection(location), point, delta || 1e-6)
- && sphericalEqual(projection.invert(point), location, delta || 1e-3), {
- message: "should be projected equivalents",
- operator: "planarEqual",
- actual: [projection.invert(point), projection(location)],
- expected: [location, point]
- });
-};
+export function assertProjectionEqual(projection, location, point, delta) {
+ assert(planarEqual(projection(location), point, delta || 1e-6)
+ && sphericalEqual(projection.invert(point), location, delta || 1e-3),
+ `${[projection.invert(point), projection(location)]} should be projected equivalents; expected: ${[location, point]}`);
+}
function planarEqual(actual, expected, delta) {
return Array.isArray(actual)
diff --git a/test/projection/azimuthal-test.js b/test/projection/azimuthal-test.js
index efea638..fda3f82 100644
--- a/test/projection/azimuthal-test.js
+++ b/test/projection/azimuthal-test.js
@@ -1,17 +1,13 @@
-var tape = require("tape"),
- d3 = require("../../");
+import assert from "assert";
+import {geoAzimuthalEqualArea, geoAzimuthalEquidistant} from "../../src/index.js";
-require("../pathEqual");
-
-tape("azimuthal projections don't crash on the antipode", function(test) {
+it("azimuthal projections don't crash on the antipode", () => {
for (const p of [
- d3.geoAzimuthalEqualArea()([180, 0]),
- d3.geoAzimuthalEqualArea()([-180, 0]),
- d3.geoAzimuthalEquidistant()([180, 0])
+ geoAzimuthalEqualArea()([180, 0]),
+ geoAzimuthalEqualArea()([-180, 0]),
+ geoAzimuthalEquidistant()([180, 0])
]) {
- test.assert(Math.abs(p[0]) < Infinity);
- test.assert(Math.abs(p[1]) < Infinity);
- };
- test.end();
+ assert(Math.abs(p[0]) < Infinity);
+ assert(Math.abs(p[1]) < Infinity);
+ }
});
-
diff --git a/test/projection/clipcircle-test.js b/test/projection/clipcircle-test.js
index ec8b2b5..33dfcca 100644
--- a/test/projection/clipcircle-test.js
+++ b/test/projection/clipcircle-test.js
@@ -1,16 +1,12 @@
-var tape = require("tape"),
- d3 = require("../../");
+import assert from "assert";
+import {geoAzimuthalEqualArea, geoPath} from "../../src/index.js";
-tape("projection.clipAngle() deals with degenerate polygons", function(test) {
+it("projection.clipAngle() deals with degenerate polygons", () => {
// https://observablehq.com/d/495020ca139c39bd
- var polygon = {
+ const polygon = {
type: "Polygon",
coordinates: [ [[-120, -30],[0, -30],[0, -90],[0, -30],[120, -30],[-120, -30]] ]
};
- var projection = d3.geoAzimuthalEqualArea()
- .translate([0.5, 0.5])
- .rotate([0, -90, 0])
- .clipAngle(170);
- test.equal(d3.geoPath(projection)(polygon).replace(/\.\d+/g,""), 'M0,249L0,238L0,216L21,219L45,219L71,215L98,207L127,193L141,184L155,173L168,161L181,148L192,133L202,117L211,100L218,83L224,65L228,48L230,30L231,13L229,-17L222,-45L212,-70L200,-90L187,-107L179,-127L167,-147L151,-168L130,-188L104,-206L89,-213L73,-220L55,-225L37,-229L19,-232L0,-233L-18,-232L-36,-229L-54,-225L-72,-220L-88,-213L-103,-206L-129,-188L-150,-168L-166,-147L-178,-127L-186,-107L-186,-107L-199,-90L-211,-70L-221,-45L-228,-17L-230,13L-229,30L-227,48L-223,65L-217,83L-210,100L-201,117L-191,133L-180,148L-167,161L-154,173L-140,184L-126,193L-97,207L-70,215L-44,219L-20,219L0,216L0,238L0,249L0,249L-25,247L-51,243L-76,236L-100,227L-123,215L-145,201L-165,185L-184,166L-200,146L-214,124L-226,101L-235,77L-242,52L-246,26L-248,0L-246,-25L-242,-51L-235,-76L-226,-100L-214,-123L-200,-145L-184,-165L-165,-184L-145,-200L-123,-214L-100,-226L-76,-235L-51,-242L-25,-246L0,-248L26,-246L52,-242L77,-235L101,-226L124,-214L146,-200L166,-184L185,-165L201,-145L215,-123L227,-100L236,-76L243,-51L247,-25L249,0L247,26L243,52L236,77L227,101L215,124L201,146L185,166L166,185L146,201L124,215L101,227L77,236L52,243L26,247Z');
- test.end();
+ const projection = geoAzimuthalEqualArea().translate([0.5, 0.5]).rotate([0, -90, 0]).clipAngle(170);
+ assert.strictEqual(geoPath(projection)(polygon).replace(/\.\d+/g,""), 'M0,249L0,238L0,216L21,219L45,219L71,215L98,207L127,193L141,184L155,173L168,161L181,148L192,133L202,117L211,100L218,83L224,65L228,48L230,30L231,13L229,-17L222,-45L212,-70L200,-90L187,-107L179,-127L167,-147L151,-168L130,-188L104,-206L89,-213L73,-220L55,-225L37,-229L19,-232L0,-233L-18,-232L-36,-229L-54,-225L-72,-220L-88,-213L-103,-206L-129,-188L-150,-168L-166,-147L-178,-127L-186,-107L-186,-107L-199,-90L-211,-70L-221,-45L-228,-17L-230,13L-229,30L-227,48L-223,65L-217,83L-210,100L-201,117L-191,133L-180,148L-167,161L-154,173L-140,184L-126,193L-97,207L-70,215L-44,219L-20,219L0,216L0,238L0,249L0,249L-25,247L-51,243L-76,236L-100,227L-123,215L-145,201L-165,185L-184,166L-200,146L-214,124L-226,101L-235,77L-242,52L-246,26L-248,0L-246,-25L-242,-51L-235,-76L-226,-100L-214,-123L-200,-145L-184,-165L-165,-184L-145,-200L-123,-214L-100,-226L-76,-235L-51,-242L-25,-246L0,-248L26,-246L52,-242L77,-235L101,-226L124,-214L146,-200L166,-184L185,-165L201,-145L215,-123L227,-100L236,-76L243,-51L247,-25L249,0L247,26L243,52L236,77L227,101L215,124L201,146L185,166L166,185L146,201L124,215L101,227L77,236L52,243L26,247Z');
});
diff --git a/test/projection/equirectangular-test.js b/test/projection/equirectangular-test.js
index 7fb7bbe..ac273e1 100644
--- a/test/projection/equirectangular-test.js
+++ b/test/projection/equirectangular-test.js
@@ -1,76 +1,69 @@
-var tape = require("tape"),
- d3 = require("../../");
+import {geoEquirectangular} from "../../src/index.js";
+import {assertProjectionEqual} from "./asserts.js";
-require("./projectionEqual");
+const pi = Math.PI;
-var pi = Math.PI;
-
-tape("equirectangular(point) returns the expected result", function(test) {
- var equirectangular = d3.geoEquirectangular().translate([0, 0]).scale(1);
- test.projectionEqual(equirectangular, [ 0, 0], [ 0, 0]);
- test.projectionEqual(equirectangular, [-180, 0], [-pi, 0]);
- test.projectionEqual(equirectangular, [ 180, 0], [ pi, 0]);
- test.projectionEqual(equirectangular, [ 0, 30], [ 0, -pi / 6]);
- test.projectionEqual(equirectangular, [ 0, -30], [ 0, pi / 6]);
- test.projectionEqual(equirectangular, [ 30, 30], [ pi / 6, -pi / 6]);
- test.projectionEqual(equirectangular, [ 30, -30], [ pi / 6, pi / 6]);
- test.projectionEqual(equirectangular, [ -30, 30], [-pi / 6, -pi / 6]);
- test.projectionEqual(equirectangular, [ -30, -30], [-pi / 6, pi / 6]);
- test.end();
+it("equirectangular(point) returns the expected result", () => {
+ const equirectangular = geoEquirectangular().translate([0, 0]).scale(1);
+ assertProjectionEqual(equirectangular, [ 0, 0], [ 0, 0]);
+ assertProjectionEqual(equirectangular, [-180, 0], [-pi, 0]);
+ assertProjectionEqual(equirectangular, [ 180, 0], [ pi, 0]);
+ assertProjectionEqual(equirectangular, [ 0, 30], [ 0, -pi / 6]);
+ assertProjectionEqual(equirectangular, [ 0, -30], [ 0, pi / 6]);
+ assertProjectionEqual(equirectangular, [ 30, 30], [ pi / 6, -pi / 6]);
+ assertProjectionEqual(equirectangular, [ 30, -30], [ pi / 6, pi / 6]);
+ assertProjectionEqual(equirectangular, [ -30, 30], [-pi / 6, -pi / 6]);
+ assertProjectionEqual(equirectangular, [ -30, -30], [-pi / 6, pi / 6]);
});
-tape("equirectangular.rotate([30, 0])(point) returns the expected result", function(test) {
- var equirectangular = d3.geoEquirectangular().rotate([30, 0]).translate([0, 0]).scale(1);
- test.projectionEqual(equirectangular, [ 0, 0], [ pi / 6, 0]);
- test.projectionEqual(equirectangular, [-180, 0], [-5 / 6 * pi, 0]);
- test.projectionEqual(equirectangular, [ 180, 0], [-5 / 6 * pi, 0]);
- test.projectionEqual(equirectangular, [ 0, 30], [ pi / 6, -pi / 6]);
- test.projectionEqual(equirectangular, [ 0, -30], [ pi / 6, pi / 6]);
- test.projectionEqual(equirectangular, [ 30, 30], [ pi / 3, -pi / 6]);
- test.projectionEqual(equirectangular, [ 30, -30], [ pi / 3, pi / 6]);
- test.projectionEqual(equirectangular, [ -30, 30], [ 0 , -pi / 6]);
- test.projectionEqual(equirectangular, [ -30, -30], [ 0 , pi / 6]);
- test.end();
+it("equirectangular.rotate([30, 0])(point) returns the expected result", () => {
+ const equirectangular = geoEquirectangular().rotate([30, 0]).translate([0, 0]).scale(1);
+ assertProjectionEqual(equirectangular, [ 0, 0], [ pi / 6, 0]);
+ assertProjectionEqual(equirectangular, [-180, 0], [-5 / 6 * pi, 0]);
+ assertProjectionEqual(equirectangular, [ 180, 0], [-5 / 6 * pi, 0]);
+ assertProjectionEqual(equirectangular, [ 0, 30], [ pi / 6, -pi / 6]);
+ assertProjectionEqual(equirectangular, [ 0, -30], [ pi / 6, pi / 6]);
+ assertProjectionEqual(equirectangular, [ 30, 30], [ pi / 3, -pi / 6]);
+ assertProjectionEqual(equirectangular, [ 30, -30], [ pi / 3, pi / 6]);
+ assertProjectionEqual(equirectangular, [ -30, 30], [ 0 , -pi / 6]);
+ assertProjectionEqual(equirectangular, [ -30, -30], [ 0 , pi / 6]);
});
-tape("equirectangular.rotate([30, 30])(point) returns the expected result", function(test) {
- var equirectangular = d3.geoEquirectangular().rotate([30, 30]).translate([0, 0]).scale(1);
- test.projectionEqual(equirectangular, [ 0, 0], [ 0.5880026035475674, -0.44783239692893245]);
- test.projectionEqual(equirectangular, [-180, 0], [-2.5535900500422257, 0.44783239692893245]);
- test.projectionEqual(equirectangular, [ 180, 0], [-2.5535900500422257, 0.44783239692893245]);
- test.projectionEqual(equirectangular, [ 0, 30], [ 0.8256075561643480, -0.94077119517052080]);
- test.projectionEqual(equirectangular, [ 0, -30], [ 0.4486429615608479, 0.05804529130778048]);
- test.projectionEqual(equirectangular, [ 30, 30], [ 1.4056476493802694, -0.70695172788721770]);
- test.projectionEqual(equirectangular, [ 30, -30], [ 0.8760580505981933, 0.21823451436745955]);
- test.projectionEqual(equirectangular, [ -30, 30], [ 0.0000000000000000, -1.04719755119659760]);
- test.projectionEqual(equirectangular, [ -30, -30], [ 0.0000000000000000, 0.00000000000000000]);
- test.end();
+it("equirectangular.rotate([30, 30])(point) returns the expected result", () => {
+ const equirectangular = geoEquirectangular().rotate([30, 30]).translate([0, 0]).scale(1);
+ assertProjectionEqual(equirectangular, [ 0, 0], [ 0.5880026035475674, -0.44783239692893245]);
+ assertProjectionEqual(equirectangular, [-180, 0], [-2.5535900500422257, 0.44783239692893245]);
+ assertProjectionEqual(equirectangular, [ 180, 0], [-2.5535900500422257, 0.44783239692893245]);
+ assertProjectionEqual(equirectangular, [ 0, 30], [ 0.8256075561643480, -0.94077119517052080]);
+ assertProjectionEqual(equirectangular, [ 0, -30], [ 0.4486429615608479, 0.05804529130778048]);
+ assertProjectionEqual(equirectangular, [ 30, 30], [ 1.4056476493802694, -0.70695172788721770]);
+ assertProjectionEqual(equirectangular, [ 30, -30], [ 0.8760580505981933, 0.21823451436745955]);
+ assertProjectionEqual(equirectangular, [ -30, 30], [ 0.0000000000000000, -1.04719755119659760]);
+ assertProjectionEqual(equirectangular, [ -30, -30], [ 0.0000000000000000, 0.00000000000000000]);
});
-tape("equirectangular.rotate([0, 0, 30])(point) returns the expected result", function(test) {
- var equirectangular = d3.geoEquirectangular().rotate([0, 0, 30]).translate([0, 0]).scale(1);
- test.projectionEqual(equirectangular, [ 0, 0], [ 0, 0]);
- test.projectionEqual(equirectangular, [-180, 0], [-pi, 0]);
- test.projectionEqual(equirectangular, [ 180, 0], [ pi, 0]);
- test.projectionEqual(equirectangular, [ 0, 30], [-0.2810349015028135, -0.44783239692893245]);
- test.projectionEqual(equirectangular, [ 0, -30], [ 0.2810349015028135, 0.44783239692893245]);
- test.projectionEqual(equirectangular, [ 30, 30], [ 0.1651486774146268, -0.70695172788721760]);
- test.projectionEqual(equirectangular, [ 30, -30], [ 0.6947382761967031, 0.21823451436745964]);
- test.projectionEqual(equirectangular, [ -30, 30], [-0.6947382761967031, -0.21823451436745964]);
- test.projectionEqual(equirectangular, [ -30, -30], [-0.1651486774146268, 0.70695172788721760]);
- test.end();
+it("equirectangular.rotate([0, 0, 30])(point) returns the expected result", () => {
+ const equirectangular = geoEquirectangular().rotate([0, 0, 30]).translate([0, 0]).scale(1);
+ assertProjectionEqual(equirectangular, [ 0, 0], [ 0, 0]);
+ assertProjectionEqual(equirectangular, [-180, 0], [-pi, 0]);
+ assertProjectionEqual(equirectangular, [ 180, 0], [ pi, 0]);
+ assertProjectionEqual(equirectangular, [ 0, 30], [-0.2810349015028135, -0.44783239692893245]);
+ assertProjectionEqual(equirectangular, [ 0, -30], [ 0.2810349015028135, 0.44783239692893245]);
+ assertProjectionEqual(equirectangular, [ 30, 30], [ 0.1651486774146268, -0.70695172788721760]);
+ assertProjectionEqual(equirectangular, [ 30, -30], [ 0.6947382761967031, 0.21823451436745964]);
+ assertProjectionEqual(equirectangular, [ -30, 30], [-0.6947382761967031, -0.21823451436745964]);
+ assertProjectionEqual(equirectangular, [ -30, -30], [-0.1651486774146268, 0.70695172788721760]);
});
-tape("equirectangular.rotate([30, 30, 30])(point) returns the expected result", function(test) {
- var equirectangular = d3.geoEquirectangular().rotate([30, 30, 30]).translate([0, 0]).scale(1);
- test.projectionEqual(equirectangular, [ 0, 0], [ 0.2810349015028135, -0.67513153293703170]);
- test.projectionEqual(equirectangular, [-180, 0], [-2.8605577520869800, 0.67513153293703170]);
- test.projectionEqual(equirectangular, [ 180, 0], [-2.8605577520869800, 0.67513153293703170]);
- test.projectionEqual(equirectangular, [ 0, 30], [-0.0724760059270816, -1.15865677086597720]);
- test.projectionEqual(equirectangular, [ 0, -30], [ 0.4221351552567053, -0.16704161863132252]);
- test.projectionEqual(equirectangular, [ 30, 30], [ 1.2033744221750944, -1.21537512510467320]);
- test.projectionEqual(equirectangular, [ 30, -30], [ 0.8811235701944905, -0.18861638617540410]);
- test.projectionEqual(equirectangular, [ -30, 30], [-0.7137243789447654, -0.84806207898148100]);
- test.projectionEqual(equirectangular, [ -30, -30], [ 0, 0]);
- test.end();
+it("equirectangular.rotate([30, 30, 30])(point) returns the expected result", () => {
+ const equirectangular = geoEquirectangular().rotate([30, 30, 30]).translate([0, 0]).scale(1);
+ assertProjectionEqual(equirectangular, [ 0, 0], [ 0.2810349015028135, -0.67513153293703170]);
+ assertProjectionEqual(equirectangular, [-180, 0], [-2.8605577520869800, 0.67513153293703170]);
+ assertProjectionEqual(equirectangular, [ 180, 0], [-2.8605577520869800, 0.67513153293703170]);
+ assertProjectionEqual(equirectangular, [ 0, 30], [-0.0724760059270816, -1.15865677086597720]);
+ assertProjectionEqual(equirectangular, [ 0, -30], [ 0.4221351552567053, -0.16704161863132252]);
+ assertProjectionEqual(equirectangular, [ 30, 30], [ 1.2033744221750944, -1.21537512510467320]);
+ assertProjectionEqual(equirectangular, [ 30, -30], [ 0.8811235701944905, -0.18861638617540410]);
+ assertProjectionEqual(equirectangular, [ -30, 30], [-0.7137243789447654, -0.84806207898148100]);
+ assertProjectionEqual(equirectangular, [ -30, -30], [ 0, 0]);
});
diff --git a/test/projection/fit-test.js b/test/projection/fit-test.js
index 1aabfd4..f863ad4 100644
--- a/test/projection/fit-test.js
+++ b/test/projection/fit-test.js
@@ -1,274 +1,244 @@
-var tape = require("tape"),
- topojson = require("topojson-client"),
- d3 = require("../../");
-
-var usTopo = require("../data/us-10m.json"),
- us = topojson.feature(usTopo, usTopo.objects.land),
- worldTopo = require("world-atlas/world/50m.json"),
- world = topojson.feature(worldTopo, worldTopo.objects.land);
-
-require("../inDelta");
-
-tape("projection.fitExtent(…) sphere equirectangular", function(test) {
- var projection = d3.geoEquirectangular();
+import assert from "assert";
+import {readFileSync} from "fs";
+import {feature} from "topojson-client";
+import {geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEquidistant, geoConicConformal, geoConicEqualArea, geoConicEquidistant, geoEquirectangular, geoGnomonic, geoMercator, geoOrthographic, geoProjection, geoStereographic, geoTransverseMercator} from "../../src/index.js";
+import {assertInDelta} from "../asserts.js";
+
+const usTopo = JSON.parse(readFileSync("./test/data/us-10m.json"));
+const us = feature(usTopo, usTopo.objects.land);
+const worldTopo = JSON.parse(readFileSync("node_modules/world-atlas/world/50m.json"));
+const world = feature(worldTopo, worldTopo.objects.land);
+
+it("projection.fitExtent(…) sphere equirectangular", () => {
+ const projection = geoEquirectangular();
projection.fitExtent([[50, 50], [950, 950]], {type: "Sphere"});
- test.inDelta(projection.scale(), 900 / (2 * Math.PI), 1e-6);
- test.inDelta(projection.translate(), [500, 500], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 900 / (2 * Math.PI), 1e-6);
+ assertInDelta(projection.translate(), [500, 500], 1e-6);
});
-tape("projection.fitExtent(…) world equirectangular", function(test) {
- var projection = d3.geoEquirectangular();
+it("projection.fitExtent(…) world equirectangular", () => {
+ const projection = geoEquirectangular();
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 143.239449, 1e-6);
- test.inDelta(projection.translate(), [500, 492.000762], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 143.239449, 1e-6);
+ assertInDelta(projection.translate(), [500, 492.000762], 1e-6);
});
-tape("projection.fitExtent(…) world azimuthalEqualArea", function(test) {
- var projection = d3.geoAzimuthalEqualArea();
+it("projection.fitExtent(…) world azimuthalEqualArea", () => {
+ const projection = geoAzimuthalEqualArea();
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 228.357229, 1e-6);
- test.inDelta(projection.translate(), [496.353618, 479.684353], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 228.357229, 1e-6);
+ assertInDelta(projection.translate(), [496.353618, 479.684353], 1e-6);
});
-tape("projection.fitExtent(…) world azimuthalEquidistant", function(test) {
- var projection = d3.geoAzimuthalEquidistant();
+it("projection.fitExtent(…) world azimuthalEquidistant", () => {
+ const projection = geoAzimuthalEquidistant();
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 153.559317, 1e-6);
- test.inDelta(projection.translate(), [485.272493, 452.093375], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 153.559317, 1e-6);
+ assertInDelta(projection.translate(), [485.272493, 452.093375], 1e-6);
});
-tape("projection.fitExtent(…) world conicConformal", function(test) {
- var projection = d3.geoConicConformal().clipAngle(30).parallels([30, 60]).rotate([0, -45]);
+it("projection.fitExtent(…) world conicConformal", () => {
+ const projection = geoConicConformal().clipAngle(30).parallels([30, 60]).rotate([0, -45]);
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 626.111027, 1e-6);
- test.inDelta(projection.translate(), [444.395951, 410.223799], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 626.111027, 1e-6);
+ assertInDelta(projection.translate(), [444.395951, 410.223799], 1e-6);
});
-tape("projection.fitExtent(…) world conicEqualArea", function(test) {
- var projection = d3.geoConicEqualArea();
+it("projection.fitExtent(…) world conicEqualArea", () => {
+ const projection = geoConicEqualArea();
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 145.862346, 1e-6);
- test.inDelta(projection.translate(), [500, 498.0114265], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 145.862346, 1e-6);
+ assertInDelta(projection.translate(), [500, 498.0114265], 1e-6);
});
-tape("projection.fitExtent(…) world conicEquidistant", function(test) {
- var projection = d3.geoConicEquidistant();
+it("projection.fitExtent(…) world conicEquidistant", () => {
+ const projection = geoConicEquidistant();
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 123.085587, 1e-6);
- test.inDelta(projection.translate(), [500, 498.598401], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 123.085587, 1e-6);
+ assertInDelta(projection.translate(), [500, 498.598401], 1e-6);
});
-tape("projection.fitExtent(…) world equirectangular", function(test) {
- var projection = d3.geoEquirectangular();
+it("projection.fitExtent(…) world equirectangular", () => {
+ const projection = geoEquirectangular();
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 143.239449, 1e-6);
- test.inDelta(projection.translate(), [500, 492.000762], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 143.239449, 1e-6);
+ assertInDelta(projection.translate(), [500, 492.000762], 1e-6);
});
-tape("projection.fitSize(…) world equirectangular", function(test) {
- var projection = d3.geoEquirectangular();
+it("projection.fitSize(…) world equirectangular", () => {
+ const projection = geoEquirectangular();
projection.fitSize([900, 900], world);
- test.inDelta(projection.scale(), 143.239449, 1e-6);
- test.inDelta(projection.translate(), [450, 442.000762], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 143.239449, 1e-6);
+ assertInDelta(projection.translate(), [450, 442.000762], 1e-6);
});
-tape("projection.fitExtent(…) world gnomonic", function(test) {
- var projection = d3.geoGnomonic().clipAngle(45);
+it("projection.fitExtent(…) world gnomonic", () => {
+ const projection = geoGnomonic().clipAngle(45);
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 450.348233, 1e-6);
- test.inDelta(projection.translate(), [500.115138, 556.522620], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 450.348233, 1e-6);
+ assertInDelta(projection.translate(), [500.115138, 556.522620], 1e-6);
});
-tape("projection.fitExtent(…) world mercator", function(test) {
- var projection = d3.geoMercator();
+it("projection.fitExtent(…) world mercator", () => {
+ const projection = geoMercator();
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 143.239449, 1e-6);
- test.inDelta(projection.translate(), [500, 481.549457], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 143.239449, 1e-6);
+ assertInDelta(projection.translate(), [500, 481.549457], 1e-6);
});
-tape("projection.fitExtent(…) world orthographic", function(test) {
- var projection = d3.geoOrthographic();
+it("projection.fitExtent(…) world orthographic", () => {
+ const projection = geoOrthographic();
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 451.406773, 1e-6);
- test.inDelta(projection.translate(), [503.769179, 498.593227], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 451.406773, 1e-6);
+ assertInDelta(projection.translate(), [503.769179, 498.593227], 1e-6);
});
-tape("projection.fitSize(…) world orthographic", function(test) {
- var projection = d3.geoOrthographic();
+it("projection.fitSize(…) world orthographic", () => {
+ const projection = geoOrthographic();
projection.fitSize([900, 900], world);
- test.inDelta(projection.scale(), 451.406773, 1e-6);
- test.inDelta(projection.translate(), [453.769179, 448.593227], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 451.406773, 1e-6);
+ assertInDelta(projection.translate(), [453.769179, 448.593227], 1e-6);
});
-tape("projection.fitExtent(…) world stereographic", function(test) {
- var projection = d3.geoStereographic();
+it("projection.fitExtent(…) world stereographic", () => {
+ const projection = geoStereographic();
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 162.934379, 1e-6);
- test.inDelta(projection.translate(), [478.546293, 432.922534], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 162.934379, 1e-6);
+ assertInDelta(projection.translate(), [478.546293, 432.922534], 1e-6);
});
-tape("projection.fitExtent(…) world transverseMercator", function(test) {
- var projection = d3.geoTransverseMercator();
+it("projection.fitExtent(…) world transverseMercator", () => {
+ const projection = geoTransverseMercator();
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 143.239449, 1e-6);
- test.inDelta(projection.translate(), [473.829551, 500], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 143.239449, 1e-6);
+ assertInDelta(projection.translate(), [473.829551, 500], 1e-6);
});
-tape("projection.fitExtent(…) USA albersUsa", function(test) {
- var projection = d3.geoAlbersUsa();
+it("projection.fitExtent(…) USA albersUsa", () => {
+ const projection = geoAlbersUsa();
projection.fitExtent([[50, 50], [950, 950]], us);
- test.inDelta(projection.scale(), 1152.889035, 1e-6);
- test.inDelta(projection.translate(), [533.52541, 496.232028], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 1152.889035, 1e-6);
+ assertInDelta(projection.translate(), [533.52541, 496.232028], 1e-6);
});
-tape("projection.fitExtent(…) null geometries - Feature", function(test) {
- var projection = d3.geoEquirectangular();
+it("projection.fitExtent(…) null geometries - Feature", () => {
+ const projection = geoEquirectangular();
projection.fitExtent([[50, 50], [950, 950]], {type: "Feature", geometry: null});
- var s = projection.scale(), t = projection.translate();
- test.assert(!s);
- test.assert(isNaN(t[0]));
- test.assert(isNaN(t[1]));
- test.end();
+ const s = projection.scale(), t = projection.translate();
+ assert(!s);
+ assert(isNaN(t[0]));
+ assert(isNaN(t[1]));
});
-tape("projection.fitExtent(…) null geometries - MultiPoint", function(test) {
- var projection = d3.geoEquirectangular();
+it("projection.fitExtent(…) null geometries - MultiPoint", () => {
+ const projection = geoEquirectangular();
projection.fitExtent([[50, 50], [950, 950]], {type: "MultiPoint", coordinates: []});
- var s = projection.scale(), t = projection.translate();
- test.assert(!s);
- test.assert(isNaN(t[0]));
- test.assert(isNaN(t[1]));
- test.end();
+ const s = projection.scale(), t = projection.translate();
+ assert(!s);
+ assert(isNaN(t[0]));
+ assert(isNaN(t[1]));
});
-tape("projection.fitExtent(…) null geometries - MultiLineString", function(test) {
- var projection = d3.geoEquirectangular();
+it("projection.fitExtent(…) null geometries - MultiLineString", () => {
+ const projection = geoEquirectangular();
projection.fitExtent([[50, 50], [950, 950]], {type: "MultiLineString", coordinates: []});
- var s = projection.scale(), t = projection.translate();
- test.assert(!s);
- test.assert(isNaN(t[0]));
- test.assert(isNaN(t[1]));
- test.end();
+ const s = projection.scale(), t = projection.translate();
+ assert(!s);
+ assert(isNaN(t[0]));
+ assert(isNaN(t[1]));
});
-tape("projection.fitExtent(…) null geometries - MultiPolygon", function(test) {
- var projection = d3.geoEquirectangular();
+it("projection.fitExtent(…) null geometries - MultiPolygon", () => {
+ const projection = geoEquirectangular();
projection.fitExtent([[50, 50], [950, 950]], {type: "MultiPolygon", coordinates: []});
- var s = projection.scale(), t = projection.translate();
- test.assert(!s);
- test.assert(isNaN(t[0]));
- test.assert(isNaN(t[1]));
- test.end();
+ const s = projection.scale(), t = projection.translate();
+ assert(!s);
+ assert(isNaN(t[0]));
+ assert(isNaN(t[1]));
});
-tape("projection.fitExtent(…) custom projection", function(test) {
- var projection = d3.geoProjection(function(x, y) { return [x, Math.pow(y, 3)]; });
+it("projection.fitExtent(…) custom projection", () => {
+ const projection = geoProjection(function(x, y) { return [x, Math.pow(y, 3)]; });
projection.fitExtent([[50, 50], [950, 950]], world);
- test.inDelta(projection.scale(), 128.903525, 1e-6);
- test.inDelta(projection.translate(), [500, 450.414357], 1e-6);
- test.end();
-});
-
-tape("projection.fitSize(…) ignore clipExtent - world equirectangular", function(test) {
- var p1 = d3.geoEquirectangular().fitSize([1000, 1000], world),
- s1 = p1.scale(),
- t1 = p1.translate(),
- c1 = p1.clipExtent(),
- p2 = d3.geoEquirectangular().clipExtent([[100, 200], [700, 600]]).fitSize([1000, 1000], world),
- s2 = p2.scale(),
- t2 = p2.translate(),
- c2 = p2.clipExtent();
- test.inDelta(s1, s2, 1e-6);
- test.inDelta(t1, t2, 1e-6);
- test.equal(c1, null);
- test.deepEqual(c2, [[100, 200], [700, 600]]);
- test.end();
-});
-
-tape("projection.fitExtent(…) chaining - world transverseMercator", function(test) {
- var projection = d3.geoTransverseMercator().fitExtent([[50, 50], [950, 950]], world).scale(500);
- test.equal(projection.scale(), 500);
- test.inDelta(projection.translate(), [473.829551, 500], 1e-6);
- test.end();
-});
-
-tape("projection.fitSize(…) resampling - world mercator", function(test) {
- var box = {"type": "Polygon", "coordinates": [[[-135, 45], [-45, 45], [-45, -45], [-135, -45], [-135, 45]]]},
- p1 = d3.geoMercator().precision(0.1).fitSize([1000, 1000], box),
- p2 = d3.geoMercator().precision(0).fitSize([1000, 1000], box),
- t1 = p1.translate(),
- t2 = p2.translate();
- test.equal(p1.precision(), 0.1);
- test.equal(p2.precision(), 0);
- test.inDelta(p1.scale(), 436.218018, 1e-6);
- test.inDelta(p2.scale(), 567.296328, 1e-6);
- test.inDelta(t1[0], 1185.209661, 1e-6);
- test.inDelta(t2[0], 1391.106989, 1e-6);
- test.inDelta(t1[1], 500, 1e-6);
- test.inDelta(t1[1], t2[1], 1e-6);
- test.end();
-});
-
-tape("projection.fitWidth(…) world equirectangular", function(test) {
- var projection = d3.geoEquirectangular();
+ assertInDelta(projection.scale(), 128.903525, 1e-6);
+ assertInDelta(projection.translate(), [500, 450.414357], 1e-6);
+});
+
+it("projection.fitSize(…) ignore clipExtent - world equirectangular", () => {
+ const p1 = geoEquirectangular().fitSize([1000, 1000], world);
+ const s1 = p1.scale();
+ const t1 = p1.translate();
+ const c1 = p1.clipExtent();
+ const p2 = geoEquirectangular().clipExtent([[100, 200], [700, 600]]).fitSize([1000, 1000], world);
+ const s2 = p2.scale();
+ const t2 = p2.translate();
+ const c2 = p2.clipExtent();
+ assertInDelta(s1, s2, 1e-6);
+ assertInDelta(t1, t2, 1e-6);
+ assert.strictEqual(c1, null);
+ assert.deepStrictEqual(c2, [[100, 200], [700, 600]]);
+});
+
+it("projection.fitExtent(…) chaining - world transverseMercator", () => {
+ const projection = geoTransverseMercator().fitExtent([[50, 50], [950, 950]], world).scale(500);
+ assert.strictEqual(projection.scale(), 500);
+ assertInDelta(projection.translate(), [473.829551, 500], 1e-6);
+});
+
+it("projection.fitSize(…) resampling - world mercator", () => {
+ const box = {"type": "Polygon", "coordinates": [[[-135, 45], [-45, 45], [-45, -45], [-135, -45], [-135, 45]]]};
+ const p1 = geoMercator().precision(0.1).fitSize([1000, 1000], box);
+ const p2 = geoMercator().precision(0).fitSize([1000, 1000], box);
+ const t1 = p1.translate();
+ const t2 = p2.translate();
+ assert.strictEqual(p1.precision(), 0.1);
+ assert.strictEqual(p2.precision(), 0);
+ assertInDelta(p1.scale(), 436.218018, 1e-6);
+ assertInDelta(p2.scale(), 567.296328, 1e-6);
+ assertInDelta(t1[0], 1185.209661, 1e-6);
+ assertInDelta(t2[0], 1391.106989, 1e-6);
+ assertInDelta(t1[1], 500, 1e-6);
+ assertInDelta(t1[1], t2[1], 1e-6);
+});
+
+it("projection.fitWidth(…) world equirectangular", () => {
+ const projection = geoEquirectangular();
projection.fitWidth(900, world);
- test.inDelta(projection.scale(), 143.239449, 1e-6);
- test.inDelta(projection.translate(), [450, 208.999023], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 143.239449, 1e-6);
+ assertInDelta(projection.translate(), [450, 208.999023], 1e-6);
});
-tape("projection.fitWidth(…) world transverseMercator", function(test) {
- var projection = d3.geoTransverseMercator();
+it("projection.fitWidth(…) world transverseMercator", () => {
+ const projection = geoTransverseMercator();
projection.fitWidth(900, world);
- test.inDelta(projection.scale(), 166.239257, 1e-6);
- test.inDelta(projection.translate(), [419.627390, 522.256029], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 166.239257, 1e-6);
+ assertInDelta(projection.translate(), [419.627390, 522.256029], 1e-6);
});
-tape("projection.fitWidth(…) USA albersUsa", function(test) {
- var projection = d3.geoAlbersUsa();
+it("projection.fitWidth(…) USA albersUsa", () => {
+ const projection = geoAlbersUsa();
projection.fitWidth(900, us);
- test.inDelta(projection.scale(), 1152.889035, 1e-6);
- test.inDelta(projection.translate(), [483.52541, 257.736905], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 1152.889035, 1e-6);
+ assertInDelta(projection.translate(), [483.52541, 257.736905], 1e-6);
});
-tape("projection.fitHeight(…) world equirectangular", function(test) {
- var projection = d3.geoEquirectangular();
+it("projection.fitHeight(…) world equirectangular", () => {
+ const projection = geoEquirectangular();
projection.fitHeight(900, world);
- test.inDelta(projection.scale(), 297.042711, 1e-6);
- test.inDelta(projection.translate(), [933.187199, 433.411585], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 297.042711, 1e-6);
+ assertInDelta(projection.translate(), [933.187199, 433.411585], 1e-6);
});
-tape("projection.fitHeight(…) world transverseMercator", function(test) {
- var projection = d3.geoTransverseMercator();
+it("projection.fitHeight(…) world transverseMercator", () => {
+ const projection = geoTransverseMercator();
projection.fitHeight(900, world);
- test.inDelta(projection.scale(), 143.239449, 1e-6);
- test.inDelta(projection.translate(), [361.570408, 450], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 143.239449, 1e-6);
+ assertInDelta(projection.translate(), [361.570408, 450], 1e-6);
});
-tape("projection.fitHeight(…) USA albersUsa", function(test) {
- var projection = d3.geoAlbersUsa();
+it("projection.fitHeight(…) USA albersUsa", () => {
+ const projection = geoAlbersUsa();
projection.fitHeight(900, us);
- test.inDelta(projection.scale(), 1983.902059, 1e-6);
- test.inDelta(projection.translate(), [832.054974, 443.516038], 1e-6);
- test.end();
+ assertInDelta(projection.scale(), 1983.902059, 1e-6);
+ assertInDelta(projection.translate(), [832.054974, 443.516038], 1e-6);
});
diff --git a/test/projection/identity-test.js b/test/projection/identity-test.js
index f51be94..bc08273 100644
--- a/test/projection/identity-test.js
+++ b/test/projection/identity-test.js
@@ -1,54 +1,48 @@
-var tape = require("tape"),
- d3 = require("../../");
-
-require("./projectionEqual");
-
-tape("identity(point) returns the point", function(test) {
- var identity = d3.geoIdentity().translate([0, 0]).scale(1);
- test.projectionEqual(identity, [ 0, 0], [ 0, 0]);
- test.projectionEqual(identity, [-180, 0], [-180, 0]);
- test.projectionEqual(identity, [ 180, 0], [ 180, 0]);
- test.projectionEqual(identity, [ 30, 30], [ 30, 30]);
- test.end();
+import assert from "assert";
+import {geoIdentity, geoPath} from "../../src/index.js";
+import {assertProjectionEqual} from "./asserts.js";
+
+it("identity(point) returns the point", () => {
+ const identity = geoIdentity().translate([0, 0]).scale(1);
+ assertProjectionEqual(identity, [ 0, 0], [ 0, 0]);
+ assertProjectionEqual(identity, [-180, 0], [-180, 0]);
+ assertProjectionEqual(identity, [ 180, 0], [ 180, 0]);
+ assertProjectionEqual(identity, [ 30, 30], [ 30, 30]);
});
-tape("identity(point).scale(…).translate(…) returns the transformed point", function(test) {
- var identity = d3.geoIdentity().translate([100, 10]).scale(2);
- test.projectionEqual(identity, [ 0, 0], [ 100, 10]);
- test.projectionEqual(identity, [-180, 0], [-260, 10]);
- test.projectionEqual(identity, [ 180, 0], [ 460, 10]);
- test.projectionEqual(identity, [ 30, 30], [ 160, 70]);
- test.end();
+it("identity(point).scale(…).translate(…) returns the transformed point", () => {
+ const identity = geoIdentity().translate([100, 10]).scale(2);
+ assertProjectionEqual(identity, [ 0, 0], [ 100, 10]);
+ assertProjectionEqual(identity, [-180, 0], [-260, 10]);
+ assertProjectionEqual(identity, [ 180, 0], [ 460, 10]);
+ assertProjectionEqual(identity, [ 30, 30], [ 160, 70]);
});
-tape("identity(point).reflectX(…) and reflectY() return the transformed point", function(test) {
- var identity = d3.geoIdentity().translate([100, 10]).scale(2)
+it("identity(point).reflectX(…) and reflectY() return the transformed point", () => {
+ const identity = geoIdentity().translate([100, 10]).scale(2)
.reflectX(false).reflectY(false);
- test.projectionEqual(identity, [ 3, 7], [ 106, 24]);
- test.projectionEqual(identity.reflectX(true), [ 3, 7], [ 94, 24]);
- test.projectionEqual(identity.reflectY(true), [ 3, 7], [ 94, -4]);
- test.projectionEqual(identity.reflectX(false), [ 3, 7], [ 106, -4]);
- test.projectionEqual(identity.reflectY(false), [ 3, 7], [ 106, 24]);
- test.end();
+ assertProjectionEqual(identity, [ 3, 7], [ 106, 24]);
+ assertProjectionEqual(identity.reflectX(true), [ 3, 7], [ 94, 24]);
+ assertProjectionEqual(identity.reflectY(true), [ 3, 7], [ 94, -4]);
+ assertProjectionEqual(identity.reflectX(false), [ 3, 7], [ 106, -4]);
+ assertProjectionEqual(identity.reflectY(false), [ 3, 7], [ 106, 24]);
});
-tape("geoPath(identity) returns the path", function(test) {
- var identity = d3.geoIdentity().translate([0, 0]).scale(1),
- path = d3.geoPath().projection(identity);
- test.equal(path({type:"LineString", coordinates: [[0,0], [10,10]]}), "M0,0L10,10");
+it("geoPath(identity) returns the path", () => {
+ const identity = geoIdentity().translate([0, 0]).scale(1),
+ path = geoPath().projection(identity);
+ assert.strictEqual(path({type:"LineString", coordinates: [[0,0], [10,10]]}), "M0,0L10,10");
identity.translate([30,90]).scale(2).reflectY(true);
- test.equal(path({type:"LineString", coordinates: [[0,0], [10,10]]}), "M30,90L50,70");
- test.end();
+ assert.strictEqual(path({type:"LineString", coordinates: [[0,0], [10,10]]}), "M30,90L50,70");
});
-tape("geoPath(identity) respects clipExtent", function(test) {
- var identity = d3.geoIdentity().translate([0, 0]).scale(1),
- path = d3.geoPath().projection(identity);
+it("geoPath(identity) respects clipExtent", () => {
+ const identity = geoIdentity().translate([0, 0]).scale(1),
+ path = geoPath().projection(identity);
identity.clipExtent([[5,5], [40, 80]]);
- test.equal(path({type:"LineString", coordinates: [[0,0], [10,10]]}), "M5,5L10,10");
+ assert.strictEqual(path({type:"LineString", coordinates: [[0,0], [10,10]]}), "M5,5L10,10");
identity.translate([30,90]).scale(2).reflectY(true).clipExtent([[35,76], [45, 86]]);
- test.equal(path({type:"LineString", coordinates: [[0,0], [10,10]]}), "M35,85L44,76");
- test.end();
-});
\ No newline at end of file
+ assert.strictEqual(path({type:"LineString", coordinates: [[0,0], [10,10]]}), "M35,85L44,76");
+});
diff --git a/test/projection/invert-test.js b/test/projection/invert-test.js
index ffee620..844625f 100644
--- a/test/projection/invert-test.js
+++ b/test/projection/invert-test.js
@@ -1,48 +1,45 @@
-var tape = require("tape"),
- d3 = require("../../");
-require("./projectionEqual");
+import {geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEquidistant, geoConicConformal, geoConicEqualArea, geoConicEquidistant, geoEqualEarth, geoEquirectangular, geoGnomonic, geoMercator, geoOrthographic, geoStereographic, geoTransverseMercator} from "../../src/index.js";
+import {assertProjectionEqual} from "./asserts.js";
[
- d3.geoAlbers,
- d3.geoAzimuthalEqualArea,
- d3.geoAzimuthalEquidistant,
- d3.geoConicConformal,
- function conicConformal() { return d3.geoConicConformal().parallels([20, 30]); },
- function conicConformal() { return d3.geoConicConformal().parallels([30, 30]); },
- function conicConformal() { return d3.geoConicConformal().parallels([-35, -50]); },
- function conicConformal() { return d3.geoConicConformal().parallels([40, 60]).rotate([-120,0]); },
- d3.geoConicEqualArea,
- function conicEqualArea() { return d3.geoConicEqualArea().parallels([20, 30]); },
- function conicEqualArea() { return d3.geoConicEqualArea().parallels([-30, 30]); },
- function conicEqualArea() { return d3.geoConicEqualArea().parallels([-35, -50]); },
- function conicEqualArea() { return d3.geoConicEqualArea().parallels([40, 60]).rotate([-120,0]); },
- d3.geoConicEquidistant,
- function conicEquidistant() { return d3.geoConicEquidistant().parallels([20, 30]); },
- function conicEquidistant() { return d3.geoConicEquidistant().parallels([30, 30]); },
- function conicEquidistant() { return d3.geoConicEquidistant().parallels([-35, -50]); },
- function conicEquidistant() { return d3.geoConicEquidistant().parallels([40, 60]).rotate([-120,0]); },
- d3.geoEquirectangular,
- d3.geoEqualEarth,
- d3.geoGnomonic,
- d3.geoMercator,
- d3.geoOrthographic,
- d3.geoStereographic,
- d3.geoTransverseMercator
-].forEach(function(factory) {
- var name = factory.name, projection = factory();
- tape(name + "(point) and " + name + ".invert(point) are symmetric", function(test) {
- [[0, 0], [30.3, 24.1], [-10, 42], [-2, -5]].forEach(function(point) {
- test.projectionEqual(projection, point, projection(point));
+ geoAlbers,
+ geoAzimuthalEqualArea,
+ geoAzimuthalEquidistant,
+ geoConicConformal,
+ function conicConformal() { return geoConicConformal().parallels([20, 30]); },
+ function conicConformal() { return geoConicConformal().parallels([30, 30]); },
+ function conicConformal() { return geoConicConformal().parallels([-35, -50]); },
+ function conicConformal() { return geoConicConformal().parallels([40, 60]).rotate([-120,0]); },
+ geoConicEqualArea,
+ function conicEqualArea() { return geoConicEqualArea().parallels([20, 30]); },
+ function conicEqualArea() { return geoConicEqualArea().parallels([-30, 30]); },
+ function conicEqualArea() { return geoConicEqualArea().parallels([-35, -50]); },
+ function conicEqualArea() { return geoConicEqualArea().parallels([40, 60]).rotate([-120,0]); },
+ geoConicEquidistant,
+ function conicEquidistant() { return geoConicEquidistant().parallels([20, 30]); },
+ function conicEquidistant() { return geoConicEquidistant().parallels([30, 30]); },
+ function conicEquidistant() { return geoConicEquidistant().parallels([-35, -50]); },
+ function conicEquidistant() { return geoConicEquidistant().parallels([40, 60]).rotate([-120,0]); },
+ geoEquirectangular,
+ geoEqualEarth,
+ geoGnomonic,
+ geoMercator,
+ geoOrthographic,
+ geoStereographic,
+ geoTransverseMercator
+].forEach((factory) => {
+ const name = factory.name, projection = factory();
+ it(name + "(point) and " + name + ".invert(point) are symmetric", () => {
+ [[0, 0], [30.3, 24.1], [-10, 42], [-2, -5]].forEach((point) => {
+ assertProjectionEqual(projection, point, projection(point));
});
- test.end();
});
});
-tape("albersUsa(point) and albersUsa.invert(point) are symmetric", function(test) {
- var projection = d3.geoAlbersUsa();
- [[-122.4194, 37.7749], [-74.0059, 40.7128], [-149.9003, 61.2181], [-157.8583, 21.3069]].forEach(function(point) {
- test.projectionEqual(projection, point, projection(point));
+it("albersUsa(point) and albersUsa.invert(point) are symmetric", () => {
+ const projection = geoAlbersUsa();
+ [[-122.4194, 37.7749], [-74.0059, 40.7128], [-149.9003, 61.2181], [-157.8583, 21.3069]].forEach((point) => {
+ assertProjectionEqual(projection, point, projection(point));
});
- test.end();
});
diff --git a/test/projection/mercator-test.js b/test/projection/mercator-test.js
index f81c0cf..0301384 100644
--- a/test/projection/mercator-test.js
+++ b/test/projection/mercator-test.js
@@ -1,45 +1,39 @@
-var tape = require("tape"),
- d3 = require("../../");
+import assert from "assert";
+import {geoMercator, geoPath} from "../../src/index.js";
+import {assertPathEqual} from "../asserts.js";
-require("../pathEqual");
-
-tape("mercator.clipExtent(null) sets the default automatic clip extent", function(test) {
- var projection = d3.geoMercator().translate([0, 0]).scale(1).clipExtent(null).precision(0);
- test.pathEqual(d3.geoPath(projection)({type: "Sphere"}), "M3.141593,-3.141593L3.141593,0L3.141593,3.141593L3.141593,3.141593L-3.141593,3.141593L-3.141593,3.141593L-3.141593,0L-3.141593,-3.141593L-3.141593,-3.141593L3.141593,-3.141593Z");
- test.equal(projection.clipExtent(), null);
- test.end();
+it("mercator.clipExtent(null) sets the default automatic clip extent", () => {
+ const projection = geoMercator().translate([0, 0]).scale(1).clipExtent(null).precision(0);
+ assertPathEqual(geoPath(projection)({type: "Sphere"}), "M3.141593,-3.141593L3.141593,0L3.141593,3.141593L3.141593,3.141593L-3.141593,3.141593L-3.141593,3.141593L-3.141593,0L-3.141593,-3.141593L-3.141593,-3.141593L3.141593,-3.141593Z");
+ assert.strictEqual(projection.clipExtent(), null);
});
-tape("mercator.center(center) sets the correct automatic clip extent", function(test) {
- var projection = d3.geoMercator().translate([0, 0]).scale(1).center([10, 10]).precision(0);
- test.pathEqual(d3.geoPath(projection)({type: "Sphere"}), "M2.967060,-2.966167L2.967060,0.175426L2.967060,3.317018L2.967060,3.317018L-3.316126,3.317018L-3.316126,3.317019L-3.316126,0.175426L-3.316126,-2.966167L-3.316126,-2.966167L2.967060,-2.966167Z");
- test.equal(projection.clipExtent(), null);
- test.end();
+it("mercator.center(center) sets the correct automatic clip extent", () => {
+ const projection = geoMercator().translate([0, 0]).scale(1).center([10, 10]).precision(0);
+ assertPathEqual(geoPath(projection)({type: "Sphere"}), "M2.967060,-2.966167L2.967060,0.175426L2.967060,3.317018L2.967060,3.317018L-3.316126,3.317018L-3.316126,3.317019L-3.316126,0.175426L-3.316126,-2.966167L-3.316126,-2.966167L2.967060,-2.966167Z");
+ assert.strictEqual(projection.clipExtent(), null);
});
-tape("mercator.clipExtent(extent) intersects the specified clip extent with the automatic clip extent", function(test) {
- var projection = d3.geoMercator().translate([0, 0]).scale(1).clipExtent([[-10, -10], [10, 10]]).precision(0);
- test.pathEqual(d3.geoPath(projection)({type: "Sphere"}), "M3.141593,-10L3.141593,0L3.141593,10L3.141593,10L-3.141593,10L-3.141593,10L-3.141593,0L-3.141593,-10L-3.141593,-10L3.141593,-10Z");
- test.deepEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
- test.end();
+it("mercator.clipExtent(extent) intersects the specified clip extent with the automatic clip extent", () => {
+ const projection = geoMercator().translate([0, 0]).scale(1).clipExtent([[-10, -10], [10, 10]]).precision(0);
+ assertPathEqual(geoPath(projection)({type: "Sphere"}), "M3.141593,-10L3.141593,0L3.141593,10L3.141593,10L-3.141593,10L-3.141593,10L-3.141593,0L-3.141593,-10L-3.141593,-10L3.141593,-10Z");
+ assert.deepStrictEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
});
-tape("mercator.clipExtent(extent).scale(scale) updates the intersected clip extent", function(test) {
- var projection = d3.geoMercator().translate([0, 0]).clipExtent([[-10, -10], [10, 10]]).scale(1).precision(0);
- test.pathEqual(d3.geoPath(projection)({type: "Sphere"}), "M3.141593,-10L3.141593,0L3.141593,10L3.141593,10L-3.141593,10L-3.141593,10L-3.141593,0L-3.141593,-10L-3.141593,-10L3.141593,-10Z");
- test.deepEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
- test.end();
+it("mercator.clipExtent(extent).scale(scale) updates the intersected clip extent", () => {
+ const projection = geoMercator().translate([0, 0]).clipExtent([[-10, -10], [10, 10]]).scale(1).precision(0);
+ assertPathEqual(geoPath(projection)({type: "Sphere"}), "M3.141593,-10L3.141593,0L3.141593,10L3.141593,10L-3.141593,10L-3.141593,10L-3.141593,0L-3.141593,-10L-3.141593,-10L3.141593,-10Z");
+ assert.deepStrictEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
});
-tape("mercator.clipExtent(extent).translate(translate) updates the intersected clip extent", function(test) {
- var projection = d3.geoMercator().scale(1).clipExtent([[-10, -10], [10, 10]]).translate([0, 0]).precision(0);
- test.pathEqual(d3.geoPath(projection)({type: "Sphere"}), "M3.141593,-10L3.141593,0L3.141593,10L3.141593,10L-3.141593,10L-3.141593,10L-3.141593,0L-3.141593,-10L-3.141593,-10L3.141593,-10Z");
- test.deepEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
- test.end();
+it("mercator.clipExtent(extent).translate(translate) updates the intersected clip extent", () => {
+ const projection = geoMercator().scale(1).clipExtent([[-10, -10], [10, 10]]).translate([0, 0]).precision(0);
+ assertPathEqual(geoPath(projection)({type: "Sphere"}), "M3.141593,-10L3.141593,0L3.141593,10L3.141593,10L-3.141593,10L-3.141593,10L-3.141593,0L-3.141593,-10L-3.141593,-10L3.141593,-10Z");
+ assert.deepStrictEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
});
-tape("mercator.rotate(…) does not affect the automatic clip extent", function(test) {
- var projection = d3.geoMercator(), object = {
+it("mercator.rotate(…) does not affect the automatic clip extent", () => {
+ const projection = geoMercator(), object = {
type: "MultiPoint",
coordinates: [
[-82.35024908550241, 29.649391549778745],
@@ -49,10 +43,9 @@ tape("mercator.rotate(…) does not affect the automatic clip extent", function(
]
};
projection.fitExtent([[0, 0], [960, 600]], object);
- test.deepEqual(projection.scale(), 20969742.365692537);
- test.deepEqual(projection.translate(), [30139734.76760269, 11371473.949706702]);
+ assert.deepStrictEqual(projection.scale(), 20969742.365692537);
+ assert.deepStrictEqual(projection.translate(), [30139734.76760269, 11371473.949706702]);
projection.rotate([0, 95]).fitExtent([[0, 0], [960, 600]], object);
- test.deepEqual(projection.scale(), 35781690.650920525);
- test.deepEqual(projection.translate(), [75115911.95344563, 2586046.4116968135]);
- test.end();
+ assert.deepStrictEqual(projection.scale(), 35781690.650920525);
+ assert.deepStrictEqual(projection.translate(), [75115911.95344563, 2586046.4116968135]);
});
diff --git a/test/projection/reflect-test.js b/test/projection/reflect-test.js
index 216f73e..505381a 100644
--- a/test/projection/reflect-test.js
+++ b/test/projection/reflect-test.js
@@ -1,40 +1,36 @@
-var tape = require("tape"),
- d3 = require("../../");
+import assert from "assert";
+import {geoGnomonic, geoMercator} from "../../src/index.js";
+import {assertInDelta} from "../asserts.js";
+import {assertProjectionEqual} from "./asserts.js";
-require("../inDelta");
-require("./projectionEqual");
-
-tape("projection.reflectX(…) defaults to false", function(test) {
- var projection = d3.geoGnomonic().scale(1).translate([0, 0]);
- test.equal(projection.reflectX(), false);
- test.equal(projection.reflectY(), false);
- test.projectionEqual(projection, [0, 0], [0, 0]);
- test.projectionEqual(projection, [10, 0], [0.17632698070846498, 0]);
- test.projectionEqual(projection, [0, 10], [0, -0.17632698070846498]);
- test.end();
+it("projection.reflectX(…) defaults to false", () => {
+ const projection = geoGnomonic().scale(1).translate([0, 0]);
+ assert.strictEqual(projection.reflectX(), false);
+ assert.strictEqual(projection.reflectY(), false);
+ assertProjectionEqual(projection, [0, 0], [0, 0]);
+ assertProjectionEqual(projection, [10, 0], [0.17632698070846498, 0]);
+ assertProjectionEqual(projection, [0, 10], [0, -0.17632698070846498]);
});
-tape("projection.reflectX(…) mirrors x after projecting", function(test) {
- var projection = d3.geoGnomonic().scale(1).translate([0, 0]).reflectX(true);
- test.equal(projection.reflectX(), true);
- test.projectionEqual(projection, [0, 0], [0, 0]);
- test.projectionEqual(projection, [10, 0], [-0.17632698070846498, 0]);
- test.projectionEqual(projection, [0, 10], [0, -0.17632698070846498]);
+it("projection.reflectX(…) mirrors x after projecting", () => {
+ const projection = geoGnomonic().scale(1).translate([0, 0]).reflectX(true);
+ assert.strictEqual(projection.reflectX(), true);
+ assertProjectionEqual(projection, [0, 0], [0, 0]);
+ assertProjectionEqual(projection, [10, 0], [-0.17632698070846498, 0]);
+ assertProjectionEqual(projection, [0, 10], [0, -0.17632698070846498]);
projection.reflectX(false).reflectY(true);
- test.equal(projection.reflectX(), false);
- test.equal(projection.reflectY(), true);
- test.projectionEqual(projection, [0, 0], [0, 0]);
- test.projectionEqual(projection, [10, 0], [0.17632698070846498, 0]);
- test.projectionEqual(projection, [0, 10], [0, 0.17632698070846498]);
- test.end();
+ assert.strictEqual(projection.reflectX(), false);
+ assert.strictEqual(projection.reflectY(), true);
+ assertProjectionEqual(projection, [0, 0], [0, 0]);
+ assertProjectionEqual(projection, [10, 0], [0.17632698070846498, 0]);
+ assertProjectionEqual(projection, [0, 10], [0, 0.17632698070846498]);
});
-tape("projection.reflectX(…) works with projection.angle()", function(test) {
- var projection = d3.geoMercator().scale(1).translate([10, 20]).reflectX(true).angle(45);
- test.equal(projection.reflectX(), true);
- test.inDelta(projection.angle(), 45);
- test.projectionEqual(projection, [0, 0], [10, 20]);
- test.projectionEqual(projection, [10, 0], [9.87658658, 20.12341341]);
- test.projectionEqual(projection, [0, 10], [9.87595521, 19.87595521]);
- test.end();
+it("projection.reflectX(…) works with projection.angle()", () => {
+ const projection = geoMercator().scale(1).translate([10, 20]).reflectX(true).angle(45);
+ assert.strictEqual(projection.reflectX(), true);
+ assertInDelta(projection.angle(), 45);
+ assertProjectionEqual(projection, [0, 0], [10, 20]);
+ assertProjectionEqual(projection, [10, 0], [9.87658658, 20.12341341]);
+ assertProjectionEqual(projection, [0, 10], [9.87595521, 19.87595521]);
});
diff --git a/test/projection/rotate-test.js b/test/projection/rotate-test.js
index a6b4a0c..88b6709 100644
--- a/test/projection/rotate-test.js
+++ b/test/projection/rotate-test.js
@@ -1,11 +1,9 @@
-var tape = require("tape"),
- d3 = require("../../");
+import {geoMercator, geoPath} from "../../src/index.js";
+import {assertPathEqual} from "../asserts.js";
-require("../pathEqual");
-
-tape("a rotation of a degenerate polygon should not break", function(test) {
- var projection = d3.geoMercator().rotate([-134.300, 25.776]).scale(750).translate([0, 0]);
- test.pathEqual(d3.geoPath(projection)({
+it("a rotation of a degenerate polygon should not break", () => {
+ const projection = geoMercator().rotate([-134.300, 25.776]).scale(750).translate([0, 0]);
+ assertPathEqual(geoPath(projection)({
"type": "Polygon",
"coordinates": [
[
@@ -17,5 +15,4 @@ tape("a rotation of a degenerate polygon should not break", function(test) {
]
]
}), "M-111.644162,-149.157654L-111.647235,-149.203744L-111.647235,-149.203744L-111.650307,-149.249835Z");
- test.end();
});
diff --git a/test/projection/stereographic-test.js b/test/projection/stereographic-test.js
index 7e4cc21..b032ed9 100644
--- a/test/projection/stereographic-test.js
+++ b/test/projection/stereographic-test.js
@@ -1,14 +1,11 @@
-var tape = require("tape"),
- d3 = require("../../");
+import {geoStereographic} from "../../src/index.js";
+import {assertProjectionEqual} from "./asserts.js";
-require("./projectionEqual");
-
-tape("stereographic(point) returns the expected result", function(test) {
- var stereographic = d3.geoStereographic().translate([0, 0]).scale(1);
- test.projectionEqual(stereographic, [ 0, 0], [ 0, 0]);
- test.projectionEqual(stereographic, [-90, 0], [-1, 0]);
- test.projectionEqual(stereographic, [ 90, 0], [ 1, 0]);
- test.projectionEqual(stereographic, [ 0, -90], [ 0, 1]);
- test.projectionEqual(stereographic, [ 0, 90], [ 0, -1]);
- test.end();
+it("stereographic(point) returns the expected result", () => {
+ const stereographic = geoStereographic().translate([0, 0]).scale(1);
+ assertProjectionEqual(stereographic, [ 0, 0], [ 0, 0]);
+ assertProjectionEqual(stereographic, [-90, 0], [-1, 0]);
+ assertProjectionEqual(stereographic, [ 90, 0], [ 1, 0]);
+ assertProjectionEqual(stereographic, [ 0, -90], [ 0, 1]);
+ assertProjectionEqual(stereographic, [ 0, 90], [ 0, -1]);
});
diff --git a/test/projection/transverseMercator-test.js b/test/projection/transverseMercator-test.js
index ff30688..3357c77 100644
--- a/test/projection/transverseMercator-test.js
+++ b/test/projection/transverseMercator-test.js
@@ -1,45 +1,39 @@
-var tape = require("tape"),
- d3 = require("../../");
+import assert from "assert";
+import {geoPath, geoTransverseMercator} from "../../src/index.js";
+import {assertPathEqual} from "../asserts.js";
-require("../pathEqual");
-
-tape("transverseMercator.clipExtent(null) sets the default automatic clip extent", function(test) {
- var projection = d3.geoTransverseMercator().translate([0, 0]).scale(1).clipExtent(null).precision(0);
- test.pathEqual(d3.geoPath(projection)({type: "Sphere"}), "M3.141593,3.141593L0,3.141593L-3.141593,3.141593L-3.141593,-3.141593L-3.141593,-3.141593L0,-3.141593L3.141593,-3.141593L3.141593,3.141593Z");
- test.equal(projection.clipExtent(), null);
- test.end();
+it("transverseMercator.clipExtent(null) sets the default automatic clip extent", () => {
+ const projection = geoTransverseMercator().translate([0, 0]).scale(1).clipExtent(null).precision(0);
+ assertPathEqual(geoPath(projection)({type: "Sphere"}), "M3.141593,3.141593L0,3.141593L-3.141593,3.141593L-3.141593,-3.141593L-3.141593,-3.141593L0,-3.141593L3.141593,-3.141593L3.141593,3.141593Z");
+ assert.strictEqual(projection.clipExtent(), null);
});
-tape("transverseMercator.center(center) sets the correct automatic clip extent", function(test) {
- var projection = d3.geoTransverseMercator().translate([0, 0]).scale(1).center([10, 10]).precision(0);
- test.pathEqual(d3.geoPath(projection)({type: "Sphere"}), "M2.966167,3.316126L-0.175426,3.316126L-3.317018,3.316126L-3.317019,-2.967060L-3.317019,-2.967060L-0.175426,-2.967060L2.966167,-2.967060L2.966167,3.316126Z");
- test.equal(projection.clipExtent(), null);
- test.end();
+it("transverseMercator.center(center) sets the correct automatic clip extent", () => {
+ const projection = geoTransverseMercator().translate([0, 0]).scale(1).center([10, 10]).precision(0);
+ assertPathEqual(geoPath(projection)({type: "Sphere"}), "M2.966167,3.316126L-0.175426,3.316126L-3.317018,3.316126L-3.317019,-2.967060L-3.317019,-2.967060L-0.175426,-2.967060L2.966167,-2.967060L2.966167,3.316126Z");
+ assert.strictEqual(projection.clipExtent(), null);
});
-tape("transverseMercator.clipExtent(extent) intersects the specified clip extent with the automatic clip extent", function(test) {
- var projection = d3.geoTransverseMercator().translate([0, 0]).scale(1).clipExtent([[-10, -10], [10, 10]]).precision(0);
- test.pathEqual(d3.geoPath(projection)({type: "Sphere"}), "M10,3.141593L0,3.141593L-10,3.141593L-10,-3.141593L-10,-3.141593L0,-3.141593L10,-3.141593L10,3.141593Z");
- test.deepEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
- test.end();
+it("transverseMercator.clipExtent(extent) intersects the specified clip extent with the automatic clip extent", () => {
+ const projection = geoTransverseMercator().translate([0, 0]).scale(1).clipExtent([[-10, -10], [10, 10]]).precision(0);
+ assertPathEqual(geoPath(projection)({type: "Sphere"}), "M10,3.141593L0,3.141593L-10,3.141593L-10,-3.141593L-10,-3.141593L0,-3.141593L10,-3.141593L10,3.141593Z");
+ assert.deepStrictEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
});
-tape("transverseMercator.clipExtent(extent).scale(scale) updates the intersected clip extent", function(test) {
- var projection = d3.geoTransverseMercator().translate([0, 0]).clipExtent([[-10, -10], [10, 10]]).scale(1).precision(0);
- test.pathEqual(d3.geoPath(projection)({type: "Sphere"}), "M10,3.141593L0,3.141593L-10,3.141593L-10,-3.141593L-10,-3.141593L0,-3.141593L10,-3.141593L10,3.141593Z");
- test.deepEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
- test.end();
+it("transverseMercator.clipExtent(extent).scale(scale) updates the intersected clip extent", () => {
+ const projection = geoTransverseMercator().translate([0, 0]).clipExtent([[-10, -10], [10, 10]]).scale(1).precision(0);
+ assertPathEqual(geoPath(projection)({type: "Sphere"}), "M10,3.141593L0,3.141593L-10,3.141593L-10,-3.141593L-10,-3.141593L0,-3.141593L10,-3.141593L10,3.141593Z");
+ assert.deepStrictEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
});
-tape("transverseMercator.clipExtent(extent).translate(translate) updates the intersected clip extent", function(test) {
- var projection = d3.geoTransverseMercator().scale(1).clipExtent([[-10, -10], [10, 10]]).translate([0, 0]).precision(0);
- test.pathEqual(d3.geoPath(projection)({type: "Sphere"}), "M10,3.141593L0,3.141593L-10,3.141593L-10,-3.141593L-10,-3.141593L0,-3.141593L10,-3.141593L10,3.141593Z");
- test.deepEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
- test.end();
+it("transverseMercator.clipExtent(extent).translate(translate) updates the intersected clip extent", () => {
+ const projection = geoTransverseMercator().scale(1).clipExtent([[-10, -10], [10, 10]]).translate([0, 0]).precision(0);
+ assertPathEqual(geoPath(projection)({type: "Sphere"}), "M10,3.141593L0,3.141593L-10,3.141593L-10,-3.141593L-10,-3.141593L0,-3.141593L10,-3.141593L10,3.141593Z");
+ assert.deepStrictEqual(projection.clipExtent(), [[-10, -10], [10, 10]]);
});
-tape("transverseMercator.rotate(…) does not affect the automatic clip extent", function(test) {
- var projection = d3.geoTransverseMercator(), object = {
+it("transverseMercator.rotate(…) does not affect the automatic clip extent", () => {
+ const projection = geoTransverseMercator(), object = {
type: "MultiPoint",
coordinates: [
[-82.35024908550241, 29.649391549778745],
@@ -49,10 +43,9 @@ tape("transverseMercator.rotate(…) does not affect the automatic clip extent",
]
};
projection.fitExtent([[0, 0], [960, 600]], object);
- test.deepEqual(projection.scale(), 15724992.330511674);
- test.deepEqual(projection.translate(), [20418843.897824813, 21088401.790971387]);
+ assert.deepStrictEqual(projection.scale(), 15724992.330511674);
+ assert.deepStrictEqual(projection.translate(), [20418843.897824813, 21088401.790971387]);
projection.rotate([0, 95]).fitExtent([[0, 0], [960, 600]], object);
- test.deepEqual(projection.scale(), 15724992.330511674);
- test.deepEqual(projection.translate(), [20418843.897824813, 47161426.43770847]);
- test.end();
+ assert.deepStrictEqual(projection.scale(), 15724992.330511674);
+ assert.deepStrictEqual(projection.translate(), [20418843.897824813, 47161426.43770847]);
});
diff --git a/test/render-reference b/test/render-reference
deleted file mode 100755
index 2d45bab..0000000
--- a/test/render-reference
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env node
-
-var width = 960,
- height = 500;
-
-var fs = require("fs"),
- topojson = require("topojson-client"),
- Canvas = require("canvas"),
- d3 = require("d3");
-
-// canvas@2 compatibility check
-if (Canvas.Canvas) Canvas = Canvas.Canvas;
-
-var canvas = new Canvas(width, height),
- context = canvas.getContext("2d");
-
-var us = require("./data/us-10m.json");
-
-var path = d3.geo.path()
- .projection(d3.geo.albers())
- .context(context);
-
-context.fillStyle = "#fff";
-context.fillRect(0, 0, width, height);
-
-context.beginPath();
-path(topojson.feature(us, us.objects.land));
-context.fillStyle = "#000";
-context.fill();
-
-context.beginPath();
-path(topojson.mesh(us, us.objects.counties, function(a, b) { return a !== b && !(a.id / 1000 ^ b.id / 1000); }));
-context.lineWidth = 0.5;
-context.strokeStyle = "#fff";
-context.stroke();
-
-context.beginPath();
-path(topojson.mesh(us, us.objects.states, function(a, b) { return a !== b; }));
-context.lineWidth = 1;
-context.strokeStyle = "#fff";
-context.stroke();
-
-console.warn("↳ test/images/albers.png");
-canvas.pngStream().pipe(fs.createWriteStream("test/images/albers.png"));
diff --git a/test/render-us b/test/render-us
deleted file mode 100755
index cad5012..0000000
--- a/test/render-us
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env node
-
-var width = 960,
- height = 500,
- projectionName = process.argv[2],
- projectionSymbol = "geo" + projectionName[0].toUpperCase() + projectionName.slice(1);
-
-if (!/^[a-z0-9]+$/i.test(projectionName)) throw new Error;
-
-var fs = require("fs"),
- topojson = require("topojson-client"),
- Canvas = require("canvas"),
- d3_geo = require("../");
-
-// canvas@2 compatibility check
-if (Canvas.Canvas) Canvas = Canvas.Canvas;
-
-var canvas = new Canvas(width, height),
- context = canvas.getContext("2d");
-
-var us = require("./data/us-10m.json");
-
-var path = d3_geo.geoPath()
- .projection(d3_geo[projectionSymbol]().precision(0.1))
- .context(context);
-
-context.fillStyle = "#fff";
-context.fillRect(0, 0, width, height);
-
-context.beginPath();
-path(topojson.feature(us, us.objects.land));
-context.fillStyle = "#000";
-context.fill();
-
-context.beginPath();
-path(topojson.mesh(us, us.objects.counties, function(a, b) { return a !== b && !(a.id / 1000 ^ b.id / 1000); }));
-context.lineWidth = 0.5;
-context.strokeStyle = "#fff";
-context.stroke();
-
-context.beginPath();
-path(topojson.mesh(us, us.objects.states, function(a, b) { return a !== b; }));
-context.lineWidth = 1;
-context.strokeStyle = "#fff";
-context.stroke();
-
-canvas.pngStream().pipe(process.stdout);
diff --git a/test/render-us.js b/test/render-us.js
new file mode 100755
index 0000000..54a2606
--- /dev/null
+++ b/test/render-us.js
@@ -0,0 +1,44 @@
+#!/usr/bin/env node
+
+import {readFileSync} from "fs";
+import {feature, mesh} from "topojson-client";
+import {Canvas} from "canvas";
+import * as d3 from "../src/index.js";
+
+const width = 960;
+const height = 500;
+const projectionName = process.argv[2];
+const projectionSymbol = "geo" + projectionName[0].toUpperCase() + projectionName.slice(1);
+
+if (!/^[a-z0-9]+$/i.test(projectionName)) throw new Error;
+
+const canvas = new Canvas(width, height);
+const context = canvas.getContext("2d");
+
+const us = JSON.parse(readFileSync("test/data/us-10m.json"));
+
+const path = d3.geoPath()
+ .projection(d3[projectionSymbol]().precision(0.1))
+ .context(context);
+
+context.fillStyle = "#fff";
+context.fillRect(0, 0, width, height);
+
+context.beginPath();
+path(feature(us, us.objects.land));
+context.fillStyle = "#000";
+context.fill();
+
+context.beginPath();
+path(mesh(us, us.objects.counties, function(a, b) { return a !== b && !(a.id / 1000 ^ b.id / 1000); }));
+context.lineWidth = 0.5;
+context.strokeStyle = "#fff";
+context.stroke();
+
+context.beginPath();
+path(mesh(us, us.objects.states, function(a, b) { return a !== b; }));
+context.lineWidth = 1;
+context.strokeStyle = "#fff";
+context.stroke();
+
+canvas.pngStream().pipe(process.stdout);
diff --git a/test/render-world b/test/render-world
deleted file mode 100755
index 864695e..0000000
--- a/test/render-world
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env node
-
-var width = 960,
- height = 500,
- projectionName = process.argv[2],
- projectionSymbol = "geo" + projectionName[0].toUpperCase() + projectionName.slice(1);
-
-if (!/^[a-z0-9]+$/i.test(projectionName)) throw new Error;
-
-var fs = require("fs"),
- topojson = require("topojson-client"),
- Canvas = require("canvas"),
- d3_geo = require("../");
-
-// canvas@2 compatibility check
-if (Canvas.Canvas) Canvas = Canvas.Canvas;
-
-var canvas = new Canvas(width, height),
- context = canvas.getContext("2d");
-
-var world = require("world-atlas/world/50m.json"),
- graticule = d3_geo.geoGraticule(),
- outline = {type: "Sphere"};
-
-// switch (projectionName) {
-// case "littrow": outline = graticule.extent([[-90, -60], [90, 60]]).outline(); break;
-// }
-
-var projection;
-
-if (projectionSymbol == 'geoAngleorient30')
- projection = d3_geo.geoEquirectangular().clipAngle(90).angle(-30).precision(0.1).fitExtent([[0,0],[width,height]], {type:"Sphere"});
-else
- projection = d3_geo[projectionSymbol]().precision(0.1);
-
-var path = d3_geo.geoPath()
- .projection(projection)
- .context(context);
-
-context.fillStyle = "#fff";
-context.fillRect(0, 0, width, height);
-context.save();
-
-// switch (projectionName) {
-// case "armadillo": {
-// context.beginPath();
-// path(outline);
-// context.clip();
-// break;
-// }
-// }
-
-context.beginPath();
-path(topojson.feature(world, world.objects.land));
-context.fillStyle = "#000";
-context.fill();
-
-context.beginPath();
-path(graticule());
-context.strokeStyle = "rgba(119,119,119,0.5)";
-context.stroke();
-
-context.restore();
-
-context.beginPath();
-path(outline);
-context.strokeStyle = "#000";
-context.stroke();
-
-canvas.pngStream().pipe(process.stdout);
diff --git a/test/render-world.js b/test/render-world.js
new file mode 100755
index 0000000..8bd3aa3
--- /dev/null
+++ b/test/render-world.js
@@ -0,0 +1,64 @@
+#!/usr/bin/env node
+
+import {readFileSync} from "fs";
+import {feature} from "topojson-client";
+import {Canvas} from "canvas";
+import * as d3 from "../src/index.js";
+
+const width = 960;
+const height = 500;
+const projectionName = process.argv[2];
+const projectionSymbol = "geo" + projectionName[0].toUpperCase() + projectionName.slice(1);
+
+if (!/^[a-z0-9]+$/i.test(projectionName)) throw new Error;
+
+const canvas = new Canvas(width, height);
+const context = canvas.getContext("2d");
+
+const world = JSON.parse(readFileSync("node_modules/world-atlas/world/50m.json"));
+const graticule = d3.geoGraticule();
+const outline = {type: "Sphere"};
+
+// switch (projectionName) {
+// case "littrow": outline = graticule.extent([[-90, -60], [90, 60]]).outline(); break;
+// }
+
+const projection = (projectionSymbol == 'geoAngleorient30')
+ ? d3.geoEquirectangular().clipAngle(90).angle(-30).precision(0.1).fitExtent([[0,0],[width,height]], {type:"Sphere"})
+ : d3[projectionSymbol]().precision(0.1);
+
+const path = d3.geoPath()
+ .projection(projection)
+ .context(context);
+
+context.fillStyle = "#fff";
+context.fillRect(0, 0, width, height);
+context.save();
+
+// switch (projectionName) {
+// case "armadillo": {
+// context.beginPath();
+// path(outline);
+// context.clip();
+// break;
+// }
+// }
+
+context.beginPath();
+path(feature(world, world.objects.land));
+context.fillStyle = "#000";
+context.fill();
+
+context.beginPath();
+path(graticule());
+context.strokeStyle = "rgba(119,119,119,0.5)";
+context.stroke();
+
+context.restore();
+
+context.beginPath();
+path(outline);
+context.strokeStyle = "#000";
+context.stroke();
+
+canvas.pngStream().pipe(process.stdout);
diff --git a/test/rotation-test.js b/test/rotation-test.js
index 02dffa9..2f1f01d 100644
--- a/test/rotation-test.js
+++ b/test/rotation-test.js
@@ -1,42 +1,36 @@
-var tape = require("tape"),
- d3 = require("../");
+import assert from "assert";
+import {geoRotation} from "../src/index.js";
+import {assertInDelta} from "./asserts.js";
-require("./inDelta");
-
-tape("a rotation of [+90°, 0°] only rotates longitude", function(test) {
- var rotation = d3.geoRotation([90, 0])([0, 0]);
- test.inDelta(rotation[0], 90, 1e-6);
- test.inDelta(rotation[1], 0, 1e-6);
- test.end();
+it("a rotation of [+90°, 0°] only rotates longitude", () => {
+ const rotation = geoRotation([90, 0])([0, 0]);
+ assertInDelta(rotation[0], 90, 1e-6);
+ assertInDelta(rotation[1], 0, 1e-6);
});
-tape("a rotation of [+90°, 0°] wraps around when crossing the antimeridian", function(test) {
- var rotation = d3.geoRotation([90, 0])([150, 0]);
- test.inDelta(rotation[0], -120, 1e-6);
- test.inDelta(rotation[1], 0, 1e-6);
- test.end();
+it("a rotation of [+90°, 0°] wraps around when crossing the antimeridian", () => {
+ const rotation = geoRotation([90, 0])([150, 0]);
+ assertInDelta(rotation[0], -120, 1e-6);
+ assertInDelta(rotation[1], 0, 1e-6);
});
-tape("a rotation of [-45°, 45°] rotates longitude and latitude", function(test) {
- var rotation = d3.geoRotation([-45, 45])([0, 0]);
- test.inDelta(rotation[0], -54.73561, 1e-6);
- test.inDelta(rotation[1], 30, 1e-6);
- test.end();
+it("a rotation of [-45°, 45°] rotates longitude and latitude", () => {
+ const rotation = geoRotation([-45, 45])([0, 0]);
+ assertInDelta(rotation[0], -54.73561, 1e-6);
+ assertInDelta(rotation[1], 30, 1e-6);
});
-tape("a rotation of [-45°, 45°] inverse rotation of longitude and latitude", function(test) {
- var rotation = d3.geoRotation([-45, 45]).invert([-54.73561, 30]);
- test.inDelta(rotation[0], 0, 1e-6);
- test.inDelta(rotation[1], 0, 1e-6);
- test.end();
+it("a rotation of [-45°, 45°] inverse rotation of longitude and latitude", () => {
+ const rotation = geoRotation([-45, 45]).invert([-54.73561, 30]);
+ assertInDelta(rotation[0], 0, 1e-6);
+ assertInDelta(rotation[1], 0, 1e-6);
});
-tape("the identity rotation constrains longitudes to [-180°, 180°]", function(test) {
- var rotate = d3.geoRotation([0, 0]);
- test.equal(rotate([180,0])[0], 180);
- test.equal(rotate([-180,0])[0], -180);
- test.equal(rotate([360,0])[0], 0);
- test.inDelta(rotate([2562,0])[0], 42, 1e-10);
- test.inDelta(rotate([-2562,0])[0], -42, 1e-10);
- test.end();
+it("the identity rotation constrains longitudes to [-180°, 180°]", () => {
+ const rotate = geoRotation([0, 0]);
+ assert.strictEqual(rotate([180,0])[0], 180);
+ assert.strictEqual(rotate([-180,0])[0], -180);
+ assert.strictEqual(rotate([360,0])[0], 0);
+ assertInDelta(rotate([2562,0])[0], 42, 1e-10);
+ assertInDelta(rotate([-2562,0])[0], -42, 1e-10);
});
diff --git a/test/stream-test.js b/test/stream-test.js
index 2a897b5..5ae61ad 100644
--- a/test/stream-test.js
+++ b/test/stream-test.js
@@ -1,225 +1,211 @@
-var tape = require("tape"),
- d3 = require("../");
+import assert from "assert";
+import {geoStream} from "../src/index.js";
-tape("geoStream(object) ignores unknown types", function(test) {
- d3.geoStream({type: "Unknown"}, {});
- d3.geoStream({type: "Feature", geometry: {type: "Unknown"}}, {});
- d3.geoStream({type: "FeatureCollection", features: [{type: "Feature", geometry: {type: "Unknown"}}]}, {});
- d3.geoStream({type: "GeometryCollection", geometries: [{type: "Unknown"}]}, {});
- test.end();
+it("geoStream(object) ignores unknown types", () => {
+ geoStream({type: "Unknown"}, {});
+ geoStream({type: "Feature", geometry: {type: "Unknown"}}, {});
+ geoStream({type: "FeatureCollection", features: [{type: "Feature", geometry: {type: "Unknown"}}]}, {});
+ geoStream({type: "GeometryCollection", geometries: [{type: "Unknown"}]}, {});
});
-tape("geoStream(object) ignores null geometries", function(test) {
- d3.geoStream(null, {});
- d3.geoStream({type: "Feature", geometry: null }, {});
- d3.geoStream({type: "FeatureCollection", features: [{type: "Feature", geometry: null }]}, {});
- d3.geoStream({type: "GeometryCollection", geometries: [null]}, {});
- test.end();
+it("geoStream(object) ignores null geometries", () => {
+ geoStream(null, {});
+ geoStream({type: "Feature", geometry: null }, {});
+ geoStream({type: "FeatureCollection", features: [{type: "Feature", geometry: null }]}, {});
+ geoStream({type: "GeometryCollection", geometries: [null]}, {});
});
-tape("geoStream(object) returns void", function(test) {
- test.equal(d3.geoStream({type: "Point", coordinates: [1, 2]}, {point: function() { return true; }}), undefined);
- test.end();
+it("geoStream(object) returns void", () => {
+ assert.strictEqual(geoStream({type: "Point", coordinates: [1, 2]}, {point: function() { return true; }}), undefined);
});
-tape("geoStream(object) allows empty multi-geometries", function(test) {
- d3.geoStream({type: "MultiPoint", coordinates: []}, {});
- d3.geoStream({type: "MultiLineString", coordinates: []}, {});
- d3.geoStream({type: "MultiPolygon", coordinates: []}, {});
- test.end();
+it("geoStream(object) allows empty multi-geometries", () => {
+ geoStream({type: "MultiPoint", coordinates: []}, {});
+ geoStream({type: "MultiLineString", coordinates: []}, {});
+ geoStream({type: "MultiPolygon", coordinates: []}, {});
});
-tape("geoStream(Sphere) ↦ sphere", function(test) {
- var calls = 0;
- d3.geoStream({type: "Sphere"}, {
+it("geoStream(Sphere) ↦ sphere", () => {
+ let calls = 0;
+ geoStream({type: "Sphere"}, {
sphere: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls, 1);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls, 1);
}
});
- test.equal(calls, 1);
- test.end();
+ assert.strictEqual(calls, 1);
});
-tape("geoStream(Point) ↦ point", function(test) {
- var calls = 0, coordinates = 0;
- d3.geoStream({type: "Point", coordinates: [1, 2, 3]}, {
+it("geoStream(Point) ↦ point", () => {
+ let calls = 0, coordinates = 0;
+ geoStream({type: "Point", coordinates: [1, 2, 3]}, {
point: function(x, y, z) {
- test.equal(arguments.length, 3);
- test.equal(x, ++coordinates);
- test.equal(y, ++coordinates);
- test.equal(z, ++coordinates);
- test.equal(++calls, 1);
+ assert.strictEqual(arguments.length, 3);
+ assert.strictEqual(x, ++coordinates);
+ assert.strictEqual(y, ++coordinates);
+ assert.strictEqual(z, ++coordinates);
+ assert.strictEqual(++calls, 1);
}
});
- test.equal(calls, 1);
- test.end();
+ assert.strictEqual(calls, 1);
});
-tape("geoStream(MultiPoint) ↦ point*", function(test) {
- var calls = 0, coordinates = 0;
- d3.geoStream({type: "MultiPoint", coordinates: [[1, 2, 3], [4, 5, 6]]}, {
+it("geoStream(MultiPoint) ↦ point*", () => {
+ let calls = 0, coordinates = 0;
+ geoStream({type: "MultiPoint", coordinates: [[1, 2, 3], [4, 5, 6]]}, {
point: function(x, y, z) {
- test.equal(arguments.length, 3);
- test.equal(x, ++coordinates);
- test.equal(y, ++coordinates);
- test.equal(z, ++coordinates);
- test.equal(1 <= ++calls && calls <= 2, true);
+ assert.strictEqual(arguments.length, 3);
+ assert.strictEqual(x, ++coordinates);
+ assert.strictEqual(y, ++coordinates);
+ assert.strictEqual(z, ++coordinates);
+ assert.strictEqual(1 <= ++calls && calls <= 2, true);
}
});
- test.equal(calls, 2);
- test.end();
+ assert.strictEqual(calls, 2);
});
-tape("geoStream(LineString) ↦ lineStart, point{2,}, lineEnd", function(test) {
- var calls = 0, coordinates = 0;
- d3.geoStream({type: "LineString", coordinates: [[1, 2, 3], [4, 5, 6]]}, {
+it("geoStream(LineString) ↦ lineStart, point{2,}, lineEnd", () => {
+ let calls = 0, coordinates = 0;
+ geoStream({type: "LineString", coordinates: [[1, 2, 3], [4, 5, 6]]}, {
lineStart: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls, 1);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls, 1);
},
point: function(x, y, z) {
- test.equal(arguments.length, 3);
- test.equal(x, ++coordinates);
- test.equal(y, ++coordinates);
- test.equal(z, ++coordinates);
- test.equal(2 <= ++calls && calls <= 3, true);
+ assert.strictEqual(arguments.length, 3);
+ assert.strictEqual(x, ++coordinates);
+ assert.strictEqual(y, ++coordinates);
+ assert.strictEqual(z, ++coordinates);
+ assert.strictEqual(2 <= ++calls && calls <= 3, true);
},
lineEnd: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls, 4);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls, 4);
}
});
- test.equal(calls, 4);
- test.end();
+ assert.strictEqual(calls, 4);
});
-tape("geoStream(MultiLineString) ↦ (lineStart, point{2,}, lineEnd)*", function(test) {
- var calls = 0, coordinates = 0;
- d3.geoStream({type: "MultiLineString", coordinates: [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]}, {
+it("geoStream(MultiLineString) ↦ (lineStart, point{2,}, lineEnd)*", () => {
+ let calls = 0, coordinates = 0;
+ geoStream({type: "MultiLineString", coordinates: [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]}, {
lineStart: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls === 1 || calls === 5, true);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls === 1 || calls === 5, true);
},
point: function(x, y, z) {
- test.equal(arguments.length, 3);
- test.equal(x, ++coordinates);
- test.equal(y, ++coordinates);
- test.equal(z, ++coordinates);
- test.equal(2 <= ++calls && calls <= 3 || 6 <= calls && calls <= 7, true);
+ assert.strictEqual(arguments.length, 3);
+ assert.strictEqual(x, ++coordinates);
+ assert.strictEqual(y, ++coordinates);
+ assert.strictEqual(z, ++coordinates);
+ assert.strictEqual(2 <= ++calls && calls <= 3 || 6 <= calls && calls <= 7, true);
},
lineEnd: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls === 4 || calls === 8, true);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls === 4 || calls === 8, true);
}
});
- test.equal(calls, 8);
- test.end();
+ assert.strictEqual(calls, 8);
});
-tape("geoStream(Polygon) ↦ polygonStart, lineStart, point{2,}, lineEnd, polygonEnd", function(test) {
- var calls = 0, coordinates = 0;
- d3.geoStream({type: "Polygon", coordinates: [[[1, 2, 3], [4, 5, 6], [1, 2, 3]], [[7, 8, 9], [10, 11, 12], [7, 8, 9]]]}, {
+it("geoStream(Polygon) ↦ polygonStart, lineStart, point{2,}, lineEnd, polygonEnd", () => {
+ let calls = 0, coordinates = 0;
+ geoStream({type: "Polygon", coordinates: [[[1, 2, 3], [4, 5, 6], [1, 2, 3]], [[7, 8, 9], [10, 11, 12], [7, 8, 9]]]}, {
polygonStart: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls === 1, true);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls === 1, true);
},
lineStart: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls === 2 || calls === 6, true);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls === 2 || calls === 6, true);
},
point: function(x, y, z) {
- test.equal(arguments.length, 3);
- test.equal(x, ++coordinates);
- test.equal(y, ++coordinates);
- test.equal(z, ++coordinates);
- test.equal(3 <= ++calls && calls <= 4 || 7 <= calls && calls <= 8, true);
+ assert.strictEqual(arguments.length, 3);
+ assert.strictEqual(x, ++coordinates);
+ assert.strictEqual(y, ++coordinates);
+ assert.strictEqual(z, ++coordinates);
+ assert.strictEqual(3 <= ++calls && calls <= 4 || 7 <= calls && calls <= 8, true);
},
lineEnd: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls === 5 || calls === 9, true);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls === 5 || calls === 9, true);
},
polygonEnd: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls === 10, true);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls === 10, true);
}
});
- test.equal(calls, 10);
- test.end();
+ assert.strictEqual(calls, 10);
});
-tape("geoStream(MultiPolygon) ↦ (polygonStart, lineStart, point{2,}, lineEnd, polygonEnd)*", function(test) {
- var calls = 0, coordinates = 0;
- d3.geoStream({type: "MultiPolygon", coordinates: [[[[1, 2, 3], [4, 5, 6], [1, 2, 3]]], [[[7, 8, 9], [10, 11, 12], [7, 8, 9]]]]}, {
+it("geoStream(MultiPolygon) ↦ (polygonStart, lineStart, point{2,}, lineEnd, polygonEnd)*", () => {
+ let calls = 0, coordinates = 0;
+ geoStream({type: "MultiPolygon", coordinates: [[[[1, 2, 3], [4, 5, 6], [1, 2, 3]]], [[[7, 8, 9], [10, 11, 12], [7, 8, 9]]]]}, {
polygonStart: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls === 1 || calls === 7, true);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls === 1 || calls === 7, true);
},
lineStart: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls === 2 || calls === 8, true);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls === 2 || calls === 8, true);
},
point: function(x, y, z) {
- test.equal(arguments.length, 3);
- test.equal(x, ++coordinates);
- test.equal(y, ++coordinates);
- test.equal(z, ++coordinates);
- test.equal(3 <= ++calls && calls <= 4 || 9 <= calls && calls <= 10, true);
+ assert.strictEqual(arguments.length, 3);
+ assert.strictEqual(x, ++coordinates);
+ assert.strictEqual(y, ++coordinates);
+ assert.strictEqual(z, ++coordinates);
+ assert.strictEqual(3 <= ++calls && calls <= 4 || 9 <= calls && calls <= 10, true);
},
lineEnd: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls === 5 || calls === 11, true);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls === 5 || calls === 11, true);
},
polygonEnd: function() {
- test.equal(arguments.length, 0);
- test.equal(++calls === 6 || calls === 12, true);
+ assert.strictEqual(arguments.length, 0);
+ assert.strictEqual(++calls === 6 || calls === 12, true);
}
});
- test.equal(calls, 12);
- test.end();
+ assert.strictEqual(calls, 12);
});
-tape("geoStream(Feature) ↦ .*", function(test) {
- var calls = 0, coordinates = 0;
- d3.geoStream({type: "Feature", geometry: {type: "Point", coordinates: [1, 2, 3]}}, {
+it("geoStream(Feature) ↦ .*", () => {
+ let calls = 0, coordinates = 0;
+ geoStream({type: "Feature", geometry: {type: "Point", coordinates: [1, 2, 3]}}, {
point: function(x, y, z) {
- test.equal(arguments.length, 3);
- test.equal(x, ++coordinates);
- test.equal(y, ++coordinates);
- test.equal(z, ++coordinates);
- test.equal(++calls, 1);
+ assert.strictEqual(arguments.length, 3);
+ assert.strictEqual(x, ++coordinates);
+ assert.strictEqual(y, ++coordinates);
+ assert.strictEqual(z, ++coordinates);
+ assert.strictEqual(++calls, 1);
}
});
- test.equal(calls, 1);
- test.end();
+ assert.strictEqual(calls, 1);
});
-tape("geoStream(FeatureCollection) ↦ .*", function(test) {
- var calls = 0, coordinates = 0;
- d3.geoStream({type: "FeatureCollection", features: [{type: "Feature", geometry: {type: "Point", coordinates: [1, 2, 3]}}]}, {
+it("geoStream(FeatureCollection) ↦ .*", () => {
+ let calls = 0, coordinates = 0;
+ geoStream({type: "FeatureCollection", features: [{type: "Feature", geometry: {type: "Point", coordinates: [1, 2, 3]}}]}, {
point: function(x, y, z) {
- test.equal(arguments.length, 3);
- test.equal(x, ++coordinates);
- test.equal(y, ++coordinates);
- test.equal(z, ++coordinates);
- test.equal(++calls, 1);
+ assert.strictEqual(arguments.length, 3);
+ assert.strictEqual(x, ++coordinates);
+ assert.strictEqual(y, ++coordinates);
+ assert.strictEqual(z, ++coordinates);
+ assert.strictEqual(++calls, 1);
}
});
- test.equal(calls, 1);
- test.end();
+ assert.strictEqual(calls, 1);
});
-tape("geoStream(GeometryCollection) ↦ .*", function(test) {
- var calls = 0, coordinates = 0;
- d3.geoStream({type: "GeometryCollection", geometries: [{type: "Point", coordinates: [1, 2, 3]}]}, {
+it("geoStream(GeometryCollection) ↦ .*", () => {
+ let calls = 0, coordinates = 0;
+ geoStream({type: "GeometryCollection", geometries: [{type: "Point", coordinates: [1, 2, 3]}]}, {
point: function(x, y, z) {
- test.equal(arguments.length, 3);
- test.equal(x, ++coordinates);
- test.equal(y, ++coordinates);
- test.equal(z, ++coordinates);
- test.equal(++calls, 1);
+ assert.strictEqual(arguments.length, 3);
+ assert.strictEqual(x, ++coordinates);
+ assert.strictEqual(y, ++coordinates);
+ assert.strictEqual(z, ++coordinates);
+ assert.strictEqual(++calls, 1);
}
});
- test.equal(calls, 1);
- test.end();
+ assert.strictEqual(calls, 1);
});
diff --git a/yarn.lock b/yarn.lock
index 76f988f..1b0e074 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,61 +2,120 @@
# yarn lockfile v1
-"@babel/code-frame@^7.0.0":
- version "7.5.5"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d"
- integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==
+"@babel/code-frame@7.12.11":
+ version "7.12.11"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
+ integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==
dependencies:
- "@babel/highlight" "^7.0.0"
+ "@babel/highlight" "^7.10.4"
-"@babel/highlight@^7.0.0":
- version "7.5.0"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540"
- integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==
+"@babel/code-frame@^7.10.4":
+ version "7.12.13"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658"
+ integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==
dependencies:
+ "@babel/highlight" "^7.12.13"
+
+"@babel/helper-validator-identifier@^7.14.0":
+ version "7.14.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288"
+ integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==
+
+"@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13":
+ version "7.14.0"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.0.tgz#3197e375711ef6bf834e67d0daec88e4f46113cf"
+ integrity sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.14.0"
chalk "^2.0.0"
- esutils "^2.0.2"
js-tokens "^4.0.0"
-"@types/estree@0.0.39":
- version "0.0.39"
- resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
- integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
+"@eslint/eslintrc@^0.4.2":
+ version "0.4.2"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz#f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179"
+ integrity sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==
+ dependencies:
+ ajv "^6.12.4"
+ debug "^4.1.1"
+ espree "^7.3.0"
+ globals "^13.9.0"
+ ignore "^4.0.6"
+ import-fresh "^3.2.1"
+ js-yaml "^3.13.1"
+ minimatch "^3.0.4"
+ strip-json-comments "^3.1.1"
-"@types/node@^12.6.2":
- version "12.6.8"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c"
- integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg==
+"@mapbox/node-pre-gyp@^1.0.0":
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.5.tgz#2a0b32fcb416fb3f2250fd24cb2a81421a4f5950"
+ integrity sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA==
+ dependencies:
+ detect-libc "^1.0.3"
+ https-proxy-agent "^5.0.0"
+ make-dir "^3.1.0"
+ node-fetch "^2.6.1"
+ nopt "^5.0.0"
+ npmlog "^4.1.2"
+ rimraf "^3.0.2"
+ semver "^7.3.4"
+ tar "^6.1.0"
+
+"@types/node@*":
+ version "15.12.1"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.1.tgz#9b60797dee1895383a725f828a869c86c6caa5c2"
+ integrity sha512-zyxJM8I1c9q5sRMtVF+zdd13Jt6RU4r4qfhTd7lQubyThvLfx6yYekWSQjGCGV2Tkecgxnlpl/DNlb6Hg+dmEw==
+
+"@ungap/promise-all-settled@1.1.2":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
+ integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
-acorn-jsx@^5.0.0:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e"
- integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==
+acorn-jsx@^5.3.1:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
+ integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==
+
+acorn@^7.4.0:
+ version "7.4.1"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
+ integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
-acorn@^6.0.7, acorn@^6.2.0:
- version "6.2.1"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51"
- integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==
+agent-base@6:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
+ integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==
+ dependencies:
+ debug "4"
-ajv@^6.10.0, ajv@^6.10.2:
- version "6.10.2"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52"
- integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==
+ajv@^6.10.0, ajv@^6.12.4:
+ version "6.12.6"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
+ integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
dependencies:
- fast-deep-equal "^2.0.1"
+ fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
-ansi-escapes@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b"
- integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==
+ajv@^8.0.1:
+ version "8.5.0"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.5.0.tgz#695528274bcb5afc865446aa275484049a18ae4b"
+ integrity sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ==
+ dependencies:
+ fast-deep-equal "^3.1.1"
+ json-schema-traverse "^1.0.0"
+ require-from-string "^2.0.2"
+ uri-js "^4.2.2"
+
+ansi-colors@4.1.1, ansi-colors@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
+ integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
ansi-regex@^2.0.0:
version "2.1.1"
@@ -68,18 +127,33 @@ ansi-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
-ansi-regex@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
- integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
+ansi-regex@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
+ integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
-ansi-styles@^3.2.0, ansi-styles@^3.2.1:
+ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
dependencies:
color-convert "^1.9.0"
+ansi-styles@^4.0.0, ansi-styles@^4.1.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
+ integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
+ dependencies:
+ color-convert "^2.0.1"
+
+anymatch@~3.1.1:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
+ integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
+ dependencies:
+ normalize-path "^3.0.0"
+ picomatch "^2.0.4"
+
aproba@^1.0.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
@@ -100,15 +174,25 @@ argparse@^1.0.7:
dependencies:
sprintf-js "~1.0.2"
-astral-regex@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
- integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
+argparse@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
+ integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
+
+astral-regex@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
+ integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
balanced-match@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
- integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
+ integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
+
+binary-extensions@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
+ integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
brace-expansion@^1.1.7:
version "1.1.11"
@@ -118,6 +202,18 @@ brace-expansion@^1.1.7:
balanced-match "^1.0.0"
concat-map "0.0.1"
+braces@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
+ integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
+ dependencies:
+ fill-range "^7.0.1"
+
+browser-stdout@1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
+ integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==
+
buffer-from@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
@@ -128,16 +224,21 @@ callsites@^3.0.0:
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
-"canvas@1 - 2":
- version "2.6.1"
- resolved "https://registry.yarnpkg.com/canvas/-/canvas-2.6.1.tgz#0d087dd4d60f5a5a9efa202757270abea8bef89e"
- integrity sha512-S98rKsPcuhfTcYbtF53UIJhcbgIAK533d1kJKMwsMwAIFgfd58MOyxRud3kktlzWiEkFliaJtvyZCBtud/XVEA==
+camelcase@^6.0.0:
+ version "6.2.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809"
+ integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
+
+canvas@2:
+ version "2.8.0"
+ resolved "https://registry.yarnpkg.com/canvas/-/canvas-2.8.0.tgz#f99ca7f25e6e26686661ffa4fec1239bbef74461"
+ integrity sha512-gLTi17X8WY9Cf5GZ2Yns8T5lfBOcGgFehDFb+JQwDqdOoBOcECS9ZWMEAqMSVcMYwXD659J8NyzjRY/2aE+C2Q==
dependencies:
+ "@mapbox/node-pre-gyp" "^1.0.0"
nan "^2.14.0"
- node-pre-gyp "^0.11.0"
simple-get "^3.0.3"
-chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2:
+chalk@^2.0.0:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -146,27 +247,42 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
-chardet@^0.7.0:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
- integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
-
-chownr@^1.1.1:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
- integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==
+chalk@^4.0.0:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad"
+ integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==
+ dependencies:
+ ansi-styles "^4.1.0"
+ supports-color "^7.1.0"
+
+chokidar@3.5.1:
+ version "3.5.1"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a"
+ integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==
+ dependencies:
+ anymatch "~3.1.1"
+ braces "~3.0.2"
+ glob-parent "~5.1.0"
+ is-binary-path "~2.1.0"
+ is-glob "~4.0.1"
+ normalize-path "~3.0.0"
+ readdirp "~3.5.0"
+ optionalDependencies:
+ fsevents "~2.3.1"
+
+chownr@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
+ integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==
-cli-cursor@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
- integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=
+cliui@^7.0.2:
+ version "7.0.4"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
+ integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
dependencies:
- restore-cursor "^2.0.0"
-
-cli-width@^2.0.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
- integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=
+ string-width "^4.2.0"
+ strip-ansi "^6.0.0"
+ wrap-ansi "^7.0.0"
code-point-at@^1.0.0:
version "1.1.0"
@@ -180,15 +296,27 @@ color-convert@^1.9.0:
dependencies:
color-name "1.1.3"
+color-convert@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+ dependencies:
+ color-name "~1.1.4"
+
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+color-name@~1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
commander@2, commander@^2.20.0:
- version "2.20.0"
- resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
- integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
+ version "2.20.3"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
+ integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
concat-map@0.0.1:
version "0.0.1"
@@ -205,40 +333,38 @@ core-util-is@~1.0.0:
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
-cross-spawn@^6.0.5:
- version "6.0.5"
- resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
- integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
+cross-spawn@^7.0.2:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
+ integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
dependencies:
- nice-try "^1.0.4"
- path-key "^2.0.1"
- semver "^5.5.0"
- shebang-command "^1.2.0"
- which "^1.2.9"
+ path-key "^3.1.0"
+ shebang-command "^2.0.0"
+ which "^2.0.1"
-d3-array@^2.5.0:
- version "2.8.0"
- resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.8.0.tgz#f76e10ad47f1f4f75f33db5fc322eb9ffde5ef23"
- integrity sha512-6V272gsOeg7+9pTW1jSYOR1QE37g95I3my1hBmY+vOUNHRrk9yt4OTz/gK7PMkVAVDrYYq4mq3grTiZ8iJdNIw==
+"d3-array@2.5.0 - 3":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.0.0.tgz#32edad6c4b1a8c85800ffc856a5d6a4761a83a6d"
+ integrity sha512-2t/oQ99GzOkttogku85VrBbY2soA/SfVea9fkCGhJ4830sAo8Eslx1SgWT9bzLv9Pxypm+Vjl/BfCnUWTcoDXw==
+ dependencies:
+ internmap "1 - 2"
-"d3-format@1 - 2":
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-2.0.0.tgz#a10bcc0f986c372b729ba447382413aabf5b0767"
- integrity sha512-Ab3S6XuE/Q+flY96HXT0jOXcM4EAClYFnRGY5zsjRGNy6qCYrQsMffs7cV5Q9xejb35zxW5hf/guKw34kvIKsA==
+"d3-format@1 - 3":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.0.0.tgz#49971ce004d9969a2d6eb8385e3bac735a843a2f"
+ integrity sha512-vzHbrRFaD/Jx1zpiQWojO2Lvgmf7pIsA/D4b6ipd1hxBYzMKsZRsF3i+SWlHz8IpMF4epyKUdG+vhxEYUYB/1g==
-debug@^3.2.6:
- version "3.2.6"
- resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
- integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
+debug@4, debug@4.3.1, debug@^4.0.1, debug@^4.1.1:
+ version "4.3.1"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
+ integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
dependencies:
- ms "^2.1.1"
+ ms "2.1.2"
-debug@^4.0.1:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
- integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
- dependencies:
- ms "^2.1.1"
+decamelize@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837"
+ integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==
decompress-response@^4.2.0:
version "4.2.1"
@@ -247,43 +373,26 @@ decompress-response@^4.2.0:
dependencies:
mimic-response "^2.0.0"
-deep-equal@~1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
- integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=
-
-deep-extend@^0.6.0:
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
- integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
-
-deep-is@~0.1.3:
+deep-is@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
-define-properties@^1.1.2:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
- integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
- dependencies:
- object-keys "^1.0.12"
-
-defined@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
- integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=
-
delegates@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
-detect-libc@^1.0.2:
+detect-libc@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
+diff@5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b"
+ integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==
+
doctrine@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
@@ -291,223 +400,217 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"
-emoji-regex@^7.0.1:
- version "7.0.3"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
- integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
-
-es-abstract@^1.5.0:
- version "1.13.0"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9"
- integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==
- dependencies:
- es-to-primitive "^1.2.0"
- function-bind "^1.1.1"
- has "^1.0.3"
- is-callable "^1.1.4"
- is-regex "^1.0.4"
- object-keys "^1.0.12"
-
-es-to-primitive@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377"
- integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==
+emoji-regex@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
+ integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
+
+enquirer@^2.3.5:
+ version "2.3.6"
+ resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
+ integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
dependencies:
- is-callable "^1.1.4"
- is-date-object "^1.0.1"
- is-symbol "^1.0.2"
+ ansi-colors "^4.1.1"
+
+escalade@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
+ integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
+
+escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
+ integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
-eslint-scope@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9"
- integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==
+eslint-scope@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
+ integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
dependencies:
- esrecurse "^4.1.0"
+ esrecurse "^4.3.0"
estraverse "^4.1.1"
-eslint-utils@^1.3.1:
- version "1.4.3"
- resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
- integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==
+eslint-utils@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
+ integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
dependencies:
eslint-visitor-keys "^1.1.0"
-eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
- integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
+eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
+ integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
-eslint@6:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.1.0.tgz#06438a4a278b1d84fb107d24eaaa35471986e646"
- integrity sha512-QhrbdRD7ofuV09IuE2ySWBz0FyXCq0rriLTZXZqaWSI79CVtHVRdkFuFTViiqzZhkCgfOh9USpriuGN2gIpZDQ==
+eslint-visitor-keys@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
+ integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
+
+eslint@7:
+ version "7.28.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.28.0.tgz#435aa17a0b82c13bb2be9d51408b617e49c1e820"
+ integrity sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g==
dependencies:
- "@babel/code-frame" "^7.0.0"
+ "@babel/code-frame" "7.12.11"
+ "@eslint/eslintrc" "^0.4.2"
ajv "^6.10.0"
- chalk "^2.1.0"
- cross-spawn "^6.0.5"
+ chalk "^4.0.0"
+ cross-spawn "^7.0.2"
debug "^4.0.1"
doctrine "^3.0.0"
- eslint-scope "^5.0.0"
- eslint-utils "^1.3.1"
- eslint-visitor-keys "^1.0.0"
- espree "^6.0.0"
- esquery "^1.0.1"
+ enquirer "^2.3.5"
+ escape-string-regexp "^4.0.0"
+ eslint-scope "^5.1.1"
+ eslint-utils "^2.1.0"
+ eslint-visitor-keys "^2.0.0"
+ espree "^7.3.1"
+ esquery "^1.4.0"
esutils "^2.0.2"
- file-entry-cache "^5.0.1"
+ fast-deep-equal "^3.1.3"
+ file-entry-cache "^6.0.1"
functional-red-black-tree "^1.0.1"
- glob-parent "^5.0.0"
- globals "^11.7.0"
+ glob-parent "^5.1.2"
+ globals "^13.6.0"
ignore "^4.0.6"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
- inquirer "^6.4.1"
is-glob "^4.0.0"
js-yaml "^3.13.1"
json-stable-stringify-without-jsonify "^1.0.1"
- levn "^0.3.0"
- lodash "^4.17.14"
+ levn "^0.4.1"
+ lodash.merge "^4.6.2"
minimatch "^3.0.4"
- mkdirp "^0.5.1"
natural-compare "^1.4.0"
- optionator "^0.8.2"
+ optionator "^0.9.1"
progress "^2.0.0"
- regexpp "^2.0.1"
- semver "^6.1.2"
- strip-ansi "^5.2.0"
- strip-json-comments "^3.0.1"
- table "^5.2.3"
+ regexpp "^3.1.0"
+ semver "^7.2.1"
+ strip-ansi "^6.0.0"
+ strip-json-comments "^3.1.0"
+ table "^6.0.9"
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
-esm@3:
- version "3.2.25"
- resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
- integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
-
-espree@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/espree/-/espree-6.0.0.tgz#716fc1f5a245ef5b9a7fdb1d7b0d3f02322e75f6"
- integrity sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q==
+espree@^7.3.0, espree@^7.3.1:
+ version "7.3.1"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6"
+ integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==
dependencies:
- acorn "^6.0.7"
- acorn-jsx "^5.0.0"
- eslint-visitor-keys "^1.0.0"
+ acorn "^7.4.0"
+ acorn-jsx "^5.3.1"
+ eslint-visitor-keys "^1.3.0"
esprima@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
-esquery@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
- integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==
+esquery@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5"
+ integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==
dependencies:
- estraverse "^4.0.0"
+ estraverse "^5.1.0"
-esrecurse@^4.1.0:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
- integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==
+esrecurse@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
+ integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==
dependencies:
- estraverse "^4.1.0"
+ estraverse "^5.2.0"
-estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
- integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=
+estraverse@^4.1.1:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
+ integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
-estree-walker@^0.6.1:
- version "0.6.1"
- resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362"
- integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==
+estraverse@^5.1.0, estraverse@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"
+ integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==
esutils@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
- integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=
-
-external-editor@^3.0.3:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
- integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
- dependencies:
- chardet "^0.7.0"
- iconv-lite "^0.4.24"
- tmp "^0.0.33"
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
+ integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
-fast-deep-equal@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
- integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
+fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
+ integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
fast-json-stable-stringify@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
- integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I=
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
+ integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
-fast-levenshtein@~2.0.4:
+fast-levenshtein@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
-figures@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
- integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=
+file-entry-cache@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
+ integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==
dependencies:
- escape-string-regexp "^1.0.5"
+ flat-cache "^3.0.4"
-file-entry-cache@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
- integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==
+fill-range@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
+ integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
dependencies:
- flat-cache "^2.0.1"
+ to-regex-range "^5.0.1"
-flat-cache@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0"
- integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==
+find-up@5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc"
+ integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==
dependencies:
- flatted "^2.0.0"
- rimraf "2.6.3"
- write "1.0.3"
-
-flatted@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08"
- integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==
+ locate-path "^6.0.0"
+ path-exists "^4.0.0"
-for-each@~0.3.3:
- version "0.3.3"
- resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
- integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==
+flat-cache@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11"
+ integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==
dependencies:
- is-callable "^1.1.3"
+ flatted "^3.1.0"
+ rimraf "^3.0.2"
+
+flat@^5.0.2:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241"
+ integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==
+
+flatted@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469"
+ integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==
-fs-minipass@^1.2.5:
- version "1.2.7"
- resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7"
- integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==
+fs-minipass@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb"
+ integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==
dependencies:
- minipass "^2.6.0"
+ minipass "^3.0.0"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
-function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
- integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+fsevents@~2.3.1:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
+ integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
functional-red-black-tree@^1.0.1:
version "1.0.1"
@@ -528,17 +631,22 @@ gauge@~2.7.3:
strip-ansi "^3.0.1"
wide-align "^1.1.0"
-glob-parent@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954"
- integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==
+get-caller-file@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
+ integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
+
+glob-parent@^5.1.2, glob-parent@~5.1.0:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
+ integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"
-glob@^7.1.3, glob@~7.1.4:
- version "7.1.4"
- resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
- integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
+glob@7.1.6:
+ version "7.1.6"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
+ integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
@@ -547,56 +655,67 @@ glob@^7.1.3, glob@~7.1.4:
once "^1.3.0"
path-is-absolute "^1.0.0"
-globals@^11.7.0:
- version "11.12.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
- integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
+glob@^7.1.3:
+ version "7.1.7"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90"
+ integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+globals@^13.6.0, globals@^13.9.0:
+ version "13.9.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb"
+ integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA==
+ dependencies:
+ type-fest "^0.20.2"
+
+growl@1.10.5:
+ version "1.10.5"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
+ integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
-has-symbols@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44"
- integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=
+has-flag@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
has-unicode@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=
-has@^1.0.1, has@^1.0.3, has@~1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
- integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
- dependencies:
- function-bind "^1.1.1"
-
-iconv-lite@^0.4.24, iconv-lite@^0.4.4:
- version "0.4.24"
- resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
- integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
- dependencies:
- safer-buffer ">= 2.1.2 < 3"
+he@1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
+ integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
-ignore-walk@^3.0.1:
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37"
- integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==
+https-proxy-agent@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2"
+ integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==
dependencies:
- minimatch "^3.0.4"
+ agent-base "6"
+ debug "4"
ignore@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
-import-fresh@^3.0.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.1.0.tgz#6d33fa1dcef6df930fae003446f33415af905118"
- integrity sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==
+import-fresh@^3.0.0, import-fresh@^3.2.1:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
+ integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==
dependencies:
parent-module "^1.0.0"
resolve-from "^4.0.0"
@@ -614,44 +733,22 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
-inherits@2, inherits@~2.0.3, inherits@~2.0.4:
+inherits@2, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
-ini@~1.3.0:
- version "1.3.5"
- resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
- integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
-
-inquirer@^6.4.1:
- version "6.5.0"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.0.tgz#2303317efc9a4ea7ec2e2df6f86569b734accf42"
- integrity sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA==
- dependencies:
- ansi-escapes "^3.2.0"
- chalk "^2.4.2"
- cli-cursor "^2.1.0"
- cli-width "^2.0.0"
- external-editor "^3.0.3"
- figures "^2.0.0"
- lodash "^4.17.12"
- mute-stream "0.0.7"
- run-async "^2.2.0"
- rxjs "^6.4.0"
- string-width "^2.1.0"
- strip-ansi "^5.1.0"
- through "^2.3.6"
-
-is-callable@^1.1.3, is-callable@^1.1.4:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"
- integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==
+"internmap@1 - 2":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.0.tgz#cc38ce0c33eaf4501c07c990673c07caa782179a"
+ integrity sha512-XpWRFi4iwmWoSbMQQPUL7c3Qze/wfEnJxtpMC32awNzo7QC06vNZ6xXz/bLZyHxmMGoiX93eSxXEyTFQB83ukQ==
-is-date-object@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
- integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=
+is-binary-path@~2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
+ integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
+ dependencies:
+ binary-extensions "^2.0.0"
is-extglob@^2.1.1:
version "2.1.1"
@@ -670,31 +767,27 @@ is-fullwidth-code-point@^2.0.0:
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
-is-glob@^4.0.0, is-glob@^4.0.1:
+is-fullwidth-code-point@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
+ integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
+
+is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
dependencies:
is-extglob "^2.1.1"
-is-promise@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
- integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=
-
-is-regex@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
- integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=
- dependencies:
- has "^1.0.1"
+is-number@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
+ integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
-is-symbol@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38"
- integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==
- dependencies:
- has-symbols "^1.0.0"
+is-plain-obj@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287"
+ integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==
isarray@~1.0.0:
version "1.0.0"
@@ -706,23 +799,31 @@ isexe@^2.0.0:
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
-jest-worker@^24.6.0:
- version "24.6.0"
- resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.6.0.tgz#7f81ceae34b7cde0c9827a6980c35b7cdc0161b3"
- integrity sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ==
+jest-worker@^26.2.1:
+ version "26.6.2"
+ resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed"
+ integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==
dependencies:
- merge-stream "^1.0.1"
- supports-color "^6.1.0"
+ "@types/node" "*"
+ merge-stream "^2.0.0"
+ supports-color "^7.0.0"
js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+js-yaml@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f"
+ integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==
+ dependencies:
+ argparse "^2.0.1"
+
js-yaml@^3.13.1:
- version "3.13.1"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
- integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
+ version "3.14.1"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
+ integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
@@ -732,172 +833,178 @@ json-schema-traverse@^0.4.1:
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
+json-schema-traverse@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
+ integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
+
json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
-levn@^0.3.0, levn@~0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
- integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=
+levn@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
+ integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==
dependencies:
- prelude-ls "~1.1.2"
- type-check "~0.3.2"
+ prelude-ls "^1.2.1"
+ type-check "~0.4.0"
-lodash@^4.17.12, lodash@^4.17.14:
- version "4.17.15"
- resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
- integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
+locate-path@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
+ integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==
+ dependencies:
+ p-locate "^5.0.0"
-merge-stream@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
- integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=
+lodash.clonedeep@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
+ integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
+
+lodash.merge@^4.6.2:
+ version "4.6.2"
+ resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
+ integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
+
+lodash.truncate@^4.4.2:
+ version "4.4.2"
+ resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
+ integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=
+
+log-symbols@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920"
+ integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==
dependencies:
- readable-stream "^2.0.1"
+ chalk "^4.0.0"
-mimic-fn@^1.0.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
- integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
+lru-cache@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
+ integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
+ dependencies:
+ yallist "^4.0.0"
+
+make-dir@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
+ integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==
+ dependencies:
+ semver "^6.0.0"
+
+merge-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
+ integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
mimic-response@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43"
integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==
-minimatch@^3.0.4:
+minimatch@3.0.4, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
dependencies:
brace-expansion "^1.1.7"
-minimist@0.0.8:
- version "0.0.8"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
- integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
-
-minimist@^1.2.0, minimist@^1.2.5:
- version "1.2.5"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
- integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
-
-minimist@~1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
- integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
-
-minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0:
- version "2.9.0"
- resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6"
- integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==
- dependencies:
- safe-buffer "^5.1.2"
- yallist "^3.0.0"
-
-minizlib@^1.2.1:
- version "1.3.3"
- resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d"
- integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==
- dependencies:
- minipass "^2.9.0"
-
-mkdirp@^0.5.0:
- version "0.5.5"
- resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
- integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
+minipass@^3.0.0:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd"
+ integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==
dependencies:
- minimist "^1.2.5"
+ yallist "^4.0.0"
-mkdirp@^0.5.1:
- version "0.5.1"
- resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
- integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
+minizlib@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931"
+ integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==
dependencies:
- minimist "0.0.8"
+ minipass "^3.0.0"
+ yallist "^4.0.0"
-ms@^2.1.1:
+mkdirp@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
+ integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
+
+mocha@8:
+ version "8.4.0"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.4.0.tgz#677be88bf15980a3cae03a73e10a0fc3997f0cff"
+ integrity sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==
+ dependencies:
+ "@ungap/promise-all-settled" "1.1.2"
+ ansi-colors "4.1.1"
+ browser-stdout "1.3.1"
+ chokidar "3.5.1"
+ debug "4.3.1"
+ diff "5.0.0"
+ escape-string-regexp "4.0.0"
+ find-up "5.0.0"
+ glob "7.1.6"
+ growl "1.10.5"
+ he "1.2.0"
+ js-yaml "4.0.0"
+ log-symbols "4.0.0"
+ minimatch "3.0.4"
+ ms "2.1.3"
+ nanoid "3.1.20"
+ serialize-javascript "5.0.1"
+ strip-json-comments "3.1.1"
+ supports-color "8.1.1"
+ which "2.0.2"
+ wide-align "1.1.3"
+ workerpool "6.1.0"
+ yargs "16.2.0"
+ yargs-parser "20.2.4"
+ yargs-unparser "2.0.0"
+
+ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
-mute-stream@0.0.7:
- version "0.0.7"
- resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
- integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
+ms@2.1.3:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
+ integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
nan@^2.14.0:
- version "2.14.1"
- resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01"
- integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==
+ version "2.14.2"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
+ integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
+
+nanoid@3.1.20:
+ version "3.1.20"
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788"
+ integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
-needle@^2.2.1:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/needle/-/needle-2.5.0.tgz#e6fc4b3cc6c25caed7554bd613a5cf0bac8c31c0"
- integrity sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA==
- dependencies:
- debug "^3.2.6"
- iconv-lite "^0.4.4"
- sax "^1.2.4"
+node-fetch@^2.6.1:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
+ integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
-nice-try@^1.0.4:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
- integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
-
-node-pre-gyp@^0.11.0:
- version "0.11.0"
- resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz#db1f33215272f692cd38f03238e3e9b47c5dd054"
- integrity sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==
- dependencies:
- detect-libc "^1.0.2"
- mkdirp "^0.5.1"
- needle "^2.2.1"
- nopt "^4.0.1"
- npm-packlist "^1.1.6"
- npmlog "^4.0.2"
- rc "^1.2.7"
- rimraf "^2.6.1"
- semver "^5.3.0"
- tar "^4"
-
-nopt@^4.0.1:
- version "4.0.3"
- resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48"
- integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==
+nopt@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88"
+ integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==
dependencies:
abbrev "1"
- osenv "^0.1.4"
-
-npm-bundled@^1.0.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b"
- integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==
- dependencies:
- npm-normalize-package-bin "^1.0.1"
-npm-normalize-package-bin@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2"
- integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==
-
-npm-packlist@^1.1.6:
- version "1.4.8"
- resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e"
- integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==
- dependencies:
- ignore-walk "^3.0.1"
- npm-bundled "^1.0.1"
- npm-normalize-package-bin "^1.0.1"
+normalize-path@^3.0.0, normalize-path@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
+ integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
-npmlog@^4.0.2:
+npmlog@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
@@ -917,16 +1024,6 @@ object-assign@^4.1.0:
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
-object-inspect@~1.6.0:
- version "1.6.0"
- resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b"
- integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==
-
-object-keys@^1.0.12:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
- integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
-
once@^1.3.0, once@^1.3.1:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
@@ -934,42 +1031,31 @@ once@^1.3.0, once@^1.3.1:
dependencies:
wrappy "1"
-onetime@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
- integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=
+optionator@^0.9.1:
+ version "0.9.1"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499"
+ integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==
dependencies:
- mimic-fn "^1.0.0"
+ deep-is "^0.1.3"
+ fast-levenshtein "^2.0.6"
+ levn "^0.4.1"
+ prelude-ls "^1.2.1"
+ type-check "^0.4.0"
+ word-wrap "^1.2.3"
-optionator@^0.8.2:
- version "0.8.2"
- resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
- integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=
+p-limit@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
+ integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
dependencies:
- deep-is "~0.1.3"
- fast-levenshtein "~2.0.4"
- levn "~0.3.0"
- prelude-ls "~1.1.2"
- type-check "~0.3.2"
- wordwrap "~1.0.0"
+ yocto-queue "^0.1.0"
-os-homedir@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
- integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
-
-os-tmpdir@^1.0.0, os-tmpdir@~1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
- integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
-
-osenv@^0.1.4:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
- integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
+p-locate@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834"
+ integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==
dependencies:
- os-homedir "^1.0.0"
- os-tmpdir "^1.0.0"
+ p-limit "^3.0.2"
parent-module@^1.0.0:
version "1.0.1"
@@ -978,25 +1064,30 @@ parent-module@^1.0.0:
dependencies:
callsites "^3.0.0"
+path-exists@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
+ integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
+
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
-path-key@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
- integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
+path-key@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
+ integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
-path-parse@^1.0.6:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
- integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
+picomatch@^2.0.4, picomatch@^2.2.1:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
+ integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
-prelude-ls@~1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
- integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
+prelude-ls@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
+ integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
process-nextick-args@~2.0.0:
version "2.0.1"
@@ -1013,28 +1104,12 @@ punycode@^2.1.0:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
-rc@^1.2.7:
- version "1.2.8"
- resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
- integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
+randombytes@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
+ integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==
dependencies:
- deep-extend "^0.6.0"
- ini "~1.3.0"
- minimist "^1.2.0"
- strip-json-comments "~2.0.1"
-
-readable-stream@^2.0.1:
- version "2.3.6"
- resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
- integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==
- dependencies:
- core-util-is "~1.0.0"
- inherits "~2.0.3"
- isarray "~1.0.0"
- process-nextick-args "~2.0.0"
- safe-buffer "~5.1.1"
- string_decoder "~1.1.1"
- util-deprecate "~1.0.1"
+ safe-buffer "^5.1.0"
readable-stream@^2.0.6:
version "2.3.7"
@@ -1049,94 +1124,58 @@ readable-stream@^2.0.6:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
-regexpp@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
- integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==
+readdirp@~3.5.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e"
+ integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==
+ dependencies:
+ picomatch "^2.2.1"
+
+regexpp@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2"
+ integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==
+
+require-directory@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+ integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
+
+require-from-string@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
+ integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
resolve-from@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
-resolve@~1.11.1:
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e"
- integrity sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==
- dependencies:
- path-parse "^1.0.6"
-
-restore-cursor@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
- integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368=
- dependencies:
- onetime "^2.0.0"
- signal-exit "^3.0.2"
-
-resumer@~0.0.0:
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759"
- integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=
- dependencies:
- through "~2.3.4"
-
-rimraf@2.6.3:
- version "2.6.3"
- resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
- integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
- dependencies:
- glob "^7.1.3"
-
-rimraf@^2.6.1:
- version "2.7.1"
- resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
- integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
+rimraf@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
+ integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
dependencies:
glob "^7.1.3"
-rollup-plugin-terser@5:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-5.1.1.tgz#e9d2545ec8d467f96ba99b9216d2285aad8d5b66"
- integrity sha512-McIMCDEY8EU6Y839C09UopeRR56wXHGdvKKjlfiZG/GrP6wvZQ62u2ko/Xh1MNH2M9WDL+obAAHySljIZYCuPQ==
- dependencies:
- "@babel/code-frame" "^7.0.0"
- jest-worker "^24.6.0"
- rollup-pluginutils "^2.8.1"
- serialize-javascript "^1.7.0"
- terser "^4.1.0"
-
-rollup-pluginutils@^2.8.1:
- version "2.8.1"
- resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz#8fa6dd0697344938ef26c2c09d2488ce9e33ce97"
- integrity sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==
- dependencies:
- estree-walker "^0.6.1"
-
-rollup@1:
- version "1.17.0"
- resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.17.0.tgz#47ee8b04514544fc93b39bae06271244c8db7dfa"
- integrity sha512-k/j1m0NIsI4SYgCJR4MWPstGJOWfJyd6gycKoMhyoKPVXxm+L49XtbUwZyFsrSU2YXsOkM4u1ll9CS/ZgJBUpw==
- dependencies:
- "@types/estree" "0.0.39"
- "@types/node" "^12.6.2"
- acorn "^6.2.0"
-
-run-async@^2.2.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
- integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA=
+rollup-plugin-terser@7:
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d"
+ integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==
dependencies:
- is-promise "^2.1.0"
+ "@babel/code-frame" "^7.10.4"
+ jest-worker "^26.2.1"
+ serialize-javascript "^4.0.0"
+ terser "^5.0.0"
-rxjs@^6.4.0:
- version "6.5.2"
- resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7"
- integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==
- dependencies:
- tslib "^1.9.0"
+rollup@2:
+ version "2.50.6"
+ resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.50.6.tgz#24e2211caf9031081656e98a5e5e94d3b5e786e2"
+ integrity sha512-6c5CJPLVgo0iNaZWWliNu1Kl43tjP9LZcp6D/tkf2eLH2a9/WeHxg9vfTFl8QV/2SOyaJX37CEm9XuGM0rviUg==
+ optionalDependencies:
+ fsevents "~2.3.1"
-safe-buffer@^5.1.2:
+safe-buffer@^5.1.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
@@ -1146,67 +1185,58 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1:
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
-"safer-buffer@>= 2.1.2 < 3":
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
- integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
-
-sax@^1.2.4:
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
- integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
-
-semver@^5.3.0:
- version "5.7.1"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
- integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
-
-semver@^5.5.0:
- version "5.7.0"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
- integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
-
-semver@^6.1.2:
+semver@^6.0.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
-serialize-javascript@^1.7.0:
- version "1.7.0"
- resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65"
- integrity sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==
+semver@^7.2.1, semver@^7.3.4:
+ version "7.3.5"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
+ integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
+ dependencies:
+ lru-cache "^6.0.0"
+
+serialize-javascript@5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4"
+ integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==
+ dependencies:
+ randombytes "^2.1.0"
+
+serialize-javascript@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa"
+ integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==
+ dependencies:
+ randombytes "^2.1.0"
set-blocking@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
-shebang-command@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
- integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
+shebang-command@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
+ integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
dependencies:
- shebang-regex "^1.0.0"
+ shebang-regex "^3.0.0"
-shebang-regex@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
- integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
+shebang-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
+ integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
signal-exit@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
-signal-exit@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
- integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
-
simple-concat@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6"
- integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f"
+ integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==
simple-get@^3.0.3:
version "3.1.0"
@@ -1217,28 +1247,33 @@ simple-get@^3.0.3:
once "^1.3.1"
simple-concat "^1.0.0"
-slice-ansi@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"
- integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==
+slice-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"
+ integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==
dependencies:
- ansi-styles "^3.2.0"
- astral-regex "^1.0.0"
- is-fullwidth-code-point "^2.0.0"
+ ansi-styles "^4.0.0"
+ astral-regex "^2.0.0"
+ is-fullwidth-code-point "^3.0.0"
-source-map-support@~0.5.12:
- version "0.5.12"
- resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599"
- integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==
+source-map-support@~0.5.19:
+ version "0.5.19"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
+ integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
-source-map@^0.6.0, source-map@~0.6.1:
+source-map@^0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+source-map@~0.7.2:
+ version "0.7.3"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
+ integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
+
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
@@ -1253,7 +1288,7 @@ string-width@^1.0.1:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
-"string-width@^1.0.2 || 2", string-width@^2.1.0:
+"string-width@^1.0.2 || 2":
version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
@@ -1261,23 +1296,14 @@ string-width@^1.0.1:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"
-string-width@^3.0.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
- integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
- dependencies:
- emoji-regex "^7.0.1"
- is-fullwidth-code-point "^2.0.0"
- strip-ansi "^5.1.0"
-
-string.prototype.trim@~1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea"
- integrity sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=
+string-width@^4.1.0, string-width@^4.2.0:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5"
+ integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==
dependencies:
- define-properties "^1.1.2"
- es-abstract "^1.5.0"
- function-bind "^1.0.2"
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^6.0.0"
string_decoder@~1.1.1:
version "1.1.1"
@@ -1300,22 +1326,24 @@ strip-ansi@^4.0.0:
dependencies:
ansi-regex "^3.0.0"
-strip-ansi@^5.1.0, strip-ansi@^5.2.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
- integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
+strip-ansi@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
+ integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
dependencies:
- ansi-regex "^4.1.0"
+ ansi-regex "^5.0.0"
-strip-json-comments@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
- integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==
+strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
+ integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
-strip-json-comments@~2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
- integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
+supports-color@8.1.1:
+ version "8.1.1"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c"
+ integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==
+ dependencies:
+ has-flag "^4.0.0"
supports-color@^5.3.0:
version "5.5.0"
@@ -1324,104 +1352,81 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"
-supports-color@^6.1.0:
+supports-color@^7.0.0, supports-color@^7.1.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
+ integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
+ dependencies:
+ has-flag "^4.0.0"
+
+table@^6.0.9:
+ version "6.7.1"
+ resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2"
+ integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==
+ dependencies:
+ ajv "^8.0.1"
+ lodash.clonedeep "^4.5.0"
+ lodash.truncate "^4.4.2"
+ slice-ansi "^4.0.0"
+ string-width "^4.2.0"
+ strip-ansi "^6.0.0"
+
+tar@^6.1.0:
version "6.1.0"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3"
- integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==
+ resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.0.tgz#d1724e9bcc04b977b18d5c573b333a2207229a83"
+ integrity sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==
dependencies:
- has-flag "^3.0.0"
+ chownr "^2.0.0"
+ fs-minipass "^2.0.0"
+ minipass "^3.0.0"
+ minizlib "^2.1.1"
+ mkdirp "^1.0.3"
+ yallist "^4.0.0"
-table@^5.2.3:
- version "5.4.4"
- resolved "https://registry.yarnpkg.com/table/-/table-5.4.4.tgz#6e0f88fdae3692793d1077fd172a4667afe986a6"
- integrity sha512-IIfEAUx5QlODLblLrGTTLJA7Tk0iLSGBvgY8essPRVNGHAzThujww1YqHLs6h3HfTg55h++RzLHH5Xw/rfv+mg==
- dependencies:
- ajv "^6.10.2"
- lodash "^4.17.14"
- slice-ansi "^2.1.0"
- string-width "^3.0.0"
-
-tape@4:
- version "4.11.0"
- resolved "https://registry.yarnpkg.com/tape/-/tape-4.11.0.tgz#63d41accd95e45a23a874473051c57fdbc58edc1"
- integrity sha512-yixvDMX7q7JIs/omJSzSZrqulOV51EC9dK8dM0TzImTIkHWfe2/kFyL5v+d9C+SrCMaICk59ujsqFAVidDqDaA==
- dependencies:
- deep-equal "~1.0.1"
- defined "~1.0.0"
- for-each "~0.3.3"
- function-bind "~1.1.1"
- glob "~7.1.4"
- has "~1.0.3"
- inherits "~2.0.4"
- minimist "~1.2.0"
- object-inspect "~1.6.0"
- resolve "~1.11.1"
- resumer "~0.0.0"
- string.prototype.trim "~1.1.2"
- through "~2.3.8"
-
-tar@^4:
- version "4.4.13"
- resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
- integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
- dependencies:
- chownr "^1.1.1"
- fs-minipass "^1.2.5"
- minipass "^2.8.6"
- minizlib "^1.2.1"
- mkdirp "^0.5.0"
- safe-buffer "^5.1.2"
- yallist "^3.0.3"
-
-terser@^4.1.0:
- version "4.1.2"
- resolved "https://registry.yarnpkg.com/terser/-/terser-4.1.2.tgz#b2656c8a506f7ce805a3f300a2ff48db022fa391"
- integrity sha512-jvNoEQSPXJdssFwqPSgWjsOrb+ELoE+ILpHPKXC83tIxOlh2U75F1KuB2luLD/3a6/7K3Vw5pDn+hvu0C4AzSw==
+terser@^5.0.0:
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.0.tgz#a761eeec206bc87b605ab13029876ead938ae693"
+ integrity sha512-HP5/9hp2UaZt5fYkuhNBR8YyRcT8juw8+uFbAme53iN9hblvKnLUTKkmwJG6ocWpIKf8UK4DoeWG4ty0J6S6/g==
dependencies:
commander "^2.20.0"
- source-map "~0.6.1"
- source-map-support "~0.5.12"
+ source-map "~0.7.2"
+ source-map-support "~0.5.19"
text-table@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
-through@^2.3.6, through@~2.3.4, through@~2.3.8:
- version "2.3.8"
- resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
- integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
-
-tmp@^0.0.33:
- version "0.0.33"
- resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
- integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
+to-regex-range@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
+ integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
dependencies:
- os-tmpdir "~1.0.2"
+ is-number "^7.0.0"
topojson-client@3:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/topojson-client/-/topojson-client-3.0.0.tgz#1f99293a77ef42a448d032a81aa982b73f360d2f"
- integrity sha1-H5kpOnfvQqRI0DKoGqmCtz82DS8=
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/topojson-client/-/topojson-client-3.1.0.tgz#22e8b1ed08a2b922feeb4af6f53b6ef09a467b99"
+ integrity sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==
dependencies:
commander "2"
-tslib@^1.9.0:
- version "1.10.0"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
- integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
-
-type-check@~0.3.2:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
- integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=
+type-check@^0.4.0, type-check@~0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
+ integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==
dependencies:
- prelude-ls "~1.1.2"
+ prelude-ls "^1.2.1"
+
+type-fest@^0.20.2:
+ version "0.20.2"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
+ integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
uri-js@^4.2.2:
- version "4.2.2"
- resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
- integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
+ version "4.4.1"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
+ integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
dependencies:
punycode "^2.1.0"
@@ -1431,47 +1436,97 @@ util-deprecate@~1.0.1:
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
v8-compile-cache@^2.0.3:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe"
- integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
+ integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
-which@^1.2.9:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
- integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
+which@2.0.2, which@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
+ integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
dependencies:
isexe "^2.0.0"
-wide-align@^1.1.0:
+wide-align@1.1.3, wide-align@^1.1.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==
dependencies:
string-width "^1.0.2 || 2"
-wordwrap@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
- integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
+word-wrap@^1.2.3:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
+ integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
+
+workerpool@6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b"
+ integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==
world-atlas@1:
version "1.1.4"
resolved "https://registry.yarnpkg.com/world-atlas/-/world-atlas-1.1.4.tgz#0f53c44f31b66daa245cf673ccfab5c338903682"
integrity sha1-D1PETzG2baokXPZzzPq1wziQNoI=
+wrap-ansi@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
+ integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
+ dependencies:
+ ansi-styles "^4.0.0"
+ string-width "^4.1.0"
+ strip-ansi "^6.0.0"
+
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
-write@1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3"
- integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==
- dependencies:
- mkdirp "^0.5.1"
+y18n@^5.0.5:
+ version "5.0.8"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
+ integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
-yallist@^3.0.0, yallist@^3.0.3:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
- integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
+yallist@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
+ integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
+
+yargs-parser@20.2.4:
+ version "20.2.4"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54"
+ integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==
+
+yargs-parser@^20.2.2:
+ version "20.2.7"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a"
+ integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==
+
+yargs-unparser@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb"
+ integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==
+ dependencies:
+ camelcase "^6.0.0"
+ decamelize "^4.0.0"
+ flat "^5.0.2"
+ is-plain-obj "^2.1.0"
+
+yargs@16.2.0:
+ version "16.2.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
+ integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
+ dependencies:
+ cliui "^7.0.2"
+ escalade "^3.1.1"
+ get-caller-file "^2.0.5"
+ require-directory "^2.1.1"
+ string-width "^4.2.0"
+ y18n "^5.0.5"
+ yargs-parser "^20.2.2"
+
+yocto-queue@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
+ integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==