Skip to content

Commit

Permalink
Adopt type=module
Browse files Browse the repository at this point in the history
follow changes in d3-format:
* type=module
* add exports
* remove zip
* update dependencies
  • Loading branch information
Fil committed Apr 26, 2021
1 parent 4e33937 commit ce37643
Show file tree
Hide file tree
Showing 8 changed files with 758 additions and 854 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.json
Expand Up @@ -5,9 +5,7 @@
"ecmaVersion": 8
},
"env": {
"es6": true,
"node": true,
"browser": true
"es6": true
},
"rules": {
"no-cond-assign": 0,
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/node.js.yml
Expand Up @@ -4,9 +4,9 @@ name: Node.js CI

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
build:
Expand All @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [14.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright 2018 Observable, Inc.
Copyright 2018-2021 Observable, Inc.

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
Expand Down
45 changes: 26 additions & 19 deletions package.json
@@ -1,27 +1,22 @@
{
"name": "d3-delaunay",
"version": "5.3.0",
"type": "module",
"description": "Compute the Voronoi diagram of a set of two-dimensional points.",
"keywords": [
"voronoi",
"delaunay",
"geometry"
],
"homepage": "https://github.com/d3/d3-delaunay",
"repository": {
"type": "git",
"url": "https://github.com/d3/d3-delaunay.git"
},
"keywords": [
"voronoi",
"delaunay",
"geometry"
],
"license": "ISC",
"author": {
"name": "Mike Bostock",
"url": "https://bost.ocks.org/mike"
},
"files": [
"dist/**/*.js",
"src/**/*.js"
],
"contributors": [
{
"name": "Vladimir Agafonkin",
Expand All @@ -32,24 +27,36 @@
"url": "https://visionscarto.net"
}
],
"main": "dist/d3-delaunay.js",
"unpkg": "dist/d3-delaunay.min.js",
"type": "module",
"files": [
"dist/**/*.js",
"src/**/*.js"
],
"module": "src/index.js",
"main": "src/index.js",
"jsdelivr": "dist/d3-delaunay.min.js",
"unpkg": "dist/d3-delaunay.min.js",
"exports": {
"umd": "./dist/d3-delaunay.min.js",
"default": "./src/index.js"
},
"sideEffects": false,
"dependencies": {
"delaunator": "5"
},
"sideEffects": false,
"devDependencies": {
"@observablehq/tape": "~0.0.1",
"eslint": "6",
"eslint": "7",
"esm": "3",
"mocha": "8",
"rollup": "1",
"rollup-plugin-node-resolve": "5",
"rollup-plugin-terser": "5"
},
"scripts": {
"test": "node 'test/delaunay-test.js' && node 'test/voronoi-test.js' && eslint src test",
"prepublishOnly": "yarn test && rm -rf dist && rollup -c",
"postpublish": "git push && git push --tags && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js"
"test": "mocha 'test/**/*-test.js' && eslint src test",
"prepublishOnly": "rm -rf dist && yarn test && rollup -c",
"postpublish": "git push && git push --tags"
},
"engines": {
"node": ">=12"
}
}
15 changes: 15 additions & 0 deletions test/.eslintrc.json
@@ -0,0 +1,15 @@
{
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 8
},
"env": {
"es6": true,
"mocha": true
},
"rules": {
"no-cond-assign": 0,
"no-constant-condition": 0
}
}

0 comments on commit ce37643

Please sign in to comment.