From 0cefcc328210e0546925ea62209e7fb9f6cdd00a Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 15:58:22 -0800 Subject: [PATCH 1/9] es bundle, pnpm Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish.yml | 27 +- .github/workflows/test.yml | 18 +- LICENSE | 2 +- README.md | 2 +- package.json | 22 +- pnpm-lock.yaml | 1602 +++++++++++++++++++++++++++++++++ rollup.config.js | 82 +- yarn.lock | 1177 ------------------------ 8 files changed, 1694 insertions(+), 1238 deletions(-) create mode 100644 pnpm-lock.yaml delete mode 100644 yarn.lock diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b15a6c2..839d5c5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,23 +5,22 @@ 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: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3175b1e..00a5a94 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,11 +10,13 @@ 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 diff --git a/LICENSE b/LICENSE index 088e458..a8918c4 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/README.md b/README.md index 3ab4fe9..49fcb4b 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/package.json b/package.json index 5cd05e0..e7d4709 100644 --- a/package.json +++ b/package.json @@ -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": "^9.39.5", + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-terser": "^1.0.2", + "eslint": "^9.39.5", + "globals": "^15.15.0", + "mocha": "^10.8.2", + "rollup": "^4.67.4" }, "scripts": { "test": "TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test", "lint": "eslint src test", - "build": "rm -rf dist && rollup -c" + "prepublishOnly": "rm -rf dist && rollup -c" }, "engines": { "node": ">=12" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..faef5ac --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,1602 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + d3-array: + specifier: 2 - 3 + version: 3.2.4 + devDependencies: + '@eslint/js': + specifier: ^9.39.5 + version: 9.39.5 + '@rollup/plugin-node-resolve': + specifier: ^16.0.3 + version: 16.0.3(rollup@4.67.4) + '@rollup/plugin-terser': + specifier: ^1.0.2 + version: 1.0.2(rollup@4.67.4) + eslint: + specifier: ^9.39.5 + version: 9.39.5 + globals: + specifier: ^15.15.0 + version: 15.15.0 + mocha: + specifier: ^10.8.2 + version: 10.8.2 + rollup: + specifier: ^4.67.4 + version: 4.67.4 + +packages: + + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.21.2': + resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.4.2': + resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.17.0': + resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.7': + resolution: {integrity: sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.39.5': + resolution: {integrity: sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.1': + resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.11': + resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} + engines: {node: ^22.20 || ^24.12 || >=25} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rollup/plugin-node-resolve@16.0.3': + resolution: {integrity: sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-terser@1.0.2': + resolution: {integrity: sha512-+UihHnuLnQDQ/9wog7ym+7oawCXkjTIo0WwkK7s//0mkktTN0VhYk6fGVxH+NtGzW064w5RCGgreMDxRVhHCzw==} + engines: {node: '>=20.0.0'} + peerDependencies: + rollup: ^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/pluginutils@5.5.1': + resolution: {integrity: sha512-P9ZvnfouRu4MSC+ilERaw6FmZs8zqKhpHxEs4aGDGWQAMzQGXnhvCSvoNwokfNvdt7t3Y5Y4p6gStQgezeIqug==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/rollup-android-arm-eabi@4.67.4': + resolution: {integrity: sha512-/v/pUAPOcwp+r1Hjjdg0cBV1TE89CzGKrKh2FgkIQw2QBcIMmVPOCSfuOZStCn4Xh/98HXfo/ht6ztcssctPNg==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.67.4': + resolution: {integrity: sha512-6tmmB/P52Vt167FXXEw5auiEUgTtZz7aqUgWHqYXToIUE0HFDY6fTdAyeekjjsNk6O/8dtpSKtClxSj1mMneKQ==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-android-x64@4.67.4': + resolution: {integrity: sha512-8Z9Q4RmotVmuL4llOvqX814JNiOK1oqoBv+glG5KbpRfUiypqzz2/fxIzK4Pq129l4dT5a8Gszmpc0/XPYoFuQ==} + cpu: [x64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.67.4': + resolution: {integrity: sha512-pnq6hssxTtwuRAl6Kdi/+IDY+b1IhkUetjhUkdLAAJCssjfqtL2Oqy/FXJVJFtAWOu1oRlArIvf0Yk1O92x2HQ==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.67.4': + resolution: {integrity: sha512-BeIrGZvHMVdJg/N+ohZfFywG/gF41684YhDj2wBvouj7m9ziP1tZDUNwzXRiDY+3WIKngaC4hiUBqVtBPGP5og==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.67.4': + resolution: {integrity: sha512-fRFX/oqNg/g780DKoS8RIfYcZD59Ru5O/bSeK1N7gQljBFrTxJY/q5EX4eMs5SrJf32VgVBVVYCdfPpzAwPPnQ==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.67.4': + resolution: {integrity: sha512-bSrBRopG1q+0RuOsW0NtYTtIODlvNA3T3ebx5WnQVdSxWIoXFmj+rZdHUHdSLgFdZ5M6VGmekYE7r4RMGQXjfg==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.67.4': + resolution: {integrity: sha512-L8IvdrJVtl65g1ozwDSyjGPG+FmibhCdFUwmqTItJLw0S3+Oj4QzFs7rfgTUiK7rsPjkCLdG1/GApFxoynXFJQ==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm-musleabihf@4.67.4': + resolution: {integrity: sha512-h7PcoQOzC31jshNpQ48J0akB9tsghjkSjSl5AZ6XsVGTxVsln7t7C4SQyw62tNVSaz2SeHgk4VT2ELbL17BSHQ==} + cpu: [arm] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-arm64-gnu@4.67.4': + resolution: {integrity: sha512-KSPuOBNHoOl7AsVjeY1KZci8+0up0U4TFAHU5IzBYN8P+Z6cB9DZq28+JQycZW7f6WLLa/tSzhV7Rdy95bVi+g==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm64-musl@4.67.4': + resolution: {integrity: sha512-0E/mKmVk1PlQeQYygIwQm0jlwjANTzGSiNBMPrFx+rdFGFj/2Axh4p6XwcrystQIqXZVudTaGsdbDpzYgJ4wSA==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-loong64-gnu@4.67.4': + resolution: {integrity: sha512-Fvw7dOSc2Sa9UOipRZVI0zOgdLCzsjVyD/6JuHXzUHTXFu7mMgmeX/0/bCVBIut1dz+nWz3pV4WpS/Qg0XVnxw==} + cpu: [loong64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-loong64-musl@4.67.4': + resolution: {integrity: sha512-jzxbVHaE7V3F+P0wEK7UydQtvv7Twfdtx58jI5/3VRx1jJxyrn+qFwfXmqjVFxPhBl+zjaRs+ZJMFJw7vdHaQA==} + cpu: [loong64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-ppc64-gnu@4.67.4': + resolution: {integrity: sha512-fhtrzp9p4GjEJVaigaap9g6X9nP6xgJtKiLLXSDgpE18HXufA5aqfltGn+KAqMtVZReJZfOrXm//y5YSA9BWbA==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-ppc64-musl@4.67.4': + resolution: {integrity: sha512-uynaF7IUHwAckV0S+yC1f5esy9gB+aqCBsPH5BOck32TYdCuAn2lVG5tvUcFnEsrviGEmRZxE1NHSOieUPYJEg==} + cpu: [ppc64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-riscv64-gnu@4.67.4': + resolution: {integrity: sha512-uaqRFdfb8eIa2bVHN/FE3ndCvR0zV2xv0AwjCfxrqSu6l6fp/54VhjfhslKlf2RIik9L1jwlt4E56PeVX6tQtQ==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-riscv64-musl@4.67.4': + resolution: {integrity: sha512-JZRow7kmxUDEASnxHuVG5itTm+nTXi9BQUABcVUnUEngC+OPwMrpx1uJ9hIA/v+IcAEBL52ktCSPXk5OJn9Jqg==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-s390x-gnu@4.67.4': + resolution: {integrity: sha512-rdrh4e+Lq9fCNKoDPaCqeHXbQCe7yl77Ukl45tlSClwYdZ1gpFGZz1XLJdYtY++FRlfL5aHvb6/0n3GDW/Nxsw==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-gnu@4.67.4': + resolution: {integrity: sha512-wL7MS4r0fYcxluF3ne2plofHZiB/LsqNCnyaUlyiKpAJLb6agPSFz7DEFCfkonWAZXMrLwCmC08b2ZEnEdJkog==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-musl@4.67.4': + resolution: {integrity: sha512-4H0XHfd2VufGjX7NjUyeue78sD0bRIoKSGjGqO+F5nSvL6jN48NAU7esdmtFEYxZXwObLtt3MJ/kHS0jASMW3g==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rollup/rollup-openbsd-x64@4.67.4': + resolution: {integrity: sha512-osRHQbE55pZpCLetpMsFmhkapyZnAUH73qRKMh+npi3boUom6u6hdaTTPSxlInXxwJHsn9r2uDhdz0V7Yoxx2A==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.67.4': + resolution: {integrity: sha512-95+exYEyOwrZePsE0czi4q7X5lxKPa21+lmyAZlwbYENITQ0Unk4HAQAFp/p+KhXBHBx9mUABXRYjOC5A1wY3Q==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.67.4': + resolution: {integrity: sha512-FOXOcKhNQpO4Po+Ynan6IbtM67SrXZbgpRJWVYwz53CT5veI7sVzDwVBmWS65N5Imv+wK3SVhIPAl+C5DXXNCg==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.67.4': + resolution: {integrity: sha512-cklKh0gJOkAZQcWziQa3hrjxZKN+PCHZ7SPTyGJDAiBVr05ZXlEjGFCG7zFJMaVibxsmzAe1FimN4u/HBns9+Q==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.67.4': + resolution: {integrity: sha512-AegwxJPc9bvUp8fQtlsUHkFMOMkGylWU7glyL+YD4vwG+QaYoGXYLSsQoeTD7kvoLZrVlMWNVhTg1dedY5C1VQ==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.67.4': + resolution: {integrity: sha512-RJZnrwTWj7Iq2ooBwoGbDdC65tDwYawneGcAfFMJqVUrRZMcskka6nTkBpXR/47G7kzn3EW2qupExnaBy11vwg==} + cpu: [x64] + os: [win32] + + '@types/estree@1.0.10': + resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/resolve@1.20.2': + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.19.0: + resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + + brace-expansion@1.1.21: + resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} + + brace-expansion@2.1.7: + resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + d3-array@3.2.4: + resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + engines: {node: '>=12'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + diff@5.2.2: + resolution: {integrity: sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==} + engines: {node: '>=0.3.1'} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.39.5: + resolution: {integrity: sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + + flatted@3.4.4: + resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@15.15.0: + resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} + engines: {node: '>=18'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-core-module@2.17.0: + resolution: {integrity: sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==} + engines: {node: '>= 0.4'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + minimatch@3.1.5: + resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + + minimatch@5.1.9: + resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} + engines: {node: '>=10'} + + mocha@10.8.2: + resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} + engines: {node: '>= 14.0.0'} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} + engines: {node: '>=8.6'} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve@1.22.13: + resolution: {integrity: sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA==} + engines: {node: '>= 0.4'} + hasBin: true + + rollup@4.67.4: + resolution: {integrity: sha512-Lsv3oKcz5jgOQJej/p7nfwbVEdAbDT+z6OPf/SCdI+nF+q2ENp0pTKT35ZwXAmH8g45mfrIiJeEyAqKYSYoL9Q==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + serialize-javascript@7.1.4: + resolution: {integrity: sha512-FqlEuoTq/zRmA4Lg6aOqyH3lCHbUtCB0bmHCeFniX2GBdDqMJM3FwdvEhlE5Pim1dlt2FfBdVPmUNNiGhhKqpw==} + engines: {node: '>=20.0.0'} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + smob@1.6.2: + resolution: {integrity: sha512-RQsvleCbF8cVHEv+xuDGaA4pOizFqJ0GgjtMSRo6oP8pnN7WsigHgVGey6aILRBKv4W2YOMHLqbKdnB6hpB9fw==} + engines: {node: '>=20.0.0'} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + terser@5.51.2: + resolution: {integrity: sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==} + engines: {node: '>=10'} + hasBin: true + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + workerpool@6.5.1: + resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + + yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + + yargs@16.2.2: + resolution: {integrity: sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==} + engines: {node: '>=10'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.5)': + dependencies: + eslint: 9.39.5 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.2': {} + + '@eslint/config-array@0.21.2': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.7': + dependencies: + ajv: 6.15.0 + debug: 4.4.3(supports-color@8.1.1) + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.39.5': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': + dependencies: + '@eslint/core': 0.17.0 + levn: 0.4.1 + + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/source-map@0.3.11': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + optional: true + + '@rollup/plugin-node-resolve@16.0.3(rollup@4.67.4)': + dependencies: + '@rollup/pluginutils': 5.5.1(rollup@4.67.4) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-module: 1.0.0 + resolve: 1.22.13 + optionalDependencies: + rollup: 4.67.4 + + '@rollup/plugin-terser@1.0.2(rollup@4.67.4)': + dependencies: + serialize-javascript: 7.1.4 + smob: 1.6.2 + terser: 5.51.2 + optionalDependencies: + rollup: 4.67.4 + + '@rollup/pluginutils@5.5.1(rollup@4.67.4)': + dependencies: + '@types/estree': 1.0.10 + estree-walker: 2.0.2 + picomatch: 4.0.7 + optionalDependencies: + rollup: 4.67.4 + + '@rollup/rollup-android-arm-eabi@4.67.4': + optional: true + + '@rollup/rollup-android-arm64@4.67.4': + optional: true + + '@rollup/rollup-android-x64@4.67.4': + optional: true + + '@rollup/rollup-darwin-arm64@4.67.4': + optional: true + + '@rollup/rollup-darwin-x64@4.67.4': + optional: true + + '@rollup/rollup-freebsd-arm64@4.67.4': + optional: true + + '@rollup/rollup-freebsd-x64@4.67.4': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.67.4': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.67.4': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.67.4': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.67.4': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.67.4': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.67.4': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-x64-musl@4.67.4': + optional: true + + '@rollup/rollup-openbsd-x64@4.67.4': + optional: true + + '@rollup/rollup-openharmony-arm64@4.67.4': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.67.4': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.67.4': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.67.4': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.67.4': + optional: true + + '@types/estree@1.0.10': {} + + '@types/json-schema@7.0.15': {} + + '@types/resolve@1.20.2': {} + + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + + acorn@8.19.0: {} + + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-colors@4.1.3: {} + + ansi-regex@5.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.2 + + argparse@2.0.1: {} + + balanced-match@1.0.2: {} + + binary-extensions@2.3.0: {} + + brace-expansion@1.1.21: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.1.7: + dependencies: + balanced-match: 1.0.2 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browser-stdout@1.3.1: {} + + buffer-from@1.1.2: {} + + callsites@3.1.0: {} + + camelcase@6.3.0: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + commander@2.20.3: {} + + concat-map@0.0.1: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + d3-array@3.2.4: + dependencies: + internmap: 2.0.3 + + debug@4.4.3(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + + decamelize@4.0.0: {} + + deep-is@0.1.4: {} + + deepmerge@4.3.1: {} + + diff@5.2.2: {} + + emoji-regex@8.0.0: {} + + es-errors@1.3.0: {} + + escalade@3.2.0: {} + + escape-string-regexp@4.0.0: {} + + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint@9.39.5: + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.5) + '@eslint-community/regexpp': 4.12.2 + '@eslint/config-array': 0.21.2 + '@eslint/config-helpers': 0.4.2 + '@eslint/core': 0.17.0 + '@eslint/eslintrc': 3.3.7 + '@eslint/js': 9.39.5 + '@eslint/plugin-kit': 0.4.1 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.10 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3(supports-color@8.1.1) + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + + espree@10.4.0: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 4.2.1 + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@2.0.2: {} + + esutils@2.0.3: {} + + fast-deep-equal@3.1.3: {} + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.4.4 + keyv: 4.5.4 + + flat@5.0.2: {} + + flatted@3.4.4: {} + + fs.realpath@1.0.0: {} + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + get-caller-file@2.0.5: {} + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@8.1.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.9 + once: 1.4.0 + + globals@14.0.0: {} + + globals@15.15.0: {} + + has-flag@4.0.0: {} + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + he@1.2.0: {} + + ignore@5.3.2: {} + + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + + internmap@2.0.3: {} + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-core-module@2.17.0: + dependencies: + hasown: 2.0.4 + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-module@1.0.0: {} + + is-number@7.0.0: {} + + is-plain-obj@2.1.0: {} + + is-unicode-supported@0.1.0: {} + + isexe@2.0.0: {} + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.merge@4.6.2: {} + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + minimatch@3.1.5: + dependencies: + brace-expansion: 1.1.21 + + minimatch@5.1.9: + dependencies: + brace-expansion: 2.1.7 + + mocha@10.8.2: + dependencies: + ansi-colors: 4.1.3 + browser-stdout: 1.3.1 + chokidar: 3.6.0 + debug: 4.4.3(supports-color@8.1.1) + diff: 5.2.2 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 8.1.0 + he: 1.2.0 + js-yaml: 4.3.2 + log-symbols: 4.1.0 + minimatch: 5.1.9 + ms: 2.1.3 + serialize-javascript: 6.0.2 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 6.5.1 + yargs: 16.2.2 + yargs-parser: 20.2.9 + yargs-unparser: 2.0.0 + + ms@2.1.3: {} + + natural-compare@1.4.0: {} + + normalize-path@3.0.0: {} + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-parse@1.0.7: {} + + picomatch@2.3.2: {} + + picomatch@4.0.7: {} + + prelude-ls@1.2.1: {} + + punycode@2.3.1: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.2 + + require-directory@2.1.1: {} + + resolve-from@4.0.0: {} + + resolve@1.22.13: + dependencies: + es-errors: 1.3.0 + is-core-module: 2.17.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + rollup@4.67.4: + dependencies: + '@types/estree': 1.0.10 + optionalDependencies: + '@napi-rs/lzma-linux-x64-gnu': 1.5.1 + '@rollup/rollup-android-arm-eabi': 4.67.4 + '@rollup/rollup-android-arm64': 4.67.4 + '@rollup/rollup-android-x64': 4.67.4 + '@rollup/rollup-darwin-arm64': 4.67.4 + '@rollup/rollup-darwin-x64': 4.67.4 + '@rollup/rollup-freebsd-arm64': 4.67.4 + '@rollup/rollup-freebsd-x64': 4.67.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.67.4 + '@rollup/rollup-linux-arm-musleabihf': 4.67.4 + '@rollup/rollup-linux-arm64-gnu': 4.67.4 + '@rollup/rollup-linux-arm64-musl': 4.67.4 + '@rollup/rollup-linux-loong64-gnu': 4.67.4 + '@rollup/rollup-linux-loong64-musl': 4.67.4 + '@rollup/rollup-linux-ppc64-gnu': 4.67.4 + '@rollup/rollup-linux-ppc64-musl': 4.67.4 + '@rollup/rollup-linux-riscv64-gnu': 4.67.4 + '@rollup/rollup-linux-riscv64-musl': 4.67.4 + '@rollup/rollup-linux-s390x-gnu': 4.67.4 + '@rollup/rollup-linux-x64-gnu': 4.67.4 + '@rollup/rollup-linux-x64-musl': 4.67.4 + '@rollup/rollup-openbsd-x64': 4.67.4 + '@rollup/rollup-openharmony-arm64': 4.67.4 + '@rollup/rollup-win32-arm64-msvc': 4.67.4 + '@rollup/rollup-win32-ia32-msvc': 4.67.4 + '@rollup/rollup-win32-x64-gnu': 4.67.4 + '@rollup/rollup-win32-x64-msvc': 4.67.4 + fsevents: 2.3.3 + + safe-buffer@5.2.1: {} + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + serialize-javascript@7.1.4: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + smob@1.6.2: {} + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + terser@5.51.2: + dependencies: + '@jridgewell/source-map': 0.3.11 + acorn: 8.19.0 + commander: 2.20.3 + source-map-support: 0.5.21 + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + word-wrap@1.2.5: {} + + workerpool@6.5.1: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrappy@1.0.2: {} + + y18n@5.0.8: {} + + yargs-parser@20.2.9: {} + + yargs-unparser@2.0.0: + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + + yargs@16.2.2: + dependencies: + cliui: 7.0.4 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + + yocto-queue@0.1.0: {} diff --git a/rollup.config.js b/rollup.config.js index 4af6827..a13a979 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,5 +1,6 @@ -import {readFileSync} from "fs"; -import terser from "@rollup/plugin-terser"; +import {readFileSync} from "node:fs"; +import RollupNode from "@rollup/plugin-node-resolve"; +import RollupTerser from "@rollup/plugin-terser"; import meta from "./package.json" with {type: "json"}; // Extract copyrights from the LICENSE. @@ -9,36 +10,63 @@ const copyright = readFileSync("./LICENSE", "utf-8") .map(line => line.replace(/^copyright\s+/i, "")) .join(", "); -const config = { - input: "src/index.js", - external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)), +const banner = `// ${meta.homepage} v${meta.version} Copyright ${copyright}`; + +const terser = RollupTerser({ output: { - file: `dist/${meta.name}.js`, - name: "d3", - format: "umd", - indent: false, - extend: true, - banner: `// ${meta.homepage} v${meta.version} Copyright ${copyright}`, - globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"}))) - }, - plugins: [] -}; + preamble: banner + } +}); + +function config(options) { + return { + ...options, + input: "src/index.js", + external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)), + output: { + ...options.output, + name: "d3", + indent: false, + extend: true, + banner, + globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"}))) + }, + plugins: [ + RollupNode(), + ...(options.plugins ?? []) + ] + }; +} export default [ - config, - { - ...config, + config({ output: { - ...config.output, - file: `dist/${meta.name}.min.js` + file: `dist/${meta.name}.mjs`, + format: "es" + } + }), + config({ + output: { + file: `dist/${meta.name}.min.mjs`, + format: "es" }, plugins: [ - ...config.plugins, - terser({ - output: { - preamble: config.output.banner - } - }) + terser ] - } + }), + config({ + output: { + file: `dist/${meta.name}.js`, + format: "umd", + } + }), + config({ + output: { + file: `dist/${meta.name}.min.js`, + format: "umd" + }, + plugins: [ + terser + ] + }) ]; diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 3f33a5f..0000000 --- a/yarn.lock +++ /dev/null @@ -1,1177 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.6.1": - version "4.10.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" - integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== - -"@eslint/config-array@^0.15.1": - version "0.15.1" - resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.15.1.tgz#1fa78b422d98f4e7979f2211a1fde137e26c7d61" - integrity sha512-K4gzNq+yymn/EVsXYmf+SBcBro8MTf+aXJZUphM96CdzUEr+ClGDvAbpmaEK+cGVigVXIgs9gNmvHAlrzzY5JQ== - dependencies: - "@eslint/object-schema" "^2.1.3" - debug "^4.3.1" - minimatch "^3.0.5" - -"@eslint/eslintrc@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" - integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^10.0.1" - globals "^14.0.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@9.4.0": - version "9.4.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.4.0.tgz#96a2edd37ec0551ce5f9540705be23951c008a0c" - integrity sha512-fdI7VJjP3Rvc70lC4xkFXHB0fiPeojiL1PxVG6t1ZvXQrarj893PweuBTujxDUFk0Fxj4R7PIIAZ/aiiyZPZcg== - -"@eslint/object-schema@^2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.3.tgz#e65ae80ee2927b4fd8c5c26b15ecacc2b2a6cc2a" - integrity sha512-HAbhAYKfsAC2EkTqve00ibWIZlaU74Z1EHwAjYr4PXF0YU2VEA1zSIKSSpKszRLRWwHzzRZXvK632u+uXzvsvw== - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/retry@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570" - integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew== - -"@jridgewell/gen-mapping@^0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" - integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== - dependencies: - "@jridgewell/set-array" "^1.2.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/resolve-uri@^3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== - -"@jridgewell/set-array@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" - integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== - -"@jridgewell/source-map@^0.3.3": - version "0.3.6" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" - integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": - version "0.3.25" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@rollup/plugin-terser@^0.4.4": - version "0.4.4" - resolved "https://registry.yarnpkg.com/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz#15dffdb3f73f121aa4fbb37e7ca6be9aeea91962" - integrity sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A== - dependencies: - serialize-javascript "^6.0.1" - smob "^1.0.0" - terser "^5.17.4" - -"@rollup/rollup-android-arm-eabi@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz#bbd0e616b2078cd2d68afc9824d1fadb2f2ffd27" - integrity sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ== - -"@rollup/rollup-android-arm64@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz#97255ef6384c5f73f4800c0de91f5f6518e21203" - integrity sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA== - -"@rollup/rollup-darwin-arm64@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz#b6dd74e117510dfe94541646067b0545b42ff096" - integrity sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w== - -"@rollup/rollup-darwin-x64@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz#e07d76de1cec987673e7f3d48ccb8e106d42c05c" - integrity sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA== - -"@rollup/rollup-linux-arm-gnueabihf@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz#9f1a6d218b560c9d75185af4b8bb42f9f24736b8" - integrity sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA== - -"@rollup/rollup-linux-arm-musleabihf@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz#53618b92e6ffb642c7b620e6e528446511330549" - integrity sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A== - -"@rollup/rollup-linux-arm64-gnu@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz#99a7ba5e719d4f053761a698f7b52291cefba577" - integrity sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw== - -"@rollup/rollup-linux-arm64-musl@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz#f53db99a45d9bc00ce94db8a35efa7c3c144a58c" - integrity sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ== - -"@rollup/rollup-linux-powerpc64le-gnu@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz#cbb0837408fe081ce3435cf3730e090febafc9bf" - integrity sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA== - -"@rollup/rollup-linux-riscv64-gnu@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz#8ed09c1d1262ada4c38d791a28ae0fea28b80cc9" - integrity sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg== - -"@rollup/rollup-linux-s390x-gnu@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz#938138d3c8e0c96f022252a28441dcfb17afd7ec" - integrity sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg== - -"@rollup/rollup-linux-x64-gnu@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz#1a7481137a54740bee1ded4ae5752450f155d942" - integrity sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w== - -"@rollup/rollup-linux-x64-musl@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz#f1186afc601ac4f4fc25fac4ca15ecbee3a1874d" - integrity sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg== - -"@rollup/rollup-win32-arm64-msvc@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz#ed6603e93636a96203c6915be4117245c1bd2daf" - integrity sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA== - -"@rollup/rollup-win32-ia32-msvc@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz#14e0b404b1c25ebe6157a15edb9c46959ba74c54" - integrity sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg== - -"@rollup/rollup-win32-x64-msvc@4.18.0": - version "4.18.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz#5d694d345ce36b6ecf657349e03eb87297e68da4" - integrity sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g== - -"@types/estree@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" - integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn@^8.11.3, acorn@^8.8.2: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== - -ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -binary-extensions@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" - integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@~3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== - dependencies: - fill-range "^7.1.1" - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -chalk@^4.0.0, chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chokidar@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -"d3-array@2 - 3": - version "3.2.4" - resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.4.tgz#15fec33b237f97ac5d7c986dc77da273a8ed0bb5" - integrity sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg== - dependencies: - internmap "1 - 2" - -debug@4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -debug@^4.3.1, debug@^4.3.2: - version "4.3.5" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== - dependencies: - ms "2.1.2" - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -escalade@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - -escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-scope@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.1.tgz#a9601e4b81a0b9171657c343fb13111688963cfc" - integrity sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-visitor-keys@^3.3.0: - version "3.4.3" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" - integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - -eslint-visitor-keys@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" - integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== - -eslint@^9.4.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.4.0.tgz#79150c3610ae606eb131f1d648d5f43b3d45f3cd" - integrity sha512-sjc7Y8cUD1IlwYcTS9qPSvGjAC8Ne9LctpxKKu3x/1IC9bnOg98Zy6GxEJUfr1NojMgVPlyANXYns8oE2c1TAA== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/config-array" "^0.15.1" - "@eslint/eslintrc" "^3.1.0" - "@eslint/js" "9.4.0" - "@humanwhocodes/module-importer" "^1.0.1" - "@humanwhocodes/retry" "^0.3.0" - "@nodelib/fs.walk" "^1.2.8" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - escape-string-regexp "^4.0.0" - eslint-scope "^8.0.1" - eslint-visitor-keys "^4.0.0" - espree "^10.0.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^8.0.0" - find-up "^5.0.0" - glob-parent "^6.0.2" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -espree@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-10.0.1.tgz#600e60404157412751ba4a6f3a2ee1a42433139f" - integrity sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww== - dependencies: - acorn "^8.11.3" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^4.0.0" - -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.17.1" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" - integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== - dependencies: - reusify "^1.0.4" - -file-entry-cache@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" - integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== - dependencies: - flat-cache "^4.0.0" - -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - -find-up@5.0.0, find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" - integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== - dependencies: - flatted "^3.2.9" - keyv "^4.5.4" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -flatted@^3.2.9: - version "3.3.1" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" - integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -globals@^14.0.0: - version "14.0.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" - integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== - -globals@^15.3.0: - version "15.3.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-15.3.0.tgz#619db01f88d8fb91b0ed841a820cd980299575e5" - integrity sha512-cCdyVjIUVTtX8ZsPkq1oCsOsLmGIswqnjZYMJJTGaNApj1yHtLSymKhwH51ttirREn75z3p4k051clwg7rvNKA== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -ignore@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== - -import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -"internmap@1 - 2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" - integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -js-yaml@4.1.0, js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -keyv@^4.5.4: - version "4.5.4" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^3.0.5, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.0.1: - version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -mocha@^10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.4.0.tgz#ed03db96ee9cfc6d20c56f8e2af07b961dbae261" - integrity sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "8.1.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -optionator@^0.9.3: - version "0.9.4" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" - integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.5" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -punycode@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rollup@^4.18.0: - version "4.18.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.18.0.tgz#497f60f0c5308e4602cf41136339fbf87d5f5dda" - integrity sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg== - dependencies: - "@types/estree" "1.0.5" - optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.18.0" - "@rollup/rollup-android-arm64" "4.18.0" - "@rollup/rollup-darwin-arm64" "4.18.0" - "@rollup/rollup-darwin-x64" "4.18.0" - "@rollup/rollup-linux-arm-gnueabihf" "4.18.0" - "@rollup/rollup-linux-arm-musleabihf" "4.18.0" - "@rollup/rollup-linux-arm64-gnu" "4.18.0" - "@rollup/rollup-linux-arm64-musl" "4.18.0" - "@rollup/rollup-linux-powerpc64le-gnu" "4.18.0" - "@rollup/rollup-linux-riscv64-gnu" "4.18.0" - "@rollup/rollup-linux-s390x-gnu" "4.18.0" - "@rollup/rollup-linux-x64-gnu" "4.18.0" - "@rollup/rollup-linux-x64-musl" "4.18.0" - "@rollup/rollup-win32-arm64-msvc" "4.18.0" - "@rollup/rollup-win32-ia32-msvc" "4.18.0" - "@rollup/rollup-win32-x64-msvc" "4.18.0" - fsevents "~2.3.2" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -serialize-javascript@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" - integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== - dependencies: - randombytes "^2.1.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -smob@^1.0.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/smob/-/smob-1.5.0.tgz#85d79a1403abf128d24d3ebc1cdc5e1a9548d3ab" - integrity sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig== - -source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-json-comments@3.1.1, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -terser@^5.17.4: - version "5.31.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.0.tgz#06eef86f17007dbad4593f11a574c7f5eb02c6a1" - integrity sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg== - dependencies: - "@jridgewell/source-map" "^0.3.3" - acorn "^8.8.2" - commander "^2.20.0" - source-map-support "~0.5.20" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -word-wrap@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" - integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== - -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 18fb382a107599fb5a69a51ddf010c4318f60022 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 17:57:06 -0800 Subject: [PATCH 2/9] vitest, eslint 9 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish.yml | 1 + .github/workflows/test.yml | 1 + eslint.config.js | 15 +- package.json | 8 +- pnpm-lock.yaml | 1028 +++++++++++++++++++++------------ test/day-test.js | 63 +- test/friday-test.js | 9 +- test/hour-test.js | 39 +- test/interval-test.js | 27 +- test/millisecond-test.js | 3 +- test/minute-test.js | 31 +- test/monday-test.js | 11 +- test/month-test.js | 85 +-- test/multiYear-test.js | 13 +- test/saturday-test.js | 9 +- test/second-test.js | 33 +- test/sunday-test.js | 41 +- test/thursday-test.js | 9 +- test/ticks-test.js | 51 +- test/tuesday-test.js | 9 +- test/unixDay-test.js | 33 +- test/utcDay-test.js | 33 +- test/utcFriday-test.js | 9 +- test/utcHour-test.js | 37 +- test/utcMillisecond-test.js | 3 +- test/utcMinute-test.js | 29 +- test/utcMonday-test.js | 11 +- test/utcMonth-test.js | 59 +- test/utcMultiYear-test.js | 13 +- test/utcSaturday-test.js | 9 +- test/utcSecond-test.js | 31 +- test/utcSunday-test.js | 41 +- test/utcThursday-test.js | 9 +- test/utcTicks-test.js | 49 +- test/utcTuesday-test.js | 9 +- test/utcWednesday-test.js | 9 +- test/utcWeek-test.js | 41 +- test/utcYear-test.js | 29 +- test/wednesday-test.js | 9 +- test/week-test.js | 41 +- test/year-test.js | 29 +- vitest.config.js | 3 + 42 files changed, 1165 insertions(+), 857 deletions(-) create mode 100644 vitest.config.js diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 839d5c5..623fc14 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,4 +23,5 @@ jobs: cache: pnpm - run: pnpm install - run: pnpm run test + - run: pnpm run lint - run: npm publish diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 00a5a94..63d0c51 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,3 +20,4 @@ jobs: cache: pnpm - run: pnpm install - run: pnpm run test + - run: pnpm run lint diff --git a/eslint.config.js b/eslint.config.js index 6e802a6..31d8a02 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,12 +1,9 @@ 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([ + {files: ["**/*.{js,ts,jsx,tsx}"], plugins: {js}, extends: ["js/recommended"]}, + {files: ["**/*.{js,ts,jsx,tsx}"], languageOptions: {globals: globals.browser}}, + {languageOptions: {ecmaVersion: 2019, sourceType: "module"}} +]); diff --git a/package.json b/package.json index e7d4709..897186a 100644 --- a/package.json +++ b/package.json @@ -41,12 +41,12 @@ "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-terser": "^1.0.2", "eslint": "^9.39.5", - "globals": "^15.15.0", - "mocha": "^10.8.2", - "rollup": "^4.67.4" + "globals": "^17.14.0", + "rollup": "^4.67.4", + "vitest": "^4.1.12" }, "scripts": { - "test": "TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test", + "test": "TZ=America/Los_Angeles vitest", "lint": "eslint src test", "prepublishOnly": "rm -rf dist && rollup -c" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index faef5ac..f3d45cd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,14 +25,14 @@ importers: specifier: ^9.39.5 version: 9.39.5 globals: - specifier: ^15.15.0 - version: 15.15.0 - mocha: - specifier: ^10.8.2 - version: 10.8.2 + specifier: ^17.14.0 + version: 17.14.0 rollup: specifier: ^4.67.4 version: 4.67.4 + vitest: + specifier: ^4.1.12 + version: 4.1.12(vite@8.3.5(terser@5.51.2)) packages: @@ -117,6 +117,108 @@ packages: os: [linux] libc: [glibc] + '@oxc-project/types@0.156.0': + resolution: {integrity: sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==} + + '@rolldown/binding-android-arm-eabi@1.2.16': + resolution: {integrity: sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@rolldown/binding-android-arm64@1.2.16': + resolution: {integrity: sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.2.16': + resolution: {integrity: sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.2.16': + resolution: {integrity: sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.2.16': + resolution: {integrity: sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.2.16': + resolution: {integrity: sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.2.16': + resolution: {integrity: sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.2.16': + resolution: {integrity: sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.2.16': + resolution: {integrity: sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.2.16': + resolution: {integrity: sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.2.16': + resolution: {integrity: sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.2.16': + resolution: {integrity: sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.2.16': + resolution: {integrity: sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-win32-arm64-msvc@1.2.16': + resolution: {integrity: sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.2.16': + resolution: {integrity: sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + '@rollup/plugin-node-resolve@16.0.3': resolution: {integrity: sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==} engines: {node: '>=14.0.0'} @@ -287,6 +389,15 @@ packages: cpu: [x64] os: [win32] + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/estree@1.0.10': resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==} @@ -296,6 +407,35 @@ packages: '@types/resolve@1.20.2': resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + '@vitest/expect@4.1.12': + resolution: {integrity: sha512-vFlTt+YEu9WBpNjdGayNmlMVzrWPi1+sv853/7t2FU7hpO5gAFBKHzQmkCq5Xjpr+evegF2994LQT3hF3mRlqQ==} + + '@vitest/mocker@4.1.12': + resolution: {integrity: sha512-fKShNpKZzupWZuY0z7egydvL0sqW4INEZBEExMBMAa6izlENEVHwoXgdaTCaBZ5fwlr4xf2o1wXC83n9RpO+NA==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@4.1.12': + resolution: {integrity: sha512-XW9O8+Mxx4VpCtkYdMJLZQQwsVryP9wk7cPKDxtXFfwSak6yRh5+2fep/Y0XF/ElBvJHq8bcYdi6aeuai0opZA==} + + '@vitest/runner@4.1.12': + resolution: {integrity: sha512-NKlVKCr5QnCe8jijdMnmkpHHU+WTqiLFR6G0pHji9uRjXK9xJl1k1nTw6F3pOOj2PDcsDt2GKQMI7wIsaT491w==} + + '@vitest/snapshot@4.1.12': + resolution: {integrity: sha512-ko1y1Qgb/slzQ9mr+b89Cuqud8WG1TKtsPD8r7ZUBdvVOGt85Af2HwCqHujrhwJq95hs/9RM7fcAPg57o1vlzw==} + + '@vitest/spy@4.1.12': + resolution: {integrity: sha512-RGq9x4JNGNTZHEJxvN0oSiJjeSCExm0n2gZKKJZHY9cX5AVA6M7VJILBT3ZJ/tJ/0J9uWT7fETV9/btoi//vSg==} + + '@vitest/utils@4.1.12': + resolution: {integrity: sha512-Q3awXrwOfEV+qc3WmO5ONyE0yO7Q1gQ9/oyHxGLZ/pl7N3NO/ZztqQwKLuwMkV+CA1JYSIeO3gkHnRDIo4AVaA==} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -309,45 +449,23 @@ packages: ajv@6.15.0: resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} - ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - brace-expansion@1.1.21: resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} - brace-expansion@2.1.7: - resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} - - braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} - - browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -355,21 +473,14 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - - cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -383,6 +494,9 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -400,10 +514,6 @@ packages: supports-color: optional: true - decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -411,20 +521,16 @@ packages: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} - diff@5.2.2: - resolution: {integrity: sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==} - engines: {node: '>=0.3.1'} - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} @@ -472,10 +578,17 @@ packages: estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -485,14 +598,19 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} - fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} - find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -501,16 +619,9 @@ packages: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - flatted@3.4.4: resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -519,29 +630,16 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - - glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.15.0: - resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} + globals@17.14.0: + resolution: {integrity: sha512-UtdkTVyAJePQv0J2M9Xe4L0ruNSDV314XiIJsADI2Zf40bcdAonE/D/OhAU8AT99oij9mhLByb+NvA3QWZYgCg==} engines: {node: '>=18'} has-flag@4.0.0: @@ -552,10 +650,6 @@ packages: resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} engines: {node: '>= 0.4'} - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -568,21 +662,10 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - internmap@2.0.3: resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} engines: {node: '>=12'} - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - is-core-module@2.17.0: resolution: {integrity: sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==} engines: {node: '>= 0.4'} @@ -591,10 +674,6 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -602,18 +681,6 @@ packages: is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - - is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -637,6 +704,80 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -644,34 +785,26 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} minimatch@3.1.5: resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} - minimatch@5.1.9: - resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} - engines: {node: '>=10'} - - mocha@10.8.2: - resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} - engines: {node: '>= 14.0.0'} - hasBin: true - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + obug@2.2.1: + resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==} + engines: {node: '>=12.20.0'} optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} @@ -700,14 +833,20 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - picomatch@2.3.2: - resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} - engines: {node: '>=8.6'} + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} picomatch@4.0.7: resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} engines: {node: '>=12'} + postcss@8.5.32: + resolution: {integrity: sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==} + engines: {node: ^10 || ^12 || >=14} + prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -716,17 +855,6 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - - readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -736,17 +864,16 @@ packages: engines: {node: '>= 0.4'} hasBin: true + rolldown@1.2.16: + resolution: {integrity: sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + rollup@4.67.4: resolution: {integrity: sha512-Lsv3oKcz5jgOQJej/p7nfwbVEdAbDT+z6OPf/SCdI+nF+q2ENp0pTKT35ZwXAmH8g45mfrIiJeEyAqKYSYoL9Q==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - - serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - serialize-javascript@7.1.4: resolution: {integrity: sha512-FqlEuoTq/zRmA4Lg6aOqyH3lCHbUtCB0bmHCeFniX2GBdDqMJM3FwdvEhlE5Pim1dlt2FfBdVPmUNNiGhhKqpw==} engines: {node: '>=20.0.0'} @@ -759,10 +886,17 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + smob@1.6.2: resolution: {integrity: sha512-RQsvleCbF8cVHEv+xuDGaA4pOizFqJ0GgjtMSRo6oP8pnN7WsigHgVGey6aILRBKv4W2YOMHLqbKdnB6hpB9fw==} engines: {node: '>=20.0.0'} + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} + engines: {node: '>=0.10.0'} + source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} @@ -770,13 +904,11 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} @@ -786,10 +918,6 @@ packages: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -799,9 +927,20 @@ packages: engines: {node: '>=10'} hasBin: true - to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@1.3.1: + resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinyrainbow@3.2.0: + resolution: {integrity: sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==} + engines: {node: '>=14.0.0'} type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} @@ -810,41 +949,104 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + vite@8.3.5: + resolution: {integrity: sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.7.1 || ^0.8.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@4.1.12: + resolution: {integrity: sha512-5eWdz2yb3ajxWF3C8C4TjkXl7FGm3n2E/VlazALrQHzK7nYMSGFnCZto0bbPNl77AwkOZVLk0YnBAejUu0NiWA==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.1.12 + '@vitest/browser-preview': 4.1.12 + '@vitest/browser-webdriverio': ^4.1.11 + '@vitest/coverage-istanbul': 4.1.12 + '@vitest/coverage-v8': 4.1.12 + '@vitest/ui': 4.1.12 + happy-dom: '*' + jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} - workerpool@6.5.1: - resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} - - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - - yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - - yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - - yargs@16.2.2: - resolution: {integrity: sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==} - engines: {node: '>=10'} - yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -861,7 +1063,7 @@ snapshots: '@eslint/config-array@0.21.2': dependencies: '@eslint/object-schema': 2.1.7 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 minimatch: 3.1.5 transitivePeerDependencies: - supports-color @@ -877,7 +1079,7 @@ snapshots: '@eslint/eslintrc@3.3.7': dependencies: ajv: 6.15.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 espree: 10.4.0 globals: 14.0.0 ignore: 5.3.2 @@ -935,6 +1137,55 @@ snapshots: '@napi-rs/lzma-linux-x64-gnu@1.5.1': optional: true + '@oxc-project/types@0.156.0': {} + + '@rolldown/binding-android-arm-eabi@1.2.16': + optional: true + + '@rolldown/binding-android-arm64@1.2.16': + optional: true + + '@rolldown/binding-darwin-arm64@1.2.16': + optional: true + + '@rolldown/binding-darwin-x64@1.2.16': + optional: true + + '@rolldown/binding-freebsd-x64@1.2.16': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.2.16': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.2.16': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-x64-musl@1.2.16': + optional: true + + '@rolldown/binding-openharmony-arm64@1.2.16': + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.2.16': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.2.16': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + '@rollup/plugin-node-resolve@16.0.3(rollup@4.67.4)': dependencies: '@rollup/pluginutils': 5.5.1(rollup@4.67.4) @@ -1039,12 +1290,62 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.67.4': optional: true + '@standard-schema/spec@1.1.0': {} + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + '@types/estree@1.0.10': {} '@types/json-schema@7.0.15': {} '@types/resolve@1.20.2': {} + '@vitest/expect@4.1.12': + dependencies: + '@standard-schema/spec': 1.1.0 + '@types/chai': 5.2.3 + '@vitest/spy': 4.1.12 + '@vitest/utils': 4.1.12 + chai: 6.3.0 + tinyrainbow: 3.2.0 + + '@vitest/mocker@4.1.12(vite@8.3.5(terser@5.51.2))': + dependencies: + '@vitest/spy': 4.1.12 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 8.3.5(terser@5.51.2) + + '@vitest/pretty-format@4.1.12': + dependencies: + tinyrainbow: 3.2.0 + + '@vitest/runner@4.1.12': + dependencies: + '@vitest/utils': 4.1.12 + pathe: 2.0.3 + + '@vitest/snapshot@4.1.12': + dependencies: + '@vitest/pretty-format': 4.1.12 + '@vitest/utils': 4.1.12 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@4.1.12': {} + + '@vitest/utils@4.1.12': + dependencies: + '@vitest/pretty-format': 4.1.12 + convert-source-map: 2.0.0 + tinyrainbow: 3.2.0 + acorn-jsx@5.3.2(acorn@8.19.0): dependencies: acorn: 8.19.0 @@ -1058,69 +1359,32 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ansi-colors@4.1.3: {} - - ansi-regex@5.0.1: {} - ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 - anymatch@3.1.3: - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.2 - argparse@2.0.1: {} - balanced-match@1.0.2: {} + assertion-error@2.0.1: {} - binary-extensions@2.3.0: {} + balanced-match@1.0.2: {} brace-expansion@1.1.21: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 - brace-expansion@2.1.7: - dependencies: - balanced-match: 1.0.2 - - braces@3.0.3: - dependencies: - fill-range: 7.1.1 - - browser-stdout@1.3.1: {} - buffer-from@1.1.2: {} callsites@3.1.0: {} - camelcase@6.3.0: {} + chai@6.3.0: {} chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - chokidar@3.6.0: - dependencies: - anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - - cliui@7.0.4: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - color-convert@2.0.1: dependencies: color-name: 1.1.4 @@ -1131,6 +1395,8 @@ snapshots: concat-map@0.0.1: {} + convert-source-map@2.0.0: {} + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -1141,25 +1407,19 @@ snapshots: dependencies: internmap: 2.0.3 - debug@4.4.3(supports-color@8.1.1): + debug@4.4.3: dependencies: ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - decamelize@4.0.0: {} deep-is@0.1.4: {} deepmerge@4.3.1: {} - diff@5.2.2: {} - - emoji-regex@8.0.0: {} + detect-libc@2.1.2: {} es-errors@1.3.0: {} - escalade@3.2.0: {} + es-module-lexer@2.3.2: {} escape-string-regexp@4.0.0: {} @@ -1189,7 +1449,7 @@ snapshots: ajv: 6.15.0 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 escape-string-regexp: 4.0.0 eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 @@ -1229,22 +1489,28 @@ snapshots: estree-walker@2.0.2: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.10 + esutils@2.0.3: {} + expect-type@1.4.0: {} + fast-deep-equal@3.1.3: {} fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 - fill-range@7.1.1: - dependencies: - to-regex-range: 5.0.1 - find-up@5.0.0: dependencies: locate-path: 6.0.0 @@ -1255,38 +1521,20 @@ snapshots: flatted: 3.4.4 keyv: 4.5.4 - flat@5.0.2: {} - flatted@3.4.4: {} - fs.realpath@1.0.0: {} - fsevents@2.3.3: optional: true function-bind@1.1.2: {} - get-caller-file@2.0.5: {} - - glob-parent@5.1.2: - dependencies: - is-glob: 4.0.3 - glob-parent@6.0.2: dependencies: is-glob: 4.0.3 - glob@8.1.0: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.9 - once: 1.4.0 - globals@14.0.0: {} - globals@15.15.0: {} + globals@17.14.0: {} has-flag@4.0.0: {} @@ -1294,8 +1542,6 @@ snapshots: dependencies: function-bind: 1.1.2 - he@1.2.0: {} - ignore@5.3.2: {} import-fresh@3.3.1: @@ -1305,39 +1551,20 @@ snapshots: imurmurhash@0.1.4: {} - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - internmap@2.0.3: {} - is-binary-path@2.1.0: - dependencies: - binary-extensions: 2.3.0 - is-core-module@2.17.0: dependencies: hasown: 2.0.4 is-extglob@2.1.1: {} - is-fullwidth-code-point@3.0.0: {} - is-glob@4.0.3: dependencies: is-extglob: 2.1.1 is-module@1.0.0: {} - is-number@7.0.0: {} - - is-plain-obj@2.1.0: {} - - is-unicode-supported@0.1.0: {} - isexe@2.0.0: {} js-yaml@4.3.2: @@ -1359,57 +1586,76 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + locate-path@6.0.0: dependencies: p-locate: 5.0.0 lodash.merge@4.6.2: {} - log-symbols@4.1.0: + magic-string@0.30.21: dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 + '@jridgewell/sourcemap-codec': 1.6.0 minimatch@3.1.5: dependencies: brace-expansion: 1.1.21 - minimatch@5.1.9: - dependencies: - brace-expansion: 2.1.7 - - mocha@10.8.2: - dependencies: - ansi-colors: 4.1.3 - browser-stdout: 1.3.1 - chokidar: 3.6.0 - debug: 4.4.3(supports-color@8.1.1) - diff: 5.2.2 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 8.1.0 - he: 1.2.0 - js-yaml: 4.3.2 - log-symbols: 4.1.0 - minimatch: 5.1.9 - ms: 2.1.3 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 6.5.1 - yargs: 16.2.2 - yargs-parser: 20.2.9 - yargs-unparser: 2.0.0 - ms@2.1.3: {} - natural-compare@1.4.0: {} + nanoid@3.3.20: {} - normalize-path@3.0.0: {} + natural-compare@1.4.0: {} - once@1.4.0: - dependencies: - wrappy: 1.0.2 + obug@2.2.1: {} optionator@0.9.4: dependencies: @@ -1438,23 +1684,21 @@ snapshots: path-parse@1.0.7: {} - picomatch@2.3.2: {} - - picomatch@4.0.7: {} + pathe@2.0.3: {} - prelude-ls@1.2.1: {} + picocolors@1.1.1: {} - punycode@2.3.1: {} + picomatch@4.0.7: {} - randombytes@2.1.0: + postcss@8.5.32: dependencies: - safe-buffer: 5.2.1 + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 - readdirp@3.6.0: - dependencies: - picomatch: 2.3.2 + prelude-ls@1.2.1: {} - require-directory@2.1.1: {} + punycode@2.3.1: {} resolve-from@4.0.0: {} @@ -1465,6 +1709,27 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + rolldown@1.2.16: + dependencies: + '@oxc-project/types': 0.156.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm-eabi': 1.2.16 + '@rolldown/binding-android-arm64': 1.2.16 + '@rolldown/binding-darwin-arm64': 1.2.16 + '@rolldown/binding-darwin-x64': 1.2.16 + '@rolldown/binding-freebsd-x64': 1.2.16 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.16 + '@rolldown/binding-linux-arm64-gnu': 1.2.16 + '@rolldown/binding-linux-arm64-musl': 1.2.16 + '@rolldown/binding-linux-ppc64-gnu': 1.2.16 + '@rolldown/binding-linux-s390x-gnu': 1.2.16 + '@rolldown/binding-linux-x64-gnu': 1.2.16 + '@rolldown/binding-linux-x64-musl': 1.2.16 + '@rolldown/binding-openharmony-arm64': 1.2.16 + '@rolldown/binding-win32-arm64-msvc': 1.2.16 + '@rolldown/binding-win32-x64-msvc': 1.2.16 + rollup@4.67.4: dependencies: '@types/estree': 1.0.10 @@ -1498,12 +1763,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.67.4 fsevents: 2.3.3 - safe-buffer@5.2.1: {} - - serialize-javascript@6.0.2: - dependencies: - randombytes: 2.1.0 - serialize-javascript@7.1.4: {} shebang-command@2.0.0: @@ -1512,8 +1771,12 @@ snapshots: shebang-regex@3.0.0: {} + siginfo@2.0.0: {} + smob@1.6.2: {} + source-map-js@1.2.2: {} + source-map-support@0.5.21: dependencies: buffer-from: 1.1.2 @@ -1521,15 +1784,9 @@ snapshots: source-map@0.6.1: {} - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 + stackback@0.0.2: {} - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 + std-env@4.3.0: {} strip-json-comments@3.1.1: {} @@ -1537,10 +1794,6 @@ snapshots: dependencies: has-flag: 4.0.0 - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - supports-preserve-symlinks-flag@1.0.0: {} terser@5.51.2: @@ -1550,9 +1803,16 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - to-regex-range@5.0.1: + tinybench@2.9.0: {} + + tinyexec@1.3.1: {} + + tinyglobby@0.2.17: dependencies: - is-number: 7.0.0 + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + + tinyrainbow@3.2.0: {} type-check@0.4.0: dependencies: @@ -1562,41 +1822,51 @@ snapshots: dependencies: punycode: 2.3.1 - which@2.0.2: + vite@8.3.5(terser@5.51.2): dependencies: - isexe: 2.0.0 - - word-wrap@1.2.5: {} + lightningcss: 1.33.0 + picomatch: 4.0.7 + postcss: 8.5.32 + rolldown: 1.2.16 + tinyglobby: 0.2.17 + optionalDependencies: + fsevents: 2.3.3 + terser: 5.51.2 - workerpool@6.5.1: {} + vitest@4.1.12(vite@8.3.5(terser@5.51.2)): + dependencies: + '@vitest/expect': 4.1.12 + '@vitest/mocker': 4.1.12(vite@8.3.5(terser@5.51.2)) + '@vitest/pretty-format': 4.1.12 + '@vitest/runner': 4.1.12 + '@vitest/snapshot': 4.1.12 + '@vitest/spy': 4.1.12 + '@vitest/utils': 4.1.12 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 0.30.21 + obug: 2.2.1 + pathe: 2.0.3 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 2.9.0 + tinyexec: 1.3.1 + tinyglobby: 0.2.17 + tinyrainbow: 3.2.0 + vite: 8.3.5(terser@5.51.2) + why-is-node-running: 2.3.0 + transitivePeerDependencies: + - msw - wrap-ansi@7.0.0: + which@2.0.2: dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrappy@1.0.2: {} - - y18n@5.0.8: {} - - yargs-parser@20.2.9: {} + isexe: 2.0.0 - yargs-unparser@2.0.0: + why-is-node-running@2.3.0: dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 + siginfo: 2.0.0 + stackback: 0.0.2 - yargs@16.2.2: - dependencies: - cliui: 7.0.4 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 + word-wrap@1.2.5: {} yocto-queue@0.1.0: {} diff --git a/test/day-test.js b/test/day-test.js index 771616b..7afbced 100644 --- a/test/day-test.js +++ b/test/day-test.js @@ -1,28 +1,29 @@ +import {test} from "vitest"; import assert from "assert"; import {timeDay, timeDays, timeYear} from "../src/index.js"; import {local, utc} from "./date.js"; -it("timeDays in an alias for timeDay.range", () => { +test("timeDays in an alias for timeDay.range", () => { assert.strictEqual(timeDays, timeDay.range); }); -it("timeDay() is equivalent to timeDay.floor(new Date)", () => { +test("timeDay() is equivalent to timeDay.floor(new Date)", () => { const t = new Date; assert.deepStrictEqual(timeDay(), timeDay.floor(t)); }); -it("timeDay(date) is equivalent to timeDay.floor(date)", () => { +test("timeDay(date) is equivalent to timeDay.floor(date)", () => { const t = new Date; assert.deepStrictEqual(timeDay(t), timeDay.floor(t)); }); -it("timeDay.floor(date) returns days", () => { +test("timeDay.floor(date) returns days", () => { assert.deepStrictEqual(timeDay.floor(local(2010, 11, 31, 23)), local(2010, 11, 31)); assert.deepStrictEqual(timeDay.floor(local(2011, 0, 1, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeDay.floor(local(2011, 0, 1, 1)), local(2011, 0, 1)); }); -it("timeDay.floor(date) observes daylight saving", () => { +test("timeDay.floor(date) observes daylight saving", () => { assert.deepStrictEqual(timeDay.floor(utc(2011, 2, 13, 7)), local(2011, 2, 12)); assert.deepStrictEqual(timeDay.floor(utc(2011, 2, 13, 8)), local(2011, 2, 13)); assert.deepStrictEqual(timeDay.floor(utc(2011, 2, 13, 9)), local(2011, 2, 13)); @@ -33,16 +34,16 @@ it("timeDay.floor(date) observes daylight saving", () => { assert.deepStrictEqual(timeDay.floor(utc(2011, 10, 6, 10)), local(2011, 10, 6)); }); -it("timeDay.floor(date) handles years in the first century", () => { +test("timeDay.floor(date) handles years in the first century", () => { assert.deepStrictEqual(timeDay.floor(local(9, 10, 6, 7)), local(9, 10, 6)); }); -it("timeDay.round(date) returns days", () => { +test("timeDay.round(date) returns days", () => { assert.deepStrictEqual(timeDay.round(local(2010, 11, 30, 13)), local(2010, 11, 31)); assert.deepStrictEqual(timeDay.round(local(2010, 11, 30, 11)), local(2010, 11, 30)); }); -it("timeDay.round(date) observes daylight saving", () => { +test("timeDay.round(date) observes daylight saving", () => { assert.deepStrictEqual(timeDay.round(utc(2011, 2, 13, 7)), local(2011, 2, 13)); assert.deepStrictEqual(timeDay.round(utc(2011, 2, 13, 8)), local(2011, 2, 13)); assert.deepStrictEqual(timeDay.round(utc(2011, 2, 13, 9)), local(2011, 2, 13)); @@ -53,69 +54,69 @@ it("timeDay.round(date) observes daylight saving", () => { assert.deepStrictEqual(timeDay.round(utc(2011, 10, 6, 20)), local(2011, 10, 7)); }); -it("timeDay.round(date) handles midnight in leap years", () => { +test("timeDay.round(date) handles midnight in leap years", () => { assert.deepStrictEqual(timeDay.round(utc(2012, 2, 1, 0)), local(2012, 2, 1)); assert.deepStrictEqual(timeDay.round(utc(2012, 2, 1, 0)), local(2012, 2, 1)); }); -it("timeDay.ceil(date) returns days", () => { +test("timeDay.ceil(date) returns days", () => { assert.deepStrictEqual(timeDay.ceil(local(2010, 11, 30, 23)), local(2010, 11, 31)); assert.deepStrictEqual(timeDay.ceil(local(2010, 11, 31, 0)), local(2010, 11, 31)); assert.deepStrictEqual(timeDay.ceil(local(2010, 11, 31, 1)), local(2011, 0, 1)); }); -it("timeDay.ceil(date) observes start of daylight saving", () => { +test("timeDay.ceil(date) observes start of daylight saving", () => { assert.deepStrictEqual(timeDay.ceil(utc(2011, 2, 13, 7)), local(2011, 2, 13)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 2, 13, 8)), local(2011, 2, 13)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 2, 13, 9)), local(2011, 2, 14)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 2, 13, 10)), local(2011, 2, 14)); }); -it("timeDay.ceil(date) observes end of daylight saving", () => { +test("timeDay.ceil(date) observes end of daylight saving", () => { assert.deepStrictEqual(timeDay.ceil(utc(2011, 10, 6, 7)), local(2011, 10, 6)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 10, 6, 8)), local(2011, 10, 7)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 10, 6, 9)), local(2011, 10, 7)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 10, 6, 10)), local(2011, 10, 7)); }); -it("timeDay.ceil(date) handles midnight for leap years", () => { +test("timeDay.ceil(date) handles midnight for leap years", () => { assert.deepStrictEqual(timeDay.ceil(utc(2012, 2, 1, 0)), local(2012, 2, 1)); assert.deepStrictEqual(timeDay.ceil(utc(2012, 2, 1, 0)), local(2012, 2, 1)); }); -it("timeDay.offset(date) is an alias for timeDay.offset(date, 1)", () => { +test("timeDay.offset(date) is an alias for timeDay.offset(date, 1)", () => { assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31, 23, 59, 59, 999)), local(2011, 0, 1, 23, 59, 59, 999)); }); -it("timeDay.offset(date, step) does not modify the passed-in date", () => { +test("timeDay.offset(date, step) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeDay.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -it("timeDay.offset(date, step) does not round the passed-in date", () => { +test("timeDay.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 1, 23, 59, 59, 999)); assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 29, 23, 59, 59, 456)); }); -it("timeDay.offset(date, step) allows step to be negative", () => { +test("timeDay.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31), -1), local(2010, 11, 30)); assert.deepStrictEqual(timeDay.offset(local(2011, 0, 1), -2), local(2010, 11, 30)); assert.deepStrictEqual(timeDay.offset(local(2011, 0, 1), -1), local(2010, 11, 31)); }); -it("timeDay.offset(date, step) allows step to be positive", () => { +test("timeDay.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31), +1), local(2011, 0, 1)); assert.deepStrictEqual(timeDay.offset(local(2010, 11, 30), +2), local(2011, 0, 1)); assert.deepStrictEqual(timeDay.offset(local(2010, 11, 30), +1), local(2010, 11, 31)); }); -it("timeDay.offset(date, step) allows step to be zero", () => { +test("timeDay.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -it("timeDay.range(start, stop) returns days between start (inclusive) and stop (exclusive)", () => { +test("timeDay.range(start, stop) returns days between start (inclusive) and stop (exclusive)", () => { assert.deepStrictEqual(timeDay.range(local(2011, 10, 4), local(2011, 10, 10)), [ local(2011, 10, 4), local(2011, 10, 5), @@ -126,7 +127,7 @@ it("timeDay.range(start, stop) returns days between start (inclusive) and stop ( ]); }); -it("timeDay.range(start, stop) returns days", () => { +test("timeDay.range(start, stop) returns days", () => { assert.deepStrictEqual(timeDay.range(local(2011, 10, 4, 2), local(2011, 10, 10, 13)), [ local(2011, 10, 5), local(2011, 10, 6), @@ -137,7 +138,7 @@ it("timeDay.range(start, stop) returns days", () => { ]); }); -it("timeDay.range(start, stop) coerces start and stop to dates", () => { +test("timeDay.range(start, stop) coerces start and stop to dates", () => { assert.deepStrictEqual(timeDay.range(+local(2011, 10, 4), +local(2011, 10, 7)), [ local(2011, 10, 4), local(2011, 10, 5), @@ -145,16 +146,16 @@ it("timeDay.range(start, stop) coerces start and stop to dates", () => { ]); }); -it("timeDay.range(start, stop) returns the empty array for invalid dates", () => { +test("timeDay.range(start, stop) returns the empty array for invalid dates", () => { assert.deepStrictEqual(timeDay.range(new Date(NaN), Infinity), []); }); -it("timeDay.range(start, stop) returns the empty array if start >= stop", () => { +test("timeDay.range(start, stop) returns the empty array if start >= stop", () => { assert.deepStrictEqual(timeDay.range(local(2011, 10, 10), local(2011, 10, 4)), []); assert.deepStrictEqual(timeDay.range(local(2011, 10, 10), local(2011, 10, 10)), []); }); -it("timeDay.range(start, stop, step) returns every step day", () => { +test("timeDay.range(start, stop, step) returns every step day", () => { assert.deepStrictEqual(timeDay.range(local(2011, 10, 4, 2), local(2011, 10, 14, 13), 3), [ local(2011, 10, 5), local(2011, 10, 8), @@ -163,14 +164,14 @@ it("timeDay.range(start, stop, step) returns every step day", () => { ]); }); -it("timeDay.range(start, stop, step) returns the empty array if step is zero, negative or NaN", () => { +test("timeDay.range(start, stop, step) returns the empty array if step is zero, negative or NaN", () => { assert.deepStrictEqual(timeDay.range(local(2011, 0, 1, 0), local(2011, 4, 9, 0), 0), []); assert.deepStrictEqual(timeDay.range(local(2011, 0, 1, 0), local(2011, 4, 9, 0), -1), []); assert.deepStrictEqual(timeDay.range(local(2011, 0, 1, 0), local(2011, 4, 9, 0), 0.5), []); assert.deepStrictEqual(timeDay.range(local(2011, 0, 1, 0), local(2011, 4, 9, 0), NaN), []); }); -it("timeDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { +test("timeDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { assert.strictEqual(timeDay.count(local(2011, 0, 1, 0), local(2011, 4, 9, 0)), 128); assert.strictEqual(timeDay.count(local(2011, 0, 1, 1), local(2011, 4, 9, 0)), 128); assert.strictEqual(timeDay.count(local(2010, 11, 31, 23), local(2011, 4, 9, 0)), 129); @@ -178,7 +179,7 @@ it("timeDay.count(start, end) counts days after start (exclusive) and before end assert.strictEqual(timeDay.count(local(2011, 0, 1, 0), local(2011, 4, 9, 1)), 128); }); -it("timeDay.count(start, end) observes daylight saving", () => { +test("timeDay.count(start, end) observes daylight saving", () => { assert.strictEqual(timeDay.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 71); assert.strictEqual(timeDay.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 71); assert.strictEqual(timeDay.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 71); @@ -187,12 +188,12 @@ it("timeDay.count(start, end) observes daylight saving", () => { assert.strictEqual(timeDay.count(local(2011, 0, 1), local(2011, 10, 6, 2)), 309); }); -it("timeDay.count(start, stop) does not exhibit floating-point rounding error", () => { +test("timeDay.count(start, stop) does not exhibit floating-point rounding error", () => { const date = new Date(2011, 4, 9); assert.strictEqual(timeDay.count(timeYear(date), date), 128); }); -it("timeDay.count(start, end) returns 364 or 365 for a full year", () => { +test("timeDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(timeDay.count(local(1999, 0, 1), local(1999, 11, 31)), 364); assert.strictEqual(timeDay.count(local(2000, 0, 1), local(2000, 11, 31)), 365); // leap year assert.strictEqual(timeDay.count(local(2001, 0, 1), local(2001, 11, 31)), 364); @@ -208,7 +209,7 @@ it("timeDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(timeDay.count(local(2011, 0, 1), local(2011, 11, 31)), 364); }); -it("timeDay.every(step) returns every stepth day, starting with the first day of the month", () => { +test("timeDay.every(step) returns every stepth day, starting with the first day of the month", () => { assert.deepStrictEqual(timeDay.every(3).range(local(2008, 11, 30, 0, 12), local(2009, 0, 5, 23, 48)), [local(2008, 11, 31), local(2009, 0, 1), local(2009, 0, 4)]); assert.deepStrictEqual(timeDay.every(5).range(local(2008, 11, 30, 0, 12), local(2009, 0, 6, 23, 48)), [local(2008, 11, 31), local(2009, 0, 1), local(2009, 0, 6)]); assert.deepStrictEqual(timeDay.every(7).range(local(2008, 11, 30, 0, 12), local(2009, 0, 8, 23, 48)), [local(2009, 0, 1), local(2009, 0, 8)]); diff --git a/test/friday-test.js b/test/friday-test.js index b113ca6..f6230dd 100644 --- a/test/friday-test.js +++ b/test/friday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {timeFriday, timeFridays} from "../src/index.js"; import {local} from "./date.js"; -it("timeFridays in an alias for timeFriday.range", () => { +test("timeFridays in an alias for timeFriday.range", () => { assert.strictEqual(timeFridays, timeFriday.range); }); -it("timeFriday.floor(date) returns Fridays", () => { +test("timeFriday.floor(date) returns Fridays", () => { assert.deepStrictEqual(timeFriday.floor(local(2011, 0, 5, 23, 59, 59)), local(2010, 11, 31)); assert.deepStrictEqual(timeFriday.floor(local(2011, 0, 6, 0, 0, 0)), local(2010, 11, 31)); assert.deepStrictEqual(timeFriday.floor(local(2011, 0, 6, 0, 0, 1)), local(2010, 11, 31)); @@ -15,7 +16,7 @@ it("timeFriday.floor(date) returns Fridays", () => { assert.deepStrictEqual(timeFriday.floor(local(2011, 0, 7, 0, 0, 1)), local(2011, 0, 7)); }); -it("timeFriday.count(start, end) counts Fridays after start (exclusive) and before end (inclusive)", () => { +test("timeFriday.count(start, end) counts Fridays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -41,7 +42,7 @@ it("timeFriday.count(start, end) counts Fridays after start (exclusive) and befo assert.strictEqual(timeFriday.count(local(2010, 0, 1), local(2010, 0, 9)), 1); }); -it("timeFriday.count(start, end) observes daylight saving", () => { +test("timeFriday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeFriday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeFriday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeFriday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/hour-test.js b/test/hour-test.js index 7a78863..9f9829d 100644 --- a/test/hour-test.js +++ b/test/hour-test.js @@ -1,14 +1,15 @@ +import {test} from "vitest"; import assert from "assert"; import {timeHour} from "../src/index.js"; import {local, utc} from "./date.js"; -it("timeHour.floor(date) returns hours", () => { +test("timeHour.floor(date) returns hours", () => { assert.deepStrictEqual(timeHour.floor(local(2010, 11, 31, 23, 59)), local(2010, 11, 31, 23)); assert.deepStrictEqual(timeHour.floor(local(2011, 0, 1, 0, 0)), local(2011, 0, 1, 0)); assert.deepStrictEqual(timeHour.floor(local(2011, 0, 1, 0, 1)), local(2011, 0, 1, 0)); }); -it("timeHour.floor(date) observes start of daylight savings time", () => { +test("timeHour.floor(date) observes start of daylight savings time", () => { assert.deepStrictEqual(timeHour.floor(utc(2011, 2, 13, 8, 59)), utc(2011, 2, 13, 8)); assert.deepStrictEqual(timeHour.floor(utc(2011, 2, 13, 9, 0)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(timeHour.floor(utc(2011, 2, 13, 9, 1)), utc(2011, 2, 13, 9)); @@ -17,7 +18,7 @@ it("timeHour.floor(date) observes start of daylight savings time", () => { assert.deepStrictEqual(timeHour.floor(utc(2011, 2, 13, 10, 1)), utc(2011, 2, 13, 10)); }); -it("timeHour.floor(date) observes end of daylight savings time", () => { +test("timeHour.floor(date) observes end of daylight savings time", () => { assert.deepStrictEqual(timeHour.floor(utc(2011, 10, 6, 7, 59)), utc(2011, 10, 6, 7)); assert.deepStrictEqual(timeHour.floor(utc(2011, 10, 6, 8, 0)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(timeHour.floor(utc(2011, 10, 6, 8, 1)), utc(2011, 10, 6, 8)); @@ -26,13 +27,13 @@ it("timeHour.floor(date) observes end of daylight savings time", () => { assert.deepStrictEqual(timeHour.floor(utc(2011, 10, 6, 9, 1)), utc(2011, 10, 6, 9)); }); -it("timeHour.ceil(date) returns hours", () => { +test("timeHour.ceil(date) returns hours", () => { assert.deepStrictEqual(timeHour.ceil(local(2010, 11, 31, 23, 59)), local(2011, 0, 1, 0)); assert.deepStrictEqual(timeHour.ceil(local(2011, 0, 1, 0, 0)), local(2011, 0, 1, 0)); assert.deepStrictEqual(timeHour.ceil(local(2011, 0, 1, 0, 1)), local(2011, 0, 1, 1)); }); -it("timeHour.ceil(date) observes start of daylight savings time", () => { +test("timeHour.ceil(date) observes start of daylight savings time", () => { assert.deepStrictEqual(timeHour.ceil(utc(2011, 2, 13, 8, 59)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(timeHour.ceil(utc(2011, 2, 13, 9, 0)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(timeHour.ceil(utc(2011, 2, 13, 9, 1)), utc(2011, 2, 13, 10)); @@ -41,7 +42,7 @@ it("timeHour.ceil(date) observes start of daylight savings time", () => { assert.deepStrictEqual(timeHour.ceil(utc(2011, 2, 13, 10, 1)), utc(2011, 2, 13, 11)); }); -it("timeHour.ceil(date) observes end of daylight savings time", () => { +test("timeHour.ceil(date) observes end of daylight savings time", () => { assert.deepStrictEqual(timeHour.ceil(utc(2011, 10, 6, 7, 59)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(timeHour.ceil(utc(2011, 10, 6, 8, 0)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(timeHour.ceil(utc(2011, 10, 6, 8, 1)), utc(2011, 10, 6, 9)); @@ -50,35 +51,35 @@ it("timeHour.ceil(date) observes end of daylight savings time", () => { assert.deepStrictEqual(timeHour.ceil(utc(2011, 10, 6, 9, 1)), utc(2011, 10, 6, 10)); }); -it("timeHour.offset(date) does not modify the passed-in date", () => { +test("timeHour.offset(date) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeHour.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -it("timeHour.offset(date) does not round the passed-in-date", () => { +test("timeHour.offset(date) does not round the passed-in-date", () => { assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 1, 0, 59, 59, 999)); assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 31, 21, 59, 59, 456)); }); -it("timeHour.offset(date) allows negative offsets", () => { +test("timeHour.offset(date) allows negative offsets", () => { assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 12), -1), local(2010, 11, 31, 11)); assert.deepStrictEqual(timeHour.offset(local(2011, 0, 1, 1), -2), local(2010, 11, 31, 23)); assert.deepStrictEqual(timeHour.offset(local(2011, 0, 1, 0), -1), local(2010, 11, 31, 23)); }); -it("timeHour.offset(date) allows positive offsets", () => { +test("timeHour.offset(date) allows positive offsets", () => { assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 11), +1), local(2010, 11, 31, 12)); assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23), +2), local(2011, 0, 1, 1)); assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23), +1), local(2011, 0, 1, 0)); }); -it("timeHour.offset(date) allows zero offset", () => { +test("timeHour.offset(date) allows zero offset", () => { assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -it("timeHour.range(start, stop) returns hours", () => { +test("timeHour.range(start, stop) returns hours", () => { assert.deepStrictEqual(timeHour.range(local(2010, 11, 31, 12, 30), local(2010, 11, 31, 15, 30)), [ local(2010, 11, 31, 13), local(2010, 11, 31, 14), @@ -86,15 +87,15 @@ it("timeHour.range(start, stop) returns hours", () => { ]); }); -it("timeHour.range(start, stop) has an inclusive lower bound", () => { +test("timeHour.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(timeHour.range(local(2010, 11, 31, 23), local(2011, 0, 1, 2))[0], local(2010, 11, 31, 23)); }); -it("timeHour.range(start, stop) has an exclusive upper bound", () => { +test("timeHour.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(timeHour.range(local(2010, 11, 31, 23), local(2011, 0, 1, 2))[2], local(2011, 0, 1, 1)); }); -it("timeHour.range(start, stop) can skip hours", () => { +test("timeHour.range(start, stop) can skip hours", () => { assert.deepStrictEqual(timeHour.range(local(2011, 1, 1, 1), local(2011, 1, 1, 13), 3), [ local(2011, 1, 1, 1), local(2011, 1, 1, 4), @@ -103,7 +104,7 @@ it("timeHour.range(start, stop) can skip hours", () => { ]); }); -it("timeHour.range(start, stop) observes start of daylight savings time", () => { +test("timeHour.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(timeHour.range(local(2011, 2, 13, 1), local(2011, 2, 13, 5)), [ utc(2011, 2, 13, 9), utc(2011, 2, 13, 10), @@ -111,7 +112,7 @@ it("timeHour.range(start, stop) observes start of daylight savings time", () => ]); }); -it("timeHour.range(start, stop) observes end of daylight savings time", () => { +test("timeHour.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(timeHour.range(local(2011, 10, 6, 0), local(2011, 10, 6, 2)), [ utc(2011, 10, 6, 7), utc(2011, 10, 6, 8), @@ -119,12 +120,12 @@ it("timeHour.range(start, stop) observes end of daylight savings time", () => { ]); }); -it("timeHour.every(step) returns every stepth hour, starting with the first hour of the day", () => { +test("timeHour.every(step) returns every stepth hour, starting with the first hour of the day", () => { assert.deepStrictEqual(timeHour.every(4).range(local(2008, 11, 30, 12, 47), local(2008, 11, 31, 13, 57)), [local(2008, 11, 30, 16), local(2008, 11, 30, 20), local(2008, 11, 31, 0), local(2008, 11, 31, 4), local(2008, 11, 31, 8), local(2008, 11, 31, 12)]); assert.deepStrictEqual(timeHour.every(12).range(local(2008, 11, 30, 12, 47), local(2008, 11, 31, 13, 57)), [local(2008, 11, 31, 0), local(2008, 11, 31, 12)]); }); -it("timeHour.range(start, stop) returns every hour crossing the daylight savings boundary", () => { +test("timeHour.range(start, stop) returns every hour crossing the daylight savings boundary", () => { assert.deepStrictEqual(timeHour.range(new Date(1478422800000 - 2 * 36e5), new Date(1478422800000 + 2 * 36e5)), [ new Date(1478415600000), // Sun Nov 6 2016 0:00:00 GMT-0700 (PDT) new Date(1478419200000), // Sun Nov 6 2016 1:00:00 GMT-0700 (PDT) diff --git a/test/interval-test.js b/test/interval-test.js index 65bdbd0..7f4de68 100644 --- a/test/interval-test.js +++ b/test/interval-test.js @@ -1,18 +1,19 @@ +import {test} from "vitest"; import assert from "assert"; import {timeDay, timeHour, timeInterval, timeMinute, timeSecond, timeYear} from "../src/index.js"; import {local, utc} from "./date.js"; -it("timeInterval() is equivalent to timeInterval.floor(new Date)", () => { +test("timeInterval() is equivalent to timeInterval.floor(new Date)", () => { const t = new Date; assert.deepStrictEqual(timeYear(), timeYear.floor(t)); }); -it("timeInterval(date) is equivalent to timeInterval.floor(date)", () => { +test("timeInterval(date) is equivalent to timeInterval.floor(date)", () => { const t = new Date; assert.deepStrictEqual(timeYear(t), timeYear.floor(t)); }); -it("timeInterval(floor, offset) returns a custom time interval", () => { +test("timeInterval(floor, offset) returns a custom time interval", () => { const i = timeInterval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { @@ -21,7 +22,7 @@ it("timeInterval(floor, offset) returns a custom time interval", () => { assert.deepStrictEqual(i(utc(2015, 0, 1, 12, 34, 56, 789)), utc(2015, 0, 1, 12)); }); -it("timeInterval(floor, offset) does not define a count method", () => { +test("timeInterval(floor, offset) does not define a count method", () => { const i = timeInterval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { @@ -30,7 +31,7 @@ it("timeInterval(floor, offset) does not define a count method", () => { assert(!("count" in i)); }); -it("timeInterval(floor, offset) floors the step before passing it to offset", () => { +test("timeInterval(floor, offset) floors the step before passing it to offset", () => { const steps = [], i = timeInterval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { @@ -41,7 +42,7 @@ it("timeInterval(floor, offset) floors the step before passing it to offset", () assert(steps.every(function(step) { return step === 1; })); }); -it("timeInterval(floor, offset, count) defines a count method", () => { +test("timeInterval(floor, offset, count) defines a count method", () => { const i = timeInterval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { @@ -52,7 +53,7 @@ it("timeInterval(floor, offset, count) defines a count method", () => { assert.strictEqual(i.count(utc(2015, 0, 1, 12, 34), utc(2015, 0, 1, 15, 56)), 3); }); -it("timeInterval(floor, offset, count) floors dates before passing them to count", () => { +test("timeInterval(floor, offset, count) floors dates before passing them to count", () => { const dates = [], i = timeInterval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { @@ -64,7 +65,7 @@ it("timeInterval(floor, offset, count) floors dates before passing them to count assert.deepStrictEqual(dates, [utc(2015, 0, 1, 12), utc(2015, 0, 1, 15)]); }); -it("timeInterval.every(step) returns null if step is invalid", () => { +test("timeInterval.every(step) returns null if step is invalid", () => { assert.strictEqual(timeDay.every(), null); assert.strictEqual(timeMinute.every(null), null); assert.strictEqual(timeSecond.every(undefined), null); @@ -74,17 +75,17 @@ it("timeInterval.every(step) returns null if step is invalid", () => { assert.strictEqual(timeHour.every(-1), null); }); -it("timeInterval.every(step) returns interval if step is one", () => { +test("timeInterval.every(step) returns interval if step is one", () => { assert.strictEqual(timeDay.every("1"), timeDay); assert.strictEqual(timeMinute.every(1), timeMinute); assert.strictEqual(timeSecond.every(1.8), timeSecond); }); -it("timeInterval.every(step).range(invalid, invalid) returns the empty array", () => { +test("timeInterval.every(step).range(invalid, invalid) returns the empty array", () => { assert.deepStrictEqual(timeMinute.every(15).range(NaN, NaN), []); }); -it("timeInterval.every(…).offset(date, step) returns the expected value when step is positive", () => { +test("timeInterval.every(…).offset(date, step) returns the expected value when step is positive", () => { const i = timeMinute.every(15); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), 0), local(2015, 0, 1, 12, 34)); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), 1), local(2015, 0, 1, 12, 45)); @@ -94,14 +95,14 @@ it("timeInterval.every(…).offset(date, step) returns the expected value when s assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), 5), local(2015, 0, 1, 13, 45)); }); -it("timeInterval.every(…).offset(date, step) returns the expected value when step is negative", () => { +test("timeInterval.every(…).offset(date, step) returns the expected value when step is negative", () => { const i = timeMinute.every(15); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), -1), local(2015, 0, 1, 12, 30)); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), -2), local(2015, 0, 1, 12, 15)); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), -3), local(2015, 0, 1, 12, 0)); }); -it("timeInterval.every(…).offset(date, step) returns the expected value when step is not an integer", () => { +test("timeInterval.every(…).offset(date, step) returns the expected value when step is not an integer", () => { const i = timeMinute.every(15); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), 1.2), local(2015, 0, 1, 12, 45)); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), -0.8), local(2015, 0, 1, 12, 30)); diff --git a/test/millisecond-test.js b/test/millisecond-test.js index def18c2..024a8b3 100644 --- a/test/millisecond-test.js +++ b/test/millisecond-test.js @@ -1,8 +1,9 @@ +import {test} from "vitest"; import assert from "assert"; import {timeMillisecond} from "../src/index.js"; import {local, utc} from "./date.js"; -it("timeMillisecond.every(step) returns every stepth millisecond, starting with the first millisecond of the second", () => { +test("timeMillisecond.every(step) returns every stepth millisecond, starting with the first millisecond of the second", () => { assert.deepStrictEqual(timeMillisecond.every(50).range(local(2008, 11, 30, 12, 36, 0, 947), local(2008, 11, 30, 12, 36, 1, 157)), [local(2008, 11, 30, 12, 36, 0, 950), local(2008, 11, 30, 12, 36, 1, 0), local(2008, 11, 30, 12, 36, 1, 50), local(2008, 11, 30, 12, 36, 1, 100), local(2008, 11, 30, 12, 36, 1, 150)]); assert.deepStrictEqual(timeMillisecond.every(100).range(local(2008, 11, 30, 12, 36, 0, 947), local(2008, 11, 30, 12, 36, 1, 157)), [local(2008, 11, 30, 12, 36, 1, 0), local(2008, 11, 30, 12, 36, 1, 100)]); assert.deepStrictEqual(timeMillisecond.every(50).range(utc(2008, 11, 30, 12, 36, 0, 947), utc(2008, 11, 30, 12, 36, 1, 157)), [utc(2008, 11, 30, 12, 36, 0, 950), utc(2008, 11, 30, 12, 36, 1, 0), utc(2008, 11, 30, 12, 36, 1, 50), utc(2008, 11, 30, 12, 36, 1, 100), utc(2008, 11, 30, 12, 36, 1, 150)]); diff --git a/test/minute-test.js b/test/minute-test.js index 5f1c718..98c47f8 100644 --- a/test/minute-test.js +++ b/test/minute-test.js @@ -1,50 +1,51 @@ +import {test} from "vitest"; import assert from "assert"; import {timeMinute} from "../src/index.js"; import {local, utc} from "./date.js"; -it("timeMinute.floor(date) returns minutes", () => { +test("timeMinute.floor(date) returns minutes", () => { assert.deepStrictEqual(timeMinute.floor(local(2010, 11, 31, 23, 59, 59)), local(2010, 11, 31, 23, 59)); assert.deepStrictEqual(timeMinute.floor(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1, 0, 0)); assert.deepStrictEqual(timeMinute.floor(local(2011, 0, 1, 0, 0, 59)), local(2011, 0, 1, 0, 0)); assert.deepStrictEqual(timeMinute.floor(local(2011, 0, 1, 0, 1, 0)), local(2011, 0, 1, 0, 1)); }); -it("timeMinute.ceil(date) returns minutes", () => { +test("timeMinute.ceil(date) returns minutes", () => { assert.deepStrictEqual(timeMinute.ceil(local(2010, 11, 31, 23, 59, 59)), local(2011, 0, 1, 0, 0)); assert.deepStrictEqual(timeMinute.ceil(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1, 0, 0)); assert.deepStrictEqual(timeMinute.ceil(local(2011, 0, 1, 0, 0, 59)), local(2011, 0, 1, 0, 1)); assert.deepStrictEqual(timeMinute.ceil(local(2011, 0, 1, 0, 1, 0)), local(2011, 0, 1, 0, 1)); }); -it("timeMinute.offset(date) does not modify the passed-in date", () => { +test("timeMinute.offset(date) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeMinute.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -it("timeMinute.offset(date) does not round the passed-in-date", () => { +test("timeMinute.offset(date) does not round the passed-in-date", () => { assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 1, 0, 0, 59, 999)); assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 31, 23, 57, 59, 456)); }); -it("timeMinute.offset(date) allows negative offsets", () => { +test("timeMinute.offset(date) allows negative offsets", () => { assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 12), -1), local(2010, 11, 31, 23, 11)); assert.deepStrictEqual(timeMinute.offset(local(2011, 0, 1, 0, 1), -2), local(2010, 11, 31, 23, 59)); assert.deepStrictEqual(timeMinute.offset(local(2011, 0, 1, 0, 0), -1), local(2010, 11, 31, 23, 59)); }); -it("timeMinute.offset(date) allows positive offsets", () => { +test("timeMinute.offset(date) allows positive offsets", () => { assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 11), +1), local(2010, 11, 31, 23, 12)); assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59), +2), local(2011, 0, 1, 0, 1)); assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59), +1), local(2011, 0, 1, 0, 0)); }); -it("timeMinute.offset(date) allows zero offset", () => { +test("timeMinute.offset(date) allows zero offset", () => { assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -it("timeMinute.range(start, stop), returns minutes", () => { +test("timeMinute.range(start, stop), returns minutes", () => { assert.deepStrictEqual(timeMinute.range(local(2010, 11, 31, 23, 59), local(2011, 0, 1, 0, 2)), [ local(2010, 11, 31, 23, 59), local(2011, 0, 1, 0, 0), @@ -52,15 +53,15 @@ it("timeMinute.range(start, stop), returns minutes", () => { ]); }); -it("timeMinute.range(start, stop), has an inclusive lower bound", () => { +test("timeMinute.range(start, stop), has an inclusive lower bound", () => { assert.deepStrictEqual(timeMinute.range(local(2010, 11, 31, 23, 59), local(2011, 0, 1, 0, 2))[0], local(2010, 11, 31, 23, 59)); }); -it("timeMinute.range(start, stop), has an exclusive upper bound", () => { +test("timeMinute.range(start, stop), has an exclusive upper bound", () => { assert.deepStrictEqual(timeMinute.range(local(2010, 11, 31, 23, 59), local(2011, 0, 1, 0, 2))[2], local(2011, 0, 1, 0, 1)); }); -it("timeMinute.range(start, stop), can skip minutes", () => { +test("timeMinute.range(start, stop), can skip minutes", () => { assert.deepStrictEqual(timeMinute.range(local(2011, 1, 1, 12, 7), local(2011, 1, 1, 13, 7), 15), [ local(2011, 1, 1, 12, 7), local(2011, 1, 1, 12, 22), @@ -69,7 +70,7 @@ it("timeMinute.range(start, stop), can skip minutes", () => { ]); }); -it("timeMinute.range(start, stop), observes start of daylight savings time", () => { +test("timeMinute.range(start, stop), observes start of daylight savings time", () => { assert.deepStrictEqual(timeMinute.range(utc(2011, 2, 13, 9, 59), utc(2011, 2, 13, 10, 2)), [ utc(2011, 2, 13, 9, 59), utc(2011, 2, 13, 10, 0), @@ -77,7 +78,7 @@ it("timeMinute.range(start, stop), observes start of daylight savings time", () ]); }); -it("timeMinute.range(start, stop), observes end of daylight savings time", () => { +test("timeMinute.range(start, stop), observes end of daylight savings time", () => { assert.deepStrictEqual(timeMinute.range(utc(2011, 10, 6, 8, 59), utc(2011, 10, 6, 9, 2)), [ utc(2011, 10, 6, 8, 59), utc(2011, 10, 6, 9, 0), @@ -85,12 +86,12 @@ it("timeMinute.range(start, stop), observes end of daylight savings time", () => ]); }); -it("timeMinute.every(step) returns every stepth minute, starting with the first minute of the hour", () => { +test("timeMinute.every(step) returns every stepth minute, starting with the first minute of the hour", () => { assert.deepStrictEqual(timeMinute.every(15).range(local(2008, 11, 30, 12, 47), local(2008, 11, 30, 13, 57)), [local(2008, 11, 30, 13, 0), local(2008, 11, 30, 13, 15), local(2008, 11, 30, 13, 30), local(2008, 11, 30, 13, 45)]); assert.deepStrictEqual(timeMinute.every(30).range(local(2008, 11, 30, 12, 47), local(2008, 11, 30, 13, 57)), [local(2008, 11, 30, 13, 0), local(2008, 11, 30, 13, 30)]); }); -it("timeMinute.range(start, stop) returns every minute crossing the daylight savings boundary", () => { +test("timeMinute.range(start, stop) returns every minute crossing the daylight savings boundary", () => { assert.deepStrictEqual(timeMinute.range(new Date(1478422800000 - 2 * 6e4), new Date(1478422800000 + 2 * 6e4)), [ new Date(1478422680000), // Sun Nov 6 2016 1:58:00 GMT-0700 (PDT) new Date(1478422740000), // Sun Nov 6 2016 1:59:00 GMT-0700 (PDT) diff --git a/test/monday-test.js b/test/monday-test.js index 8ef3d79..7d18334 100644 --- a/test/monday-test.js +++ b/test/monday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {timeMonday, timeMondays} from "../src/index.js"; import {local} from "./date.js"; -it("timeMondays in an alias for timeMonday.range", () => { +test("timeMondays in an alias for timeMonday.range", () => { assert.strictEqual(timeMondays, timeMonday.range); }); -it("timeMonday.floor(date) returns Mondays", () => { +test("timeMonday.floor(date) returns Mondays", () => { assert.deepStrictEqual(timeMonday.floor(local(2011, 0, 1, 23, 59, 59)), local(2010, 11, 27)); assert.deepStrictEqual(timeMonday.floor(local(2011, 0, 2, 0, 0, 0)), local(2010, 11, 27)); assert.deepStrictEqual(timeMonday.floor(local(2011, 0, 2, 0, 0, 1)), local(2010, 11, 27)); @@ -15,7 +16,7 @@ it("timeMonday.floor(date) returns Mondays", () => { assert.deepStrictEqual(timeMonday.floor(local(2011, 0, 3, 0, 0, 1)), local(2011, 0, 3)); }); -it("timeMonday.range(start, stop, step) returns every step Monday", () => { +test("timeMonday.range(start, stop, step) returns every step Monday", () => { assert.deepStrictEqual(timeMonday.range(local(2011, 11, 1), local(2012, 0, 15), 2), [ local(2011, 11, 5), local(2011, 11, 19), @@ -23,7 +24,7 @@ it("timeMonday.range(start, stop, step) returns every step Monday", () => { ]); }); -it("timeMonday.count(start, end) counts Mondays after start (exclusive) and before end (inclusive)", () => { +test("timeMonday.count(start, end) counts Mondays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -48,7 +49,7 @@ it("timeMonday.count(start, end) counts Mondays after start (exclusive) and befo assert.strictEqual(timeMonday.count(local(2018, 0, 1), local(2018, 0, 9)), 1); }); -it("timeMonday.count(start, end) observes daylight saving", () => { +test("timeMonday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeMonday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeMonday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeMonday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/month-test.js b/test/month-test.js index 2c278d0..9ec105e 100644 --- a/test/month-test.js +++ b/test/month-test.js @@ -1,82 +1,83 @@ +import {test} from "vitest"; import assert from "assert"; import {timeMonth, timeMonths} from "../src/index.js"; import {local, utc} from "./date.js"; -it("timeMonths in an alias for timeMonth.range", () => { +test("timeMonths in an alias for timeMonth.range", () => { assert.strictEqual(timeMonths, timeMonth.range); }); -it("timeMonth.floor(date) returns months", () => { +test("timeMonth.floor(date) returns months", () => { assert.deepStrictEqual(timeMonth.floor(local(2010, 11, 31, 23, 59, 59)), local(2010, 11, 1)); assert.deepStrictEqual(timeMonth.floor(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.floor(local(2011, 0, 1, 0, 0, 1)), local(2011, 0, 1)); }); -it("timeMonth.floor(date) observes the start of daylight savings time", () => { +test("timeMonth.floor(date) observes the start of daylight savings time", () => { assert.deepStrictEqual(timeMonth.floor(local(2011, 2, 13, 1)), local(2011, 2, 1)); }); -it("timeMonth.floor(date) observes the end of the daylight savings time", () => { +test("timeMonth.floor(date) observes the end of the daylight savings time", () => { assert.deepStrictEqual(timeMonth.floor(local(2011, 10, 6, 1)), local(2011, 10, 1)); }); -it("timeMonth.floor(date) correctly handles years in the first century", () => { +test("timeMonth.floor(date) correctly handles years in the first century", () => { assert.deepStrictEqual(timeMonth.floor(local(9, 10, 6, 7)), local(9, 10, 1)); }); -it("timeMonth.ceil(date) returns months", () => { +test("timeMonth.ceil(date) returns months", () => { assert.deepStrictEqual(timeMonth.ceil(local(2010, 11, 31, 23, 59, 59)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.ceil(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.ceil(local(2011, 0, 1, 0, 0, 1)), local(2011, 1, 1)); }); -it("timeMonth.ceil(date) observes the start of daylight savings time", () => { +test("timeMonth.ceil(date) observes the start of daylight savings time", () => { assert.deepStrictEqual(timeMonth.ceil(local(2011, 2, 13, 1)), local(2011, 3, 1)); }); -it("timeMonth.ceil(date) observes the end of the daylight savings time", () => { +test("timeMonth.ceil(date) observes the end of the daylight savings time", () => { assert.deepStrictEqual(timeMonth.ceil(local(2011, 10, 6, 1)), local(2011, 11, 1)); }); -it("timeMonth.offset(date) does not modify the passed-in date", () => { +test("timeMonth.offset(date) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeMonth.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -it("timeMonth.offset(date) does not round the passed-in-date", () => { +test("timeMonth.offset(date) does not round the passed-in-date", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 9, 31, 23, 59, 59, 456)); }); -it("timeMonth.offset(date) allows negative offsets", () => { +test("timeMonth.offset(date) allows negative offsets", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 1), -1), local(2010, 10, 1)); assert.deepStrictEqual(timeMonth.offset(local(2011, 0, 1), -2), local(2010, 10, 1)); assert.deepStrictEqual(timeMonth.offset(local(2011, 0, 1), -1), local(2010, 11, 1)); }); -it("timeMonth.offset(date) allows positive offsets", () => { +test("timeMonth.offset(date) allows positive offsets", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 10, 1), +1), local(2010, 11, 1)); assert.deepStrictEqual(timeMonth.offset(local(2010, 10, 1), +2), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 1), +1), local(2011, 0, 1)); }); -it("timeMonth.offset(date) allows zero offset", () => { +test("timeMonth.offset(date) allows zero offset", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -it("timeMonths in an alias for timeMonth.range", () => { +test("timeMonths in an alias for timeMonth.range", () => { assert.strictEqual(timeMonths, timeMonth.range); }); -it("timeMonth.floor(date) returns months", () => { +test("timeMonth.floor(date) returns months", () => { assert.deepStrictEqual(timeMonth.floor(local(2010, 11, 31, 23)), local(2010, 11, 1)); assert.deepStrictEqual(timeMonth.floor(local(2011, 0, 1, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.floor(local(2011, 0, 1, 1)), local(2011, 0, 1)); }); -it("timeMonth.floor(date) observes daylight saving", () => { +test("timeMonth.floor(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.floor(utc(2011, 2, 13, 7)), local(2011, 2, 1)); assert.deepStrictEqual(timeMonth.floor(utc(2011, 2, 13, 8)), local(2011, 2, 1)); assert.deepStrictEqual(timeMonth.floor(utc(2011, 2, 13, 9)), local(2011, 2, 1)); @@ -87,16 +88,16 @@ it("timeMonth.floor(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.floor(utc(2011, 10, 6, 10)), local(2011, 10, 1)); }); -it("timeMonth.floor(date) handles years in the first century", () => { +test("timeMonth.floor(date) handles years in the first century", () => { assert.deepStrictEqual(timeMonth.floor(local(9, 10, 6, 7)), local(9, 10, 1)); }); -it("timeMonth.round(date) returns months", () => { +test("timeMonth.round(date) returns months", () => { assert.deepStrictEqual(timeMonth.round(local(2010, 11, 16, 12)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.round(local(2010, 11, 16, 11)), local(2010, 11, 1)); }); -it("timeMonth.round(date) observes daylight saving", () => { +test("timeMonth.round(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.round(utc(2011, 2, 13, 7)), local(2011, 2, 1)); assert.deepStrictEqual(timeMonth.round(utc(2011, 2, 13, 8)), local(2011, 2, 1)); assert.deepStrictEqual(timeMonth.round(utc(2011, 2, 13, 9)), local(2011, 2, 1)); @@ -107,12 +108,12 @@ it("timeMonth.round(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.round(utc(2011, 10, 6, 20)), local(2011, 10, 1)); }); -it("timeMonth.round(date) handles midnight for leap years", () => { +test("timeMonth.round(date) handles midnight for leap years", () => { assert.deepStrictEqual(timeMonth.round(utc(2012, 2, 1, 0)), local(2012, 2, 1)); assert.deepStrictEqual(timeMonth.round(utc(2012, 2, 1, 0)), local(2012, 2, 1)); }); -it("timeMonth.ceil(date) returns months", () => { +test("timeMonth.ceil(date) returns months", () => { assert.deepStrictEqual(timeMonth.ceil(local(2010, 10, 30, 23)), local(2010, 11, 1)); assert.deepStrictEqual(timeMonth.ceil(local(2010, 11, 1, 1)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.ceil(local(2011, 1, 1)), local(2011, 1, 1)); @@ -120,7 +121,7 @@ it("timeMonth.ceil(date) returns months", () => { assert.deepStrictEqual(timeMonth.ceil(local(2011, 3, 1)), local(2011, 3, 1)); }); -it("timeMonth.ceil(date) observes daylight saving", () => { +test("timeMonth.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.ceil(utc(2011, 2, 13, 7)), local(2011, 3, 1)); assert.deepStrictEqual(timeMonth.ceil(utc(2011, 2, 13, 8)), local(2011, 3, 1)); assert.deepStrictEqual(timeMonth.ceil(utc(2011, 2, 13, 9)), local(2011, 3, 1)); @@ -131,44 +132,44 @@ it("timeMonth.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.ceil(utc(2011, 10, 6, 10)), local(2011, 11, 1)); }); -it("timeMonth.ceil(date) handles midnight for leap years", () => { +test("timeMonth.ceil(date) handles midnight for leap years", () => { assert.deepStrictEqual(timeMonth.ceil(utc(2012, 2, 1, 0)), local(2012, 2, 1)); assert.deepStrictEqual(timeMonth.ceil(utc(2012, 2, 1, 0)), local(2012, 2, 1)); }); -it("timeMonth.offset(date) is an alias for timeMonth.offset(date, 1)", () => { +test("timeMonth.offset(date) is an alias for timeMonth.offset(date, 1)", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 999)), local(2011, 0, 31, 23, 59, 59, 999)); }); -it("timeMonth.offset(date, step) does not modify the passed-in date", () => { +test("timeMonth.offset(date, step) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeMonth.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -it("timeMonth.offset(date, step) does not round the passed-in date", () => { +test("timeMonth.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 9, 31, 23, 59, 59, 456)); }); -it("timeMonth.offset(date, step) allows step to be negative", () => { +test("timeMonth.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31), -1), local(2010, 10, 31)); assert.deepStrictEqual(timeMonth.offset(local(2011, 0, 1), -2), local(2010, 10, 1)); assert.deepStrictEqual(timeMonth.offset(local(2011, 0, 1), -1), local(2010, 11, 1)); }); -it("timeMonth.offset(date, step) allows step to be positive", () => { +test("timeMonth.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31), +1), local(2011, 0, 31)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 30), +2), local(2011, 1, 30)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 30), +1), local(2011, 0, 30)); }); -it("timeMonth.offset(date, step) allows step to be zero", () => { +test("timeMonth.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -it("timeMonth.range(start, stop) returns months between start (inclusive) and stop (exclusive)", () => { +test("timeMonth.range(start, stop) returns months between start (inclusive) and stop (exclusive)", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 11, 1), local(2012, 5, 1)), [ local(2011, 11, 1), local(2012, 0, 1), @@ -179,7 +180,7 @@ it("timeMonth.range(start, stop) returns months between start (inclusive) and st ]); }); -it("timeMonth.range(start, stop) returns months", () => { +test("timeMonth.range(start, stop) returns months", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 10, 4, 2), local(2012, 4, 10, 13)), [ local(2011, 11, 1), local(2012, 0, 1), @@ -190,7 +191,7 @@ it("timeMonth.range(start, stop) returns months", () => { ]); }); -it("timeMonth.range(start, stop) coerces start and stop to dates", () => { +test("timeMonth.range(start, stop) coerces start and stop to dates", () => { assert.deepStrictEqual(timeMonth.range(+local(2011, 10, 4), +local(2012, 1, 7)), [ local(2011, 11, 1), local(2012, 0, 1), @@ -198,16 +199,16 @@ it("timeMonth.range(start, stop) coerces start and stop to dates", () => { ]); }); -it("timeMonth.range(start, stop) returns the empty array for invalid dates", () => { +test("timeMonth.range(start, stop) returns the empty array for invalid dates", () => { assert.deepStrictEqual(timeMonth.range(new Date(NaN), Infinity), []); }); -it("timeMonth.range(start, stop) returns the empty array if start >= stop", () => { +test("timeMonth.range(start, stop) returns the empty array if start >= stop", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 11, 10), local(2011, 10, 4)), []); assert.deepStrictEqual(timeMonth.range(local(2011, 10, 1), local(2011, 10, 1)), []); }); -it("timeMonth.range(start, stop) returns months", () => { +test("timeMonth.range(start, stop) returns months", () => { assert.deepStrictEqual(timeMonth.range(local(2010, 10, 31), local(2011, 2, 1)), [ local(2010, 11, 1), local(2011, 0, 1), @@ -215,15 +216,15 @@ it("timeMonth.range(start, stop) returns months", () => { ]); }); -it("timeMonth.range(start, stop) has an inclusive lower bound", () => { +test("timeMonth.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(timeMonth.range(local(2010, 10, 31), local(2011, 2, 1))[0], local(2010, 11, 1)); }); -it("timeMonth.range(start, stop) has an exclusive upper bound", () => { +test("timeMonth.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(timeMonth.range(local(2010, 10, 31), local(2011, 2, 1))[2], local(2011, 1, 1)); }); -it("timeMonth.range(start, stop) can skip months", () => { +test("timeMonth.range(start, stop) can skip months", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 1, 1), local(2012, 1, 1), 3), [ local(2011, 1, 1), local(2011, 4, 1), @@ -232,7 +233,7 @@ it("timeMonth.range(start, stop) can skip months", () => { ]); }); -it("timeMonth.range(start, stop) observes start of daylight savings time", () => { +test("timeMonth.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 0, 1), local(2011, 4, 1)), [ local(2011, 0, 1), local(2011, 1, 1), @@ -241,7 +242,7 @@ it("timeMonth.range(start, stop) observes start of daylight savings time", () => ]); }); -it("timeMonth.range(start, stop) observes end of daylight savings time", () => { +test("timeMonth.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 9, 1), local(2012, 1, 1)), [ local(2011, 9, 1), local(2011, 10, 1), @@ -250,7 +251,7 @@ it("timeMonth.range(start, stop) observes end of daylight savings time", () => { ]); }); -it("timeMonth.count(start, end) counts months after start (exclusive) and before end (inclusive)", () => { +test("timeMonth.count(start, end) counts months after start (exclusive) and before end (inclusive)", () => { assert.strictEqual(timeMonth.count(local(2011, 0, 1), local(2011, 4, 1)), 4); assert.strictEqual(timeMonth.count(local(2011, 0, 1), local(2011, 3, 30)), 3); assert.strictEqual(timeMonth.count(local(2010, 11, 31), local(2011, 3, 30)), 4); @@ -259,6 +260,6 @@ it("timeMonth.count(start, end) counts months after start (exclusive) and before assert.strictEqual(timeMonth.count(local(2012, 4, 1), local(2009, 11, 31)), -29); }); -it("timeMonth.every(step) returns every stepth month, starting with the first month of the year", () => { +test("timeMonth.every(step) returns every stepth month, starting with the first month of the year", () => { assert.deepStrictEqual(timeMonth.every(3).range(local(2008, 11, 3), local(2010, 6, 5)), [local(2009, 0, 1), local(2009, 3, 1), local(2009, 6, 1), local(2009, 9, 1), local(2010, 0, 1), local(2010, 3, 1), local(2010, 6, 1)]); }); diff --git a/test/multiYear-test.js b/test/multiYear-test.js index eff0f65..dba68bd 100644 --- a/test/multiYear-test.js +++ b/test/multiYear-test.js @@ -1,37 +1,38 @@ +import {test} from "vitest"; import assert from "assert"; import {timeYear} from "../src/index.js"; import {local} from "./date.js"; -it("timeYear.every(n).floor(date) returns integer multiples of n years", () => { +test("timeYear.every(n).floor(date) returns integer multiples of n years", () => { assert.deepStrictEqual(timeYear.every(10).floor(local(2009, 11, 31, 23, 59, 59)), local(2000, 0, 1)); assert.deepStrictEqual(timeYear.every(10).floor(local(2010, 0, 1, 0, 0, 0)), local(2010, 0, 1)); assert.deepStrictEqual(timeYear.every(10).floor(local(2010, 0, 1, 0, 0, 1)), local(2010, 0, 1)); }); -it("timeYear.every(n).ceil(date) returns integer multiples of n years", () => { +test("timeYear.every(n).ceil(date) returns integer multiples of n years", () => { assert.deepStrictEqual(timeYear.every(100).ceil(local(1999, 11, 31, 23, 59, 59)), local(2000, 0, 1)); assert.deepStrictEqual(timeYear.every(100).ceil(local(2000, 0, 1, 0, 0, 0)), local(2000, 0, 1)); assert.deepStrictEqual(timeYear.every(100).ceil(local(2000, 0, 1, 0, 0, 1)), local(2100, 0, 1)); }); -it("timeYear.every(n).offset(date, count) does not modify the passed-in date", () => { +test("timeYear.every(n).offset(date, count) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeYear.every(5).offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -it("timeYear.every(n).offset(date, count) does not round the passed-in-date", () => { +test("timeYear.every(n).offset(date, count) does not round the passed-in-date", () => { assert.deepStrictEqual(timeYear.every(5).offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2015, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeYear.every(5).offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2000, 11, 31, 23, 59, 59, 456)); }); -it("timeYear.every(n) does not define interval.count or interval.every", () => { +test("timeYear.every(n) does not define interval.count or interval.every", () => { const decade = timeYear.every(10); assert.strictEqual(decade.count, undefined); assert.strictEqual(decade.every, undefined); }); -it("timeYear.every(n).range(start, stop) returns multiples of n years", () => { +test("timeYear.every(n).range(start, stop) returns multiples of n years", () => { assert.deepStrictEqual(timeYear.every(10).range(local(2010, 0, 1), local(2031, 0, 1)), [ local(2010, 0, 1), local(2020, 0, 1), diff --git a/test/saturday-test.js b/test/saturday-test.js index a297169..7fba9d8 100644 --- a/test/saturday-test.js +++ b/test/saturday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {timeSaturday, timeSaturdays} from "../src/index.js"; import {local} from "./date.js"; -it("timeSaturdays in an alias for timeSaturday.range", () => { +test("timeSaturdays in an alias for timeSaturday.range", () => { assert.strictEqual(timeSaturdays, timeSaturday.range); }); -it("timeSaturday.floor(date) returns Saturdays", () => { +test("timeSaturday.floor(date) returns Saturdays", () => { assert.deepStrictEqual(timeSaturday.floor(local(2011, 0, 6, 23, 59, 59)), local(2011, 0, 1)); assert.deepStrictEqual(timeSaturday.floor(local(2011, 0, 7, 0, 0, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeSaturday.floor(local(2011, 0, 7, 0, 0, 1)), local(2011, 0, 1)); @@ -15,7 +16,7 @@ it("timeSaturday.floor(date) returns Saturdays", () => { assert.deepStrictEqual(timeSaturday.floor(local(2011, 0, 8, 0, 0, 1)), local(2011, 0, 8)); }); -it("timeSaturday.count(start, end) counts Saturdays after start (exclusive) and before end (inclusive)", () => { +test("timeSaturday.count(start, end) counts Saturdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -41,7 +42,7 @@ it("timeSaturday.count(start, end) counts Saturdays after start (exclusive) and assert.strictEqual(timeSaturday.count(local(2011, 0, 1), local(2011, 0, 9)), 1); }); -it("timeSaturday.count(start, end) observes daylight saving", () => { +test("timeSaturday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeSaturday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeSaturday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeSaturday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/second-test.js b/test/second-test.js index 838cf6c..f7452ea 100644 --- a/test/second-test.js +++ b/test/second-test.js @@ -1,54 +1,55 @@ +import {test} from "vitest"; import assert from "assert"; import {timeSecond} from "../src/index.js"; import {local, utc} from "./date.js"; -it("timeSecond.floor(date) returns seconds", () => { +test("timeSecond.floor(date) returns seconds", () => { assert.deepStrictEqual(timeSecond.floor(local(2010, 11, 31, 23, 59, 59, 999)), local(2010, 11, 31, 23, 59, 59)); assert.deepStrictEqual(timeSecond.floor(local(2011, 0, 1, 0, 0, 0, 0)), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.floor(local(2011, 0, 1, 0, 0, 0, 1)), local(2011, 0, 1, 0, 0, 0)); }); -it("timeSecond.round(date) returns seconds", () => { +test("timeSecond.round(date) returns seconds", () => { assert.deepStrictEqual(timeSecond.round(local(2010, 11, 31, 23, 59, 59, 999)), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.round(local(2011, 0, 1, 0, 0, 0, 499)), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.round(local(2011, 0, 1, 0, 0, 0, 500)), local(2011, 0, 1, 0, 0, 1)); }); -it("timeSecond.ceil(date) returns seconds", () => { +test("timeSecond.ceil(date) returns seconds", () => { assert.deepStrictEqual(timeSecond.ceil(local(2010, 11, 31, 23, 59, 59, 999)), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.ceil(local(2011, 0, 1, 0, 0, 0, 0)), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.ceil(local(2011, 0, 1, 0, 0, 0, 1)), local(2011, 0, 1, 0, 0, 1)); }); -it("timeSecond.offset(date, step) does not modify the passed-in date", () => { +test("timeSecond.offset(date, step) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeSecond.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -it("timeSecond.offset(date, step) does not round the passed-in-date", () => { +test("timeSecond.offset(date, step) does not round the passed-in-date", () => { assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 1, 0, 0, 0, 999)); assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 31, 23, 59, 57, 456)); }); -it("timeSecond.offset(date, step) allows negative offsets", () => { +test("timeSecond.offset(date, step) allows negative offsets", () => { assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 59), -1), local(2010, 11, 31, 23, 59, 58)); assert.deepStrictEqual(timeSecond.offset(local(2011, 0, 1, 0, 0, 0), -2), local(2010, 11, 31, 23, 59, 58)); assert.deepStrictEqual(timeSecond.offset(local(2011, 0, 1, 0, 0, 0), -1), local(2010, 11, 31, 23, 59, 59)); }); -it("timeSecond.offset(date, step) allows positive offsets", () => { +test("timeSecond.offset(date, step) allows positive offsets", () => { assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 58), +1), local(2010, 11, 31, 23, 59, 59)); assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 58), +2), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 59), +1), local(2011, 0, 1, 0, 0, 0)); }); -it("timeSecond.offset(date, step) allows zero offset", () => { +test("timeSecond.offset(date, step) allows zero offset", () => { assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -it("timeSecond.range(start, stop) returns seconds", () => { +test("timeSecond.range(start, stop) returns seconds", () => { assert.deepStrictEqual(timeSecond.range(local(2010, 11, 31, 23, 59, 59), local(2011, 0, 1, 0, 0, 2)), [ local(2010, 11, 31, 23, 59, 59), local(2011, 0, 1, 0, 0, 0), @@ -56,15 +57,15 @@ it("timeSecond.range(start, stop) returns seconds", () => { ]); }); -it("timeSecond.range(start, stop) has an inclusive lower bound", () => { +test("timeSecond.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(timeSecond.range(local(2010, 11, 31, 23, 59, 59), local(2011, 0, 1, 0, 0, 2))[0], local(2010, 11, 31, 23, 59, 59)); }); -it("timeSecond.range(start, stop) has an exclusive upper bound", () => { +test("timeSecond.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(timeSecond.range(local(2010, 11, 31, 23, 59, 59), local(2011, 0, 1, 0, 0, 2))[2], local(2011, 0, 1, 0, 0, 1)); }); -it("timeSecond.range(start, stop, step) can skip seconds", () => { +test("timeSecond.range(start, stop, step) can skip seconds", () => { assert.deepStrictEqual(timeSecond.range(local(2011, 1, 1, 12, 0, 7), local(2011, 1, 1, 12, 1, 7), 15), [ local(2011, 1, 1, 12, 0, 7), local(2011, 1, 1, 12, 0, 22), @@ -73,7 +74,7 @@ it("timeSecond.range(start, stop, step) can skip seconds", () => { ]); }); -it("timeSecond.range(start, stop) observes start of daylight savings time", () => { +test("timeSecond.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(timeSecond.range(utc(2011, 2, 13, 9, 59, 59), utc(2011, 2, 13, 10, 0, 2)), [ utc(2011, 2, 13, 9, 59, 59), utc(2011, 2, 13, 10, 0, 0), @@ -81,7 +82,7 @@ it("timeSecond.range(start, stop) observes start of daylight savings time", () = ]); }); -it("timeSecond.range(start, stop) observes end of daylight savings time", () => { +test("timeSecond.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(timeSecond.range(utc(2011, 10, 6, 8, 59, 59), utc(2011, 10, 6, 9, 0, 2)), [ utc(2011, 10, 6, 8, 59, 59), utc(2011, 10, 6, 9, 0, 0), @@ -89,12 +90,12 @@ it("timeSecond.range(start, stop) observes end of daylight savings time", () => ]); }); -it("timeSecond.every(step) returns every stepth second, starting with the first second of the minute", () => { +test("timeSecond.every(step) returns every stepth second, starting with the first second of the minute", () => { assert.deepStrictEqual(timeSecond.every(15).range(local(2008, 11, 30, 12, 36, 47), local(2008, 11, 30, 12, 37, 57)), [local(2008, 11, 30, 12, 37, 0), local(2008, 11, 30, 12, 37, 15), local(2008, 11, 30, 12, 37, 30), local(2008, 11, 30, 12, 37, 45)]); assert.deepStrictEqual(timeSecond.every(30).range(local(2008, 11, 30, 12, 36, 47), local(2008, 11, 30, 12, 37, 57)), [local(2008, 11, 30, 12, 37, 0), local(2008, 11, 30, 12, 37, 30)]); }); -it("timeSecond.range(start, stop) returns every second crossing the daylight savings boundary", () => { +test("timeSecond.range(start, stop) returns every second crossing the daylight savings boundary", () => { assert.deepStrictEqual(timeSecond.range(new Date(1478422800000 - 2 * 1e3), new Date(1478422800000 + 2 * 1e3)), [ new Date(1478422798000), // Sun Nov 6 2016 1:59:58 GMT-0700 (PDT) new Date(1478422799000), // Sun Nov 6 2016 1:59:59 GMT-0700 (PDT) diff --git a/test/sunday-test.js b/test/sunday-test.js index f196fdc..4e3bed1 100644 --- a/test/sunday-test.js +++ b/test/sunday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {timeSunday, timeSundays} from "../src/index.js"; import {local} from "./date.js"; -it("timeSundays in an alias for timeSunday.range", () => { +test("timeSundays in an alias for timeSunday.range", () => { assert.strictEqual(timeSundays, timeSunday.range); }); -it("timeSunday.floor(date) returns Sundays", () => { +test("timeSunday.floor(date) returns Sundays", () => { assert.deepStrictEqual(timeSunday.floor(local(2010, 11, 31, 23, 59, 59)), local(2010, 11, 26)); assert.deepStrictEqual(timeSunday.floor(local(2011, 0, 1, 0, 0, 0)), local(2010, 11, 26)); assert.deepStrictEqual(timeSunday.floor(local(2011, 0, 1, 0, 0, 1)), local(2010, 11, 26)); @@ -15,16 +16,16 @@ it("timeSunday.floor(date) returns Sundays", () => { assert.deepStrictEqual(timeSunday.floor(local(2011, 0, 2, 0, 0, 1)), local(2011, 0, 2)); }); -it("timeSunday.floor(date) observes daylight saving", () => { +test("timeSunday.floor(date) observes daylight saving", () => { assert.deepStrictEqual(timeSunday.floor(local(2011, 2, 13, 1)), local(2011, 2, 13)); assert.deepStrictEqual(timeSunday.floor(local(2011, 10, 6, 1)), local(2011, 10, 6)); }); -it("timeSunday.floor(date) handles years in the first century", () => { +test("timeSunday.floor(date) handles years in the first century", () => { assert.deepStrictEqual(timeSunday.floor(local(9, 10, 6, 7)), local(9, 10, 1)); }); -it("timeSunday.ceil(date) returns Sundays", () => { +test("timeSunday.ceil(date) returns Sundays", () => { assert.deepStrictEqual(timeSunday.ceil(local(2010, 11, 31, 23, 59, 59)), local(2011, 0, 2)); assert.deepStrictEqual(timeSunday.ceil(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 2)); assert.deepStrictEqual(timeSunday.ceil(local(2011, 0, 1, 0, 0, 1)), local(2011, 0, 2)); @@ -33,44 +34,44 @@ it("timeSunday.ceil(date) returns Sundays", () => { assert.deepStrictEqual(timeSunday.ceil(local(2011, 0, 2, 0, 0, 1)), local(2011, 0, 9)); }); -it("timeSunday.ceil(date) observes daylight saving", () => { +test("timeSunday.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(timeSunday.ceil(local(2011, 2, 13, 1)), local(2011, 2, 20)); assert.deepStrictEqual(timeSunday.ceil(local(2011, 10, 6, 1)), local(2011, 10, 13)); }); -it("timeSunday.offset(date) is an alias for timeSunday.offset(date, 1)", () => { +test("timeSunday.offset(date) is an alias for timeSunday.offset(date, 1)", () => { assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 31, 23, 59, 59, 999)), local(2011, 0, 7, 23, 59, 59, 999)); }); -it("timeSunday.offset(date, step) does not modify the passed-in date", () => { +test("timeSunday.offset(date, step) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeSunday.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -it("timeSunday.offset(date, step) does not round the passed-in date", () => { +test("timeSunday.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 7, 23, 59, 59, 999)); assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 17, 23, 59, 59, 456)); }); -it("timeSunday.offset(date, step) allows step to be negative", () => { +test("timeSunday.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 1), -1), local(2010, 10, 24)); assert.deepStrictEqual(timeSunday.offset(local(2011, 0, 1), -2), local(2010, 11, 18)); assert.deepStrictEqual(timeSunday.offset(local(2011, 0, 1), -1), local(2010, 11, 25)); }); -it("timeSunday.offset(date, step) allows step to be positive", () => { +test("timeSunday.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(timeSunday.offset(local(2010, 10, 24), +1), local(2010, 11, 1)); assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 18), +2), local(2011, 0, 1)); assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 25), +1), local(2011, 0, 1)); }); -it("timeSunday.offset(date, step) allows step to be zero", () => { +test("timeSunday.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -it("timeSunday.range(start, stop) returns Sundays between start (inclusive) and stop (exclusive)", () => { +test("timeSunday.range(start, stop) returns Sundays between start (inclusive) and stop (exclusive)", () => { assert.deepStrictEqual(timeSunday.range(local(2011, 11, 1), local(2012, 0, 15)), [ local(2011, 11, 4), local(2011, 11, 11), @@ -81,7 +82,7 @@ it("timeSunday.range(start, stop) returns Sundays between start (inclusive) and ]); }); -it("timeSunday.range(start, stop) returns Sundays", () => { +test("timeSunday.range(start, stop) returns Sundays", () => { assert.deepStrictEqual(timeSunday.range(local(2011, 11, 1, 12, 23), local(2012, 0, 14, 12, 23)), [ local(2011, 11, 4), local(2011, 11, 11), @@ -92,7 +93,7 @@ it("timeSunday.range(start, stop) returns Sundays", () => { ]); }); -it("timeSunday.range(start, stop) coerces start and stop to dates", () => { +test("timeSunday.range(start, stop) coerces start and stop to dates", () => { assert.deepStrictEqual(timeSunday.range(+local(2011, 11, 1), +local(2012, 0, 15)), [ local(2011, 11, 4), local(2011, 11, 11), @@ -103,16 +104,16 @@ it("timeSunday.range(start, stop) coerces start and stop to dates", () => { ]); }); -it("timeSunday.range(start, stop) returns the empty array for invalid dates", () => { +test("timeSunday.range(start, stop) returns the empty array for invalid dates", () => { assert.deepStrictEqual(timeSunday.range(new Date(NaN), Infinity), []); }); -it("timeSunday.range(start, stop) returns the empty array if start >= stop", () => { +test("timeSunday.range(start, stop) returns the empty array if start >= stop", () => { assert.deepStrictEqual(timeSunday.range(local(2011, 11, 10), local(2011, 10, 4)), []); assert.deepStrictEqual(timeSunday.range(local(2011, 10, 1), local(2011, 10, 1)), []); }); -it("timeSunday.range(start, stop, step) returns every step Sunday", () => { +test("timeSunday.range(start, stop, step) returns every step Sunday", () => { assert.deepStrictEqual(timeSunday.range(local(2011, 11, 1), local(2012, 0, 15), 2), [ local(2011, 11, 4), local(2011, 11, 18), @@ -120,7 +121,7 @@ it("timeSunday.range(start, stop, step) returns every step Sunday", () => { ]); }); -it("timeSunday.count(start, end) counts Sundays after start (exclusive) and before end (inclusive)", () => { +test("timeSunday.count(start, end) counts Sundays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -145,7 +146,7 @@ it("timeSunday.count(start, end) counts Sundays after start (exclusive) and befo assert.strictEqual(timeSunday.count(local(2012, 0, 1), local(2012, 0, 9)), 1); }); -it("timeSunday.count(start, end) observes daylight saving", () => { +test("timeSunday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeSunday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 11); assert.strictEqual(timeSunday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 11); assert.strictEqual(timeSunday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 11); diff --git a/test/thursday-test.js b/test/thursday-test.js index c799054..8a3d28d 100644 --- a/test/thursday-test.js +++ b/test/thursday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {timeThursday, timeThursdays} from "../src/index.js"; import {local} from "./date.js"; -it("timeThursdays in an alias for timeThursday.range", () => { +test("timeThursdays in an alias for timeThursday.range", () => { assert.strictEqual(timeThursdays, timeThursday.range); }); -it("timeThursday.floor(date) returns Thursdays", () => { +test("timeThursday.floor(date) returns Thursdays", () => { assert.deepStrictEqual(timeThursday.floor(local(2011, 0, 4, 23, 59, 59)), local(2010, 11, 30)); assert.deepStrictEqual(timeThursday.floor(local(2011, 0, 5, 0, 0, 0)), local(2010, 11, 30)); assert.deepStrictEqual(timeThursday.floor(local(2011, 0, 5, 0, 0, 1)), local(2010, 11, 30)); @@ -15,7 +16,7 @@ it("timeThursday.floor(date) returns Thursdays", () => { assert.deepStrictEqual(timeThursday.floor(local(2011, 0, 6, 0, 0, 1)), local(2011, 0, 6)); }); -it("timeThursday.count(start, end) counts Thursdays after start (exclusive) and before end (inclusive)", () => { +test("timeThursday.count(start, end) counts Thursdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -40,7 +41,7 @@ it("timeThursday.count(start, end) counts Thursdays after start (exclusive) and assert.strictEqual(timeThursday.count(local(2015, 0, 1), local(2015, 0, 9)), 1); }); -it("timeThursday.count(start, end) observes daylight saving", () => { +test("timeThursday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeThursday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeThursday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeThursday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/ticks-test.js b/test/ticks-test.js index 36c0318..69f45c7 100644 --- a/test/ticks-test.js +++ b/test/ticks-test.js @@ -1,8 +1,9 @@ +import {test} from "vitest"; import assert from "assert"; import {timeMinute, timeTicks} from "../src/index.js"; import {local} from "./date.js"; -it("timeTicks(start, stop, interval) respects the specified interval", () => { +test("timeTicks(start, stop, interval) respects the specified interval", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 1, 0), local(2011, 0, 1, 12, 4, 4), timeMinute), [ local(2011, 0, 1, 12, 1), local(2011, 0, 1, 12, 2), @@ -11,11 +12,11 @@ it("timeTicks(start, stop, interval) respects the specified interval", () => { ]); }); -it("timeTicks(start, stop, interval) returns the empty array for invalid intervals", () => { +test("timeTicks(start, stop, interval) returns the empty array for invalid intervals", () => { assert.deepStrictEqual(timeTicks(NaN, NaN, 10), []); }); -it("timeTicks(start, stop, interval.every(step)) observes the specified tick interval and step", () => { +test("timeTicks(start, stop, interval.every(step)) observes the specified tick interval and step", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 33, 4), timeMinute.every(10)), [ local(2011, 0, 1, 12, 0), local(2011, 0, 1, 12, 10), @@ -24,7 +25,7 @@ it("timeTicks(start, stop, interval.every(step)) observes the specified tick int ]); }); -it("timeTicks(start, stop, count) can generate sub-second ticks", () => { +test("timeTicks(start, stop, count) can generate sub-second ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 1), 4), [ local(2011, 0, 1, 12, 0, 0, 0), local(2011, 0, 1, 12, 0, 0, 200), @@ -35,7 +36,7 @@ it("timeTicks(start, stop, count) can generate sub-second ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 1-second ticks", () => { +test("timeTicks(start, stop, count) can generate 1-second ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 4), 4), [ local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 1), @@ -45,7 +46,7 @@ it("timeTicks(start, stop, count) can generate 1-second ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 5-second ticks", () => { +test("timeTicks(start, stop, count) can generate 5-second ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 20), 4), [ local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 5), @@ -55,7 +56,7 @@ it("timeTicks(start, stop, count) can generate 5-second ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 15-second ticks", () => { +test("timeTicks(start, stop, count) can generate 15-second ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 50), 4), [ local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 15), @@ -64,7 +65,7 @@ it("timeTicks(start, stop, count) can generate 15-second ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 30-second ticks", () => { +test("timeTicks(start, stop, count) can generate 30-second ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 1, 50), 4), [ local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 30), @@ -73,7 +74,7 @@ it("timeTicks(start, stop, count) can generate 30-second ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 1-minute ticks", () => { +test("timeTicks(start, stop, count) can generate 1-minute ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 27), local(2011, 0, 1, 12, 4, 12), 4), [ local(2011, 0, 1, 12, 1), local(2011, 0, 1, 12, 2), @@ -82,7 +83,7 @@ it("timeTicks(start, stop, count) can generate 1-minute ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 5-minute ticks", () => { +test("timeTicks(start, stop, count) can generate 5-minute ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 3, 27), local(2011, 0, 1, 12, 21, 12), 4), [ local(2011, 0, 1, 12, 5), local(2011, 0, 1, 12, 10), @@ -91,7 +92,7 @@ it("timeTicks(start, stop, count) can generate 5-minute ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 15-minute ticks", () => { +test("timeTicks(start, stop, count) can generate 15-minute ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 8, 27), local(2011, 0, 1, 13, 4, 12), 4), [ local(2011, 0, 1, 12, 15), local(2011, 0, 1, 12, 30), @@ -100,7 +101,7 @@ it("timeTicks(start, stop, count) can generate 15-minute ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 30-minute ticks", () => { +test("timeTicks(start, stop, count) can generate 30-minute ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 28, 27), local(2011, 0, 1, 14, 4, 12), 4), [ local(2011, 0, 1, 12, 30), local(2011, 0, 1, 13, 0), @@ -109,7 +110,7 @@ it("timeTicks(start, stop, count) can generate 30-minute ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 1-hour ticks", () => { +test("timeTicks(start, stop, count) can generate 1-hour ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 28, 27), local(2011, 0, 1, 16, 34, 12), 4), [ local(2011, 0, 1, 13, 0), local(2011, 0, 1, 14, 0), @@ -118,7 +119,7 @@ it("timeTicks(start, stop, count) can generate 1-hour ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 3-hour ticks", () => { +test("timeTicks(start, stop, count) can generate 3-hour ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 14, 28, 27), local(2011, 0, 2, 1, 34, 12), 4), [ local(2011, 0, 1, 15, 0), local(2011, 0, 1, 18, 0), @@ -127,7 +128,7 @@ it("timeTicks(start, stop, count) can generate 3-hour ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 6-hour ticks", () => { +test("timeTicks(start, stop, count) can generate 6-hour ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 16, 28, 27), local(2011, 0, 2, 14, 34, 12), 4), [ local(2011, 0, 1, 18, 0), local(2011, 0, 2, 0, 0), @@ -136,7 +137,7 @@ it("timeTicks(start, stop, count) can generate 6-hour ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 12-hour ticks", () => { +test("timeTicks(start, stop, count) can generate 12-hour ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 16, 28, 27), local(2011, 0, 3, 21, 34, 12), 4), [ local(2011, 0, 2, 0, 0), local(2011, 0, 2, 12, 0), @@ -145,7 +146,7 @@ it("timeTicks(start, stop, count) can generate 12-hour ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 1-day ticks", () => { +test("timeTicks(start, stop, count) can generate 1-day ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 16, 28, 27), local(2011, 0, 5, 21, 34, 12), 4), [ local(2011, 0, 2, 0, 0), local(2011, 0, 3, 0, 0), @@ -154,7 +155,7 @@ it("timeTicks(start, stop, count) can generate 1-day ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 2-day ticks", () => { +test("timeTicks(start, stop, count) can generate 2-day ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 2, 16, 28, 27), local(2011, 0, 9, 21, 34, 12), 4), [ local(2011, 0, 3, 0, 0), local(2011, 0, 5, 0, 0), @@ -163,7 +164,7 @@ it("timeTicks(start, stop, count) can generate 2-day ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 1-week ticks", () => { +test("timeTicks(start, stop, count) can generate 1-week ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 16, 28, 27), local(2011, 0, 23, 21, 34, 12), 4), [ local(2011, 0, 2, 0, 0), local(2011, 0, 9, 0, 0), @@ -172,7 +173,7 @@ it("timeTicks(start, stop, count) can generate 1-week ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 1-month ticks", () => { +test("timeTicks(start, stop, count) can generate 1-month ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 18), local(2011, 4, 2), 4), [ local(2011, 1, 1, 0, 0), local(2011, 2, 1, 0, 0), @@ -181,7 +182,7 @@ it("timeTicks(start, stop, count) can generate 1-month ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 3-month ticks", () => { +test("timeTicks(start, stop, count) can generate 3-month ticks", () => { assert.deepStrictEqual(timeTicks(local(2010, 11, 18), local(2011, 10, 2), 4), [ local(2011, 0, 1, 0, 0), local(2011, 3, 1, 0, 0), @@ -190,7 +191,7 @@ it("timeTicks(start, stop, count) can generate 3-month ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate 1-year ticks", () => { +test("timeTicks(start, stop, count) can generate 1-year ticks", () => { assert.deepStrictEqual(timeTicks(local(2010, 11, 18), local(2014, 2, 2), 4), [ local(2011, 0, 1, 0, 0), local(2012, 0, 1, 0, 0), @@ -199,7 +200,7 @@ it("timeTicks(start, stop, count) can generate 1-year ticks", () => { ]); }); -it("timeTicks(start, stop, count) can generate multi-year ticks", () => { +test("timeTicks(start, stop, count) can generate multi-year ticks", () => { assert.deepStrictEqual(timeTicks(local(0, 11, 18), local(2014, 2, 2), 6), [ local( 500, 0, 1, 0, 0), local(1000, 0, 1, 0, 0), @@ -208,11 +209,11 @@ it("timeTicks(start, stop, count) can generate multi-year ticks", () => { ]); }); -it("timeTicks(start, stop, count) returns one tick for an empty domain", () => { +test("timeTicks(start, stop, count) returns one tick for an empty domain", () => { assert.deepStrictEqual(timeTicks(local(2014, 2, 2), local(2014, 2, 2), 6), [local(2014, 2, 2)]); }); -it("timeTicks(start, stop, count) returns descending ticks for a descending domain", () => { +test("timeTicks(start, stop, count) returns descending ticks for a descending domain", () => { assert.deepStrictEqual(timeTicks(local(2014, 2, 2), local(2010, 11, 18), 4), [local(2014, 0, 1, 0, 0), local(2013, 0, 1, 0, 0), local(2012, 0, 1, 0, 0), local(2011, 0, 1, 0, 0)]); assert.deepStrictEqual(timeTicks(local(2011, 10, 2), local(2010, 11, 18), 4), [local(2011, 9, 1, 0, 0), local(2011, 6, 1, 0, 0), local(2011, 3, 1, 0, 0), local(2011, 0, 1, 0, 0)]); }); diff --git a/test/tuesday-test.js b/test/tuesday-test.js index 9d1379a..58e1e7e 100644 --- a/test/tuesday-test.js +++ b/test/tuesday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {timeTuesday, timeTuesdays} from "../src/index.js"; import {local} from "./date.js"; -it("timeTuesdays in an alias for timeTuesday.range", () => { +test("timeTuesdays in an alias for timeTuesday.range", () => { assert.strictEqual(timeTuesdays, timeTuesday.range); }); -it("timeTuesday.floor(date) returns Tuesdays", () => { +test("timeTuesday.floor(date) returns Tuesdays", () => { assert.deepStrictEqual(timeTuesday.floor(local(2011, 0, 2, 23, 59, 59)), local(2010, 11, 28)); assert.deepStrictEqual(timeTuesday.floor(local(2011, 0, 3, 0, 0, 0)), local(2010, 11, 28)); assert.deepStrictEqual(timeTuesday.floor(local(2011, 0, 3, 0, 0, 1)), local(2010, 11, 28)); @@ -15,7 +16,7 @@ it("timeTuesday.floor(date) returns Tuesdays", () => { assert.deepStrictEqual(timeTuesday.floor(local(2011, 0, 4, 0, 0, 1)), local(2011, 0, 4)); }); -it("timeTuesday.count(start, end) counts Tuesdays after start (exclusive) and before end (inclusive)", () => { +test("timeTuesday.count(start, end) counts Tuesdays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -40,7 +41,7 @@ it("timeTuesday.count(start, end) counts Tuesdays after start (exclusive) and be assert.strictEqual(timeTuesday.count(local(2013, 0, 1), local(2013, 0, 9)), 1); }); -it("timeTuesday.count(start, end) observes daylight saving", () => { +test("timeTuesday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeTuesday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeTuesday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeTuesday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/unixDay-test.js b/test/unixDay-test.js index 60a916b..699bf04 100644 --- a/test/unixDay-test.js +++ b/test/unixDay-test.js @@ -1,18 +1,19 @@ +import {test} from "vitest"; import assert from "assert"; import {unixDay, unixDays} from "../src/index.js"; import {utc} from "./date.js"; -it("unixDays in an alias for unixDay.range", () => { +test("unixDays in an alias for unixDay.range", () => { assert.strictEqual(unixDays, unixDay.range); }); -it("unixDay.floor(date) returns days", () => { +test("unixDay.floor(date) returns days", () => { assert.deepStrictEqual(unixDay.floor(utc(2010, 11, 31, 23)), utc(2010, 11, 31)); assert.deepStrictEqual(unixDay.floor(utc(2011, 0, 1, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(unixDay.floor(utc(2011, 0, 1, 1)), utc(2011, 0, 1)); }); -it("unixDay.floor(date) does not observe daylight saving", () => { +test("unixDay.floor(date) does not observe daylight saving", () => { assert.deepStrictEqual(unixDay.floor(utc(2011, 2, 13, 7)), utc(2011, 2, 13)); assert.deepStrictEqual(unixDay.floor(utc(2011, 2, 13, 8)), utc(2011, 2, 13)); assert.deepStrictEqual(unixDay.floor(utc(2011, 2, 13, 9)), utc(2011, 2, 13)); @@ -23,18 +24,18 @@ it("unixDay.floor(date) does not observe daylight saving", () => { assert.deepStrictEqual(unixDay.floor(utc(2011, 10, 6, 8)), utc(2011, 10, 6)); }); -it("unixDay.round(date) returns days", () => { +test("unixDay.round(date) returns days", () => { assert.deepStrictEqual(unixDay.round(utc(2010, 11, 30, 13)), utc(2010, 11, 31)); assert.deepStrictEqual(unixDay.round(utc(2010, 11, 30, 11)), utc(2010, 11, 30)); }); -it("unixDay.ceil(date) returns days", () => { +test("unixDay.ceil(date) returns days", () => { assert.deepStrictEqual(unixDay.ceil(utc(2010, 11, 30, 23)), utc(2010, 11, 31)); assert.deepStrictEqual(unixDay.ceil(utc(2010, 11, 31, 0)), utc(2010, 11, 31)); assert.deepStrictEqual(unixDay.ceil(utc(2010, 11, 31, 1)), utc(2011, 0, 1)); }); -it("unixDay.ceil(date) does not observe daylight saving", () => { +test("unixDay.ceil(date) does not observe daylight saving", () => { assert.deepStrictEqual(unixDay.ceil(utc(2011, 2, 13, 7)), utc(2011, 2, 14)); assert.deepStrictEqual(unixDay.ceil(utc(2011, 2, 13, 8)), utc(2011, 2, 14)); assert.deepStrictEqual(unixDay.ceil(utc(2011, 2, 13, 9)), utc(2011, 2, 14)); @@ -45,39 +46,39 @@ it("unixDay.ceil(date) does not observe daylight saving", () => { assert.deepStrictEqual(unixDay.ceil(utc(2011, 10, 6, 8)), utc(2011, 10, 7)); }); -it("unixDay.offset(date) is an alias for unixDay.offset(date, 1)", () => { +test("unixDay.offset(date) is an alias for unixDay.offset(date, 1)", () => { assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 1, 23, 59, 59, 999)); }); -it("unixDay.offset(date, step) does not modify the passed-in date", () => { +test("unixDay.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); unixDay.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -it("unixDay.offset(date, step) does not round the passed-in date", () => { +test("unixDay.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 1, 23, 59, 59, 999)); assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 29, 23, 59, 59, 456)); }); -it("unixDay.offset(date, step) allows step to be negative", () => { +test("unixDay.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31), -1), utc(2010, 11, 30)); assert.deepStrictEqual(unixDay.offset(utc(2011, 0, 1), -2), utc(2010, 11, 30)); assert.deepStrictEqual(unixDay.offset(utc(2011, 0, 1), -1), utc(2010, 11, 31)); }); -it("unixDay.offset(date, step) allows step to be positive", () => { +test("unixDay.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31), +1), utc(2011, 0, 1)); assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 30), +2), utc(2011, 0, 1)); assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 30), +1), utc(2010, 11, 31)); }); -it("unixDay.offset(date, step) allows step to be zero", () => { +test("unixDay.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -it("unixDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { +test("unixDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { assert.strictEqual(unixDay.count(utc(2011, 0, 1, 0), utc(2011, 4, 9, 0)), 128); assert.strictEqual(unixDay.count(utc(2011, 0, 1, 1), utc(2011, 4, 9, 0)), 128); assert.strictEqual(unixDay.count(utc(2010, 11, 31, 23), utc(2011, 4, 9, 0)), 129); @@ -85,7 +86,7 @@ it("unixDay.count(start, end) counts days after start (exclusive) and before end assert.strictEqual(unixDay.count(utc(2011, 0, 1, 0), utc(2011, 4, 9, 1)), 128); }); -it("unixDay.count(start, end) does not observe daylight saving", () => { +test("unixDay.count(start, end) does not observe daylight saving", () => { assert.strictEqual(unixDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 71); assert.strictEqual(unixDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 71); assert.strictEqual(unixDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 71); @@ -94,7 +95,7 @@ it("unixDay.count(start, end) does not observe daylight saving", () => { assert.strictEqual(unixDay.count(utc(2011, 0, 1), utc(2011, 10, 6, 2)), 309); }); -it("unixDay.count(start, end) returns 364 or 365 for a full year", () => { +test("unixDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(unixDay.count(utc(1999, 0, 1), utc(1999, 11, 31)), 364); assert.strictEqual(unixDay.count(utc(2000, 0, 1), utc(2000, 11, 31)), 365); // leap year assert.strictEqual(unixDay.count(utc(2001, 0, 1), utc(2001, 11, 31)), 364); @@ -110,7 +111,7 @@ it("unixDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(unixDay.count(utc(2011, 0, 1), utc(2011, 11, 31)), 364); }); -it("unixDay.every(step) returns every stepth day", () => { +test("unixDay.every(step) returns every stepth day", () => { assert.deepStrictEqual(unixDay.every(3).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 5, 23, 48)), [utc(2008, 11, 31), utc(2009, 0, 3)]); assert.deepStrictEqual(unixDay.every(5).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 6, 23, 48)), [utc(2009, 0, 1), utc(2009, 0, 6)]); assert.deepStrictEqual(unixDay.every(7).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 8, 23, 48)), [utc(2009, 0, 1), utc(2009, 0, 8)]); diff --git a/test/utcDay-test.js b/test/utcDay-test.js index f521c91..c666403 100644 --- a/test/utcDay-test.js +++ b/test/utcDay-test.js @@ -1,18 +1,19 @@ +import {test} from "vitest"; import assert from "assert"; import {utcDay, utcDays} from "../src/index.js"; import {utc} from "./date.js"; -it("utcDays in an alias for utcDay.range", () => { +test("utcDays in an alias for utcDay.range", () => { assert.strictEqual(utcDays, utcDay.range); }); -it("utcDay.floor(date) returns days", () => { +test("utcDay.floor(date) returns days", () => { assert.deepStrictEqual(utcDay.floor(utc(2010, 11, 31, 23)), utc(2010, 11, 31)); assert.deepStrictEqual(utcDay.floor(utc(2011, 0, 1, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(utcDay.floor(utc(2011, 0, 1, 1)), utc(2011, 0, 1)); }); -it("utcDay.floor(date) does not observe daylight saving", () => { +test("utcDay.floor(date) does not observe daylight saving", () => { assert.deepStrictEqual(utcDay.floor(utc(2011, 2, 13, 7)), utc(2011, 2, 13)); assert.deepStrictEqual(utcDay.floor(utc(2011, 2, 13, 8)), utc(2011, 2, 13)); assert.deepStrictEqual(utcDay.floor(utc(2011, 2, 13, 9)), utc(2011, 2, 13)); @@ -23,18 +24,18 @@ it("utcDay.floor(date) does not observe daylight saving", () => { assert.deepStrictEqual(utcDay.floor(utc(2011, 10, 6, 8)), utc(2011, 10, 6)); }); -it("utcDay.round(date) returns days", () => { +test("utcDay.round(date) returns days", () => { assert.deepStrictEqual(utcDay.round(utc(2010, 11, 30, 13)), utc(2010, 11, 31)); assert.deepStrictEqual(utcDay.round(utc(2010, 11, 30, 11)), utc(2010, 11, 30)); }); -it("utcDay.ceil(date) returns days", () => { +test("utcDay.ceil(date) returns days", () => { assert.deepStrictEqual(utcDay.ceil(utc(2010, 11, 30, 23)), utc(2010, 11, 31)); assert.deepStrictEqual(utcDay.ceil(utc(2010, 11, 31, 0)), utc(2010, 11, 31)); assert.deepStrictEqual(utcDay.ceil(utc(2010, 11, 31, 1)), utc(2011, 0, 1)); }); -it("utcDay.ceil(date) does not observe daylight saving", () => { +test("utcDay.ceil(date) does not observe daylight saving", () => { assert.deepStrictEqual(utcDay.ceil(utc(2011, 2, 13, 7)), utc(2011, 2, 14)); assert.deepStrictEqual(utcDay.ceil(utc(2011, 2, 13, 8)), utc(2011, 2, 14)); assert.deepStrictEqual(utcDay.ceil(utc(2011, 2, 13, 9)), utc(2011, 2, 14)); @@ -45,39 +46,39 @@ it("utcDay.ceil(date) does not observe daylight saving", () => { assert.deepStrictEqual(utcDay.ceil(utc(2011, 10, 6, 8)), utc(2011, 10, 7)); }); -it("utcDay.offset(date) is an alias for utcDay.offset(date, 1)", () => { +test("utcDay.offset(date) is an alias for utcDay.offset(date, 1)", () => { assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 1, 23, 59, 59, 999)); }); -it("utcDay.offset(date, step) does not modify the passed-in date", () => { +test("utcDay.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcDay.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -it("utcDay.offset(date, step) does not round the passed-in date", () => { +test("utcDay.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 1, 23, 59, 59, 999)); assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 29, 23, 59, 59, 456)); }); -it("utcDay.offset(date, step) allows step to be negative", () => { +test("utcDay.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31), -1), utc(2010, 11, 30)); assert.deepStrictEqual(utcDay.offset(utc(2011, 0, 1), -2), utc(2010, 11, 30)); assert.deepStrictEqual(utcDay.offset(utc(2011, 0, 1), -1), utc(2010, 11, 31)); }); -it("utcDay.offset(date, step) allows step to be positive", () => { +test("utcDay.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31), +1), utc(2011, 0, 1)); assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 30), +2), utc(2011, 0, 1)); assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 30), +1), utc(2010, 11, 31)); }); -it("utcDay.offset(date, step) allows step to be zero", () => { +test("utcDay.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -it("utcDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { +test("utcDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { assert.strictEqual(utcDay.count(utc(2011, 0, 1, 0), utc(2011, 4, 9, 0)), 128); assert.strictEqual(utcDay.count(utc(2011, 0, 1, 1), utc(2011, 4, 9, 0)), 128); assert.strictEqual(utcDay.count(utc(2010, 11, 31, 23), utc(2011, 4, 9, 0)), 129); @@ -85,7 +86,7 @@ it("utcDay.count(start, end) counts days after start (exclusive) and before end assert.strictEqual(utcDay.count(utc(2011, 0, 1, 0), utc(2011, 4, 9, 1)), 128); }); -it("utcDay.count(start, end) does not observe daylight saving", () => { +test("utcDay.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 71); assert.strictEqual(utcDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 71); assert.strictEqual(utcDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 71); @@ -94,7 +95,7 @@ it("utcDay.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcDay.count(utc(2011, 0, 1), utc(2011, 10, 6, 2)), 309); }); -it("utcDay.count(start, end) returns 364 or 365 for a full year", () => { +test("utcDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(utcDay.count(utc(1999, 0, 1), utc(1999, 11, 31)), 364); assert.strictEqual(utcDay.count(utc(2000, 0, 1), utc(2000, 11, 31)), 365); // leap year assert.strictEqual(utcDay.count(utc(2001, 0, 1), utc(2001, 11, 31)), 364); @@ -110,7 +111,7 @@ it("utcDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(utcDay.count(utc(2011, 0, 1), utc(2011, 11, 31)), 364); }); -it("utcDay.every(step) returns every stepth day, starting with the first day of the month", () => { +test("utcDay.every(step) returns every stepth day, starting with the first day of the month", () => { assert.deepStrictEqual(utcDay.every(3).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 5, 23, 48)), [utc(2008, 11, 31), utc(2009, 0, 1), utc(2009, 0, 4)]); assert.deepStrictEqual(utcDay.every(5).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 6, 23, 48)), [utc(2008, 11, 31), utc(2009, 0, 1), utc(2009, 0, 6)]); assert.deepStrictEqual(utcDay.every(7).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 8, 23, 48)), [utc(2009, 0, 1), utc(2009, 0, 8)]); diff --git a/test/utcFriday-test.js b/test/utcFriday-test.js index bf665d6..6abc76b 100644 --- a/test/utcFriday-test.js +++ b/test/utcFriday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {utcFriday, utcFridays} from "../src/index.js"; import {utc} from "./date.js"; -it("utcFridays in an alias for utcFriday.range", () => { +test("utcFridays in an alias for utcFriday.range", () => { assert.strictEqual(utcFridays, utcFriday.range); }); -it("utcFriday.floor(date) returns Fridays", () => { +test("utcFriday.floor(date) returns Fridays", () => { assert.deepStrictEqual(utcFriday.floor(utc(2011, 0, 5, 23, 59, 59)), utc(2010, 11, 31)); assert.deepStrictEqual(utcFriday.floor(utc(2011, 0, 6, 0, 0, 0)), utc(2010, 11, 31)); assert.deepStrictEqual(utcFriday.floor(utc(2011, 0, 6, 0, 0, 1)), utc(2010, 11, 31)); @@ -15,7 +16,7 @@ it("utcFriday.floor(date) returns Fridays", () => { assert.deepStrictEqual(utcFriday.floor(utc(2011, 0, 7, 0, 0, 1)), utc(2011, 0, 7)); }); -it("utcFriday.count(start, end) counts Fridays after start (exclusive) and before end (inclusive)", () => { +test("utcFriday.count(start, end) counts Fridays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -41,7 +42,7 @@ it("utcFriday.count(start, end) counts Fridays after start (exclusive) and befor assert.strictEqual(utcFriday.count(utc(2010, 0, 1), utc(2010, 0, 9)), 1); }); -it("utcFriday.count(start, end) does not observe daylight saving", () => { +test("utcFriday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcFriday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcFriday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcFriday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcHour-test.js b/test/utcHour-test.js index eda23ce..b2b12a5 100644 --- a/test/utcHour-test.js +++ b/test/utcHour-test.js @@ -1,14 +1,15 @@ +import {test} from "vitest"; import assert from "assert"; import {utcHour} from "../src/index.js"; import {utc} from "./date.js"; -it("utcHour.floor(date) returns hours", () => { +test("utcHour.floor(date) returns hours", () => { assert.deepStrictEqual(utcHour.floor(utc(2010, 11, 31, 23, 59)), utc(2010, 11, 31, 23)); assert.deepStrictEqual(utcHour.floor(utc(2011, 0, 1, 0, 0)), utc(2011, 0, 1, 0)); assert.deepStrictEqual(utcHour.floor(utc(2011, 0, 1, 0, 1)), utc(2011, 0, 1, 0)); }); -it("utcHour.floor(date) observes start of daylight savings time", () => { +test("utcHour.floor(date) observes start of daylight savings time", () => { assert.deepStrictEqual(utcHour.floor(utc(2011, 2, 13, 8, 59)), utc(2011, 2, 13, 8)); assert.deepStrictEqual(utcHour.floor(utc(2011, 2, 13, 9, 0)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(utcHour.floor(utc(2011, 2, 13, 9, 1)), utc(2011, 2, 13, 9)); @@ -17,7 +18,7 @@ it("utcHour.floor(date) observes start of daylight savings time", () => { assert.deepStrictEqual(utcHour.floor(utc(2011, 2, 13, 10, 1)), utc(2011, 2, 13, 10)); }); -it("utcHour.floor(date) observes end of daylight savings time", () => { +test("utcHour.floor(date) observes end of daylight savings time", () => { assert.deepStrictEqual(utcHour.floor(utc(2011, 10, 6, 7, 59)), utc(2011, 10, 6, 7)); assert.deepStrictEqual(utcHour.floor(utc(2011, 10, 6, 8, 0)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(utcHour.floor(utc(2011, 10, 6, 8, 1)), utc(2011, 10, 6, 8)); @@ -27,13 +28,13 @@ it("utcHour.floor(date) observes end of daylight savings time", () => { }); -it("utcHour.ceil(date) returns hours", () => { +test("utcHour.ceil(date) returns hours", () => { assert.deepStrictEqual(utcHour.ceil(utc(2010, 11, 31, 23, 59)), utc(2011, 0, 1, 0)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 0, 1, 0, 0)), utc(2011, 0, 1, 0)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 0, 1, 0, 1)), utc(2011, 0, 1, 1)); }); -it("utcHour.ceil(date) observes start of daylight savings time", () => { +test("utcHour.ceil(date) observes start of daylight savings time", () => { assert.deepStrictEqual(utcHour.ceil(utc(2011, 2, 13, 8, 59)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 2, 13, 9, 0)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 2, 13, 9, 1)), utc(2011, 2, 13, 10)); @@ -42,7 +43,7 @@ it("utcHour.ceil(date) observes start of daylight savings time", () => { assert.deepStrictEqual(utcHour.ceil(utc(2011, 2, 13, 10, 1)), utc(2011, 2, 13, 11)); }); -it("utcHour.ceil(date) observes end of daylight savings time", () => { +test("utcHour.ceil(date) observes end of daylight savings time", () => { assert.deepStrictEqual(utcHour.ceil(utc(2011, 10, 6, 7, 59)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 10, 6, 8, 0)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 10, 6, 8, 1)), utc(2011, 10, 6, 9)); @@ -51,35 +52,35 @@ it("utcHour.ceil(date) observes end of daylight savings time", () => { assert.deepStrictEqual(utcHour.ceil(utc(2011, 10, 6, 9, 1)), utc(2011, 10, 6, 10)); }); -it("utcHour.offset(date) does not modify the passed-in date", () => { +test("utcHour.offset(date) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcHour.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -it("utcHour.offset(date) does not round the passed-in-date", () => { +test("utcHour.offset(date) does not round the passed-in-date", () => { assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 1, 0, 59, 59, 999)); assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 31, 21, 59, 59, 456)); }); -it("utcHour.offset(date) allows negative offsets", () => { +test("utcHour.offset(date) allows negative offsets", () => { assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 12), -1), utc(2010, 11, 31, 11)); assert.deepStrictEqual(utcHour.offset(utc(2011, 0, 1, 1), -2), utc(2010, 11, 31, 23)); assert.deepStrictEqual(utcHour.offset(utc(2011, 0, 1, 0), -1), utc(2010, 11, 31, 23)); }); -it("utcHour.offset(date) allows positive offsets", () => { +test("utcHour.offset(date) allows positive offsets", () => { assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 11), +1), utc(2010, 11, 31, 12)); assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23), +2), utc(2011, 0, 1, 1)); assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23), +1), utc(2011, 0, 1, 0)); }); -it("utcHour.offset(date) allows zero offset", () => { +test("utcHour.offset(date) allows zero offset", () => { assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -it("utcHour.range(start, stop) returns hours", () => { +test("utcHour.range(start, stop) returns hours", () => { assert.deepStrictEqual(utcHour.range(utc(2010, 11, 31, 12, 30), utc(2010, 11, 31, 15, 30)), [ utc(2010, 11, 31, 13), utc(2010, 11, 31, 14), @@ -87,15 +88,15 @@ it("utcHour.range(start, stop) returns hours", () => { ]); }); -it("utcHour.range(start, stop) has an inclusive lower bound", () => { +test("utcHour.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(utcHour.range(utc(2010, 11, 31, 23), utc(2011, 0, 1, 2))[0], utc(2010, 11, 31, 23)); }); -it("utcHour.range(start, stop) has an exclusive upper bound", () => { +test("utcHour.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(utcHour.range(utc(2010, 11, 31, 23), utc(2011, 0, 1, 2))[2], utc(2011, 0, 1, 1)); }); -it("utcHour.range(start, stop) can skip hours", () => { +test("utcHour.range(start, stop) can skip hours", () => { assert.deepStrictEqual(utcHour.range(utc(2011, 1, 1, 1), utc(2011, 1, 1, 13), 3), [ utc(2011, 1, 1, 1), utc(2011, 1, 1, 4), @@ -104,7 +105,7 @@ it("utcHour.range(start, stop) can skip hours", () => { ]); }); -it("utcHour.range(start, stop) does not observe the start of daylight savings time", () => { +test("utcHour.range(start, stop) does not observe the start of daylight savings time", () => { assert.deepStrictEqual(utcHour.range(utc(2011, 2, 13, 1), utc(2011, 2, 13, 5)), [ utc(2011, 2, 13, 1), utc(2011, 2, 13, 2), @@ -113,14 +114,14 @@ it("utcHour.range(start, stop) does not observe the start of daylight savings ti ]); }); -it("utcHour.range(start, stop) does not observe the end of daylight savings time", () => { +test("utcHour.range(start, stop) does not observe the end of daylight savings time", () => { assert.deepStrictEqual(utcHour.range(utc(2011, 10, 6, 0), utc(2011, 10, 6, 2)), [ utc(2011, 10, 6, 0), utc(2011, 10, 6, 1) ]); }); -it("utcHour.every(step) returns every stepth hour, starting with the first hour of the day", () => { +test("utcHour.every(step) returns every stepth hour, starting with the first hour of the day", () => { assert.deepStrictEqual(utcHour.every(4).range(utc(2008, 11, 30, 12, 47), utc(2008, 11, 31, 13, 57)), [utc(2008, 11, 30, 16), utc(2008, 11, 30, 20), utc(2008, 11, 31, 0), utc(2008, 11, 31, 4), utc(2008, 11, 31, 8), utc(2008, 11, 31, 12)]); assert.deepStrictEqual(utcHour.every(12).range(utc(2008, 11, 30, 12, 47), utc(2008, 11, 31, 13, 57)), [utc(2008, 11, 31, 0), utc(2008, 11, 31, 12)]); }); diff --git a/test/utcMillisecond-test.js b/test/utcMillisecond-test.js index 4222828..3000fac 100644 --- a/test/utcMillisecond-test.js +++ b/test/utcMillisecond-test.js @@ -1,6 +1,7 @@ +import {test} from "vitest"; import assert from "assert"; import {timeMillisecond, utcMillisecond} from "../src/index.js"; -it("utcMillisecond is an alias for timeMillisecond", () => { +test("utcMillisecond is an alias for timeMillisecond", () => { assert.strictEqual(utcMillisecond, timeMillisecond); }); diff --git a/test/utcMinute-test.js b/test/utcMinute-test.js index 2bcfeee..0fb2303 100644 --- a/test/utcMinute-test.js +++ b/test/utcMinute-test.js @@ -1,50 +1,51 @@ +import {test} from "vitest"; import assert from "assert"; import {utcMinute} from "../src/index.js"; import {utc} from "./date.js"; -it("utcMinute.floor(date) returns minutes", () => { +test("utcMinute.floor(date) returns minutes", () => { assert.deepStrictEqual(utcMinute.floor(utc(2010, 11, 31, 23, 59, 59)), utc(2010, 11, 31, 23, 59)); assert.deepStrictEqual(utcMinute.floor(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 1, 0, 0)); assert.deepStrictEqual(utcMinute.floor(utc(2011, 0, 1, 0, 0, 59)), utc(2011, 0, 1, 0, 0)); assert.deepStrictEqual(utcMinute.floor(utc(2011, 0, 1, 0, 1, 0)), utc(2011, 0, 1, 0, 1)); }); -it("utcMinute.ceil(date) returns minutes", () => { +test("utcMinute.ceil(date) returns minutes", () => { assert.deepStrictEqual(utcMinute.ceil(utc(2010, 11, 31, 23, 59, 59)), utc(2011, 0, 1, 0, 0)); assert.deepStrictEqual(utcMinute.ceil(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 1, 0, 0)); assert.deepStrictEqual(utcMinute.ceil(utc(2011, 0, 1, 0, 0, 59)), utc(2011, 0, 1, 0, 1)); assert.deepStrictEqual(utcMinute.ceil(utc(2011, 0, 1, 0, 1, 0)), utc(2011, 0, 1, 0, 1)); }); -it("utcMinute.offset(date) does not modify the passed-in date", () => { +test("utcMinute.offset(date) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcMinute.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -it("utcMinute.offset(date) does not round the passed-in-date", () => { +test("utcMinute.offset(date) does not round the passed-in-date", () => { assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 1, 0, 0, 59, 999)); assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 31, 23, 57, 59, 456)); }); -it("utcMinute.offset(date) allows negative offsets", () => { +test("utcMinute.offset(date) allows negative offsets", () => { assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 12), -1), utc(2010, 11, 31, 23, 11)); assert.deepStrictEqual(utcMinute.offset(utc(2011, 0, 1, 0, 1), -2), utc(2010, 11, 31, 23, 59)); assert.deepStrictEqual(utcMinute.offset(utc(2011, 0, 1, 0, 0), -1), utc(2010, 11, 31, 23, 59)); }); -it("utcMinute.offset(date) allows positive offsets", () => { +test("utcMinute.offset(date) allows positive offsets", () => { assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 11), +1), utc(2010, 11, 31, 23, 12)); assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59), +2), utc(2011, 0, 1, 0, 1)); assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59), +1), utc(2011, 0, 1, 0, 0)); }); -it("utcMinute.offset(date) allows zero offset", () => { +test("utcMinute.offset(date) allows zero offset", () => { assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -it("utcMinute.range(start, stop), returns minutes", () => { +test("utcMinute.range(start, stop), returns minutes", () => { assert.deepStrictEqual(utcMinute.range(utc(2010, 11, 31, 23, 59), utc(2011, 0, 1, 0, 2)), [ utc(2010, 11, 31, 23, 59), utc(2011, 0, 1, 0, 0), @@ -52,15 +53,15 @@ it("utcMinute.range(start, stop), returns minutes", () => { ]); }); -it("utcMinute.range(start, stop), has an inclusive lower bound", () => { +test("utcMinute.range(start, stop), has an inclusive lower bound", () => { assert.deepStrictEqual(utcMinute.range(utc(2010, 11, 31, 23, 59), utc(2011, 0, 1, 0, 2))[0], utc(2010, 11, 31, 23, 59)); }); -it("utcMinute.range(start, stop), has an exclusive upper bound", () => { +test("utcMinute.range(start, stop), has an exclusive upper bound", () => { assert.deepStrictEqual(utcMinute.range(utc(2010, 11, 31, 23, 59), utc(2011, 0, 1, 0, 2))[2], utc(2011, 0, 1, 0, 1)); }); -it("utcMinute.range(start, stop), can skip minutes", () => { +test("utcMinute.range(start, stop), can skip minutes", () => { assert.deepStrictEqual(utcMinute.range(utc(2011, 1, 1, 12, 7), utc(2011, 1, 1, 13, 7), 15), [ utc(2011, 1, 1, 12, 7), utc(2011, 1, 1, 12, 22), @@ -69,7 +70,7 @@ it("utcMinute.range(start, stop), can skip minutes", () => { ]); }); -it("utcMinute.range(start, stop), observes start of daylight savings time", () => { +test("utcMinute.range(start, stop), observes start of daylight savings time", () => { assert.deepStrictEqual(utcMinute.range(utc(2011, 2, 13, 9, 59), utc(2011, 2, 13, 10, 2)), [ utc(2011, 2, 13, 9, 59), utc(2011, 2, 13, 10, 0), @@ -77,7 +78,7 @@ it("utcMinute.range(start, stop), observes start of daylight savings time", () = ]); }); -it("utcMinute.range(start, stop), observes end of daylight savings time", () => { +test("utcMinute.range(start, stop), observes end of daylight savings time", () => { assert.deepStrictEqual(utcMinute.range(utc(2011, 10, 6, 8, 59), utc(2011, 10, 6, 9, 2)), [ utc(2011, 10, 6, 8, 59), utc(2011, 10, 6, 9, 0), @@ -85,7 +86,7 @@ it("utcMinute.range(start, stop), observes end of daylight savings time", () => ]); }); -it("utcMinute.every(step) returns every stepth minute, starting with the first minute of the hour", () => { +test("utcMinute.every(step) returns every stepth minute, starting with the first minute of the hour", () => { assert.deepStrictEqual(utcMinute.every(15).range(utc(2008, 11, 30, 12, 47), utc(2008, 11, 30, 13, 57)), [utc(2008, 11, 30, 13, 0), utc(2008, 11, 30, 13, 15), utc(2008, 11, 30, 13, 30), utc(2008, 11, 30, 13, 45)]); assert.deepStrictEqual(utcMinute.every(30).range(utc(2008, 11, 30, 12, 47), utc(2008, 11, 30, 13, 57)), [utc(2008, 11, 30, 13, 0), utc(2008, 11, 30, 13, 30)]); }); diff --git a/test/utcMonday-test.js b/test/utcMonday-test.js index a28f17d..5da8557 100644 --- a/test/utcMonday-test.js +++ b/test/utcMonday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {utcMonday, utcMondays} from "../src/index.js"; import {utc} from "./date.js"; -it("utcMondays in an alias for utcMonday.range", () => { +test("utcMondays in an alias for utcMonday.range", () => { assert.strictEqual(utcMondays, utcMonday.range); }); -it("utcMonday.floor(date) returns Mondays", () => { +test("utcMonday.floor(date) returns Mondays", () => { assert.deepStrictEqual(utcMonday.floor(utc(2011, 0, 1, 23, 59, 59)), utc(2010, 11, 27)); assert.deepStrictEqual(utcMonday.floor(utc(2011, 0, 2, 0, 0, 0)), utc(2010, 11, 27)); assert.deepStrictEqual(utcMonday.floor(utc(2011, 0, 2, 0, 0, 1)), utc(2010, 11, 27)); @@ -15,7 +16,7 @@ it("utcMonday.floor(date) returns Mondays", () => { assert.deepStrictEqual(utcMonday.floor(utc(2011, 0, 3, 0, 0, 1)), utc(2011, 0, 3)); }); -it("utcMonday.range(start, stop, step) returns every step Monday", () => { +test("utcMonday.range(start, stop, step) returns every step Monday", () => { assert.deepStrictEqual(utcMonday.range(utc(2011, 11, 1), utc(2012, 0, 15), 2), [ utc(2011, 11, 5), utc(2011, 11, 19), @@ -23,7 +24,7 @@ it("utcMonday.range(start, stop, step) returns every step Monday", () => { ]); }); -it("utcMonday.count(start, end) counts Mondays after start (exclusive) and before end (inclusive)", () => { +test("utcMonday.count(start, end) counts Mondays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -48,7 +49,7 @@ it("utcMonday.count(start, end) counts Mondays after start (exclusive) and befor assert.strictEqual(utcMonday.count(utc(2018, 0, 1), utc(2018, 0, 9)), 1); }); -it("utcMonday.count(start, end) does not observe daylight saving", () => { +test("utcMonday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcMonday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcMonday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcMonday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcMonth-test.js b/test/utcMonth-test.js index 5d9cb4d..b2c0391 100644 --- a/test/utcMonth-test.js +++ b/test/utcMonth-test.js @@ -1,18 +1,19 @@ +import {test} from "vitest"; import assert from "assert"; import {utcMonth, utcMonths} from "../src/index.js"; import {utc} from "./date.js"; -it("utcMonths in an alias for utcMonth.range", () => { +test("utcMonths in an alias for utcMonth.range", () => { assert.strictEqual(utcMonths, utcMonth.range); }); -it("utcMonth.floor(date) returns months", () => { +test("utcMonth.floor(date) returns months", () => { assert.deepStrictEqual(utcMonth.floor(utc(2010, 11, 31, 23)), utc(2010, 11, 1)); assert.deepStrictEqual(utcMonth.floor(utc(2011, 0, 1, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(utcMonth.floor(utc(2011, 0, 1, 1)), utc(2011, 0, 1)); }); -it("utcMonth.floor(date) observes daylight saving", () => { +test("utcMonth.floor(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.floor(utc(2011, 2, 13, 7)), utc(2011, 2, 1)); assert.deepStrictEqual(utcMonth.floor(utc(2011, 2, 13, 8)), utc(2011, 2, 1)); assert.deepStrictEqual(utcMonth.floor(utc(2011, 2, 13, 9)), utc(2011, 2, 1)); @@ -23,16 +24,16 @@ it("utcMonth.floor(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.floor(utc(2011, 10, 6, 10)), utc(2011, 10, 1)); }); -it("utcMonth.floor(date) handles years in the first century", () => { +test("utcMonth.floor(date) handles years in the first century", () => { assert.deepStrictEqual(utcMonth.floor(utc(9, 10, 6, 7)), utc(9, 10, 1)); }); -it("utcMonth.round(date) returns months", () => { +test("utcMonth.round(date) returns months", () => { assert.deepStrictEqual(utcMonth.round(utc(2010, 11, 16, 12)), utc(2011, 0, 1)); assert.deepStrictEqual(utcMonth.round(utc(2010, 11, 16, 11)), utc(2010, 11, 1)); }); -it("utcMonth.round(date) observes daylight saving", () => { +test("utcMonth.round(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.round(utc(2011, 2, 13, 7)), utc(2011, 2, 1)); assert.deepStrictEqual(utcMonth.round(utc(2011, 2, 13, 8)), utc(2011, 2, 1)); assert.deepStrictEqual(utcMonth.round(utc(2011, 2, 13, 9)), utc(2011, 2, 1)); @@ -43,17 +44,17 @@ it("utcMonth.round(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.round(utc(2011, 10, 6, 20)), utc(2011, 10, 1)); }); -it("utcMonth.round(date) handles midnight for leap years", () => { +test("utcMonth.round(date) handles midnight for leap years", () => { assert.deepStrictEqual(utcMonth.round(utc(2012, 2, 1, 0)), utc(2012, 2, 1)); assert.deepStrictEqual(utcMonth.round(utc(2012, 2, 1, 0)), utc(2012, 2, 1)); }); -it("utcMonth.ceil(date) returns months", () => { +test("utcMonth.ceil(date) returns months", () => { assert.deepStrictEqual(utcMonth.ceil(utc(2010, 10, 30, 23)), utc(2010, 11, 1)); assert.deepStrictEqual(utcMonth.ceil(utc(2010, 11, 1, 1)), utc(2011, 0, 1)); }); -it("utcMonth.ceil(date) observes daylight saving", () => { +test("utcMonth.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.ceil(utc(2011, 2, 13, 7)), utc(2011, 3, 1)); assert.deepStrictEqual(utcMonth.ceil(utc(2011, 2, 13, 8)), utc(2011, 3, 1)); assert.deepStrictEqual(utcMonth.ceil(utc(2011, 2, 13, 9)), utc(2011, 3, 1)); @@ -64,44 +65,44 @@ it("utcMonth.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.ceil(utc(2011, 10, 6, 10)), utc(2011, 11, 1)); }); -it("utcMonth.ceil(date) handles midnight for leap years", () => { +test("utcMonth.ceil(date) handles midnight for leap years", () => { assert.deepStrictEqual(utcMonth.ceil(utc(2012, 2, 1, 0)), utc(2012, 2, 1)); assert.deepStrictEqual(utcMonth.ceil(utc(2012, 2, 1, 0)), utc(2012, 2, 1)); }); -it("utcMonth.offset(date) is an alias for utcMonth.offset(date, 1)", () => { +test("utcMonth.offset(date) is an alias for utcMonth.offset(date, 1)", () => { assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 31, 23, 59, 59, 999)); }); -it("utcMonth.offset(date, step) does not modify the passed-in date", () => { +test("utcMonth.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcMonth.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -it("utcMonth.offset(date, step) does not round the passed-in date", () => { +test("utcMonth.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 9, 31, 23, 59, 59, 456)); }); -it("utcMonth.offset(date, step) allows step to be negative", () => { +test("utcMonth.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31), -1), utc(2010, 10, 31)); assert.deepStrictEqual(utcMonth.offset(utc(2011, 0, 1), -2), utc(2010, 10, 1)); assert.deepStrictEqual(utcMonth.offset(utc(2011, 0, 1), -1), utc(2010, 11, 1)); }); -it("utcMonth.offset(date, step) allows step to be positive", () => { +test("utcMonth.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31), +1), utc(2011, 0, 31)); assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 30), +2), utc(2011, 1, 30)); assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 30), +1), utc(2011, 0, 30)); }); -it("utcMonth.offset(date, step) allows step to be zero", () => { +test("utcMonth.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -it("utcMonth.range(start, stop) returns months between start (inclusive) and stop (exclusive)", () => { +test("utcMonth.range(start, stop) returns months between start (inclusive) and stop (exclusive)", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 11, 1), utc(2012, 5, 1)), [ utc(2011, 11, 1), utc(2012, 0, 1), @@ -112,7 +113,7 @@ it("utcMonth.range(start, stop) returns months between start (inclusive) and sto ]); }); -it("utcMonth.range(start, stop) returns months", () => { +test("utcMonth.range(start, stop) returns months", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 10, 4, 2), utc(2012, 4, 10, 13)), [ utc(2011, 11, 1), utc(2012, 0, 1), @@ -123,7 +124,7 @@ it("utcMonth.range(start, stop) returns months", () => { ]); }); -it("utcMonth.range(start, stop) coerces start and stop to dates", () => { +test("utcMonth.range(start, stop) coerces start and stop to dates", () => { assert.deepStrictEqual(utcMonth.range(+utc(2011, 10, 4), +utc(2012, 1, 7)), [ utc(2011, 11, 1), utc(2012, 0, 1), @@ -131,16 +132,16 @@ it("utcMonth.range(start, stop) coerces start and stop to dates", () => { ]); }); -it("utcMonth.range(start, stop) returns the empty array for invalid dates", () => { +test("utcMonth.range(start, stop) returns the empty array for invalid dates", () => { assert.deepStrictEqual(utcMonth.range(new Date(NaN), Infinity), []); }); -it("utcMonth.range(start, stop) returns the empty array if start >= stop", () => { +test("utcMonth.range(start, stop) returns the empty array if start >= stop", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 11, 10), utc(2011, 10, 4)), []); assert.deepStrictEqual(utcMonth.range(utc(2011, 10, 1), utc(2011, 10, 1)), []); }); -it("utcMonth.range(start, stop) returns months", () => { +test("utcMonth.range(start, stop) returns months", () => { assert.deepStrictEqual(utcMonth.range(utc(2010, 10, 31), utc(2011, 2, 1)), [ utc(2010, 11, 1), utc(2011, 0, 1), @@ -148,15 +149,15 @@ it("utcMonth.range(start, stop) returns months", () => { ]); }); -it("utcMonth.range(start, stop) has an inclusive lower bound", () => { +test("utcMonth.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(utcMonth.range(utc(2010, 10, 31), utc(2011, 2, 1))[0], utc(2010, 11, 1)); }); -it("utcMonth.range(start, stop) has an exclusive upper bound", () => { +test("utcMonth.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(utcMonth.range(utc(2010, 10, 31), utc(2011, 2, 1))[2], utc(2011, 1, 1)); }); -it("utcMonth.range(start, stop) can skip months", () => { +test("utcMonth.range(start, stop) can skip months", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 1, 1), utc(2012, 1, 1), 3), [ utc(2011, 1, 1), utc(2011, 4, 1), @@ -165,7 +166,7 @@ it("utcMonth.range(start, stop) can skip months", () => { ]); }); -it("utcMonth.range(start, stop) observes start of daylight savings time", () => { +test("utcMonth.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 0, 1), utc(2011, 4, 1)), [ utc(2011, 0, 1), utc(2011, 1, 1), @@ -174,7 +175,7 @@ it("utcMonth.range(start, stop) observes start of daylight savings time", () => ]); }); -it("utcMonth.range(start, stop) observes end of daylight savings time", () => { +test("utcMonth.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 9, 1), utc(2012, 1, 1)), [ utc(2011, 9, 1), utc(2011, 10, 1), @@ -183,7 +184,7 @@ it("utcMonth.range(start, stop) observes end of daylight savings time", () => { ]); }); -it("utcMonth.count(start, end) counts months after start (exclusive) and before end (inclusive)", () => { +test("utcMonth.count(start, end) counts months after start (exclusive) and before end (inclusive)", () => { assert.strictEqual(utcMonth.count(utc(2011, 0, 1), utc(2011, 4, 1)), 4); assert.strictEqual(utcMonth.count(utc(2011, 0, 1), utc(2011, 3, 30)), 3); assert.strictEqual(utcMonth.count(utc(2010, 11, 31), utc(2011, 3, 30)), 4); @@ -192,6 +193,6 @@ it("utcMonth.count(start, end) counts months after start (exclusive) and before assert.strictEqual(utcMonth.count(utc(2012, 4, 1), utc(2009, 11, 31)), -29); }); -it("utcMonth.every(step) returns every stepth month, starting with the first month of the year", () => { +test("utcMonth.every(step) returns every stepth month, starting with the first month of the year", () => { assert.deepStrictEqual(utcMonth.every(3).range(utc(2008, 11, 3), utc(2010, 6, 5)), [utc(2009, 0, 1), utc(2009, 3, 1), utc(2009, 6, 1), utc(2009, 9, 1), utc(2010, 0, 1), utc(2010, 3, 1), utc(2010, 6, 1)]); }); diff --git a/test/utcMultiYear-test.js b/test/utcMultiYear-test.js index 689e1ad..6ef2853 100644 --- a/test/utcMultiYear-test.js +++ b/test/utcMultiYear-test.js @@ -1,37 +1,38 @@ +import {test} from "vitest"; import assert from "assert"; import {utcYear} from "../src/index.js"; import {utc} from "./date.js"; -it("utcYear.every(n).floor(date) returns integer multiples of n years", () => { +test("utcYear.every(n).floor(date) returns integer multiples of n years", () => { assert.deepStrictEqual(utcYear.every(10).floor(utc(2009, 11, 31, 23, 59, 59)), utc(2000, 0, 1)); assert.deepStrictEqual(utcYear.every(10).floor(utc(2010, 0, 1, 0, 0, 0)), utc(2010, 0, 1)); assert.deepStrictEqual(utcYear.every(10).floor(utc(2010, 0, 1, 0, 0, 1)), utc(2010, 0, 1)); }); -it("utcYear.every(n).ceil(date) returns integer multiples of n years", () => { +test("utcYear.every(n).ceil(date) returns integer multiples of n years", () => { assert.deepStrictEqual(utcYear.every(100).ceil(utc(1999, 11, 31, 23, 59, 59)), utc(2000, 0, 1)); assert.deepStrictEqual(utcYear.every(100).ceil(utc(2000, 0, 1, 0, 0, 0)), utc(2000, 0, 1)); assert.deepStrictEqual(utcYear.every(100).ceil(utc(2000, 0, 1, 0, 0, 1)), utc(2100, 0, 1)); }); -it("utcYear.every(n).offset(date, count) does not modify the passed-in date", () => { +test("utcYear.every(n).offset(date, count) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcYear.every(5).offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -it("utcYear.every(n).offset(date, count) does not round the passed-in-date", () => { +test("utcYear.every(n).offset(date, count) does not round the passed-in-date", () => { assert.deepStrictEqual(utcYear.every(5).offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2015, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcYear.every(5).offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2000, 11, 31, 23, 59, 59, 456)); }); -it("utcYear.every(n) does not define interval.count or interval.every", () => { +test("utcYear.every(n) does not define interval.count or interval.every", () => { const decade = utcYear.every(10); assert.strictEqual(decade.count, undefined); assert.strictEqual(decade.every, undefined); }); -it("utcYear.every(n).range(start, stop) returns multiples of n years", () => { +test("utcYear.every(n).range(start, stop) returns multiples of n years", () => { assert.deepStrictEqual(utcYear.every(10).range(utc(2010, 0, 1), utc(2031, 0, 1)), [ utc(2010, 0, 1), utc(2020, 0, 1), diff --git a/test/utcSaturday-test.js b/test/utcSaturday-test.js index 9783e2e..1db4854 100644 --- a/test/utcSaturday-test.js +++ b/test/utcSaturday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {utcSaturday, utcSaturdays} from "../src/index.js"; import {utc} from "./date.js"; -it("utcSaturdays in an alias for utcSaturday.range", () => { +test("utcSaturdays in an alias for utcSaturday.range", () => { assert.strictEqual(utcSaturdays, utcSaturday.range); }); -it("utcSaturday.floor(date) returns Saturdays", () => { +test("utcSaturday.floor(date) returns Saturdays", () => { assert.deepStrictEqual(utcSaturday.floor(utc(2011, 0, 6, 23, 59, 59)), utc(2011, 0, 1)); assert.deepStrictEqual(utcSaturday.floor(utc(2011, 0, 7, 0, 0, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(utcSaturday.floor(utc(2011, 0, 7, 0, 0, 1)), utc(2011, 0, 1)); @@ -15,7 +16,7 @@ it("utcSaturday.floor(date) returns Saturdays", () => { assert.deepStrictEqual(utcSaturday.floor(utc(2011, 0, 8, 0, 0, 1)), utc(2011, 0, 8)); }); -it("utcSaturday.count(start, end) counts Saturdays after start (exclusive) and before end (inclusive)", () => { +test("utcSaturday.count(start, end) counts Saturdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -41,7 +42,7 @@ it("utcSaturday.count(start, end) counts Saturdays after start (exclusive) and b assert.strictEqual(utcSaturday.count(utc(2011, 0, 1), utc(2011, 0, 9)), 1); }); -it("utcSaturday.count(start, end) does not observe daylight saving", () => { +test("utcSaturday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcSaturday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcSaturday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcSaturday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcSecond-test.js b/test/utcSecond-test.js index bccf956..76b2f1f 100644 --- a/test/utcSecond-test.js +++ b/test/utcSecond-test.js @@ -1,54 +1,55 @@ +import {test} from "vitest"; import assert from "assert"; import {utcSecond} from "../src/index.js"; import {utc} from "./date.js"; -it("utcSecond.floor(date) returns seconds", () => { +test("utcSecond.floor(date) returns seconds", () => { assert.deepStrictEqual(utcSecond.floor(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2010, 11, 31, 23, 59, 59)); assert.deepStrictEqual(utcSecond.floor(utc(2011, 0, 1, 0, 0, 0, 0)), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.floor(utc(2011, 0, 1, 0, 0, 0, 1)), utc(2011, 0, 1, 0, 0, 0)); }); -it("utcSecond.round(date) returns seconds", () => { +test("utcSecond.round(date) returns seconds", () => { assert.deepStrictEqual(utcSecond.round(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.round(utc(2011, 0, 1, 0, 0, 0, 499)), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.round(utc(2011, 0, 1, 0, 0, 0, 500)), utc(2011, 0, 1, 0, 0, 1)); }); -it("utcSecond.ceil(date) returns seconds", () => { +test("utcSecond.ceil(date) returns seconds", () => { assert.deepStrictEqual(utcSecond.ceil(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.ceil(utc(2011, 0, 1, 0, 0, 0, 0)), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.ceil(utc(2011, 0, 1, 0, 0, 0, 1)), utc(2011, 0, 1, 0, 0, 1)); }); -it("utcSecond.offset(date, step) does not modify the passed-in date", () => { +test("utcSecond.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcSecond.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -it("utcSecond.offset(date, step) does not round the passed-in-date", () => { +test("utcSecond.offset(date, step) does not round the passed-in-date", () => { assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 1, 0, 0, 0, 999)); assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 31, 23, 59, 57, 456)); }); -it("utcSecond.offset(date, step) allows negative offsets", () => { +test("utcSecond.offset(date, step) allows negative offsets", () => { assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 59), -1), utc(2010, 11, 31, 23, 59, 58)); assert.deepStrictEqual(utcSecond.offset(utc(2011, 0, 1, 0, 0, 0), -2), utc(2010, 11, 31, 23, 59, 58)); assert.deepStrictEqual(utcSecond.offset(utc(2011, 0, 1, 0, 0, 0), -1), utc(2010, 11, 31, 23, 59, 59)); }); -it("utcSecond.offset(date, step) allows positive offsets", () => { +test("utcSecond.offset(date, step) allows positive offsets", () => { assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 58), +1), utc(2010, 11, 31, 23, 59, 59)); assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 58), +2), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 59), +1), utc(2011, 0, 1, 0, 0, 0)); }); -it("utcSecond.offset(date, step) allows zero offset", () => { +test("utcSecond.offset(date, step) allows zero offset", () => { assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -it("utcSecond.range(start, stop) returns seconds", () => { +test("utcSecond.range(start, stop) returns seconds", () => { assert.deepStrictEqual(utcSecond.range(utc(2010, 11, 31, 23, 59, 59), utc(2011, 0, 1, 0, 0, 2)), [ utc(2010, 11, 31, 23, 59, 59), utc(2011, 0, 1, 0, 0, 0), @@ -56,15 +57,15 @@ it("utcSecond.range(start, stop) returns seconds", () => { ]); }); -it("utcSecond.range(start, stop) has an inclusive lower bound", () => { +test("utcSecond.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(utcSecond.range(utc(2010, 11, 31, 23, 59, 59), utc(2011, 0, 1, 0, 0, 2))[0], utc(2010, 11, 31, 23, 59, 59)); }); -it("utcSecond.range(start, stop) has an exclusive upper bound", () => { +test("utcSecond.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(utcSecond.range(utc(2010, 11, 31, 23, 59, 59), utc(2011, 0, 1, 0, 0, 2))[2], utc(2011, 0, 1, 0, 0, 1)); }); -it("utcSecond.range(start, stop, step) can skip seconds", () => { +test("utcSecond.range(start, stop, step) can skip seconds", () => { assert.deepStrictEqual(utcSecond.range(utc(2011, 1, 1, 12, 0, 7), utc(2011, 1, 1, 12, 1, 7), 15), [ utc(2011, 1, 1, 12, 0, 7), utc(2011, 1, 1, 12, 0, 22), @@ -73,7 +74,7 @@ it("utcSecond.range(start, stop, step) can skip seconds", () => { ]); }); -it("utcSecond.range(start, stop) observes start of daylight savings time", () => { +test("utcSecond.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(utcSecond.range(utc(2011, 2, 13, 9, 59, 59), utc(2011, 2, 13, 10, 0, 2)), [ utc(2011, 2, 13, 9, 59, 59), utc(2011, 2, 13, 10, 0, 0), @@ -81,7 +82,7 @@ it("utcSecond.range(start, stop) observes start of daylight savings time", () => ]); }); -it("utcSecond.range(start, stop) observes end of daylight savings time", () => { +test("utcSecond.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(utcSecond.range(utc(2011, 10, 6, 8, 59, 59), utc(2011, 10, 6, 9, 0, 2)), [ utc(2011, 10, 6, 8, 59, 59), utc(2011, 10, 6, 9, 0, 0), @@ -89,7 +90,7 @@ it("utcSecond.range(start, stop) observes end of daylight savings time", () => { ]); }); -it("utcSecond.every(step) returns every stepth second, starting with the first second of the minute", () => { +test("utcSecond.every(step) returns every stepth second, starting with the first second of the minute", () => { assert.deepStrictEqual(utcSecond.every(15).range(utc(2008, 11, 30, 12, 36, 47), utc(2008, 11, 30, 12, 37, 57)), [utc(2008, 11, 30, 12, 37, 0), utc(2008, 11, 30, 12, 37, 15), utc(2008, 11, 30, 12, 37, 30), utc(2008, 11, 30, 12, 37, 45)]); assert.deepStrictEqual(utcSecond.every(30).range(utc(2008, 11, 30, 12, 36, 47), utc(2008, 11, 30, 12, 37, 57)), [utc(2008, 11, 30, 12, 37, 0), utc(2008, 11, 30, 12, 37, 30)]); }); diff --git a/test/utcSunday-test.js b/test/utcSunday-test.js index fec7dcf..fab835f 100644 --- a/test/utcSunday-test.js +++ b/test/utcSunday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {utcSunday, utcSundays} from "../src/index.js"; import {utc} from "./date.js"; -it("utcSundays in an alias for utcSunday.range", () => { +test("utcSundays in an alias for utcSunday.range", () => { assert.strictEqual(utcSundays, utcSunday.range); }); -it("utcSunday.floor(date) returns Sundays", () => { +test("utcSunday.floor(date) returns Sundays", () => { assert.deepStrictEqual(utcSunday.floor(utc(2010, 11, 31, 23, 59, 59)), utc(2010, 11, 26)); assert.deepStrictEqual(utcSunday.floor(utc(2011, 0, 1, 0, 0, 0)), utc(2010, 11, 26)); assert.deepStrictEqual(utcSunday.floor(utc(2011, 0, 1, 0, 0, 1)), utc(2010, 11, 26)); @@ -15,16 +16,16 @@ it("utcSunday.floor(date) returns Sundays", () => { assert.deepStrictEqual(utcSunday.floor(utc(2011, 0, 2, 0, 0, 1)), utc(2011, 0, 2)); }); -it("utcSunday.floor(date) observes daylight saving", () => { +test("utcSunday.floor(date) observes daylight saving", () => { assert.deepStrictEqual(utcSunday.floor(utc(2011, 2, 13, 1)), utc(2011, 2, 13)); assert.deepStrictEqual(utcSunday.floor(utc(2011, 10, 6, 1)), utc(2011, 10, 6)); }); -it("utcSunday.floor(date) handles years in the first century", () => { +test("utcSunday.floor(date) handles years in the first century", () => { assert.deepStrictEqual(utcSunday.floor(utc(9, 10, 6, 7)), utc(9, 10, 1)); }); -it("utcSunday.ceil(date) returns Sundays", () => { +test("utcSunday.ceil(date) returns Sundays", () => { assert.deepStrictEqual(utcSunday.ceil(utc(2010, 11, 31, 23, 59, 59)), utc(2011, 0, 2)); assert.deepStrictEqual(utcSunday.ceil(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 2)); assert.deepStrictEqual(utcSunday.ceil(utc(2011, 0, 1, 0, 0, 1)), utc(2011, 0, 2)); @@ -33,44 +34,44 @@ it("utcSunday.ceil(date) returns Sundays", () => { assert.deepStrictEqual(utcSunday.ceil(utc(2011, 0, 2, 0, 0, 1)), utc(2011, 0, 9)); }); -it("utcSunday.ceil(date) observes daylight saving", () => { +test("utcSunday.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(utcSunday.ceil(utc(2011, 2, 13, 1)), utc(2011, 2, 20)); assert.deepStrictEqual(utcSunday.ceil(utc(2011, 10, 6, 1)), utc(2011, 10, 13)); }); -it("utcSunday.offset(date) is an alias for utcSunday.offset(date, 1)", () => { +test("utcSunday.offset(date) is an alias for utcSunday.offset(date, 1)", () => { assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 7, 23, 59, 59, 999)); }); -it("utcSunday.offset(date, step) does not modify the passed-in date", () => { +test("utcSunday.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcSunday.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -it("utcSunday.offset(date, step) does not round the passed-in date", () => { +test("utcSunday.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 7, 23, 59, 59, 999)); assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 17, 23, 59, 59, 456)); }); -it("utcSunday.offset(date, step) allows step to be negative", () => { +test("utcSunday.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 1), -1), utc(2010, 10, 24)); assert.deepStrictEqual(utcSunday.offset(utc(2011, 0, 1), -2), utc(2010, 11, 18)); assert.deepStrictEqual(utcSunday.offset(utc(2011, 0, 1), -1), utc(2010, 11, 25)); }); -it("utcSunday.offset(date, step) allows step to be positive", () => { +test("utcSunday.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(utcSunday.offset(utc(2010, 10, 24), +1), utc(2010, 11, 1)); assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 18), +2), utc(2011, 0, 1)); assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 25), +1), utc(2011, 0, 1)); }); -it("utcSunday.offset(date, step) allows step to be zero", () => { +test("utcSunday.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -it("utcSunday.range(start, stop) returns Sundays between start (inclusive) and stop (exclusive)", () => { +test("utcSunday.range(start, stop) returns Sundays between start (inclusive) and stop (exclusive)", () => { assert.deepStrictEqual(utcSunday.range(utc(2011, 11, 1), utc(2012, 0, 15)), [ utc(2011, 11, 4), utc(2011, 11, 11), @@ -81,7 +82,7 @@ it("utcSunday.range(start, stop) returns Sundays between start (inclusive) and s ]); }); -it("utcSunday.range(start, stop) returns Sundays", () => { +test("utcSunday.range(start, stop) returns Sundays", () => { assert.deepStrictEqual(utcSunday.range(utc(2011, 11, 1, 12, 23), utc(2012, 0, 14, 12, 23)), [ utc(2011, 11, 4), utc(2011, 11, 11), @@ -92,7 +93,7 @@ it("utcSunday.range(start, stop) returns Sundays", () => { ]); }); -it("utcSunday.range(start, stop) coerces start and stop to dates", () => { +test("utcSunday.range(start, stop) coerces start and stop to dates", () => { assert.deepStrictEqual(utcSunday.range(+utc(2011, 11, 1), +utc(2012, 0, 15)), [ utc(2011, 11, 4), utc(2011, 11, 11), @@ -103,16 +104,16 @@ it("utcSunday.range(start, stop) coerces start and stop to dates", () => { ]); }); -it("utcSunday.range(start, stop) returns the empty array for invalid dates", () => { +test("utcSunday.range(start, stop) returns the empty array for invalid dates", () => { assert.deepStrictEqual(utcSunday.range(new Date(NaN), Infinity), []); }); -it("utcSunday.range(start, stop) returns the empty array if start >= stop", () => { +test("utcSunday.range(start, stop) returns the empty array if start >= stop", () => { assert.deepStrictEqual(utcSunday.range(utc(2011, 11, 10), utc(2011, 10, 4)), []); assert.deepStrictEqual(utcSunday.range(utc(2011, 10, 1), utc(2011, 10, 1)), []); }); -it("utcSunday.range(start, stop, step) returns every step Sunday", () => { +test("utcSunday.range(start, stop, step) returns every step Sunday", () => { assert.deepStrictEqual(utcSunday.range(utc(2011, 11, 1), utc(2012, 0, 15), 2), [ utc(2011, 11, 4), utc(2011, 11, 18), @@ -120,7 +121,7 @@ it("utcSunday.range(start, stop, step) returns every step Sunday", () => { ]); }); -it("utcSunday.count(start, end) counts Sundays after start (exclusive) and before end (inclusive)", () => { +test("utcSunday.count(start, end) counts Sundays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -145,7 +146,7 @@ it("utcSunday.count(start, end) counts Sundays after start (exclusive) and befor assert.strictEqual(utcSunday.count(utc(2012, 0, 1), utc(2012, 0, 9)), 1); }); -it("utcSunday.count(start, end) does not observe daylight saving", () => { +test("utcSunday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcSunday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 11); assert.strictEqual(utcSunday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 11); assert.strictEqual(utcSunday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 11); diff --git a/test/utcThursday-test.js b/test/utcThursday-test.js index 56426f6..42fea2f 100644 --- a/test/utcThursday-test.js +++ b/test/utcThursday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {utc} from "./date.js"; import {utcThursday, utcThursdays} from "../src/index.js"; -it("utcThursdays in an alias for utcThursday.range", () => { +test("utcThursdays in an alias for utcThursday.range", () => { assert.strictEqual(utcThursdays, utcThursday.range); }); -it("utcThursday.floor(date) returns Thursdays", () => { +test("utcThursday.floor(date) returns Thursdays", () => { assert.deepStrictEqual(utcThursday.floor(utc(2011, 0, 4, 23, 59, 59)), utc(2010, 11, 30)); assert.deepStrictEqual(utcThursday.floor(utc(2011, 0, 5, 0, 0, 0)), utc(2010, 11, 30)); assert.deepStrictEqual(utcThursday.floor(utc(2011, 0, 5, 0, 0, 1)), utc(2010, 11, 30)); @@ -15,7 +16,7 @@ it("utcThursday.floor(date) returns Thursdays", () => { assert.deepStrictEqual(utcThursday.floor(utc(2011, 0, 6, 0, 0, 1)), utc(2011, 0, 6)); }); -it("utcThursday.count(start, end) counts Thursdays after start (exclusive) and before end (inclusive)", () => { +test("utcThursday.count(start, end) counts Thursdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -40,7 +41,7 @@ it("utcThursday.count(start, end) counts Thursdays after start (exclusive) and b assert.strictEqual(utcThursday.count(utc(2015, 0, 1), utc(2015, 0, 9)), 1); }); -it("utcThursday.count(start, end) does not observe daylight saving", () => { +test("utcThursday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcThursday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcThursday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcThursday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcTicks-test.js b/test/utcTicks-test.js index fc243a3..a4968f5 100644 --- a/test/utcTicks-test.js +++ b/test/utcTicks-test.js @@ -1,8 +1,9 @@ +import {test} from "vitest"; import assert from "assert"; import {utcMinute, utcTicks} from "../src/index.js"; import {utc} from "./date.js"; -it("utcTicks(start, stop, interval) respects the specified interval", () => { +test("utcTicks(start, stop, interval) respects the specified interval", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 1, 0), utc(2011, 0, 1, 12, 4, 4), utcMinute), [ utc(2011, 0, 1, 12, 1), utc(2011, 0, 1, 12, 2), @@ -11,7 +12,7 @@ it("utcTicks(start, stop, interval) respects the specified interval", () => { ]); }); -it("utcTicks(start, stop, interval.every(step)) observes the specified tick interval and step", () => { +test("utcTicks(start, stop, interval.every(step)) observes the specified tick interval and step", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 33, 4), utcMinute.every(10)), [ utc(2011, 0, 1, 12, 0), utc(2011, 0, 1, 12, 10), @@ -20,7 +21,7 @@ it("utcTicks(start, stop, interval.every(step)) observes the specified tick inte ]); }); -it("utcTicks(start, stop, count) can generate sub-second ticks", () => { +test("utcTicks(start, stop, count) can generate sub-second ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 1), 4), [ utc(2011, 0, 1, 12, 0, 0, 0), utc(2011, 0, 1, 12, 0, 0, 200), @@ -31,7 +32,7 @@ it("utcTicks(start, stop, count) can generate sub-second ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 1-second ticks", () => { +test("utcTicks(start, stop, count) can generate 1-second ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 4), 4), [ utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 1), @@ -41,7 +42,7 @@ it("utcTicks(start, stop, count) can generate 1-second ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 5-second ticks", () => { +test("utcTicks(start, stop, count) can generate 5-second ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 20), 4), [ utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 5), @@ -51,7 +52,7 @@ it("utcTicks(start, stop, count) can generate 5-second ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 15-second ticks", () => { +test("utcTicks(start, stop, count) can generate 15-second ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 50), 4), [ utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 15), @@ -60,7 +61,7 @@ it("utcTicks(start, stop, count) can generate 15-second ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 30-second ticks", () => { +test("utcTicks(start, stop, count) can generate 30-second ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 1, 50), 4), [ utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 30), @@ -69,7 +70,7 @@ it("utcTicks(start, stop, count) can generate 30-second ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 1-minute ticks", () => { +test("utcTicks(start, stop, count) can generate 1-minute ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 27), utc(2011, 0, 1, 12, 4, 12), 4), [ utc(2011, 0, 1, 12, 1), utc(2011, 0, 1, 12, 2), @@ -78,7 +79,7 @@ it("utcTicks(start, stop, count) can generate 1-minute ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 5-minute ticks", () => { +test("utcTicks(start, stop, count) can generate 5-minute ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 3, 27), utc(2011, 0, 1, 12, 21, 12), 4), [ utc(2011, 0, 1, 12, 5), utc(2011, 0, 1, 12, 10), @@ -87,7 +88,7 @@ it("utcTicks(start, stop, count) can generate 5-minute ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 15-minute ticks", () => { +test("utcTicks(start, stop, count) can generate 15-minute ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 8, 27), utc(2011, 0, 1, 13, 4, 12), 4), [ utc(2011, 0, 1, 12, 15), utc(2011, 0, 1, 12, 30), @@ -96,7 +97,7 @@ it("utcTicks(start, stop, count) can generate 15-minute ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 30-minute ticks", () => { +test("utcTicks(start, stop, count) can generate 30-minute ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 28, 27), utc(2011, 0, 1, 14, 4, 12), 4), [ utc(2011, 0, 1, 12, 30), utc(2011, 0, 1, 13, 0), @@ -105,7 +106,7 @@ it("utcTicks(start, stop, count) can generate 30-minute ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 1-hour ticks", () => { +test("utcTicks(start, stop, count) can generate 1-hour ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 28, 27), utc(2011, 0, 1, 16, 34, 12), 4), [ utc(2011, 0, 1, 13, 0), utc(2011, 0, 1, 14, 0), @@ -114,7 +115,7 @@ it("utcTicks(start, stop, count) can generate 1-hour ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 3-hour ticks", () => { +test("utcTicks(start, stop, count) can generate 3-hour ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 14, 28, 27), utc(2011, 0, 2, 1, 34, 12), 4), [ utc(2011, 0, 1, 15, 0), utc(2011, 0, 1, 18, 0), @@ -123,7 +124,7 @@ it("utcTicks(start, stop, count) can generate 3-hour ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 6-hour ticks", () => { +test("utcTicks(start, stop, count) can generate 6-hour ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 2, 14, 34, 12), 4), [ utc(2011, 0, 1, 18, 0), utc(2011, 0, 2, 0, 0), @@ -132,7 +133,7 @@ it("utcTicks(start, stop, count) can generate 6-hour ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 12-hour ticks", () => { +test("utcTicks(start, stop, count) can generate 12-hour ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 3, 21, 34, 12), 4), [ utc(2011, 0, 2, 0, 0), utc(2011, 0, 2, 12, 0), @@ -141,7 +142,7 @@ it("utcTicks(start, stop, count) can generate 12-hour ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 1-day ticks", () => { +test("utcTicks(start, stop, count) can generate 1-day ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 5, 21, 34, 12), 4), [ utc(2011, 0, 2, 0, 0), utc(2011, 0, 3, 0, 0), @@ -150,7 +151,7 @@ it("utcTicks(start, stop, count) can generate 1-day ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 2-day ticks", () => { +test("utcTicks(start, stop, count) can generate 2-day ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 2, 16, 28, 27), utc(2011, 0, 9, 21, 34, 12), 4), [ utc(2011, 0, 4, 0, 0), utc(2011, 0, 6, 0, 0), @@ -158,7 +159,7 @@ it("utcTicks(start, stop, count) can generate 2-day ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 1-week ticks", () => { +test("utcTicks(start, stop, count) can generate 1-week ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 23, 21, 34, 12), 4), [ utc(2011, 0, 2, 0, 0), utc(2011, 0, 9, 0, 0), @@ -167,7 +168,7 @@ it("utcTicks(start, stop, count) can generate 1-week ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 1-month ticks", () => { +test("utcTicks(start, stop, count) can generate 1-month ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 18), utc(2011, 4, 2), 4), [ utc(2011, 1, 1, 0, 0), utc(2011, 2, 1, 0, 0), @@ -176,7 +177,7 @@ it("utcTicks(start, stop, count) can generate 1-month ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 3-month ticks", () => { +test("utcTicks(start, stop, count) can generate 3-month ticks", () => { assert.deepStrictEqual(utcTicks(utc(2010, 11, 18), utc(2011, 10, 2), 4), [ utc(2011, 0, 1, 0, 0), utc(2011, 3, 1, 0, 0), @@ -185,7 +186,7 @@ it("utcTicks(start, stop, count) can generate 3-month ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate 1-year ticks", () => { +test("utcTicks(start, stop, count) can generate 1-year ticks", () => { assert.deepStrictEqual(utcTicks(utc(2010, 11, 18), utc(2014, 2, 2), 4), [ utc(2011, 0, 1, 0, 0), utc(2012, 0, 1, 0, 0), @@ -194,7 +195,7 @@ it("utcTicks(start, stop, count) can generate 1-year ticks", () => { ]); }); -it("utcTicks(start, stop, count) can generate multi-year ticks", () => { +test("utcTicks(start, stop, count) can generate multi-year ticks", () => { assert.deepStrictEqual(utcTicks(utc(0, 11, 18), utc(2014, 2, 2), 6), [ utc( 500, 0, 1, 0, 0), utc(1000, 0, 1, 0, 0), @@ -203,11 +204,11 @@ it("utcTicks(start, stop, count) can generate multi-year ticks", () => { ]); }); -it("utcTicks(start, stop, count) returns one tick for an empty domain", () => { +test("utcTicks(start, stop, count) returns one tick for an empty domain", () => { assert.deepStrictEqual(utcTicks(utc(2014, 2, 2), utc(2014, 2, 2), 6), [utc(2014, 2, 2)]); }); -it("utcTicks(start, stop, count) returns descending ticks for a descending domain", () => { +test("utcTicks(start, stop, count) returns descending ticks for a descending domain", () => { assert.deepStrictEqual(utcTicks(utc(2014, 2, 2), utc(2010, 11, 18), 4), [utc(2014, 0, 1, 0, 0), utc(2013, 0, 1, 0, 0), utc(2012, 0, 1, 0, 0), utc(2011, 0, 1, 0, 0)]); assert.deepStrictEqual(utcTicks(utc(2011, 10, 2), utc(2010, 11, 18), 4), [utc(2011, 9, 1, 0, 0), utc(2011, 6, 1, 0, 0), utc(2011, 3, 1, 0, 0), utc(2011, 0, 1, 0, 0)]); }); diff --git a/test/utcTuesday-test.js b/test/utcTuesday-test.js index cbcad05..50532c4 100644 --- a/test/utcTuesday-test.js +++ b/test/utcTuesday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {utcTuesday, utcTuesdays} from "../src/index.js"; import {utc} from "./date.js"; -it("utcTuesdays in an alias for utcTuesday.range", () => { +test("utcTuesdays in an alias for utcTuesday.range", () => { assert.strictEqual(utcTuesdays, utcTuesday.range); }); -it("utcTuesday.floor(date) returns Tuesdays", () => { +test("utcTuesday.floor(date) returns Tuesdays", () => { assert.deepStrictEqual(utcTuesday.floor(utc(2011, 0, 2, 23, 59, 59)), utc(2010, 11, 28)); assert.deepStrictEqual(utcTuesday.floor(utc(2011, 0, 3, 0, 0, 0)), utc(2010, 11, 28)); assert.deepStrictEqual(utcTuesday.floor(utc(2011, 0, 3, 0, 0, 1)), utc(2010, 11, 28)); @@ -15,7 +16,7 @@ it("utcTuesday.floor(date) returns Tuesdays", () => { assert.deepStrictEqual(utcTuesday.floor(utc(2011, 0, 4, 0, 0, 1)), utc(2011, 0, 4)); }); -it("utcTuesday.count(start, end) counts Tuesdays after start (exclusive) and before end (inclusive)", () => { +test("utcTuesday.count(start, end) counts Tuesdays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -40,7 +41,7 @@ it("utcTuesday.count(start, end) counts Tuesdays after start (exclusive) and bef assert.strictEqual(utcTuesday.count(utc(2013, 0, 1), utc(2013, 0, 9)), 1); }); -it("utcTuesday.count(start, end) does not observe daylight saving", () => { +test("utcTuesday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcTuesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcTuesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcTuesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcWednesday-test.js b/test/utcWednesday-test.js index 78a76ea..a24d577 100644 --- a/test/utcWednesday-test.js +++ b/test/utcWednesday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {utcWednesday, utcWednesdays} from "../src/index.js"; import {utc} from "./date.js"; -it("utcWednesdays in an alias for utcWednesday.range", () => { +test("utcWednesdays in an alias for utcWednesday.range", () => { assert.strictEqual(utcWednesdays, utcWednesday.range); }); -it("utcWednesday.floor(date) returns Wednesdays", () => { +test("utcWednesday.floor(date) returns Wednesdays", () => { assert.deepStrictEqual(utcWednesday.floor(utc(2011, 0, 3, 23, 59, 59)), utc(2010, 11, 29)); assert.deepStrictEqual(utcWednesday.floor(utc(2011, 0, 4, 0, 0, 0)), utc(2010, 11, 29)); assert.deepStrictEqual(utcWednesday.floor(utc(2011, 0, 4, 0, 0, 1)), utc(2010, 11, 29)); @@ -15,7 +16,7 @@ it("utcWednesday.floor(date) returns Wednesdays", () => { assert.deepStrictEqual(utcWednesday.floor(utc(2011, 0, 5, 0, 0, 1)), utc(2011, 0, 5)); }); -it("utcWednesday.count(start, end) counts Wednesdays after start (exclusive) and before end (inclusive)", () => { +test("utcWednesday.count(start, end) counts Wednesdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -40,7 +41,7 @@ it("utcWednesday.count(start, end) counts Wednesdays after start (exclusive) and assert.strictEqual(utcWednesday.count(utc(2014, 0, 1), utc(2014, 0, 9)), 1); }); -it("utcWednesday.count(start, end) does not observe daylight saving", () => { +test("utcWednesday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcWednesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcWednesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcWednesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcWeek-test.js b/test/utcWeek-test.js index 3825cf6..7632f2e 100644 --- a/test/utcWeek-test.js +++ b/test/utcWeek-test.js @@ -1,8 +1,9 @@ +import {test} from "vitest"; import assert from "assert"; import {utcSunday, utcWeek} from "../src/index.js"; import {utc} from "./date.js"; -it("utcWeek.floor(date) returns sundays", () => { +test("utcWeek.floor(date) returns sundays", () => { assert.deepStrictEqual(utcWeek.floor(utc(2010, 11, 31, 23, 59, 59)), utc(2010, 11, 26)); assert.deepStrictEqual(utcWeek.floor(utc(2011, 0, 1, 0, 0, 0)), utc(2010, 11, 26)); assert.deepStrictEqual(utcWeek.floor(utc(2011, 0, 1, 0, 0, 1)), utc(2010, 11, 26)); @@ -11,19 +12,19 @@ it("utcWeek.floor(date) returns sundays", () => { assert.deepStrictEqual(utcWeek.floor(utc(2011, 0, 2, 0, 0, 1)), utc(2011, 0, 2)); }); -it("utcWeek.floor(date) observes the start of daylight savings time", () => { +test("utcWeek.floor(date) observes the start of daylight savings time", () => { assert.deepStrictEqual(utcWeek.floor(utc(2011, 2, 13, 1)), utc(2011, 2, 13)); }); -it("utcWeek.floor(date) observes the end of the daylight savings time", () => { +test("utcWeek.floor(date) observes the end of the daylight savings time", () => { assert.deepStrictEqual(utcWeek.floor(utc(2011, 10, 6, 1)), utc(2011, 10, 6)); }); -it("utcWeek.floor(date) correctly handles years in the first century", () => { +test("utcWeek.floor(date) correctly handles years in the first century", () => { assert.deepStrictEqual(utcWeek.floor(utc(9, 10, 6, 7)), utc(9, 10, 1)); }); -it("utcWeek.ceil(date) returns sundays", () => { +test("utcWeek.ceil(date) returns sundays", () => { assert.deepStrictEqual(utcWeek.ceil(utc(2010, 11, 31, 23, 59, 59)), utc(2011, 0, 2)); assert.deepStrictEqual(utcWeek.ceil(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 2)); assert.deepStrictEqual(utcWeek.ceil(utc(2011, 0, 1, 0, 0, 1)), utc(2011, 0, 2)); @@ -32,43 +33,43 @@ it("utcWeek.ceil(date) returns sundays", () => { assert.deepStrictEqual(utcWeek.ceil(utc(2011, 0, 2, 0, 0, 1)), utc(2011, 0, 9)); }); -it("utcWeek.ceil(date) does not observe the start of daylight savings time", () => { +test("utcWeek.ceil(date) does not observe the start of daylight savings time", () => { assert.deepStrictEqual(utcWeek.ceil(utc(2011, 2, 13, 1)), utc(2011, 2, 20)); }); -it("utcWeek.ceil(date) does not observe the end of the daylight savings time", () => { +test("utcWeek.ceil(date) does not observe the end of the daylight savings time", () => { assert.deepStrictEqual(utcWeek.ceil(utc(2011, 10, 6, 1)), utc(2011, 10, 13)); }); -it("utcWeek.offset(date, step) does not modify the passed-in date", () => { +test("utcWeek.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcWeek.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -it("utcWeek.offset(date, step) does not round the passed-in-date", () => { +test("utcWeek.offset(date, step) does not round the passed-in-date", () => { assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 7, 23, 59, 59, 999)); assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 17, 23, 59, 59, 456)); }); -it("utcWeek.offset(date, step) allows negative offsets", () => { +test("utcWeek.offset(date, step) allows negative offsets", () => { assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 1), -1), utc(2010, 10, 24)); assert.deepStrictEqual(utcWeek.offset(utc(2011, 0, 1), -2), utc(2010, 11, 18)); assert.deepStrictEqual(utcWeek.offset(utc(2011, 0, 1), -1), utc(2010, 11, 25)); }); -it("utcWeek.offset(date, step) allows positive offsets", () => { +test("utcWeek.offset(date, step) allows positive offsets", () => { assert.deepStrictEqual(utcWeek.offset(utc(2010, 10, 24), +1), utc(2010, 11, 1)); assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 18), +2), utc(2011, 0, 1)); assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 25), +1), utc(2011, 0, 1)); }); -it("utcWeek.offset(date, step) allows zero offset", () => { +test("utcWeek.offset(date, step) allows zero offset", () => { assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -it("utcWeek.range(start, stop) returns sundays", () => { +test("utcWeek.range(start, stop) returns sundays", () => { assert.deepStrictEqual(utcWeek.range(utc(2010, 11, 21), utc(2011, 0, 12)), [ utc(2010, 11, 26), utc(2011, 0, 2), @@ -76,15 +77,15 @@ it("utcWeek.range(start, stop) returns sundays", () => { ]); }); -it("utcWeek.range(start, stop) has an inclusive lower bound", () => { +test("utcWeek.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(utcWeek.range(utc(2010, 11, 21), utc(2011, 0, 12))[0], utc(2010, 11, 26)); }); -it("utcWeek.range(start, stop) has an exclusive upper bound", () => { +test("utcWeek.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(utcWeek.range(utc(2010, 11, 21), utc(2011, 0, 12))[2], utc(2011, 0, 9)); }); -it("utcWeek.range(start, stop) can skip weeks", () => { +test("utcWeek.range(start, stop) can skip weeks", () => { assert.deepStrictEqual(utcWeek.range(utc(2011, 0, 1), utc(2011, 3, 1), 4), [ utc(2011, 0, 2), utc(2011, 0, 30), @@ -93,7 +94,7 @@ it("utcWeek.range(start, stop) can skip weeks", () => { ]); }); -it("utcWeek.range(start, stop) does not observe start of daylight savings time", () => { +test("utcWeek.range(start, stop) does not observe start of daylight savings time", () => { assert.deepStrictEqual(utcWeek.range(utc(2011, 2, 1), utc(2011, 2, 28)), [ utc(2011, 2, 6), utc(2011, 2, 13), @@ -102,7 +103,7 @@ it("utcWeek.range(start, stop) does not observe start of daylight savings time", ]); }); -it("utcWeek.range(start, stop) does not observe end of daylight savings time", () => { +test("utcWeek.range(start, stop) does not observe end of daylight savings time", () => { assert.deepStrictEqual(utcWeek.range(utc(2011, 10, 1), utc(2011, 10, 30)), [ utc(2011, 10, 6), utc(2011, 10, 13), @@ -111,10 +112,10 @@ it("utcWeek.range(start, stop) does not observe end of daylight savings time", ( ]); }); -it("utcWeek is an alias for utcSunday", () => { +test("utcWeek is an alias for utcSunday", () => { assert.strictEqual(utcWeek, utcSunday); }); -it("utcWeek.every(step) returns every stepth Sunday, starting with the first Sunday of the month", () => { +test("utcWeek.every(step) returns every stepth Sunday, starting with the first Sunday of the month", () => { assert.deepStrictEqual(utcWeek.every(2).range(utc(2008, 11, 3), utc(2009, 1, 5)), [utc(2008, 11, 7), utc(2008, 11, 21), utc(2009, 0, 4), utc(2009, 0, 18), utc(2009, 1, 1)]); }); diff --git a/test/utcYear-test.js b/test/utcYear-test.js index 93f172c..56583b6 100644 --- a/test/utcYear-test.js +++ b/test/utcYear-test.js @@ -1,62 +1,63 @@ +import {test} from "vitest"; import assert from "assert"; import {utcYear} from "../src/index.js"; import {utc} from "./date.js"; -it("utcYear.floor(date) returns years", () => { +test("utcYear.floor(date) returns years", () => { assert.deepStrictEqual(utcYear.floor(utc(2010, 11, 31, 23, 59, 59)), utc(2010, 0, 1)); assert.deepStrictEqual(utcYear.floor(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(utcYear.floor(utc(2011, 0, 1, 0, 0, 1)), utc(2011, 0, 1)); }); -it("utcYear.floor(date) does not modify the specified date", () => { +test("utcYear.floor(date) does not modify the specified date", () => { const d = utc(2010, 11, 31, 23, 59, 59); assert.deepStrictEqual(utcYear.floor(d), utc(2010, 0, 1)); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59)); }); -it("utcYear.floor(date) correctly handles years in the first century", () => { +test("utcYear.floor(date) correctly handles years in the first century", () => { assert.deepStrictEqual(utcYear.floor(utc(9, 10, 6, 7)), utc(9, 0, 1)); }); -it("utcYear.ceil(date) returns years", () => { +test("utcYear.ceil(date) returns years", () => { assert.deepStrictEqual(utcYear.ceil(utc(2010, 11, 31, 23, 59, 59)), utc(2011, 0, 1)); assert.deepStrictEqual(utcYear.ceil(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(utcYear.ceil(utc(2011, 0, 1, 0, 0, 1)), utc(2012, 0, 1)); }); -it("utcYear.offset(date, count) does not modify the passed-in date", () => { +test("utcYear.offset(date, count) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcYear.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -it("utcYear.offset(date, count) does not round the passed-in-date", () => { +test("utcYear.offset(date, count) does not round the passed-in-date", () => { assert.deepStrictEqual(utcYear.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcYear.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2008, 11, 31, 23, 59, 59, 456)); }); -it("utcYear.offset(date, count) allows negative offsets", () => { +test("utcYear.offset(date, count) allows negative offsets", () => { assert.deepStrictEqual(utcYear.offset(utc(2010, 11, 1), -1), utc(2009, 11, 1)); assert.deepStrictEqual(utcYear.offset(utc(2011, 0, 1), -2), utc(2009, 0, 1)); assert.deepStrictEqual(utcYear.offset(utc(2011, 0, 1), -1), utc(2010, 0, 1)); }); -it("utcYear.offset(date, count) allows positive offsets", () => { +test("utcYear.offset(date, count) allows positive offsets", () => { assert.deepStrictEqual(utcYear.offset(utc(2009, 11, 1), +1), utc(2010, 11, 1)); assert.deepStrictEqual(utcYear.offset(utc(2009, 0, 1), +2), utc(2011, 0, 1)); assert.deepStrictEqual(utcYear.offset(utc(2010, 0, 1), +1), utc(2011, 0, 1)); }); -it("utcYear.offset(date, count) allows zero offset", () => { +test("utcYear.offset(date, count) allows zero offset", () => { assert.deepStrictEqual(utcYear.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcYear.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -it("utcYear.every(step) returns every stepth year, starting with year zero", () => { +test("utcYear.every(step) returns every stepth year, starting with year zero", () => { assert.deepStrictEqual(utcYear.every(5).range(utc(2008), utc(2023)), [utc(2010), utc(2015), utc(2020)]); }); -it("utcYear.range(start, stop) returns years", () => { +test("utcYear.range(start, stop) returns years", () => { assert.deepStrictEqual(utcYear.range(utc(2010, 0, 1), utc(2013, 0, 1)), [ utc(2010, 0, 1), utc(2011, 0, 1), @@ -64,15 +65,15 @@ it("utcYear.range(start, stop) returns years", () => { ]); }); -it("utcYear.range(start, stop) has an inclusive lower bound", () => { +test("utcYear.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(utcYear.range(utc(2010, 0, 1), utc(2013, 0, 1))[0], utc(2010, 0, 1)); }); -it("utcYear.range(start, stop) has an exclusive upper bound", () => { +test("utcYear.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(utcYear.range(utc(2010, 0, 1), utc(2013, 0, 1))[2], utc(2012, 0, 1)); }); -it("utcYear.range(start, stop, step) can skip years", () => { +test("utcYear.range(start, stop, step) can skip years", () => { assert.deepStrictEqual(utcYear.range(utc(2009, 0, 1), utc(2029, 0, 1), 5), [ utc(2009, 0, 1), utc(2014, 0, 1), diff --git a/test/wednesday-test.js b/test/wednesday-test.js index 6a826ca..3e28588 100644 --- a/test/wednesday-test.js +++ b/test/wednesday-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {local} from "./date.js"; import {timeWednesday, timeWednesdays} from "../src/index.js"; -it("timeWednesdays in an alias for timeWednesday.range", () => { +test("timeWednesdays in an alias for timeWednesday.range", () => { assert.strictEqual(timeWednesdays, timeWednesday.range); }); -it("timeWednesday.floor(date) returns Wednesdays", () => { +test("timeWednesday.floor(date) returns Wednesdays", () => { assert.deepStrictEqual(timeWednesday.floor(local(2011, 0, 3, 23, 59, 59)), local(2010, 11, 29)); assert.deepStrictEqual(timeWednesday.floor(local(2011, 0, 4, 0, 0, 0)), local(2010, 11, 29)); assert.deepStrictEqual(timeWednesday.floor(local(2011, 0, 4, 0, 0, 1)), local(2010, 11, 29)); @@ -15,7 +16,7 @@ it("timeWednesday.floor(date) returns Wednesdays", () => { assert.deepStrictEqual(timeWednesday.floor(local(2011, 0, 5, 0, 0, 1)), local(2011, 0, 5)); }); -it("timeWednesday.count(start, end) counts Wednesdays after start (exclusive) and before end (inclusive)", () => { +test("timeWednesday.count(start, end) counts Wednesdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -40,7 +41,7 @@ it("timeWednesday.count(start, end) counts Wednesdays after start (exclusive) an assert.strictEqual(timeWednesday.count(local(2014, 0, 1), local(2014, 0, 9)), 1); }); -it("timeWednesday.count(start, end) observes daylight saving", () => { +test("timeWednesday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeWednesday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeWednesday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeWednesday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/week-test.js b/test/week-test.js index 3340323..6480445 100644 --- a/test/week-test.js +++ b/test/week-test.js @@ -1,8 +1,9 @@ +import {test} from "vitest"; import assert from "assert"; import {timeSunday, timeWeek} from "../src/index.js"; import {local} from "./date.js"; -it("timeWeek.floor(date) returns sundays", () => { +test("timeWeek.floor(date) returns sundays", () => { assert.deepStrictEqual(timeWeek.floor(local(2010, 11, 31, 23, 59, 59)), local(2010, 11, 26)); assert.deepStrictEqual(timeWeek.floor(local(2011, 0, 1, 0, 0, 0)), local(2010, 11, 26)); assert.deepStrictEqual(timeWeek.floor(local(2011, 0, 1, 0, 0, 1)), local(2010, 11, 26)); @@ -11,19 +12,19 @@ it("timeWeek.floor(date) returns sundays", () => { assert.deepStrictEqual(timeWeek.floor(local(2011, 0, 2, 0, 0, 1)), local(2011, 0, 2)); }); -it("timeWeek.floor(date) observes the start of daylight savings time", () => { +test("timeWeek.floor(date) observes the start of daylight savings time", () => { assert.deepStrictEqual(timeWeek.floor(local(2011, 2, 13, 1)), local(2011, 2, 13)); }); -it("timeWeek.floor(date) observes the end of the daylight savings time", () => { +test("timeWeek.floor(date) observes the end of the daylight savings time", () => { assert.deepStrictEqual(timeWeek.floor(local(2011, 10, 6, 1)), local(2011, 10, 6)); }); -it("timeWeek.floor(date) correctly handles years in the first century", () => { +test("timeWeek.floor(date) correctly handles years in the first century", () => { assert.deepStrictEqual(timeWeek.floor(local(9, 10, 6, 7)), local(9, 10, 1)); }); -it("timeWeek.ceil(date) returns sundays", () => { +test("timeWeek.ceil(date) returns sundays", () => { assert.deepStrictEqual(timeWeek.ceil(local(2010, 11, 31, 23, 59, 59)), local(2011, 0, 2)); assert.deepStrictEqual(timeWeek.ceil(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 2)); assert.deepStrictEqual(timeWeek.ceil(local(2011, 0, 1, 0, 0, 1)), local(2011, 0, 2)); @@ -32,43 +33,43 @@ it("timeWeek.ceil(date) returns sundays", () => { assert.deepStrictEqual(timeWeek.ceil(local(2011, 0, 2, 0, 0, 1)), local(2011, 0, 9)); }); -it("timeWeek.ceil(date) observes the start of daylight savings time", () => { +test("timeWeek.ceil(date) observes the start of daylight savings time", () => { assert.deepStrictEqual(timeWeek.ceil(local(2011, 2, 13, 1)), local(2011, 2, 20)); }); -it("timeWeek.ceil(date) observes the end of the daylight savings time", () => { +test("timeWeek.ceil(date) observes the end of the daylight savings time", () => { assert.deepStrictEqual(timeWeek.ceil(local(2011, 10, 6, 1)), local(2011, 10, 13)); }); -it("timeWeek.offset(date, step) does not modify the passed-in date", () => { +test("timeWeek.offset(date, step) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeWeek.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -it("timeWeek.offset(date, step) does not round the passed-in-date", () => { +test("timeWeek.offset(date, step) does not round the passed-in-date", () => { assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 7, 23, 59, 59, 999)); assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 17, 23, 59, 59, 456)); }); -it("timeWeek.offset(date, step) allows negative offsets", () => { +test("timeWeek.offset(date, step) allows negative offsets", () => { assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 1), -1), local(2010, 10, 24)); assert.deepStrictEqual(timeWeek.offset(local(2011, 0, 1), -2), local(2010, 11, 18)); assert.deepStrictEqual(timeWeek.offset(local(2011, 0, 1), -1), local(2010, 11, 25)); }); -it("timeWeek.offset(date, step) allows positive offsets", () => { +test("timeWeek.offset(date, step) allows positive offsets", () => { assert.deepStrictEqual(timeWeek.offset(local(2010, 10, 24), +1), local(2010, 11, 1)); assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 18), +2), local(2011, 0, 1)); assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 25), +1), local(2011, 0, 1)); }); -it("timeWeek.offset(date, step) allows zero offset", () => { +test("timeWeek.offset(date, step) allows zero offset", () => { assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -it("timeWeek.range(start, stop) returns sundays", () => { +test("timeWeek.range(start, stop) returns sundays", () => { assert.deepStrictEqual(timeWeek.range(local(2010, 11, 21), local(2011, 0, 12)), [ local(2010, 11, 26), local(2011, 0, 2), @@ -76,15 +77,15 @@ it("timeWeek.range(start, stop) returns sundays", () => { ]); }); -it("timeWeek.range(start, stop) has an inclusive lower bound", () => { +test("timeWeek.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(timeWeek.range(local(2010, 11, 21), local(2011, 0, 12))[0], local(2010, 11, 26)); }); -it("timeWeek.range(start, stop) has an exclusive upper bound", () => { +test("timeWeek.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(timeWeek.range(local(2010, 11, 21), local(2011, 0, 12))[2], local(2011, 0, 9)); }); -it("timeWeek.range(start, stop) can skip weeks", () => { +test("timeWeek.range(start, stop) can skip weeks", () => { assert.deepStrictEqual(timeWeek.range(local(2011, 0, 1), local(2011, 3, 1), 4), [ local(2011, 0, 2), local(2011, 0, 30), @@ -93,7 +94,7 @@ it("timeWeek.range(start, stop) can skip weeks", () => { ]); }); -it("timeWeek.range(start, stop) observes start of daylight savings time", () => { +test("timeWeek.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(timeWeek.range(local(2011, 2, 1), local(2011, 2, 28)), [ local(2011, 2, 6), local(2011, 2, 13), @@ -102,7 +103,7 @@ it("timeWeek.range(start, stop) observes start of daylight savings time", () => ]); }); -it("timeWeek.range(start, stop) observes end of daylight savings time", () => { +test("timeWeek.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(timeWeek.range(local(2011, 10, 1), local(2011, 10, 30)), [ local(2011, 10, 6), local(2011, 10, 13), @@ -111,10 +112,10 @@ it("timeWeek.range(start, stop) observes end of daylight savings time", () => { ]); }); -it("timeWeek is an alias for timeSunday", () => { +test("timeWeek is an alias for timeSunday", () => { assert.strictEqual(timeWeek, timeSunday); }); -it("timeWeek.every(step) returns every stepth Sunday, starting with the first Sunday of the month", () => { +test("timeWeek.every(step) returns every stepth Sunday, starting with the first Sunday of the month", () => { assert.deepStrictEqual(timeWeek.every(2).range(local(2008, 11, 3), local(2009, 1, 5)), [local(2008, 11, 7), local(2008, 11, 21), local(2009, 0, 4), local(2009, 0, 18), local(2009, 1, 1)]); }); diff --git a/test/year-test.js b/test/year-test.js index e934804..160684a 100644 --- a/test/year-test.js +++ b/test/year-test.js @@ -1,62 +1,63 @@ +import {test} from "vitest"; import assert from "assert"; import {timeYear} from "../src/index.js"; import {local} from "./date.js"; -it("timeYear.floor(date) returns years", () => { +test("timeYear.floor(date) returns years", () => { assert.deepStrictEqual(timeYear.floor(local(2010, 11, 31, 23, 59, 59)), local(2010, 0, 1)); assert.deepStrictEqual(timeYear.floor(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeYear.floor(local(2011, 0, 1, 0, 0, 1)), local(2011, 0, 1)); }); -it("timeYear.floor(date) does not modify the specified date", () => { +test("timeYear.floor(date) does not modify the specified date", () => { const d = local(2010, 11, 31, 23, 59, 59); assert.deepStrictEqual(timeYear.floor(d), local(2010, 0, 1)); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59)); }); -it("timeYear.floor(date) correctly handles years in the first century", () => { +test("timeYear.floor(date) correctly handles years in the first century", () => { assert.deepStrictEqual(timeYear.floor(local(9, 10, 6, 7)), local(9, 0, 1)); }); -it("timeYear.ceil(date) returns years", () => { +test("timeYear.ceil(date) returns years", () => { assert.deepStrictEqual(timeYear.ceil(local(2010, 11, 31, 23, 59, 59)), local(2011, 0, 1)); assert.deepStrictEqual(timeYear.ceil(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeYear.ceil(local(2011, 0, 1, 0, 0, 1)), local(2012, 0, 1)); }); -it("timeYear.offset(date, count) does not modify the passed-in date", () => { +test("timeYear.offset(date, count) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeYear.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -it("timeYear.offset(date, count) does not round the passed-in-date", () => { +test("timeYear.offset(date, count) does not round the passed-in-date", () => { assert.deepStrictEqual(timeYear.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeYear.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2008, 11, 31, 23, 59, 59, 456)); }); -it("timeYear.offset(date, count) allows negative offsets", () => { +test("timeYear.offset(date, count) allows negative offsets", () => { assert.deepStrictEqual(timeYear.offset(local(2010, 11, 1), -1), local(2009, 11, 1)); assert.deepStrictEqual(timeYear.offset(local(2011, 0, 1), -2), local(2009, 0, 1)); assert.deepStrictEqual(timeYear.offset(local(2011, 0, 1), -1), local(2010, 0, 1)); }); -it("timeYear.offset(date, count) allows positive offsets", () => { +test("timeYear.offset(date, count) allows positive offsets", () => { assert.deepStrictEqual(timeYear.offset(local(2009, 11, 1), +1), local(2010, 11, 1)); assert.deepStrictEqual(timeYear.offset(local(2009, 0, 1), +2), local(2011, 0, 1)); assert.deepStrictEqual(timeYear.offset(local(2010, 0, 1), +1), local(2011, 0, 1)); }); -it("timeYear.offset(date, count) allows zero offset", () => { +test("timeYear.offset(date, count) allows zero offset", () => { assert.deepStrictEqual(timeYear.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeYear.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -it("timeYear.every(step) returns every stepth year, starting with year zero", () => { +test("timeYear.every(step) returns every stepth year, starting with year zero", () => { assert.deepStrictEqual(timeYear.every(5).range(local(2008), local(2023)), [local(2010), local(2015), local(2020)]); }); -it("timeYear.range(start, stop) returns years", () => { +test("timeYear.range(start, stop) returns years", () => { assert.deepStrictEqual(timeYear.range(local(2010, 0, 1), local(2013, 0, 1)), [ local(2010, 0, 1), local(2011, 0, 1), @@ -64,15 +65,15 @@ it("timeYear.range(start, stop) returns years", () => { ]); }); -it("timeYear.range(start, stop) has an inclusive lower bound", () => { +test("timeYear.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(timeYear.range(local(2010, 0, 1), local(2013, 0, 1))[0], local(2010, 0, 1)); }); -it("timeYear.range(start, stop) has an exclusive upper bound", () => { +test("timeYear.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(timeYear.range(local(2010, 0, 1), local(2013, 0, 1))[2], local(2012, 0, 1)); }); -it("timeYear.range(start, stop, step) can skip years", () => { +test("timeYear.range(start, stop, step) can skip years", () => { assert.deepStrictEqual(timeYear.range(local(2009, 0, 1), local(2029, 0, 1), 5), [ local(2009, 0, 1), local(2014, 0, 1), diff --git a/vitest.config.js b/vitest.config.js new file mode 100644 index 0000000..b728050 --- /dev/null +++ b/vitest.config.js @@ -0,0 +1,3 @@ +import {defineConfig} from "vitest/config"; + +export default defineConfig({test: {include: ["test/**/*-test.js"]}}); From dd3233a67910d21a86e8f84cc85568965225a915 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:12:47 -0800 Subject: [PATCH 3/9] eslint 10, vitest 5 Co-Authored-By: Claude Opus 5.5 --- package.json | 6 +- pnpm-lock.yaml | 559 +++++++++++++++++++------------------------------ 2 files changed, 216 insertions(+), 349 deletions(-) diff --git a/package.json b/package.json index 897186a..e3af87e 100644 --- a/package.json +++ b/package.json @@ -37,13 +37,13 @@ "d3-array": "2 - 3" }, "devDependencies": { - "@eslint/js": "^9.39.5", + "@eslint/js": "^10.0.1", "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-terser": "^1.0.2", - "eslint": "^9.39.5", + "eslint": "^10.14.0", "globals": "^17.14.0", "rollup": "^4.67.4", - "vitest": "^4.1.12" + "vitest": "^5.1.0" }, "scripts": { "test": "TZ=America/Los_Angeles vitest", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f3d45cd..658462f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,8 +13,8 @@ importers: version: 3.2.4 devDependencies: '@eslint/js': - specifier: ^9.39.5 - version: 9.39.5 + specifier: ^10.0.1 + version: 10.0.1(eslint@10.14.0) '@rollup/plugin-node-resolve': specifier: ^16.0.3 version: 16.0.3(rollup@4.67.4) @@ -22,8 +22,8 @@ importers: specifier: ^1.0.2 version: 1.0.2(rollup@4.67.4) eslint: - specifier: ^9.39.5 - version: 9.39.5 + specifier: ^10.14.0 + version: 10.14.0 globals: specifier: ^17.14.0 version: 17.14.0 @@ -31,11 +31,17 @@ importers: specifier: ^4.67.4 version: 4.67.4 vitest: - specifier: ^4.1.12 - version: 4.1.12(vite@8.3.5(terser@5.51.2)) + specifier: ^5.1.0 + version: 5.1.0(vite@8.3.5(terser@5.51.2)) packages: + '@cacheable/memory@2.2.0': + resolution: {integrity: sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==} + + '@cacheable/utils@2.5.0': + resolution: {integrity: sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==} + '@eslint-community/eslint-utils@4.10.1': resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -46,33 +52,34 @@ packages: resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.21.2': - resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-array@0.23.5': + resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/config-helpers@0.4.2': - resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-helpers@0.7.0': + resolution: {integrity: sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/core@0.17.0': - resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@1.2.1': + resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/eslintrc@3.3.7': - resolution: {integrity: sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.39.5': - resolution: {integrity: sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@10.0.1': + resolution: {integrity: sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + peerDependencies: + eslint: ^10.0.0 + peerDependenciesMeta: + eslint: + optional: true - '@eslint/object-schema@2.1.7': - resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/object-schema@3.0.5': + resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/plugin-kit@0.4.1': - resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/plugin-kit@0.7.3': + resolution: {integrity: sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} '@humanfs/core@0.19.2': resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} @@ -110,6 +117,15 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@keyv/bigmap@1.3.1': + resolution: {integrity: sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==} + engines: {node: '>= 18'} + peerDependencies: + keyv: ^5.6.0 + + '@keyv/serialize@1.1.1': + resolution: {integrity: sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==} + '@napi-rs/lzma-linux-x64-gnu@1.5.1': resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} engines: {node: ^22.20 || ^24.12 || >=25} @@ -389,15 +405,15 @@ packages: cpu: [x64] os: [win32] - '@standard-schema/spec@1.1.0': - resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} - '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/esrecurse@4.3.1': + resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==} + '@types/estree@1.0.10': resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==} @@ -407,13 +423,10 @@ packages: '@types/resolve@1.20.2': resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} - '@vitest/expect@4.1.12': - resolution: {integrity: sha512-vFlTt+YEu9WBpNjdGayNmlMVzrWPi1+sv853/7t2FU7hpO5gAFBKHzQmkCq5Xjpr+evegF2994LQT3hF3mRlqQ==} - - '@vitest/mocker@4.1.12': - resolution: {integrity: sha512-fKShNpKZzupWZuY0z7egydvL0sqW4INEZBEExMBMAa6izlENEVHwoXgdaTCaBZ5fwlr4xf2o1wXC83n9RpO+NA==} + '@vitest/mocker@5.1.0': + resolution: {integrity: sha512-5umB9/jlWcqVS6fsrFmv5Gdnpu6wAUio/lEOwAmvB7v+lFo/IW2B9FhAD0p19GCULTgMzLCdUmuCDCnAzWgppQ==} peerDependencies: - msw: ^2.4.9 + msw: ^2.4.9 || ^3.0.0 vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: msw: @@ -421,20 +434,8 @@ packages: vite: optional: true - '@vitest/pretty-format@4.1.12': - resolution: {integrity: sha512-XW9O8+Mxx4VpCtkYdMJLZQQwsVryP9wk7cPKDxtXFfwSak6yRh5+2fep/Y0XF/ElBvJHq8bcYdi6aeuai0opZA==} - - '@vitest/runner@4.1.12': - resolution: {integrity: sha512-NKlVKCr5QnCe8jijdMnmkpHHU+WTqiLFR6G0pHji9uRjXK9xJl1k1nTw6F3pOOj2PDcsDt2GKQMI7wIsaT491w==} - - '@vitest/snapshot@4.1.12': - resolution: {integrity: sha512-ko1y1Qgb/slzQ9mr+b89Cuqud8WG1TKtsPD8r7ZUBdvVOGt85Af2HwCqHujrhwJq95hs/9RM7fcAPg57o1vlzw==} - - '@vitest/spy@4.1.12': - resolution: {integrity: sha512-RGq9x4JNGNTZHEJxvN0oSiJjeSCExm0n2gZKKJZHY9cX5AVA6M7VJILBT3ZJ/tJ/0J9uWT7fETV9/btoi//vSg==} - - '@vitest/utils@4.1.12': - resolution: {integrity: sha512-Q3awXrwOfEV+qc3WmO5ONyE0yO7Q1gQ9/oyHxGLZ/pl7N3NO/ZztqQwKLuwMkV+CA1JYSIeO3gkHnRDIo4AVaA==} + '@vitest/spy@5.1.0': + resolution: {integrity: sha512-2DPO5OMHWKrBngC+fCmTQqemNF0gidRhp3lxbBmRhW+M1XJrfgPpqNqWVevXtn2f2ufD5ZaR1B6B641aAlcX5A==} acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} @@ -449,54 +450,31 @@ packages: ajv@6.15.0: resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} - brace-expansion@1.1.21: - resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} + brace-expansion@5.0.12: + resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} + engines: {node: 20 || >=22} buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} + cacheable@2.5.0: + resolution: {integrity: sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==} chai@6.3.0: resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} engines: {node: '>=18'} - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - - convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -536,22 +514,21 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-scope@8.4.0: - resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@9.1.2: + resolution: {integrity: sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.2.1: - resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - eslint@9.39.5: - resolution: {integrity: sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + eslint@10.14.0: + resolution: {integrity: sha512-T0pNsxkb9IKmtQjhpK3d7nWOpFv+YHuMbTJnSVMoQblF0onvXfErrtp4V1jHtsQPan7dKaGVD0q1WCXnzMF31A==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} hasBin: true peerDependencies: jiti: '*' @@ -559,9 +536,9 @@ packages: jiti: optional: true - espree@10.4.0: - resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@11.2.0: + resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} esquery@1.7.0: resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} @@ -607,17 +584,15 @@ packages: picomatch: optional: true - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@11.1.5: + resolution: {integrity: sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==} find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@6.1.23: + resolution: {integrity: sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==} flatted@3.4.4: resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} @@ -634,30 +609,28 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globals@17.14.0: resolution: {integrity: sha512-UtdkTVyAJePQv0J2M9Xe4L0ruNSDV314XiIJsADI2Zf40bcdAonE/D/OhAU8AT99oij9mhLByb+NvA3QWZYgCg==} engines: {node: '>=18'} - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} + hashery@1.5.1: + resolution: {integrity: sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==} + engines: {node: '>=20'} hasown@2.0.4: resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} engines: {node: '>= 0.4'} + hookified@1.15.1: + resolution: {integrity: sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==} + + hookified@2.2.0: + resolution: {integrity: sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - import-fresh@3.3.1: - resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} - engines: {node: '>=6'} - imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -684,21 +657,14 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - js-yaml@4.3.2: - resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} - hasBin: true - - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + keyv@5.6.0: + resolution: {integrity: sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==} levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} @@ -782,14 +748,12 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - - magic-string@0.30.21: - resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + magic-string@1.4.5: + resolution: {integrity: sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==} - minimatch@3.1.5: - resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} + engines: {node: 18 || 20 || >=22} ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -802,8 +766,8 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - obug@2.2.1: - resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==} + obug@3.0.0: + resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} engines: {node: '>=12.20.0'} optionator@0.9.4: @@ -818,10 +782,6 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -833,9 +793,6 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - pathe@2.0.3: - resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -855,9 +812,9 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} + qified@0.10.1: + resolution: {integrity: sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==} + engines: {node: '>=20'} resolve@1.22.13: resolution: {integrity: sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA==} @@ -886,9 +843,6 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - siginfo@2.0.0: - resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - smob@1.6.2: resolution: {integrity: sha512-RQsvleCbF8cVHEv+xuDGaA4pOizFqJ0GgjtMSRo6oP8pnN7WsigHgVGey6aILRBKv4W2YOMHLqbKdnB6hpB9fw==} engines: {node: '>=20.0.0'} @@ -904,20 +858,9 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - stackback@0.0.2: - resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - std-env@4.3.0: resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -927,8 +870,9 @@ packages: engines: {node: '>=10'} hasBin: true - tinybench@2.9.0: - resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinybench@6.2.3: + resolution: {integrity: sha512-Al01C2JIBnO2CXCAPbpAl6sUiOZHeThGtHYNTa51JRw9PyWOCdr+9Ong05R4qg/Sk3+H645E8ov1h2c58ityNw==} + engines: {node: '>=20.0.0'} tinyexec@1.3.1: resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} @@ -938,10 +882,6 @@ packages: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} - tinyrainbow@3.2.0: - resolution: {integrity: sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==} - engines: {node: '>=14.0.0'} - type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -992,23 +932,23 @@ packages: yaml: optional: true - vitest@4.1.12: - resolution: {integrity: sha512-5eWdz2yb3ajxWF3C8C4TjkXl7FGm3n2E/VlazALrQHzK7nYMSGFnCZto0bbPNl77AwkOZVLk0YnBAejUu0NiWA==} - engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + vitest@5.1.0: + resolution: {integrity: sha512-MzmNFnrwa8v8lF1bLxw3UJ4EREwVOVb75VqJZmUDRjJ6EluK/x9th7qTbaeDk41WxE1GxWqmTXcdsfobfH5sOA==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 - '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.1.12 - '@vitest/browser-preview': 4.1.12 - '@vitest/browser-webdriverio': ^4.1.11 - '@vitest/coverage-istanbul': 4.1.12 - '@vitest/coverage-v8': 4.1.12 - '@vitest/ui': 4.1.12 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.1.0 + '@vitest/browser-preview': 5.1.0 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.1.0 + '@vitest/coverage-v8': 5.1.0 + '@vitest/ui': 5.1.0 happy-dom: '*' jsdom: '*' - vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + vite: ^6.4.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: '@edge-runtime/vm': optional: true @@ -1038,9 +978,9 @@ packages: engines: {node: '>= 8'} hasBin: true - why-is-node-running@2.3.0: - resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} - engines: {node: '>=8'} + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} hasBin: true word-wrap@1.2.5: @@ -1053,50 +993,50 @@ packages: snapshots: - '@eslint-community/eslint-utils@4.10.1(eslint@9.39.5)': + '@cacheable/memory@2.2.0': dependencies: - eslint: 9.39.5 + '@cacheable/utils': 2.5.0 + '@keyv/bigmap': 1.3.1(keyv@5.6.0) + hookified: 1.15.1 + keyv: 5.6.0 + + '@cacheable/utils@2.5.0': + dependencies: + hashery: 1.5.1 + keyv: 5.6.0 + + '@eslint-community/eslint-utils@4.10.1(eslint@10.14.0)': + dependencies: + eslint: 10.14.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.2': {} - '@eslint/config-array@0.21.2': + '@eslint/config-array@0.23.5': dependencies: - '@eslint/object-schema': 2.1.7 + '@eslint/object-schema': 3.0.5 debug: 4.4.3 - minimatch: 3.1.5 + minimatch: 10.2.6 transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.4.2': + '@eslint/config-helpers@0.7.0': dependencies: - '@eslint/core': 0.17.0 + '@eslint/core': 1.2.1 - '@eslint/core@0.17.0': + '@eslint/core@1.2.1': dependencies: '@types/json-schema': 7.0.15 - '@eslint/eslintrc@3.3.7': - dependencies: - ajv: 6.15.0 - debug: 4.4.3 - espree: 10.4.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.3.2 - minimatch: 3.1.5 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@9.39.5': {} + '@eslint/js@10.0.1(eslint@10.14.0)': + optionalDependencies: + eslint: 10.14.0 - '@eslint/object-schema@2.1.7': {} + '@eslint/object-schema@3.0.5': {} - '@eslint/plugin-kit@0.4.1': + '@eslint/plugin-kit@0.7.3': dependencies: - '@eslint/core': 0.17.0 + '@eslint/core': 1.2.1 levn: 0.4.1 '@humanfs/core@0.19.2': @@ -1134,6 +1074,14 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.6.0 + '@keyv/bigmap@1.3.1(keyv@5.6.0)': + dependencies: + hashery: 1.5.1 + hookified: 1.15.1 + keyv: 5.6.0 + + '@keyv/serialize@1.1.1': {} + '@napi-rs/lzma-linux-x64-gnu@1.5.1': optional: true @@ -1290,8 +1238,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.67.4': optional: true - '@standard-schema/spec@1.1.0': {} - '@types/chai@5.2.3': dependencies: '@types/deep-eql': 4.0.2 @@ -1299,52 +1245,24 @@ snapshots: '@types/deep-eql@4.0.2': {} + '@types/esrecurse@4.3.1': {} + '@types/estree@1.0.10': {} '@types/json-schema@7.0.15': {} '@types/resolve@1.20.2': {} - '@vitest/expect@4.1.12': + '@vitest/mocker@5.1.0(vite@8.3.5(terser@5.51.2))': dependencies: - '@standard-schema/spec': 1.1.0 - '@types/chai': 5.2.3 - '@vitest/spy': 4.1.12 - '@vitest/utils': 4.1.12 - chai: 6.3.0 - tinyrainbow: 3.2.0 - - '@vitest/mocker@4.1.12(vite@8.3.5(terser@5.51.2))': - dependencies: - '@vitest/spy': 4.1.12 + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.1.0 estree-walker: 3.0.3 - magic-string: 0.30.21 + magic-string: 1.4.5 optionalDependencies: vite: 8.3.5(terser@5.51.2) - '@vitest/pretty-format@4.1.12': - dependencies: - tinyrainbow: 3.2.0 - - '@vitest/runner@4.1.12': - dependencies: - '@vitest/utils': 4.1.12 - pathe: 2.0.3 - - '@vitest/snapshot@4.1.12': - dependencies: - '@vitest/pretty-format': 4.1.12 - '@vitest/utils': 4.1.12 - magic-string: 0.30.21 - pathe: 2.0.3 - - '@vitest/spy@4.1.12': {} - - '@vitest/utils@4.1.12': - dependencies: - '@vitest/pretty-format': 4.1.12 - convert-source-map: 2.0.0 - tinyrainbow: 3.2.0 + '@vitest/spy@5.1.0': {} acorn-jsx@5.3.2(acorn@8.19.0): dependencies: @@ -1359,44 +1277,28 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - argparse@2.0.1: {} - assertion-error@2.0.1: {} - balanced-match@1.0.2: {} + balanced-match@4.0.4: {} - brace-expansion@1.1.21: + brace-expansion@5.0.12: dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 + balanced-match: 4.0.4 buffer-from@1.1.2: {} - callsites@3.1.0: {} - - chai@6.3.0: {} - - chalk@4.1.2: + cacheable@2.5.0: dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 + '@cacheable/memory': 2.2.0 + '@cacheable/utils': 2.5.0 + hookified: 1.15.1 + keyv: 5.6.0 + qified: 0.10.1 - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} + chai@6.3.0: {} commander@2.20.3: {} - concat-map@0.0.1: {} - - convert-source-map@2.0.0: {} - cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -1423,59 +1325,57 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-scope@8.4.0: + eslint-scope@9.1.2: dependencies: + '@types/esrecurse': 4.3.1 + '@types/estree': 1.0.10 esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.2.1: {} + eslint-visitor-keys@5.0.1: {} - eslint@9.39.5: + eslint@10.14.0: dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.5) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.14.0) '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.21.2 - '@eslint/config-helpers': 0.4.2 - '@eslint/core': 0.17.0 - '@eslint/eslintrc': 3.3.7 - '@eslint/js': 9.39.5 - '@eslint/plugin-kit': 0.4.1 + '@eslint/config-array': 0.23.5 + '@eslint/config-helpers': 0.7.0 + '@eslint/core': 1.2.1 + '@eslint/plugin-kit': 0.7.3 '@humanfs/node': 0.16.8 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.3 '@types/estree': 1.0.10 ajv: 6.15.0 - chalk: 4.1.2 cross-spawn: 7.0.6 debug: 4.4.3 escape-string-regexp: 4.0.0 - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 + eslint-scope: 9.1.2 + eslint-visitor-keys: 5.0.1 + espree: 11.2.0 esquery: 1.7.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 11.1.5 find-up: 5.0.0 glob-parent: 6.0.2 ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 3.1.5 + minimatch: 10.2.6 natural-compare: 1.4.0 optionator: 0.9.4 transitivePeerDependencies: - supports-color - espree@10.4.0: + espree@11.2.0: dependencies: acorn: 8.19.0 acorn-jsx: 5.3.2(acorn@8.19.0) - eslint-visitor-keys: 4.2.1 + eslint-visitor-keys: 5.0.1 esquery@1.7.0: dependencies: @@ -1507,19 +1407,20 @@ snapshots: optionalDependencies: picomatch: 4.0.7 - file-entry-cache@8.0.0: + file-entry-cache@11.1.5: dependencies: - flat-cache: 4.0.1 + flat-cache: 6.1.23 find-up@5.0.0: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@6.1.23: dependencies: + cacheable: 2.5.0 flatted: 3.4.4 - keyv: 4.5.4 + hookified: 1.15.1 flatted@3.4.4: {} @@ -1532,22 +1433,21 @@ snapshots: dependencies: is-glob: 4.0.3 - globals@14.0.0: {} - globals@17.14.0: {} - has-flag@4.0.0: {} + hashery@1.5.1: + dependencies: + hookified: 1.15.1 hasown@2.0.4: dependencies: function-bind: 1.1.2 - ignore@5.3.2: {} + hookified@1.15.1: {} - import-fresh@3.3.1: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 + hookified@2.2.0: {} + + ignore@5.3.2: {} imurmurhash@0.1.4: {} @@ -1567,19 +1467,13 @@ snapshots: isexe@2.0.0: {} - js-yaml@4.3.2: - dependencies: - argparse: 2.0.1 - - json-buffer@3.0.1: {} - json-schema-traverse@0.4.1: {} json-stable-stringify-without-jsonify@1.0.1: {} - keyv@4.5.4: + keyv@5.6.0: dependencies: - json-buffer: 3.0.1 + '@keyv/serialize': 1.1.1 levn@0.4.1: dependencies: @@ -1639,15 +1533,13 @@ snapshots: dependencies: p-locate: 5.0.0 - lodash.merge@4.6.2: {} - - magic-string@0.30.21: + magic-string@1.4.5: dependencies: '@jridgewell/sourcemap-codec': 1.6.0 - minimatch@3.1.5: + minimatch@10.2.6: dependencies: - brace-expansion: 1.1.21 + brace-expansion: 5.0.12 ms@2.1.3: {} @@ -1655,7 +1547,7 @@ snapshots: natural-compare@1.4.0: {} - obug@2.2.1: {} + obug@3.0.0: {} optionator@0.9.4: dependencies: @@ -1674,18 +1566,12 @@ snapshots: dependencies: p-limit: 3.1.0 - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - path-exists@4.0.0: {} path-key@3.1.1: {} path-parse@1.0.7: {} - pathe@2.0.3: {} - picocolors@1.1.1: {} picomatch@4.0.7: {} @@ -1700,7 +1586,9 @@ snapshots: punycode@2.3.1: {} - resolve-from@4.0.0: {} + qified@0.10.1: + dependencies: + hookified: 2.2.0 resolve@1.22.13: dependencies: @@ -1771,8 +1659,6 @@ snapshots: shebang-regex@3.0.0: {} - siginfo@2.0.0: {} - smob@1.6.2: {} source-map-js@1.2.2: {} @@ -1784,16 +1670,8 @@ snapshots: source-map@0.6.1: {} - stackback@0.0.2: {} - std-env@4.3.0: {} - strip-json-comments@3.1.1: {} - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - supports-preserve-symlinks-flag@1.0.0: {} terser@5.51.2: @@ -1803,7 +1681,7 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - tinybench@2.9.0: {} + tinybench@6.2.3: {} tinyexec@1.3.1: {} @@ -1812,8 +1690,6 @@ snapshots: fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 - tinyrainbow@3.2.0: {} - type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -1833,28 +1709,22 @@ snapshots: fsevents: 2.3.3 terser: 5.51.2 - vitest@4.1.12(vite@8.3.5(terser@5.51.2)): + vitest@5.1.0(vite@8.3.5(terser@5.51.2)): dependencies: - '@vitest/expect': 4.1.12 - '@vitest/mocker': 4.1.12(vite@8.3.5(terser@5.51.2)) - '@vitest/pretty-format': 4.1.12 - '@vitest/runner': 4.1.12 - '@vitest/snapshot': 4.1.12 - '@vitest/spy': 4.1.12 - '@vitest/utils': 4.1.12 + '@types/chai': 5.2.3 + '@vitest/mocker': 5.1.0(vite@8.3.5(terser@5.51.2)) + chai: 6.3.0 es-module-lexer: 2.3.2 expect-type: 1.4.0 - magic-string: 0.30.21 - obug: 2.2.1 - pathe: 2.0.3 + magic-string: 1.4.5 + obug: 3.0.0 picomatch: 4.0.7 std-env: 4.3.0 - tinybench: 2.9.0 + tinybench: 6.2.3 tinyexec: 1.3.1 tinyglobby: 0.2.17 - tinyrainbow: 3.2.0 vite: 8.3.5(terser@5.51.2) - why-is-node-running: 2.3.0 + why-is-node-running: 3.2.1 transitivePeerDependencies: - msw @@ -1862,10 +1732,7 @@ snapshots: dependencies: isexe: 2.0.0 - why-is-node-running@2.3.0: - dependencies: - siginfo: 2.0.0 - stackback: 0.0.2 + why-is-node-running@3.2.1: {} word-wrap@1.2.5: {} From be3ccb2ec6de30434449f4ae384e0fe11ce32415 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:19:40 -0800 Subject: [PATCH 4/9] import it from vitest Co-Authored-By: Claude Opus 5.5 --- test/day-test.js | 64 +++++++++++++-------------- test/friday-test.js | 10 ++--- test/hour-test.js | 40 ++++++++--------- test/interval-test.js | 28 ++++++------ test/millisecond-test.js | 4 +- test/minute-test.js | 32 +++++++------- test/monday-test.js | 12 +++--- test/month-test.js | 86 ++++++++++++++++++------------------- test/multiYear-test.js | 14 +++--- test/saturday-test.js | 10 ++--- test/second-test.js | 34 +++++++-------- test/sunday-test.js | 42 +++++++++--------- test/thursday-test.js | 10 ++--- test/ticks-test.js | 52 +++++++++++----------- test/tuesday-test.js | 10 ++--- test/unixDay-test.js | 34 +++++++-------- test/utcDay-test.js | 34 +++++++-------- test/utcFriday-test.js | 10 ++--- test/utcHour-test.js | 38 ++++++++-------- test/utcMillisecond-test.js | 4 +- test/utcMinute-test.js | 30 ++++++------- test/utcMonday-test.js | 12 +++--- test/utcMonth-test.js | 60 +++++++++++++------------- test/utcMultiYear-test.js | 14 +++--- test/utcSaturday-test.js | 10 ++--- test/utcSecond-test.js | 32 +++++++------- test/utcSunday-test.js | 42 +++++++++--------- test/utcThursday-test.js | 10 ++--- test/utcTicks-test.js | 50 ++++++++++----------- test/utcTuesday-test.js | 10 ++--- test/utcWednesday-test.js | 10 ++--- test/utcWeek-test.js | 42 +++++++++--------- test/utcYear-test.js | 30 ++++++------- test/wednesday-test.js | 10 ++--- test/week-test.js | 42 +++++++++--------- test/year-test.js | 30 ++++++------- 36 files changed, 501 insertions(+), 501 deletions(-) diff --git a/test/day-test.js b/test/day-test.js index 7afbced..5d8fefb 100644 --- a/test/day-test.js +++ b/test/day-test.js @@ -1,29 +1,29 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeDay, timeDays, timeYear} from "../src/index.js"; import {local, utc} from "./date.js"; -test("timeDays in an alias for timeDay.range", () => { +it("timeDays in an alias for timeDay.range", () => { assert.strictEqual(timeDays, timeDay.range); }); -test("timeDay() is equivalent to timeDay.floor(new Date)", () => { +it("timeDay() is equivalent to timeDay.floor(new Date)", () => { const t = new Date; assert.deepStrictEqual(timeDay(), timeDay.floor(t)); }); -test("timeDay(date) is equivalent to timeDay.floor(date)", () => { +it("timeDay(date) is equivalent to timeDay.floor(date)", () => { const t = new Date; assert.deepStrictEqual(timeDay(t), timeDay.floor(t)); }); -test("timeDay.floor(date) returns days", () => { +it("timeDay.floor(date) returns days", () => { assert.deepStrictEqual(timeDay.floor(local(2010, 11, 31, 23)), local(2010, 11, 31)); assert.deepStrictEqual(timeDay.floor(local(2011, 0, 1, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeDay.floor(local(2011, 0, 1, 1)), local(2011, 0, 1)); }); -test("timeDay.floor(date) observes daylight saving", () => { +it("timeDay.floor(date) observes daylight saving", () => { assert.deepStrictEqual(timeDay.floor(utc(2011, 2, 13, 7)), local(2011, 2, 12)); assert.deepStrictEqual(timeDay.floor(utc(2011, 2, 13, 8)), local(2011, 2, 13)); assert.deepStrictEqual(timeDay.floor(utc(2011, 2, 13, 9)), local(2011, 2, 13)); @@ -34,16 +34,16 @@ test("timeDay.floor(date) observes daylight saving", () => { assert.deepStrictEqual(timeDay.floor(utc(2011, 10, 6, 10)), local(2011, 10, 6)); }); -test("timeDay.floor(date) handles years in the first century", () => { +it("timeDay.floor(date) handles years in the first century", () => { assert.deepStrictEqual(timeDay.floor(local(9, 10, 6, 7)), local(9, 10, 6)); }); -test("timeDay.round(date) returns days", () => { +it("timeDay.round(date) returns days", () => { assert.deepStrictEqual(timeDay.round(local(2010, 11, 30, 13)), local(2010, 11, 31)); assert.deepStrictEqual(timeDay.round(local(2010, 11, 30, 11)), local(2010, 11, 30)); }); -test("timeDay.round(date) observes daylight saving", () => { +it("timeDay.round(date) observes daylight saving", () => { assert.deepStrictEqual(timeDay.round(utc(2011, 2, 13, 7)), local(2011, 2, 13)); assert.deepStrictEqual(timeDay.round(utc(2011, 2, 13, 8)), local(2011, 2, 13)); assert.deepStrictEqual(timeDay.round(utc(2011, 2, 13, 9)), local(2011, 2, 13)); @@ -54,69 +54,69 @@ test("timeDay.round(date) observes daylight saving", () => { assert.deepStrictEqual(timeDay.round(utc(2011, 10, 6, 20)), local(2011, 10, 7)); }); -test("timeDay.round(date) handles midnight in leap years", () => { +it("timeDay.round(date) handles midnight in leap years", () => { assert.deepStrictEqual(timeDay.round(utc(2012, 2, 1, 0)), local(2012, 2, 1)); assert.deepStrictEqual(timeDay.round(utc(2012, 2, 1, 0)), local(2012, 2, 1)); }); -test("timeDay.ceil(date) returns days", () => { +it("timeDay.ceil(date) returns days", () => { assert.deepStrictEqual(timeDay.ceil(local(2010, 11, 30, 23)), local(2010, 11, 31)); assert.deepStrictEqual(timeDay.ceil(local(2010, 11, 31, 0)), local(2010, 11, 31)); assert.deepStrictEqual(timeDay.ceil(local(2010, 11, 31, 1)), local(2011, 0, 1)); }); -test("timeDay.ceil(date) observes start of daylight saving", () => { +it("timeDay.ceil(date) observes start of daylight saving", () => { assert.deepStrictEqual(timeDay.ceil(utc(2011, 2, 13, 7)), local(2011, 2, 13)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 2, 13, 8)), local(2011, 2, 13)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 2, 13, 9)), local(2011, 2, 14)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 2, 13, 10)), local(2011, 2, 14)); }); -test("timeDay.ceil(date) observes end of daylight saving", () => { +it("timeDay.ceil(date) observes end of daylight saving", () => { assert.deepStrictEqual(timeDay.ceil(utc(2011, 10, 6, 7)), local(2011, 10, 6)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 10, 6, 8)), local(2011, 10, 7)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 10, 6, 9)), local(2011, 10, 7)); assert.deepStrictEqual(timeDay.ceil(utc(2011, 10, 6, 10)), local(2011, 10, 7)); }); -test("timeDay.ceil(date) handles midnight for leap years", () => { +it("timeDay.ceil(date) handles midnight for leap years", () => { assert.deepStrictEqual(timeDay.ceil(utc(2012, 2, 1, 0)), local(2012, 2, 1)); assert.deepStrictEqual(timeDay.ceil(utc(2012, 2, 1, 0)), local(2012, 2, 1)); }); -test("timeDay.offset(date) is an alias for timeDay.offset(date, 1)", () => { +it("timeDay.offset(date) is an alias for timeDay.offset(date, 1)", () => { assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31, 23, 59, 59, 999)), local(2011, 0, 1, 23, 59, 59, 999)); }); -test("timeDay.offset(date, step) does not modify the passed-in date", () => { +it("timeDay.offset(date, step) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeDay.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -test("timeDay.offset(date, step) does not round the passed-in date", () => { +it("timeDay.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 1, 23, 59, 59, 999)); assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 29, 23, 59, 59, 456)); }); -test("timeDay.offset(date, step) allows step to be negative", () => { +it("timeDay.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31), -1), local(2010, 11, 30)); assert.deepStrictEqual(timeDay.offset(local(2011, 0, 1), -2), local(2010, 11, 30)); assert.deepStrictEqual(timeDay.offset(local(2011, 0, 1), -1), local(2010, 11, 31)); }); -test("timeDay.offset(date, step) allows step to be positive", () => { +it("timeDay.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31), +1), local(2011, 0, 1)); assert.deepStrictEqual(timeDay.offset(local(2010, 11, 30), +2), local(2011, 0, 1)); assert.deepStrictEqual(timeDay.offset(local(2010, 11, 30), +1), local(2010, 11, 31)); }); -test("timeDay.offset(date, step) allows step to be zero", () => { +it("timeDay.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeDay.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -test("timeDay.range(start, stop) returns days between start (inclusive) and stop (exclusive)", () => { +it("timeDay.range(start, stop) returns days between start (inclusive) and stop (exclusive)", () => { assert.deepStrictEqual(timeDay.range(local(2011, 10, 4), local(2011, 10, 10)), [ local(2011, 10, 4), local(2011, 10, 5), @@ -127,7 +127,7 @@ test("timeDay.range(start, stop) returns days between start (inclusive) and stop ]); }); -test("timeDay.range(start, stop) returns days", () => { +it("timeDay.range(start, stop) returns days", () => { assert.deepStrictEqual(timeDay.range(local(2011, 10, 4, 2), local(2011, 10, 10, 13)), [ local(2011, 10, 5), local(2011, 10, 6), @@ -138,7 +138,7 @@ test("timeDay.range(start, stop) returns days", () => { ]); }); -test("timeDay.range(start, stop) coerces start and stop to dates", () => { +it("timeDay.range(start, stop) coerces start and stop to dates", () => { assert.deepStrictEqual(timeDay.range(+local(2011, 10, 4), +local(2011, 10, 7)), [ local(2011, 10, 4), local(2011, 10, 5), @@ -146,16 +146,16 @@ test("timeDay.range(start, stop) coerces start and stop to dates", () => { ]); }); -test("timeDay.range(start, stop) returns the empty array for invalid dates", () => { +it("timeDay.range(start, stop) returns the empty array for invalid dates", () => { assert.deepStrictEqual(timeDay.range(new Date(NaN), Infinity), []); }); -test("timeDay.range(start, stop) returns the empty array if start >= stop", () => { +it("timeDay.range(start, stop) returns the empty array if start >= stop", () => { assert.deepStrictEqual(timeDay.range(local(2011, 10, 10), local(2011, 10, 4)), []); assert.deepStrictEqual(timeDay.range(local(2011, 10, 10), local(2011, 10, 10)), []); }); -test("timeDay.range(start, stop, step) returns every step day", () => { +it("timeDay.range(start, stop, step) returns every step day", () => { assert.deepStrictEqual(timeDay.range(local(2011, 10, 4, 2), local(2011, 10, 14, 13), 3), [ local(2011, 10, 5), local(2011, 10, 8), @@ -164,14 +164,14 @@ test("timeDay.range(start, stop, step) returns every step day", () => { ]); }); -test("timeDay.range(start, stop, step) returns the empty array if step is zero, negative or NaN", () => { +it("timeDay.range(start, stop, step) returns the empty array if step is zero, negative or NaN", () => { assert.deepStrictEqual(timeDay.range(local(2011, 0, 1, 0), local(2011, 4, 9, 0), 0), []); assert.deepStrictEqual(timeDay.range(local(2011, 0, 1, 0), local(2011, 4, 9, 0), -1), []); assert.deepStrictEqual(timeDay.range(local(2011, 0, 1, 0), local(2011, 4, 9, 0), 0.5), []); assert.deepStrictEqual(timeDay.range(local(2011, 0, 1, 0), local(2011, 4, 9, 0), NaN), []); }); -test("timeDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { +it("timeDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { assert.strictEqual(timeDay.count(local(2011, 0, 1, 0), local(2011, 4, 9, 0)), 128); assert.strictEqual(timeDay.count(local(2011, 0, 1, 1), local(2011, 4, 9, 0)), 128); assert.strictEqual(timeDay.count(local(2010, 11, 31, 23), local(2011, 4, 9, 0)), 129); @@ -179,7 +179,7 @@ test("timeDay.count(start, end) counts days after start (exclusive) and before e assert.strictEqual(timeDay.count(local(2011, 0, 1, 0), local(2011, 4, 9, 1)), 128); }); -test("timeDay.count(start, end) observes daylight saving", () => { +it("timeDay.count(start, end) observes daylight saving", () => { assert.strictEqual(timeDay.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 71); assert.strictEqual(timeDay.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 71); assert.strictEqual(timeDay.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 71); @@ -188,12 +188,12 @@ test("timeDay.count(start, end) observes daylight saving", () => { assert.strictEqual(timeDay.count(local(2011, 0, 1), local(2011, 10, 6, 2)), 309); }); -test("timeDay.count(start, stop) does not exhibit floating-point rounding error", () => { +it("timeDay.count(start, stop) does not exhibit floating-point rounding error", () => { const date = new Date(2011, 4, 9); assert.strictEqual(timeDay.count(timeYear(date), date), 128); }); -test("timeDay.count(start, end) returns 364 or 365 for a full year", () => { +it("timeDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(timeDay.count(local(1999, 0, 1), local(1999, 11, 31)), 364); assert.strictEqual(timeDay.count(local(2000, 0, 1), local(2000, 11, 31)), 365); // leap year assert.strictEqual(timeDay.count(local(2001, 0, 1), local(2001, 11, 31)), 364); @@ -209,7 +209,7 @@ test("timeDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(timeDay.count(local(2011, 0, 1), local(2011, 11, 31)), 364); }); -test("timeDay.every(step) returns every stepth day, starting with the first day of the month", () => { +it("timeDay.every(step) returns every stepth day, starting with the first day of the month", () => { assert.deepStrictEqual(timeDay.every(3).range(local(2008, 11, 30, 0, 12), local(2009, 0, 5, 23, 48)), [local(2008, 11, 31), local(2009, 0, 1), local(2009, 0, 4)]); assert.deepStrictEqual(timeDay.every(5).range(local(2008, 11, 30, 0, 12), local(2009, 0, 6, 23, 48)), [local(2008, 11, 31), local(2009, 0, 1), local(2009, 0, 6)]); assert.deepStrictEqual(timeDay.every(7).range(local(2008, 11, 30, 0, 12), local(2009, 0, 8, 23, 48)), [local(2009, 0, 1), local(2009, 0, 8)]); diff --git a/test/friday-test.js b/test/friday-test.js index f6230dd..42ec309 100644 --- a/test/friday-test.js +++ b/test/friday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeFriday, timeFridays} from "../src/index.js"; import {local} from "./date.js"; -test("timeFridays in an alias for timeFriday.range", () => { +it("timeFridays in an alias for timeFriday.range", () => { assert.strictEqual(timeFridays, timeFriday.range); }); -test("timeFriday.floor(date) returns Fridays", () => { +it("timeFriday.floor(date) returns Fridays", () => { assert.deepStrictEqual(timeFriday.floor(local(2011, 0, 5, 23, 59, 59)), local(2010, 11, 31)); assert.deepStrictEqual(timeFriday.floor(local(2011, 0, 6, 0, 0, 0)), local(2010, 11, 31)); assert.deepStrictEqual(timeFriday.floor(local(2011, 0, 6, 0, 0, 1)), local(2010, 11, 31)); @@ -16,7 +16,7 @@ test("timeFriday.floor(date) returns Fridays", () => { assert.deepStrictEqual(timeFriday.floor(local(2011, 0, 7, 0, 0, 1)), local(2011, 0, 7)); }); -test("timeFriday.count(start, end) counts Fridays after start (exclusive) and before end (inclusive)", () => { +it("timeFriday.count(start, end) counts Fridays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -42,7 +42,7 @@ test("timeFriday.count(start, end) counts Fridays after start (exclusive) and be assert.strictEqual(timeFriday.count(local(2010, 0, 1), local(2010, 0, 9)), 1); }); -test("timeFriday.count(start, end) observes daylight saving", () => { +it("timeFriday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeFriday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeFriday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeFriday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/hour-test.js b/test/hour-test.js index 9f9829d..7471022 100644 --- a/test/hour-test.js +++ b/test/hour-test.js @@ -1,15 +1,15 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeHour} from "../src/index.js"; import {local, utc} from "./date.js"; -test("timeHour.floor(date) returns hours", () => { +it("timeHour.floor(date) returns hours", () => { assert.deepStrictEqual(timeHour.floor(local(2010, 11, 31, 23, 59)), local(2010, 11, 31, 23)); assert.deepStrictEqual(timeHour.floor(local(2011, 0, 1, 0, 0)), local(2011, 0, 1, 0)); assert.deepStrictEqual(timeHour.floor(local(2011, 0, 1, 0, 1)), local(2011, 0, 1, 0)); }); -test("timeHour.floor(date) observes start of daylight savings time", () => { +it("timeHour.floor(date) observes start of daylight savings time", () => { assert.deepStrictEqual(timeHour.floor(utc(2011, 2, 13, 8, 59)), utc(2011, 2, 13, 8)); assert.deepStrictEqual(timeHour.floor(utc(2011, 2, 13, 9, 0)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(timeHour.floor(utc(2011, 2, 13, 9, 1)), utc(2011, 2, 13, 9)); @@ -18,7 +18,7 @@ test("timeHour.floor(date) observes start of daylight savings time", () => { assert.deepStrictEqual(timeHour.floor(utc(2011, 2, 13, 10, 1)), utc(2011, 2, 13, 10)); }); -test("timeHour.floor(date) observes end of daylight savings time", () => { +it("timeHour.floor(date) observes end of daylight savings time", () => { assert.deepStrictEqual(timeHour.floor(utc(2011, 10, 6, 7, 59)), utc(2011, 10, 6, 7)); assert.deepStrictEqual(timeHour.floor(utc(2011, 10, 6, 8, 0)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(timeHour.floor(utc(2011, 10, 6, 8, 1)), utc(2011, 10, 6, 8)); @@ -27,13 +27,13 @@ test("timeHour.floor(date) observes end of daylight savings time", () => { assert.deepStrictEqual(timeHour.floor(utc(2011, 10, 6, 9, 1)), utc(2011, 10, 6, 9)); }); -test("timeHour.ceil(date) returns hours", () => { +it("timeHour.ceil(date) returns hours", () => { assert.deepStrictEqual(timeHour.ceil(local(2010, 11, 31, 23, 59)), local(2011, 0, 1, 0)); assert.deepStrictEqual(timeHour.ceil(local(2011, 0, 1, 0, 0)), local(2011, 0, 1, 0)); assert.deepStrictEqual(timeHour.ceil(local(2011, 0, 1, 0, 1)), local(2011, 0, 1, 1)); }); -test("timeHour.ceil(date) observes start of daylight savings time", () => { +it("timeHour.ceil(date) observes start of daylight savings time", () => { assert.deepStrictEqual(timeHour.ceil(utc(2011, 2, 13, 8, 59)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(timeHour.ceil(utc(2011, 2, 13, 9, 0)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(timeHour.ceil(utc(2011, 2, 13, 9, 1)), utc(2011, 2, 13, 10)); @@ -42,7 +42,7 @@ test("timeHour.ceil(date) observes start of daylight savings time", () => { assert.deepStrictEqual(timeHour.ceil(utc(2011, 2, 13, 10, 1)), utc(2011, 2, 13, 11)); }); -test("timeHour.ceil(date) observes end of daylight savings time", () => { +it("timeHour.ceil(date) observes end of daylight savings time", () => { assert.deepStrictEqual(timeHour.ceil(utc(2011, 10, 6, 7, 59)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(timeHour.ceil(utc(2011, 10, 6, 8, 0)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(timeHour.ceil(utc(2011, 10, 6, 8, 1)), utc(2011, 10, 6, 9)); @@ -51,35 +51,35 @@ test("timeHour.ceil(date) observes end of daylight savings time", () => { assert.deepStrictEqual(timeHour.ceil(utc(2011, 10, 6, 9, 1)), utc(2011, 10, 6, 10)); }); -test("timeHour.offset(date) does not modify the passed-in date", () => { +it("timeHour.offset(date) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeHour.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -test("timeHour.offset(date) does not round the passed-in-date", () => { +it("timeHour.offset(date) does not round the passed-in-date", () => { assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 1, 0, 59, 59, 999)); assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 31, 21, 59, 59, 456)); }); -test("timeHour.offset(date) allows negative offsets", () => { +it("timeHour.offset(date) allows negative offsets", () => { assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 12), -1), local(2010, 11, 31, 11)); assert.deepStrictEqual(timeHour.offset(local(2011, 0, 1, 1), -2), local(2010, 11, 31, 23)); assert.deepStrictEqual(timeHour.offset(local(2011, 0, 1, 0), -1), local(2010, 11, 31, 23)); }); -test("timeHour.offset(date) allows positive offsets", () => { +it("timeHour.offset(date) allows positive offsets", () => { assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 11), +1), local(2010, 11, 31, 12)); assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23), +2), local(2011, 0, 1, 1)); assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23), +1), local(2011, 0, 1, 0)); }); -test("timeHour.offset(date) allows zero offset", () => { +it("timeHour.offset(date) allows zero offset", () => { assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeHour.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -test("timeHour.range(start, stop) returns hours", () => { +it("timeHour.range(start, stop) returns hours", () => { assert.deepStrictEqual(timeHour.range(local(2010, 11, 31, 12, 30), local(2010, 11, 31, 15, 30)), [ local(2010, 11, 31, 13), local(2010, 11, 31, 14), @@ -87,15 +87,15 @@ test("timeHour.range(start, stop) returns hours", () => { ]); }); -test("timeHour.range(start, stop) has an inclusive lower bound", () => { +it("timeHour.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(timeHour.range(local(2010, 11, 31, 23), local(2011, 0, 1, 2))[0], local(2010, 11, 31, 23)); }); -test("timeHour.range(start, stop) has an exclusive upper bound", () => { +it("timeHour.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(timeHour.range(local(2010, 11, 31, 23), local(2011, 0, 1, 2))[2], local(2011, 0, 1, 1)); }); -test("timeHour.range(start, stop) can skip hours", () => { +it("timeHour.range(start, stop) can skip hours", () => { assert.deepStrictEqual(timeHour.range(local(2011, 1, 1, 1), local(2011, 1, 1, 13), 3), [ local(2011, 1, 1, 1), local(2011, 1, 1, 4), @@ -104,7 +104,7 @@ test("timeHour.range(start, stop) can skip hours", () => { ]); }); -test("timeHour.range(start, stop) observes start of daylight savings time", () => { +it("timeHour.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(timeHour.range(local(2011, 2, 13, 1), local(2011, 2, 13, 5)), [ utc(2011, 2, 13, 9), utc(2011, 2, 13, 10), @@ -112,7 +112,7 @@ test("timeHour.range(start, stop) observes start of daylight savings time", () = ]); }); -test("timeHour.range(start, stop) observes end of daylight savings time", () => { +it("timeHour.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(timeHour.range(local(2011, 10, 6, 0), local(2011, 10, 6, 2)), [ utc(2011, 10, 6, 7), utc(2011, 10, 6, 8), @@ -120,12 +120,12 @@ test("timeHour.range(start, stop) observes end of daylight savings time", () => ]); }); -test("timeHour.every(step) returns every stepth hour, starting with the first hour of the day", () => { +it("timeHour.every(step) returns every stepth hour, starting with the first hour of the day", () => { assert.deepStrictEqual(timeHour.every(4).range(local(2008, 11, 30, 12, 47), local(2008, 11, 31, 13, 57)), [local(2008, 11, 30, 16), local(2008, 11, 30, 20), local(2008, 11, 31, 0), local(2008, 11, 31, 4), local(2008, 11, 31, 8), local(2008, 11, 31, 12)]); assert.deepStrictEqual(timeHour.every(12).range(local(2008, 11, 30, 12, 47), local(2008, 11, 31, 13, 57)), [local(2008, 11, 31, 0), local(2008, 11, 31, 12)]); }); -test("timeHour.range(start, stop) returns every hour crossing the daylight savings boundary", () => { +it("timeHour.range(start, stop) returns every hour crossing the daylight savings boundary", () => { assert.deepStrictEqual(timeHour.range(new Date(1478422800000 - 2 * 36e5), new Date(1478422800000 + 2 * 36e5)), [ new Date(1478415600000), // Sun Nov 6 2016 0:00:00 GMT-0700 (PDT) new Date(1478419200000), // Sun Nov 6 2016 1:00:00 GMT-0700 (PDT) diff --git a/test/interval-test.js b/test/interval-test.js index 7f4de68..787b116 100644 --- a/test/interval-test.js +++ b/test/interval-test.js @@ -1,19 +1,19 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeDay, timeHour, timeInterval, timeMinute, timeSecond, timeYear} from "../src/index.js"; import {local, utc} from "./date.js"; -test("timeInterval() is equivalent to timeInterval.floor(new Date)", () => { +it("timeInterval() is equivalent to timeInterval.floor(new Date)", () => { const t = new Date; assert.deepStrictEqual(timeYear(), timeYear.floor(t)); }); -test("timeInterval(date) is equivalent to timeInterval.floor(date)", () => { +it("timeInterval(date) is equivalent to timeInterval.floor(date)", () => { const t = new Date; assert.deepStrictEqual(timeYear(t), timeYear.floor(t)); }); -test("timeInterval(floor, offset) returns a custom time interval", () => { +it("timeInterval(floor, offset) returns a custom time interval", () => { const i = timeInterval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { @@ -22,7 +22,7 @@ test("timeInterval(floor, offset) returns a custom time interval", () => { assert.deepStrictEqual(i(utc(2015, 0, 1, 12, 34, 56, 789)), utc(2015, 0, 1, 12)); }); -test("timeInterval(floor, offset) does not define a count method", () => { +it("timeInterval(floor, offset) does not define a count method", () => { const i = timeInterval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { @@ -31,7 +31,7 @@ test("timeInterval(floor, offset) does not define a count method", () => { assert(!("count" in i)); }); -test("timeInterval(floor, offset) floors the step before passing it to offset", () => { +it("timeInterval(floor, offset) floors the step before passing it to offset", () => { const steps = [], i = timeInterval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { @@ -42,7 +42,7 @@ test("timeInterval(floor, offset) floors the step before passing it to offset", assert(steps.every(function(step) { return step === 1; })); }); -test("timeInterval(floor, offset, count) defines a count method", () => { +it("timeInterval(floor, offset, count) defines a count method", () => { const i = timeInterval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { @@ -53,7 +53,7 @@ test("timeInterval(floor, offset, count) defines a count method", () => { assert.strictEqual(i.count(utc(2015, 0, 1, 12, 34), utc(2015, 0, 1, 15, 56)), 3); }); -test("timeInterval(floor, offset, count) floors dates before passing them to count", () => { +it("timeInterval(floor, offset, count) floors dates before passing them to count", () => { const dates = [], i = timeInterval(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { @@ -65,7 +65,7 @@ test("timeInterval(floor, offset, count) floors dates before passing them to cou assert.deepStrictEqual(dates, [utc(2015, 0, 1, 12), utc(2015, 0, 1, 15)]); }); -test("timeInterval.every(step) returns null if step is invalid", () => { +it("timeInterval.every(step) returns null if step is invalid", () => { assert.strictEqual(timeDay.every(), null); assert.strictEqual(timeMinute.every(null), null); assert.strictEqual(timeSecond.every(undefined), null); @@ -75,17 +75,17 @@ test("timeInterval.every(step) returns null if step is invalid", () => { assert.strictEqual(timeHour.every(-1), null); }); -test("timeInterval.every(step) returns interval if step is one", () => { +it("timeInterval.every(step) returns interval if step is one", () => { assert.strictEqual(timeDay.every("1"), timeDay); assert.strictEqual(timeMinute.every(1), timeMinute); assert.strictEqual(timeSecond.every(1.8), timeSecond); }); -test("timeInterval.every(step).range(invalid, invalid) returns the empty array", () => { +it("timeInterval.every(step).range(invalid, invalid) returns the empty array", () => { assert.deepStrictEqual(timeMinute.every(15).range(NaN, NaN), []); }); -test("timeInterval.every(…).offset(date, step) returns the expected value when step is positive", () => { +it("timeInterval.every(…).offset(date, step) returns the expected value when step is positive", () => { const i = timeMinute.every(15); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), 0), local(2015, 0, 1, 12, 34)); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), 1), local(2015, 0, 1, 12, 45)); @@ -95,14 +95,14 @@ test("timeInterval.every(…).offset(date, step) returns the expected value when assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), 5), local(2015, 0, 1, 13, 45)); }); -test("timeInterval.every(…).offset(date, step) returns the expected value when step is negative", () => { +it("timeInterval.every(…).offset(date, step) returns the expected value when step is negative", () => { const i = timeMinute.every(15); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), -1), local(2015, 0, 1, 12, 30)); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), -2), local(2015, 0, 1, 12, 15)); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), -3), local(2015, 0, 1, 12, 0)); }); -test("timeInterval.every(…).offset(date, step) returns the expected value when step is not an integer", () => { +it("timeInterval.every(…).offset(date, step) returns the expected value when step is not an integer", () => { const i = timeMinute.every(15); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), 1.2), local(2015, 0, 1, 12, 45)); assert.deepStrictEqual(i.offset(local(2015, 0, 1, 12, 34), -0.8), local(2015, 0, 1, 12, 30)); diff --git a/test/millisecond-test.js b/test/millisecond-test.js index 024a8b3..4af8d5c 100644 --- a/test/millisecond-test.js +++ b/test/millisecond-test.js @@ -1,9 +1,9 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeMillisecond} from "../src/index.js"; import {local, utc} from "./date.js"; -test("timeMillisecond.every(step) returns every stepth millisecond, starting with the first millisecond of the second", () => { +it("timeMillisecond.every(step) returns every stepth millisecond, starting with the first millisecond of the second", () => { assert.deepStrictEqual(timeMillisecond.every(50).range(local(2008, 11, 30, 12, 36, 0, 947), local(2008, 11, 30, 12, 36, 1, 157)), [local(2008, 11, 30, 12, 36, 0, 950), local(2008, 11, 30, 12, 36, 1, 0), local(2008, 11, 30, 12, 36, 1, 50), local(2008, 11, 30, 12, 36, 1, 100), local(2008, 11, 30, 12, 36, 1, 150)]); assert.deepStrictEqual(timeMillisecond.every(100).range(local(2008, 11, 30, 12, 36, 0, 947), local(2008, 11, 30, 12, 36, 1, 157)), [local(2008, 11, 30, 12, 36, 1, 0), local(2008, 11, 30, 12, 36, 1, 100)]); assert.deepStrictEqual(timeMillisecond.every(50).range(utc(2008, 11, 30, 12, 36, 0, 947), utc(2008, 11, 30, 12, 36, 1, 157)), [utc(2008, 11, 30, 12, 36, 0, 950), utc(2008, 11, 30, 12, 36, 1, 0), utc(2008, 11, 30, 12, 36, 1, 50), utc(2008, 11, 30, 12, 36, 1, 100), utc(2008, 11, 30, 12, 36, 1, 150)]); diff --git a/test/minute-test.js b/test/minute-test.js index 98c47f8..92812d7 100644 --- a/test/minute-test.js +++ b/test/minute-test.js @@ -1,51 +1,51 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeMinute} from "../src/index.js"; import {local, utc} from "./date.js"; -test("timeMinute.floor(date) returns minutes", () => { +it("timeMinute.floor(date) returns minutes", () => { assert.deepStrictEqual(timeMinute.floor(local(2010, 11, 31, 23, 59, 59)), local(2010, 11, 31, 23, 59)); assert.deepStrictEqual(timeMinute.floor(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1, 0, 0)); assert.deepStrictEqual(timeMinute.floor(local(2011, 0, 1, 0, 0, 59)), local(2011, 0, 1, 0, 0)); assert.deepStrictEqual(timeMinute.floor(local(2011, 0, 1, 0, 1, 0)), local(2011, 0, 1, 0, 1)); }); -test("timeMinute.ceil(date) returns minutes", () => { +it("timeMinute.ceil(date) returns minutes", () => { assert.deepStrictEqual(timeMinute.ceil(local(2010, 11, 31, 23, 59, 59)), local(2011, 0, 1, 0, 0)); assert.deepStrictEqual(timeMinute.ceil(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1, 0, 0)); assert.deepStrictEqual(timeMinute.ceil(local(2011, 0, 1, 0, 0, 59)), local(2011, 0, 1, 0, 1)); assert.deepStrictEqual(timeMinute.ceil(local(2011, 0, 1, 0, 1, 0)), local(2011, 0, 1, 0, 1)); }); -test("timeMinute.offset(date) does not modify the passed-in date", () => { +it("timeMinute.offset(date) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeMinute.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -test("timeMinute.offset(date) does not round the passed-in-date", () => { +it("timeMinute.offset(date) does not round the passed-in-date", () => { assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 1, 0, 0, 59, 999)); assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 31, 23, 57, 59, 456)); }); -test("timeMinute.offset(date) allows negative offsets", () => { +it("timeMinute.offset(date) allows negative offsets", () => { assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 12), -1), local(2010, 11, 31, 23, 11)); assert.deepStrictEqual(timeMinute.offset(local(2011, 0, 1, 0, 1), -2), local(2010, 11, 31, 23, 59)); assert.deepStrictEqual(timeMinute.offset(local(2011, 0, 1, 0, 0), -1), local(2010, 11, 31, 23, 59)); }); -test("timeMinute.offset(date) allows positive offsets", () => { +it("timeMinute.offset(date) allows positive offsets", () => { assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 11), +1), local(2010, 11, 31, 23, 12)); assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59), +2), local(2011, 0, 1, 0, 1)); assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59), +1), local(2011, 0, 1, 0, 0)); }); -test("timeMinute.offset(date) allows zero offset", () => { +it("timeMinute.offset(date) allows zero offset", () => { assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeMinute.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -test("timeMinute.range(start, stop), returns minutes", () => { +it("timeMinute.range(start, stop), returns minutes", () => { assert.deepStrictEqual(timeMinute.range(local(2010, 11, 31, 23, 59), local(2011, 0, 1, 0, 2)), [ local(2010, 11, 31, 23, 59), local(2011, 0, 1, 0, 0), @@ -53,15 +53,15 @@ test("timeMinute.range(start, stop), returns minutes", () => { ]); }); -test("timeMinute.range(start, stop), has an inclusive lower bound", () => { +it("timeMinute.range(start, stop), has an inclusive lower bound", () => { assert.deepStrictEqual(timeMinute.range(local(2010, 11, 31, 23, 59), local(2011, 0, 1, 0, 2))[0], local(2010, 11, 31, 23, 59)); }); -test("timeMinute.range(start, stop), has an exclusive upper bound", () => { +it("timeMinute.range(start, stop), has an exclusive upper bound", () => { assert.deepStrictEqual(timeMinute.range(local(2010, 11, 31, 23, 59), local(2011, 0, 1, 0, 2))[2], local(2011, 0, 1, 0, 1)); }); -test("timeMinute.range(start, stop), can skip minutes", () => { +it("timeMinute.range(start, stop), can skip minutes", () => { assert.deepStrictEqual(timeMinute.range(local(2011, 1, 1, 12, 7), local(2011, 1, 1, 13, 7), 15), [ local(2011, 1, 1, 12, 7), local(2011, 1, 1, 12, 22), @@ -70,7 +70,7 @@ test("timeMinute.range(start, stop), can skip minutes", () => { ]); }); -test("timeMinute.range(start, stop), observes start of daylight savings time", () => { +it("timeMinute.range(start, stop), observes start of daylight savings time", () => { assert.deepStrictEqual(timeMinute.range(utc(2011, 2, 13, 9, 59), utc(2011, 2, 13, 10, 2)), [ utc(2011, 2, 13, 9, 59), utc(2011, 2, 13, 10, 0), @@ -78,7 +78,7 @@ test("timeMinute.range(start, stop), observes start of daylight savings time", ( ]); }); -test("timeMinute.range(start, stop), observes end of daylight savings time", () => { +it("timeMinute.range(start, stop), observes end of daylight savings time", () => { assert.deepStrictEqual(timeMinute.range(utc(2011, 10, 6, 8, 59), utc(2011, 10, 6, 9, 2)), [ utc(2011, 10, 6, 8, 59), utc(2011, 10, 6, 9, 0), @@ -86,12 +86,12 @@ test("timeMinute.range(start, stop), observes end of daylight savings time", () ]); }); -test("timeMinute.every(step) returns every stepth minute, starting with the first minute of the hour", () => { +it("timeMinute.every(step) returns every stepth minute, starting with the first minute of the hour", () => { assert.deepStrictEqual(timeMinute.every(15).range(local(2008, 11, 30, 12, 47), local(2008, 11, 30, 13, 57)), [local(2008, 11, 30, 13, 0), local(2008, 11, 30, 13, 15), local(2008, 11, 30, 13, 30), local(2008, 11, 30, 13, 45)]); assert.deepStrictEqual(timeMinute.every(30).range(local(2008, 11, 30, 12, 47), local(2008, 11, 30, 13, 57)), [local(2008, 11, 30, 13, 0), local(2008, 11, 30, 13, 30)]); }); -test("timeMinute.range(start, stop) returns every minute crossing the daylight savings boundary", () => { +it("timeMinute.range(start, stop) returns every minute crossing the daylight savings boundary", () => { assert.deepStrictEqual(timeMinute.range(new Date(1478422800000 - 2 * 6e4), new Date(1478422800000 + 2 * 6e4)), [ new Date(1478422680000), // Sun Nov 6 2016 1:58:00 GMT-0700 (PDT) new Date(1478422740000), // Sun Nov 6 2016 1:59:00 GMT-0700 (PDT) diff --git a/test/monday-test.js b/test/monday-test.js index 7d18334..29b7ef4 100644 --- a/test/monday-test.js +++ b/test/monday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeMonday, timeMondays} from "../src/index.js"; import {local} from "./date.js"; -test("timeMondays in an alias for timeMonday.range", () => { +it("timeMondays in an alias for timeMonday.range", () => { assert.strictEqual(timeMondays, timeMonday.range); }); -test("timeMonday.floor(date) returns Mondays", () => { +it("timeMonday.floor(date) returns Mondays", () => { assert.deepStrictEqual(timeMonday.floor(local(2011, 0, 1, 23, 59, 59)), local(2010, 11, 27)); assert.deepStrictEqual(timeMonday.floor(local(2011, 0, 2, 0, 0, 0)), local(2010, 11, 27)); assert.deepStrictEqual(timeMonday.floor(local(2011, 0, 2, 0, 0, 1)), local(2010, 11, 27)); @@ -16,7 +16,7 @@ test("timeMonday.floor(date) returns Mondays", () => { assert.deepStrictEqual(timeMonday.floor(local(2011, 0, 3, 0, 0, 1)), local(2011, 0, 3)); }); -test("timeMonday.range(start, stop, step) returns every step Monday", () => { +it("timeMonday.range(start, stop, step) returns every step Monday", () => { assert.deepStrictEqual(timeMonday.range(local(2011, 11, 1), local(2012, 0, 15), 2), [ local(2011, 11, 5), local(2011, 11, 19), @@ -24,7 +24,7 @@ test("timeMonday.range(start, stop, step) returns every step Monday", () => { ]); }); -test("timeMonday.count(start, end) counts Mondays after start (exclusive) and before end (inclusive)", () => { +it("timeMonday.count(start, end) counts Mondays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -49,7 +49,7 @@ test("timeMonday.count(start, end) counts Mondays after start (exclusive) and be assert.strictEqual(timeMonday.count(local(2018, 0, 1), local(2018, 0, 9)), 1); }); -test("timeMonday.count(start, end) observes daylight saving", () => { +it("timeMonday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeMonday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeMonday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeMonday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/month-test.js b/test/month-test.js index 9ec105e..ea02304 100644 --- a/test/month-test.js +++ b/test/month-test.js @@ -1,83 +1,83 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeMonth, timeMonths} from "../src/index.js"; import {local, utc} from "./date.js"; -test("timeMonths in an alias for timeMonth.range", () => { +it("timeMonths in an alias for timeMonth.range", () => { assert.strictEqual(timeMonths, timeMonth.range); }); -test("timeMonth.floor(date) returns months", () => { +it("timeMonth.floor(date) returns months", () => { assert.deepStrictEqual(timeMonth.floor(local(2010, 11, 31, 23, 59, 59)), local(2010, 11, 1)); assert.deepStrictEqual(timeMonth.floor(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.floor(local(2011, 0, 1, 0, 0, 1)), local(2011, 0, 1)); }); -test("timeMonth.floor(date) observes the start of daylight savings time", () => { +it("timeMonth.floor(date) observes the start of daylight savings time", () => { assert.deepStrictEqual(timeMonth.floor(local(2011, 2, 13, 1)), local(2011, 2, 1)); }); -test("timeMonth.floor(date) observes the end of the daylight savings time", () => { +it("timeMonth.floor(date) observes the end of the daylight savings time", () => { assert.deepStrictEqual(timeMonth.floor(local(2011, 10, 6, 1)), local(2011, 10, 1)); }); -test("timeMonth.floor(date) correctly handles years in the first century", () => { +it("timeMonth.floor(date) correctly handles years in the first century", () => { assert.deepStrictEqual(timeMonth.floor(local(9, 10, 6, 7)), local(9, 10, 1)); }); -test("timeMonth.ceil(date) returns months", () => { +it("timeMonth.ceil(date) returns months", () => { assert.deepStrictEqual(timeMonth.ceil(local(2010, 11, 31, 23, 59, 59)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.ceil(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.ceil(local(2011, 0, 1, 0, 0, 1)), local(2011, 1, 1)); }); -test("timeMonth.ceil(date) observes the start of daylight savings time", () => { +it("timeMonth.ceil(date) observes the start of daylight savings time", () => { assert.deepStrictEqual(timeMonth.ceil(local(2011, 2, 13, 1)), local(2011, 3, 1)); }); -test("timeMonth.ceil(date) observes the end of the daylight savings time", () => { +it("timeMonth.ceil(date) observes the end of the daylight savings time", () => { assert.deepStrictEqual(timeMonth.ceil(local(2011, 10, 6, 1)), local(2011, 11, 1)); }); -test("timeMonth.offset(date) does not modify the passed-in date", () => { +it("timeMonth.offset(date) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeMonth.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -test("timeMonth.offset(date) does not round the passed-in-date", () => { +it("timeMonth.offset(date) does not round the passed-in-date", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 9, 31, 23, 59, 59, 456)); }); -test("timeMonth.offset(date) allows negative offsets", () => { +it("timeMonth.offset(date) allows negative offsets", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 1), -1), local(2010, 10, 1)); assert.deepStrictEqual(timeMonth.offset(local(2011, 0, 1), -2), local(2010, 10, 1)); assert.deepStrictEqual(timeMonth.offset(local(2011, 0, 1), -1), local(2010, 11, 1)); }); -test("timeMonth.offset(date) allows positive offsets", () => { +it("timeMonth.offset(date) allows positive offsets", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 10, 1), +1), local(2010, 11, 1)); assert.deepStrictEqual(timeMonth.offset(local(2010, 10, 1), +2), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 1), +1), local(2011, 0, 1)); }); -test("timeMonth.offset(date) allows zero offset", () => { +it("timeMonth.offset(date) allows zero offset", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -test("timeMonths in an alias for timeMonth.range", () => { +it("timeMonths in an alias for timeMonth.range", () => { assert.strictEqual(timeMonths, timeMonth.range); }); -test("timeMonth.floor(date) returns months", () => { +it("timeMonth.floor(date) returns months", () => { assert.deepStrictEqual(timeMonth.floor(local(2010, 11, 31, 23)), local(2010, 11, 1)); assert.deepStrictEqual(timeMonth.floor(local(2011, 0, 1, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.floor(local(2011, 0, 1, 1)), local(2011, 0, 1)); }); -test("timeMonth.floor(date) observes daylight saving", () => { +it("timeMonth.floor(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.floor(utc(2011, 2, 13, 7)), local(2011, 2, 1)); assert.deepStrictEqual(timeMonth.floor(utc(2011, 2, 13, 8)), local(2011, 2, 1)); assert.deepStrictEqual(timeMonth.floor(utc(2011, 2, 13, 9)), local(2011, 2, 1)); @@ -88,16 +88,16 @@ test("timeMonth.floor(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.floor(utc(2011, 10, 6, 10)), local(2011, 10, 1)); }); -test("timeMonth.floor(date) handles years in the first century", () => { +it("timeMonth.floor(date) handles years in the first century", () => { assert.deepStrictEqual(timeMonth.floor(local(9, 10, 6, 7)), local(9, 10, 1)); }); -test("timeMonth.round(date) returns months", () => { +it("timeMonth.round(date) returns months", () => { assert.deepStrictEqual(timeMonth.round(local(2010, 11, 16, 12)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.round(local(2010, 11, 16, 11)), local(2010, 11, 1)); }); -test("timeMonth.round(date) observes daylight saving", () => { +it("timeMonth.round(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.round(utc(2011, 2, 13, 7)), local(2011, 2, 1)); assert.deepStrictEqual(timeMonth.round(utc(2011, 2, 13, 8)), local(2011, 2, 1)); assert.deepStrictEqual(timeMonth.round(utc(2011, 2, 13, 9)), local(2011, 2, 1)); @@ -108,12 +108,12 @@ test("timeMonth.round(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.round(utc(2011, 10, 6, 20)), local(2011, 10, 1)); }); -test("timeMonth.round(date) handles midnight for leap years", () => { +it("timeMonth.round(date) handles midnight for leap years", () => { assert.deepStrictEqual(timeMonth.round(utc(2012, 2, 1, 0)), local(2012, 2, 1)); assert.deepStrictEqual(timeMonth.round(utc(2012, 2, 1, 0)), local(2012, 2, 1)); }); -test("timeMonth.ceil(date) returns months", () => { +it("timeMonth.ceil(date) returns months", () => { assert.deepStrictEqual(timeMonth.ceil(local(2010, 10, 30, 23)), local(2010, 11, 1)); assert.deepStrictEqual(timeMonth.ceil(local(2010, 11, 1, 1)), local(2011, 0, 1)); assert.deepStrictEqual(timeMonth.ceil(local(2011, 1, 1)), local(2011, 1, 1)); @@ -121,7 +121,7 @@ test("timeMonth.ceil(date) returns months", () => { assert.deepStrictEqual(timeMonth.ceil(local(2011, 3, 1)), local(2011, 3, 1)); }); -test("timeMonth.ceil(date) observes daylight saving", () => { +it("timeMonth.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.ceil(utc(2011, 2, 13, 7)), local(2011, 3, 1)); assert.deepStrictEqual(timeMonth.ceil(utc(2011, 2, 13, 8)), local(2011, 3, 1)); assert.deepStrictEqual(timeMonth.ceil(utc(2011, 2, 13, 9)), local(2011, 3, 1)); @@ -132,44 +132,44 @@ test("timeMonth.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(timeMonth.ceil(utc(2011, 10, 6, 10)), local(2011, 11, 1)); }); -test("timeMonth.ceil(date) handles midnight for leap years", () => { +it("timeMonth.ceil(date) handles midnight for leap years", () => { assert.deepStrictEqual(timeMonth.ceil(utc(2012, 2, 1, 0)), local(2012, 2, 1)); assert.deepStrictEqual(timeMonth.ceil(utc(2012, 2, 1, 0)), local(2012, 2, 1)); }); -test("timeMonth.offset(date) is an alias for timeMonth.offset(date, 1)", () => { +it("timeMonth.offset(date) is an alias for timeMonth.offset(date, 1)", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 999)), local(2011, 0, 31, 23, 59, 59, 999)); }); -test("timeMonth.offset(date, step) does not modify the passed-in date", () => { +it("timeMonth.offset(date, step) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeMonth.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -test("timeMonth.offset(date, step) does not round the passed-in date", () => { +it("timeMonth.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 9, 31, 23, 59, 59, 456)); }); -test("timeMonth.offset(date, step) allows step to be negative", () => { +it("timeMonth.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31), -1), local(2010, 10, 31)); assert.deepStrictEqual(timeMonth.offset(local(2011, 0, 1), -2), local(2010, 10, 1)); assert.deepStrictEqual(timeMonth.offset(local(2011, 0, 1), -1), local(2010, 11, 1)); }); -test("timeMonth.offset(date, step) allows step to be positive", () => { +it("timeMonth.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31), +1), local(2011, 0, 31)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 30), +2), local(2011, 1, 30)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 30), +1), local(2011, 0, 30)); }); -test("timeMonth.offset(date, step) allows step to be zero", () => { +it("timeMonth.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeMonth.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -test("timeMonth.range(start, stop) returns months between start (inclusive) and stop (exclusive)", () => { +it("timeMonth.range(start, stop) returns months between start (inclusive) and stop (exclusive)", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 11, 1), local(2012, 5, 1)), [ local(2011, 11, 1), local(2012, 0, 1), @@ -180,7 +180,7 @@ test("timeMonth.range(start, stop) returns months between start (inclusive) and ]); }); -test("timeMonth.range(start, stop) returns months", () => { +it("timeMonth.range(start, stop) returns months", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 10, 4, 2), local(2012, 4, 10, 13)), [ local(2011, 11, 1), local(2012, 0, 1), @@ -191,7 +191,7 @@ test("timeMonth.range(start, stop) returns months", () => { ]); }); -test("timeMonth.range(start, stop) coerces start and stop to dates", () => { +it("timeMonth.range(start, stop) coerces start and stop to dates", () => { assert.deepStrictEqual(timeMonth.range(+local(2011, 10, 4), +local(2012, 1, 7)), [ local(2011, 11, 1), local(2012, 0, 1), @@ -199,16 +199,16 @@ test("timeMonth.range(start, stop) coerces start and stop to dates", () => { ]); }); -test("timeMonth.range(start, stop) returns the empty array for invalid dates", () => { +it("timeMonth.range(start, stop) returns the empty array for invalid dates", () => { assert.deepStrictEqual(timeMonth.range(new Date(NaN), Infinity), []); }); -test("timeMonth.range(start, stop) returns the empty array if start >= stop", () => { +it("timeMonth.range(start, stop) returns the empty array if start >= stop", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 11, 10), local(2011, 10, 4)), []); assert.deepStrictEqual(timeMonth.range(local(2011, 10, 1), local(2011, 10, 1)), []); }); -test("timeMonth.range(start, stop) returns months", () => { +it("timeMonth.range(start, stop) returns months", () => { assert.deepStrictEqual(timeMonth.range(local(2010, 10, 31), local(2011, 2, 1)), [ local(2010, 11, 1), local(2011, 0, 1), @@ -216,15 +216,15 @@ test("timeMonth.range(start, stop) returns months", () => { ]); }); -test("timeMonth.range(start, stop) has an inclusive lower bound", () => { +it("timeMonth.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(timeMonth.range(local(2010, 10, 31), local(2011, 2, 1))[0], local(2010, 11, 1)); }); -test("timeMonth.range(start, stop) has an exclusive upper bound", () => { +it("timeMonth.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(timeMonth.range(local(2010, 10, 31), local(2011, 2, 1))[2], local(2011, 1, 1)); }); -test("timeMonth.range(start, stop) can skip months", () => { +it("timeMonth.range(start, stop) can skip months", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 1, 1), local(2012, 1, 1), 3), [ local(2011, 1, 1), local(2011, 4, 1), @@ -233,7 +233,7 @@ test("timeMonth.range(start, stop) can skip months", () => { ]); }); -test("timeMonth.range(start, stop) observes start of daylight savings time", () => { +it("timeMonth.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 0, 1), local(2011, 4, 1)), [ local(2011, 0, 1), local(2011, 1, 1), @@ -242,7 +242,7 @@ test("timeMonth.range(start, stop) observes start of daylight savings time", () ]); }); -test("timeMonth.range(start, stop) observes end of daylight savings time", () => { +it("timeMonth.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(timeMonth.range(local(2011, 9, 1), local(2012, 1, 1)), [ local(2011, 9, 1), local(2011, 10, 1), @@ -251,7 +251,7 @@ test("timeMonth.range(start, stop) observes end of daylight savings time", () => ]); }); -test("timeMonth.count(start, end) counts months after start (exclusive) and before end (inclusive)", () => { +it("timeMonth.count(start, end) counts months after start (exclusive) and before end (inclusive)", () => { assert.strictEqual(timeMonth.count(local(2011, 0, 1), local(2011, 4, 1)), 4); assert.strictEqual(timeMonth.count(local(2011, 0, 1), local(2011, 3, 30)), 3); assert.strictEqual(timeMonth.count(local(2010, 11, 31), local(2011, 3, 30)), 4); @@ -260,6 +260,6 @@ test("timeMonth.count(start, end) counts months after start (exclusive) and befo assert.strictEqual(timeMonth.count(local(2012, 4, 1), local(2009, 11, 31)), -29); }); -test("timeMonth.every(step) returns every stepth month, starting with the first month of the year", () => { +it("timeMonth.every(step) returns every stepth month, starting with the first month of the year", () => { assert.deepStrictEqual(timeMonth.every(3).range(local(2008, 11, 3), local(2010, 6, 5)), [local(2009, 0, 1), local(2009, 3, 1), local(2009, 6, 1), local(2009, 9, 1), local(2010, 0, 1), local(2010, 3, 1), local(2010, 6, 1)]); }); diff --git a/test/multiYear-test.js b/test/multiYear-test.js index dba68bd..d5721f7 100644 --- a/test/multiYear-test.js +++ b/test/multiYear-test.js @@ -1,38 +1,38 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeYear} from "../src/index.js"; import {local} from "./date.js"; -test("timeYear.every(n).floor(date) returns integer multiples of n years", () => { +it("timeYear.every(n).floor(date) returns integer multiples of n years", () => { assert.deepStrictEqual(timeYear.every(10).floor(local(2009, 11, 31, 23, 59, 59)), local(2000, 0, 1)); assert.deepStrictEqual(timeYear.every(10).floor(local(2010, 0, 1, 0, 0, 0)), local(2010, 0, 1)); assert.deepStrictEqual(timeYear.every(10).floor(local(2010, 0, 1, 0, 0, 1)), local(2010, 0, 1)); }); -test("timeYear.every(n).ceil(date) returns integer multiples of n years", () => { +it("timeYear.every(n).ceil(date) returns integer multiples of n years", () => { assert.deepStrictEqual(timeYear.every(100).ceil(local(1999, 11, 31, 23, 59, 59)), local(2000, 0, 1)); assert.deepStrictEqual(timeYear.every(100).ceil(local(2000, 0, 1, 0, 0, 0)), local(2000, 0, 1)); assert.deepStrictEqual(timeYear.every(100).ceil(local(2000, 0, 1, 0, 0, 1)), local(2100, 0, 1)); }); -test("timeYear.every(n).offset(date, count) does not modify the passed-in date", () => { +it("timeYear.every(n).offset(date, count) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeYear.every(5).offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -test("timeYear.every(n).offset(date, count) does not round the passed-in-date", () => { +it("timeYear.every(n).offset(date, count) does not round the passed-in-date", () => { assert.deepStrictEqual(timeYear.every(5).offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2015, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeYear.every(5).offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2000, 11, 31, 23, 59, 59, 456)); }); -test("timeYear.every(n) does not define interval.count or interval.every", () => { +it("timeYear.every(n) does not define interval.count or interval.every", () => { const decade = timeYear.every(10); assert.strictEqual(decade.count, undefined); assert.strictEqual(decade.every, undefined); }); -test("timeYear.every(n).range(start, stop) returns multiples of n years", () => { +it("timeYear.every(n).range(start, stop) returns multiples of n years", () => { assert.deepStrictEqual(timeYear.every(10).range(local(2010, 0, 1), local(2031, 0, 1)), [ local(2010, 0, 1), local(2020, 0, 1), diff --git a/test/saturday-test.js b/test/saturday-test.js index 7fba9d8..9a19ab9 100644 --- a/test/saturday-test.js +++ b/test/saturday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeSaturday, timeSaturdays} from "../src/index.js"; import {local} from "./date.js"; -test("timeSaturdays in an alias for timeSaturday.range", () => { +it("timeSaturdays in an alias for timeSaturday.range", () => { assert.strictEqual(timeSaturdays, timeSaturday.range); }); -test("timeSaturday.floor(date) returns Saturdays", () => { +it("timeSaturday.floor(date) returns Saturdays", () => { assert.deepStrictEqual(timeSaturday.floor(local(2011, 0, 6, 23, 59, 59)), local(2011, 0, 1)); assert.deepStrictEqual(timeSaturday.floor(local(2011, 0, 7, 0, 0, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeSaturday.floor(local(2011, 0, 7, 0, 0, 1)), local(2011, 0, 1)); @@ -16,7 +16,7 @@ test("timeSaturday.floor(date) returns Saturdays", () => { assert.deepStrictEqual(timeSaturday.floor(local(2011, 0, 8, 0, 0, 1)), local(2011, 0, 8)); }); -test("timeSaturday.count(start, end) counts Saturdays after start (exclusive) and before end (inclusive)", () => { +it("timeSaturday.count(start, end) counts Saturdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -42,7 +42,7 @@ test("timeSaturday.count(start, end) counts Saturdays after start (exclusive) an assert.strictEqual(timeSaturday.count(local(2011, 0, 1), local(2011, 0, 9)), 1); }); -test("timeSaturday.count(start, end) observes daylight saving", () => { +it("timeSaturday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeSaturday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeSaturday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeSaturday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/second-test.js b/test/second-test.js index f7452ea..633ea33 100644 --- a/test/second-test.js +++ b/test/second-test.js @@ -1,55 +1,55 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeSecond} from "../src/index.js"; import {local, utc} from "./date.js"; -test("timeSecond.floor(date) returns seconds", () => { +it("timeSecond.floor(date) returns seconds", () => { assert.deepStrictEqual(timeSecond.floor(local(2010, 11, 31, 23, 59, 59, 999)), local(2010, 11, 31, 23, 59, 59)); assert.deepStrictEqual(timeSecond.floor(local(2011, 0, 1, 0, 0, 0, 0)), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.floor(local(2011, 0, 1, 0, 0, 0, 1)), local(2011, 0, 1, 0, 0, 0)); }); -test("timeSecond.round(date) returns seconds", () => { +it("timeSecond.round(date) returns seconds", () => { assert.deepStrictEqual(timeSecond.round(local(2010, 11, 31, 23, 59, 59, 999)), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.round(local(2011, 0, 1, 0, 0, 0, 499)), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.round(local(2011, 0, 1, 0, 0, 0, 500)), local(2011, 0, 1, 0, 0, 1)); }); -test("timeSecond.ceil(date) returns seconds", () => { +it("timeSecond.ceil(date) returns seconds", () => { assert.deepStrictEqual(timeSecond.ceil(local(2010, 11, 31, 23, 59, 59, 999)), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.ceil(local(2011, 0, 1, 0, 0, 0, 0)), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.ceil(local(2011, 0, 1, 0, 0, 0, 1)), local(2011, 0, 1, 0, 0, 1)); }); -test("timeSecond.offset(date, step) does not modify the passed-in date", () => { +it("timeSecond.offset(date, step) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeSecond.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -test("timeSecond.offset(date, step) does not round the passed-in-date", () => { +it("timeSecond.offset(date, step) does not round the passed-in-date", () => { assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 1, 0, 0, 0, 999)); assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 31, 23, 59, 57, 456)); }); -test("timeSecond.offset(date, step) allows negative offsets", () => { +it("timeSecond.offset(date, step) allows negative offsets", () => { assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 59), -1), local(2010, 11, 31, 23, 59, 58)); assert.deepStrictEqual(timeSecond.offset(local(2011, 0, 1, 0, 0, 0), -2), local(2010, 11, 31, 23, 59, 58)); assert.deepStrictEqual(timeSecond.offset(local(2011, 0, 1, 0, 0, 0), -1), local(2010, 11, 31, 23, 59, 59)); }); -test("timeSecond.offset(date, step) allows positive offsets", () => { +it("timeSecond.offset(date, step) allows positive offsets", () => { assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 58), +1), local(2010, 11, 31, 23, 59, 59)); assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 58), +2), local(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 59), +1), local(2011, 0, 1, 0, 0, 0)); }); -test("timeSecond.offset(date, step) allows zero offset", () => { +it("timeSecond.offset(date, step) allows zero offset", () => { assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeSecond.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -test("timeSecond.range(start, stop) returns seconds", () => { +it("timeSecond.range(start, stop) returns seconds", () => { assert.deepStrictEqual(timeSecond.range(local(2010, 11, 31, 23, 59, 59), local(2011, 0, 1, 0, 0, 2)), [ local(2010, 11, 31, 23, 59, 59), local(2011, 0, 1, 0, 0, 0), @@ -57,15 +57,15 @@ test("timeSecond.range(start, stop) returns seconds", () => { ]); }); -test("timeSecond.range(start, stop) has an inclusive lower bound", () => { +it("timeSecond.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(timeSecond.range(local(2010, 11, 31, 23, 59, 59), local(2011, 0, 1, 0, 0, 2))[0], local(2010, 11, 31, 23, 59, 59)); }); -test("timeSecond.range(start, stop) has an exclusive upper bound", () => { +it("timeSecond.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(timeSecond.range(local(2010, 11, 31, 23, 59, 59), local(2011, 0, 1, 0, 0, 2))[2], local(2011, 0, 1, 0, 0, 1)); }); -test("timeSecond.range(start, stop, step) can skip seconds", () => { +it("timeSecond.range(start, stop, step) can skip seconds", () => { assert.deepStrictEqual(timeSecond.range(local(2011, 1, 1, 12, 0, 7), local(2011, 1, 1, 12, 1, 7), 15), [ local(2011, 1, 1, 12, 0, 7), local(2011, 1, 1, 12, 0, 22), @@ -74,7 +74,7 @@ test("timeSecond.range(start, stop, step) can skip seconds", () => { ]); }); -test("timeSecond.range(start, stop) observes start of daylight savings time", () => { +it("timeSecond.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(timeSecond.range(utc(2011, 2, 13, 9, 59, 59), utc(2011, 2, 13, 10, 0, 2)), [ utc(2011, 2, 13, 9, 59, 59), utc(2011, 2, 13, 10, 0, 0), @@ -82,7 +82,7 @@ test("timeSecond.range(start, stop) observes start of daylight savings time", () ]); }); -test("timeSecond.range(start, stop) observes end of daylight savings time", () => { +it("timeSecond.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(timeSecond.range(utc(2011, 10, 6, 8, 59, 59), utc(2011, 10, 6, 9, 0, 2)), [ utc(2011, 10, 6, 8, 59, 59), utc(2011, 10, 6, 9, 0, 0), @@ -90,12 +90,12 @@ test("timeSecond.range(start, stop) observes end of daylight savings time", () = ]); }); -test("timeSecond.every(step) returns every stepth second, starting with the first second of the minute", () => { +it("timeSecond.every(step) returns every stepth second, starting with the first second of the minute", () => { assert.deepStrictEqual(timeSecond.every(15).range(local(2008, 11, 30, 12, 36, 47), local(2008, 11, 30, 12, 37, 57)), [local(2008, 11, 30, 12, 37, 0), local(2008, 11, 30, 12, 37, 15), local(2008, 11, 30, 12, 37, 30), local(2008, 11, 30, 12, 37, 45)]); assert.deepStrictEqual(timeSecond.every(30).range(local(2008, 11, 30, 12, 36, 47), local(2008, 11, 30, 12, 37, 57)), [local(2008, 11, 30, 12, 37, 0), local(2008, 11, 30, 12, 37, 30)]); }); -test("timeSecond.range(start, stop) returns every second crossing the daylight savings boundary", () => { +it("timeSecond.range(start, stop) returns every second crossing the daylight savings boundary", () => { assert.deepStrictEqual(timeSecond.range(new Date(1478422800000 - 2 * 1e3), new Date(1478422800000 + 2 * 1e3)), [ new Date(1478422798000), // Sun Nov 6 2016 1:59:58 GMT-0700 (PDT) new Date(1478422799000), // Sun Nov 6 2016 1:59:59 GMT-0700 (PDT) diff --git a/test/sunday-test.js b/test/sunday-test.js index 4e3bed1..7584764 100644 --- a/test/sunday-test.js +++ b/test/sunday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeSunday, timeSundays} from "../src/index.js"; import {local} from "./date.js"; -test("timeSundays in an alias for timeSunday.range", () => { +it("timeSundays in an alias for timeSunday.range", () => { assert.strictEqual(timeSundays, timeSunday.range); }); -test("timeSunday.floor(date) returns Sundays", () => { +it("timeSunday.floor(date) returns Sundays", () => { assert.deepStrictEqual(timeSunday.floor(local(2010, 11, 31, 23, 59, 59)), local(2010, 11, 26)); assert.deepStrictEqual(timeSunday.floor(local(2011, 0, 1, 0, 0, 0)), local(2010, 11, 26)); assert.deepStrictEqual(timeSunday.floor(local(2011, 0, 1, 0, 0, 1)), local(2010, 11, 26)); @@ -16,16 +16,16 @@ test("timeSunday.floor(date) returns Sundays", () => { assert.deepStrictEqual(timeSunday.floor(local(2011, 0, 2, 0, 0, 1)), local(2011, 0, 2)); }); -test("timeSunday.floor(date) observes daylight saving", () => { +it("timeSunday.floor(date) observes daylight saving", () => { assert.deepStrictEqual(timeSunday.floor(local(2011, 2, 13, 1)), local(2011, 2, 13)); assert.deepStrictEqual(timeSunday.floor(local(2011, 10, 6, 1)), local(2011, 10, 6)); }); -test("timeSunday.floor(date) handles years in the first century", () => { +it("timeSunday.floor(date) handles years in the first century", () => { assert.deepStrictEqual(timeSunday.floor(local(9, 10, 6, 7)), local(9, 10, 1)); }); -test("timeSunday.ceil(date) returns Sundays", () => { +it("timeSunday.ceil(date) returns Sundays", () => { assert.deepStrictEqual(timeSunday.ceil(local(2010, 11, 31, 23, 59, 59)), local(2011, 0, 2)); assert.deepStrictEqual(timeSunday.ceil(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 2)); assert.deepStrictEqual(timeSunday.ceil(local(2011, 0, 1, 0, 0, 1)), local(2011, 0, 2)); @@ -34,44 +34,44 @@ test("timeSunday.ceil(date) returns Sundays", () => { assert.deepStrictEqual(timeSunday.ceil(local(2011, 0, 2, 0, 0, 1)), local(2011, 0, 9)); }); -test("timeSunday.ceil(date) observes daylight saving", () => { +it("timeSunday.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(timeSunday.ceil(local(2011, 2, 13, 1)), local(2011, 2, 20)); assert.deepStrictEqual(timeSunday.ceil(local(2011, 10, 6, 1)), local(2011, 10, 13)); }); -test("timeSunday.offset(date) is an alias for timeSunday.offset(date, 1)", () => { +it("timeSunday.offset(date) is an alias for timeSunday.offset(date, 1)", () => { assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 31, 23, 59, 59, 999)), local(2011, 0, 7, 23, 59, 59, 999)); }); -test("timeSunday.offset(date, step) does not modify the passed-in date", () => { +it("timeSunday.offset(date, step) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeSunday.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -test("timeSunday.offset(date, step) does not round the passed-in date", () => { +it("timeSunday.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 7, 23, 59, 59, 999)); assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 17, 23, 59, 59, 456)); }); -test("timeSunday.offset(date, step) allows step to be negative", () => { +it("timeSunday.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 1), -1), local(2010, 10, 24)); assert.deepStrictEqual(timeSunday.offset(local(2011, 0, 1), -2), local(2010, 11, 18)); assert.deepStrictEqual(timeSunday.offset(local(2011, 0, 1), -1), local(2010, 11, 25)); }); -test("timeSunday.offset(date, step) allows step to be positive", () => { +it("timeSunday.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(timeSunday.offset(local(2010, 10, 24), +1), local(2010, 11, 1)); assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 18), +2), local(2011, 0, 1)); assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 25), +1), local(2011, 0, 1)); }); -test("timeSunday.offset(date, step) allows step to be zero", () => { +it("timeSunday.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeSunday.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -test("timeSunday.range(start, stop) returns Sundays between start (inclusive) and stop (exclusive)", () => { +it("timeSunday.range(start, stop) returns Sundays between start (inclusive) and stop (exclusive)", () => { assert.deepStrictEqual(timeSunday.range(local(2011, 11, 1), local(2012, 0, 15)), [ local(2011, 11, 4), local(2011, 11, 11), @@ -82,7 +82,7 @@ test("timeSunday.range(start, stop) returns Sundays between start (inclusive) an ]); }); -test("timeSunday.range(start, stop) returns Sundays", () => { +it("timeSunday.range(start, stop) returns Sundays", () => { assert.deepStrictEqual(timeSunday.range(local(2011, 11, 1, 12, 23), local(2012, 0, 14, 12, 23)), [ local(2011, 11, 4), local(2011, 11, 11), @@ -93,7 +93,7 @@ test("timeSunday.range(start, stop) returns Sundays", () => { ]); }); -test("timeSunday.range(start, stop) coerces start and stop to dates", () => { +it("timeSunday.range(start, stop) coerces start and stop to dates", () => { assert.deepStrictEqual(timeSunday.range(+local(2011, 11, 1), +local(2012, 0, 15)), [ local(2011, 11, 4), local(2011, 11, 11), @@ -104,16 +104,16 @@ test("timeSunday.range(start, stop) coerces start and stop to dates", () => { ]); }); -test("timeSunday.range(start, stop) returns the empty array for invalid dates", () => { +it("timeSunday.range(start, stop) returns the empty array for invalid dates", () => { assert.deepStrictEqual(timeSunday.range(new Date(NaN), Infinity), []); }); -test("timeSunday.range(start, stop) returns the empty array if start >= stop", () => { +it("timeSunday.range(start, stop) returns the empty array if start >= stop", () => { assert.deepStrictEqual(timeSunday.range(local(2011, 11, 10), local(2011, 10, 4)), []); assert.deepStrictEqual(timeSunday.range(local(2011, 10, 1), local(2011, 10, 1)), []); }); -test("timeSunday.range(start, stop, step) returns every step Sunday", () => { +it("timeSunday.range(start, stop, step) returns every step Sunday", () => { assert.deepStrictEqual(timeSunday.range(local(2011, 11, 1), local(2012, 0, 15), 2), [ local(2011, 11, 4), local(2011, 11, 18), @@ -121,7 +121,7 @@ test("timeSunday.range(start, stop, step) returns every step Sunday", () => { ]); }); -test("timeSunday.count(start, end) counts Sundays after start (exclusive) and before end (inclusive)", () => { +it("timeSunday.count(start, end) counts Sundays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -146,7 +146,7 @@ test("timeSunday.count(start, end) counts Sundays after start (exclusive) and be assert.strictEqual(timeSunday.count(local(2012, 0, 1), local(2012, 0, 9)), 1); }); -test("timeSunday.count(start, end) observes daylight saving", () => { +it("timeSunday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeSunday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 11); assert.strictEqual(timeSunday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 11); assert.strictEqual(timeSunday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 11); diff --git a/test/thursday-test.js b/test/thursday-test.js index 8a3d28d..7bd3064 100644 --- a/test/thursday-test.js +++ b/test/thursday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeThursday, timeThursdays} from "../src/index.js"; import {local} from "./date.js"; -test("timeThursdays in an alias for timeThursday.range", () => { +it("timeThursdays in an alias for timeThursday.range", () => { assert.strictEqual(timeThursdays, timeThursday.range); }); -test("timeThursday.floor(date) returns Thursdays", () => { +it("timeThursday.floor(date) returns Thursdays", () => { assert.deepStrictEqual(timeThursday.floor(local(2011, 0, 4, 23, 59, 59)), local(2010, 11, 30)); assert.deepStrictEqual(timeThursday.floor(local(2011, 0, 5, 0, 0, 0)), local(2010, 11, 30)); assert.deepStrictEqual(timeThursday.floor(local(2011, 0, 5, 0, 0, 1)), local(2010, 11, 30)); @@ -16,7 +16,7 @@ test("timeThursday.floor(date) returns Thursdays", () => { assert.deepStrictEqual(timeThursday.floor(local(2011, 0, 6, 0, 0, 1)), local(2011, 0, 6)); }); -test("timeThursday.count(start, end) counts Thursdays after start (exclusive) and before end (inclusive)", () => { +it("timeThursday.count(start, end) counts Thursdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -41,7 +41,7 @@ test("timeThursday.count(start, end) counts Thursdays after start (exclusive) an assert.strictEqual(timeThursday.count(local(2015, 0, 1), local(2015, 0, 9)), 1); }); -test("timeThursday.count(start, end) observes daylight saving", () => { +it("timeThursday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeThursday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeThursday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeThursday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/ticks-test.js b/test/ticks-test.js index 69f45c7..5e479bf 100644 --- a/test/ticks-test.js +++ b/test/ticks-test.js @@ -1,9 +1,9 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeMinute, timeTicks} from "../src/index.js"; import {local} from "./date.js"; -test("timeTicks(start, stop, interval) respects the specified interval", () => { +it("timeTicks(start, stop, interval) respects the specified interval", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 1, 0), local(2011, 0, 1, 12, 4, 4), timeMinute), [ local(2011, 0, 1, 12, 1), local(2011, 0, 1, 12, 2), @@ -12,11 +12,11 @@ test("timeTicks(start, stop, interval) respects the specified interval", () => { ]); }); -test("timeTicks(start, stop, interval) returns the empty array for invalid intervals", () => { +it("timeTicks(start, stop, interval) returns the empty array for invalid intervals", () => { assert.deepStrictEqual(timeTicks(NaN, NaN, 10), []); }); -test("timeTicks(start, stop, interval.every(step)) observes the specified tick interval and step", () => { +it("timeTicks(start, stop, interval.every(step)) observes the specified tick interval and step", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 33, 4), timeMinute.every(10)), [ local(2011, 0, 1, 12, 0), local(2011, 0, 1, 12, 10), @@ -25,7 +25,7 @@ test("timeTicks(start, stop, interval.every(step)) observes the specified tick i ]); }); -test("timeTicks(start, stop, count) can generate sub-second ticks", () => { +it("timeTicks(start, stop, count) can generate sub-second ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 1), 4), [ local(2011, 0, 1, 12, 0, 0, 0), local(2011, 0, 1, 12, 0, 0, 200), @@ -36,7 +36,7 @@ test("timeTicks(start, stop, count) can generate sub-second ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 1-second ticks", () => { +it("timeTicks(start, stop, count) can generate 1-second ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 4), 4), [ local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 1), @@ -46,7 +46,7 @@ test("timeTicks(start, stop, count) can generate 1-second ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 5-second ticks", () => { +it("timeTicks(start, stop, count) can generate 5-second ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 20), 4), [ local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 5), @@ -56,7 +56,7 @@ test("timeTicks(start, stop, count) can generate 5-second ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 15-second ticks", () => { +it("timeTicks(start, stop, count) can generate 15-second ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 50), 4), [ local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 15), @@ -65,7 +65,7 @@ test("timeTicks(start, stop, count) can generate 15-second ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 30-second ticks", () => { +it("timeTicks(start, stop, count) can generate 30-second ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 1, 50), 4), [ local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 30), @@ -74,7 +74,7 @@ test("timeTicks(start, stop, count) can generate 30-second ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 1-minute ticks", () => { +it("timeTicks(start, stop, count) can generate 1-minute ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 0, 27), local(2011, 0, 1, 12, 4, 12), 4), [ local(2011, 0, 1, 12, 1), local(2011, 0, 1, 12, 2), @@ -83,7 +83,7 @@ test("timeTicks(start, stop, count) can generate 1-minute ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 5-minute ticks", () => { +it("timeTicks(start, stop, count) can generate 5-minute ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 3, 27), local(2011, 0, 1, 12, 21, 12), 4), [ local(2011, 0, 1, 12, 5), local(2011, 0, 1, 12, 10), @@ -92,7 +92,7 @@ test("timeTicks(start, stop, count) can generate 5-minute ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 15-minute ticks", () => { +it("timeTicks(start, stop, count) can generate 15-minute ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 8, 27), local(2011, 0, 1, 13, 4, 12), 4), [ local(2011, 0, 1, 12, 15), local(2011, 0, 1, 12, 30), @@ -101,7 +101,7 @@ test("timeTicks(start, stop, count) can generate 15-minute ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 30-minute ticks", () => { +it("timeTicks(start, stop, count) can generate 30-minute ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 28, 27), local(2011, 0, 1, 14, 4, 12), 4), [ local(2011, 0, 1, 12, 30), local(2011, 0, 1, 13, 0), @@ -110,7 +110,7 @@ test("timeTicks(start, stop, count) can generate 30-minute ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 1-hour ticks", () => { +it("timeTicks(start, stop, count) can generate 1-hour ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 12, 28, 27), local(2011, 0, 1, 16, 34, 12), 4), [ local(2011, 0, 1, 13, 0), local(2011, 0, 1, 14, 0), @@ -119,7 +119,7 @@ test("timeTicks(start, stop, count) can generate 1-hour ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 3-hour ticks", () => { +it("timeTicks(start, stop, count) can generate 3-hour ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 14, 28, 27), local(2011, 0, 2, 1, 34, 12), 4), [ local(2011, 0, 1, 15, 0), local(2011, 0, 1, 18, 0), @@ -128,7 +128,7 @@ test("timeTicks(start, stop, count) can generate 3-hour ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 6-hour ticks", () => { +it("timeTicks(start, stop, count) can generate 6-hour ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 16, 28, 27), local(2011, 0, 2, 14, 34, 12), 4), [ local(2011, 0, 1, 18, 0), local(2011, 0, 2, 0, 0), @@ -137,7 +137,7 @@ test("timeTicks(start, stop, count) can generate 6-hour ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 12-hour ticks", () => { +it("timeTicks(start, stop, count) can generate 12-hour ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 16, 28, 27), local(2011, 0, 3, 21, 34, 12), 4), [ local(2011, 0, 2, 0, 0), local(2011, 0, 2, 12, 0), @@ -146,7 +146,7 @@ test("timeTicks(start, stop, count) can generate 12-hour ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 1-day ticks", () => { +it("timeTicks(start, stop, count) can generate 1-day ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 16, 28, 27), local(2011, 0, 5, 21, 34, 12), 4), [ local(2011, 0, 2, 0, 0), local(2011, 0, 3, 0, 0), @@ -155,7 +155,7 @@ test("timeTicks(start, stop, count) can generate 1-day ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 2-day ticks", () => { +it("timeTicks(start, stop, count) can generate 2-day ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 2, 16, 28, 27), local(2011, 0, 9, 21, 34, 12), 4), [ local(2011, 0, 3, 0, 0), local(2011, 0, 5, 0, 0), @@ -164,7 +164,7 @@ test("timeTicks(start, stop, count) can generate 2-day ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 1-week ticks", () => { +it("timeTicks(start, stop, count) can generate 1-week ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 1, 16, 28, 27), local(2011, 0, 23, 21, 34, 12), 4), [ local(2011, 0, 2, 0, 0), local(2011, 0, 9, 0, 0), @@ -173,7 +173,7 @@ test("timeTicks(start, stop, count) can generate 1-week ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 1-month ticks", () => { +it("timeTicks(start, stop, count) can generate 1-month ticks", () => { assert.deepStrictEqual(timeTicks(local(2011, 0, 18), local(2011, 4, 2), 4), [ local(2011, 1, 1, 0, 0), local(2011, 2, 1, 0, 0), @@ -182,7 +182,7 @@ test("timeTicks(start, stop, count) can generate 1-month ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 3-month ticks", () => { +it("timeTicks(start, stop, count) can generate 3-month ticks", () => { assert.deepStrictEqual(timeTicks(local(2010, 11, 18), local(2011, 10, 2), 4), [ local(2011, 0, 1, 0, 0), local(2011, 3, 1, 0, 0), @@ -191,7 +191,7 @@ test("timeTicks(start, stop, count) can generate 3-month ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate 1-year ticks", () => { +it("timeTicks(start, stop, count) can generate 1-year ticks", () => { assert.deepStrictEqual(timeTicks(local(2010, 11, 18), local(2014, 2, 2), 4), [ local(2011, 0, 1, 0, 0), local(2012, 0, 1, 0, 0), @@ -200,7 +200,7 @@ test("timeTicks(start, stop, count) can generate 1-year ticks", () => { ]); }); -test("timeTicks(start, stop, count) can generate multi-year ticks", () => { +it("timeTicks(start, stop, count) can generate multi-year ticks", () => { assert.deepStrictEqual(timeTicks(local(0, 11, 18), local(2014, 2, 2), 6), [ local( 500, 0, 1, 0, 0), local(1000, 0, 1, 0, 0), @@ -209,11 +209,11 @@ test("timeTicks(start, stop, count) can generate multi-year ticks", () => { ]); }); -test("timeTicks(start, stop, count) returns one tick for an empty domain", () => { +it("timeTicks(start, stop, count) returns one tick for an empty domain", () => { assert.deepStrictEqual(timeTicks(local(2014, 2, 2), local(2014, 2, 2), 6), [local(2014, 2, 2)]); }); -test("timeTicks(start, stop, count) returns descending ticks for a descending domain", () => { +it("timeTicks(start, stop, count) returns descending ticks for a descending domain", () => { assert.deepStrictEqual(timeTicks(local(2014, 2, 2), local(2010, 11, 18), 4), [local(2014, 0, 1, 0, 0), local(2013, 0, 1, 0, 0), local(2012, 0, 1, 0, 0), local(2011, 0, 1, 0, 0)]); assert.deepStrictEqual(timeTicks(local(2011, 10, 2), local(2010, 11, 18), 4), [local(2011, 9, 1, 0, 0), local(2011, 6, 1, 0, 0), local(2011, 3, 1, 0, 0), local(2011, 0, 1, 0, 0)]); }); diff --git a/test/tuesday-test.js b/test/tuesday-test.js index 58e1e7e..5dd1420 100644 --- a/test/tuesday-test.js +++ b/test/tuesday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeTuesday, timeTuesdays} from "../src/index.js"; import {local} from "./date.js"; -test("timeTuesdays in an alias for timeTuesday.range", () => { +it("timeTuesdays in an alias for timeTuesday.range", () => { assert.strictEqual(timeTuesdays, timeTuesday.range); }); -test("timeTuesday.floor(date) returns Tuesdays", () => { +it("timeTuesday.floor(date) returns Tuesdays", () => { assert.deepStrictEqual(timeTuesday.floor(local(2011, 0, 2, 23, 59, 59)), local(2010, 11, 28)); assert.deepStrictEqual(timeTuesday.floor(local(2011, 0, 3, 0, 0, 0)), local(2010, 11, 28)); assert.deepStrictEqual(timeTuesday.floor(local(2011, 0, 3, 0, 0, 1)), local(2010, 11, 28)); @@ -16,7 +16,7 @@ test("timeTuesday.floor(date) returns Tuesdays", () => { assert.deepStrictEqual(timeTuesday.floor(local(2011, 0, 4, 0, 0, 1)), local(2011, 0, 4)); }); -test("timeTuesday.count(start, end) counts Tuesdays after start (exclusive) and before end (inclusive)", () => { +it("timeTuesday.count(start, end) counts Tuesdays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -41,7 +41,7 @@ test("timeTuesday.count(start, end) counts Tuesdays after start (exclusive) and assert.strictEqual(timeTuesday.count(local(2013, 0, 1), local(2013, 0, 9)), 1); }); -test("timeTuesday.count(start, end) observes daylight saving", () => { +it("timeTuesday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeTuesday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeTuesday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeTuesday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/unixDay-test.js b/test/unixDay-test.js index 699bf04..e792c41 100644 --- a/test/unixDay-test.js +++ b/test/unixDay-test.js @@ -1,19 +1,19 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {unixDay, unixDays} from "../src/index.js"; import {utc} from "./date.js"; -test("unixDays in an alias for unixDay.range", () => { +it("unixDays in an alias for unixDay.range", () => { assert.strictEqual(unixDays, unixDay.range); }); -test("unixDay.floor(date) returns days", () => { +it("unixDay.floor(date) returns days", () => { assert.deepStrictEqual(unixDay.floor(utc(2010, 11, 31, 23)), utc(2010, 11, 31)); assert.deepStrictEqual(unixDay.floor(utc(2011, 0, 1, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(unixDay.floor(utc(2011, 0, 1, 1)), utc(2011, 0, 1)); }); -test("unixDay.floor(date) does not observe daylight saving", () => { +it("unixDay.floor(date) does not observe daylight saving", () => { assert.deepStrictEqual(unixDay.floor(utc(2011, 2, 13, 7)), utc(2011, 2, 13)); assert.deepStrictEqual(unixDay.floor(utc(2011, 2, 13, 8)), utc(2011, 2, 13)); assert.deepStrictEqual(unixDay.floor(utc(2011, 2, 13, 9)), utc(2011, 2, 13)); @@ -24,18 +24,18 @@ test("unixDay.floor(date) does not observe daylight saving", () => { assert.deepStrictEqual(unixDay.floor(utc(2011, 10, 6, 8)), utc(2011, 10, 6)); }); -test("unixDay.round(date) returns days", () => { +it("unixDay.round(date) returns days", () => { assert.deepStrictEqual(unixDay.round(utc(2010, 11, 30, 13)), utc(2010, 11, 31)); assert.deepStrictEqual(unixDay.round(utc(2010, 11, 30, 11)), utc(2010, 11, 30)); }); -test("unixDay.ceil(date) returns days", () => { +it("unixDay.ceil(date) returns days", () => { assert.deepStrictEqual(unixDay.ceil(utc(2010, 11, 30, 23)), utc(2010, 11, 31)); assert.deepStrictEqual(unixDay.ceil(utc(2010, 11, 31, 0)), utc(2010, 11, 31)); assert.deepStrictEqual(unixDay.ceil(utc(2010, 11, 31, 1)), utc(2011, 0, 1)); }); -test("unixDay.ceil(date) does not observe daylight saving", () => { +it("unixDay.ceil(date) does not observe daylight saving", () => { assert.deepStrictEqual(unixDay.ceil(utc(2011, 2, 13, 7)), utc(2011, 2, 14)); assert.deepStrictEqual(unixDay.ceil(utc(2011, 2, 13, 8)), utc(2011, 2, 14)); assert.deepStrictEqual(unixDay.ceil(utc(2011, 2, 13, 9)), utc(2011, 2, 14)); @@ -46,39 +46,39 @@ test("unixDay.ceil(date) does not observe daylight saving", () => { assert.deepStrictEqual(unixDay.ceil(utc(2011, 10, 6, 8)), utc(2011, 10, 7)); }); -test("unixDay.offset(date) is an alias for unixDay.offset(date, 1)", () => { +it("unixDay.offset(date) is an alias for unixDay.offset(date, 1)", () => { assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 1, 23, 59, 59, 999)); }); -test("unixDay.offset(date, step) does not modify the passed-in date", () => { +it("unixDay.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); unixDay.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -test("unixDay.offset(date, step) does not round the passed-in date", () => { +it("unixDay.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 1, 23, 59, 59, 999)); assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 29, 23, 59, 59, 456)); }); -test("unixDay.offset(date, step) allows step to be negative", () => { +it("unixDay.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31), -1), utc(2010, 11, 30)); assert.deepStrictEqual(unixDay.offset(utc(2011, 0, 1), -2), utc(2010, 11, 30)); assert.deepStrictEqual(unixDay.offset(utc(2011, 0, 1), -1), utc(2010, 11, 31)); }); -test("unixDay.offset(date, step) allows step to be positive", () => { +it("unixDay.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31), +1), utc(2011, 0, 1)); assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 30), +2), utc(2011, 0, 1)); assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 30), +1), utc(2010, 11, 31)); }); -test("unixDay.offset(date, step) allows step to be zero", () => { +it("unixDay.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(unixDay.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -test("unixDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { +it("unixDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { assert.strictEqual(unixDay.count(utc(2011, 0, 1, 0), utc(2011, 4, 9, 0)), 128); assert.strictEqual(unixDay.count(utc(2011, 0, 1, 1), utc(2011, 4, 9, 0)), 128); assert.strictEqual(unixDay.count(utc(2010, 11, 31, 23), utc(2011, 4, 9, 0)), 129); @@ -86,7 +86,7 @@ test("unixDay.count(start, end) counts days after start (exclusive) and before e assert.strictEqual(unixDay.count(utc(2011, 0, 1, 0), utc(2011, 4, 9, 1)), 128); }); -test("unixDay.count(start, end) does not observe daylight saving", () => { +it("unixDay.count(start, end) does not observe daylight saving", () => { assert.strictEqual(unixDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 71); assert.strictEqual(unixDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 71); assert.strictEqual(unixDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 71); @@ -95,7 +95,7 @@ test("unixDay.count(start, end) does not observe daylight saving", () => { assert.strictEqual(unixDay.count(utc(2011, 0, 1), utc(2011, 10, 6, 2)), 309); }); -test("unixDay.count(start, end) returns 364 or 365 for a full year", () => { +it("unixDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(unixDay.count(utc(1999, 0, 1), utc(1999, 11, 31)), 364); assert.strictEqual(unixDay.count(utc(2000, 0, 1), utc(2000, 11, 31)), 365); // leap year assert.strictEqual(unixDay.count(utc(2001, 0, 1), utc(2001, 11, 31)), 364); @@ -111,7 +111,7 @@ test("unixDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(unixDay.count(utc(2011, 0, 1), utc(2011, 11, 31)), 364); }); -test("unixDay.every(step) returns every stepth day", () => { +it("unixDay.every(step) returns every stepth day", () => { assert.deepStrictEqual(unixDay.every(3).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 5, 23, 48)), [utc(2008, 11, 31), utc(2009, 0, 3)]); assert.deepStrictEqual(unixDay.every(5).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 6, 23, 48)), [utc(2009, 0, 1), utc(2009, 0, 6)]); assert.deepStrictEqual(unixDay.every(7).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 8, 23, 48)), [utc(2009, 0, 1), utc(2009, 0, 8)]); diff --git a/test/utcDay-test.js b/test/utcDay-test.js index c666403..f650781 100644 --- a/test/utcDay-test.js +++ b/test/utcDay-test.js @@ -1,19 +1,19 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcDay, utcDays} from "../src/index.js"; import {utc} from "./date.js"; -test("utcDays in an alias for utcDay.range", () => { +it("utcDays in an alias for utcDay.range", () => { assert.strictEqual(utcDays, utcDay.range); }); -test("utcDay.floor(date) returns days", () => { +it("utcDay.floor(date) returns days", () => { assert.deepStrictEqual(utcDay.floor(utc(2010, 11, 31, 23)), utc(2010, 11, 31)); assert.deepStrictEqual(utcDay.floor(utc(2011, 0, 1, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(utcDay.floor(utc(2011, 0, 1, 1)), utc(2011, 0, 1)); }); -test("utcDay.floor(date) does not observe daylight saving", () => { +it("utcDay.floor(date) does not observe daylight saving", () => { assert.deepStrictEqual(utcDay.floor(utc(2011, 2, 13, 7)), utc(2011, 2, 13)); assert.deepStrictEqual(utcDay.floor(utc(2011, 2, 13, 8)), utc(2011, 2, 13)); assert.deepStrictEqual(utcDay.floor(utc(2011, 2, 13, 9)), utc(2011, 2, 13)); @@ -24,18 +24,18 @@ test("utcDay.floor(date) does not observe daylight saving", () => { assert.deepStrictEqual(utcDay.floor(utc(2011, 10, 6, 8)), utc(2011, 10, 6)); }); -test("utcDay.round(date) returns days", () => { +it("utcDay.round(date) returns days", () => { assert.deepStrictEqual(utcDay.round(utc(2010, 11, 30, 13)), utc(2010, 11, 31)); assert.deepStrictEqual(utcDay.round(utc(2010, 11, 30, 11)), utc(2010, 11, 30)); }); -test("utcDay.ceil(date) returns days", () => { +it("utcDay.ceil(date) returns days", () => { assert.deepStrictEqual(utcDay.ceil(utc(2010, 11, 30, 23)), utc(2010, 11, 31)); assert.deepStrictEqual(utcDay.ceil(utc(2010, 11, 31, 0)), utc(2010, 11, 31)); assert.deepStrictEqual(utcDay.ceil(utc(2010, 11, 31, 1)), utc(2011, 0, 1)); }); -test("utcDay.ceil(date) does not observe daylight saving", () => { +it("utcDay.ceil(date) does not observe daylight saving", () => { assert.deepStrictEqual(utcDay.ceil(utc(2011, 2, 13, 7)), utc(2011, 2, 14)); assert.deepStrictEqual(utcDay.ceil(utc(2011, 2, 13, 8)), utc(2011, 2, 14)); assert.deepStrictEqual(utcDay.ceil(utc(2011, 2, 13, 9)), utc(2011, 2, 14)); @@ -46,39 +46,39 @@ test("utcDay.ceil(date) does not observe daylight saving", () => { assert.deepStrictEqual(utcDay.ceil(utc(2011, 10, 6, 8)), utc(2011, 10, 7)); }); -test("utcDay.offset(date) is an alias for utcDay.offset(date, 1)", () => { +it("utcDay.offset(date) is an alias for utcDay.offset(date, 1)", () => { assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 1, 23, 59, 59, 999)); }); -test("utcDay.offset(date, step) does not modify the passed-in date", () => { +it("utcDay.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcDay.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -test("utcDay.offset(date, step) does not round the passed-in date", () => { +it("utcDay.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 1, 23, 59, 59, 999)); assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 29, 23, 59, 59, 456)); }); -test("utcDay.offset(date, step) allows step to be negative", () => { +it("utcDay.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31), -1), utc(2010, 11, 30)); assert.deepStrictEqual(utcDay.offset(utc(2011, 0, 1), -2), utc(2010, 11, 30)); assert.deepStrictEqual(utcDay.offset(utc(2011, 0, 1), -1), utc(2010, 11, 31)); }); -test("utcDay.offset(date, step) allows step to be positive", () => { +it("utcDay.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31), +1), utc(2011, 0, 1)); assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 30), +2), utc(2011, 0, 1)); assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 30), +1), utc(2010, 11, 31)); }); -test("utcDay.offset(date, step) allows step to be zero", () => { +it("utcDay.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcDay.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -test("utcDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { +it("utcDay.count(start, end) counts days after start (exclusive) and before end (inclusive)", () => { assert.strictEqual(utcDay.count(utc(2011, 0, 1, 0), utc(2011, 4, 9, 0)), 128); assert.strictEqual(utcDay.count(utc(2011, 0, 1, 1), utc(2011, 4, 9, 0)), 128); assert.strictEqual(utcDay.count(utc(2010, 11, 31, 23), utc(2011, 4, 9, 0)), 129); @@ -86,7 +86,7 @@ test("utcDay.count(start, end) counts days after start (exclusive) and before en assert.strictEqual(utcDay.count(utc(2011, 0, 1, 0), utc(2011, 4, 9, 1)), 128); }); -test("utcDay.count(start, end) does not observe daylight saving", () => { +it("utcDay.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 71); assert.strictEqual(utcDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 71); assert.strictEqual(utcDay.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 71); @@ -95,7 +95,7 @@ test("utcDay.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcDay.count(utc(2011, 0, 1), utc(2011, 10, 6, 2)), 309); }); -test("utcDay.count(start, end) returns 364 or 365 for a full year", () => { +it("utcDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(utcDay.count(utc(1999, 0, 1), utc(1999, 11, 31)), 364); assert.strictEqual(utcDay.count(utc(2000, 0, 1), utc(2000, 11, 31)), 365); // leap year assert.strictEqual(utcDay.count(utc(2001, 0, 1), utc(2001, 11, 31)), 364); @@ -111,7 +111,7 @@ test("utcDay.count(start, end) returns 364 or 365 for a full year", () => { assert.strictEqual(utcDay.count(utc(2011, 0, 1), utc(2011, 11, 31)), 364); }); -test("utcDay.every(step) returns every stepth day, starting with the first day of the month", () => { +it("utcDay.every(step) returns every stepth day, starting with the first day of the month", () => { assert.deepStrictEqual(utcDay.every(3).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 5, 23, 48)), [utc(2008, 11, 31), utc(2009, 0, 1), utc(2009, 0, 4)]); assert.deepStrictEqual(utcDay.every(5).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 6, 23, 48)), [utc(2008, 11, 31), utc(2009, 0, 1), utc(2009, 0, 6)]); assert.deepStrictEqual(utcDay.every(7).range(utc(2008, 11, 30, 0, 12), utc(2009, 0, 8, 23, 48)), [utc(2009, 0, 1), utc(2009, 0, 8)]); diff --git a/test/utcFriday-test.js b/test/utcFriday-test.js index 6abc76b..33375b8 100644 --- a/test/utcFriday-test.js +++ b/test/utcFriday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcFriday, utcFridays} from "../src/index.js"; import {utc} from "./date.js"; -test("utcFridays in an alias for utcFriday.range", () => { +it("utcFridays in an alias for utcFriday.range", () => { assert.strictEqual(utcFridays, utcFriday.range); }); -test("utcFriday.floor(date) returns Fridays", () => { +it("utcFriday.floor(date) returns Fridays", () => { assert.deepStrictEqual(utcFriday.floor(utc(2011, 0, 5, 23, 59, 59)), utc(2010, 11, 31)); assert.deepStrictEqual(utcFriday.floor(utc(2011, 0, 6, 0, 0, 0)), utc(2010, 11, 31)); assert.deepStrictEqual(utcFriday.floor(utc(2011, 0, 6, 0, 0, 1)), utc(2010, 11, 31)); @@ -16,7 +16,7 @@ test("utcFriday.floor(date) returns Fridays", () => { assert.deepStrictEqual(utcFriday.floor(utc(2011, 0, 7, 0, 0, 1)), utc(2011, 0, 7)); }); -test("utcFriday.count(start, end) counts Fridays after start (exclusive) and before end (inclusive)", () => { +it("utcFriday.count(start, end) counts Fridays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -42,7 +42,7 @@ test("utcFriday.count(start, end) counts Fridays after start (exclusive) and bef assert.strictEqual(utcFriday.count(utc(2010, 0, 1), utc(2010, 0, 9)), 1); }); -test("utcFriday.count(start, end) does not observe daylight saving", () => { +it("utcFriday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcFriday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcFriday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcFriday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcHour-test.js b/test/utcHour-test.js index b2b12a5..46240a0 100644 --- a/test/utcHour-test.js +++ b/test/utcHour-test.js @@ -1,15 +1,15 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcHour} from "../src/index.js"; import {utc} from "./date.js"; -test("utcHour.floor(date) returns hours", () => { +it("utcHour.floor(date) returns hours", () => { assert.deepStrictEqual(utcHour.floor(utc(2010, 11, 31, 23, 59)), utc(2010, 11, 31, 23)); assert.deepStrictEqual(utcHour.floor(utc(2011, 0, 1, 0, 0)), utc(2011, 0, 1, 0)); assert.deepStrictEqual(utcHour.floor(utc(2011, 0, 1, 0, 1)), utc(2011, 0, 1, 0)); }); -test("utcHour.floor(date) observes start of daylight savings time", () => { +it("utcHour.floor(date) observes start of daylight savings time", () => { assert.deepStrictEqual(utcHour.floor(utc(2011, 2, 13, 8, 59)), utc(2011, 2, 13, 8)); assert.deepStrictEqual(utcHour.floor(utc(2011, 2, 13, 9, 0)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(utcHour.floor(utc(2011, 2, 13, 9, 1)), utc(2011, 2, 13, 9)); @@ -18,7 +18,7 @@ test("utcHour.floor(date) observes start of daylight savings time", () => { assert.deepStrictEqual(utcHour.floor(utc(2011, 2, 13, 10, 1)), utc(2011, 2, 13, 10)); }); -test("utcHour.floor(date) observes end of daylight savings time", () => { +it("utcHour.floor(date) observes end of daylight savings time", () => { assert.deepStrictEqual(utcHour.floor(utc(2011, 10, 6, 7, 59)), utc(2011, 10, 6, 7)); assert.deepStrictEqual(utcHour.floor(utc(2011, 10, 6, 8, 0)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(utcHour.floor(utc(2011, 10, 6, 8, 1)), utc(2011, 10, 6, 8)); @@ -28,13 +28,13 @@ test("utcHour.floor(date) observes end of daylight savings time", () => { }); -test("utcHour.ceil(date) returns hours", () => { +it("utcHour.ceil(date) returns hours", () => { assert.deepStrictEqual(utcHour.ceil(utc(2010, 11, 31, 23, 59)), utc(2011, 0, 1, 0)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 0, 1, 0, 0)), utc(2011, 0, 1, 0)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 0, 1, 0, 1)), utc(2011, 0, 1, 1)); }); -test("utcHour.ceil(date) observes start of daylight savings time", () => { +it("utcHour.ceil(date) observes start of daylight savings time", () => { assert.deepStrictEqual(utcHour.ceil(utc(2011, 2, 13, 8, 59)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 2, 13, 9, 0)), utc(2011, 2, 13, 9)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 2, 13, 9, 1)), utc(2011, 2, 13, 10)); @@ -43,7 +43,7 @@ test("utcHour.ceil(date) observes start of daylight savings time", () => { assert.deepStrictEqual(utcHour.ceil(utc(2011, 2, 13, 10, 1)), utc(2011, 2, 13, 11)); }); -test("utcHour.ceil(date) observes end of daylight savings time", () => { +it("utcHour.ceil(date) observes end of daylight savings time", () => { assert.deepStrictEqual(utcHour.ceil(utc(2011, 10, 6, 7, 59)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 10, 6, 8, 0)), utc(2011, 10, 6, 8)); assert.deepStrictEqual(utcHour.ceil(utc(2011, 10, 6, 8, 1)), utc(2011, 10, 6, 9)); @@ -52,35 +52,35 @@ test("utcHour.ceil(date) observes end of daylight savings time", () => { assert.deepStrictEqual(utcHour.ceil(utc(2011, 10, 6, 9, 1)), utc(2011, 10, 6, 10)); }); -test("utcHour.offset(date) does not modify the passed-in date", () => { +it("utcHour.offset(date) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcHour.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -test("utcHour.offset(date) does not round the passed-in-date", () => { +it("utcHour.offset(date) does not round the passed-in-date", () => { assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 1, 0, 59, 59, 999)); assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 31, 21, 59, 59, 456)); }); -test("utcHour.offset(date) allows negative offsets", () => { +it("utcHour.offset(date) allows negative offsets", () => { assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 12), -1), utc(2010, 11, 31, 11)); assert.deepStrictEqual(utcHour.offset(utc(2011, 0, 1, 1), -2), utc(2010, 11, 31, 23)); assert.deepStrictEqual(utcHour.offset(utc(2011, 0, 1, 0), -1), utc(2010, 11, 31, 23)); }); -test("utcHour.offset(date) allows positive offsets", () => { +it("utcHour.offset(date) allows positive offsets", () => { assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 11), +1), utc(2010, 11, 31, 12)); assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23), +2), utc(2011, 0, 1, 1)); assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23), +1), utc(2011, 0, 1, 0)); }); -test("utcHour.offset(date) allows zero offset", () => { +it("utcHour.offset(date) allows zero offset", () => { assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcHour.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -test("utcHour.range(start, stop) returns hours", () => { +it("utcHour.range(start, stop) returns hours", () => { assert.deepStrictEqual(utcHour.range(utc(2010, 11, 31, 12, 30), utc(2010, 11, 31, 15, 30)), [ utc(2010, 11, 31, 13), utc(2010, 11, 31, 14), @@ -88,15 +88,15 @@ test("utcHour.range(start, stop) returns hours", () => { ]); }); -test("utcHour.range(start, stop) has an inclusive lower bound", () => { +it("utcHour.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(utcHour.range(utc(2010, 11, 31, 23), utc(2011, 0, 1, 2))[0], utc(2010, 11, 31, 23)); }); -test("utcHour.range(start, stop) has an exclusive upper bound", () => { +it("utcHour.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(utcHour.range(utc(2010, 11, 31, 23), utc(2011, 0, 1, 2))[2], utc(2011, 0, 1, 1)); }); -test("utcHour.range(start, stop) can skip hours", () => { +it("utcHour.range(start, stop) can skip hours", () => { assert.deepStrictEqual(utcHour.range(utc(2011, 1, 1, 1), utc(2011, 1, 1, 13), 3), [ utc(2011, 1, 1, 1), utc(2011, 1, 1, 4), @@ -105,7 +105,7 @@ test("utcHour.range(start, stop) can skip hours", () => { ]); }); -test("utcHour.range(start, stop) does not observe the start of daylight savings time", () => { +it("utcHour.range(start, stop) does not observe the start of daylight savings time", () => { assert.deepStrictEqual(utcHour.range(utc(2011, 2, 13, 1), utc(2011, 2, 13, 5)), [ utc(2011, 2, 13, 1), utc(2011, 2, 13, 2), @@ -114,14 +114,14 @@ test("utcHour.range(start, stop) does not observe the start of daylight savings ]); }); -test("utcHour.range(start, stop) does not observe the end of daylight savings time", () => { +it("utcHour.range(start, stop) does not observe the end of daylight savings time", () => { assert.deepStrictEqual(utcHour.range(utc(2011, 10, 6, 0), utc(2011, 10, 6, 2)), [ utc(2011, 10, 6, 0), utc(2011, 10, 6, 1) ]); }); -test("utcHour.every(step) returns every stepth hour, starting with the first hour of the day", () => { +it("utcHour.every(step) returns every stepth hour, starting with the first hour of the day", () => { assert.deepStrictEqual(utcHour.every(4).range(utc(2008, 11, 30, 12, 47), utc(2008, 11, 31, 13, 57)), [utc(2008, 11, 30, 16), utc(2008, 11, 30, 20), utc(2008, 11, 31, 0), utc(2008, 11, 31, 4), utc(2008, 11, 31, 8), utc(2008, 11, 31, 12)]); assert.deepStrictEqual(utcHour.every(12).range(utc(2008, 11, 30, 12, 47), utc(2008, 11, 31, 13, 57)), [utc(2008, 11, 31, 0), utc(2008, 11, 31, 12)]); }); diff --git a/test/utcMillisecond-test.js b/test/utcMillisecond-test.js index 3000fac..7b73eed 100644 --- a/test/utcMillisecond-test.js +++ b/test/utcMillisecond-test.js @@ -1,7 +1,7 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeMillisecond, utcMillisecond} from "../src/index.js"; -test("utcMillisecond is an alias for timeMillisecond", () => { +it("utcMillisecond is an alias for timeMillisecond", () => { assert.strictEqual(utcMillisecond, timeMillisecond); }); diff --git a/test/utcMinute-test.js b/test/utcMinute-test.js index 0fb2303..606f5b3 100644 --- a/test/utcMinute-test.js +++ b/test/utcMinute-test.js @@ -1,51 +1,51 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcMinute} from "../src/index.js"; import {utc} from "./date.js"; -test("utcMinute.floor(date) returns minutes", () => { +it("utcMinute.floor(date) returns minutes", () => { assert.deepStrictEqual(utcMinute.floor(utc(2010, 11, 31, 23, 59, 59)), utc(2010, 11, 31, 23, 59)); assert.deepStrictEqual(utcMinute.floor(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 1, 0, 0)); assert.deepStrictEqual(utcMinute.floor(utc(2011, 0, 1, 0, 0, 59)), utc(2011, 0, 1, 0, 0)); assert.deepStrictEqual(utcMinute.floor(utc(2011, 0, 1, 0, 1, 0)), utc(2011, 0, 1, 0, 1)); }); -test("utcMinute.ceil(date) returns minutes", () => { +it("utcMinute.ceil(date) returns minutes", () => { assert.deepStrictEqual(utcMinute.ceil(utc(2010, 11, 31, 23, 59, 59)), utc(2011, 0, 1, 0, 0)); assert.deepStrictEqual(utcMinute.ceil(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 1, 0, 0)); assert.deepStrictEqual(utcMinute.ceil(utc(2011, 0, 1, 0, 0, 59)), utc(2011, 0, 1, 0, 1)); assert.deepStrictEqual(utcMinute.ceil(utc(2011, 0, 1, 0, 1, 0)), utc(2011, 0, 1, 0, 1)); }); -test("utcMinute.offset(date) does not modify the passed-in date", () => { +it("utcMinute.offset(date) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcMinute.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -test("utcMinute.offset(date) does not round the passed-in-date", () => { +it("utcMinute.offset(date) does not round the passed-in-date", () => { assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 1, 0, 0, 59, 999)); assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 31, 23, 57, 59, 456)); }); -test("utcMinute.offset(date) allows negative offsets", () => { +it("utcMinute.offset(date) allows negative offsets", () => { assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 12), -1), utc(2010, 11, 31, 23, 11)); assert.deepStrictEqual(utcMinute.offset(utc(2011, 0, 1, 0, 1), -2), utc(2010, 11, 31, 23, 59)); assert.deepStrictEqual(utcMinute.offset(utc(2011, 0, 1, 0, 0), -1), utc(2010, 11, 31, 23, 59)); }); -test("utcMinute.offset(date) allows positive offsets", () => { +it("utcMinute.offset(date) allows positive offsets", () => { assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 11), +1), utc(2010, 11, 31, 23, 12)); assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59), +2), utc(2011, 0, 1, 0, 1)); assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59), +1), utc(2011, 0, 1, 0, 0)); }); -test("utcMinute.offset(date) allows zero offset", () => { +it("utcMinute.offset(date) allows zero offset", () => { assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcMinute.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -test("utcMinute.range(start, stop), returns minutes", () => { +it("utcMinute.range(start, stop), returns minutes", () => { assert.deepStrictEqual(utcMinute.range(utc(2010, 11, 31, 23, 59), utc(2011, 0, 1, 0, 2)), [ utc(2010, 11, 31, 23, 59), utc(2011, 0, 1, 0, 0), @@ -53,15 +53,15 @@ test("utcMinute.range(start, stop), returns minutes", () => { ]); }); -test("utcMinute.range(start, stop), has an inclusive lower bound", () => { +it("utcMinute.range(start, stop), has an inclusive lower bound", () => { assert.deepStrictEqual(utcMinute.range(utc(2010, 11, 31, 23, 59), utc(2011, 0, 1, 0, 2))[0], utc(2010, 11, 31, 23, 59)); }); -test("utcMinute.range(start, stop), has an exclusive upper bound", () => { +it("utcMinute.range(start, stop), has an exclusive upper bound", () => { assert.deepStrictEqual(utcMinute.range(utc(2010, 11, 31, 23, 59), utc(2011, 0, 1, 0, 2))[2], utc(2011, 0, 1, 0, 1)); }); -test("utcMinute.range(start, stop), can skip minutes", () => { +it("utcMinute.range(start, stop), can skip minutes", () => { assert.deepStrictEqual(utcMinute.range(utc(2011, 1, 1, 12, 7), utc(2011, 1, 1, 13, 7), 15), [ utc(2011, 1, 1, 12, 7), utc(2011, 1, 1, 12, 22), @@ -70,7 +70,7 @@ test("utcMinute.range(start, stop), can skip minutes", () => { ]); }); -test("utcMinute.range(start, stop), observes start of daylight savings time", () => { +it("utcMinute.range(start, stop), observes start of daylight savings time", () => { assert.deepStrictEqual(utcMinute.range(utc(2011, 2, 13, 9, 59), utc(2011, 2, 13, 10, 2)), [ utc(2011, 2, 13, 9, 59), utc(2011, 2, 13, 10, 0), @@ -78,7 +78,7 @@ test("utcMinute.range(start, stop), observes start of daylight savings time", () ]); }); -test("utcMinute.range(start, stop), observes end of daylight savings time", () => { +it("utcMinute.range(start, stop), observes end of daylight savings time", () => { assert.deepStrictEqual(utcMinute.range(utc(2011, 10, 6, 8, 59), utc(2011, 10, 6, 9, 2)), [ utc(2011, 10, 6, 8, 59), utc(2011, 10, 6, 9, 0), @@ -86,7 +86,7 @@ test("utcMinute.range(start, stop), observes end of daylight savings time", () = ]); }); -test("utcMinute.every(step) returns every stepth minute, starting with the first minute of the hour", () => { +it("utcMinute.every(step) returns every stepth minute, starting with the first minute of the hour", () => { assert.deepStrictEqual(utcMinute.every(15).range(utc(2008, 11, 30, 12, 47), utc(2008, 11, 30, 13, 57)), [utc(2008, 11, 30, 13, 0), utc(2008, 11, 30, 13, 15), utc(2008, 11, 30, 13, 30), utc(2008, 11, 30, 13, 45)]); assert.deepStrictEqual(utcMinute.every(30).range(utc(2008, 11, 30, 12, 47), utc(2008, 11, 30, 13, 57)), [utc(2008, 11, 30, 13, 0), utc(2008, 11, 30, 13, 30)]); }); diff --git a/test/utcMonday-test.js b/test/utcMonday-test.js index 5da8557..6c1fedf 100644 --- a/test/utcMonday-test.js +++ b/test/utcMonday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcMonday, utcMondays} from "../src/index.js"; import {utc} from "./date.js"; -test("utcMondays in an alias for utcMonday.range", () => { +it("utcMondays in an alias for utcMonday.range", () => { assert.strictEqual(utcMondays, utcMonday.range); }); -test("utcMonday.floor(date) returns Mondays", () => { +it("utcMonday.floor(date) returns Mondays", () => { assert.deepStrictEqual(utcMonday.floor(utc(2011, 0, 1, 23, 59, 59)), utc(2010, 11, 27)); assert.deepStrictEqual(utcMonday.floor(utc(2011, 0, 2, 0, 0, 0)), utc(2010, 11, 27)); assert.deepStrictEqual(utcMonday.floor(utc(2011, 0, 2, 0, 0, 1)), utc(2010, 11, 27)); @@ -16,7 +16,7 @@ test("utcMonday.floor(date) returns Mondays", () => { assert.deepStrictEqual(utcMonday.floor(utc(2011, 0, 3, 0, 0, 1)), utc(2011, 0, 3)); }); -test("utcMonday.range(start, stop, step) returns every step Monday", () => { +it("utcMonday.range(start, stop, step) returns every step Monday", () => { assert.deepStrictEqual(utcMonday.range(utc(2011, 11, 1), utc(2012, 0, 15), 2), [ utc(2011, 11, 5), utc(2011, 11, 19), @@ -24,7 +24,7 @@ test("utcMonday.range(start, stop, step) returns every step Monday", () => { ]); }); -test("utcMonday.count(start, end) counts Mondays after start (exclusive) and before end (inclusive)", () => { +it("utcMonday.count(start, end) counts Mondays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -49,7 +49,7 @@ test("utcMonday.count(start, end) counts Mondays after start (exclusive) and bef assert.strictEqual(utcMonday.count(utc(2018, 0, 1), utc(2018, 0, 9)), 1); }); -test("utcMonday.count(start, end) does not observe daylight saving", () => { +it("utcMonday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcMonday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcMonday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcMonday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcMonth-test.js b/test/utcMonth-test.js index b2c0391..03bb335 100644 --- a/test/utcMonth-test.js +++ b/test/utcMonth-test.js @@ -1,19 +1,19 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcMonth, utcMonths} from "../src/index.js"; import {utc} from "./date.js"; -test("utcMonths in an alias for utcMonth.range", () => { +it("utcMonths in an alias for utcMonth.range", () => { assert.strictEqual(utcMonths, utcMonth.range); }); -test("utcMonth.floor(date) returns months", () => { +it("utcMonth.floor(date) returns months", () => { assert.deepStrictEqual(utcMonth.floor(utc(2010, 11, 31, 23)), utc(2010, 11, 1)); assert.deepStrictEqual(utcMonth.floor(utc(2011, 0, 1, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(utcMonth.floor(utc(2011, 0, 1, 1)), utc(2011, 0, 1)); }); -test("utcMonth.floor(date) observes daylight saving", () => { +it("utcMonth.floor(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.floor(utc(2011, 2, 13, 7)), utc(2011, 2, 1)); assert.deepStrictEqual(utcMonth.floor(utc(2011, 2, 13, 8)), utc(2011, 2, 1)); assert.deepStrictEqual(utcMonth.floor(utc(2011, 2, 13, 9)), utc(2011, 2, 1)); @@ -24,16 +24,16 @@ test("utcMonth.floor(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.floor(utc(2011, 10, 6, 10)), utc(2011, 10, 1)); }); -test("utcMonth.floor(date) handles years in the first century", () => { +it("utcMonth.floor(date) handles years in the first century", () => { assert.deepStrictEqual(utcMonth.floor(utc(9, 10, 6, 7)), utc(9, 10, 1)); }); -test("utcMonth.round(date) returns months", () => { +it("utcMonth.round(date) returns months", () => { assert.deepStrictEqual(utcMonth.round(utc(2010, 11, 16, 12)), utc(2011, 0, 1)); assert.deepStrictEqual(utcMonth.round(utc(2010, 11, 16, 11)), utc(2010, 11, 1)); }); -test("utcMonth.round(date) observes daylight saving", () => { +it("utcMonth.round(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.round(utc(2011, 2, 13, 7)), utc(2011, 2, 1)); assert.deepStrictEqual(utcMonth.round(utc(2011, 2, 13, 8)), utc(2011, 2, 1)); assert.deepStrictEqual(utcMonth.round(utc(2011, 2, 13, 9)), utc(2011, 2, 1)); @@ -44,17 +44,17 @@ test("utcMonth.round(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.round(utc(2011, 10, 6, 20)), utc(2011, 10, 1)); }); -test("utcMonth.round(date) handles midnight for leap years", () => { +it("utcMonth.round(date) handles midnight for leap years", () => { assert.deepStrictEqual(utcMonth.round(utc(2012, 2, 1, 0)), utc(2012, 2, 1)); assert.deepStrictEqual(utcMonth.round(utc(2012, 2, 1, 0)), utc(2012, 2, 1)); }); -test("utcMonth.ceil(date) returns months", () => { +it("utcMonth.ceil(date) returns months", () => { assert.deepStrictEqual(utcMonth.ceil(utc(2010, 10, 30, 23)), utc(2010, 11, 1)); assert.deepStrictEqual(utcMonth.ceil(utc(2010, 11, 1, 1)), utc(2011, 0, 1)); }); -test("utcMonth.ceil(date) observes daylight saving", () => { +it("utcMonth.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.ceil(utc(2011, 2, 13, 7)), utc(2011, 3, 1)); assert.deepStrictEqual(utcMonth.ceil(utc(2011, 2, 13, 8)), utc(2011, 3, 1)); assert.deepStrictEqual(utcMonth.ceil(utc(2011, 2, 13, 9)), utc(2011, 3, 1)); @@ -65,44 +65,44 @@ test("utcMonth.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(utcMonth.ceil(utc(2011, 10, 6, 10)), utc(2011, 11, 1)); }); -test("utcMonth.ceil(date) handles midnight for leap years", () => { +it("utcMonth.ceil(date) handles midnight for leap years", () => { assert.deepStrictEqual(utcMonth.ceil(utc(2012, 2, 1, 0)), utc(2012, 2, 1)); assert.deepStrictEqual(utcMonth.ceil(utc(2012, 2, 1, 0)), utc(2012, 2, 1)); }); -test("utcMonth.offset(date) is an alias for utcMonth.offset(date, 1)", () => { +it("utcMonth.offset(date) is an alias for utcMonth.offset(date, 1)", () => { assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 31, 23, 59, 59, 999)); }); -test("utcMonth.offset(date, step) does not modify the passed-in date", () => { +it("utcMonth.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcMonth.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -test("utcMonth.offset(date, step) does not round the passed-in date", () => { +it("utcMonth.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 9, 31, 23, 59, 59, 456)); }); -test("utcMonth.offset(date, step) allows step to be negative", () => { +it("utcMonth.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31), -1), utc(2010, 10, 31)); assert.deepStrictEqual(utcMonth.offset(utc(2011, 0, 1), -2), utc(2010, 10, 1)); assert.deepStrictEqual(utcMonth.offset(utc(2011, 0, 1), -1), utc(2010, 11, 1)); }); -test("utcMonth.offset(date, step) allows step to be positive", () => { +it("utcMonth.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31), +1), utc(2011, 0, 31)); assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 30), +2), utc(2011, 1, 30)); assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 30), +1), utc(2011, 0, 30)); }); -test("utcMonth.offset(date, step) allows step to be zero", () => { +it("utcMonth.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcMonth.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -test("utcMonth.range(start, stop) returns months between start (inclusive) and stop (exclusive)", () => { +it("utcMonth.range(start, stop) returns months between start (inclusive) and stop (exclusive)", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 11, 1), utc(2012, 5, 1)), [ utc(2011, 11, 1), utc(2012, 0, 1), @@ -113,7 +113,7 @@ test("utcMonth.range(start, stop) returns months between start (inclusive) and s ]); }); -test("utcMonth.range(start, stop) returns months", () => { +it("utcMonth.range(start, stop) returns months", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 10, 4, 2), utc(2012, 4, 10, 13)), [ utc(2011, 11, 1), utc(2012, 0, 1), @@ -124,7 +124,7 @@ test("utcMonth.range(start, stop) returns months", () => { ]); }); -test("utcMonth.range(start, stop) coerces start and stop to dates", () => { +it("utcMonth.range(start, stop) coerces start and stop to dates", () => { assert.deepStrictEqual(utcMonth.range(+utc(2011, 10, 4), +utc(2012, 1, 7)), [ utc(2011, 11, 1), utc(2012, 0, 1), @@ -132,16 +132,16 @@ test("utcMonth.range(start, stop) coerces start and stop to dates", () => { ]); }); -test("utcMonth.range(start, stop) returns the empty array for invalid dates", () => { +it("utcMonth.range(start, stop) returns the empty array for invalid dates", () => { assert.deepStrictEqual(utcMonth.range(new Date(NaN), Infinity), []); }); -test("utcMonth.range(start, stop) returns the empty array if start >= stop", () => { +it("utcMonth.range(start, stop) returns the empty array if start >= stop", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 11, 10), utc(2011, 10, 4)), []); assert.deepStrictEqual(utcMonth.range(utc(2011, 10, 1), utc(2011, 10, 1)), []); }); -test("utcMonth.range(start, stop) returns months", () => { +it("utcMonth.range(start, stop) returns months", () => { assert.deepStrictEqual(utcMonth.range(utc(2010, 10, 31), utc(2011, 2, 1)), [ utc(2010, 11, 1), utc(2011, 0, 1), @@ -149,15 +149,15 @@ test("utcMonth.range(start, stop) returns months", () => { ]); }); -test("utcMonth.range(start, stop) has an inclusive lower bound", () => { +it("utcMonth.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(utcMonth.range(utc(2010, 10, 31), utc(2011, 2, 1))[0], utc(2010, 11, 1)); }); -test("utcMonth.range(start, stop) has an exclusive upper bound", () => { +it("utcMonth.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(utcMonth.range(utc(2010, 10, 31), utc(2011, 2, 1))[2], utc(2011, 1, 1)); }); -test("utcMonth.range(start, stop) can skip months", () => { +it("utcMonth.range(start, stop) can skip months", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 1, 1), utc(2012, 1, 1), 3), [ utc(2011, 1, 1), utc(2011, 4, 1), @@ -166,7 +166,7 @@ test("utcMonth.range(start, stop) can skip months", () => { ]); }); -test("utcMonth.range(start, stop) observes start of daylight savings time", () => { +it("utcMonth.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 0, 1), utc(2011, 4, 1)), [ utc(2011, 0, 1), utc(2011, 1, 1), @@ -175,7 +175,7 @@ test("utcMonth.range(start, stop) observes start of daylight savings time", () = ]); }); -test("utcMonth.range(start, stop) observes end of daylight savings time", () => { +it("utcMonth.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(utcMonth.range(utc(2011, 9, 1), utc(2012, 1, 1)), [ utc(2011, 9, 1), utc(2011, 10, 1), @@ -184,7 +184,7 @@ test("utcMonth.range(start, stop) observes end of daylight savings time", () => ]); }); -test("utcMonth.count(start, end) counts months after start (exclusive) and before end (inclusive)", () => { +it("utcMonth.count(start, end) counts months after start (exclusive) and before end (inclusive)", () => { assert.strictEqual(utcMonth.count(utc(2011, 0, 1), utc(2011, 4, 1)), 4); assert.strictEqual(utcMonth.count(utc(2011, 0, 1), utc(2011, 3, 30)), 3); assert.strictEqual(utcMonth.count(utc(2010, 11, 31), utc(2011, 3, 30)), 4); @@ -193,6 +193,6 @@ test("utcMonth.count(start, end) counts months after start (exclusive) and befor assert.strictEqual(utcMonth.count(utc(2012, 4, 1), utc(2009, 11, 31)), -29); }); -test("utcMonth.every(step) returns every stepth month, starting with the first month of the year", () => { +it("utcMonth.every(step) returns every stepth month, starting with the first month of the year", () => { assert.deepStrictEqual(utcMonth.every(3).range(utc(2008, 11, 3), utc(2010, 6, 5)), [utc(2009, 0, 1), utc(2009, 3, 1), utc(2009, 6, 1), utc(2009, 9, 1), utc(2010, 0, 1), utc(2010, 3, 1), utc(2010, 6, 1)]); }); diff --git a/test/utcMultiYear-test.js b/test/utcMultiYear-test.js index 6ef2853..8b3cc38 100644 --- a/test/utcMultiYear-test.js +++ b/test/utcMultiYear-test.js @@ -1,38 +1,38 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcYear} from "../src/index.js"; import {utc} from "./date.js"; -test("utcYear.every(n).floor(date) returns integer multiples of n years", () => { +it("utcYear.every(n).floor(date) returns integer multiples of n years", () => { assert.deepStrictEqual(utcYear.every(10).floor(utc(2009, 11, 31, 23, 59, 59)), utc(2000, 0, 1)); assert.deepStrictEqual(utcYear.every(10).floor(utc(2010, 0, 1, 0, 0, 0)), utc(2010, 0, 1)); assert.deepStrictEqual(utcYear.every(10).floor(utc(2010, 0, 1, 0, 0, 1)), utc(2010, 0, 1)); }); -test("utcYear.every(n).ceil(date) returns integer multiples of n years", () => { +it("utcYear.every(n).ceil(date) returns integer multiples of n years", () => { assert.deepStrictEqual(utcYear.every(100).ceil(utc(1999, 11, 31, 23, 59, 59)), utc(2000, 0, 1)); assert.deepStrictEqual(utcYear.every(100).ceil(utc(2000, 0, 1, 0, 0, 0)), utc(2000, 0, 1)); assert.deepStrictEqual(utcYear.every(100).ceil(utc(2000, 0, 1, 0, 0, 1)), utc(2100, 0, 1)); }); -test("utcYear.every(n).offset(date, count) does not modify the passed-in date", () => { +it("utcYear.every(n).offset(date, count) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcYear.every(5).offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -test("utcYear.every(n).offset(date, count) does not round the passed-in-date", () => { +it("utcYear.every(n).offset(date, count) does not round the passed-in-date", () => { assert.deepStrictEqual(utcYear.every(5).offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2015, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcYear.every(5).offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2000, 11, 31, 23, 59, 59, 456)); }); -test("utcYear.every(n) does not define interval.count or interval.every", () => { +it("utcYear.every(n) does not define interval.count or interval.every", () => { const decade = utcYear.every(10); assert.strictEqual(decade.count, undefined); assert.strictEqual(decade.every, undefined); }); -test("utcYear.every(n).range(start, stop) returns multiples of n years", () => { +it("utcYear.every(n).range(start, stop) returns multiples of n years", () => { assert.deepStrictEqual(utcYear.every(10).range(utc(2010, 0, 1), utc(2031, 0, 1)), [ utc(2010, 0, 1), utc(2020, 0, 1), diff --git a/test/utcSaturday-test.js b/test/utcSaturday-test.js index 1db4854..6840587 100644 --- a/test/utcSaturday-test.js +++ b/test/utcSaturday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcSaturday, utcSaturdays} from "../src/index.js"; import {utc} from "./date.js"; -test("utcSaturdays in an alias for utcSaturday.range", () => { +it("utcSaturdays in an alias for utcSaturday.range", () => { assert.strictEqual(utcSaturdays, utcSaturday.range); }); -test("utcSaturday.floor(date) returns Saturdays", () => { +it("utcSaturday.floor(date) returns Saturdays", () => { assert.deepStrictEqual(utcSaturday.floor(utc(2011, 0, 6, 23, 59, 59)), utc(2011, 0, 1)); assert.deepStrictEqual(utcSaturday.floor(utc(2011, 0, 7, 0, 0, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(utcSaturday.floor(utc(2011, 0, 7, 0, 0, 1)), utc(2011, 0, 1)); @@ -16,7 +16,7 @@ test("utcSaturday.floor(date) returns Saturdays", () => { assert.deepStrictEqual(utcSaturday.floor(utc(2011, 0, 8, 0, 0, 1)), utc(2011, 0, 8)); }); -test("utcSaturday.count(start, end) counts Saturdays after start (exclusive) and before end (inclusive)", () => { +it("utcSaturday.count(start, end) counts Saturdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -42,7 +42,7 @@ test("utcSaturday.count(start, end) counts Saturdays after start (exclusive) and assert.strictEqual(utcSaturday.count(utc(2011, 0, 1), utc(2011, 0, 9)), 1); }); -test("utcSaturday.count(start, end) does not observe daylight saving", () => { +it("utcSaturday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcSaturday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcSaturday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcSaturday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcSecond-test.js b/test/utcSecond-test.js index 76b2f1f..d6f9ebc 100644 --- a/test/utcSecond-test.js +++ b/test/utcSecond-test.js @@ -1,55 +1,55 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcSecond} from "../src/index.js"; import {utc} from "./date.js"; -test("utcSecond.floor(date) returns seconds", () => { +it("utcSecond.floor(date) returns seconds", () => { assert.deepStrictEqual(utcSecond.floor(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2010, 11, 31, 23, 59, 59)); assert.deepStrictEqual(utcSecond.floor(utc(2011, 0, 1, 0, 0, 0, 0)), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.floor(utc(2011, 0, 1, 0, 0, 0, 1)), utc(2011, 0, 1, 0, 0, 0)); }); -test("utcSecond.round(date) returns seconds", () => { +it("utcSecond.round(date) returns seconds", () => { assert.deepStrictEqual(utcSecond.round(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.round(utc(2011, 0, 1, 0, 0, 0, 499)), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.round(utc(2011, 0, 1, 0, 0, 0, 500)), utc(2011, 0, 1, 0, 0, 1)); }); -test("utcSecond.ceil(date) returns seconds", () => { +it("utcSecond.ceil(date) returns seconds", () => { assert.deepStrictEqual(utcSecond.ceil(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.ceil(utc(2011, 0, 1, 0, 0, 0, 0)), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.ceil(utc(2011, 0, 1, 0, 0, 0, 1)), utc(2011, 0, 1, 0, 0, 1)); }); -test("utcSecond.offset(date, step) does not modify the passed-in date", () => { +it("utcSecond.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcSecond.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -test("utcSecond.offset(date, step) does not round the passed-in-date", () => { +it("utcSecond.offset(date, step) does not round the passed-in-date", () => { assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 1, 0, 0, 0, 999)); assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 31, 23, 59, 57, 456)); }); -test("utcSecond.offset(date, step) allows negative offsets", () => { +it("utcSecond.offset(date, step) allows negative offsets", () => { assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 59), -1), utc(2010, 11, 31, 23, 59, 58)); assert.deepStrictEqual(utcSecond.offset(utc(2011, 0, 1, 0, 0, 0), -2), utc(2010, 11, 31, 23, 59, 58)); assert.deepStrictEqual(utcSecond.offset(utc(2011, 0, 1, 0, 0, 0), -1), utc(2010, 11, 31, 23, 59, 59)); }); -test("utcSecond.offset(date, step) allows positive offsets", () => { +it("utcSecond.offset(date, step) allows positive offsets", () => { assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 58), +1), utc(2010, 11, 31, 23, 59, 59)); assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 58), +2), utc(2011, 0, 1, 0, 0, 0)); assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 59), +1), utc(2011, 0, 1, 0, 0, 0)); }); -test("utcSecond.offset(date, step) allows zero offset", () => { +it("utcSecond.offset(date, step) allows zero offset", () => { assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcSecond.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -test("utcSecond.range(start, stop) returns seconds", () => { +it("utcSecond.range(start, stop) returns seconds", () => { assert.deepStrictEqual(utcSecond.range(utc(2010, 11, 31, 23, 59, 59), utc(2011, 0, 1, 0, 0, 2)), [ utc(2010, 11, 31, 23, 59, 59), utc(2011, 0, 1, 0, 0, 0), @@ -57,15 +57,15 @@ test("utcSecond.range(start, stop) returns seconds", () => { ]); }); -test("utcSecond.range(start, stop) has an inclusive lower bound", () => { +it("utcSecond.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(utcSecond.range(utc(2010, 11, 31, 23, 59, 59), utc(2011, 0, 1, 0, 0, 2))[0], utc(2010, 11, 31, 23, 59, 59)); }); -test("utcSecond.range(start, stop) has an exclusive upper bound", () => { +it("utcSecond.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(utcSecond.range(utc(2010, 11, 31, 23, 59, 59), utc(2011, 0, 1, 0, 0, 2))[2], utc(2011, 0, 1, 0, 0, 1)); }); -test("utcSecond.range(start, stop, step) can skip seconds", () => { +it("utcSecond.range(start, stop, step) can skip seconds", () => { assert.deepStrictEqual(utcSecond.range(utc(2011, 1, 1, 12, 0, 7), utc(2011, 1, 1, 12, 1, 7), 15), [ utc(2011, 1, 1, 12, 0, 7), utc(2011, 1, 1, 12, 0, 22), @@ -74,7 +74,7 @@ test("utcSecond.range(start, stop, step) can skip seconds", () => { ]); }); -test("utcSecond.range(start, stop) observes start of daylight savings time", () => { +it("utcSecond.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(utcSecond.range(utc(2011, 2, 13, 9, 59, 59), utc(2011, 2, 13, 10, 0, 2)), [ utc(2011, 2, 13, 9, 59, 59), utc(2011, 2, 13, 10, 0, 0), @@ -82,7 +82,7 @@ test("utcSecond.range(start, stop) observes start of daylight savings time", () ]); }); -test("utcSecond.range(start, stop) observes end of daylight savings time", () => { +it("utcSecond.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(utcSecond.range(utc(2011, 10, 6, 8, 59, 59), utc(2011, 10, 6, 9, 0, 2)), [ utc(2011, 10, 6, 8, 59, 59), utc(2011, 10, 6, 9, 0, 0), @@ -90,7 +90,7 @@ test("utcSecond.range(start, stop) observes end of daylight savings time", () => ]); }); -test("utcSecond.every(step) returns every stepth second, starting with the first second of the minute", () => { +it("utcSecond.every(step) returns every stepth second, starting with the first second of the minute", () => { assert.deepStrictEqual(utcSecond.every(15).range(utc(2008, 11, 30, 12, 36, 47), utc(2008, 11, 30, 12, 37, 57)), [utc(2008, 11, 30, 12, 37, 0), utc(2008, 11, 30, 12, 37, 15), utc(2008, 11, 30, 12, 37, 30), utc(2008, 11, 30, 12, 37, 45)]); assert.deepStrictEqual(utcSecond.every(30).range(utc(2008, 11, 30, 12, 36, 47), utc(2008, 11, 30, 12, 37, 57)), [utc(2008, 11, 30, 12, 37, 0), utc(2008, 11, 30, 12, 37, 30)]); }); diff --git a/test/utcSunday-test.js b/test/utcSunday-test.js index fab835f..120ba4e 100644 --- a/test/utcSunday-test.js +++ b/test/utcSunday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcSunday, utcSundays} from "../src/index.js"; import {utc} from "./date.js"; -test("utcSundays in an alias for utcSunday.range", () => { +it("utcSundays in an alias for utcSunday.range", () => { assert.strictEqual(utcSundays, utcSunday.range); }); -test("utcSunday.floor(date) returns Sundays", () => { +it("utcSunday.floor(date) returns Sundays", () => { assert.deepStrictEqual(utcSunday.floor(utc(2010, 11, 31, 23, 59, 59)), utc(2010, 11, 26)); assert.deepStrictEqual(utcSunday.floor(utc(2011, 0, 1, 0, 0, 0)), utc(2010, 11, 26)); assert.deepStrictEqual(utcSunday.floor(utc(2011, 0, 1, 0, 0, 1)), utc(2010, 11, 26)); @@ -16,16 +16,16 @@ test("utcSunday.floor(date) returns Sundays", () => { assert.deepStrictEqual(utcSunday.floor(utc(2011, 0, 2, 0, 0, 1)), utc(2011, 0, 2)); }); -test("utcSunday.floor(date) observes daylight saving", () => { +it("utcSunday.floor(date) observes daylight saving", () => { assert.deepStrictEqual(utcSunday.floor(utc(2011, 2, 13, 1)), utc(2011, 2, 13)); assert.deepStrictEqual(utcSunday.floor(utc(2011, 10, 6, 1)), utc(2011, 10, 6)); }); -test("utcSunday.floor(date) handles years in the first century", () => { +it("utcSunday.floor(date) handles years in the first century", () => { assert.deepStrictEqual(utcSunday.floor(utc(9, 10, 6, 7)), utc(9, 10, 1)); }); -test("utcSunday.ceil(date) returns Sundays", () => { +it("utcSunday.ceil(date) returns Sundays", () => { assert.deepStrictEqual(utcSunday.ceil(utc(2010, 11, 31, 23, 59, 59)), utc(2011, 0, 2)); assert.deepStrictEqual(utcSunday.ceil(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 2)); assert.deepStrictEqual(utcSunday.ceil(utc(2011, 0, 1, 0, 0, 1)), utc(2011, 0, 2)); @@ -34,44 +34,44 @@ test("utcSunday.ceil(date) returns Sundays", () => { assert.deepStrictEqual(utcSunday.ceil(utc(2011, 0, 2, 0, 0, 1)), utc(2011, 0, 9)); }); -test("utcSunday.ceil(date) observes daylight saving", () => { +it("utcSunday.ceil(date) observes daylight saving", () => { assert.deepStrictEqual(utcSunday.ceil(utc(2011, 2, 13, 1)), utc(2011, 2, 20)); assert.deepStrictEqual(utcSunday.ceil(utc(2011, 10, 6, 1)), utc(2011, 10, 13)); }); -test("utcSunday.offset(date) is an alias for utcSunday.offset(date, 1)", () => { +it("utcSunday.offset(date) is an alias for utcSunday.offset(date, 1)", () => { assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 31, 23, 59, 59, 999)), utc(2011, 0, 7, 23, 59, 59, 999)); }); -test("utcSunday.offset(date, step) does not modify the passed-in date", () => { +it("utcSunday.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcSunday.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -test("utcSunday.offset(date, step) does not round the passed-in date", () => { +it("utcSunday.offset(date, step) does not round the passed-in date", () => { assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 7, 23, 59, 59, 999)); assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 17, 23, 59, 59, 456)); }); -test("utcSunday.offset(date, step) allows step to be negative", () => { +it("utcSunday.offset(date, step) allows step to be negative", () => { assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 1), -1), utc(2010, 10, 24)); assert.deepStrictEqual(utcSunday.offset(utc(2011, 0, 1), -2), utc(2010, 11, 18)); assert.deepStrictEqual(utcSunday.offset(utc(2011, 0, 1), -1), utc(2010, 11, 25)); }); -test("utcSunday.offset(date, step) allows step to be positive", () => { +it("utcSunday.offset(date, step) allows step to be positive", () => { assert.deepStrictEqual(utcSunday.offset(utc(2010, 10, 24), +1), utc(2010, 11, 1)); assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 18), +2), utc(2011, 0, 1)); assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 25), +1), utc(2011, 0, 1)); }); -test("utcSunday.offset(date, step) allows step to be zero", () => { +it("utcSunday.offset(date, step) allows step to be zero", () => { assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcSunday.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -test("utcSunday.range(start, stop) returns Sundays between start (inclusive) and stop (exclusive)", () => { +it("utcSunday.range(start, stop) returns Sundays between start (inclusive) and stop (exclusive)", () => { assert.deepStrictEqual(utcSunday.range(utc(2011, 11, 1), utc(2012, 0, 15)), [ utc(2011, 11, 4), utc(2011, 11, 11), @@ -82,7 +82,7 @@ test("utcSunday.range(start, stop) returns Sundays between start (inclusive) and ]); }); -test("utcSunday.range(start, stop) returns Sundays", () => { +it("utcSunday.range(start, stop) returns Sundays", () => { assert.deepStrictEqual(utcSunday.range(utc(2011, 11, 1, 12, 23), utc(2012, 0, 14, 12, 23)), [ utc(2011, 11, 4), utc(2011, 11, 11), @@ -93,7 +93,7 @@ test("utcSunday.range(start, stop) returns Sundays", () => { ]); }); -test("utcSunday.range(start, stop) coerces start and stop to dates", () => { +it("utcSunday.range(start, stop) coerces start and stop to dates", () => { assert.deepStrictEqual(utcSunday.range(+utc(2011, 11, 1), +utc(2012, 0, 15)), [ utc(2011, 11, 4), utc(2011, 11, 11), @@ -104,16 +104,16 @@ test("utcSunday.range(start, stop) coerces start and stop to dates", () => { ]); }); -test("utcSunday.range(start, stop) returns the empty array for invalid dates", () => { +it("utcSunday.range(start, stop) returns the empty array for invalid dates", () => { assert.deepStrictEqual(utcSunday.range(new Date(NaN), Infinity), []); }); -test("utcSunday.range(start, stop) returns the empty array if start >= stop", () => { +it("utcSunday.range(start, stop) returns the empty array if start >= stop", () => { assert.deepStrictEqual(utcSunday.range(utc(2011, 11, 10), utc(2011, 10, 4)), []); assert.deepStrictEqual(utcSunday.range(utc(2011, 10, 1), utc(2011, 10, 1)), []); }); -test("utcSunday.range(start, stop, step) returns every step Sunday", () => { +it("utcSunday.range(start, stop, step) returns every step Sunday", () => { assert.deepStrictEqual(utcSunday.range(utc(2011, 11, 1), utc(2012, 0, 15), 2), [ utc(2011, 11, 4), utc(2011, 11, 18), @@ -121,7 +121,7 @@ test("utcSunday.range(start, stop, step) returns every step Sunday", () => { ]); }); -test("utcSunday.count(start, end) counts Sundays after start (exclusive) and before end (inclusive)", () => { +it("utcSunday.count(start, end) counts Sundays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -146,7 +146,7 @@ test("utcSunday.count(start, end) counts Sundays after start (exclusive) and bef assert.strictEqual(utcSunday.count(utc(2012, 0, 1), utc(2012, 0, 9)), 1); }); -test("utcSunday.count(start, end) does not observe daylight saving", () => { +it("utcSunday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcSunday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 11); assert.strictEqual(utcSunday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 11); assert.strictEqual(utcSunday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 11); diff --git a/test/utcThursday-test.js b/test/utcThursday-test.js index 42fea2f..3dd45ed 100644 --- a/test/utcThursday-test.js +++ b/test/utcThursday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utc} from "./date.js"; import {utcThursday, utcThursdays} from "../src/index.js"; -test("utcThursdays in an alias for utcThursday.range", () => { +it("utcThursdays in an alias for utcThursday.range", () => { assert.strictEqual(utcThursdays, utcThursday.range); }); -test("utcThursday.floor(date) returns Thursdays", () => { +it("utcThursday.floor(date) returns Thursdays", () => { assert.deepStrictEqual(utcThursday.floor(utc(2011, 0, 4, 23, 59, 59)), utc(2010, 11, 30)); assert.deepStrictEqual(utcThursday.floor(utc(2011, 0, 5, 0, 0, 0)), utc(2010, 11, 30)); assert.deepStrictEqual(utcThursday.floor(utc(2011, 0, 5, 0, 0, 1)), utc(2010, 11, 30)); @@ -16,7 +16,7 @@ test("utcThursday.floor(date) returns Thursdays", () => { assert.deepStrictEqual(utcThursday.floor(utc(2011, 0, 6, 0, 0, 1)), utc(2011, 0, 6)); }); -test("utcThursday.count(start, end) counts Thursdays after start (exclusive) and before end (inclusive)", () => { +it("utcThursday.count(start, end) counts Thursdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -41,7 +41,7 @@ test("utcThursday.count(start, end) counts Thursdays after start (exclusive) and assert.strictEqual(utcThursday.count(utc(2015, 0, 1), utc(2015, 0, 9)), 1); }); -test("utcThursday.count(start, end) does not observe daylight saving", () => { +it("utcThursday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcThursday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcThursday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcThursday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcTicks-test.js b/test/utcTicks-test.js index a4968f5..b175bb1 100644 --- a/test/utcTicks-test.js +++ b/test/utcTicks-test.js @@ -1,9 +1,9 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcMinute, utcTicks} from "../src/index.js"; import {utc} from "./date.js"; -test("utcTicks(start, stop, interval) respects the specified interval", () => { +it("utcTicks(start, stop, interval) respects the specified interval", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 1, 0), utc(2011, 0, 1, 12, 4, 4), utcMinute), [ utc(2011, 0, 1, 12, 1), utc(2011, 0, 1, 12, 2), @@ -12,7 +12,7 @@ test("utcTicks(start, stop, interval) respects the specified interval", () => { ]); }); -test("utcTicks(start, stop, interval.every(step)) observes the specified tick interval and step", () => { +it("utcTicks(start, stop, interval.every(step)) observes the specified tick interval and step", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 33, 4), utcMinute.every(10)), [ utc(2011, 0, 1, 12, 0), utc(2011, 0, 1, 12, 10), @@ -21,7 +21,7 @@ test("utcTicks(start, stop, interval.every(step)) observes the specified tick in ]); }); -test("utcTicks(start, stop, count) can generate sub-second ticks", () => { +it("utcTicks(start, stop, count) can generate sub-second ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 1), 4), [ utc(2011, 0, 1, 12, 0, 0, 0), utc(2011, 0, 1, 12, 0, 0, 200), @@ -32,7 +32,7 @@ test("utcTicks(start, stop, count) can generate sub-second ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 1-second ticks", () => { +it("utcTicks(start, stop, count) can generate 1-second ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 4), 4), [ utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 1), @@ -42,7 +42,7 @@ test("utcTicks(start, stop, count) can generate 1-second ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 5-second ticks", () => { +it("utcTicks(start, stop, count) can generate 5-second ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 20), 4), [ utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 5), @@ -52,7 +52,7 @@ test("utcTicks(start, stop, count) can generate 5-second ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 15-second ticks", () => { +it("utcTicks(start, stop, count) can generate 15-second ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 50), 4), [ utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 15), @@ -61,7 +61,7 @@ test("utcTicks(start, stop, count) can generate 15-second ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 30-second ticks", () => { +it("utcTicks(start, stop, count) can generate 30-second ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 1, 50), 4), [ utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 30), @@ -70,7 +70,7 @@ test("utcTicks(start, stop, count) can generate 30-second ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 1-minute ticks", () => { +it("utcTicks(start, stop, count) can generate 1-minute ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 0, 27), utc(2011, 0, 1, 12, 4, 12), 4), [ utc(2011, 0, 1, 12, 1), utc(2011, 0, 1, 12, 2), @@ -79,7 +79,7 @@ test("utcTicks(start, stop, count) can generate 1-minute ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 5-minute ticks", () => { +it("utcTicks(start, stop, count) can generate 5-minute ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 3, 27), utc(2011, 0, 1, 12, 21, 12), 4), [ utc(2011, 0, 1, 12, 5), utc(2011, 0, 1, 12, 10), @@ -88,7 +88,7 @@ test("utcTicks(start, stop, count) can generate 5-minute ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 15-minute ticks", () => { +it("utcTicks(start, stop, count) can generate 15-minute ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 8, 27), utc(2011, 0, 1, 13, 4, 12), 4), [ utc(2011, 0, 1, 12, 15), utc(2011, 0, 1, 12, 30), @@ -97,7 +97,7 @@ test("utcTicks(start, stop, count) can generate 15-minute ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 30-minute ticks", () => { +it("utcTicks(start, stop, count) can generate 30-minute ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 28, 27), utc(2011, 0, 1, 14, 4, 12), 4), [ utc(2011, 0, 1, 12, 30), utc(2011, 0, 1, 13, 0), @@ -106,7 +106,7 @@ test("utcTicks(start, stop, count) can generate 30-minute ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 1-hour ticks", () => { +it("utcTicks(start, stop, count) can generate 1-hour ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 12, 28, 27), utc(2011, 0, 1, 16, 34, 12), 4), [ utc(2011, 0, 1, 13, 0), utc(2011, 0, 1, 14, 0), @@ -115,7 +115,7 @@ test("utcTicks(start, stop, count) can generate 1-hour ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 3-hour ticks", () => { +it("utcTicks(start, stop, count) can generate 3-hour ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 14, 28, 27), utc(2011, 0, 2, 1, 34, 12), 4), [ utc(2011, 0, 1, 15, 0), utc(2011, 0, 1, 18, 0), @@ -124,7 +124,7 @@ test("utcTicks(start, stop, count) can generate 3-hour ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 6-hour ticks", () => { +it("utcTicks(start, stop, count) can generate 6-hour ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 2, 14, 34, 12), 4), [ utc(2011, 0, 1, 18, 0), utc(2011, 0, 2, 0, 0), @@ -133,7 +133,7 @@ test("utcTicks(start, stop, count) can generate 6-hour ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 12-hour ticks", () => { +it("utcTicks(start, stop, count) can generate 12-hour ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 3, 21, 34, 12), 4), [ utc(2011, 0, 2, 0, 0), utc(2011, 0, 2, 12, 0), @@ -142,7 +142,7 @@ test("utcTicks(start, stop, count) can generate 12-hour ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 1-day ticks", () => { +it("utcTicks(start, stop, count) can generate 1-day ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 5, 21, 34, 12), 4), [ utc(2011, 0, 2, 0, 0), utc(2011, 0, 3, 0, 0), @@ -151,7 +151,7 @@ test("utcTicks(start, stop, count) can generate 1-day ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 2-day ticks", () => { +it("utcTicks(start, stop, count) can generate 2-day ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 2, 16, 28, 27), utc(2011, 0, 9, 21, 34, 12), 4), [ utc(2011, 0, 4, 0, 0), utc(2011, 0, 6, 0, 0), @@ -159,7 +159,7 @@ test("utcTicks(start, stop, count) can generate 2-day ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 1-week ticks", () => { +it("utcTicks(start, stop, count) can generate 1-week ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 23, 21, 34, 12), 4), [ utc(2011, 0, 2, 0, 0), utc(2011, 0, 9, 0, 0), @@ -168,7 +168,7 @@ test("utcTicks(start, stop, count) can generate 1-week ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 1-month ticks", () => { +it("utcTicks(start, stop, count) can generate 1-month ticks", () => { assert.deepStrictEqual(utcTicks(utc(2011, 0, 18), utc(2011, 4, 2), 4), [ utc(2011, 1, 1, 0, 0), utc(2011, 2, 1, 0, 0), @@ -177,7 +177,7 @@ test("utcTicks(start, stop, count) can generate 1-month ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 3-month ticks", () => { +it("utcTicks(start, stop, count) can generate 3-month ticks", () => { assert.deepStrictEqual(utcTicks(utc(2010, 11, 18), utc(2011, 10, 2), 4), [ utc(2011, 0, 1, 0, 0), utc(2011, 3, 1, 0, 0), @@ -186,7 +186,7 @@ test("utcTicks(start, stop, count) can generate 3-month ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate 1-year ticks", () => { +it("utcTicks(start, stop, count) can generate 1-year ticks", () => { assert.deepStrictEqual(utcTicks(utc(2010, 11, 18), utc(2014, 2, 2), 4), [ utc(2011, 0, 1, 0, 0), utc(2012, 0, 1, 0, 0), @@ -195,7 +195,7 @@ test("utcTicks(start, stop, count) can generate 1-year ticks", () => { ]); }); -test("utcTicks(start, stop, count) can generate multi-year ticks", () => { +it("utcTicks(start, stop, count) can generate multi-year ticks", () => { assert.deepStrictEqual(utcTicks(utc(0, 11, 18), utc(2014, 2, 2), 6), [ utc( 500, 0, 1, 0, 0), utc(1000, 0, 1, 0, 0), @@ -204,11 +204,11 @@ test("utcTicks(start, stop, count) can generate multi-year ticks", () => { ]); }); -test("utcTicks(start, stop, count) returns one tick for an empty domain", () => { +it("utcTicks(start, stop, count) returns one tick for an empty domain", () => { assert.deepStrictEqual(utcTicks(utc(2014, 2, 2), utc(2014, 2, 2), 6), [utc(2014, 2, 2)]); }); -test("utcTicks(start, stop, count) returns descending ticks for a descending domain", () => { +it("utcTicks(start, stop, count) returns descending ticks for a descending domain", () => { assert.deepStrictEqual(utcTicks(utc(2014, 2, 2), utc(2010, 11, 18), 4), [utc(2014, 0, 1, 0, 0), utc(2013, 0, 1, 0, 0), utc(2012, 0, 1, 0, 0), utc(2011, 0, 1, 0, 0)]); assert.deepStrictEqual(utcTicks(utc(2011, 10, 2), utc(2010, 11, 18), 4), [utc(2011, 9, 1, 0, 0), utc(2011, 6, 1, 0, 0), utc(2011, 3, 1, 0, 0), utc(2011, 0, 1, 0, 0)]); }); diff --git a/test/utcTuesday-test.js b/test/utcTuesday-test.js index 50532c4..f7cedef 100644 --- a/test/utcTuesday-test.js +++ b/test/utcTuesday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcTuesday, utcTuesdays} from "../src/index.js"; import {utc} from "./date.js"; -test("utcTuesdays in an alias for utcTuesday.range", () => { +it("utcTuesdays in an alias for utcTuesday.range", () => { assert.strictEqual(utcTuesdays, utcTuesday.range); }); -test("utcTuesday.floor(date) returns Tuesdays", () => { +it("utcTuesday.floor(date) returns Tuesdays", () => { assert.deepStrictEqual(utcTuesday.floor(utc(2011, 0, 2, 23, 59, 59)), utc(2010, 11, 28)); assert.deepStrictEqual(utcTuesday.floor(utc(2011, 0, 3, 0, 0, 0)), utc(2010, 11, 28)); assert.deepStrictEqual(utcTuesday.floor(utc(2011, 0, 3, 0, 0, 1)), utc(2010, 11, 28)); @@ -16,7 +16,7 @@ test("utcTuesday.floor(date) returns Tuesdays", () => { assert.deepStrictEqual(utcTuesday.floor(utc(2011, 0, 4, 0, 0, 1)), utc(2011, 0, 4)); }); -test("utcTuesday.count(start, end) counts Tuesdays after start (exclusive) and before end (inclusive)", () => { +it("utcTuesday.count(start, end) counts Tuesdays after start (exclusive) and before end (inclusive)", () => { // January 2014 // Su Mo Tu We Th Fr Sa // 1 2 3 4 @@ -41,7 +41,7 @@ test("utcTuesday.count(start, end) counts Tuesdays after start (exclusive) and b assert.strictEqual(utcTuesday.count(utc(2013, 0, 1), utc(2013, 0, 9)), 1); }); -test("utcTuesday.count(start, end) does not observe daylight saving", () => { +it("utcTuesday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcTuesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcTuesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcTuesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcWednesday-test.js b/test/utcWednesday-test.js index a24d577..b4f5aed 100644 --- a/test/utcWednesday-test.js +++ b/test/utcWednesday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcWednesday, utcWednesdays} from "../src/index.js"; import {utc} from "./date.js"; -test("utcWednesdays in an alias for utcWednesday.range", () => { +it("utcWednesdays in an alias for utcWednesday.range", () => { assert.strictEqual(utcWednesdays, utcWednesday.range); }); -test("utcWednesday.floor(date) returns Wednesdays", () => { +it("utcWednesday.floor(date) returns Wednesdays", () => { assert.deepStrictEqual(utcWednesday.floor(utc(2011, 0, 3, 23, 59, 59)), utc(2010, 11, 29)); assert.deepStrictEqual(utcWednesday.floor(utc(2011, 0, 4, 0, 0, 0)), utc(2010, 11, 29)); assert.deepStrictEqual(utcWednesday.floor(utc(2011, 0, 4, 0, 0, 1)), utc(2010, 11, 29)); @@ -16,7 +16,7 @@ test("utcWednesday.floor(date) returns Wednesdays", () => { assert.deepStrictEqual(utcWednesday.floor(utc(2011, 0, 5, 0, 0, 1)), utc(2011, 0, 5)); }); -test("utcWednesday.count(start, end) counts Wednesdays after start (exclusive) and before end (inclusive)", () => { +it("utcWednesday.count(start, end) counts Wednesdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -41,7 +41,7 @@ test("utcWednesday.count(start, end) counts Wednesdays after start (exclusive) a assert.strictEqual(utcWednesday.count(utc(2014, 0, 1), utc(2014, 0, 9)), 1); }); -test("utcWednesday.count(start, end) does not observe daylight saving", () => { +it("utcWednesday.count(start, end) does not observe daylight saving", () => { assert.strictEqual(utcWednesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 1)), 10); assert.strictEqual(utcWednesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 3)), 10); assert.strictEqual(utcWednesday.count(utc(2011, 0, 1), utc(2011, 2, 13, 4)), 10); diff --git a/test/utcWeek-test.js b/test/utcWeek-test.js index 7632f2e..faa5fa3 100644 --- a/test/utcWeek-test.js +++ b/test/utcWeek-test.js @@ -1,9 +1,9 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcSunday, utcWeek} from "../src/index.js"; import {utc} from "./date.js"; -test("utcWeek.floor(date) returns sundays", () => { +it("utcWeek.floor(date) returns sundays", () => { assert.deepStrictEqual(utcWeek.floor(utc(2010, 11, 31, 23, 59, 59)), utc(2010, 11, 26)); assert.deepStrictEqual(utcWeek.floor(utc(2011, 0, 1, 0, 0, 0)), utc(2010, 11, 26)); assert.deepStrictEqual(utcWeek.floor(utc(2011, 0, 1, 0, 0, 1)), utc(2010, 11, 26)); @@ -12,19 +12,19 @@ test("utcWeek.floor(date) returns sundays", () => { assert.deepStrictEqual(utcWeek.floor(utc(2011, 0, 2, 0, 0, 1)), utc(2011, 0, 2)); }); -test("utcWeek.floor(date) observes the start of daylight savings time", () => { +it("utcWeek.floor(date) observes the start of daylight savings time", () => { assert.deepStrictEqual(utcWeek.floor(utc(2011, 2, 13, 1)), utc(2011, 2, 13)); }); -test("utcWeek.floor(date) observes the end of the daylight savings time", () => { +it("utcWeek.floor(date) observes the end of the daylight savings time", () => { assert.deepStrictEqual(utcWeek.floor(utc(2011, 10, 6, 1)), utc(2011, 10, 6)); }); -test("utcWeek.floor(date) correctly handles years in the first century", () => { +it("utcWeek.floor(date) correctly handles years in the first century", () => { assert.deepStrictEqual(utcWeek.floor(utc(9, 10, 6, 7)), utc(9, 10, 1)); }); -test("utcWeek.ceil(date) returns sundays", () => { +it("utcWeek.ceil(date) returns sundays", () => { assert.deepStrictEqual(utcWeek.ceil(utc(2010, 11, 31, 23, 59, 59)), utc(2011, 0, 2)); assert.deepStrictEqual(utcWeek.ceil(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 2)); assert.deepStrictEqual(utcWeek.ceil(utc(2011, 0, 1, 0, 0, 1)), utc(2011, 0, 2)); @@ -33,43 +33,43 @@ test("utcWeek.ceil(date) returns sundays", () => { assert.deepStrictEqual(utcWeek.ceil(utc(2011, 0, 2, 0, 0, 1)), utc(2011, 0, 9)); }); -test("utcWeek.ceil(date) does not observe the start of daylight savings time", () => { +it("utcWeek.ceil(date) does not observe the start of daylight savings time", () => { assert.deepStrictEqual(utcWeek.ceil(utc(2011, 2, 13, 1)), utc(2011, 2, 20)); }); -test("utcWeek.ceil(date) does not observe the end of the daylight savings time", () => { +it("utcWeek.ceil(date) does not observe the end of the daylight savings time", () => { assert.deepStrictEqual(utcWeek.ceil(utc(2011, 10, 6, 1)), utc(2011, 10, 13)); }); -test("utcWeek.offset(date, step) does not modify the passed-in date", () => { +it("utcWeek.offset(date, step) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcWeek.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -test("utcWeek.offset(date, step) does not round the passed-in-date", () => { +it("utcWeek.offset(date, step) does not round the passed-in-date", () => { assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 0, 7, 23, 59, 59, 999)); assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2010, 11, 17, 23, 59, 59, 456)); }); -test("utcWeek.offset(date, step) allows negative offsets", () => { +it("utcWeek.offset(date, step) allows negative offsets", () => { assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 1), -1), utc(2010, 10, 24)); assert.deepStrictEqual(utcWeek.offset(utc(2011, 0, 1), -2), utc(2010, 11, 18)); assert.deepStrictEqual(utcWeek.offset(utc(2011, 0, 1), -1), utc(2010, 11, 25)); }); -test("utcWeek.offset(date, step) allows positive offsets", () => { +it("utcWeek.offset(date, step) allows positive offsets", () => { assert.deepStrictEqual(utcWeek.offset(utc(2010, 10, 24), +1), utc(2010, 11, 1)); assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 18), +2), utc(2011, 0, 1)); assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 25), +1), utc(2011, 0, 1)); }); -test("utcWeek.offset(date, step) allows zero offset", () => { +it("utcWeek.offset(date, step) allows zero offset", () => { assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcWeek.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -test("utcWeek.range(start, stop) returns sundays", () => { +it("utcWeek.range(start, stop) returns sundays", () => { assert.deepStrictEqual(utcWeek.range(utc(2010, 11, 21), utc(2011, 0, 12)), [ utc(2010, 11, 26), utc(2011, 0, 2), @@ -77,15 +77,15 @@ test("utcWeek.range(start, stop) returns sundays", () => { ]); }); -test("utcWeek.range(start, stop) has an inclusive lower bound", () => { +it("utcWeek.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(utcWeek.range(utc(2010, 11, 21), utc(2011, 0, 12))[0], utc(2010, 11, 26)); }); -test("utcWeek.range(start, stop) has an exclusive upper bound", () => { +it("utcWeek.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(utcWeek.range(utc(2010, 11, 21), utc(2011, 0, 12))[2], utc(2011, 0, 9)); }); -test("utcWeek.range(start, stop) can skip weeks", () => { +it("utcWeek.range(start, stop) can skip weeks", () => { assert.deepStrictEqual(utcWeek.range(utc(2011, 0, 1), utc(2011, 3, 1), 4), [ utc(2011, 0, 2), utc(2011, 0, 30), @@ -94,7 +94,7 @@ test("utcWeek.range(start, stop) can skip weeks", () => { ]); }); -test("utcWeek.range(start, stop) does not observe start of daylight savings time", () => { +it("utcWeek.range(start, stop) does not observe start of daylight savings time", () => { assert.deepStrictEqual(utcWeek.range(utc(2011, 2, 1), utc(2011, 2, 28)), [ utc(2011, 2, 6), utc(2011, 2, 13), @@ -103,7 +103,7 @@ test("utcWeek.range(start, stop) does not observe start of daylight savings time ]); }); -test("utcWeek.range(start, stop) does not observe end of daylight savings time", () => { +it("utcWeek.range(start, stop) does not observe end of daylight savings time", () => { assert.deepStrictEqual(utcWeek.range(utc(2011, 10, 1), utc(2011, 10, 30)), [ utc(2011, 10, 6), utc(2011, 10, 13), @@ -112,10 +112,10 @@ test("utcWeek.range(start, stop) does not observe end of daylight savings time", ]); }); -test("utcWeek is an alias for utcSunday", () => { +it("utcWeek is an alias for utcSunday", () => { assert.strictEqual(utcWeek, utcSunday); }); -test("utcWeek.every(step) returns every stepth Sunday, starting with the first Sunday of the month", () => { +it("utcWeek.every(step) returns every stepth Sunday, starting with the first Sunday of the month", () => { assert.deepStrictEqual(utcWeek.every(2).range(utc(2008, 11, 3), utc(2009, 1, 5)), [utc(2008, 11, 7), utc(2008, 11, 21), utc(2009, 0, 4), utc(2009, 0, 18), utc(2009, 1, 1)]); }); diff --git a/test/utcYear-test.js b/test/utcYear-test.js index 56583b6..abb8f5d 100644 --- a/test/utcYear-test.js +++ b/test/utcYear-test.js @@ -1,63 +1,63 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {utcYear} from "../src/index.js"; import {utc} from "./date.js"; -test("utcYear.floor(date) returns years", () => { +it("utcYear.floor(date) returns years", () => { assert.deepStrictEqual(utcYear.floor(utc(2010, 11, 31, 23, 59, 59)), utc(2010, 0, 1)); assert.deepStrictEqual(utcYear.floor(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(utcYear.floor(utc(2011, 0, 1, 0, 0, 1)), utc(2011, 0, 1)); }); -test("utcYear.floor(date) does not modify the specified date", () => { +it("utcYear.floor(date) does not modify the specified date", () => { const d = utc(2010, 11, 31, 23, 59, 59); assert.deepStrictEqual(utcYear.floor(d), utc(2010, 0, 1)); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59)); }); -test("utcYear.floor(date) correctly handles years in the first century", () => { +it("utcYear.floor(date) correctly handles years in the first century", () => { assert.deepStrictEqual(utcYear.floor(utc(9, 10, 6, 7)), utc(9, 0, 1)); }); -test("utcYear.ceil(date) returns years", () => { +it("utcYear.ceil(date) returns years", () => { assert.deepStrictEqual(utcYear.ceil(utc(2010, 11, 31, 23, 59, 59)), utc(2011, 0, 1)); assert.deepStrictEqual(utcYear.ceil(utc(2011, 0, 1, 0, 0, 0)), utc(2011, 0, 1)); assert.deepStrictEqual(utcYear.ceil(utc(2011, 0, 1, 0, 0, 1)), utc(2012, 0, 1)); }); -test("utcYear.offset(date, count) does not modify the passed-in date", () => { +it("utcYear.offset(date, count) does not modify the passed-in date", () => { const d = utc(2010, 11, 31, 23, 59, 59, 999); utcYear.offset(d, +1); assert.deepStrictEqual(d, utc(2010, 11, 31, 23, 59, 59, 999)); }); -test("utcYear.offset(date, count) does not round the passed-in-date", () => { +it("utcYear.offset(date, count) does not round the passed-in-date", () => { assert.deepStrictEqual(utcYear.offset(utc(2010, 11, 31, 23, 59, 59, 999), +1), utc(2011, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcYear.offset(utc(2010, 11, 31, 23, 59, 59, 456), -2), utc(2008, 11, 31, 23, 59, 59, 456)); }); -test("utcYear.offset(date, count) allows negative offsets", () => { +it("utcYear.offset(date, count) allows negative offsets", () => { assert.deepStrictEqual(utcYear.offset(utc(2010, 11, 1), -1), utc(2009, 11, 1)); assert.deepStrictEqual(utcYear.offset(utc(2011, 0, 1), -2), utc(2009, 0, 1)); assert.deepStrictEqual(utcYear.offset(utc(2011, 0, 1), -1), utc(2010, 0, 1)); }); -test("utcYear.offset(date, count) allows positive offsets", () => { +it("utcYear.offset(date, count) allows positive offsets", () => { assert.deepStrictEqual(utcYear.offset(utc(2009, 11, 1), +1), utc(2010, 11, 1)); assert.deepStrictEqual(utcYear.offset(utc(2009, 0, 1), +2), utc(2011, 0, 1)); assert.deepStrictEqual(utcYear.offset(utc(2010, 0, 1), +1), utc(2011, 0, 1)); }); -test("utcYear.offset(date, count) allows zero offset", () => { +it("utcYear.offset(date, count) allows zero offset", () => { assert.deepStrictEqual(utcYear.offset(utc(2010, 11, 31, 23, 59, 59, 999), 0), utc(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(utcYear.offset(utc(2010, 11, 31, 23, 59, 58, 0), 0), utc(2010, 11, 31, 23, 59, 58, 0)); }); -test("utcYear.every(step) returns every stepth year, starting with year zero", () => { +it("utcYear.every(step) returns every stepth year, starting with year zero", () => { assert.deepStrictEqual(utcYear.every(5).range(utc(2008), utc(2023)), [utc(2010), utc(2015), utc(2020)]); }); -test("utcYear.range(start, stop) returns years", () => { +it("utcYear.range(start, stop) returns years", () => { assert.deepStrictEqual(utcYear.range(utc(2010, 0, 1), utc(2013, 0, 1)), [ utc(2010, 0, 1), utc(2011, 0, 1), @@ -65,15 +65,15 @@ test("utcYear.range(start, stop) returns years", () => { ]); }); -test("utcYear.range(start, stop) has an inclusive lower bound", () => { +it("utcYear.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(utcYear.range(utc(2010, 0, 1), utc(2013, 0, 1))[0], utc(2010, 0, 1)); }); -test("utcYear.range(start, stop) has an exclusive upper bound", () => { +it("utcYear.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(utcYear.range(utc(2010, 0, 1), utc(2013, 0, 1))[2], utc(2012, 0, 1)); }); -test("utcYear.range(start, stop, step) can skip years", () => { +it("utcYear.range(start, stop, step) can skip years", () => { assert.deepStrictEqual(utcYear.range(utc(2009, 0, 1), utc(2029, 0, 1), 5), [ utc(2009, 0, 1), utc(2014, 0, 1), diff --git a/test/wednesday-test.js b/test/wednesday-test.js index 3e28588..49980b5 100644 --- a/test/wednesday-test.js +++ b/test/wednesday-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {local} from "./date.js"; import {timeWednesday, timeWednesdays} from "../src/index.js"; -test("timeWednesdays in an alias for timeWednesday.range", () => { +it("timeWednesdays in an alias for timeWednesday.range", () => { assert.strictEqual(timeWednesdays, timeWednesday.range); }); -test("timeWednesday.floor(date) returns Wednesdays", () => { +it("timeWednesday.floor(date) returns Wednesdays", () => { assert.deepStrictEqual(timeWednesday.floor(local(2011, 0, 3, 23, 59, 59)), local(2010, 11, 29)); assert.deepStrictEqual(timeWednesday.floor(local(2011, 0, 4, 0, 0, 0)), local(2010, 11, 29)); assert.deepStrictEqual(timeWednesday.floor(local(2011, 0, 4, 0, 0, 1)), local(2010, 11, 29)); @@ -16,7 +16,7 @@ test("timeWednesday.floor(date) returns Wednesdays", () => { assert.deepStrictEqual(timeWednesday.floor(local(2011, 0, 5, 0, 0, 1)), local(2011, 0, 5)); }); -test("timeWednesday.count(start, end) counts Wednesdays after start (exclusive) and before end (inclusive)", () => { +it("timeWednesday.count(start, end) counts Wednesdays after start (exclusive) and before end (inclusive)", () => { // January 2012 // Su Mo Tu We Th Fr Sa // 1 2 3 4 5 6 7 @@ -41,7 +41,7 @@ test("timeWednesday.count(start, end) counts Wednesdays after start (exclusive) assert.strictEqual(timeWednesday.count(local(2014, 0, 1), local(2014, 0, 9)), 1); }); -test("timeWednesday.count(start, end) observes daylight saving", () => { +it("timeWednesday.count(start, end) observes daylight saving", () => { assert.strictEqual(timeWednesday.count(local(2011, 0, 1), local(2011, 2, 13, 1)), 10); assert.strictEqual(timeWednesday.count(local(2011, 0, 1), local(2011, 2, 13, 3)), 10); assert.strictEqual(timeWednesday.count(local(2011, 0, 1), local(2011, 2, 13, 4)), 10); diff --git a/test/week-test.js b/test/week-test.js index 6480445..93fb430 100644 --- a/test/week-test.js +++ b/test/week-test.js @@ -1,9 +1,9 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeSunday, timeWeek} from "../src/index.js"; import {local} from "./date.js"; -test("timeWeek.floor(date) returns sundays", () => { +it("timeWeek.floor(date) returns sundays", () => { assert.deepStrictEqual(timeWeek.floor(local(2010, 11, 31, 23, 59, 59)), local(2010, 11, 26)); assert.deepStrictEqual(timeWeek.floor(local(2011, 0, 1, 0, 0, 0)), local(2010, 11, 26)); assert.deepStrictEqual(timeWeek.floor(local(2011, 0, 1, 0, 0, 1)), local(2010, 11, 26)); @@ -12,19 +12,19 @@ test("timeWeek.floor(date) returns sundays", () => { assert.deepStrictEqual(timeWeek.floor(local(2011, 0, 2, 0, 0, 1)), local(2011, 0, 2)); }); -test("timeWeek.floor(date) observes the start of daylight savings time", () => { +it("timeWeek.floor(date) observes the start of daylight savings time", () => { assert.deepStrictEqual(timeWeek.floor(local(2011, 2, 13, 1)), local(2011, 2, 13)); }); -test("timeWeek.floor(date) observes the end of the daylight savings time", () => { +it("timeWeek.floor(date) observes the end of the daylight savings time", () => { assert.deepStrictEqual(timeWeek.floor(local(2011, 10, 6, 1)), local(2011, 10, 6)); }); -test("timeWeek.floor(date) correctly handles years in the first century", () => { +it("timeWeek.floor(date) correctly handles years in the first century", () => { assert.deepStrictEqual(timeWeek.floor(local(9, 10, 6, 7)), local(9, 10, 1)); }); -test("timeWeek.ceil(date) returns sundays", () => { +it("timeWeek.ceil(date) returns sundays", () => { assert.deepStrictEqual(timeWeek.ceil(local(2010, 11, 31, 23, 59, 59)), local(2011, 0, 2)); assert.deepStrictEqual(timeWeek.ceil(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 2)); assert.deepStrictEqual(timeWeek.ceil(local(2011, 0, 1, 0, 0, 1)), local(2011, 0, 2)); @@ -33,43 +33,43 @@ test("timeWeek.ceil(date) returns sundays", () => { assert.deepStrictEqual(timeWeek.ceil(local(2011, 0, 2, 0, 0, 1)), local(2011, 0, 9)); }); -test("timeWeek.ceil(date) observes the start of daylight savings time", () => { +it("timeWeek.ceil(date) observes the start of daylight savings time", () => { assert.deepStrictEqual(timeWeek.ceil(local(2011, 2, 13, 1)), local(2011, 2, 20)); }); -test("timeWeek.ceil(date) observes the end of the daylight savings time", () => { +it("timeWeek.ceil(date) observes the end of the daylight savings time", () => { assert.deepStrictEqual(timeWeek.ceil(local(2011, 10, 6, 1)), local(2011, 10, 13)); }); -test("timeWeek.offset(date, step) does not modify the passed-in date", () => { +it("timeWeek.offset(date, step) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeWeek.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -test("timeWeek.offset(date, step) does not round the passed-in-date", () => { +it("timeWeek.offset(date, step) does not round the passed-in-date", () => { assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 0, 7, 23, 59, 59, 999)); assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2010, 11, 17, 23, 59, 59, 456)); }); -test("timeWeek.offset(date, step) allows negative offsets", () => { +it("timeWeek.offset(date, step) allows negative offsets", () => { assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 1), -1), local(2010, 10, 24)); assert.deepStrictEqual(timeWeek.offset(local(2011, 0, 1), -2), local(2010, 11, 18)); assert.deepStrictEqual(timeWeek.offset(local(2011, 0, 1), -1), local(2010, 11, 25)); }); -test("timeWeek.offset(date, step) allows positive offsets", () => { +it("timeWeek.offset(date, step) allows positive offsets", () => { assert.deepStrictEqual(timeWeek.offset(local(2010, 10, 24), +1), local(2010, 11, 1)); assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 18), +2), local(2011, 0, 1)); assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 25), +1), local(2011, 0, 1)); }); -test("timeWeek.offset(date, step) allows zero offset", () => { +it("timeWeek.offset(date, step) allows zero offset", () => { assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeWeek.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -test("timeWeek.range(start, stop) returns sundays", () => { +it("timeWeek.range(start, stop) returns sundays", () => { assert.deepStrictEqual(timeWeek.range(local(2010, 11, 21), local(2011, 0, 12)), [ local(2010, 11, 26), local(2011, 0, 2), @@ -77,15 +77,15 @@ test("timeWeek.range(start, stop) returns sundays", () => { ]); }); -test("timeWeek.range(start, stop) has an inclusive lower bound", () => { +it("timeWeek.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(timeWeek.range(local(2010, 11, 21), local(2011, 0, 12))[0], local(2010, 11, 26)); }); -test("timeWeek.range(start, stop) has an exclusive upper bound", () => { +it("timeWeek.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(timeWeek.range(local(2010, 11, 21), local(2011, 0, 12))[2], local(2011, 0, 9)); }); -test("timeWeek.range(start, stop) can skip weeks", () => { +it("timeWeek.range(start, stop) can skip weeks", () => { assert.deepStrictEqual(timeWeek.range(local(2011, 0, 1), local(2011, 3, 1), 4), [ local(2011, 0, 2), local(2011, 0, 30), @@ -94,7 +94,7 @@ test("timeWeek.range(start, stop) can skip weeks", () => { ]); }); -test("timeWeek.range(start, stop) observes start of daylight savings time", () => { +it("timeWeek.range(start, stop) observes start of daylight savings time", () => { assert.deepStrictEqual(timeWeek.range(local(2011, 2, 1), local(2011, 2, 28)), [ local(2011, 2, 6), local(2011, 2, 13), @@ -103,7 +103,7 @@ test("timeWeek.range(start, stop) observes start of daylight savings time", () = ]); }); -test("timeWeek.range(start, stop) observes end of daylight savings time", () => { +it("timeWeek.range(start, stop) observes end of daylight savings time", () => { assert.deepStrictEqual(timeWeek.range(local(2011, 10, 1), local(2011, 10, 30)), [ local(2011, 10, 6), local(2011, 10, 13), @@ -112,10 +112,10 @@ test("timeWeek.range(start, stop) observes end of daylight savings time", () => ]); }); -test("timeWeek is an alias for timeSunday", () => { +it("timeWeek is an alias for timeSunday", () => { assert.strictEqual(timeWeek, timeSunday); }); -test("timeWeek.every(step) returns every stepth Sunday, starting with the first Sunday of the month", () => { +it("timeWeek.every(step) returns every stepth Sunday, starting with the first Sunday of the month", () => { assert.deepStrictEqual(timeWeek.every(2).range(local(2008, 11, 3), local(2009, 1, 5)), [local(2008, 11, 7), local(2008, 11, 21), local(2009, 0, 4), local(2009, 0, 18), local(2009, 1, 1)]); }); diff --git a/test/year-test.js b/test/year-test.js index 160684a..c023e30 100644 --- a/test/year-test.js +++ b/test/year-test.js @@ -1,63 +1,63 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {timeYear} from "../src/index.js"; import {local} from "./date.js"; -test("timeYear.floor(date) returns years", () => { +it("timeYear.floor(date) returns years", () => { assert.deepStrictEqual(timeYear.floor(local(2010, 11, 31, 23, 59, 59)), local(2010, 0, 1)); assert.deepStrictEqual(timeYear.floor(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeYear.floor(local(2011, 0, 1, 0, 0, 1)), local(2011, 0, 1)); }); -test("timeYear.floor(date) does not modify the specified date", () => { +it("timeYear.floor(date) does not modify the specified date", () => { const d = local(2010, 11, 31, 23, 59, 59); assert.deepStrictEqual(timeYear.floor(d), local(2010, 0, 1)); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59)); }); -test("timeYear.floor(date) correctly handles years in the first century", () => { +it("timeYear.floor(date) correctly handles years in the first century", () => { assert.deepStrictEqual(timeYear.floor(local(9, 10, 6, 7)), local(9, 0, 1)); }); -test("timeYear.ceil(date) returns years", () => { +it("timeYear.ceil(date) returns years", () => { assert.deepStrictEqual(timeYear.ceil(local(2010, 11, 31, 23, 59, 59)), local(2011, 0, 1)); assert.deepStrictEqual(timeYear.ceil(local(2011, 0, 1, 0, 0, 0)), local(2011, 0, 1)); assert.deepStrictEqual(timeYear.ceil(local(2011, 0, 1, 0, 0, 1)), local(2012, 0, 1)); }); -test("timeYear.offset(date, count) does not modify the passed-in date", () => { +it("timeYear.offset(date, count) does not modify the passed-in date", () => { const d = local(2010, 11, 31, 23, 59, 59, 999); timeYear.offset(d, +1); assert.deepStrictEqual(d, local(2010, 11, 31, 23, 59, 59, 999)); }); -test("timeYear.offset(date, count) does not round the passed-in-date", () => { +it("timeYear.offset(date, count) does not round the passed-in-date", () => { assert.deepStrictEqual(timeYear.offset(local(2010, 11, 31, 23, 59, 59, 999), +1), local(2011, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeYear.offset(local(2010, 11, 31, 23, 59, 59, 456), -2), local(2008, 11, 31, 23, 59, 59, 456)); }); -test("timeYear.offset(date, count) allows negative offsets", () => { +it("timeYear.offset(date, count) allows negative offsets", () => { assert.deepStrictEqual(timeYear.offset(local(2010, 11, 1), -1), local(2009, 11, 1)); assert.deepStrictEqual(timeYear.offset(local(2011, 0, 1), -2), local(2009, 0, 1)); assert.deepStrictEqual(timeYear.offset(local(2011, 0, 1), -1), local(2010, 0, 1)); }); -test("timeYear.offset(date, count) allows positive offsets", () => { +it("timeYear.offset(date, count) allows positive offsets", () => { assert.deepStrictEqual(timeYear.offset(local(2009, 11, 1), +1), local(2010, 11, 1)); assert.deepStrictEqual(timeYear.offset(local(2009, 0, 1), +2), local(2011, 0, 1)); assert.deepStrictEqual(timeYear.offset(local(2010, 0, 1), +1), local(2011, 0, 1)); }); -test("timeYear.offset(date, count) allows zero offset", () => { +it("timeYear.offset(date, count) allows zero offset", () => { assert.deepStrictEqual(timeYear.offset(local(2010, 11, 31, 23, 59, 59, 999), 0), local(2010, 11, 31, 23, 59, 59, 999)); assert.deepStrictEqual(timeYear.offset(local(2010, 11, 31, 23, 59, 58, 0), 0), local(2010, 11, 31, 23, 59, 58, 0)); }); -test("timeYear.every(step) returns every stepth year, starting with year zero", () => { +it("timeYear.every(step) returns every stepth year, starting with year zero", () => { assert.deepStrictEqual(timeYear.every(5).range(local(2008), local(2023)), [local(2010), local(2015), local(2020)]); }); -test("timeYear.range(start, stop) returns years", () => { +it("timeYear.range(start, stop) returns years", () => { assert.deepStrictEqual(timeYear.range(local(2010, 0, 1), local(2013, 0, 1)), [ local(2010, 0, 1), local(2011, 0, 1), @@ -65,15 +65,15 @@ test("timeYear.range(start, stop) returns years", () => { ]); }); -test("timeYear.range(start, stop) has an inclusive lower bound", () => { +it("timeYear.range(start, stop) has an inclusive lower bound", () => { assert.deepStrictEqual(timeYear.range(local(2010, 0, 1), local(2013, 0, 1))[0], local(2010, 0, 1)); }); -test("timeYear.range(start, stop) has an exclusive upper bound", () => { +it("timeYear.range(start, stop) has an exclusive upper bound", () => { assert.deepStrictEqual(timeYear.range(local(2010, 0, 1), local(2013, 0, 1))[2], local(2012, 0, 1)); }); -test("timeYear.range(start, stop, step) can skip years", () => { +it("timeYear.range(start, stop, step) can skip years", () => { assert.deepStrictEqual(timeYear.range(local(2009, 0, 1), local(2029, 0, 1), 5), [ local(2009, 0, 1), local(2014, 0, 1), From 327d391d3eddbd51be35af308bcfaf9e1b5792bb Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:31:38 -0800 Subject: [PATCH 5/9] node: imports Co-Authored-By: Claude Opus 5.5 --- test/day-test.js | 2 +- test/friday-test.js | 2 +- test/hour-test.js | 2 +- test/interval-test.js | 2 +- test/millisecond-test.js | 2 +- test/minute-test.js | 2 +- test/monday-test.js | 2 +- test/month-test.js | 2 +- test/multiYear-test.js | 2 +- test/saturday-test.js | 2 +- test/second-test.js | 2 +- test/sunday-test.js | 2 +- test/thursday-test.js | 2 +- test/ticks-test.js | 2 +- test/tuesday-test.js | 2 +- test/unixDay-test.js | 2 +- test/utcDay-test.js | 2 +- test/utcFriday-test.js | 2 +- test/utcHour-test.js | 2 +- test/utcMillisecond-test.js | 2 +- test/utcMinute-test.js | 2 +- test/utcMonday-test.js | 2 +- test/utcMonth-test.js | 2 +- test/utcMultiYear-test.js | 2 +- test/utcSaturday-test.js | 2 +- test/utcSecond-test.js | 2 +- test/utcSunday-test.js | 2 +- test/utcThursday-test.js | 2 +- test/utcTicks-test.js | 2 +- test/utcTuesday-test.js | 2 +- test/utcWednesday-test.js | 2 +- test/utcWeek-test.js | 2 +- test/utcYear-test.js | 2 +- test/wednesday-test.js | 2 +- test/week-test.js | 2 +- test/year-test.js | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) diff --git a/test/day-test.js b/test/day-test.js index 5d8fefb..49ea77a 100644 --- a/test/day-test.js +++ b/test/day-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeDay, timeDays, timeYear} from "../src/index.js"; import {local, utc} from "./date.js"; diff --git a/test/friday-test.js b/test/friday-test.js index 42ec309..9c42744 100644 --- a/test/friday-test.js +++ b/test/friday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeFriday, timeFridays} from "../src/index.js"; import {local} from "./date.js"; diff --git a/test/hour-test.js b/test/hour-test.js index 7471022..810ddde 100644 --- a/test/hour-test.js +++ b/test/hour-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeHour} from "../src/index.js"; import {local, utc} from "./date.js"; diff --git a/test/interval-test.js b/test/interval-test.js index 787b116..deb575b 100644 --- a/test/interval-test.js +++ b/test/interval-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeDay, timeHour, timeInterval, timeMinute, timeSecond, timeYear} from "../src/index.js"; import {local, utc} from "./date.js"; diff --git a/test/millisecond-test.js b/test/millisecond-test.js index 4af8d5c..62a3a04 100644 --- a/test/millisecond-test.js +++ b/test/millisecond-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeMillisecond} from "../src/index.js"; import {local, utc} from "./date.js"; diff --git a/test/minute-test.js b/test/minute-test.js index 92812d7..d907e5e 100644 --- a/test/minute-test.js +++ b/test/minute-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeMinute} from "../src/index.js"; import {local, utc} from "./date.js"; diff --git a/test/monday-test.js b/test/monday-test.js index 29b7ef4..6c5fdd6 100644 --- a/test/monday-test.js +++ b/test/monday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeMonday, timeMondays} from "../src/index.js"; import {local} from "./date.js"; diff --git a/test/month-test.js b/test/month-test.js index ea02304..4666ebc 100644 --- a/test/month-test.js +++ b/test/month-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeMonth, timeMonths} from "../src/index.js"; import {local, utc} from "./date.js"; diff --git a/test/multiYear-test.js b/test/multiYear-test.js index d5721f7..e751ef5 100644 --- a/test/multiYear-test.js +++ b/test/multiYear-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeYear} from "../src/index.js"; import {local} from "./date.js"; diff --git a/test/saturday-test.js b/test/saturday-test.js index 9a19ab9..d6987e9 100644 --- a/test/saturday-test.js +++ b/test/saturday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeSaturday, timeSaturdays} from "../src/index.js"; import {local} from "./date.js"; diff --git a/test/second-test.js b/test/second-test.js index 633ea33..f90a962 100644 --- a/test/second-test.js +++ b/test/second-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeSecond} from "../src/index.js"; import {local, utc} from "./date.js"; diff --git a/test/sunday-test.js b/test/sunday-test.js index 7584764..82d4497 100644 --- a/test/sunday-test.js +++ b/test/sunday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeSunday, timeSundays} from "../src/index.js"; import {local} from "./date.js"; diff --git a/test/thursday-test.js b/test/thursday-test.js index 7bd3064..74ec1df 100644 --- a/test/thursday-test.js +++ b/test/thursday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeThursday, timeThursdays} from "../src/index.js"; import {local} from "./date.js"; diff --git a/test/ticks-test.js b/test/ticks-test.js index 5e479bf..89a6c96 100644 --- a/test/ticks-test.js +++ b/test/ticks-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeMinute, timeTicks} from "../src/index.js"; import {local} from "./date.js"; diff --git a/test/tuesday-test.js b/test/tuesday-test.js index 5dd1420..18ce418 100644 --- a/test/tuesday-test.js +++ b/test/tuesday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeTuesday, timeTuesdays} from "../src/index.js"; import {local} from "./date.js"; diff --git a/test/unixDay-test.js b/test/unixDay-test.js index e792c41..90122f1 100644 --- a/test/unixDay-test.js +++ b/test/unixDay-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {unixDay, unixDays} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcDay-test.js b/test/utcDay-test.js index f650781..839b1ca 100644 --- a/test/utcDay-test.js +++ b/test/utcDay-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcDay, utcDays} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcFriday-test.js b/test/utcFriday-test.js index 33375b8..0390f6c 100644 --- a/test/utcFriday-test.js +++ b/test/utcFriday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcFriday, utcFridays} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcHour-test.js b/test/utcHour-test.js index 46240a0..645465d 100644 --- a/test/utcHour-test.js +++ b/test/utcHour-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcHour} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcMillisecond-test.js b/test/utcMillisecond-test.js index 7b73eed..c0a471e 100644 --- a/test/utcMillisecond-test.js +++ b/test/utcMillisecond-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeMillisecond, utcMillisecond} from "../src/index.js"; it("utcMillisecond is an alias for timeMillisecond", () => { diff --git a/test/utcMinute-test.js b/test/utcMinute-test.js index 606f5b3..0d8c1ac 100644 --- a/test/utcMinute-test.js +++ b/test/utcMinute-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcMinute} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcMonday-test.js b/test/utcMonday-test.js index 6c1fedf..5a4329e 100644 --- a/test/utcMonday-test.js +++ b/test/utcMonday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcMonday, utcMondays} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcMonth-test.js b/test/utcMonth-test.js index 03bb335..9f4c127 100644 --- a/test/utcMonth-test.js +++ b/test/utcMonth-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcMonth, utcMonths} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcMultiYear-test.js b/test/utcMultiYear-test.js index 8b3cc38..bd908c4 100644 --- a/test/utcMultiYear-test.js +++ b/test/utcMultiYear-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcYear} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcSaturday-test.js b/test/utcSaturday-test.js index 6840587..72dfc0c 100644 --- a/test/utcSaturday-test.js +++ b/test/utcSaturday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcSaturday, utcSaturdays} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcSecond-test.js b/test/utcSecond-test.js index d6f9ebc..294168d 100644 --- a/test/utcSecond-test.js +++ b/test/utcSecond-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcSecond} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcSunday-test.js b/test/utcSunday-test.js index 120ba4e..8c3273a 100644 --- a/test/utcSunday-test.js +++ b/test/utcSunday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcSunday, utcSundays} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcThursday-test.js b/test/utcThursday-test.js index 3dd45ed..d800af3 100644 --- a/test/utcThursday-test.js +++ b/test/utcThursday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utc} from "./date.js"; import {utcThursday, utcThursdays} from "../src/index.js"; diff --git a/test/utcTicks-test.js b/test/utcTicks-test.js index b175bb1..071907e 100644 --- a/test/utcTicks-test.js +++ b/test/utcTicks-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcMinute, utcTicks} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcTuesday-test.js b/test/utcTuesday-test.js index f7cedef..8954f96 100644 --- a/test/utcTuesday-test.js +++ b/test/utcTuesday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcTuesday, utcTuesdays} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcWednesday-test.js b/test/utcWednesday-test.js index b4f5aed..016932d 100644 --- a/test/utcWednesday-test.js +++ b/test/utcWednesday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcWednesday, utcWednesdays} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcWeek-test.js b/test/utcWeek-test.js index faa5fa3..e760713 100644 --- a/test/utcWeek-test.js +++ b/test/utcWeek-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcSunday, utcWeek} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/utcYear-test.js b/test/utcYear-test.js index abb8f5d..24ef56a 100644 --- a/test/utcYear-test.js +++ b/test/utcYear-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {utcYear} from "../src/index.js"; import {utc} from "./date.js"; diff --git a/test/wednesday-test.js b/test/wednesday-test.js index 49980b5..6467d21 100644 --- a/test/wednesday-test.js +++ b/test/wednesday-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {local} from "./date.js"; import {timeWednesday, timeWednesdays} from "../src/index.js"; diff --git a/test/week-test.js b/test/week-test.js index 93fb430..04993f2 100644 --- a/test/week-test.js +++ b/test/week-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeSunday, timeWeek} from "../src/index.js"; import {local} from "./date.js"; diff --git a/test/year-test.js b/test/year-test.js index c023e30..70b1d31 100644 --- a/test/year-test.js +++ b/test/year-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {timeYear} from "../src/index.js"; import {local} from "./date.js"; From 4e4ea872b46db0f34b5a63b4ba39c85de95f6993 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 19:00:12 -0800 Subject: [PATCH 6/9] eslint config Co-Authored-By: Claude Opus 5.5 --- eslint.config.js | 8 +++++--- package.json | 2 +- rollup.config.js | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 31d8a02..238008a 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -3,7 +3,9 @@ import globals from "globals"; import {defineConfig} from "eslint/config"; export default defineConfig([ - {files: ["**/*.{js,ts,jsx,tsx}"], plugins: {js}, extends: ["js/recommended"]}, - {files: ["**/*.{js,ts,jsx,tsx}"], languageOptions: {globals: globals.browser}}, - {languageOptions: {ecmaVersion: 2019, sourceType: "module"}} + {ignores: ["dist/"]}, + {files: ["**/*.{js,ts}"], plugins: {js}, extends: ["js/recommended"]}, + {files: ["**/*.{js,ts}"], languageOptions: {globals: globals.node}}, + {languageOptions: {ecmaVersion: 2019, sourceType: "module"}}, + {files: ["rollup.config.js"], languageOptions: {ecmaVersion: 2026}} ]); diff --git a/package.json b/package.json index e3af87e..a4b05e3 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "scripts": { "test": "TZ=America/Los_Angeles vitest", - "lint": "eslint src test", + "lint": "eslint", "prepublishOnly": "rm -rf dist && rollup -c" }, "engines": { diff --git a/rollup.config.js b/rollup.config.js index a13a979..d05a0a3 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -57,7 +57,7 @@ export default [ config({ output: { file: `dist/${meta.name}.js`, - format: "umd", + format: "umd" } }), config({ From c55dcf32cb4a1f74f60eab2982b25d83cff8ed0a Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 19:05:28 -0800 Subject: [PATCH 7/9] browser globals for src Co-Authored-By: Claude Opus 5.5 --- eslint.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index 238008a..cade4ac 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,7 +5,7 @@ import {defineConfig} from "eslint/config"; export default defineConfig([ {ignores: ["dist/"]}, {files: ["**/*.{js,ts}"], plugins: {js}, extends: ["js/recommended"]}, - {files: ["**/*.{js,ts}"], languageOptions: {globals: globals.node}}, + {files: ["src/**/*.{js,ts}"], languageOptions: {globals: globals.browser}}, {languageOptions: {ecmaVersion: 2019, sourceType: "module"}}, {files: ["rollup.config.js"], languageOptions: {ecmaVersion: 2026}} ]); From 19116f0c825fb6e449023d0d2e02a226b575a482 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 22:16:47 -0800 Subject: [PATCH 8/9] d3-time alias --- pnpm-lock.yaml | 8 ++-- test/day-test.js | 2 +- test/friday-test.js | 2 +- test/hour-test.js | 2 +- test/interval-test.js | 2 +- test/millisecond-test.js | 2 +- test/minute-test.js | 2 +- test/monday-test.js | 2 +- test/month-test.js | 2 +- test/multiYear-test.js | 2 +- test/saturday-test.js | 2 +- test/second-test.js | 2 +- test/sunday-test.js | 2 +- test/test-time-zones | 76 ++++++++++++++++++------------------- test/thursday-test.js | 2 +- test/ticks-test.js | 2 +- test/tuesday-test.js | 2 +- test/unixDay-test.js | 2 +- test/utcDay-test.js | 2 +- test/utcFriday-test.js | 2 +- test/utcHour-test.js | 2 +- test/utcMillisecond-test.js | 2 +- test/utcMinute-test.js | 2 +- test/utcMonday-test.js | 2 +- test/utcMonth-test.js | 2 +- test/utcMultiYear-test.js | 2 +- test/utcSaturday-test.js | 2 +- test/utcSecond-test.js | 2 +- test/utcSunday-test.js | 2 +- test/utcThursday-test.js | 2 +- test/utcTicks-test.js | 2 +- test/utcTuesday-test.js | 2 +- test/utcWednesday-test.js | 2 +- test/utcWeek-test.js | 2 +- test/utcYear-test.js | 2 +- test/wednesday-test.js | 2 +- test/week-test.js | 2 +- test/year-test.js | 2 +- vitest.config.js | 5 ++- 39 files changed, 82 insertions(+), 79 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 658462f..e630713 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: d3-array: specifier: 2 - 3 - version: 3.2.4 + version: 3.2.5 devDependencies: '@eslint/js': specifier: ^10.0.1 @@ -479,8 +479,8 @@ packages: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} - d3-array@3.2.4: - resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + d3-array@3.2.5: + resolution: {integrity: sha512-Th8qGXoBalmWsstpkuhmBuTsBQIFqYOJtjlBvNVvBfJ8E3uYusBUwUR8HU20U0qKKQkgCvKyR1YjiozWadk5QA==} engines: {node: '>=12'} debug@4.4.3: @@ -1305,7 +1305,7 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - d3-array@3.2.4: + d3-array@3.2.5: dependencies: internmap: 2.0.3 diff --git a/test/day-test.js b/test/day-test.js index 49ea77a..210fef9 100644 --- a/test/day-test.js +++ b/test/day-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeDay, timeDays, timeYear} from "../src/index.js"; +import {timeDay, timeDays, timeYear} from "d3-time"; import {local, utc} from "./date.js"; it("timeDays in an alias for timeDay.range", () => { diff --git a/test/friday-test.js b/test/friday-test.js index 9c42744..5250c18 100644 --- a/test/friday-test.js +++ b/test/friday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeFriday, timeFridays} from "../src/index.js"; +import {timeFriday, timeFridays} from "d3-time"; import {local} from "./date.js"; it("timeFridays in an alias for timeFriday.range", () => { diff --git a/test/hour-test.js b/test/hour-test.js index 810ddde..e528d82 100644 --- a/test/hour-test.js +++ b/test/hour-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeHour} from "../src/index.js"; +import {timeHour} from "d3-time"; import {local, utc} from "./date.js"; it("timeHour.floor(date) returns hours", () => { diff --git a/test/interval-test.js b/test/interval-test.js index deb575b..59476d0 100644 --- a/test/interval-test.js +++ b/test/interval-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeDay, timeHour, timeInterval, timeMinute, timeSecond, timeYear} from "../src/index.js"; +import {timeDay, timeHour, timeInterval, timeMinute, timeSecond, timeYear} from "d3-time"; import {local, utc} from "./date.js"; it("timeInterval() is equivalent to timeInterval.floor(new Date)", () => { diff --git a/test/millisecond-test.js b/test/millisecond-test.js index 62a3a04..dff4693 100644 --- a/test/millisecond-test.js +++ b/test/millisecond-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeMillisecond} from "../src/index.js"; +import {timeMillisecond} from "d3-time"; import {local, utc} from "./date.js"; it("timeMillisecond.every(step) returns every stepth millisecond, starting with the first millisecond of the second", () => { diff --git a/test/minute-test.js b/test/minute-test.js index d907e5e..bdcaccc 100644 --- a/test/minute-test.js +++ b/test/minute-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeMinute} from "../src/index.js"; +import {timeMinute} from "d3-time"; import {local, utc} from "./date.js"; it("timeMinute.floor(date) returns minutes", () => { diff --git a/test/monday-test.js b/test/monday-test.js index 6c5fdd6..7898ea7 100644 --- a/test/monday-test.js +++ b/test/monday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeMonday, timeMondays} from "../src/index.js"; +import {timeMonday, timeMondays} from "d3-time"; import {local} from "./date.js"; it("timeMondays in an alias for timeMonday.range", () => { diff --git a/test/month-test.js b/test/month-test.js index 4666ebc..b06c00c 100644 --- a/test/month-test.js +++ b/test/month-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeMonth, timeMonths} from "../src/index.js"; +import {timeMonth, timeMonths} from "d3-time"; import {local, utc} from "./date.js"; it("timeMonths in an alias for timeMonth.range", () => { diff --git a/test/multiYear-test.js b/test/multiYear-test.js index e751ef5..d5ed072 100644 --- a/test/multiYear-test.js +++ b/test/multiYear-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeYear} from "../src/index.js"; +import {timeYear} from "d3-time"; import {local} from "./date.js"; it("timeYear.every(n).floor(date) returns integer multiples of n years", () => { diff --git a/test/saturday-test.js b/test/saturday-test.js index d6987e9..ee9c0e4 100644 --- a/test/saturday-test.js +++ b/test/saturday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeSaturday, timeSaturdays} from "../src/index.js"; +import {timeSaturday, timeSaturdays} from "d3-time"; import {local} from "./date.js"; it("timeSaturdays in an alias for timeSaturday.range", () => { diff --git a/test/second-test.js b/test/second-test.js index f90a962..599b711 100644 --- a/test/second-test.js +++ b/test/second-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeSecond} from "../src/index.js"; +import {timeSecond} from "d3-time"; import {local, utc} from "./date.js"; it("timeSecond.floor(date) returns seconds", () => { diff --git a/test/sunday-test.js b/test/sunday-test.js index 82d4497..d67ac48 100644 --- a/test/sunday-test.js +++ b/test/sunday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeSunday, timeSundays} from "../src/index.js"; +import {timeSunday, timeSundays} from "d3-time"; import {local} from "./date.js"; it("timeSundays in an alias for timeSunday.range", () => { diff --git a/test/test-time-zones b/test/test-time-zones index c07d2e7..6b2cb18 100755 --- a/test/test-time-zones +++ b/test/test-time-zones @@ -10,41 +10,41 @@ function test() fi } -# [ "$(TZ=UTC+03:15 node -e 'import("./src/index.js").then(d3 => console.log(d3.timeHour.floor(new Date(1456279843199))))')" = "Tue Feb 23 2016 22:00:00 GMT-0315 (UTC)" ]; test $? "timeHour.floor with -:15 UTC offset" -# [ "$(TZ=UTC+03:15 node -e 'import("./src/index.js").then(d3 => console.log(d3.timeHour.ceil(new Date(1456279843199))))')" = "Tue Feb 23 2016 23:00:00 GMT-0315 (UTC)" ]; test $? "timeHour.ceil with -:15 UTC offset" -# [ "$(TZ=UTC+03:15 node -e 'import("./src/index.js").then(d3 => console.log(d3.timeHour.range(new Date(2011, 10, 7, 0), new Date(2011, 10, 7, 3)).join(",")))')" = "Mon Nov 07 2011 00:00:00 GMT-0315 (UTC),Mon Nov 07 2011 01:00:00 GMT-0315 (UTC),Mon Nov 07 2011 02:00:00 GMT-0315 (UTC)" ]; test $? "timeHour.range with -:15 UTC offset" -# [ "$(TZ=UTC-03:15 node -e 'import("./src/index.js").then(d3 => console.log(d3.timeHour.floor(new Date(1456279843199))))')" = "Wed Feb 24 2016 05:00:00 GMT+0315 (UTC)" ]; test $? "timeHour.floor with +:15 UTC offset" -# [ "$(TZ=UTC-03:15 node -e 'import("./src/index.js").then(d3 => console.log(d3.timeHour.ceil(new Date(1456279843199))))')" = "Wed Feb 24 2016 06:00:00 GMT+0315 (UTC)" ]; test $? "timeHour.ceil with +:15 UTC offset" -# [ "$(TZ=UTC-03:15 node -e 'import("./src/index.js").then(d3 => console.log(d3.timeHour.range(new Date(2011, 10, 7, 0), new Date(2011, 10, 7, 3)).join(",")))')" = "Mon Nov 07 2011 00:00:00 GMT+0315 (UTC),Mon Nov 07 2011 01:00:00 GMT+0315 (UTC),Mon Nov 07 2011 02:00:00 GMT+0315 (UTC)" ]; test $? "timeHour.range with +:30 UTC offset" -[ "$(TZ=Asia/Kolkata node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeHour.floor(new Date(1456279843199))))')" = "1456277400000" ]; test $? "timeHour.floor with +:30 UTC offset" -[ "$(TZ=Asia/Kolkata node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeHour.ceil(new Date(1456279843199))))')" = "1456281000000" ]; test $? "timeHour.ceil with +:30 UTC offset" -[ "$(TZ=Asia/Kolkata node -e 'import("./src/index.js").then(d3 => console.log(d3.timeHour.range(new Date(2011, 10, 7, 0), new Date(2011, 10, 7, 3)).map(Number).join(",")))')" = "1320604200000,1320607800000,1320611400000" ]; test $? "timeHour.range with +:30 UTC offset" -[ "$(TZ=Asia/Kathmandu node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeHour.floor(new Date(1456279843199))))')" = "1456276500000" ]; test $? "timeHour.floor with +:45 UTC offset" -[ "$(TZ=Asia/Kathmandu node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeHour.ceil(new Date(1456279843199))))')" = "1456280100000" ]; test $? "timeHour.ceil with +:45 UTC offset" -[ "$(TZ=Asia/Kathmandu node -e 'import("./src/index.js").then(d3 => console.log(d3.timeHour.range(new Date(2011, 10, 7, 0), new Date(2011, 10, 7, 3)).map(Number).join(",")))')" = "1320603300000,1320606900000,1320610500000" ]; test $? "timeHour.range with +:45 UTC offset" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 1, 21, 1)))))')" = "1455933600000" ]; test $? "timeDay.floor when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 1, 21, 2)))))')" = "1455933600000" ]; test $? "timeDay.floor when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 1, 21, 3)))))')" = "1456023600000" ]; test $? "timeDay.floor when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 1, 21, 4)))))')" = "1456023600000" ]; test $? "timeDay.floor when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 1, 21, 1)))))')" = "1456023600000" ]; test $? "timeDay.ceil when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 1, 21, 2)))))')" = "1456023600000" ]; test $? "timeDay.ceil when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 1, 21, 3)))))')" = "1456023600000" ]; test $? "timeDay.ceil when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 1, 21, 4)))))')" = "1456110000000" ]; test $? "timeDay.ceil when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 1, 20, 14)))))')" = "1455933600000" ]; test $? "timeDay.round when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 1, 20, 15)))))')" = "1456023600000" ]; test $? "timeDay.round when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 1, 21, 14)))))')" = "1456023600000" ]; test $? "timeDay.round when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 1, 21, 15)))))')" = "1456110000000" ]; test $? "timeDay.round when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(d3.timeDay.range(new Date(2016, 1, 19), new Date(2016, 1, 23)).map(Number).join(",")))')" = "1455847200000,1455933600000,1456023600000,1456110000000" ]; test $? "timeDay.range when daylight saving ends at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 9, 16, 1)))))')" = "1476500400000" ]; test $? "timeDay.floor when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 9, 16, 2)))))')" = "1476500400000" ]; test $? "timeDay.floor when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 9, 16, 3)))))')" = "1476586800000" ]; test $? "timeDay.floor when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 9, 16, 4)))))')" = "1476586800000" ]; test $? "timeDay.floor when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 9, 16, 1)))))')" = "1476586800000" ]; test $? "timeDay.ceil when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 9, 16, 2)))))')" = "1476586800000" ]; test $? "timeDay.ceil when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 9, 16, 3)))))')" = "1476586800000" ]; test $? "timeDay.ceil when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 9, 16, 4)))))')" = "1476669600000" ]; test $? "timeDay.ceil when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 9, 15, 14)))))')" = "1476500400000" ]; test $? "timeDay.round when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 9, 15, 15)))))')" = "1476586800000" ]; test $? "timeDay.round when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 9, 16, 14)))))')" = "1476586800000" ]; test $? "timeDay.round when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 9, 16, 15)))))')" = "1476669600000" ]; test $? "timeDay.round when daylight saving begins at midnight" -[ "$(TZ=America/Sao_Paulo node -e 'import("./src/index.js").then(d3 => console.log(d3.timeDay.range(new Date(2016, 9, 14), new Date(2016, 9, 18)).map(Number).join(",")))')" = "1476414000000,1476500400000,1476586800000,1476669600000" ]; test $? "timeDay.range when daylight saving begins at midnight" +# [ "$(TZ=UTC+03:15 node -e 'import("d3-time").then(d3 => console.log(d3.timeHour.floor(new Date(1456279843199))))')" = "Tue Feb 23 2016 22:00:00 GMT-0315 (UTC)" ]; test $? "timeHour.floor with -:15 UTC offset" +# [ "$(TZ=UTC+03:15 node -e 'import("d3-time").then(d3 => console.log(d3.timeHour.ceil(new Date(1456279843199))))')" = "Tue Feb 23 2016 23:00:00 GMT-0315 (UTC)" ]; test $? "timeHour.ceil with -:15 UTC offset" +# [ "$(TZ=UTC+03:15 node -e 'import("d3-time").then(d3 => console.log(d3.timeHour.range(new Date(2011, 10, 7, 0), new Date(2011, 10, 7, 3)).join(",")))')" = "Mon Nov 07 2011 00:00:00 GMT-0315 (UTC),Mon Nov 07 2011 01:00:00 GMT-0315 (UTC),Mon Nov 07 2011 02:00:00 GMT-0315 (UTC)" ]; test $? "timeHour.range with -:15 UTC offset" +# [ "$(TZ=UTC-03:15 node -e 'import("d3-time").then(d3 => console.log(d3.timeHour.floor(new Date(1456279843199))))')" = "Wed Feb 24 2016 05:00:00 GMT+0315 (UTC)" ]; test $? "timeHour.floor with +:15 UTC offset" +# [ "$(TZ=UTC-03:15 node -e 'import("d3-time").then(d3 => console.log(d3.timeHour.ceil(new Date(1456279843199))))')" = "Wed Feb 24 2016 06:00:00 GMT+0315 (UTC)" ]; test $? "timeHour.ceil with +:15 UTC offset" +# [ "$(TZ=UTC-03:15 node -e 'import("d3-time").then(d3 => console.log(d3.timeHour.range(new Date(2011, 10, 7, 0), new Date(2011, 10, 7, 3)).join(",")))')" = "Mon Nov 07 2011 00:00:00 GMT+0315 (UTC),Mon Nov 07 2011 01:00:00 GMT+0315 (UTC),Mon Nov 07 2011 02:00:00 GMT+0315 (UTC)" ]; test $? "timeHour.range with +:30 UTC offset" +[ "$(TZ=Asia/Kolkata node -e 'import("d3-time").then(d3 => console.log(+d3.timeHour.floor(new Date(1456279843199))))')" = "1456277400000" ]; test $? "timeHour.floor with +:30 UTC offset" +[ "$(TZ=Asia/Kolkata node -e 'import("d3-time").then(d3 => console.log(+d3.timeHour.ceil(new Date(1456279843199))))')" = "1456281000000" ]; test $? "timeHour.ceil with +:30 UTC offset" +[ "$(TZ=Asia/Kolkata node -e 'import("d3-time").then(d3 => console.log(d3.timeHour.range(new Date(2011, 10, 7, 0), new Date(2011, 10, 7, 3)).map(Number).join(",")))')" = "1320604200000,1320607800000,1320611400000" ]; test $? "timeHour.range with +:30 UTC offset" +[ "$(TZ=Asia/Kathmandu node -e 'import("d3-time").then(d3 => console.log(+d3.timeHour.floor(new Date(1456279843199))))')" = "1456276500000" ]; test $? "timeHour.floor with +:45 UTC offset" +[ "$(TZ=Asia/Kathmandu node -e 'import("d3-time").then(d3 => console.log(+d3.timeHour.ceil(new Date(1456279843199))))')" = "1456280100000" ]; test $? "timeHour.ceil with +:45 UTC offset" +[ "$(TZ=Asia/Kathmandu node -e 'import("d3-time").then(d3 => console.log(d3.timeHour.range(new Date(2011, 10, 7, 0), new Date(2011, 10, 7, 3)).map(Number).join(",")))')" = "1320603300000,1320606900000,1320610500000" ]; test $? "timeHour.range with +:45 UTC offset" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 1, 21, 1)))))')" = "1455933600000" ]; test $? "timeDay.floor when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 1, 21, 2)))))')" = "1455933600000" ]; test $? "timeDay.floor when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 1, 21, 3)))))')" = "1456023600000" ]; test $? "timeDay.floor when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 1, 21, 4)))))')" = "1456023600000" ]; test $? "timeDay.floor when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 1, 21, 1)))))')" = "1456023600000" ]; test $? "timeDay.ceil when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 1, 21, 2)))))')" = "1456023600000" ]; test $? "timeDay.ceil when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 1, 21, 3)))))')" = "1456023600000" ]; test $? "timeDay.ceil when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 1, 21, 4)))))')" = "1456110000000" ]; test $? "timeDay.ceil when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 1, 20, 14)))))')" = "1455933600000" ]; test $? "timeDay.round when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 1, 20, 15)))))')" = "1456023600000" ]; test $? "timeDay.round when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 1, 21, 14)))))')" = "1456023600000" ]; test $? "timeDay.round when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 1, 21, 15)))))')" = "1456110000000" ]; test $? "timeDay.round when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(d3.timeDay.range(new Date(2016, 1, 19), new Date(2016, 1, 23)).map(Number).join(",")))')" = "1455847200000,1455933600000,1456023600000,1456110000000" ]; test $? "timeDay.range when daylight saving ends at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 9, 16, 1)))))')" = "1476500400000" ]; test $? "timeDay.floor when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 9, 16, 2)))))')" = "1476500400000" ]; test $? "timeDay.floor when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 9, 16, 3)))))')" = "1476586800000" ]; test $? "timeDay.floor when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.floor(new Date(Date.UTC(2016, 9, 16, 4)))))')" = "1476586800000" ]; test $? "timeDay.floor when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 9, 16, 1)))))')" = "1476586800000" ]; test $? "timeDay.ceil when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 9, 16, 2)))))')" = "1476586800000" ]; test $? "timeDay.ceil when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 9, 16, 3)))))')" = "1476586800000" ]; test $? "timeDay.ceil when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.ceil(new Date(Date.UTC(2016, 9, 16, 4)))))')" = "1476669600000" ]; test $? "timeDay.ceil when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 9, 15, 14)))))')" = "1476500400000" ]; test $? "timeDay.round when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 9, 15, 15)))))')" = "1476586800000" ]; test $? "timeDay.round when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 9, 16, 14)))))')" = "1476586800000" ]; test $? "timeDay.round when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(+d3.timeDay.round(new Date(Date.UTC(2016, 9, 16, 15)))))')" = "1476669600000" ]; test $? "timeDay.round when daylight saving begins at midnight" +[ "$(TZ=America/Sao_Paulo node -e 'import("d3-time").then(d3 => console.log(d3.timeDay.range(new Date(2016, 9, 14), new Date(2016, 9, 18)).map(Number).join(",")))')" = "1476414000000,1476500400000,1476586800000,1476669600000" ]; test $? "timeDay.range when daylight saving begins at midnight" diff --git a/test/thursday-test.js b/test/thursday-test.js index 74ec1df..7d51b9b 100644 --- a/test/thursday-test.js +++ b/test/thursday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeThursday, timeThursdays} from "../src/index.js"; +import {timeThursday, timeThursdays} from "d3-time"; import {local} from "./date.js"; it("timeThursdays in an alias for timeThursday.range", () => { diff --git a/test/ticks-test.js b/test/ticks-test.js index 89a6c96..9b0b57e 100644 --- a/test/ticks-test.js +++ b/test/ticks-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeMinute, timeTicks} from "../src/index.js"; +import {timeMinute, timeTicks} from "d3-time"; import {local} from "./date.js"; it("timeTicks(start, stop, interval) respects the specified interval", () => { diff --git a/test/tuesday-test.js b/test/tuesday-test.js index 18ce418..bf78bce 100644 --- a/test/tuesday-test.js +++ b/test/tuesday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeTuesday, timeTuesdays} from "../src/index.js"; +import {timeTuesday, timeTuesdays} from "d3-time"; import {local} from "./date.js"; it("timeTuesdays in an alias for timeTuesday.range", () => { diff --git a/test/unixDay-test.js b/test/unixDay-test.js index 90122f1..f3b488c 100644 --- a/test/unixDay-test.js +++ b/test/unixDay-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {unixDay, unixDays} from "../src/index.js"; +import {unixDay, unixDays} from "d3-time"; import {utc} from "./date.js"; it("unixDays in an alias for unixDay.range", () => { diff --git a/test/utcDay-test.js b/test/utcDay-test.js index 839b1ca..d812ba8 100644 --- a/test/utcDay-test.js +++ b/test/utcDay-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcDay, utcDays} from "../src/index.js"; +import {utcDay, utcDays} from "d3-time"; import {utc} from "./date.js"; it("utcDays in an alias for utcDay.range", () => { diff --git a/test/utcFriday-test.js b/test/utcFriday-test.js index 0390f6c..bd3f9c4 100644 --- a/test/utcFriday-test.js +++ b/test/utcFriday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcFriday, utcFridays} from "../src/index.js"; +import {utcFriday, utcFridays} from "d3-time"; import {utc} from "./date.js"; it("utcFridays in an alias for utcFriday.range", () => { diff --git a/test/utcHour-test.js b/test/utcHour-test.js index 645465d..f4dfa48 100644 --- a/test/utcHour-test.js +++ b/test/utcHour-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcHour} from "../src/index.js"; +import {utcHour} from "d3-time"; import {utc} from "./date.js"; it("utcHour.floor(date) returns hours", () => { diff --git a/test/utcMillisecond-test.js b/test/utcMillisecond-test.js index c0a471e..eaa511d 100644 --- a/test/utcMillisecond-test.js +++ b/test/utcMillisecond-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeMillisecond, utcMillisecond} from "../src/index.js"; +import {timeMillisecond, utcMillisecond} from "d3-time"; it("utcMillisecond is an alias for timeMillisecond", () => { assert.strictEqual(utcMillisecond, timeMillisecond); diff --git a/test/utcMinute-test.js b/test/utcMinute-test.js index 0d8c1ac..632568c 100644 --- a/test/utcMinute-test.js +++ b/test/utcMinute-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcMinute} from "../src/index.js"; +import {utcMinute} from "d3-time"; import {utc} from "./date.js"; it("utcMinute.floor(date) returns minutes", () => { diff --git a/test/utcMonday-test.js b/test/utcMonday-test.js index 5a4329e..dcc9210 100644 --- a/test/utcMonday-test.js +++ b/test/utcMonday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcMonday, utcMondays} from "../src/index.js"; +import {utcMonday, utcMondays} from "d3-time"; import {utc} from "./date.js"; it("utcMondays in an alias for utcMonday.range", () => { diff --git a/test/utcMonth-test.js b/test/utcMonth-test.js index 9f4c127..7237be3 100644 --- a/test/utcMonth-test.js +++ b/test/utcMonth-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcMonth, utcMonths} from "../src/index.js"; +import {utcMonth, utcMonths} from "d3-time"; import {utc} from "./date.js"; it("utcMonths in an alias for utcMonth.range", () => { diff --git a/test/utcMultiYear-test.js b/test/utcMultiYear-test.js index bd908c4..db73223 100644 --- a/test/utcMultiYear-test.js +++ b/test/utcMultiYear-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcYear} from "../src/index.js"; +import {utcYear} from "d3-time"; import {utc} from "./date.js"; it("utcYear.every(n).floor(date) returns integer multiples of n years", () => { diff --git a/test/utcSaturday-test.js b/test/utcSaturday-test.js index 72dfc0c..1d74bfd 100644 --- a/test/utcSaturday-test.js +++ b/test/utcSaturday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcSaturday, utcSaturdays} from "../src/index.js"; +import {utcSaturday, utcSaturdays} from "d3-time"; import {utc} from "./date.js"; it("utcSaturdays in an alias for utcSaturday.range", () => { diff --git a/test/utcSecond-test.js b/test/utcSecond-test.js index 294168d..260b606 100644 --- a/test/utcSecond-test.js +++ b/test/utcSecond-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcSecond} from "../src/index.js"; +import {utcSecond} from "d3-time"; import {utc} from "./date.js"; it("utcSecond.floor(date) returns seconds", () => { diff --git a/test/utcSunday-test.js b/test/utcSunday-test.js index 8c3273a..09df2f9 100644 --- a/test/utcSunday-test.js +++ b/test/utcSunday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcSunday, utcSundays} from "../src/index.js"; +import {utcSunday, utcSundays} from "d3-time"; import {utc} from "./date.js"; it("utcSundays in an alias for utcSunday.range", () => { diff --git a/test/utcThursday-test.js b/test/utcThursday-test.js index d800af3..548dcd2 100644 --- a/test/utcThursday-test.js +++ b/test/utcThursday-test.js @@ -1,7 +1,7 @@ import assert from "node:assert"; import {it} from "vitest"; import {utc} from "./date.js"; -import {utcThursday, utcThursdays} from "../src/index.js"; +import {utcThursday, utcThursdays} from "d3-time"; it("utcThursdays in an alias for utcThursday.range", () => { assert.strictEqual(utcThursdays, utcThursday.range); diff --git a/test/utcTicks-test.js b/test/utcTicks-test.js index 071907e..13dc369 100644 --- a/test/utcTicks-test.js +++ b/test/utcTicks-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcMinute, utcTicks} from "../src/index.js"; +import {utcMinute, utcTicks} from "d3-time"; import {utc} from "./date.js"; it("utcTicks(start, stop, interval) respects the specified interval", () => { diff --git a/test/utcTuesday-test.js b/test/utcTuesday-test.js index 8954f96..802282e 100644 --- a/test/utcTuesday-test.js +++ b/test/utcTuesday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcTuesday, utcTuesdays} from "../src/index.js"; +import {utcTuesday, utcTuesdays} from "d3-time"; import {utc} from "./date.js"; it("utcTuesdays in an alias for utcTuesday.range", () => { diff --git a/test/utcWednesday-test.js b/test/utcWednesday-test.js index 016932d..8f4d338 100644 --- a/test/utcWednesday-test.js +++ b/test/utcWednesday-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcWednesday, utcWednesdays} from "../src/index.js"; +import {utcWednesday, utcWednesdays} from "d3-time"; import {utc} from "./date.js"; it("utcWednesdays in an alias for utcWednesday.range", () => { diff --git a/test/utcWeek-test.js b/test/utcWeek-test.js index e760713..d11060d 100644 --- a/test/utcWeek-test.js +++ b/test/utcWeek-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcSunday, utcWeek} from "../src/index.js"; +import {utcSunday, utcWeek} from "d3-time"; import {utc} from "./date.js"; it("utcWeek.floor(date) returns sundays", () => { diff --git a/test/utcYear-test.js b/test/utcYear-test.js index 24ef56a..3a3aaea 100644 --- a/test/utcYear-test.js +++ b/test/utcYear-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {utcYear} from "../src/index.js"; +import {utcYear} from "d3-time"; import {utc} from "./date.js"; it("utcYear.floor(date) returns years", () => { diff --git a/test/wednesday-test.js b/test/wednesday-test.js index 6467d21..8e163f3 100644 --- a/test/wednesday-test.js +++ b/test/wednesday-test.js @@ -1,7 +1,7 @@ import assert from "node:assert"; import {it} from "vitest"; import {local} from "./date.js"; -import {timeWednesday, timeWednesdays} from "../src/index.js"; +import {timeWednesday, timeWednesdays} from "d3-time"; it("timeWednesdays in an alias for timeWednesday.range", () => { assert.strictEqual(timeWednesdays, timeWednesday.range); diff --git a/test/week-test.js b/test/week-test.js index 04993f2..2defc26 100644 --- a/test/week-test.js +++ b/test/week-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeSunday, timeWeek} from "../src/index.js"; +import {timeSunday, timeWeek} from "d3-time"; import {local} from "./date.js"; it("timeWeek.floor(date) returns sundays", () => { diff --git a/test/year-test.js b/test/year-test.js index 70b1d31..0229549 100644 --- a/test/year-test.js +++ b/test/year-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {timeYear} from "../src/index.js"; +import {timeYear} from "d3-time"; import {local} from "./date.js"; it("timeYear.floor(date) returns years", () => { diff --git a/vitest.config.js b/vitest.config.js index b728050..d48798a 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -1,3 +1,6 @@ import {defineConfig} from "vitest/config"; -export default defineConfig({test: {include: ["test/**/*-test.js"]}}); +export default defineConfig({ + resolve: {alias: {"d3-time": "src/index.js"}}, + test: {include: ["test/**/*-test.js"]} +}); From 69c6d25613745998c54419a379942f9a4dcf4b62 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 22:16:54 -0800 Subject: [PATCH 9/9] 3.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a4b05e3..73bc9d8 100644 --- a/package.json +++ b/package.json @@ -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": {