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
28 changes: 14 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ on:
release:
types: [published]

permissions:
id-token: write
contents: read

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 10
- uses: actions/setup-node@v7
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: yarn test
- run: yarn lint
- run: yarn build
node-version: 24
cache: pnpm
- run: pnpm install
- run: pnpm run test
- run: pnpm run lint
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
19 changes: 11 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn test
- run: yarn lint
- 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-2024 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 @@ This module implements a convenient API for calendar math, allowing to work with
## Resources

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

export default [
js.configs.recommended,
{
files: ["test/**/*"],
languageOptions: {
globals: globals.mocha
}
}
];
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}}
]);
28 changes: 15 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d3-time",
"version": "3.1.0",
"version": "3.1.1",
"description": "A calculator for humanity’s peculiar conventions of time.",
"homepage": "https://d3js.org/d3-time/",
"repository": {
Expand All @@ -22,31 +22,33 @@
"type": "module",
"files": [
"dist/**/*.js",
"src/**/*.js"
"dist/**/*.mjs"
],
"module": "src/index.js",
"main": "src/index.js",
"module": "dist/d3-time.mjs",
"main": "dist/d3-time.mjs",
"jsdelivr": "dist/d3-time.min.js",
"unpkg": "dist/d3-time.min.js",
"exports": {
"umd": "./dist/d3-time.min.js",
"default": "./src/index.js"
"default": "./dist/d3-time.mjs"
},
"sideEffects": false,
"dependencies": {
"d3-array": "2 - 3"
},
"devDependencies": {
"@rollup/plugin-terser": "^0.4.4",
"eslint": "^9.4.0",
"globals": "^15.3.0",
"mocha": "^10.4.0",
"rollup": "^4.18.0"
"@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": "TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test",
"lint": "eslint src test",
"build": "rm -rf dist && rollup -c"
"test": "TZ=America/Los_Angeles vitest",
"lint": "eslint",
"prepublishOnly": "rm -rf dist && rollup -c"
},
"engines": {
"node": ">=12"
Expand Down
Loading
Loading