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
7 changes: 0 additions & 7 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 2015-2022 Mike Bostock
Copyright 2015-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 @@ This module provides a common API for drawing in SVG and canvas.
## Resources

- [Documentation](https://d3js.org/d3-path)
- [Examples](https://observablehq.com/collection/@d3/d3-path)
- [Examples](https://observablehq.com/@d3/-/collection/d3-path)
- [Releases](https://github.com/d3/d3-path/releases)
- [Getting help](https://d3js.org/community)
11 changes: 11 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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"}},
{files: ["rollup.config.js"], languageOptions: {ecmaVersion: 2026}}
]);
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d3-path",
"version": "3.1.0",
"version": "3.1.1",
"description": "Serialize Canvas path commands to SVG.",
"homepage": "https://d3js.org/d3-path/",
"repository": {
Expand All @@ -26,27 +26,30 @@
"type": "module",
"files": [
"dist/**/*.js",
"src/**/*.js"
"dist/**/*.mjs"
],
"module": "src/index.js",
"main": "src/index.js",
"module": "dist/d3-path.mjs",
"main": "dist/d3-path.mjs",
"jsdelivr": "dist/d3-path.min.js",
"unpkg": "dist/d3-path.min.js",
"exports": {
"umd": "./dist/d3-path.min.js",
"default": "./src/index.js"
"default": "./dist/d3-path.mjs"
},
"sideEffects": false,
"devDependencies": {
"eslint": "8",
"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",
"eslint": "^10.14.0",
"globals": "^17.14.0",
"rollup": "^4.67.4",
"vitest": "^5.1.0"
},
"scripts": {
"test": "mocha 'test/**/*-test.js' && eslint src test",
"prepublishOnly": "rm -rf dist && yarn test && 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