Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .eslintrc.json

This file was deleted.

18 changes: 0 additions & 18 deletions .github/eslint.json

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/node.js.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish

on:
workflow_dispatch: {}
release:
types: [published]

permissions:
id-token: write
contents: read

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 10
- uses: actions/setup-node@v7
with:
node-version: 24
cache: pnpm
- run: pnpm install
- run: pnpm run test
- run: pnpm run lint
- run: npm publish
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

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

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 10
- uses: actions/setup-node@v7
with:
node-version: 24
cache: pnpm
- run: pnpm install
- run: pnpm run test
- run: pnpm run lint
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2010-2023 Mike Bostock
Copyright 2010-2026 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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Array manipulation, ordering, searching, summarizing, etc.
## Resources

- [Documentation](https://d3js.org/d3-array)
- [Examples](https://observablehq.com/collection/@d3/d3-array)
- [Examples](https://observablehq.com/@d3/-/collection/d3-array)
- [Releases](https://github.com/d3/d3-array/releases)
- [Getting help](https://d3js.org/community)
13 changes: 13 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import js from "@eslint/js";
import globals from "globals";
import {defineConfig} from "eslint/config";

export default defineConfig([
{ignores: ["dist/"]},
{files: ["**/*.{js,ts}"], plugins: {js}, extends: ["js/recommended"]},
{files: ["src/**/*.{js,ts}"], languageOptions: {globals: globals.browser}},
{languageOptions: {ecmaVersion: 2019, sourceType: "module"}},
{rules: {"no-cond-assign": 0, "no-constant-condition": 0}},
{files: ["test/**/*.js"], rules: {"no-sparse-arrays": 0}},
{files: ["rollup.config.js"], languageOptions: {ecmaVersion: 2026}}
]);
Binary file removed img/histogram.png
Binary file not shown.
34 changes: 18 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d3-array",
"version": "3.2.4",
"version": "3.2.5",
"description": "Array manipulation, ordering, searching, summarizing, etc.",
"homepage": "https://d3js.org/d3-array/",
"repository": {
Expand All @@ -26,34 +26,36 @@
"type": "module",
"files": [
"dist/**/*.js",
"src/**/*.js"
"dist/**/*.mjs"
],
"module": "src/index.js",
"main": "src/index.js",
"module": "dist/d3-array.mjs",
"main": "dist/d3-array.mjs",
"jsdelivr": "dist/d3-array.min.js",
"unpkg": "dist/d3-array.min.js",
"exports": {
"umd": "./dist/d3-array.min.js",
"default": "./src/index.js"
"default": "./dist/d3-array.mjs"
},
"sideEffects": false,
"dependencies": {
"internmap": "1 - 2"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "15",
"d3-dsv": "3",
"d3-random": "2 - 3",
"eslint": "8",
"jsdom": "21",
"mocha": "10",
"rollup": "3",
"rollup-plugin-terser": "7"
"@eslint/js": "^10.0.1",
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-terser": "^1.0.2",
"d3-dsv": "^3.0.1",
"d3-random": "^3.0.2",
"eslint": "^10.14.0",
"globals": "^17.14.0",
"jsdom": "^21.1.2",
"rollup": "^4.67.4",
"vitest": "^5.1.0"
},
"scripts": {
"test": "mocha 'test/**/*-test.js' && eslint src test",
"prepublishOnly": "rm -rf dist && rollup -c",
"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 -"
"test": "vitest",
"lint": "eslint",
"prepublishOnly": "rm -rf dist && rollup -c"
},
"engines": {
"node": ">=12"
Expand Down
Loading
Loading