Skip to content

Commit 8d9f4d1

Browse files
authored
mocha (#295)
* mocha * drop Node 12.x from CI
1 parent 1f19ea7 commit 8d9f4d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1159
-2892
lines changed

.eslintrc.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
"extends": "eslint:recommended",
33
"parserOptions": {
44
"sourceType": "module",
5-
"ecmaVersion": 8
5+
"ecmaVersion": 2020
66
},
77
"env": {
8-
"browser": true,
98
"es6": true,
10-
"node": true
9+
"node": true,
10+
"browser": true
1111
},
1212
"rules": {
13-
"semi": 2,
14-
"no-process-env": 2,
1513
"no-cond-assign": 0,
16-
"no-redeclare": 0
14+
"no-constant-condition": 0,
15+
"no-sparse-arrays": 0,
16+
"no-unexpected-multiline": 0,
17+
"comma-dangle": ["error", "never"],
18+
"semi": [2, "always"]
1719
}
1820
}

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
fail-fast: false
99
matrix:
1010
os: [ubuntu-latest]
11-
node-version: [12.x, 14.x, 16.x]
11+
node-version: [14.x, 16.x]
1212

1313
runs-on: ${{ matrix.os }}
1414

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"bracketSpacing": false
2+
"bracketSpacing": false,
3+
"trailingComma": "none"
34
}

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "3.19.5",
44
"license": "ISC",
55
"main": "dist/stdlib.js",
6-
"module": "src/index.js",
6+
"module": "src/index.mjs",
77
"author": {
88
"name": "Observable, Inc.",
99
"url": "https://observablehq.com"
@@ -13,25 +13,25 @@
1313
"url": "https://github.com/observablehq/stdlib.git"
1414
},
1515
"scripts": {
16-
"test": "tap 'test/**/*-test.js' --reporter classic",
16+
"test": "mocha 'test/**/*-test.mjs' && eslint src test --ext mjs",
1717
"prepublishOnly": "rollup -c",
1818
"postpublish": "git push && git push --tags"
1919
},
2020
"files": [
21-
"src/**/*.js",
21+
"src/**/*.mjs",
2222
"dist/**/*.js"
2323
],
2424
"dependencies": {
2525
"d3-dsv": "^2.0.0",
2626
"d3-require": "^1.3.0"
2727
},
2828
"devDependencies": {
29-
"eslint": "^7.18.0",
29+
"@rollup/plugin-node-resolve": "^13.3.0",
30+
"eslint": "^8.18.0",
3031
"exceljs": "^4.3.0",
32+
"mocha": "^10.0.0",
3133
"node-fetch": "^2.6.1",
3234
"rollup": "^2.37.1",
33-
"rollup-plugin-node-resolve": "^5.2.0",
34-
"rollup-plugin-terser": "^7.0.2",
35-
"tap": "^14.11.0"
35+
"rollup-plugin-terser": "^7.0.2"
3636
}
3737
}

rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import node from "rollup-plugin-node-resolve";
1+
import node from "@rollup/plugin-node-resolve";
22
import {terser} from "rollup-plugin-terser";
33
import * as meta from "./package.json";
44

55
const copyright = `// @observablehq/stdlib v${meta.version} Copyright ${(new Date).getFullYear()} Observable, Inc.`;
66

77
export default [
88
{
9-
input: "src/index.js",
9+
input: "src/index.mjs",
1010
plugins: [
1111
node(),
1212
terser({

src/dependencies.js renamed to src/dependencies.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import dependency from "./dependency.js";
1+
import dependency from "./dependency.mjs";
22
export const d3 = dependency("d3", "7.5.0", "dist/d3.min.js");
33
export const inputs = dependency("@observablehq/inputs", "0.10.4", "dist/inputs.min.js");
44
export const plot = dependency("@observablehq/plot", "0.5.1", "dist/plot.umd.min.js");
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)