From d9f6112396db2a1048b54bc0ce747625f7ba5bd7 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 16:01:06 -0800 Subject: [PATCH 01/10] es bundle, pnpm Co-Authored-By: Claude Opus 5.5 --- .github/eslint.json | 18 - .github/workflows/node.js.yml | 30 - .github/workflows/publish.yml | 26 + .github/workflows/test.yml | 22 + LICENSE | 2 +- README.md | 2 +- package.json | 22 +- pnpm-lock.yaml | 1826 +++++++++++++++++++++++++++++++++ rollup.config.js | 88 +- test/utcTime-test.js | 7 +- yarn.lock | 1276 ----------------------- 11 files changed, 1948 insertions(+), 1371 deletions(-) delete mode 100644 .github/eslint.json delete mode 100644 .github/workflows/node.js.yml create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/test.yml create mode 100644 pnpm-lock.yaml delete mode 100644 yarn.lock diff --git a/.github/eslint.json b/.github/eslint.json deleted file mode 100644 index c280fdb..0000000 --- a/.github/eslint.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "eslint-compact", - "pattern": [ - { - "regexp": "^(.+):\\sline\\s(\\d+),\\scol\\s(\\d+),\\s(Error|Warning|Info)\\s-\\s(.+)\\s\\((.+)\\)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5, - "code": 6 - } - ] - } - ] -} diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 7e5ee59..0000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,30 +0,0 @@ -# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Node.js CI - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: yarn --frozen-lockfile - - run: | - echo ::add-matcher::.github/eslint.json - yarn run eslint src test --format=compact - - run: yarn test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..839d5c5 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,26 @@ +name: Publish + +on: + workflow_dispatch: {} + release: + types: [published] + +permissions: + id-token: write + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: pnpm/action-setup@v6 + with: + version: 10 + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: pnpm + - run: pnpm install + - run: pnpm run test + - run: npm publish diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..00a5a94 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +name: Test + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: pnpm/action-setup@v6 + with: + version: 10 + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: pnpm + - run: pnpm install + - run: pnpm run test diff --git a/LICENSE b/LICENSE index b014515..a8918c4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2010-2021 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 21ef563..0857a25 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,6 @@ Scales map a dimension of abstract data to a visual representation. Although mos ## Resources - [Documentation](https://d3js.org/d3-scale) -- [Examples](https://observablehq.com/collection/@d3/d3-scale) +- [Examples](https://observablehq.com/@d3/-/collection/d3-scale) - [Releases](https://github.com/d3/d3-scale/releases) - [Getting help](https://d3js.org/community) diff --git a/package.json b/package.json index cd77039..b3a450a 100644 --- a/package.json +++ b/package.json @@ -21,15 +21,15 @@ "type": "module", "files": [ "dist/**/*.js", - "src/**/*.js" + "dist/**/*.mjs" ], - "module": "src/index.js", - "main": "src/index.js", + "module": "dist/d3-scale.mjs", + "main": "dist/d3-scale.mjs", "jsdelivr": "dist/d3-scale.min.js", "unpkg": "dist/d3-scale.min.js", "exports": { "umd": "./dist/d3-scale.min.js", - "default": "./src/index.js" + "default": "./dist/d3-scale.mjs" }, "sideEffects": false, "dependencies": { @@ -40,16 +40,16 @@ "d3-time-format": "2 - 4" }, "devDependencies": { - "d3-color": "1 - 3", - "eslint": "7", - "mocha": "9", - "rollup": "2", - "rollup-plugin-terser": "7" + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-terser": "^1.0.2", + "d3-color": "^3.1.0", + "eslint": "^7.32.0", + "mocha": "^10.8.2", + "rollup": "^4.67.4" }, "scripts": { "test": "TZ=America/Los_Angeles mocha 'test/**/*-test.js' && eslint src test", - "prepublishOnly": "rm -rf dist && yarn test && rollup -c", - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd -" + "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..5faeda2 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,1826 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + d3-array: + specifier: 2.10.0 - 3 + version: 3.2.4 + d3-format: + specifier: 1 - 3 + version: 3.1.2 + d3-interpolate: + specifier: 1.2.0 - 3 + version: 3.0.1 + d3-time: + specifier: 2.1.1 - 3 + version: 3.1.0 + d3-time-format: + specifier: 2 - 4 + version: 4.1.0 + devDependencies: + '@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) + d3-color: + specifier: ^3.1.0 + version: 3.1.0 + eslint: + specifier: ^7.32.0 + version: 7.32.0 + mocha: + specifier: ^10.8.2 + version: 10.8.2 + rollup: + specifier: ^4.67.4 + version: 4.67.4 + +packages: + + '@babel/code-frame@7.12.11': + resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/highlight@7.25.9': + resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} + engines: {node: '>=6.9.0'} + + '@eslint/eslintrc@0.4.3': + resolution: {integrity: sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==} + engines: {node: ^10.12.0 || >=12.0.0} + + '@humanwhocodes/config-array@0.5.0': + resolution: {integrity: sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + + '@humanwhocodes/object-schema@1.2.1': + resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + deprecated: Use @eslint/object-schema instead + + '@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/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@7.4.1: + resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} + engines: {node: '>=0.4.0'} + hasBin: true + + 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==} + + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + + 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@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + 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@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + astral-regex@2.0.0: + resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} + engines: {node: '>=8'} + + 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@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + 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@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + 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'} + + d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + + d3-format@3.1.2: + resolution: {integrity: sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==} + engines: {node: '>=12'} + + d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + + d3-time-format@4.1.0: + resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + engines: {node: '>=12'} + + d3-time@3.1.0: + resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + 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'} + + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + + 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@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + + eslint-utils@2.1.0: + resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} + engines: {node: '>=6'} + + eslint-visitor-keys@1.3.0: + resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} + engines: {node: '>=4'} + + eslint-visitor-keys@2.1.0: + resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} + engines: {node: '>=10'} + + eslint@7.32.0: + resolution: {integrity: sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==} + engines: {node: ^10.12.0 || >=12.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + + espree@7.3.1: + resolution: {integrity: sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==} + engines: {node: ^10.12.0 || >=12.0.0} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + 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@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + 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==} + + fast-uri@3.1.9: + resolution: {integrity: sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==} + + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.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@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + 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==} + + functional-red-black-tree@1.0.1: + resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} + + 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@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + 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 + + 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@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + 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@4.0.6: + resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} + 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-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@3.15.2: + resolution: {integrity: sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==} + hasBin: true + + 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-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + 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==} + + lodash.truncate@4.4.2: + resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} + + 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-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + 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==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + 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'} + + progress@2.0.3: + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.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'} + + regexpp@3.2.0: + resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} + engines: {node: '>=8'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + 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 + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + 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==} + + semver@7.8.6: + resolution: {integrity: sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==} + engines: {node: '>=10'} + hasBin: true + + 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'} + + slice-ansi@4.0.0: + resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} + engines: {node: '>=10'} + + 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'} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + 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@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + 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'} + + table@6.9.0: + resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==} + engines: {node: '>=10.0.0'} + + terser@5.51.2: + resolution: {integrity: sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==} + engines: {node: '>=10'} + hasBin: true + + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + + 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'} + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + v8-compile-cache@2.4.0: + resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} + + 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: + + '@babel/code-frame@7.12.11': + dependencies: + '@babel/highlight': 7.25.9 + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/highlight@7.25.9': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@eslint/eslintrc@0.4.3': + dependencies: + ajv: 6.15.0 + debug: 4.4.3(supports-color@8.1.1) + espree: 7.3.1 + globals: 13.24.0 + ignore: 4.0.6 + import-fresh: 3.3.1 + js-yaml: 3.15.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/config-array@0.5.0': + dependencies: + '@humanwhocodes/object-schema': 1.2.1 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/object-schema@1.2.1': {} + + '@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/resolve@1.20.2': {} + + acorn-jsx@5.3.2(acorn@7.4.1): + dependencies: + acorn: 7.4.1 + + acorn@7.4.1: {} + + 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 + + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.9 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + ansi-colors@4.1.3: {} + + ansi-regex@5.0.1: {} + + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + + 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@1.0.10: + dependencies: + sprintf-js: 1.0.3 + + argparse@2.0.1: {} + + astral-regex@2.0.0: {} + + 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@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.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@1.9.3: + dependencies: + color-name: 1.1.3 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.3: {} + + 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 + + d3-color@3.1.0: {} + + d3-format@3.1.2: {} + + d3-interpolate@3.0.1: + dependencies: + d3-color: 3.1.0 + + d3-time-format@4.1.0: + dependencies: + d3-time: 3.1.0 + + d3-time@3.1.0: + dependencies: + d3-array: 3.2.4 + + 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: {} + + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + + emoji-regex@8.0.0: {} + + enquirer@2.4.1: + dependencies: + ansi-colors: 4.1.3 + strip-ansi: 6.0.1 + + es-errors@1.3.0: {} + + escalade@3.2.0: {} + + escape-string-regexp@1.0.5: {} + + escape-string-regexp@4.0.0: {} + + eslint-scope@5.1.1: + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + + eslint-utils@2.1.0: + dependencies: + eslint-visitor-keys: 1.3.0 + + eslint-visitor-keys@1.3.0: {} + + eslint-visitor-keys@2.1.0: {} + + eslint@7.32.0: + dependencies: + '@babel/code-frame': 7.12.11 + '@eslint/eslintrc': 0.4.3 + '@humanwhocodes/config-array': 0.5.0 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3(supports-color@8.1.1) + doctrine: 3.0.0 + enquirer: 2.4.1 + escape-string-regexp: 4.0.0 + eslint-scope: 5.1.1 + eslint-utils: 2.1.0 + eslint-visitor-keys: 2.1.0 + espree: 7.3.1 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + functional-red-black-tree: 1.0.1 + glob-parent: 5.1.2 + globals: 13.24.0 + ignore: 4.0.6 + import-fresh: 3.3.1 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + js-yaml: 3.15.2 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + progress: 2.0.3 + regexpp: 3.2.0 + semver: 7.8.6 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + table: 6.9.0 + text-table: 0.2.0 + v8-compile-cache: 2.4.0 + transitivePeerDependencies: + - supports-color + + espree@7.3.1: + dependencies: + acorn: 7.4.1 + acorn-jsx: 5.3.2(acorn@7.4.1) + eslint-visitor-keys: 1.3.0 + + esprima@4.0.1: {} + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@4.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: {} + + fast-uri@3.1.9: {} + + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + + 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@3.2.0: + dependencies: + flatted: 3.4.4 + keyv: 4.5.4 + rimraf: 3.0.2 + + flat@5.0.2: {} + + flatted@3.4.4: {} + + fs.realpath@1.0.0: {} + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + functional-red-black-tree@1.0.1: {} + + get-caller-file@2.0.5: {} + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.5 + once: 1.4.0 + path-is-absolute: 1.0.1 + + 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@13.24.0: + dependencies: + type-fest: 0.20.2 + + has-flag@3.0.0: {} + + has-flag@4.0.0: {} + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + he@1.2.0: {} + + ignore@4.0.6: {} + + 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-tokens@4.0.0: {} + + js-yaml@3.15.2: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-schema-traverse@1.0.0: {} + + 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: {} + + lodash.truncate@4.4.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-is-absolute@1.0.1: {} + + path-key@3.1.1: {} + + path-parse@1.0.7: {} + + picocolors@1.1.1: {} + + picomatch@2.3.2: {} + + picomatch@4.0.7: {} + + prelude-ls@1.2.1: {} + + progress@2.0.3: {} + + punycode@2.3.1: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.2 + + regexpp@3.2.0: {} + + require-directory@2.1.1: {} + + require-from-string@2.0.2: {} + + 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 + + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + + 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: {} + + semver@7.8.6: {} + + 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: {} + + slice-ansi@4.0.0: + dependencies: + ansi-styles: 4.3.0 + astral-regex: 2.0.0 + is-fullwidth-code-point: 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: {} + + sprintf-js@1.0.3: {} + + 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@5.5.0: + dependencies: + has-flag: 3.0.0 + + 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: {} + + table@6.9.0: + dependencies: + ajv: 8.20.0 + lodash.truncate: 4.4.2 + slice-ansi: 4.0.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + 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 + + text-table@0.2.0: {} + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-fest@0.20.2: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + v8-compile-cache@2.4.0: {} + + 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 4c6ccad..a13a979 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,44 +1,72 @@ -import {readFileSync} from "fs"; -import {terser} from "rollup-plugin-terser"; -import * as meta from "./package.json"; +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. const copyright = readFileSync("./LICENSE", "utf-8") .split(/\n/g) - .filter(line => /^Copyright\s+/.test(line)) - .map(line => line.replace(/^Copyright\s+/, "")) + .filter(line => /^copyright\s+/i.test(line)) + .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/test/utcTime-test.js b/test/utcTime-test.js index 729feaa..f0a1e40 100644 --- a/test/utcTime-test.js +++ b/test/utcTime-test.js @@ -281,10 +281,9 @@ it("scaleUtc.ticks(count) can generate 1-day ticks", () => { it("scaleUtc.ticks(count) can generate 2-day ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 2, 16, 28, 27), utc(2011, 0, 9, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ - utc(2011, 0, 3, 0, 0), - utc(2011, 0, 5, 0, 0), - utc(2011, 0, 7, 0, 0), - utc(2011, 0, 9, 0, 0) + utc(2011, 0, 4, 0, 0), + utc(2011, 0, 6, 0, 0), + utc(2011, 0, 8, 0, 0) ]); }); diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 570f7ac..0000000 --- a/yarn.lock +++ /dev/null @@ -1,1276 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/code-frame@^7.10.4": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" - integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== - dependencies: - "@babel/highlight" "^7.14.5" - -"@babel/helper-validator-identifier@^7.14.5": - version "7.15.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" - integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== - -"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" - integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== - dependencies: - "@babel/helper-validator-identifier" "^7.14.5" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@eslint/eslintrc@^0.4.3": - version "0.4.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" - integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== - dependencies: - ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^13.9.0" - ignore "^4.0.6" - import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - strip-json-comments "^3.1.1" - -"@humanwhocodes/config-array@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" - integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== - dependencies: - "@humanwhocodes/object-schema" "^1.2.0" - debug "^4.1.1" - minimatch "^3.0.4" - -"@humanwhocodes/object-schema@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" - integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== - -"@types/node@*": - version "16.9.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.6.tgz#040a64d7faf9e5d9e940357125f0963012e66f04" - integrity sha512-YHUZhBOMTM3mjFkXVcK+WwAcYmyhe1wL4lfqNtzI0b3qAy7yuSetnM7QJazgE5PFmgVTNGiLOgRFfJMqW7XpSQ== - -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - -acorn-jsx@^5.3.1: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn@^7.4.0: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - -ajv@^6.10.0, 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" - -ajv@^8.0.1: - version "8.6.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764" - integrity sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-colors@4.1.1, 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@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -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@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -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.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -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== - -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - -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.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -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" - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.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.2.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" - integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -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.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" - integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== - 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@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -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.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -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 sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -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", "d3-array@2.10.0 - 3": - version "3.0.4" - resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.0.4.tgz#60550bcc9818be9ace88d269ccd97038fc399b55" - integrity sha512-ShFl90cxNqDaSynDF/Bik/kTzISqePqU3qo2fv6kSJEvF7y7tDCDpcU6WiT01rPO6zngZnrvJ/0j4q6Qg+5EQg== - dependencies: - internmap "1 - 2" - -"d3-color@1 - 3": - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.0.1.tgz#03316e595955d1fcd39d9f3610ad41bb90194d0a" - integrity sha512-6/SlHkDOBLyQSJ1j1Ghs82OIUXpKWlR0hCsw0XrLSQhuUPuCSmLQ1QPH98vpnQxMUQM2/gfAkUEWsupVpd9JGw== - -"d3-format@1 - 3": - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.0.1.tgz#e41b81b2ab79277141ec1404aa5d05001da64084" - integrity sha512-hdL7+HBIohpgfolhBxr1KX47VMD6+vVD/oEFrxk5yhmzV2prk99EkFKYpXuhVkFpTgHdJ6/4bYcjdLPPXV4tIA== - -"d3-interpolate@1.2.0 - 3": - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" - integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== - dependencies: - d3-color "1 - 3" - -"d3-time-format@2 - 4": - version "4.0.0" - resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.0.0.tgz#930ded86a9de761702344760d8a25753467f28b7" - integrity sha512-nzaCwlj+ZVBIlFuVOT1RmU+6xb/7D5IcnhHzHQcBgS/aTa5K9fWZNN5LCXA27LgF5WxoSNJqKBbLcGMtM6Ca6A== - dependencies: - d3-time "1 - 3" - -"d3-time@1 - 3", "d3-time@2.1.1 - 3": - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.0.0.tgz#65972cb98ae2d4954ef5c932e8704061335d4975" - integrity sha512-zmV3lRnlaLI08y9IMRXSDshQb5Nj77smnfpnd2LrBa/2K281Jijactokeak14QacHs/kKq0AQ121nidNYlarbQ== - dependencies: - d3-array "2 - 3" - -debug@4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - -debug@^4.0.1, debug@^4.1.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - 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== - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -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== - -enquirer@^2.3.5: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -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== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint@7: - version "7.32.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" - integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== - dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.3" - "@humanwhocodes/config-array" "^0.5.0" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.0.1" - doctrine "^3.0.0" - enquirer "^2.3.5" - escape-string-regexp "^4.0.0" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.1.2" - globals "^13.6.0" - ignore "^4.0.6" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - js-yaml "^3.13.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.0.4" - natural-compare "^1.4.0" - optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" - strip-json-comments "^3.1.0" - table "^6.0.9" - text-table "^0.2.0" - v8-compile-cache "^2.0.3" - -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== - dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== - 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@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - -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 sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -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@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -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.1.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" - integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - -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@^5.1.2, 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@7.1.7: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.3: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^13.6.0, globals@^13.9.0: - version "13.11.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.11.0.tgz#40ef678da117fe7bd2e28f1fab24951bd0255be7" - integrity sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g== - dependencies: - type-fest "^0.20.2" - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -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@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - -import-fresh@^3.0.0, 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 sha1-khi5srkoojixPcT7a21XbyMUU+o= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - 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 sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -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.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - 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-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 sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -jest-worker@^26.2.1: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" - integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^7.0.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -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" - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -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-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -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 sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - -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.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= - -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== - -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= - -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" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -minimatch@3.0.4, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -mocha@9: - version "9.1.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.1.1.tgz#33df2eb9c6262434630510c5f4283b36efda9b61" - integrity sha512-0wE74YMgOkCgBUj8VyIDwmLUjTsS13WV1Pg7l0SHea2qzZzlq7MDnfbPsHKcELBRk3+izEVkRofjmClpycudCA== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.2" - debug "4.3.1" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.1.7" - growl "1.10.5" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "3.0.4" - ms "2.1.3" - nanoid "3.1.23" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - which "2.0.2" - wide-align "1.1.3" - workerpool "6.1.5" - 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== - -nanoid@3.1.23: - version "3.1.23" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" - integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -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 sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - 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.3" - -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-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -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.0" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" - integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== - -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== - -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -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" - -regexpp@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -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== - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rollup-plugin-terser@7: - version "7.0.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" - integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ== - dependencies: - "@babel/code-frame" "^7.10.4" - jest-worker "^26.2.1" - serialize-javascript "^4.0.0" - terser "^5.0.0" - -rollup@2: - version "2.57.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.57.0.tgz#c1694475eb22e1022477c0f4635fd0ac80713173" - integrity sha512-bKQIh1rWKofRee6mv8SrF2HdP6pea5QkwBZSMImJysFj39gQuiV8MEPBjXOCpzk3wSYp63M2v2wkWBmFC8O/rg== - optionalDependencies: - fsevents "~2.3.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== - -semver@^7.2.1: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - dependencies: - lru-cache "^6.0.0" - -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@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== - 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== - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -source-map-support@~0.5.20: - version "0.5.20" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" - integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== - 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== - -source-map@~0.7.2: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -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@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -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.0, 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@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.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" - -table@^6.0.9: - version "6.7.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" - integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== - dependencies: - ajv "^8.0.1" - lodash.clonedeep "^4.5.0" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.0" - strip-ansi "^6.0.0" - -terser@^5.0.0: - version "5.9.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.9.0.tgz#47d6e629a522963240f2b55fcaa3c99083d2c351" - integrity sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ== - dependencies: - commander "^2.20.0" - source-map "~0.7.2" - 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 sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -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" - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -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" - -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - -which@2.0.2, 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" - -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -workerpool@6.1.5: - version "6.1.5" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.5.tgz#0f7cf076b6215fd7e1da903ff6f22ddd1886b581" - integrity sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw== - -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 sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -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== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -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 951418bab4286878410ce4e1d131349628e6b6a2 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 17:43:01 -0800 Subject: [PATCH 02/10] vitest, eslint 9 Co-Authored-By: Claude Opus 5.5 --- .eslintrc.json | 13 - .github/workflows/publish.yml | 1 + .github/workflows/test.yml | 1 + eslint.config.js | 11 + package.json | 11 +- pnpm-lock.yaml | 1529 ++++++++++++++++--------------- test/.eslintrc.json | 13 - test/band-test.js | 57 +- test/diverging-test.js | 33 +- test/identity-test.js | 35 +- test/linear-test.js | 111 +-- test/log-test.js | 93 +- test/ordinal-test.js | 49 +- test/point-test.js | 11 +- test/pow-test.js | 101 +- test/quantile-test.js | 35 +- test/quantize-test.js | 29 +- test/radial-test.js | 25 +- test/sequential-test.js | 29 +- test/sequentialQuantile-test.js | 9 +- test/sqrt-test.js | 5 +- test/symlog-test.js | 47 +- test/threshold-test.js | 17 +- test/tickFormat-test.js | 11 +- test/time-test.js | 97 +- test/utcTime-test.js | 91 +- vitest.config.js | 3 + 27 files changed, 1288 insertions(+), 1179 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 eslint.config.js delete mode 100644 test/.eslintrc.json create mode 100644 vitest.config.js diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 7e80b00..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "eslint:recommended", - "parserOptions": { - "sourceType": "module", - "ecmaVersion": 8 - }, - "env": { - "es6": true - }, - "rules": { - "no-cond-assign": 0 - } -} 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 new file mode 100644 index 0000000..a82270b --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,11 @@ +import js from "@eslint/js"; +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"}}, + {rules: {"no-cond-assign": 0}}, + {files: ["test/**/*.js"], rules: {"no-sparse-arrays": 0}} +]); diff --git a/package.json b/package.json index b3a450a..b5f57d0 100644 --- a/package.json +++ b/package.json @@ -40,15 +40,18 @@ "d3-time-format": "2 - 4" }, "devDependencies": { + "@eslint/js": "^9.39.5", "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-terser": "^1.0.2", "d3-color": "^3.1.0", - "eslint": "^7.32.0", - "mocha": "^10.8.2", - "rollup": "^4.67.4" + "eslint": "^9.39.5", + "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" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5faeda2..7985091 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,6 +24,9 @@ importers: specifier: 2 - 4 version: 4.1.0 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) @@ -34,40 +37,77 @@ importers: specifier: ^3.1.0 version: 3.1.0 eslint: - specifier: ^7.32.0 - version: 7.32.0 - mocha: - specifier: ^10.8.2 - version: 10.8.2 + specifier: ^9.39.5 + version: 9.39.5 + globals: + 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: - '@babel/code-frame@7.12.11': - resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} + '@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} - '@babel/helper-validator-identifier@7.29.7': - resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} - engines: {node: '>=6.9.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} - '@babel/highlight@7.25.9': - resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} - engines: {node: '>=6.9.0'} + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} - '@eslint/eslintrc@0.4.3': - resolution: {integrity: sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==} - engines: {node: ^10.12.0 || >=12.0.0} + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} - '@humanwhocodes/config-array@0.5.0': - resolution: {integrity: sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} - '@humanwhocodes/object-schema@1.2.1': - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} - deprecated: Use @eslint/object-schema instead + '@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==} @@ -92,6 +132,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'} @@ -262,22 +404,58 @@ 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==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@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: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@7.4.1: - resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} - engines: {node: '>=0.4.0'} - hasBin: true - acorn@8.19.0: resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} engines: {node: '>=0.4.0'} @@ -286,59 +464,23 @@ packages: ajv@6.15.0: resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} - ajv@8.20.0: - resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} - - 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@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - 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@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - astral-regex@2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} + 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==} @@ -346,35 +488,18 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - - chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} + 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@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} - color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -384,6 +509,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'} @@ -421,10 +549,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==} @@ -432,67 +556,47 @@ 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'} - - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - enquirer@2.4.1: - resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} - engines: {node: '>=8.6'} + 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'} - - escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-scope@5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} - - eslint-utils@2.1.0: - resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} - engines: {node: '>=6'} + 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@1.3.0: - resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} - engines: {node: '>=4'} + 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@2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} + 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@7.32.0: - resolution: {integrity: sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==} - engines: {node: ^10.12.0 || >=12.0.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@7.3.1: - resolution: {integrity: sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==} - engines: {node: ^10.12.0 || >=12.0.0} - - esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: 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==} @@ -502,10 +606,6 @@ packages: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} - estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -513,10 +613,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==} @@ -526,35 +633,30 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-uri@3.1.9: - resolution: {integrity: sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==} - - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true - fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} 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} @@ -563,33 +665,17 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - functional-red-black-tree@1.0.1: - resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} - - 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@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - 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 + 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@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} - has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} + 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==} @@ -599,12 +685,8 @@ 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@4.0.6: - resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} import-fresh@3.3.1: @@ -615,21 +697,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'} @@ -638,10 +709,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'} @@ -649,28 +716,9 @@ 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==} - js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - - js-yaml@3.15.2: - resolution: {integrity: sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==} - hasBin: true - js-yaml@4.3.2: resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} hasBin: true @@ -681,9 +729,6 @@ packages: json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - json-schema-traverse@1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} @@ -694,6 +739,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'} @@ -701,37 +820,26 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - lodash.truncate@4.4.2: - resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} - - 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==} @@ -753,10 +861,6 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -764,48 +868,28 @@ 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==} - 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'} + 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'} - progress@2.0.3: - resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} - engines: {node: '>=0.4.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'} - - regexpp@3.2.0: - resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} - engines: {node: '>=8'} - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - - require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -815,9 +899,9 @@ packages: engines: {node: '>= 0.4'} hasBin: true - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported + 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: @@ -825,17 +909,6 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - - semver@7.8.6: - resolution: {integrity: sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==} - engines: {node: '>=10'} - hasBin: true - - 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'} @@ -848,14 +921,17 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - slice-ansi@4.0.0: - resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} - engines: {node: '>=10'} + 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==} @@ -863,101 +939,148 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - 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'} + 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@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - 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'} - table@6.9.0: - resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==} - engines: {node: '>=10.0.0'} - terser@5.51.2: resolution: {integrity: sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==} engines: {node: '>=10'} hasBin: true - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} + 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==} engines: {node: '>= 0.8.0'} - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - v8-compile-cache@2.4.0: - resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} - - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} + 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 - 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'} + 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 - yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true - yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true - yargs@16.2.2: - resolution: {integrity: sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==} - engines: {node: '>=10'} + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} @@ -965,42 +1088,67 @@ packages: snapshots: - '@babel/code-frame@7.12.11': + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.5)': dependencies: - '@babel/highlight': 7.25.9 + eslint: 9.39.5 + eslint-visitor-keys: 3.4.3 - '@babel/helper-validator-identifier@7.29.7': {} + '@eslint-community/regexpp@4.12.2': {} - '@babel/highlight@7.25.9': + '@eslint/config-array@0.21.2': dependencies: - '@babel/helper-validator-identifier': 7.29.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.1.1 + '@eslint/object-schema': 2.1.7 + debug: 4.4.3 + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color - '@eslint/eslintrc@0.4.3': + '@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: 7.3.1 - globals: 13.24.0 - ignore: 4.0.6 + debug: 4.4.3 + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 import-fresh: 3.3.1 - js-yaml: 3.15.2 + js-yaml: 4.3.2 minimatch: 3.1.5 strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color - '@humanwhocodes/config-array@0.5.0': + '@eslint/js@9.39.5': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': dependencies: - '@humanwhocodes/object-schema': 1.2.1 - debug: 4.4.3(supports-color@8.1.1) - minimatch: 3.1.5 - transitivePeerDependencies: - - supports-color + '@eslint/core': 0.17.0 + levn: 0.4.1 - '@humanwhocodes/object-schema@1.2.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: @@ -1024,6 +1172,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) @@ -1128,127 +1325,113 @@ 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': {} - acorn-jsx@5.3.2(acorn@7.4.1): + '@vitest/expect@4.1.12': dependencies: - acorn: 7.4.1 - - acorn@7.4.1: {} + '@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 - acorn@8.19.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) - ajv@6.15.0: + '@vitest/pretty-format@4.1.12': 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 + tinyrainbow: 3.2.0 - ajv@8.20.0: + '@vitest/runner@4.1.12': dependencies: - fast-deep-equal: 3.1.3 - fast-uri: 3.1.9 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 + '@vitest/utils': 4.1.12 + pathe: 2.0.3 - ansi-colors@4.1.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 - ansi-regex@5.0.1: {} + '@vitest/spy@4.1.12': {} - ansi-styles@3.2.1: + '@vitest/utils@4.1.12': dependencies: - color-convert: 1.9.3 + '@vitest/pretty-format': 4.1.12 + convert-source-map: 2.0.0 + tinyrainbow: 3.2.0 - ansi-styles@4.3.0: + acorn-jsx@5.3.2(acorn@8.19.0): dependencies: - color-convert: 2.0.1 + acorn: 8.19.0 - anymatch@3.1.3: + acorn@8.19.0: {} + + ajv@6.15.0: dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.2 + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 - argparse@1.0.10: + ansi-styles@4.3.0: dependencies: - sprintf-js: 1.0.3 + color-convert: 2.0.1 argparse@2.0.1: {} - astral-regex@2.0.0: {} + assertion-error@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@2.4.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.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@1.9.3: - dependencies: - color-name: 1.1.3 - color-convert@2.0.1: dependencies: color-name: 1.1.4 - color-name@1.1.3: {} - color-name@1.1.4: {} 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 @@ -1275,104 +1458,75 @@ snapshots: dependencies: d3-array: 3.2.4 - 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: {} - - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - - emoji-regex@8.0.0: {} - - enquirer@2.4.1: - dependencies: - ansi-colors: 4.1.3 - strip-ansi: 6.0.1 + detect-libc@2.1.2: {} es-errors@1.3.0: {} - escalade@3.2.0: {} - - escape-string-regexp@1.0.5: {} + es-module-lexer@2.3.2: {} escape-string-regexp@4.0.0: {} - eslint-scope@5.1.1: + eslint-scope@8.4.0: dependencies: esrecurse: 4.3.0 - estraverse: 4.3.0 - - eslint-utils@2.1.0: - dependencies: - eslint-visitor-keys: 1.3.0 + estraverse: 5.3.0 - eslint-visitor-keys@1.3.0: {} + eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@2.1.0: {} + eslint-visitor-keys@4.2.1: {} - eslint@7.32.0: + eslint@9.39.5: dependencies: - '@babel/code-frame': 7.12.11 - '@eslint/eslintrc': 0.4.3 - '@humanwhocodes/config-array': 0.5.0 + '@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) - doctrine: 3.0.0 - enquirer: 2.4.1 + debug: 4.4.3 escape-string-regexp: 4.0.0 - eslint-scope: 5.1.1 - eslint-utils: 2.1.0 - eslint-visitor-keys: 2.1.0 - espree: 7.3.1 + 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: 6.0.1 - functional-red-black-tree: 1.0.1 - glob-parent: 5.1.2 - globals: 13.24.0 - ignore: 4.0.6 - import-fresh: 3.3.1 + 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 - js-yaml: 3.15.2 json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.5 natural-compare: 1.4.0 optionator: 0.9.4 - progress: 2.0.3 - regexpp: 3.2.0 - semver: 7.8.6 - strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 - table: 6.9.0 - text-table: 0.2.0 - v8-compile-cache: 2.4.0 transitivePeerDependencies: - supports-color - espree@7.3.1: + espree@10.4.0: dependencies: - acorn: 7.4.1 - acorn-jsx: 5.3.2(acorn@7.4.1) - eslint-visitor-keys: 1.3.0 - - esprima@4.0.1: {} + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 4.2.1 esquery@1.7.0: dependencies: @@ -1382,82 +1536,56 @@ snapshots: dependencies: estraverse: 5.3.0 - estraverse@4.3.0: {} - estraverse@5.3.0: {} 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: {} - fast-uri@3.1.9: {} - - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 - fill-range@7.1.1: + file-entry-cache@8.0.0: dependencies: - to-regex-range: 5.0.1 + flat-cache: 4.0.1 find-up@5.0.0: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@3.2.0: + flat-cache@4.0.1: dependencies: flatted: 3.4.4 keyv: 4.5.4 - rimraf: 3.0.2 - - flat@5.0.2: {} flatted@3.4.4: {} - fs.realpath@1.0.0: {} - fsevents@2.3.3: optional: true function-bind@1.1.2: {} - functional-red-black-tree@1.0.1: {} - - get-caller-file@2.0.5: {} - - glob-parent@5.1.2: + glob-parent@6.0.2: dependencies: is-glob: 4.0.3 - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.5 - once: 1.4.0 - path-is-absolute: 1.0.1 + globals@14.0.0: {} - 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@13.24.0: - dependencies: - type-fest: 0.20.2 - - has-flag@3.0.0: {} + globals@17.14.0: {} has-flag@4.0.0: {} @@ -1465,9 +1593,7 @@ snapshots: dependencies: function-bind: 1.1.2 - he@1.2.0: {} - - ignore@4.0.6: {} + ignore@5.3.2: {} import-fresh@3.3.1: dependencies: @@ -1476,48 +1602,22 @@ 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-tokens@4.0.0: {} - - js-yaml@3.15.2: - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - js-yaml@4.3.2: dependencies: argparse: 2.0.1 @@ -1526,8 +1626,6 @@ snapshots: json-schema-traverse@0.4.1: {} - json-schema-traverse@1.0.0: {} - json-stable-stringify-without-jsonify@1.0.1: {} keyv@4.5.4: @@ -1539,59 +1637,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: {} - lodash.truncate@4.4.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: @@ -1616,37 +1731,25 @@ snapshots: path-exists@4.0.0: {} - path-is-absolute@1.0.1: {} - path-key@3.1.1: {} path-parse@1.0.7: {} - picocolors@1.1.1: {} + pathe@2.0.3: {} - picomatch@2.3.2: {} + picocolors@1.1.1: {} picomatch@4.0.7: {} - prelude-ls@1.2.1: {} - - progress@2.0.3: {} - - punycode@2.3.1: {} - - randombytes@2.1.0: - dependencies: - safe-buffer: 5.2.1 - - readdirp@3.6.0: + postcss@8.5.32: dependencies: - picomatch: 2.3.2 - - regexpp@3.2.0: {} + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 - require-directory@2.1.1: {} + prelude-ls@1.2.1: {} - require-from-string@2.0.2: {} + punycode@2.3.1: {} resolve-from@4.0.0: {} @@ -1657,9 +1760,26 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - rimraf@3.0.2: + rolldown@1.2.16: dependencies: - glob: 7.2.3 + '@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: @@ -1694,14 +1814,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.67.4 fsevents: 2.3.3 - safe-buffer@5.2.1: {} - - semver@7.8.6: {} - - serialize-javascript@6.0.2: - dependencies: - randombytes: 2.1.0 - serialize-javascript@7.1.4: {} shebang-command@2.0.0: @@ -1710,14 +1822,12 @@ snapshots: shebang-regex@3.0.0: {} - slice-ansi@4.0.0: - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 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 @@ -1725,42 +1835,18 @@ snapshots: source-map@0.6.1: {} - sprintf-js@1.0.3: {} + stackback@0.0.2: {} - 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 + std-env@4.3.0: {} strip-json-comments@3.1.1: {} - supports-color@5.5.0: - dependencies: - has-flag: 3.0.0 - 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: {} - table@6.9.0: - dependencies: - ajv: 8.20.0 - lodash.truncate: 4.4.2 - slice-ansi: 4.0.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - terser@5.51.2: dependencies: '@jridgewell/source-map': 0.3.11 @@ -1768,59 +1854,70 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - text-table@0.2.0: {} + tinybench@2.9.0: {} + + tinyexec@1.3.1: {} - to-regex-range@5.0.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: prelude-ls: 1.2.1 - type-fest@0.20.2: {} - uri-js@4.4.1: dependencies: punycode: 2.3.1 - v8-compile-cache@2.4.0: {} - - 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/.eslintrc.json b/test/.eslintrc.json deleted file mode 100644 index 0a29431..0000000 --- a/test/.eslintrc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "eslint:recommended", - "parserOptions": { - "sourceType": "module", - "ecmaVersion": 8 - }, - "env": { - "mocha": true - }, - "rules": { - "no-sparse-arrays": 0 - } -} diff --git a/test/band-test.js b/test/band-test.js index 2a76cb5..aea01fc 100644 --- a/test/band-test.js +++ b/test/band-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleBand} from "../src/index.js"; -it("scaleBand() has the expected defaults", () => { +test("scaleBand() has the expected defaults", () => { const s = scaleBand(); assert.deepStrictEqual(s.domain(), []); assert.deepStrictEqual(s.range(), [0, 1]); @@ -13,7 +14,7 @@ it("scaleBand() has the expected defaults", () => { assert.strictEqual(s.align(), 0.5); }); -it("band(value) computes discrete bands in a continuous range", () => { +test("band(value) computes discrete bands in a continuous range", () => { const s = scaleBand([0, 960]); assert.strictEqual(s("foo"), undefined); s.domain(["foo", "bar"]); @@ -27,21 +28,21 @@ it("band(value) computes discrete bands in a continuous range", () => { assert.strictEqual(s.bandwidth(), 30); }); -it("band(value) returns undefined for values outside the domain", () => { +test("band(value) returns undefined for values outside the domain", () => { const s = scaleBand(["a", "b", "c"], [0, 1]); assert.strictEqual(s("d"), undefined); assert.strictEqual(s("e"), undefined); assert.strictEqual(s("f"), undefined); }); -it("band(value) does not implicitly add values to the domain", () => { +test("band(value) does not implicitly add values to the domain", () => { const s = scaleBand(["a", "b", "c"], [0, 1]); s("d"); s("e"); assert.deepStrictEqual(s.domain(), ["a", "b", "c"]); }); -it("band.step() returns the distance between the starts of adjacent bands", () => { +test("band.step() returns the distance between the starts of adjacent bands", () => { const s = scaleBand([0, 960]); assert.strictEqual(s.domain(["foo"]).step(), 960); assert.strictEqual(s.domain(["foo", "bar"]).step(), 480); @@ -51,7 +52,7 @@ it("band.step() returns the distance between the starts of adjacent bands", () = assert.strictEqual(s.domain(["foo", "bar"]).step(), 384); }); -it("band.bandwidth() returns the width of the band", () => { +test("band.bandwidth() returns the width of the band", () => { const s = scaleBand([0, 960]); assert.strictEqual(s.domain([]).bandwidth(), 960); assert.strictEqual(s.domain(["foo"]).bandwidth(), 960); @@ -63,7 +64,7 @@ it("band.bandwidth() returns the width of the band", () => { assert.strictEqual(s.domain(["foo", "bar"]).bandwidth(), 192); }); -it("band.domain([]) computes reasonable band and step values", () => { +test("band.domain([]) computes reasonable band and step values", () => { const s = scaleBand([0, 960]).domain([]); assert.strictEqual(s.step(), 960); assert.strictEqual(s.bandwidth(), 960); @@ -75,7 +76,7 @@ it("band.domain([]) computes reasonable band and step values", () => { assert.strictEqual(s.bandwidth(), 0); }); -it("band.domain([value]) computes a reasonable singleton band, even with padding", () => { +test("band.domain([value]) computes a reasonable singleton band, even with padding", () => { const s = scaleBand([0, 960]).domain(["foo"]); assert.strictEqual(s("foo"), 0); assert.strictEqual(s.step(), 960); @@ -90,7 +91,7 @@ it("band.domain([value]) computes a reasonable singleton band, even with padding assert.strictEqual(s.bandwidth(), 0); }); -it("band.domain(values) recomputes the bands", () => { +test("band.domain(values) recomputes the bands", () => { const s = scaleBand().domain(["a", "b", "c"]).rangeRound([0, 100]); assert.deepStrictEqual(s.domain().map(s), [1, 34, 67]); assert.strictEqual(s.bandwidth(), 33); @@ -99,18 +100,18 @@ it("band.domain(values) recomputes the bands", () => { assert.strictEqual(s.bandwidth(), 25); }); -it("band.domain(domain) accepts an iterable", () => { +test("band.domain(domain) accepts an iterable", () => { assert.deepStrictEqual(scaleBand().domain(new Set(["a", "b", "c"])).domain(), ["a", "b", "c"]); }); -it("band.domain(values) makes a copy of the specified domain values", () => { +test("band.domain(values) makes a copy of the specified domain values", () => { const domain = ["red", "green"]; const s = scaleBand().domain(domain); domain.push("blue"); assert.deepStrictEqual(s.domain(), ["red", "green"]); }); -it("band.domain() returns a copy of the domain", () => { +test("band.domain() returns a copy of the domain", () => { const s = scaleBand().domain(["red", "green"]); const domain = s.domain(); assert.deepStrictEqual(domain, ["red", "green"]); @@ -118,7 +119,7 @@ it("band.domain() returns a copy of the domain", () => { assert.deepStrictEqual(s.domain(), ["red", "green"]); }); -it("band.range(values) can be descending", () => { +test("band.range(values) can be descending", () => { const s = scaleBand().domain(["a", "b", "c"]).range([120, 0]); assert.deepStrictEqual(s.domain().map(s), [80, 40, 0]); assert.strictEqual(s.bandwidth(), 40); @@ -127,14 +128,14 @@ it("band.range(values) can be descending", () => { assert.strictEqual(s.bandwidth(), 30); }); -it("band.range(values) makes a copy of the specified range values", () => { +test("band.range(values) makes a copy of the specified range values", () => { const range = [1, 2]; const s = scaleBand().range(range); range.push("blue"); assert.deepStrictEqual(s.range(), [1, 2]); }); -it("band.range() returns a copy of the range", () => { +test("band.range() returns a copy of the range", () => { const s = scaleBand().range([1, 2]); const range = s.range(); assert.deepStrictEqual(range, [1, 2]); @@ -142,27 +143,27 @@ it("band.range() returns a copy of the range", () => { assert.deepStrictEqual(s.range(), [1, 2]); }); -it("band.range(values) accepts an iterable", () => { +test("band.range(values) accepts an iterable", () => { const s = scaleBand().range(new Set([1, 2])); assert.deepStrictEqual(s.range(), [1, 2]); }); -it("band.rangeRound(values) accepts an iterable", () => { +test("band.rangeRound(values) accepts an iterable", () => { const s = scaleBand().rangeRound(new Set([1, 2])); assert.deepStrictEqual(s.range(), [1, 2]); }); -it("band.range(values) coerces values to numbers", () => { +test("band.range(values) coerces values to numbers", () => { const s = scaleBand().range(["1.0", "2.0"]); assert.deepStrictEqual(s.range(), [1, 2]); }); -it("band.rangeRound(values) coerces values to numbers", () => { +test("band.rangeRound(values) coerces values to numbers", () => { const s = scaleBand().rangeRound(["1.0", "2.0"]); assert.deepStrictEqual(s.range(), [1, 2]); }); -it("band.paddingInner(p) specifies the inner padding p", () => { +test("band.paddingInner(p) specifies the inner padding p", () => { const s = scaleBand().domain(["a", "b", "c"]).range([120, 0]).paddingInner(0.1).round(true); assert.deepStrictEqual(s.domain().map(s), [83, 42, 1]); assert.strictEqual(s.bandwidth(), 37); @@ -171,7 +172,7 @@ it("band.paddingInner(p) specifies the inner padding p", () => { assert.strictEqual(s.bandwidth(), 34); }); -it("band.paddingInner(p) coerces p to a number <= 1", () => { +test("band.paddingInner(p) coerces p to a number <= 1", () => { const s = scaleBand(); assert.strictEqual(s.paddingInner("1.0").paddingInner(), 1); assert.strictEqual(s.paddingInner("-1.0").paddingInner(), -1); @@ -179,7 +180,7 @@ it("band.paddingInner(p) coerces p to a number <= 1", () => { assert(Number.isNaN(s.paddingInner(NaN).paddingInner())); }); -it("band.paddingOuter(p) specifies the outer padding p", () => { +test("band.paddingOuter(p) specifies the outer padding p", () => { const s = scaleBand().domain(["a", "b", "c"]).range([120, 0]).paddingInner(0.2).paddingOuter(0.1); assert.deepStrictEqual(s.domain().map(s), [84, 44, 4]); assert.strictEqual(s.bandwidth(), 32); @@ -188,7 +189,7 @@ it("band.paddingOuter(p) specifies the outer padding p", () => { assert.strictEqual(s.bandwidth(), 20); }); -it("band.paddingOuter(p) coerces p to a number", () => { +test("band.paddingOuter(p) coerces p to a number", () => { const s = scaleBand(); assert.strictEqual(s.paddingOuter("1.0").paddingOuter(), 1); assert.strictEqual(s.paddingOuter("-1.0").paddingOuter(), -1); @@ -196,13 +197,13 @@ it("band.paddingOuter(p) coerces p to a number", () => { assert(Number.isNaN(s.paddingOuter(NaN).paddingOuter())); }); -it("band.rangeRound(values) is an alias for band.range(values).round(true)", () => { +test("band.rangeRound(values) is an alias for band.range(values).round(true)", () => { const s = scaleBand().domain(["a", "b", "c"]).rangeRound([0, 100]); assert.deepStrictEqual(s.range(), [0, 100]); assert.strictEqual(s.round(), true); }); -it("band.round(true) computes discrete rounded bands in a continuous range", () => { +test("band.round(true) computes discrete rounded bands in a continuous range", () => { const s = scaleBand().domain(["a", "b", "c"]).range([0, 100]).round(true); assert.deepStrictEqual(s.domain().map(s), [1, 34, 67]); assert.strictEqual(s.bandwidth(), 33); @@ -211,7 +212,7 @@ it("band.round(true) computes discrete rounded bands in a continuous range", () assert.strictEqual(s.bandwidth(), 25); }); -it("band.copy() copies all fields", () => { +test("band.copy() copies all fields", () => { const s1 = scaleBand().domain(["red", "green"]).range([1, 2]).round(true).paddingInner(0.1).paddingOuter(0.2); const s2 = s1.copy(); assert.deepStrictEqual(s2.domain(), s1.domain()); @@ -221,7 +222,7 @@ it("band.copy() copies all fields", () => { assert.strictEqual(s2.paddingOuter(), s1.paddingOuter()); }); -it("band.copy() isolates changes to the domain", () => { +test("band.copy() isolates changes to the domain", () => { const s1 = scaleBand().domain(["foo", "bar"]).range([0, 2]); const s2 = s1.copy(); s1.domain(["red", "blue"]); @@ -234,7 +235,7 @@ it("band.copy() isolates changes to the domain", () => { assert.deepStrictEqual(s2.domain().map(s2), [0, 1]); }); -it("band.copy() isolates changes to the range", () => { +test("band.copy() isolates changes to the range", () => { const s1 = scaleBand().domain(["foo", "bar"]).range([0, 2]); const s2 = s1.copy(); s1.range([3, 5]); diff --git a/test/diverging-test.js b/test/diverging-test.js index a3de2be..7dac75e 100644 --- a/test/diverging-test.js +++ b/test/diverging-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleDiverging, scaleDivergingLog} from "../src/index.js"; -it("scaleDiverging() has the expected defaults", () => { +test("scaleDiverging() has the expected defaults", () => { const s = scaleDiverging(); assert.deepStrictEqual(s.domain(), [0, 0.5, 1]); assert.strictEqual(s.interpolator()(0.42), 0.42); @@ -13,7 +14,7 @@ it("scaleDiverging() has the expected defaults", () => { assert.strictEqual(s( 1.5), 1.5); }); -it("diverging.clamp(true) enables clamping", () => { +test("diverging.clamp(true) enables clamping", () => { const s = scaleDiverging().clamp(true); assert.strictEqual(s.clamp(), true); assert.strictEqual(s(-0.5), 0.0); @@ -23,7 +24,7 @@ it("diverging.clamp(true) enables clamping", () => { assert.strictEqual(s( 1.5), 1.0); }); -it("diverging.domain() coerces domain values to numbers", () => { +test("diverging.domain() coerces domain values to numbers", () => { const s = scaleDiverging().domain(["-1.20", " 0", "2.40"]); assert.deepStrictEqual(s.domain(), [-1.2, 0, 2.4]); assert.strictEqual(s(-1.2), 0.000); @@ -31,12 +32,12 @@ it("diverging.domain() coerces domain values to numbers", () => { assert.strictEqual(s( 2.4), 1.000); }); -it("diverging.domain() accepts an iterable", () => { +test("diverging.domain() accepts an iterable", () => { const s = scaleDiverging().domain(new Set([-1.2, 0, 2.4])); assert.deepStrictEqual(s.domain(), [-1.2, 0, 2.4]); }); -it("diverging.domain() handles a degenerate domain", () => { +test("diverging.domain() handles a degenerate domain", () => { const s = scaleDiverging().domain([2, 2, 3]); assert.deepStrictEqual(s.domain(), [2, 2, 3]); assert.strictEqual(s(-1.2), 0.5); @@ -52,7 +53,7 @@ it("diverging.domain() handles a degenerate domain", () => { assert.strictEqual(s( 2.4), 0.5); }); -it("diverging.domain() handles a descending domain", () => { +test("diverging.domain() handles a descending domain", () => { const s = scaleDiverging().domain([4, 2, 1]); assert.deepStrictEqual(s.domain(), [4, 2, 1]); assert.strictEqual(s(1.2), 0.9); @@ -60,7 +61,7 @@ it("diverging.domain() handles a descending domain", () => { assert.strictEqual(s(3.0), 0.25); }); -it("divergingLog.domain() handles a descending domain", () => { +test("divergingLog.domain() handles a descending domain", () => { const s = scaleDivergingLog().domain([3, 2, 1]); assert.deepStrictEqual(s.domain(), [3, 2, 1]); assert.strictEqual(s(1.2), 1 - 0.1315172029168969); @@ -68,7 +69,7 @@ it("divergingLog.domain() handles a descending domain", () => { assert.strictEqual(s(2.8), 1 - 0.9149213210862197); }); -it("divergingLog.domain() handles a descending negative domain", () => { +test("divergingLog.domain() handles a descending negative domain", () => { const s = scaleDivergingLog().domain([-1, -2, -3]); assert.deepStrictEqual(s.domain(), [-1, -2, -3]); assert.strictEqual(s(-1.2), 0.1315172029168969); @@ -76,7 +77,7 @@ it("divergingLog.domain() handles a descending negative domain", () => { assert.strictEqual(s(-2.8), 0.9149213210862197); }); -it("diverging.domain() handles a non-numeric domain", () => { +test("diverging.domain() handles a non-numeric domain", () => { const s = scaleDiverging().domain([NaN, 2, 3]); assert.strictEqual(isNaN(s.domain()[0]), true); assert.strictEqual(isNaN(s(-1.2)), true); @@ -92,12 +93,12 @@ it("diverging.domain() handles a non-numeric domain", () => { assert.strictEqual(isNaN(s( 2.4)), true); }); -it("diverging.domain() only considers the first three elements of the domain", () => { +test("diverging.domain() only considers the first three elements of the domain", () => { const s = scaleDiverging().domain([-1, 100, 200, 3]); assert.deepStrictEqual(s.domain(), [-1, 100, 200]); }); -it("diverging.copy() returns an isolated copy of the scale", () => { +test("diverging.copy() returns an isolated copy of the scale", () => { const s1 = scaleDiverging().domain([1, 2, 3]).clamp(true); const s2 = s1.copy(); assert.deepStrictEqual(s2.domain(), [1, 2, 3]); @@ -112,12 +113,12 @@ it("diverging.copy() returns an isolated copy of the scale", () => { assert.deepStrictEqual(s1.clamp(), false); }); -it("diverging.range() returns the computed range", () => { +test("diverging.range() returns the computed range", () => { const s = scaleDiverging(function(t) { return t * 2 + 1; }); assert.deepStrictEqual(s.range(), [1, 2, 3]); }); -it("diverging.interpolator(interpolator) sets the interpolator", () => { +test("diverging.interpolator(interpolator) sets the interpolator", () => { const i0 = function(t) { return t; }; const i1 = function(t) { return t * 2; }; const s = scaleDiverging(i0); @@ -129,19 +130,19 @@ it("diverging.interpolator(interpolator) sets the interpolator", () => { assert.strictEqual(s( 0.5), 1.0); }); -it("diverging.range(range) sets the interpolator", () => { +test("diverging.range(range) sets the interpolator", () => { const s = scaleDiverging().range([1, 3, 10]); assert.strictEqual(s.interpolator()(0.5), 3); assert.deepStrictEqual(s.range(), [1, 3, 10]); }); -it("diverging.range(range) ignores additional values", () => { +test("diverging.range(range) ignores additional values", () => { const s = scaleDiverging().range([1, 3, 10, 20]); assert.strictEqual(s.interpolator()(0.5), 3); assert.deepStrictEqual(s.range(), [1, 3, 10]); }); -it("scaleDiverging(range) sets the interpolator", () => { +test("scaleDiverging(range) sets the interpolator", () => { const s = scaleDiverging([1, 3, 10]); assert.strictEqual(s.interpolator()(0.5), 3); assert.deepStrictEqual(s.range(), [1, 3, 10]); diff --git a/test/identity-test.js b/test/identity-test.js index 923f512..b1b79a9 100644 --- a/test/identity-test.js +++ b/test/identity-test.js @@ -1,19 +1,20 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleIdentity} from "../src/index.js"; -it("scaleIdentity() has the expected defaults", () => { +test("scaleIdentity() has the expected defaults", () => { const s = scaleIdentity(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); }); -it("scaleIdentity(range) sets the domain and range", () => { +test("scaleIdentity(range) sets the domain and range", () => { const s = scaleIdentity([1, 2]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.deepStrictEqual(s.range(), [1, 2]); }); -it("identity(x) is the identity function", () => { +test("identity(x) is the identity function", () => { const s = scaleIdentity().domain([1, 2]); assert.strictEqual(s(0.5), 0.5); assert.strictEqual(s(1), 1); @@ -22,12 +23,12 @@ it("identity(x) is the identity function", () => { assert.strictEqual(s(2.5), 2.5); }); -it("identity(x) coerces input to a number", () => { +test("identity(x) coerces input to a number", () => { const s = scaleIdentity().domain([1, 2]); assert.strictEqual(s("2"), 2); }); -it("identity(undefined) returns unknown", () => { +test("identity(undefined) returns unknown", () => { const s = scaleIdentity().unknown(-1); assert.strictEqual(s(undefined), -1); assert.strictEqual(s(null), -1); @@ -36,7 +37,7 @@ it("identity(undefined) returns unknown", () => { assert.strictEqual(s(0.4), 0.4); }); -it("identity.invert(y) is the identity function", () => { +test("identity.invert(y) is the identity function", () => { const s = scaleIdentity().domain([1, 2]); assert.strictEqual(s.invert(0.5), 0.5); assert.strictEqual(s.invert(1), 1); @@ -45,7 +46,7 @@ it("identity.invert(y) is the identity function", () => { assert.strictEqual(s.invert(2.5), 2.5); }); -it("identity.invert(y) coerces range value to numbers", () => { +test("identity.invert(y) coerces range value to numbers", () => { const s = scaleIdentity().range(["0", "2"]); assert.strictEqual(s.invert("1"), 1); s.range([new Date(1990, 0, 1), new Date(1991, 0, 1)]); @@ -54,12 +55,12 @@ it("identity.invert(y) coerces range value to numbers", () => { assert(isNaN(s.invert("#999"))); }); -it("identity.invert(y) coerces input to a number", () => { +test("identity.invert(y) coerces input to a number", () => { const s = scaleIdentity().domain([1, 2]); assert.strictEqual(s.invert("2"), 2); }); -it("identity.domain() is an alias for range()", () => { +test("identity.domain() is an alias for range()", () => { const s = scaleIdentity(); assert.strictEqual(s.domain, s.range); assert.deepStrictEqual(s.domain(), s.range()); @@ -69,14 +70,14 @@ it("identity.domain() is an alias for range()", () => { assert.deepStrictEqual(s.domain(), [-10, 0, 100]); }); -it("identity.domain() defaults to [0, 1]", () => { +test("identity.domain() defaults to [0, 1]", () => { const s = scaleIdentity(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); assert.strictEqual(s(0.5), 0.5); }); -it("identity.domain() coerces values to numbers", () => { +test("identity.domain() coerces values to numbers", () => { const s = scaleIdentity().domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]); assert.strictEqual(typeof s.domain()[0], "number"); assert.strictEqual(typeof s.domain()[1], "number"); @@ -109,13 +110,13 @@ it("identity.domain() coerces values to numbers", () => { assert.strictEqual(s(0.5), 0.5); }); -it("identity.domain() accepts an iterable", () => { +test("identity.domain() accepts an iterable", () => { const s = scaleIdentity().domain(new Set([1, 2])); assert.deepStrictEqual(s.domain(), [1, 2]); assert.deepStrictEqual(s.range(), [1, 2]); }); -it("identity.domain() can specify a polyidentity domain and range", () => { +test("identity.domain() can specify a polyidentity domain and range", () => { const s = scaleIdentity().domain([-10, 0, 100]); assert.deepStrictEqual(s.domain(), [-10, 0, 100]); assert.strictEqual(s(-5), -5); @@ -128,13 +129,13 @@ it("identity.domain() can specify a polyidentity domain and range", () => { assert.strictEqual(s(75), 75); }); -it("identity.domain() does not affect the identity function", () => { +test("identity.domain() does not affect the identity function", () => { const s = scaleIdentity().domain([Infinity, NaN]); assert.strictEqual(s(42), 42); assert.strictEqual(s.invert(-42), -42); }); -it("identity.ticks(count) generates ticks of varying degree", () => { +test("identity.ticks(count) generates ticks of varying degree", () => { const s = scaleIdentity(); assert.deepStrictEqual(s.ticks(1).map(s.tickFormat(1)), ["0", "1"]); assert.deepStrictEqual(s.ticks(2).map(s.tickFormat(2)), ["0.0", "0.5", "1.0"]); @@ -147,7 +148,7 @@ it("identity.ticks(count) generates ticks of varying degree", () => { assert.deepStrictEqual(s.ticks(10).map(s.tickFormat(10)), ["0.0", "0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1.0"].reverse()); }); -it("identity.tickFormat(count) formats ticks with the appropriate precision", () => { +test("identity.tickFormat(count) formats ticks with the appropriate precision", () => { const s = scaleIdentity().domain([0.123456789, 1.23456789]); assert.strictEqual(s.tickFormat(1)(s.ticks(1)[0]), "1"); assert.strictEqual(s.tickFormat(2)(s.ticks(2)[0]), "0.5"); @@ -160,7 +161,7 @@ it("identity.tickFormat(count) formats ticks with the appropriate precision", () assert.strictEqual(s.tickFormat(256)(s.ticks(256)[0]), "0.125"); }); -it("identity.copy() isolates changes to the domain or range", () => { +test("identity.copy() isolates changes to the domain or range", () => { const s1 = scaleIdentity(); const s2 = s1.copy(); const s3 = s1.copy(); diff --git a/test/linear-test.js b/test/linear-test.js index 1ea9407..fbd1811 100644 --- a/test/linear-test.js +++ b/test/linear-test.js @@ -1,8 +1,9 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleLinear} from "../src/index.js"; import {roundEpsilon} from "./roundEpsilon.js"; -it("scaleLinear() has the expected defaults", () => { +test("scaleLinear() has the expected defaults", () => { const s = scaleLinear(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -11,40 +12,40 @@ it("scaleLinear() has the expected defaults", () => { assert.deepStrictEqual(s.interpolate()({array: ["red"]}, {array: ["blue"]})(0.5), {array: ["rgb(128, 0, 128)"]}); }); -it("scaleLinear(range) sets the range", () => { +test("scaleLinear(range) sets the range", () => { const s = scaleLinear([1, 2]); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [1, 2]); assert.strictEqual(s(0.5), 1.5); }); -it("scaleLinear(domain, range) sets the domain and range", () => { +test("scaleLinear(domain, range) sets the domain and range", () => { const s = scaleLinear([1, 2], [3, 4]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.deepStrictEqual(s.range(), [3, 4]); assert.strictEqual(s(1.5), 3.5); }); -it("linear(x) maps a domain value x to a range value y", () => { +test("linear(x) maps a domain value x to a range value y", () => { assert.strictEqual(scaleLinear().range([1, 2])(0.5), 1.5); }); -it("linear(x) ignores extra range values if the domain is smaller than the range", () => { +test("linear(x) ignores extra range values if the domain is smaller than the range", () => { assert.strictEqual(scaleLinear().domain([-10, 0]).range([0, 1, 2]).clamp(true)(-5), 0.5); assert.strictEqual(scaleLinear().domain([-10, 0]).range([0, 1, 2]).clamp(true)(50), 1); }); -it("linear(x) ignores extra domain values if the range is smaller than the domain", () => { +test("linear(x) ignores extra domain values if the range is smaller than the domain", () => { assert.strictEqual(scaleLinear().domain([-10, 0, 100]).range([0, 1]).clamp(true)(-5), 0.5); assert.strictEqual(scaleLinear().domain([-10, 0, 100]).range([0, 1]).clamp(true)(50), 1); }); -it("linear(x) maps an empty domain to the middle of the range", () => { +test("linear(x) maps an empty domain to the middle of the range", () => { assert.strictEqual(scaleLinear().domain([0, 0]).range([1, 2])(0), 1.5); assert.strictEqual(scaleLinear().domain([0, 0]).range([2, 1])(1), 1.5); }); -it("linear(x) can map a bilinear domain with two values to the corresponding range", () => { +test("linear(x) can map a bilinear domain with two values to the corresponding range", () => { const s = scaleLinear().domain([1, 2]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.strictEqual(s(0.5), -0.5); @@ -59,7 +60,7 @@ it("linear(x) can map a bilinear domain with two values to the corresponding ran assert.strictEqual(s.invert( 1.5), 2.5); }); -it("linear(x) can map a polylinear domain with more than two values to the corresponding range", () => { +test("linear(x) can map a polylinear domain with more than two values to the corresponding range", () => { const s = scaleLinear().domain([-10, 0, 100]).range(["red", "white", "green"]); assert.deepStrictEqual(s.domain(), [-10, 0, 100]); assert.strictEqual(s(-5), "rgb(255, 128, 128)"); @@ -77,42 +78,42 @@ it("linear(x) can map a polylinear domain with more than two values to the corre assert.strictEqual(s.invert(3), 1.5); }); -it("linear.invert(y) maps a range value y to a domain value x", () => { +test("linear.invert(y) maps a range value y to a domain value x", () => { assert.strictEqual(scaleLinear().range([1, 2]).invert(1.5), 0.5); }); -it("linear.invert(y) maps an empty range to the middle of the domain", () => { +test("linear.invert(y) maps an empty range to the middle of the domain", () => { assert.strictEqual(scaleLinear().domain([1, 2]).range([0, 0]).invert(0), 1.5); assert.strictEqual(scaleLinear().domain([2, 1]).range([0, 0]).invert(1), 1.5); }); -it("linear.invert(y) coerces range values to numbers", () => { +test("linear.invert(y) coerces range values to numbers", () => { assert.strictEqual(scaleLinear().range(["0", "2"]).invert("1"), 0.5); assert.strictEqual(scaleLinear().range([new Date(1990, 0, 1), new Date(1991, 0, 1)]).invert(new Date(1990, 6, 2, 13)), 0.5); }); -it("linear.invert(y) returns NaN if the range is not coercible to number", () => { +test("linear.invert(y) returns NaN if the range is not coercible to number", () => { assert(isNaN(scaleLinear().range(["#000", "#fff"]).invert("#999"))); assert(isNaN(scaleLinear().range([0, "#fff"]).invert("#999"))); }); -it("linear.domain(domain) accepts an array of numbers", () => { +test("linear.domain(domain) accepts an array of numbers", () => { assert.deepStrictEqual(scaleLinear().domain([]).domain(), []); assert.deepStrictEqual(scaleLinear().domain([1, 0]).domain(), [1, 0]); assert.deepStrictEqual(scaleLinear().domain([1, 2, 3]).domain(), [1, 2, 3]); }); -it("linear.domain(domain) coerces domain values to numbers", () => { +test("linear.domain(domain) coerces domain values to numbers", () => { assert.deepStrictEqual(scaleLinear().domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]).domain(), [631180800000, 662716800000]); assert.deepStrictEqual(scaleLinear().domain(["0.0", "1.0"]).domain(), [0, 1]); assert.deepStrictEqual(scaleLinear().domain([new Number(0), new Number(1)]).domain(), [0, 1]); }); -it("linear.domain(domain) accepts an iterable", () => { +test("linear.domain(domain) accepts an iterable", () => { assert.deepStrictEqual(scaleLinear().domain(new Set([1, 2])).domain(), [1, 2]); }); -it("linear.domain(domain) makes a copy of domain values", () => { +test("linear.domain(domain) makes a copy of domain values", () => { const d = [1, 2], s = scaleLinear().domain(d); assert.deepStrictEqual(s.domain(), [1, 2]); d.push(3); @@ -120,24 +121,24 @@ it("linear.domain(domain) makes a copy of domain values", () => { assert.deepStrictEqual(d, [1, 2, 3]); }); -it("linear.domain() returns a copy of domain values", () => { +test("linear.domain() returns a copy of domain values", () => { const s = scaleLinear(), d = s.domain(); assert.deepStrictEqual(d, [0, 1]); d.push(3); assert.deepStrictEqual(s.domain(), [0, 1]); }); -it("linear.range(range) does not coerce range to numbers", () => { +test("linear.range(range) does not coerce range to numbers", () => { const s = scaleLinear().range(["0px", "2px"]); assert.deepStrictEqual(s.range(), ["0px", "2px"]); assert.strictEqual(s(0.5), "1px"); }); -it("linear.range(range) accepts an iterable", () => { +test("linear.range(range) accepts an iterable", () => { assert.deepStrictEqual(scaleLinear().range(new Set([1, 2])).range(), [1, 2]); }); -it("linear.range(range) can accept range values as colors", () => { +test("linear.range(range) can accept range values as colors", () => { assert.strictEqual(scaleLinear().range(["red", "blue"])(0.5), "rgb(128, 0, 128)"); assert.strictEqual(scaleLinear().range(["#ff0000", "#0000ff"])(0.5), "rgb(128, 0, 128)"); assert.strictEqual(scaleLinear().range(["#f00", "#00f"])(0.5), "rgb(128, 0, 128)"); @@ -146,12 +147,12 @@ it("linear.range(range) can accept range values as colors", () => { assert.strictEqual(scaleLinear().range(["hsl(0,100%,50%)", "hsl(240,100%,50%)"])(0.5), "rgb(128, 0, 128)"); }); -it("linear.range(range) can accept range values as arrays or objects", () => { +test("linear.range(range) can accept range values as arrays or objects", () => { assert.deepStrictEqual(scaleLinear().range([{color: "red"}, {color: "blue"}])(0.5), {color: "rgb(128, 0, 128)"}); assert.deepStrictEqual(scaleLinear().range([["red"], ["blue"]])(0.5), ["rgb(128, 0, 128)"]); }); -it("linear.range(range) makes a copy of range values", () => { +test("linear.range(range) makes a copy of range values", () => { const r = [1, 2], s = scaleLinear().range(r); assert.deepStrictEqual(s.range(), [1, 2]); r.push(3); @@ -159,22 +160,22 @@ it("linear.range(range) makes a copy of range values", () => { assert.deepStrictEqual(r, [1, 2, 3]); }); -it("linear.range() returns a copy of range values", () => { +test("linear.range() returns a copy of range values", () => { const s = scaleLinear(), r = s.range(); assert.deepStrictEqual(r, [0, 1]); r.push(3); assert.deepStrictEqual(s.range(), [0, 1]); }); -it("linear.rangeRound(range) is an alias for linear.range(range).interpolate(interpolateRound)", () => { +test("linear.rangeRound(range) is an alias for linear.range(range).interpolate(interpolateRound)", () => { assert.strictEqual(scaleLinear().rangeRound([0, 10])(0.59), 6); }); -it("linear.rangeRound(range) accepts an iterable", () => { +test("linear.rangeRound(range) accepts an iterable", () => { assert.deepStrictEqual(scaleLinear().rangeRound(new Set([1, 2])).range(), [1, 2]); }); -it("linear.unknown(value) sets the return value for undefined, null, and NaN input", () => { +test("linear.unknown(value) sets the return value for undefined, null, and NaN input", () => { const s = scaleLinear().unknown(-1); assert.strictEqual(s(null), -1); assert.strictEqual(s(undefined), -1); @@ -183,7 +184,7 @@ it("linear.unknown(value) sets the return value for undefined, null, and NaN inp assert.strictEqual(s(0.4), 0.4); }); -it("linear.clamp() is false by default", () => { +test("linear.clamp() is false by default", () => { assert.strictEqual(scaleLinear().clamp(), false); assert.strictEqual(scaleLinear().range([10, 20])(2), 30); assert.strictEqual(scaleLinear().range([10, 20])(-1), 0); @@ -191,36 +192,36 @@ it("linear.clamp() is false by default", () => { assert.strictEqual(scaleLinear().range([10, 20]).invert(0), -1); }); -it("linear.clamp(true) restricts output values to the range", () => { +test("linear.clamp(true) restricts output values to the range", () => { assert.strictEqual(scaleLinear().clamp(true).range([10, 20])(2), 20); assert.strictEqual(scaleLinear().clamp(true).range([10, 20])(-1), 10); }); -it("linear.clamp(true) restricts input values to the domain", () => { +test("linear.clamp(true) restricts input values to the domain", () => { assert.strictEqual(scaleLinear().clamp(true).range([10, 20]).invert(30), 1); assert.strictEqual(scaleLinear().clamp(true).range([10, 20]).invert(0), 0); }); -it("linear.clamp(clamp) coerces the specified clamp value to a boolean", () => { +test("linear.clamp(clamp) coerces the specified clamp value to a boolean", () => { assert.strictEqual(scaleLinear().clamp("true").clamp(), true); assert.strictEqual(scaleLinear().clamp(1).clamp(), true); assert.strictEqual(scaleLinear().clamp("").clamp(), false); assert.strictEqual(scaleLinear().clamp(0).clamp(), false); }); -it("linear.interpolate(interpolate) takes a custom interpolator factory", () => { +test("linear.interpolate(interpolate) takes a custom interpolator factory", () => { function interpolate(a, b) { return function(t) { return [a, b, t]; }; } const s = scaleLinear().domain([10, 20]).range(["a", "b"]).interpolate(interpolate); assert.strictEqual(s.interpolate(), interpolate); assert.deepStrictEqual(s(15), ["a", "b", 0.5]); }); -it("linear.nice() is an alias for linear.nice(10)", () => { +test("linear.nice() is an alias for linear.nice(10)", () => { assert.deepStrictEqual(scaleLinear().domain([0, 0.96]).nice().domain(), [0, 1]); assert.deepStrictEqual(scaleLinear().domain([0, 96]).nice().domain(), [0, 100]); }); -it("linear.nice(count) extends the domain to match the desired ticks", () => { +test("linear.nice(count) extends the domain to match the desired ticks", () => { assert.deepStrictEqual(scaleLinear().domain([0, 0.96]).nice(10).domain(), [0, 1]); assert.deepStrictEqual(scaleLinear().domain([0, 96]).nice(10).domain(), [0, 100]); assert.deepStrictEqual(scaleLinear().domain([0.96, 0]).nice(10).domain(), [1, 0]); @@ -232,7 +233,7 @@ it("linear.nice(count) extends the domain to match the desired ticks", () => { assert.deepStrictEqual(scaleLinear().domain([-0.1, 51.1]).nice(8).domain(), [-10, 60]); }); -it("linear.nice(count) nices the domain, extending it to round numbers", () => { +test("linear.nice(count) nices the domain, extending it to round numbers", () => { assert.deepStrictEqual(scaleLinear().domain([1.1, 10.9]).nice(10).domain(), [1, 11]); assert.deepStrictEqual(scaleLinear().domain([10.9, 1.1]).nice(10).domain(), [11, 1]); assert.deepStrictEqual(scaleLinear().domain([0.7, 11.001]).nice(10).domain(), [0, 12]); @@ -242,23 +243,23 @@ it("linear.nice(count) nices the domain, extending it to round numbers", () => { assert.deepStrictEqual(scaleLinear().domain([0, 15]).nice(5).domain(), [0, 20]); }); -it("linear.nice(count) has no effect on degenerate domains", () => { +test("linear.nice(count) has no effect on degenerate domains", () => { assert.deepStrictEqual(scaleLinear().domain([0, 0]).nice(10).domain(), [0, 0]); assert.deepStrictEqual(scaleLinear().domain([0.5, 0.5]).nice(10).domain(), [0.5, 0.5]); }); -it("linear.nice(count) nicing a polylinear domain only affects the extent", () => { +test("linear.nice(count) nicing a polylinear domain only affects the extent", () => { assert.deepStrictEqual(scaleLinear().domain([1.1, 1, 2, 3, 10.9]).nice(10).domain(), [1, 1, 2, 3, 11]); assert.deepStrictEqual(scaleLinear().domain([123.1, 1, 2, 3, -0.9]).nice(10).domain(), [130, 1, 2, 3, -10]); }); -it("linear.nice(count) accepts a tick count to control nicing step", () => { +test("linear.nice(count) accepts a tick count to control nicing step", () => { assert.deepStrictEqual(scaleLinear().domain([12, 87]).nice(5).domain(), [0, 100]); assert.deepStrictEqual(scaleLinear().domain([12, 87]).nice(10).domain(), [10, 90]); assert.deepStrictEqual(scaleLinear().domain([12, 87]).nice(100).domain(), [12, 87]); }); -it("linear.ticks(count) returns the expected ticks for an ascending domain", () => { +test("linear.ticks(count) returns the expected ticks for an ascending domain", () => { const s = scaleLinear(); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); @@ -283,7 +284,7 @@ it("linear.ticks(count) returns the expected ticks for an ascending domain", () assert.deepStrictEqual(s.ticks(1), [ 0 ]); }); -it("linear.ticks(count) returns the expected ticks for a descending domain", () => { +test("linear.ticks(count) returns the expected ticks for a descending domain", () => { const s = scaleLinear().domain([1, 0]); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0].reverse()); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0].reverse()); @@ -308,7 +309,7 @@ it("linear.ticks(count) returns the expected ticks for a descending domain", () assert.deepStrictEqual(s.ticks(1), [ 0 ].reverse()); }); -it("linear.ticks(count) returns the expected ticks for a polylinear domain", () => { +test("linear.ticks(count) returns the expected ticks for a polylinear domain", () => { const s = scaleLinear().domain([0, 0.25, 0.9, 1]); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); @@ -333,7 +334,7 @@ it("linear.ticks(count) returns the expected ticks for a polylinear domain", () assert.deepStrictEqual(s.ticks(1), [ 0 ]); }); -it("linear.ticks(X) spans linear.nice(X).domain()", () => { +test("linear.ticks(X) spans linear.nice(X).domain()", () => { function check(domain, count) { const s = scaleLinear().domain(domain).nice(count); const ticks = s.ticks(count); @@ -358,7 +359,7 @@ it("linear.ticks(X) spans linear.nice(X).domain()", () => { check([11, 21], 2); }) -it("linear.ticks(count) returns the empty array if count is not a positive integer", () => { +test("linear.ticks(count) returns the empty array if count is not a positive integer", () => { const s = scaleLinear(); assert.deepStrictEqual(s.ticks(NaN), []); assert.deepStrictEqual(s.ticks(0), []); @@ -366,30 +367,30 @@ it("linear.ticks(count) returns the empty array if count is not a positive integ assert.deepStrictEqual(s.ticks(Infinity), []); }); -it("linear.ticks() is an alias for linear.ticks(10)", () => { +test("linear.ticks() is an alias for linear.ticks(10)", () => { const s = scaleLinear(); assert.deepStrictEqual(s.ticks(), s.ticks(10)); }); -it("linear.tickFormat() is an alias for linear.tickFormat(10)", () => { +test("linear.tickFormat() is an alias for linear.tickFormat(10)", () => { assert.strictEqual(scaleLinear().tickFormat()(0.2), "0.2"); assert.strictEqual(scaleLinear().domain([-100, 100]).tickFormat()(-20), "−20"); }); -it("linear.tickFormat(count) returns a format suitable for the ticks", () => { +test("linear.tickFormat(count) returns a format suitable for the ticks", () => { assert.strictEqual(scaleLinear().tickFormat(10)(0.2), "0.2"); assert.strictEqual(scaleLinear().tickFormat(20)(0.2), "0.20"); assert.strictEqual(scaleLinear().domain([-100, 100]).tickFormat(10)(-20), "−20"); }); -it("linear.tickFormat(count, specifier) sets the appropriate fixed precision if not specified", () => { +test("linear.tickFormat(count, specifier) sets the appropriate fixed precision if not specified", () => { assert.strictEqual(scaleLinear().tickFormat(10, "+f")(0.2), "+0.2"); assert.strictEqual(scaleLinear().tickFormat(20, "+f")(0.2), "+0.20"); assert.strictEqual(scaleLinear().tickFormat(10, "+%")(0.2), "+20%"); assert.strictEqual(scaleLinear().domain([0.19, 0.21]).tickFormat(10, "+%")(0.2), "+20.0%"); }); -it("linear.tickFormat(count, specifier) sets the appropriate round precision if not specified", () => { +test("linear.tickFormat(count, specifier) sets the appropriate round precision if not specified", () => { assert.strictEqual(scaleLinear().domain([0, 9]).tickFormat(10, "")(2.10), "2"); assert.strictEqual(scaleLinear().domain([0, 9]).tickFormat(100, "")(2.01), "2"); assert.strictEqual(scaleLinear().domain([0, 9]).tickFormat(100, "")(2.11), "2.1"); @@ -406,18 +407,18 @@ it("linear.tickFormat(count, specifier) sets the appropriate round precision if assert.strictEqual(scaleLinear().domain([0.19, 0.21]).tickFormat(10, "p")(0.201), "20.1%"); }); -it("linear.tickFormat(count, specifier) sets the appropriate prefix precision if not specified", () => { +test("linear.tickFormat(count, specifier) sets the appropriate prefix precision if not specified", () => { assert.strictEqual(scaleLinear().domain([0, 1e6]).tickFormat(10, "$s")(0.51e6), "$0.5M"); assert.strictEqual(scaleLinear().domain([0, 1e6]).tickFormat(100, "$s")(0.501e6), "$0.50M"); }); -it("linear.tickFormat() uses the default precision when the domain is invalid", () => { +test("linear.tickFormat() uses the default precision when the domain is invalid", () => { const f = scaleLinear().domain([0, NaN]).tickFormat(); assert.strictEqual(f + "", " >-,f"); assert.strictEqual(f(0.12), "0.120000"); }); -it("linear.copy() returns a copy with changes to the domain are isolated", () => { +test("linear.copy() returns a copy with changes to the domain are isolated", () => { const x = scaleLinear(), y = x.copy(); x.domain([1, 2]); assert.deepStrictEqual(y.domain(), [0, 1]); @@ -434,7 +435,7 @@ it("linear.copy() returns a copy with changes to the domain are isolated", () => assert.deepStrictEqual(y2.domain(), [1, 1.9]); }); -it("linear.copy() returns a copy with changes to the range are isolated", () => { +test("linear.copy() returns a copy with changes to the range are isolated", () => { const x = scaleLinear(), y = x.copy(); x.range([1, 2]); assert.strictEqual(x.invert(1), 0); @@ -447,7 +448,7 @@ it("linear.copy() returns a copy with changes to the range are isolated", () => assert.deepStrictEqual(y.range(), [2, 3]); }); -it("linear.copy() returns a copy with changes to the interpolator are isolated", () => { +test("linear.copy() returns a copy with changes to the interpolator are isolated", () => { const x = scaleLinear().range(["red", "blue"]); const y = x.copy(); const i0 = x.interpolate(); @@ -458,7 +459,7 @@ it("linear.copy() returns a copy with changes to the interpolator are isolated", assert.strictEqual(y(0.5), "rgb(128, 0, 128)"); }); -it("linear.copy() returns a copy with changes to clamping are isolated", () => { +test("linear.copy() returns a copy with changes to clamping are isolated", () => { const x = scaleLinear().clamp(true), y = x.copy(); x.clamp(false); assert.strictEqual(x(2), 2); @@ -470,7 +471,7 @@ it("linear.copy() returns a copy with changes to clamping are isolated", () => { assert.strictEqual(x.clamp(), false); }); -it("linear.copy() returns a copy with changes to the unknown value are isolated", () => { +test("linear.copy() returns a copy with changes to the unknown value are isolated", () => { const x = scaleLinear(), y = x.copy(); x.unknown(2); assert.strictEqual(x(NaN), 2); diff --git a/test/log-test.js b/test/log-test.js index 95446ed..26b4eec 100644 --- a/test/log-test.js +++ b/test/log-test.js @@ -1,3 +1,4 @@ +import {test} from "vitest"; import assert from "assert"; import {hsl, rgb} from "d3-color"; import {interpolate, interpolateHsl} from "d3-interpolate"; @@ -5,7 +6,7 @@ import {format} from "d3-format"; import {scaleLog} from "../src/index.js"; import {assertInDelta} from "./asserts.js"; -it("scaleLog() has the expected defaults", () => { +test("scaleLog() has the expected defaults", () => { const x = scaleLog(); assert.deepStrictEqual(x.domain(), [1, 10]); assert.deepStrictEqual(x.range(), [0, 1]); @@ -19,7 +20,7 @@ it("scaleLog() has the expected defaults", () => { assertInDelta(x.invert(0.5), 3.162278); }); -it("log.domain(…) coerces values to numbers", () => { +test("log.domain(…) coerces values to numbers", () => { const x = scaleLog().domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]); assert.strictEqual(typeof x.domain()[0], "number"); assert.strictEqual(typeof x.domain()[1], "number"); @@ -39,7 +40,7 @@ it("log.domain(…) coerces values to numbers", () => { assertInDelta(x(5), 0.69897); }); -it("log.domain(…) can take negative values", () => { +test("log.domain(…) can take negative values", () => { const x = scaleLog().domain([-100, -1]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(Infinity)), [ "−100", @@ -49,32 +50,32 @@ it("log.domain(…) can take negative values", () => { assertInDelta(x(-50), 0.150515); }); -it("log.domain(…).range(…) can take more than two values", () => { +test("log.domain(…).range(…) can take more than two values", () => { const x = scaleLog().domain([0.1, 1, 100]).range(["red", "white", "green"]); assert.strictEqual(x(0.5), "rgb(255, 178, 178)"); assert.strictEqual(x(50), "rgb(38, 147, 38)"); assert.strictEqual(x(75), "rgb(16, 136, 16)"); }); -it("log.domain(…) preserves specified domain exactly, with no floating point error", () => { +test("log.domain(…) preserves specified domain exactly, with no floating point error", () => { const x = scaleLog().domain([0.1, 1000]); assert.deepStrictEqual(x.domain(), [0.1, 1000]); }); -it("log.ticks(…) returns exact ticks, with no floating point error", () => { +test("log.ticks(…) returns exact ticks, with no floating point error", () => { assert.deepStrictEqual(scaleLog().domain([0.15, 0.68]).ticks(), [0.2, 0.3, 0.4, 0.5, 0.6]); assert.deepStrictEqual(scaleLog().domain([0.68, 0.15]).ticks(), [0.6, 0.5, 0.4, 0.3, 0.2]); assert.deepStrictEqual(scaleLog().domain([-0.15, -0.68]).ticks(), [-0.2, -0.3, -0.4, -0.5, -0.6]); assert.deepStrictEqual(scaleLog().domain([-0.68, -0.15]).ticks(), [-0.6, -0.5, -0.4, -0.3, -0.2]); }); -it("log.range(…) does not coerce values to numbers", () => { +test("log.range(…) does not coerce values to numbers", () => { const x = scaleLog().range(["0", "2"]); assert.strictEqual(typeof x.range()[0], "string"); assert.strictEqual(typeof x.range()[1], "string"); }); -it("log.range(…) can take colors", () => { +test("log.range(…) can take colors", () => { const x = scaleLog().range(["red", "blue"]); assert.strictEqual(x(5), "rgb(77, 0, 178)"); x.range(["#ff0000", "#0000ff"]); @@ -87,14 +88,14 @@ it("log.range(…) can take colors", () => { assert.strictEqual(x(5), "rgb(77, 0, 178)"); }); -it("log.range(…) can take arrays or objects", () => { +test("log.range(…) can take arrays or objects", () => { const x = scaleLog().range([{color: "red"}, {color: "blue"}]); assert.deepStrictEqual(x(5), {color: "rgb(77, 0, 178)"}); x.range([["red"], ["blue"]]); assert.deepStrictEqual(x(5), ["rgb(77, 0, 178)"]); }); -it("log.interpolate(f) sets the interpolator", () => { +test("log.interpolate(f) sets the interpolator", () => { const x = scaleLog().range(["red", "blue"]); assert.strictEqual(x.interpolate(), interpolate); assert.strictEqual(x(5), "rgb(77, 0, 178)"); @@ -102,14 +103,14 @@ it("log.interpolate(f) sets the interpolator", () => { assert.strictEqual(x(5), "rgb(154, 0, 255)"); }); -it("log(x) does not clamp by default", () => { +test("log(x) does not clamp by default", () => { const x = scaleLog(); assert.strictEqual(x.clamp(), false); assertInDelta(x(0.5), -0.3010299); assertInDelta(x(15), 1.1760913); }); -it("log.clamp(true)(x) clamps to the domain", () => { +test("log.clamp(true)(x) clamps to the domain", () => { const x = scaleLog().clamp(true); assertInDelta(x(-1), 0); assertInDelta(x(5), 0.69897); @@ -120,7 +121,7 @@ it("log.clamp(true)(x) clamps to the domain", () => { assertInDelta(x(15), 0); }); -it("log.clamp(true).invert(y) clamps to the range", () => { +test("log.clamp(true).invert(y) clamps to the range", () => { const x = scaleLog().clamp(true); assertInDelta(x.invert(-0.1), 1); assertInDelta(x.invert(0.69897), 5); @@ -131,7 +132,7 @@ it("log.clamp(true).invert(y) clamps to the range", () => { assertInDelta(x.invert(1.5), 1); }); -it("log(x) maps a number x to a number y", () => { +test("log(x) maps a number x to a number y", () => { const x = scaleLog().domain([1, 2]); assertInDelta(x(0.5), -1.0000000); assertInDelta(x(1.0), 0.0000000); @@ -140,7 +141,7 @@ it("log(x) maps a number x to a number y", () => { assertInDelta(x(2.5), 1.3219281); }); -it("log.invert(y) maps a number y to a number x", () => { +test("log.invert(y) maps a number y to a number x", () => { const x = scaleLog().domain([1, 2]); assertInDelta(x.invert(-1.0000000), 0.5); assertInDelta(x.invert( 0.0000000), 1.0); @@ -149,7 +150,7 @@ it("log.invert(y) maps a number y to a number x", () => { assertInDelta(x.invert( 1.3219281), 2.5); }); -it("log.invert(y) coerces y to number", () => { +test("log.invert(y) coerces y to number", () => { const x = scaleLog().range(["0", "2"]); assertInDelta(x.invert("1"), 3.1622777); x.range([new Date(1990, 0, 1), new Date(1991, 0, 1)]); @@ -158,13 +159,13 @@ it("log.invert(y) coerces y to number", () => { assert(Number.isNaN(x.invert("#999"))); }); -it("log.base(b) sets the log base, changing the ticks", () => { +test("log.base(b) sets the log base, changing the ticks", () => { const x = scaleLog().domain([1, 32]); assert.deepStrictEqual(x.base(2).ticks().map(x.tickFormat()), ["1", "2", "4", "8", "16", "32"]); assert.deepStrictEqual(x.base(Math.E).ticks().map(x.tickFormat()), ["1", "2.71828182846", "7.38905609893", "20.0855369232"]); }); -it("log.nice() nices the domain, extending it to powers of ten", () => { +test("log.nice() nices the domain, extending it to powers of ten", () => { const x = scaleLog().domain([1.1, 10.9]).nice(); assert.deepStrictEqual(x.domain(), [1, 100]); x.domain([10.9, 1.1]).nice(); @@ -181,21 +182,21 @@ it("log.nice() nices the domain, extending it to powers of ten", () => { assertInDelta(x(100), 1); }); -it("log.nice() works on degenerate domains", () => { +test("log.nice() works on degenerate domains", () => { const x = scaleLog().domain([0, 0]).nice(); assert.deepStrictEqual(x.domain(), [0, 0]); x.domain([0.5, 0.5]).nice(); assert.deepStrictEqual(x.domain(), [0.1, 1]); }); -it("log.nice() on a polylog domain only affects the extent", () => { +test("log.nice() on a polylog domain only affects the extent", () => { const x = scaleLog().domain([1.1, 1.5, 10.9]).nice(); assert.deepStrictEqual(x.domain(), [1, 1.5, 100]); x.domain([-123.1, -1.5, -0.5]).nice(); assert.deepStrictEqual(x.domain(), [-1000, -1.5, -0.1]); }); -it("log.copy() isolates changes to the domain", () => { +test("log.copy() isolates changes to the domain", () => { const x = scaleLog(), y = x.copy(); x.domain([10, 100]); assert.deepStrictEqual(y.domain(), [1, 10]); @@ -208,7 +209,7 @@ it("log.copy() isolates changes to the domain", () => { assert.deepStrictEqual(y.domain(), [100, 1000]); }); -it("log.copy() isolates changes to the domain via nice", () => { +test("log.copy() isolates changes to the domain via nice", () => { const x = scaleLog().domain([1.5, 50]), y = x.copy().nice(); assert.deepStrictEqual(x.domain(), [1.5, 50]); assertInDelta(x(1.5), 0); @@ -222,7 +223,7 @@ it("log.copy() isolates changes to the domain via nice", () => { assertInDelta(y.invert(1), 100); }); -it("log.copy() isolates changes to the range", () => { +test("log.copy() isolates changes to the range", () => { const x = scaleLog(), y = x.copy(); x.range([1, 2]); assertInDelta(x.invert(1), 1); @@ -235,7 +236,7 @@ it("log.copy() isolates changes to the range", () => { assert.deepStrictEqual(y.range(), [2, 3]); }); -it("log.copy() isolates changes to the interpolator", () => { +test("log.copy() isolates changes to the interpolator", () => { const x = scaleLog().range(["red", "blue"]), y = x.copy(); x.interpolate(interpolateHsl); assert.strictEqual(x(5), "rgb(154, 0, 255)"); @@ -243,7 +244,7 @@ it("log.copy() isolates changes to the interpolator", () => { assert.strictEqual(y.interpolate(), interpolate); }); -it("log.copy() isolates changes to clamping", () => { +test("log.copy() isolates changes to clamping", () => { const x = scaleLog().clamp(true), y = x.copy(); x.clamp(false); assertInDelta(x(0.5), -0.30103); @@ -255,7 +256,7 @@ it("log.copy() isolates changes to clamping", () => { assert.strictEqual(x.clamp(), false); }); -it("log.ticks() generates the expected power-of-ten for ascending ticks", () => { +test("log.ticks() generates the expected power-of-ten for ascending ticks", () => { const s = scaleLog(); assert.deepStrictEqual(s.domain([1e-1, 1e1]).ticks().map(round), [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); assert.deepStrictEqual(s.domain([1e-1, 1e0]).ticks().map(round), [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]); @@ -263,14 +264,14 @@ it("log.ticks() generates the expected power-of-ten for ascending ticks", () => }); -it("log.ticks() generates the expected power-of-ten ticks for descending domains", () => { +test("log.ticks() generates the expected power-of-ten ticks for descending domains", () => { const s = scaleLog(); assert.deepStrictEqual(s.domain([-1e-1, -1e1]).ticks().map(round), [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1].reverse()); assert.deepStrictEqual(s.domain([-1e-1, -1e0]).ticks().map(round), [-1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1].reverse()); assert.deepStrictEqual(s.domain([1e0, 1e-1]).ticks().map(round), [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1].reverse()); }); -it("log.ticks() generates the expected power-of-ten ticks for small domains", () => { +test("log.ticks() generates the expected power-of-ten ticks for small domains", () => { const s = scaleLog(); assert.deepStrictEqual(s.domain([1, 5]).ticks(), [1, 2, 3, 4, 5]); assert.deepStrictEqual(s.domain([5, 1]).ticks(), [5, 4, 3, 2, 1]); @@ -283,24 +284,24 @@ it("log.ticks() generates the expected power-of-ten ticks for small domains", () assert.deepStrictEqual(s.domain([286.9252014, 329.4978332]).ticks(), [290, 295, 300, 305, 310, 315, 320, 325]); }); -it("log.ticks() generates linear ticks when the domain extent is small", () => { +test("log.ticks() generates linear ticks when the domain extent is small", () => { const s = scaleLog(); assert.deepStrictEqual(s.domain([41, 42]).ticks(), [41, 41.1, 41.2, 41.3, 41.4, 41.5, 41.6, 41.7, 41.8, 41.9, 42]); assert.deepStrictEqual(s.domain([42, 41]).ticks(), [42, 41.9, 41.8, 41.7, 41.6, 41.5, 41.4, 41.3, 41.2, 41.1, 41]); assert.deepStrictEqual(s.domain([1600, 1400]).ticks(), [1600, 1580, 1560, 1540, 1520, 1500, 1480, 1460, 1440, 1420, 1400]); }); -it("log.base(base).ticks() generates the expected power-of-base ticks", () => { +test("log.base(base).ticks() generates the expected power-of-base ticks", () => { const s = scaleLog().base(Math.E); assert.deepStrictEqual(s.domain([0.1, 100]).ticks().map(round), [0.135335283237, 0.367879441171, 1, 2.718281828459, 7.389056098931, 20.085536923188, 54.598150033144]); }); -it("log.tickFormat() is equivalent to log.tickFormat(10)", () => { +test("log.tickFormat() is equivalent to log.tickFormat(10)", () => { const s = scaleLog(); assert.deepStrictEqual(s.domain([1e-1, 1e1]).ticks().map(s.tickFormat()), ["100m", "200m", "300m", "400m", "500m", "", "", "", "", "1", "2", "3", "4", "5", "", "", "", "", "10"]); }); -it("log.tickFormat(count) returns a filtered \"s\" format", () => { +test("log.tickFormat(count) returns a filtered \"s\" format", () => { const s = scaleLog(), t = s.domain([1e-1, 1e1]).ticks(); assert.deepStrictEqual(t.map(s.tickFormat(10)), ["100m", "200m", "300m", "400m", "500m", "", "", "", "", "1", "2", "3", "4", "5", "", "", "", "", "10"]); assert.deepStrictEqual(t.map(s.tickFormat(5)), ["100m", "200m", "", "", "", "", "", "", "", "1", "2", "", "", "", "", "", "", "", "10"]); @@ -308,24 +309,24 @@ it("log.tickFormat(count) returns a filtered \"s\" format", () => { assert.deepStrictEqual(t.map(s.tickFormat(0)), ["100m", "", "", "", "", "", "", "", "", "1", "", "", "", "", "", "", "", "", "10"]); }); -it("log.tickFormat(count, format) returns the specified format, filtered", () => { +test("log.tickFormat(count, format) returns the specified format, filtered", () => { const s = scaleLog(), t = s.domain([1e-1, 1e1]).ticks(); assert.deepStrictEqual(t.map(s.tickFormat(10, "+")), ["+0.1", "+0.2", "+0.3", "+0.4", "+0.5", "", "", "", "", "+1", "+2", "+3", "+4", "+5", "", "", "", "", "+10"]); }); -it("log.base(base).tickFormat() returns the \",\" format", () => { +test("log.base(base).tickFormat() returns the \",\" format", () => { const s = scaleLog().base(Math.E); assert.deepStrictEqual(s.domain([1e-1, 1e1]).ticks().map(s.tickFormat()), ["0.135335283237", "0.367879441171", "1", "2.71828182846", "7.38905609893"]); }); -it("log.base(base).tickFormat(count) returns a filtered \",\" format", () => { +test("log.base(base).tickFormat(count) returns a filtered \",\" format", () => { const s = scaleLog().base(16), t = s.domain([1e-1, 1e1]).ticks(); assert.deepStrictEqual(t.map(s.tickFormat(10)), ["0.125", "0.1875", "0.25", "0.3125", "0.375", "", "", "", "", "", "", "", "", "", "1", "2", "3", "4", "5", "6", "", "", "", ""]); assert.deepStrictEqual(t.map(s.tickFormat(5)), ["0.125", "0.1875", "", "", "", "", "", "", "", "", "", "", "", "", "1", "2", "3", "", "", "", "", "", "", ""]); assert.deepStrictEqual(t.map(s.tickFormat(1)), ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "1", "", "", "", "", "", "", "", "", ""]); }); -it("log.ticks() generates log ticks", () => { +test("log.ticks() generates log ticks", () => { const x = scaleLog(); assert.deepStrictEqual(x.ticks().map(x.tickFormat(Infinity)), [ "1", "2", "3", "4", "5", "6", "7", "8", "9", @@ -349,7 +350,7 @@ it("log.ticks() generates log ticks", () => { ]); }); -it("log.tickFormat(count) filters ticks to about count", () => { +test("log.tickFormat(count) filters ticks to about count", () => { const x = scaleLog(); assert.deepStrictEqual(x.ticks().map(x.tickFormat(5)), [ "1", "2", "3", "4", "5", "", "", "", "", @@ -363,14 +364,14 @@ it("log.tickFormat(count) filters ticks to about count", () => { ]); }); -it("log.ticks(count) filters powers-of-ten ticks for huge domains", () => { +test("log.ticks(count) filters powers-of-ten ticks for huge domains", () => { const x = scaleLog().domain([1e10, 1]); assert.deepStrictEqual(x.ticks().map(x.tickFormat()), ["10G", "1G", "100M", "10M", "1M", "100k", "10k", "1k", "100", "10", "1"]); x.domain([1e-29, 1e-1]); assert.deepStrictEqual(x.ticks().map(x.tickFormat()), ["0.0001y", "0.01y", "1y", "100y", "10z", "1a", "100a", "10f", "1p", "100p", "10n", "1µ", "100µ", "10m"]); }); -it("log.ticks() generates ticks that cover the domain", () => { +test("log.ticks() generates ticks that cover the domain", () => { const x = scaleLog().domain([0.01, 10000]); assert.deepStrictEqual(x.ticks(20).map(x.tickFormat(20)), [ "10m", "20m", "30m", "", "", "", "", "", "", @@ -383,7 +384,7 @@ it("log.ticks() generates ticks that cover the domain", () => { ]); }); -it("log.ticks() generates ticks that cover the niced domain", () => { +test("log.ticks() generates ticks that cover the niced domain", () => { const x = scaleLog().domain([0.0124123, 1230.4]).nice(); assert.deepStrictEqual(x.ticks(20).map(x.tickFormat(20)), [ "10m", "20m", "30m", "", "", "", "", "", "", @@ -396,7 +397,7 @@ it("log.ticks() generates ticks that cover the niced domain", () => { ]); }); -it("log.tickFormat(count, format) returns a filtered format", () => { +test("log.tickFormat(count, format) returns a filtered format", () => { const x = scaleLog().domain([1000.1, 1]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(10, format("+,d"))), [ "+1,000", @@ -406,7 +407,7 @@ it("log.tickFormat(count, format) returns a filtered format", () => { ]); }); -it("log.tickFormat(count, specifier) returns a filtered format", () => { +test("log.tickFormat(count, specifier) returns a filtered format", () => { const x = scaleLog().domain([1000.1, 1]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(10, "s")), [ "1k", @@ -416,7 +417,7 @@ it("log.tickFormat(count, specifier) returns a filtered format", () => { ]); }); -it("log.tickFormat(count, specifier) trims trailing zeroes by default", () => { +test("log.tickFormat(count, specifier) trims trailing zeroes by default", () => { const x = scaleLog().domain([100.1, 0.02]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(10, "f")), [ "100", @@ -427,14 +428,14 @@ it("log.tickFormat(count, specifier) trims trailing zeroes by default", () => { ]); }); -it("log.tickFormat(count, specifier) with base two trims trailing zeroes by default", () => { +test("log.tickFormat(count, specifier) with base two trims trailing zeroes by default", () => { const x = scaleLog().base(2).domain([100.1, 0.02]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(10, "f")), [ "64", "32", "16", "8", "4", "2", "1", "0.5", "0.25", "0.125", "0.0625", "0.03125" ]); }); -it("log.tickFormat(count, specifier) preserves trailing zeroes if needed", () => { +test("log.tickFormat(count, specifier) preserves trailing zeroes if needed", () => { const x = scaleLog().domain([100.1, 0.02]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(10, ".1f")), [ "100.0", @@ -445,7 +446,7 @@ it("log.tickFormat(count, specifier) preserves trailing zeroes if needed", () => ]); }); -it("log.ticks() returns the empty array when the domain is degenerate", () => { +test("log.ticks() returns the empty array when the domain is degenerate", () => { const x = scaleLog(); assert.deepStrictEqual(x.domain([0, 1]).ticks(), []); assert.deepStrictEqual(x.domain([1, 0]).ticks(), []); diff --git a/test/ordinal-test.js b/test/ordinal-test.js index b5812f5..70398d7 100644 --- a/test/ordinal-test.js +++ b/test/ordinal-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleImplicit, scaleOrdinal} from "../src/index.js"; -it("scaleOrdinal() has the expected defaults", () => { +test("scaleOrdinal() has the expected defaults", () => { const s = scaleOrdinal(); assert.deepStrictEqual(s.domain(), []); assert.deepStrictEqual(s.range(), []); @@ -10,7 +11,7 @@ it("scaleOrdinal() has the expected defaults", () => { assert.deepStrictEqual(s.domain(), [0]); }); -it("ordinal(x) maps a unique name x in the domain to the corresponding value y in the range", () => { +test("ordinal(x) maps a unique name x in the domain to the corresponding value y in the range", () => { const s = scaleOrdinal().domain([0, 1]).range(["foo", "bar"]).unknown(undefined); assert.strictEqual(s(0), "foo"); assert.strictEqual(s(1), "bar"); @@ -23,7 +24,7 @@ it("ordinal(x) maps a unique name x in the domain to the corresponding value y i assert.strictEqual(s(2), undefined); }); -it("ordinal(x) implicitly extends the domain when a range is explicitly specified", () => { +test("ordinal(x) implicitly extends the domain when a range is explicitly specified", () => { const s = scaleOrdinal().range(["foo", "bar"]); assert.deepStrictEqual(s.domain(), []); assert.strictEqual(s(0), "foo"); @@ -34,26 +35,26 @@ it("ordinal(x) implicitly extends the domain when a range is explicitly specifie assert.deepStrictEqual(s.domain(), [0, 1]); }); -it("ordinal.domain(x) makes a copy of the domain", () => { +test("ordinal.domain(x) makes a copy of the domain", () => { const domain = ["red", "green"]; const s = scaleOrdinal().domain(domain); domain.push("blue"); assert.deepStrictEqual(s.domain(), ["red", "green"]); }); -it("ordinal.domain() returns a copy of the domain", () => { +test("ordinal.domain() returns a copy of the domain", () => { const s = scaleOrdinal().domain(["red", "green"]); const domain = s.domain(); s("blue"); assert.deepStrictEqual(domain, ["red", "green"]); }); -it("ordinal.domain() accepts an iterable", () => { +test("ordinal.domain() accepts an iterable", () => { const s = scaleOrdinal().domain(new Set(["red", "green"])); assert.deepStrictEqual(s.domain(), ["red", "green"]); }); -it("ordinal.domain() replaces previous domain values", () => { +test("ordinal.domain() replaces previous domain values", () => { const s = scaleOrdinal().range(["foo", "bar"]); assert.strictEqual(s(1), "foo"); assert.strictEqual(s(0), "bar"); @@ -64,28 +65,28 @@ it("ordinal.domain() replaces previous domain values", () => { assert.deepStrictEqual(s.domain(), ["0", "1"]); }); -it("ordinal.domain() uniqueness is based on primitive coercion", () => { +test("ordinal.domain() uniqueness is based on primitive coercion", () => { const s = scaleOrdinal().domain(["foo"]).range([42, 43, 44]); assert.strictEqual(s(new String("foo")), 42); assert.strictEqual(s({valueOf: function() { return "foo"; }}), 42); assert.strictEqual(s({valueOf: function() { return "bar"; }}), 43); }); -it("ordinal.domain() does not coerce domain values to strings", () => { +test("ordinal.domain() does not coerce domain values to strings", () => { const s = scaleOrdinal().domain([0, 1]); assert.deepStrictEqual(s.domain(), [0, 1]); assert.strictEqual(typeof s.domain()[0], "number"); assert.strictEqual(typeof s.domain()[1], "number"); }); -it("ordinal.domain() does not barf on object built-ins", () => { +test("ordinal.domain() does not barf on object built-ins", () => { const s = scaleOrdinal().domain(["__proto__", "hasOwnProperty"]).range([42, 43]); assert.strictEqual(s("__proto__"), 42); assert.strictEqual(s("hasOwnProperty"), 43); assert.deepStrictEqual(s.domain(), ["__proto__", "hasOwnProperty"]); }); -it("ordinal() accepts dates", () => { +test("ordinal() accepts dates", () => { const s = scaleOrdinal(); s(new Date(1970, 2, 1)); s(new Date(2001, 4, 13)); @@ -94,7 +95,7 @@ it("ordinal() accepts dates", () => { assert.deepStrictEqual(s.domain(), [new Date(1970, 2, 1), new Date(2001, 4, 13)]); }); -it("ordinal.domain() accepts dates", () => { +test("ordinal.domain() accepts dates", () => { const s = scaleOrdinal().domain([ new Date(1970, 2, 1), new Date(2001, 4, 13), @@ -106,14 +107,14 @@ it("ordinal.domain() accepts dates", () => { assert.deepStrictEqual(s.domain(), [new Date(1970, 2, 1), new Date(2001, 4, 13), new Date(1999, 11, 31)]); }); -it("ordinal.domain() does not barf on object built-ins", () => { +test("ordinal.domain() does not barf on object built-ins", () => { const s = scaleOrdinal().domain(["__proto__", "hasOwnProperty"]).range([42, 43]); assert.strictEqual(s("__proto__"), 42); assert.strictEqual(s("hasOwnProperty"), 43); assert.deepStrictEqual(s.domain(), ["__proto__", "hasOwnProperty"]); }); -it("ordinal.domain() is ordered by appearance", () => { +test("ordinal.domain() is ordered by appearance", () => { const s = scaleOrdinal(); s("foo"); s("bar"); @@ -130,19 +131,19 @@ it("ordinal.domain() is ordered by appearance", () => { assert.deepStrictEqual(s.domain(), ["foo", "bar"]); }); -it("ordinal.range(x) makes a copy of the range", () => { +test("ordinal.range(x) makes a copy of the range", () => { const range = ["red", "green"]; const s = scaleOrdinal().range(range); range.push("blue"); assert.deepStrictEqual(s.range(), ["red", "green"]); }); -it("ordinal.range() accepts an iterable", () => { +test("ordinal.range() accepts an iterable", () => { const s = scaleOrdinal().range(new Set(["red", "green"])); assert.deepStrictEqual(s.range(), ["red", "green"]); }); -it("ordinal.range() returns a copy of the range", () => { +test("ordinal.range() returns a copy of the range", () => { const s = scaleOrdinal().range(["red", "green"]); const range = s.range(); assert.deepStrictEqual(range, ["red", "green"]); @@ -150,7 +151,7 @@ it("ordinal.range() returns a copy of the range", () => { assert.deepStrictEqual(s.range(), ["red", "green"]); }); -it("ordinal.range(values) does not discard implicit domain associations", () => { +test("ordinal.range(values) does not discard implicit domain associations", () => { const s = scaleOrdinal(); assert.strictEqual(s(0), undefined); assert.strictEqual(s(1), undefined); @@ -159,7 +160,7 @@ it("ordinal.range(values) does not discard implicit domain associations", () => assert.strictEqual(s(0), "foo"); }); -it("ordinal(value) recycles values when exhausted", () => { +test("ordinal(value) recycles values when exhausted", () => { const s = scaleOrdinal().range(["a", "b", "c"]); assert.strictEqual(s(0), "a"); assert.strictEqual(s(1), "b"); @@ -172,7 +173,7 @@ it("ordinal(value) recycles values when exhausted", () => { assert.strictEqual(s(0), "a"); }); -it("ordinal.unknown(x) sets the output value for unknown inputs", () => { +test("ordinal.unknown(x) sets the output value for unknown inputs", () => { const s = scaleOrdinal().domain(["foo", "bar"]).unknown("gray").range(["red", "blue"]); assert.strictEqual(s("foo"), "red"); assert.strictEqual(s("bar"), "blue"); @@ -180,13 +181,13 @@ it("ordinal.unknown(x) sets the output value for unknown inputs", () => { assert.strictEqual(s("quux"), "gray"); }); -it("ordinal.unknown(x) prevents implicit domain extension if x is not implicit", () => { +test("ordinal.unknown(x) prevents implicit domain extension if x is not implicit", () => { const s = scaleOrdinal().domain(["foo", "bar"]).unknown(undefined).range(["red", "blue"]); assert.strictEqual(s("baz"), undefined); assert.deepStrictEqual(s.domain(), ["foo", "bar"]); }); -it("ordinal.copy() copies all fields", () => { +test("ordinal.copy() copies all fields", () => { const s1 = scaleOrdinal().domain([1, 2]).range(["red", "green"]).unknown("gray"); const s2 = s1.copy(); assert.deepStrictEqual(s2.domain(), s1.domain()); @@ -194,7 +195,7 @@ it("ordinal.copy() copies all fields", () => { assert.deepStrictEqual(s2.unknown(), s1.unknown()); }); -it("ordinal.copy() changes to the domain are isolated", () => { +test("ordinal.copy() changes to the domain are isolated", () => { const s1 = scaleOrdinal().range(["foo", "bar"]); const s2 = s1.copy(); s1.domain([1, 2]); @@ -208,7 +209,7 @@ it("ordinal.copy() changes to the domain are isolated", () => { assert.deepStrictEqual(s2.domain(), [2, 3]); }); -it("ordinal.copy() changes to the range are isolated", () => { +test("ordinal.copy() changes to the range are isolated", () => { const s1 = scaleOrdinal().range(["foo", "bar"]); const s2 = s1.copy(); s1.range(["bar", "foo"]); diff --git a/test/point-test.js b/test/point-test.js index 6b2ec3a..451a61e 100644 --- a/test/point-test.js +++ b/test/point-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleBand, scalePoint} from "../src/index.js"; -it("scalePoint() has the expected defaults", () => { +test("scalePoint() has the expected defaults", () => { const s = scalePoint(); assert.deepStrictEqual(s.domain(), []); assert.deepStrictEqual(s.range(), [0, 1]); @@ -12,13 +13,13 @@ it("scalePoint() has the expected defaults", () => { assert.strictEqual(s.align(), 0.5); }); -it("scalePoint() does not expose paddingInner and paddingOuter", () => { +test("scalePoint() does not expose paddingInner and paddingOuter", () => { const s = scalePoint(); assert.strictEqual(s.paddingInner, undefined); assert.strictEqual(s.paddingOuter, undefined); }); -it("scalePoint() is similar to scaleBand().paddingInner(1)", () => { +test("scalePoint() is similar to scaleBand().paddingInner(1)", () => { const p = scalePoint().domain(["foo", "bar"]).range([0, 960]); const b = scaleBand().domain(["foo", "bar"]).range([0, 960]).paddingInner(1); assert.deepStrictEqual(p.domain().map(p), b.domain().map(b)); @@ -26,7 +27,7 @@ it("scalePoint() is similar to scaleBand().paddingInner(1)", () => { assert.strictEqual(p.step(), b.step()); }); -it("point.padding(p) sets the band outer padding to p", () => { +test("point.padding(p) sets the band outer padding to p", () => { const p = scalePoint().domain(["foo", "bar"]).range([0, 960]).padding(0.5); const b = scaleBand().domain(["foo", "bar"]).range([0, 960]).paddingInner(1).paddingOuter(0.5); assert.deepStrictEqual(p.domain().map(p), b.domain().map(b)); @@ -34,7 +35,7 @@ it("point.padding(p) sets the band outer padding to p", () => { assert.strictEqual(p.step(), b.step()); }); -it("point.copy() returns a copy", () => { +test("point.copy() returns a copy", () => { const s = scalePoint(); assert.deepStrictEqual(s.domain(), []); assert.deepStrictEqual(s.range(), [0, 1]); diff --git a/test/pow-test.js b/test/pow-test.js index 26f8109..af14c05 100644 --- a/test/pow-test.js +++ b/test/pow-test.js @@ -1,9 +1,10 @@ +import {test} from "vitest"; import assert from "assert"; import {scalePow, scaleSqrt} from "../src/index.js"; import {roundEpsilon} from "./roundEpsilon.js"; import {assertInDelta} from "./asserts.js"; -it("scalePow() has the expected defaults", () => { +test("scalePow() has the expected defaults", () => { const s = scalePow(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -12,26 +13,26 @@ it("scalePow() has the expected defaults", () => { assert.deepStrictEqual(s.interpolate()({array: ["red"]}, {array: ["blue"]})(0.5), {array: ["rgb(128, 0, 128)"]}); }); -it("pow(x) maps a domain value x to a range value y", () => { +test("pow(x) maps a domain value x to a range value y", () => { assert.strictEqual(scalePow().exponent(0.5)(0.5), Math.SQRT1_2); }); -it("pow(x) ignores extra range values if the domain is smaller than the range", () => { +test("pow(x) ignores extra range values if the domain is smaller than the range", () => { assert.strictEqual(scalePow().domain([-10, 0]).range(["red", "white", "green"]).clamp(true)(-5), "rgb(255, 128, 128)"); assert.strictEqual(scalePow().domain([-10, 0]).range(["red", "white", "green"]).clamp(true)(50), "rgb(255, 255, 255)"); }); -it("pow(x) ignores extra domain values if the range is smaller than the domain", () => { +test("pow(x) ignores extra domain values if the range is smaller than the domain", () => { assert.strictEqual(scalePow().domain([-10, 0, 100]).range(["red", "white"]).clamp(true)(-5), "rgb(255, 128, 128)"); assert.strictEqual(scalePow().domain([-10, 0, 100]).range(["red", "white"]).clamp(true)(50), "rgb(255, 255, 255)"); }); -it("pow(x) maps an empty domain to the middle of the range", () => { +test("pow(x) maps an empty domain to the middle of the range", () => { assert.strictEqual(scalePow().domain([0, 0]).range([1, 2])(0), 1.5); assert.strictEqual(scalePow().domain([0, 0]).range([2, 1])(1), 1.5); }); -it("pow(x) can map a bipow domain with two values to the corresponding range", () => { +test("pow(x) can map a bipow domain with two values to the corresponding range", () => { const s = scalePow().domain([1, 2]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.strictEqual(s(0.5), -0.5); @@ -46,7 +47,7 @@ it("pow(x) can map a bipow domain with two values to the corresponding range", ( assert.strictEqual(s.invert( 1.5), 2.5); }); -it("pow(x) can map a polypow domain with more than two values to the corresponding range", () => { +test("pow(x) can map a polypow domain with more than two values to the corresponding range", () => { const s = scalePow().domain([-10, 0, 100]).range(["red", "white", "green"]); assert.deepStrictEqual(s.domain(), [-10, 0, 100]); assert.strictEqual(s(-5), "rgb(255, 128, 128)"); @@ -64,26 +65,26 @@ it("pow(x) can map a polypow domain with more than two values to the correspondi assert.strictEqual(s.invert(3), 1.5); }); -it("pow.invert(y) maps a range value y to a domain value x", () => { +test("pow.invert(y) maps a range value y to a domain value x", () => { assert.strictEqual(scalePow().range([1, 2]).invert(1.5), 0.5); }); -it("pow.invert(y) maps an empty range to the middle of the domain", () => { +test("pow.invert(y) maps an empty range to the middle of the domain", () => { assert.strictEqual(scalePow().domain([1, 2]).range([0, 0]).invert(0), 1.5); assert.strictEqual(scalePow().domain([2, 1]).range([0, 0]).invert(1), 1.5); }); -it("pow.invert(y) coerces range values to numbers", () => { +test("pow.invert(y) coerces range values to numbers", () => { assert.strictEqual(scalePow().range(["0", "2"]).invert("1"), 0.5); assert.strictEqual(scalePow().range([new Date(1990, 0, 1), new Date(1991, 0, 1)]).invert(new Date(1990, 6, 2, 13)), 0.5); }); -it("pow.invert(y) returns NaN if the range is not coercible to number", () => { +test("pow.invert(y) returns NaN if the range is not coercible to number", () => { assert(isNaN(scalePow().range(["#000", "#fff"]).invert("#999"))); assert(isNaN(scalePow().range([0, "#fff"]).invert("#999"))); }); -it("pow.exponent(exponent) sets the exponent to the specified value", () => { +test("pow.exponent(exponent) sets the exponent to the specified value", () => { const x = scalePow().exponent(0.5).domain([1, 2]); assertInDelta(x(1), 0, 1e-6); assertInDelta(x(1.5), 0.5425821, 1e-6); @@ -101,7 +102,7 @@ it("pow.exponent(exponent) sets the exponent to the specified value", () => { assert.strictEqual(x.exponent(), -1); }); -it("pow.exponent(exponent) changing the exponent does not change the domain or range", () => { +test("pow.exponent(exponent) changing the exponent does not change the domain or range", () => { const x = scalePow().domain([1, 2]).range([3, 4]); x.exponent(0.5); assert.deepStrictEqual(x.domain(), [1, 2]); @@ -114,19 +115,19 @@ it("pow.exponent(exponent) changing the exponent does not change the domain or r assert.deepStrictEqual(x.range(), [3, 4]); }); -it("pow.domain(domain) accepts an array of numbers", () => { +test("pow.domain(domain) accepts an array of numbers", () => { assert.deepStrictEqual(scalePow().domain([]).domain(), []); assert.deepStrictEqual(scalePow().domain([1, 0]).domain(), [1, 0]); assert.deepStrictEqual(scalePow().domain([1, 2, 3]).domain(), [1, 2, 3]); }); -it("pow.domain(domain) coerces domain values to numbers", () => { +test("pow.domain(domain) coerces domain values to numbers", () => { assert.deepStrictEqual(scalePow().domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]).domain(), [631180800000, 662716800000]); assert.deepStrictEqual(scalePow().domain(["0.0", "1.0"]).domain(), [0, 1]); assert.deepStrictEqual(scalePow().domain([new Number(0), new Number(1)]).domain(), [0, 1]); }); -it("pow.domain(domain) makes a copy of domain values", () => { +test("pow.domain(domain) makes a copy of domain values", () => { const d = [1, 2], s = scalePow().domain(d); assert.deepStrictEqual(s.domain(), [1, 2]); d.push(3); @@ -134,20 +135,20 @@ it("pow.domain(domain) makes a copy of domain values", () => { assert.deepStrictEqual(d, [1, 2, 3]); }); -it("pow.domain() returns a copy of domain values", () => { +test("pow.domain() returns a copy of domain values", () => { const s = scalePow(), d = s.domain(); assert.deepStrictEqual(d, [0, 1]); d.push(3); assert.deepStrictEqual(s.domain(), [0, 1]); }); -it("pow.range(range) does not coerce range to numbers", () => { +test("pow.range(range) does not coerce range to numbers", () => { const s = scalePow().range(["0px", "2px"]); assert.deepStrictEqual(s.range(), ["0px", "2px"]); assert.strictEqual(s(0.5), "1px"); }); -it("pow.range(range) can accept range values as colors", () => { +test("pow.range(range) can accept range values as colors", () => { assert.strictEqual(scalePow().range(["red", "blue"])(0.5), "rgb(128, 0, 128)"); assert.strictEqual(scalePow().range(["#ff0000", "#0000ff"])(0.5), "rgb(128, 0, 128)"); assert.strictEqual(scalePow().range(["#f00", "#00f"])(0.5), "rgb(128, 0, 128)"); @@ -156,12 +157,12 @@ it("pow.range(range) can accept range values as colors", () => { assert.strictEqual(scalePow().range(["hsl(0,100%,50%)", "hsl(240,100%,50%)"])(0.5), "rgb(128, 0, 128)"); }); -it("pow.range(range) can accept range values as arrays or objects", () => { +test("pow.range(range) can accept range values as arrays or objects", () => { assert.deepStrictEqual(scalePow().range([{color: "red"}, {color: "blue"}])(0.5), {color: "rgb(128, 0, 128)"}); assert.deepStrictEqual(scalePow().range([["red"], ["blue"]])(0.5), ["rgb(128, 0, 128)"]); }); -it("pow.range(range) makes a copy of range values", () => { +test("pow.range(range) makes a copy of range values", () => { const r = [1, 2], s = scalePow().range(r); assert.deepStrictEqual(s.range(), [1, 2]); r.push(3); @@ -169,18 +170,18 @@ it("pow.range(range) makes a copy of range values", () => { assert.deepStrictEqual(r, [1, 2, 3]); }); -it("pow.range() returns a copy of range values", () => { +test("pow.range() returns a copy of range values", () => { const s = scalePow(), r = s.range(); assert.deepStrictEqual(r, [0, 1]); r.push(3); assert.deepStrictEqual(s.range(), [0, 1]); }); -it("pow.rangeRound(range) is an alias for pow.range(range).interpolate(interpolateRound)", () => { +test("pow.rangeRound(range) is an alias for pow.range(range).interpolate(interpolateRound)", () => { assert.strictEqual(scalePow().rangeRound([0, 10])(0.59), 6); }); -it("pow.clamp() is false by default", () => { +test("pow.clamp() is false by default", () => { assert.strictEqual(scalePow().clamp(), false); assert.strictEqual(scalePow().range([10, 20])(2), 30); assert.strictEqual(scalePow().range([10, 20])(-1), 0); @@ -188,36 +189,36 @@ it("pow.clamp() is false by default", () => { assert.strictEqual(scalePow().range([10, 20]).invert(0), -1); }); -it("pow.clamp(true) restricts output values to the range", () => { +test("pow.clamp(true) restricts output values to the range", () => { assert.strictEqual(scalePow().clamp(true).range([10, 20])(2), 20); assert.strictEqual(scalePow().clamp(true).range([10, 20])(-1), 10); }); -it("pow.clamp(true) restricts input values to the domain", () => { +test("pow.clamp(true) restricts input values to the domain", () => { assert.strictEqual(scalePow().clamp(true).range([10, 20]).invert(30), 1); assert.strictEqual(scalePow().clamp(true).range([10, 20]).invert(0), 0); }); -it("pow.clamp(clamp) coerces the specified clamp value to a boolean", () => { +test("pow.clamp(clamp) coerces the specified clamp value to a boolean", () => { assert.strictEqual(scalePow().clamp("true").clamp(), true); assert.strictEqual(scalePow().clamp(1).clamp(), true); assert.strictEqual(scalePow().clamp("").clamp(), false); assert.strictEqual(scalePow().clamp(0).clamp(), false); }); -it("pow.interpolate(interpolate) takes a custom interpolator factory", () => { +test("pow.interpolate(interpolate) takes a custom interpolator factory", () => { function interpolate(a, b) { return function(t) { return [a, b, t]; }; } const s = scalePow().domain([10, 20]).range(["a", "b"]).interpolate(interpolate); assert.strictEqual(s.interpolate(), interpolate); assert.deepStrictEqual(s(15), ["a", "b", 0.5]); }); -it("pow.nice() is an alias for pow.nice(10)", () => { +test("pow.nice() is an alias for pow.nice(10)", () => { assert.deepStrictEqual(scalePow().domain([0, 0.96]).nice().domain(), [0, 1]); assert.deepStrictEqual(scalePow().domain([0, 96]).nice().domain(), [0, 100]); }); -it("pow.nice(count) extends the domain to match the desired ticks", () => { +test("pow.nice(count) extends the domain to match the desired ticks", () => { assert.deepStrictEqual(scalePow().domain([0, 0.96]).nice(10).domain(), [0, 1]); assert.deepStrictEqual(scalePow().domain([0, 96]).nice(10).domain(), [0, 100]); assert.deepStrictEqual(scalePow().domain([0.96, 0]).nice(10).domain(), [1, 0]); @@ -228,7 +229,7 @@ it("pow.nice(count) extends the domain to match the desired ticks", () => { assert.deepStrictEqual(scalePow().domain([-96, 0]).nice(10).domain(), [-100, 0]); }); -it("pow.nice(count) nices the domain, extending it to round numbers", () => { +test("pow.nice(count) nices the domain, extending it to round numbers", () => { assert.deepStrictEqual(scalePow().domain([1.1, 10.9]).nice(10).domain(), [1, 11]); assert.deepStrictEqual(scalePow().domain([10.9, 1.1]).nice(10).domain(), [11, 1]); assert.deepStrictEqual(scalePow().domain([0.7, 11.001]).nice(10).domain(), [0, 12]); @@ -236,23 +237,23 @@ it("pow.nice(count) nices the domain, extending it to round numbers", () => { assert.deepStrictEqual(scalePow().domain([0, 0.49]).nice(10).domain(), [0, 0.5]); }); -it("pow.nice(count) has no effect on degenerate domains", () => { +test("pow.nice(count) has no effect on degenerate domains", () => { assert.deepStrictEqual(scalePow().domain([0, 0]).nice(10).domain(), [0, 0]); assert.deepStrictEqual(scalePow().domain([0.5, 0.5]).nice(10).domain(), [0.5, 0.5]); }); -it("pow.nice(count) nicing a polypow domain only affects the extent", () => { +test("pow.nice(count) nicing a polypow domain only affects the extent", () => { assert.deepStrictEqual(scalePow().domain([1.1, 1, 2, 3, 10.9]).nice(10).domain(), [1, 1, 2, 3, 11]); assert.deepStrictEqual(scalePow().domain([123.1, 1, 2, 3, -0.9]).nice(10).domain(), [130, 1, 2, 3, -10]); }); -it("pow.nice(count) accepts a tick count to control nicing step", () => { +test("pow.nice(count) accepts a tick count to control nicing step", () => { assert.deepStrictEqual(scalePow().domain([12, 87]).nice(5).domain(), [0, 100]); assert.deepStrictEqual(scalePow().domain([12, 87]).nice(10).domain(), [10, 90]); assert.deepStrictEqual(scalePow().domain([12, 87]).nice(100).domain(), [12, 87]); }); -it("pow.ticks(count) returns the expected ticks for an ascending domain", () => { +test("pow.ticks(count) returns the expected ticks for an ascending domain", () => { const s = scalePow(); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); @@ -277,7 +278,7 @@ it("pow.ticks(count) returns the expected ticks for an ascending domain", () => assert.deepStrictEqual(s.ticks(1), [ 0 ]); }); -it("pow.ticks(count) returns the expected ticks for a descending domain", () => { +test("pow.ticks(count) returns the expected ticks for a descending domain", () => { const s = scalePow().domain([1, 0]); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0].reverse()); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0].reverse()); @@ -302,7 +303,7 @@ it("pow.ticks(count) returns the expected ticks for a descending domain", () => assert.deepStrictEqual(s.ticks(1), [ 0 ].reverse()); }); -it("pow.ticks(count) returns the expected ticks for a polypow domain", () => { +test("pow.ticks(count) returns the expected ticks for a polypow domain", () => { const s = scalePow().domain([0, 0.25, 0.9, 1]); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); @@ -327,7 +328,7 @@ it("pow.ticks(count) returns the expected ticks for a polypow domain", () => { assert.deepStrictEqual(s.ticks(1), [ 0 ]); }); -it("pow.ticks(count) returns the empty array if count is not a positive integer", () => { +test("pow.ticks(count) returns the empty array if count is not a positive integer", () => { const s = scalePow(); assert.deepStrictEqual(s.ticks(NaN), []); assert.deepStrictEqual(s.ticks(0), []); @@ -335,30 +336,30 @@ it("pow.ticks(count) returns the empty array if count is not a positive integer" assert.deepStrictEqual(s.ticks(Infinity), []); }); -it("pow.ticks() is an alias for pow.ticks(10)", () => { +test("pow.ticks() is an alias for pow.ticks(10)", () => { const s = scalePow(); assert.deepStrictEqual(s.ticks(), s.ticks(10)); }); -it("pow.tickFormat() is an alias for pow.tickFormat(10)", () => { +test("pow.tickFormat() is an alias for pow.tickFormat(10)", () => { assert.strictEqual(scalePow().tickFormat()(0.2), "0.2"); assert.strictEqual(scalePow().domain([-100, 100]).tickFormat()(-20), "−20"); }); -it("pow.tickFormat(count) returns a format suitable for the ticks", () => { +test("pow.tickFormat(count) returns a format suitable for the ticks", () => { assert.strictEqual(scalePow().tickFormat(10)(0.2), "0.2"); assert.strictEqual(scalePow().tickFormat(20)(0.2), "0.20"); assert.strictEqual(scalePow().domain([-100, 100]).tickFormat(10)(-20), "−20"); }); -it("pow.tickFormat(count, specifier) sets the appropriate fixed precision if not specified", () => { +test("pow.tickFormat(count, specifier) sets the appropriate fixed precision if not specified", () => { assert.strictEqual(scalePow().tickFormat(10, "+f")(0.2), "+0.2"); assert.strictEqual(scalePow().tickFormat(20, "+f")(0.2), "+0.20"); assert.strictEqual(scalePow().tickFormat(10, "+%")(0.2), "+20%"); assert.strictEqual(scalePow().domain([0.19, 0.21]).tickFormat(10, "+%")(0.2), "+20.0%"); }); -it("pow.tickFormat(count, specifier) sets the appropriate round precision if not specified", () => { +test("pow.tickFormat(count, specifier) sets the appropriate round precision if not specified", () => { assert.strictEqual(scalePow().domain([0, 9]).tickFormat(10, "")(2.10), "2"); assert.strictEqual(scalePow().domain([0, 9]).tickFormat(100, "")(2.01), "2"); assert.strictEqual(scalePow().domain([0, 9]).tickFormat(100, "")(2.11), "2.1"); @@ -375,12 +376,12 @@ it("pow.tickFormat(count, specifier) sets the appropriate round precision if not assert.strictEqual(scalePow().domain([0.19, 0.21]).tickFormat(10, "p")(0.201), "20.1%"); }); -it("pow.tickFormat(count, specifier) sets the appropriate prefix precision if not specified", () => { +test("pow.tickFormat(count, specifier) sets the appropriate prefix precision if not specified", () => { assert.strictEqual(scalePow().domain([0, 1e6]).tickFormat(10, "$s")(0.51e6), "$0.5M"); assert.strictEqual(scalePow().domain([0, 1e6]).tickFormat(100, "$s")(0.501e6), "$0.50M"); }); -it("pow.copy() returns a copy with changes to the domain are isolated", () => { +test("pow.copy() returns a copy with changes to the domain are isolated", () => { const x = scalePow(), y = x.copy(); x.domain([1, 2]); assert.deepStrictEqual(y.domain(), [0, 1]); @@ -397,7 +398,7 @@ it("pow.copy() returns a copy with changes to the domain are isolated", () => { assert.deepStrictEqual(y2.domain(), [1, 1.9]); }); -it("pow.copy() returns a copy with changes to the range are isolated", () => { +test("pow.copy() returns a copy with changes to the range are isolated", () => { const x = scalePow(), y = x.copy(); x.range([1, 2]); assert.strictEqual(x.invert(1), 0); @@ -410,7 +411,7 @@ it("pow.copy() returns a copy with changes to the range are isolated", () => { assert.deepStrictEqual(y.range(), [2, 3]); }); -it("pow.copy() returns a copy with changes to the interpolator are isolated", () => { +test("pow.copy() returns a copy with changes to the interpolator are isolated", () => { const x = scalePow().range(["red", "blue"]), y = x.copy(), i0 = x.interpolate(), @@ -421,7 +422,7 @@ it("pow.copy() returns a copy with changes to the interpolator are isolated", () assert.strictEqual(y(0.5), "rgb(128, 0, 128)"); }); -it("pow.copy() returns a copy with changes to clamping are isolated", () => { +test("pow.copy() returns a copy with changes to clamping are isolated", () => { const x = scalePow().clamp(true), y = x.copy(); x.clamp(false); assert.strictEqual(x(2), 2); @@ -433,13 +434,13 @@ it("pow.copy() returns a copy with changes to clamping are isolated", () => { assert.strictEqual(x.clamp(), false); }); -it("pow().clamp(true).invert(x) cannot return a value outside the domain", () => { +test("pow().clamp(true).invert(x) cannot return a value outside the domain", () => { const x = scalePow().exponent(0.5).domain([1, 20]).clamp(true); assert.strictEqual(x.invert(0), 1); assert.strictEqual(x.invert(1), 20); }); -it("scaleSqrt() is an alias for pow().exponent(0.5)", () => { +test("scaleSqrt() is an alias for pow().exponent(0.5)", () => { const s = scaleSqrt(); assert.strictEqual(s.exponent(), 0.5); assertInDelta(s(0.5), Math.SQRT1_2, 1e-6); diff --git a/test/quantile-test.js b/test/quantile-test.js index d3d4530..3a7842a 100644 --- a/test/quantile-test.js +++ b/test/quantile-test.js @@ -1,14 +1,15 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleQuantile} from "../src/index.js"; -it("scaleQuantile() has the expected default", () => { +test("scaleQuantile() has the expected default", () => { const s = scaleQuantile(); assert.deepStrictEqual(s.domain(), []); assert.deepStrictEqual(s.range(), []); assert.strictEqual(s.unknown(), undefined); }); -it("quantile(x) uses the R-7 algorithm to compute quantiles", () => { +test("quantile(x) uses the R-7 algorithm to compute quantiles", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]); assert.deepStrictEqual([3, 6, 6.9, 7, 7.1].map(s), [0, 0, 0, 0, 0]); assert.deepStrictEqual([8, 8.9].map(s), [1, 1]); @@ -21,44 +22,44 @@ it("quantile(x) uses the R-7 algorithm to compute quantiles", () => { assert.deepStrictEqual([14.9, 15, 15.1, 16, 20].map(s), [3, 3, 3, 3, 3]); }); -it("quantile(x) returns undefined if the input value is NaN", () => { +test("quantile(x) returns undefined if the input value is NaN", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]); assert.strictEqual(s(NaN), undefined); }); -it("quantile.domain() values are sorted in ascending order", () => { +test("quantile.domain() values are sorted in ascending order", () => { const s = scaleQuantile().domain([6, 3, 7, 8, 8, 13, 20, 15, 16, 10]); assert.deepStrictEqual(s.domain(), [3, 6, 7, 8, 8, 10, 13, 15, 16, 20]); }); -it("quantile.domain() values are coerced to numbers", () => { +test("quantile.domain() values are coerced to numbers", () => { const s = scaleQuantile().domain(["6", "13", "20"]); assert.deepStrictEqual(s.domain(), [6, 13, 20]); }); -it("quantile.domain() accepts an iterable", () => { +test("quantile.domain() accepts an iterable", () => { const s = scaleQuantile().domain(new Set([6, 13, 20])); assert.deepStrictEqual(s.domain(), [6, 13, 20]); }); -it("quantile.domain() values are allowed to be zero", () => { +test("quantile.domain() values are allowed to be zero", () => { const s = scaleQuantile().domain([1, 2, 0, 0, null]); assert.deepStrictEqual(s.domain(), [0, 0, 1, 2]); }); -it("quantile.domain() non-numeric values are ignored", () => { +test("quantile.domain() non-numeric values are ignored", () => { const s = scaleQuantile().domain([6, 3, NaN, undefined, 7, 8, 8, 13, null, 20, 15, 16, 10, NaN]); assert.deepStrictEqual(s.domain(), [3, 6, 7, 8, 8, 10, 13, 15, 16, 20]); }); -it("quantile.quantiles() returns the inner thresholds", () => { +test("quantile.quantiles() returns the inner thresholds", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]); assert.deepStrictEqual(s.quantiles(), [7.25, 9, 14.5]); s.domain([3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]); assert.deepStrictEqual(s.quantiles(), [7.5, 9, 14]); }); -it("quantile.range() cardinality determines the number of quantiles", () => { +test("quantile.range() cardinality determines the number of quantiles", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]); assert.deepStrictEqual(s.range([0, 1, 2, 3]).quantiles(), [7.25, 9, 14.5]); assert.deepStrictEqual(s.range([0, 1]).quantiles(), [9]); @@ -66,12 +67,12 @@ it("quantile.range() cardinality determines the number of quantiles", () => { assert.deepStrictEqual(s.range([,,,,,,]).quantiles(), [6.5, 8, 9, 13, 15.5]); }); -it("quantile.range() accepts an iterable", () => { +test("quantile.range() accepts an iterable", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range(new Set([0, 1, 2, 3])); assert.deepStrictEqual(s.range(), [0, 1, 2, 3]); }); -it("quantile.range() values are arbitrary", () => { +test("quantile.range() values are arbitrary", () => { const a = {}; const b = {}; const c = {}; @@ -82,7 +83,7 @@ it("quantile.range() values are arbitrary", () => { assert.deepStrictEqual([14.9, 15, 15.1, 16, 20].map(s), [a, a, a, a, a]); }); -it("quantile.invertExtent() maps a value in the range to a domain extent", () => { +test("quantile.invertExtent() maps a value in the range to a domain extent", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]); assert.deepStrictEqual(s.invertExtent(0), [3, 7.25]); assert.deepStrictEqual(s.invertExtent(1), [7.25, 9]); @@ -90,7 +91,7 @@ it("quantile.invertExtent() maps a value in the range to a domain extent", () => assert.deepStrictEqual(s.invertExtent(3), [14.5, 20]); }); -it("quantile.invertExtent() allows arbitrary range values", () => { +test("quantile.invertExtent() allows arbitrary range values", () => { const a = {}; const b = {}; const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([a, b]); @@ -98,7 +99,7 @@ it("quantile.invertExtent() allows arbitrary range values", () => { assert.deepStrictEqual(s.invertExtent(b), [9, 20]); }); -it("quantile.invertExtent() returns [NaN, NaN] when the given value is not in the range", () => { +test("quantile.invertExtent() returns [NaN, NaN] when the given value is not in the range", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]); assert(s.invertExtent(-1).every(isNaN)); assert(s.invertExtent(0.5).every(isNaN)); @@ -106,14 +107,14 @@ it("quantile.invertExtent() returns [NaN, NaN] when the given value is not in th assert(s.invertExtent('a').every(isNaN)); }); -it("quantile.invertExtent() returns the first match if duplicate values exist in the range", () => { +test("quantile.invertExtent() returns the first match if duplicate values exist in the range", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 0]); assert.deepStrictEqual(s.invertExtent(0), [3, 7.25]); assert.deepStrictEqual(s.invertExtent(1), [7.25, 9]); assert.deepStrictEqual(s.invertExtent(2), [9, 14.5]); }); -it("quantile.unknown(value) sets the return value for undefined, null, and NaN input", () => { +test("quantile.unknown(value) sets the return value for undefined, null, and NaN input", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]).unknown(-1); assert.strictEqual(s(undefined), -1); assert.strictEqual(s(null), -1); diff --git a/test/quantize-test.js b/test/quantize-test.js index 5553c93..b3930bd 100644 --- a/test/quantize-test.js +++ b/test/quantize-test.js @@ -1,9 +1,10 @@ +import {test} from "vitest"; import assert from "assert"; import {range} from "d3-array"; import {scaleQuantize} from "../src/index.js"; import {assertInDelta} from "./asserts.js"; -it("scaleQuantize() has the expected defaults", () => { +test("scaleQuantize() has the expected defaults", () => { const s = scaleQuantize(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -12,7 +13,7 @@ it("scaleQuantize() has the expected defaults", () => { assert.strictEqual(s(0.75), 1); }); -it("quantize(value) maps a number to a discrete value in the range", () => { +test("quantize(value) maps a number to a discrete value in the range", () => { const s = scaleQuantize().range([0, 1, 2]); assert.deepStrictEqual(s.thresholds(), [1 / 3, 2 / 3]); assert.strictEqual(s(0.0), 0); @@ -23,7 +24,7 @@ it("quantize(value) maps a number to a discrete value in the range", () => { assert.strictEqual(s(1.0), 2); }); -it("quantize(value) clamps input values to the domain", () => { +test("quantize(value) clamps input values to the domain", () => { const a = {}; const b = {}; const c = {}; @@ -32,14 +33,14 @@ it("quantize(value) clamps input values to the domain", () => { assert.strictEqual(s(+1.5), c); }); -it("quantize.unknown(value) sets the return value for undefined, null, and NaN input", () => { +test("quantize.unknown(value) sets the return value for undefined, null, and NaN input", () => { const s = scaleQuantize().range([0, 1, 2]).unknown(-1); assert.strictEqual(s(undefined), -1); assert.strictEqual(s(null), -1); assert.strictEqual(s(NaN), -1); }); -it("quantize.domain() coerces domain values to numbers", () => { +test("quantize.domain() coerces domain values to numbers", () => { const s = scaleQuantize().domain(["-1.20", "2.40"]); assert.deepStrictEqual(s.domain(), [-1.2, 2.4]); assert.strictEqual(s(-1.2), 0); @@ -48,17 +49,17 @@ it("quantize.domain() coerces domain values to numbers", () => { assert.strictEqual(s( 2.4), 1); }); -it("quantize.domain() accepts an iterable", () => { +test("quantize.domain() accepts an iterable", () => { const s = scaleQuantize().domain(new Set([1, 2])); assert.deepStrictEqual(s.domain(), [1, 2]); }); -it("quantize.domain() only considers the first and second element of the domain", () => { +test("quantize.domain() only considers the first and second element of the domain", () => { const s = scaleQuantize().domain([-1, 100, 200]); assert.deepStrictEqual(s.domain(), [-1, 100]); }); -it("quantize.range() cardinality determines the degree of quantization", () => { +test("quantize.range() cardinality determines the degree of quantization", () => { const s = scaleQuantize(); assertInDelta(s.range(range(0, 1.001, 0.001))(1/3), 0.333, 1e-6); assertInDelta(s.range(range(0, 1.010, 0.010))(1/3), 0.330, 1e-6); @@ -69,7 +70,7 @@ it("quantize.range() cardinality determines the degree of quantization", () => { assertInDelta(s.range(range(1))(1/3), 0, 1e-6); }); -it("quantize.range() values are arbitrary", () => { +test("quantize.range() values are arbitrary", () => { const a = {}; const b = {}; const c = {}; @@ -82,7 +83,7 @@ it("quantize.range() values are arbitrary", () => { assert.strictEqual(s(1.0), c); }); -it("quantize.invertExtent() maps a value in the range to a domain extent", () => { +test("quantize.invertExtent() maps a value in the range to a domain extent", () => { const s = scaleQuantize().range([0, 1, 2, 3]); assert.deepStrictEqual(s.invertExtent(0), [0.00, 0.25]); assert.deepStrictEqual(s.invertExtent(1), [0.25, 0.50]); @@ -90,7 +91,7 @@ it("quantize.invertExtent() maps a value in the range to a domain extent", () => assert.deepStrictEqual(s.invertExtent(3), [0.75, 1.00]); }); -it("quantize.invertExtent() allows arbitrary range values", () => { +test("quantize.invertExtent() allows arbitrary range values", () => { const a = {}; const b = {}; const s = scaleQuantize().range([a, b]); @@ -98,7 +99,7 @@ it("quantize.invertExtent() allows arbitrary range values", () => { assert.deepStrictEqual(s.invertExtent(b), [0.5, 1.0]); }); -it("quantize.invertExtent() returns [NaN, NaN] when the given value is not in the range", () => { +test("quantize.invertExtent() returns [NaN, NaN] when the given value is not in the range", () => { const s = scaleQuantize(); assert(s.invertExtent(-1).every(Number.isNaN)); assert(s.invertExtent(0.5).every(Number.isNaN)); @@ -106,13 +107,13 @@ it("quantize.invertExtent() returns [NaN, NaN] when the given value is not in th assert(s.invertExtent("a").every(Number.isNaN)); }); -it("quantize.invertExtent() returns the first match if duplicate values exist in the range", () => { +test("quantize.invertExtent() returns the first match if duplicate values exist in the range", () => { const s = scaleQuantize().range([0, 1, 2, 0]); assert.deepStrictEqual(s.invertExtent(0), [0.00, 0.25]); assert.deepStrictEqual(s.invertExtent(1), [0.25, 0.50]); }); -it("quantize.invertExtent(y) is exactly consistent with quantize(x)", () => { +test("quantize.invertExtent(y) is exactly consistent with quantize(x)", () => { const s = scaleQuantize().domain([4.2, 6.2]).range(range(10)); s.range().forEach(function(y) { const e = s.invertExtent(y); diff --git a/test/radial-test.js b/test/radial-test.js index 1d73069..472072e 100644 --- a/test/radial-test.js +++ b/test/radial-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleRadial} from "../src/index.js"; -it("scaleRadial() has the expected defaults", () => { +test("scaleRadial() has the expected defaults", () => { const s = scaleRadial(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -9,40 +10,40 @@ it("scaleRadial() has the expected defaults", () => { assert.strictEqual(s.round(), false); }); -it("scaleRadial(range) sets the range", () => { +test("scaleRadial(range) sets the range", () => { const s = scaleRadial([100, 200]); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [100, 200]); assert.strictEqual(s(0.5), 158.11388300841898); }); -it("scaleRadial(domain, range) sets the range", () => { +test("scaleRadial(domain, range) sets the range", () => { const s = scaleRadial([1, 2], [10, 20]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.deepStrictEqual(s.range(), [10, 20]); assert.strictEqual(s(1.5), 15.811388300841896); }); -it("radial(x) maps a domain value x to a range value y", () => { +test("radial(x) maps a domain value x to a range value y", () => { assert.strictEqual(scaleRadial([1, 2])(0.5), 1.5811388300841898); }); -it("radial(x) ignores extra range values if the domain is smaller than the range", () => { +test("radial(x) ignores extra range values if the domain is smaller than the range", () => { assert.strictEqual(scaleRadial().domain([-10, 0]).range([2, 3, 4]).clamp(true)(-5), 2.5495097567963922); assert.strictEqual(scaleRadial().domain([-10, 0]).range([2, 3, 4]).clamp(true)(50), 3); }); -it("radial(x) ignores extra domain values if the range is smaller than the domain", () => { +test("radial(x) ignores extra domain values if the range is smaller than the domain", () => { assert.strictEqual(scaleRadial().domain([-10, 0, 100]).range([2, 3]).clamp(true)(-5), 2.5495097567963922); assert.strictEqual(scaleRadial().domain([-10, 0, 100]).range([2, 3]).clamp(true)(50), 3); }); -it("radial(x) maps an empty domain to the middle of the range", () => { +test("radial(x) maps an empty domain to the middle of the range", () => { assert.strictEqual(scaleRadial().domain([0, 0]).range([1, 2])(0), 1.5811388300841898); assert.strictEqual(scaleRadial().domain([0, 0]).range([2, 1])(1), 1.5811388300841898); }); -it("radial(x) can map a bilinear domain with two values to the corresponding range", () => { +test("radial(x) can map a bilinear domain with two values to the corresponding range", () => { const s = scaleRadial().domain([1, 2]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.strictEqual(s(0.5), -0.7071067811865476); @@ -57,7 +58,7 @@ it("radial(x) can map a bilinear domain with two values to the corresponding ran assert.strictEqual(s.invert( 1.5), 3.25); }); -it("radial(NaN) returns undefined", () => { +test("radial(NaN) returns undefined", () => { const s = scaleRadial(); assert.strictEqual(s(NaN), undefined); assert.strictEqual(s(undefined), undefined); @@ -65,15 +66,15 @@ it("radial(NaN) returns undefined", () => { assert.strictEqual(s({}), undefined); }); -it("radial.unknown(unknown)(NaN) returns the specified unknown value", () => { +test("radial.unknown(unknown)(NaN) returns the specified unknown value", () => { assert.strictEqual(scaleRadial().unknown("foo")(NaN), "foo"); }); -it("radial(x) can handle a negative range", () => { +test("radial(x) can handle a negative range", () => { assert.strictEqual(scaleRadial([-1, -2])(0.5), -1.5811388300841898); }); -it("radial(x) can clamp negative values", () => { +test("radial(x) can clamp negative values", () => { assert.strictEqual(scaleRadial([-1, -2]).clamp(true)(-0.5), -1); assert.strictEqual(scaleRadial().clamp(true)(-0.5), 0); assert.strictEqual(scaleRadial([-0.25, 0], [1, 2]).clamp(true)(-0.5), 1); diff --git a/test/sequential-test.js b/test/sequential-test.js index 7385426..058129e 100644 --- a/test/sequential-test.js +++ b/test/sequential-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleSequential} from "../src/index.js"; -it("scaleSequential() has the expected defaults", () => { +test("scaleSequential() has the expected defaults", () => { const s = scaleSequential(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.strictEqual(s.interpolator()(0.42), 0.42); @@ -14,7 +15,7 @@ it("scaleSequential() has the expected defaults", () => { assert.strictEqual(s( 1.5), 1.5); }); -it("sequential.clamp(true) enables clamping", () => { +test("sequential.clamp(true) enables clamping", () => { const s = scaleSequential().clamp(true); assert.strictEqual(s.clamp(), true); assert.strictEqual(s(-0.5), 0.0); @@ -24,7 +25,7 @@ it("sequential.clamp(true) enables clamping", () => { assert.strictEqual(s( 1.5), 1.0); }); -it("sequential.unknown(value) sets the return value for undefined and NaN input", () => { +test("sequential.unknown(value) sets the return value for undefined and NaN input", () => { const s = scaleSequential().unknown(-1); assert.strictEqual(s.unknown(), -1); assert.strictEqual(s(undefined), -1); @@ -33,7 +34,7 @@ it("sequential.unknown(value) sets the return value for undefined and NaN input" assert.strictEqual(s(0.4), 0.4); }); -it("sequential.domain() coerces domain values to numbers", () => { +test("sequential.domain() coerces domain values to numbers", () => { const s = scaleSequential().domain(["-1.20", "2.40"]); assert.deepStrictEqual(s.domain(), [-1.2, 2.4]); assert.strictEqual(s(-1.2), 0.0); @@ -41,12 +42,12 @@ it("sequential.domain() coerces domain values to numbers", () => { assert.strictEqual(s( 2.4), 1.0); }); -it("sequential.domain() accepts an iterable", () => { +test("sequential.domain() accepts an iterable", () => { const s = scaleSequential().domain(new Set(["-1.20", "2.40"])); assert.deepStrictEqual(s.domain(), [-1.2, 2.4]); }); -it("sequential.domain() handles a degenerate domain", () => { +test("sequential.domain() handles a degenerate domain", () => { const s = scaleSequential().domain([2, 2]); assert.deepStrictEqual(s.domain(), [2, 2]); assert.strictEqual(s(-1.2), 0.5); @@ -54,7 +55,7 @@ it("sequential.domain() handles a degenerate domain", () => { assert.strictEqual(s( 2.4), 0.5); }); -it("sequential.domain() handles a non-numeric domain", () => { +test("sequential.domain() handles a non-numeric domain", () => { const s = scaleSequential().domain([NaN, 2]); assert.strictEqual(isNaN(s.domain()[0]), true); assert.strictEqual(s.domain()[1], 2); @@ -63,12 +64,12 @@ it("sequential.domain() handles a non-numeric domain", () => { assert.strictEqual(isNaN(s( 2.4)), true); }); -it("sequential.domain() only considers the first and second element of the domain", () => { +test("sequential.domain() only considers the first and second element of the domain", () => { const s = scaleSequential().domain([-1, 100, 200]); assert.deepStrictEqual(s.domain(), [-1, 100]); }); -it("sequential.copy() returns an isolated copy of the scale", () => { +test("sequential.copy() returns an isolated copy of the scale", () => { const s1 = scaleSequential().domain([1, 3]).clamp(true); const s2 = s1.copy(); assert.deepStrictEqual(s2.domain(), [1, 3]); @@ -83,7 +84,7 @@ it("sequential.copy() returns an isolated copy of the scale", () => { assert.deepStrictEqual(s1.clamp(), false); }); -it("sequential.interpolator(interpolator) sets the interpolator", () => { +test("sequential.interpolator(interpolator) sets the interpolator", () => { const i0 = function(t) { return t; }; const i1 = function(t) { return t * 2; }; const s = scaleSequential(i0); @@ -95,24 +96,24 @@ it("sequential.interpolator(interpolator) sets the interpolator", () => { assert.strictEqual(s( 0.5), 1.0); }); -it("sequential.range() returns the computed range", () => { +test("sequential.range() returns the computed range", () => { const s = scaleSequential(function(t) { return t * 2 + 1; }); assert.deepStrictEqual(s.range(), [1, 3]); }); -it("sequential.range(range) sets the interpolator", () => { +test("sequential.range(range) sets the interpolator", () => { const s = scaleSequential().range([1, 3]); assert.strictEqual(s.interpolator()(0.5), 2); assert.deepStrictEqual(s.range(), [1, 3]); }); -it("sequential.range(range) ignores additional values", () => { +test("sequential.range(range) ignores additional values", () => { const s = scaleSequential().range([1, 3, 10]); assert.strictEqual(s.interpolator()(0.5), 2); assert.deepStrictEqual(s.range(), [1, 3]); }); -it("scaleSequential(range) sets the interpolator", () => { +test("scaleSequential(range) sets the interpolator", () => { const s = scaleSequential([1, 3]); assert.strictEqual(s.interpolator()(0.5), 2); assert.deepStrictEqual(s.range(), [1, 3]); diff --git a/test/sequentialQuantile-test.js b/test/sequentialQuantile-test.js index 0a7f6ae..3b39adf 100644 --- a/test/sequentialQuantile-test.js +++ b/test/sequentialQuantile-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleSequentialQuantile} from "../src/index.js"; -it("sequentialQuantile() clamps", () => { +test("sequentialQuantile() clamps", () => { const s = scaleSequentialQuantile().domain([0, 1, 2, 3, 10]); assert.strictEqual(s(-1), 0); assert.strictEqual(s(0), 0); @@ -10,17 +11,17 @@ it("sequentialQuantile() clamps", () => { assert.strictEqual(s(20), 1); }); -it("sequentialQuantile().domain() sorts the domain", () => { +test("sequentialQuantile().domain() sorts the domain", () => { const s = scaleSequentialQuantile().domain([0, 2, 9, 0.1, 10]); assert.deepStrictEqual(s.domain(), [0, 0.1, 2, 9, 10]); }); -it("sequentialQuantile().range() returns the computed range", () => { +test("sequentialQuantile().range() returns the computed range", () => { const s = scaleSequentialQuantile().domain([0, 2, 9, 0.1, 10]); assert.deepStrictEqual(s.range(), [0 / 4, 1 / 4, 2 / 4, 3 / 4, 4 / 4]); }); -it("sequentialQuantile().quantiles(n) computes n + 1 quantiles", () => { +test("sequentialQuantile().quantiles(n) computes n + 1 quantiles", () => { const s = scaleSequentialQuantile().domain(Array.from({length: 2000}, (_, i) => 2 * i / 1999)); assert.deepStrictEqual(s.quantiles(4), [0, 0.5, 1, 1.5, 2]); }); diff --git a/test/sqrt-test.js b/test/sqrt-test.js index 8767cd4..15422a9 100644 --- a/test/sqrt-test.js +++ b/test/sqrt-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleSqrt} from "../src/index.js"; -it("scaleSqrt() has the expected defaults", () => { +test("scaleSqrt() has the expected defaults", () => { const s = scaleSqrt(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -10,6 +11,6 @@ it("scaleSqrt() has the expected defaults", () => { assert.deepStrictEqual(s.interpolate()({array: ["red"]}, {array: ["blue"]})(0.5), {array: ["rgb(128, 0, 128)"]}); }); -it("sqrt(x) maps a domain value x to a range value y", () => { +test("sqrt(x) maps a domain value x to a range value y", () => { assert.strictEqual(scaleSqrt()(0.5), Math.SQRT1_2); }); diff --git a/test/symlog-test.js b/test/symlog-test.js index 7b65749..efa6767 100644 --- a/test/symlog-test.js +++ b/test/symlog-test.js @@ -1,8 +1,9 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleSymlog} from "../src/index.js"; import {assertInDelta} from "./asserts.js"; -it("scaleSymlog() has the expected defaults", () => { +test("scaleSymlog() has the expected defaults", () => { const s = scaleSymlog(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -10,52 +11,52 @@ it("scaleSymlog() has the expected defaults", () => { assert.strictEqual(s.constant(), 1); }); -it("symlog(x) maps a domain value x to a range value y", () => { +test("symlog(x) maps a domain value x to a range value y", () => { const s = scaleSymlog().domain([-100, 100]); assert.strictEqual(s(-100), 0); assert.strictEqual(s(100), 1); assert.strictEqual(s(0), 0.5); }); -it("symlog.invert(y) maps a range value y to a domain value x", () => { +test("symlog.invert(y) maps a range value y to a domain value x", () => { const s = scaleSymlog().domain([-100, 100]); assertInDelta(s.invert(1), 100); }); -it("symlog.invert(y) coerces range values to numbers", () => { +test("symlog.invert(y) coerces range values to numbers", () => { const s = scaleSymlog().range(["-3", "3"]); assert.deepStrictEqual(s.invert(3), 1); }); -it("symlog.invert(y) returns NaN if the range is not coercible to number", () => { +test("symlog.invert(y) returns NaN if the range is not coercible to number", () => { assert(isNaN(scaleSymlog().range(["#000", "#fff"]).invert("#999"))); assert(isNaN(scaleSymlog().range([0, "#fff"]).invert("#999"))); }); -it("symlog.constant(constant) sets the constant to the specified value", () => { +test("symlog.constant(constant) sets the constant to the specified value", () => { const s = scaleSymlog().constant(5); assert.strictEqual(s.constant(), 5); }); -it("symlog.constant(constant) changing the constant does not change the domain or range", () => { +test("symlog.constant(constant) changing the constant does not change the domain or range", () => { const s = scaleSymlog().constant(2); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); }); -it("symlog.domain(domain) accepts an array of numbers", () => { +test("symlog.domain(domain) accepts an array of numbers", () => { assert.deepStrictEqual(scaleSymlog().domain([]).domain(), []); assert.deepStrictEqual(scaleSymlog().domain([1, 0]).domain(), [1, 0]); assert.deepStrictEqual(scaleSymlog().domain([1, 2, 3]).domain(), [1, 2, 3]); }); -it("symlog.domain(domain) coerces domain values to numbers", () => { +test("symlog.domain(domain) coerces domain values to numbers", () => { assert.deepStrictEqual(scaleSymlog().domain([new Date(Date.UTC(1990, 0, 1)), new Date(Date.UTC(1991, 0, 1))]).domain(), [631152000000, 662688000000]); assert.deepStrictEqual(scaleSymlog().domain(["0.0", "1.0"]).domain(), [0, 1]); assert.deepStrictEqual(scaleSymlog().domain([new Number(0), new Number(1)]).domain(), [0, 1]); }); -it("symlog.domain(domain) makes a copy of domain values", () => { +test("symlog.domain(domain) makes a copy of domain values", () => { const d = [1, 2], s = scaleSymlog().domain(d); assert.deepStrictEqual(s.domain(), [1, 2]); d.push(3); @@ -63,25 +64,25 @@ it("symlog.domain(domain) makes a copy of domain values", () => { assert.deepStrictEqual(d, [1, 2, 3]); }); -it("symlog.domain() returns a copy of domain values", () => { +test("symlog.domain() returns a copy of domain values", () => { const s = scaleSymlog(), d = s.domain(); assert.deepStrictEqual(d, [0, 1]); d.push(3); assert.deepStrictEqual(s.domain(), [0, 1]); }); -it("symlog.range(range) does not coerce range to numbers", () => { +test("symlog.range(range) does not coerce range to numbers", () => { const s = scaleSymlog().range(["0px", "2px"]); assert.deepStrictEqual(s.range(), ["0px", "2px"]); assert.strictEqual(s(1), "2px"); }); -it("symlog.range(range) can accept range values as arrays or objects", () => { +test("symlog.range(range) can accept range values as arrays or objects", () => { assert.deepStrictEqual(scaleSymlog().range([{color: "red"}, {color: "blue"}])(1), {color: "rgb(0, 0, 255)"}); assert.deepStrictEqual(scaleSymlog().range([["red"], ["blue"]])(0), ["rgb(255, 0, 0)"]); }); -it("symlog.range(range) makes a copy of range values", () => { +test("symlog.range(range) makes a copy of range values", () => { const r = [1, 2], s = scaleSymlog().range(r); assert.deepStrictEqual(s.range(), [1, 2]); r.push(3); @@ -89,14 +90,14 @@ it("symlog.range(range) makes a copy of range values", () => { assert.deepStrictEqual(r, [1, 2, 3]); }); -it("symlog.range() returns a copy of range values", () => { +test("symlog.range() returns a copy of range values", () => { const s = scaleSymlog(), r = s.range(); assert.deepStrictEqual(r, [0, 1]); r.push(3); assert.deepStrictEqual(s.range(), [0, 1]); }); -it("symlog.clamp() is false by default", () => { +test("symlog.clamp() is false by default", () => { assert.strictEqual(scaleSymlog().clamp(), false); assert.strictEqual(scaleSymlog().range([10, 20])(3), 30); assert.strictEqual(scaleSymlog().range([10, 20])(-1), 0); @@ -104,24 +105,24 @@ it("symlog.clamp() is false by default", () => { assert.strictEqual(scaleSymlog().range([10, 20]).invert(0), -1); }); -it("symlog.clamp(true) restricts output values to the range", () => { +test("symlog.clamp(true) restricts output values to the range", () => { assert.strictEqual(scaleSymlog().clamp(true).range([10, 20])(2), 20); assert.strictEqual(scaleSymlog().clamp(true).range([10, 20])(-1), 10); }); -it("symlog.clamp(true) restricts input values to the domain", () => { +test("symlog.clamp(true) restricts input values to the domain", () => { assert.strictEqual(scaleSymlog().clamp(true).range([10, 20]).invert(30), 1); assert.strictEqual(scaleSymlog().clamp(true).range([10, 20]).invert(0), 0); }); -it("symlog.clamp(clamp) coerces the specified clamp value to a boolean", () => { +test("symlog.clamp(clamp) coerces the specified clamp value to a boolean", () => { assert.strictEqual(scaleSymlog().clamp("true").clamp(), true); assert.strictEqual(scaleSymlog().clamp(1).clamp(), true); assert.strictEqual(scaleSymlog().clamp("").clamp(), false); assert.strictEqual(scaleSymlog().clamp(0).clamp(), false); }); -it("symlog.copy() returns a copy with changes to the domain are isolated", () => { +test("symlog.copy() returns a copy with changes to the domain are isolated", () => { const x = scaleSymlog(), y = x.copy(); x.domain([1, 2]); assert.deepStrictEqual(y.domain(), [0, 1]); @@ -138,7 +139,7 @@ it("symlog.copy() returns a copy with changes to the domain are isolated", () => assert.deepStrictEqual(y2.domain(), [1, 1.9]); }); -it("symlog.copy() returns a copy with changes to the range are isolated", () => { +test("symlog.copy() returns a copy with changes to the range are isolated", () => { const x = scaleSymlog(), y = x.copy(); x.range([1, 2]); assert.strictEqual(x.invert(1), 0); @@ -151,7 +152,7 @@ it("symlog.copy() returns a copy with changes to the range are isolated", () => assert.deepStrictEqual(y.range(), [2, 3]); }); -it("symlog.copy() returns a copy with changes to clamping are isolated", () => { +test("symlog.copy() returns a copy with changes to clamping are isolated", () => { const x = scaleSymlog().clamp(true), y = x.copy(); x.clamp(false); assert.strictEqual(x(3), 2); @@ -163,7 +164,7 @@ it("symlog.copy() returns a copy with changes to clamping are isolated", () => { assert.strictEqual(x.clamp(), false); }); -it("symlog().clamp(true).invert(x) cannot return a value outside the domain", () => { +test("symlog().clamp(true).invert(x) cannot return a value outside the domain", () => { const x = scaleSymlog().domain([1, 20]).clamp(true); assert.strictEqual(x.invert(0), 1); assert.strictEqual(x.invert(1), 20); diff --git a/test/threshold-test.js b/test/threshold-test.js index a79d603..66e201e 100644 --- a/test/threshold-test.js +++ b/test/threshold-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {scaleThreshold} from "../src/index.js"; -it("scaleThreshold() has the expected defaults", () => { +test("scaleThreshold() has the expected defaults", () => { const x = scaleThreshold(); assert.deepStrictEqual(x.domain(), [0.5]); assert.deepStrictEqual(x.range(), [0, 1]); @@ -9,7 +10,7 @@ it("scaleThreshold() has the expected defaults", () => { assert.strictEqual(x(0.49), 0); }); -it("threshold(x) maps a number to a discrete value in the range", () => { +test("threshold(x) maps a number to a discrete value in the range", () => { const x = scaleThreshold().domain([1/3, 2/3]).range(["a", "b", "c"]); assert.strictEqual(x(0), "a"); assert.strictEqual(x(0.2), "a"); @@ -19,7 +20,7 @@ it("threshold(x) maps a number to a discrete value in the range", () => { assert.strictEqual(x(1), "c"); }); -it("threshold(x) returns undefined if the specified value x is not orderable", () => { +test("threshold(x) returns undefined if the specified value x is not orderable", () => { const x = scaleThreshold().domain([1/3, 2/3]).range(["a", "b", "c"]); assert.strictEqual(x(), undefined); assert.strictEqual(x(undefined), undefined); @@ -27,7 +28,7 @@ it("threshold(x) returns undefined if the specified value x is not orderable", ( assert.strictEqual(x(null), undefined); }); -it("threshold.domain(…) supports arbitrary orderable values", () => { +test("threshold.domain(…) supports arbitrary orderable values", () => { const x = scaleThreshold().domain(["10", "2"]).range([0, 1, 2]); assert.strictEqual(x.domain()[0], "10"); assert.strictEqual(x.domain()[1], "2"); @@ -36,12 +37,12 @@ it("threshold.domain(…) supports arbitrary orderable values", () => { assert.strictEqual(x("3"), 2); }); -it("threshold.domain(…) accepts an iterable", () => { +test("threshold.domain(…) accepts an iterable", () => { const x = scaleThreshold().domain(new Set(["10", "2"])).range([0, 1, 2]); assert.deepStrictEqual(x.domain(), ["10", "2"]); }); -it("threshold.range(…) supports arbitrary values", () => { +test("threshold.range(…) supports arbitrary values", () => { const a = {}, b = {}, c = {}, x = scaleThreshold().domain([1/3, 2/3]).range([a, b, c]); assert.strictEqual(x(0), a); assert.strictEqual(x(0.2), a); @@ -51,12 +52,12 @@ it("threshold.range(…) supports arbitrary values", () => { assert.strictEqual(x(1), c); }); -it("threshold.range(…) accepts an iterable", () => { +test("threshold.range(…) accepts an iterable", () => { const x = scaleThreshold().domain(["10", "2"]).range(new Set([0, 1, 2])); assert.deepStrictEqual(x.range(), [0, 1, 2]); }); -it("threshold.invertExtent(y) returns the domain extent for the specified range value", () => { +test("threshold.invertExtent(y) returns the domain extent for the specified range value", () => { const a = {}, b = {}, c = {}, x = scaleThreshold().domain([1/3, 2/3]).range([a, b, c]); assert.deepStrictEqual(x.invertExtent(a), [undefined, 1/3]); assert.deepStrictEqual(x.invertExtent(b), [1/3, 2/3]); diff --git a/test/tickFormat-test.js b/test/tickFormat-test.js index 613e477..f046665 100644 --- a/test/tickFormat-test.js +++ b/test/tickFormat-test.js @@ -1,20 +1,21 @@ +import {test} from "vitest"; import assert from "assert"; import {tickFormat} from "../src/index.js"; -it("tickFormat(start, stop, count) returns a format suitable for the ticks", () => { +test("tickFormat(start, stop, count) returns a format suitable for the ticks", () => { assert.strictEqual(tickFormat(0, 1, 10)(0.2), "0.2"); assert.strictEqual(tickFormat(0, 1, 20)(0.2), "0.20"); assert.strictEqual(tickFormat(-100, 100, 10)(-20), "−20"); }); -it("tickFormat(start, stop, count, specifier) sets the appropriate fixed precision if not specified", () => { +test("tickFormat(start, stop, count, specifier) sets the appropriate fixed precision if not specified", () => { assert.strictEqual(tickFormat(0, 1, 10, "+f")(0.2), "+0.2"); assert.strictEqual(tickFormat(0, 1, 20, "+f")(0.2), "+0.20"); assert.strictEqual(tickFormat(0, 1, 10, "+%")(0.2), "+20%"); assert.strictEqual(tickFormat(0.19, 0.21, 10, "+%")(0.2), "+20.0%"); }); -it("tickFormat(start, stop, count, specifier) sets the appropriate round precision if not specified", () => { +test("tickFormat(start, stop, count, specifier) sets the appropriate round precision if not specified", () => { assert.strictEqual(tickFormat(0, 9, 10, "")(2.10), "2"); assert.strictEqual(tickFormat(0, 9, 100, "")(2.01), "2"); assert.strictEqual(tickFormat(0, 9, 100, "")(2.11), "2.1"); @@ -31,12 +32,12 @@ it("tickFormat(start, stop, count, specifier) sets the appropriate round precisi assert.strictEqual(tickFormat(0.19, 0.21, 10, "p")(0.201), "20.1%"); }); -it("tickFormat(start, stop, count, specifier) sets the appropriate prefix precision if not specified", () => { +test("tickFormat(start, stop, count, specifier) sets the appropriate prefix precision if not specified", () => { assert.strictEqual(tickFormat(0, 1e6, 10, "$s")(0.51e6), "$0.5M"); assert.strictEqual(tickFormat(0, 1e6, 100, "$s")(0.501e6), "$0.50M"); }); -it("tickFormat(start, stop, count) uses the default precision when the domain is invalid", () => { +test("tickFormat(start, stop, count) uses the default precision when the domain is invalid", () => { const f = tickFormat(0, NaN, 10); assert.strictEqual(f + "", " >-,f"); assert.strictEqual(f(0.12), "0.120000"); diff --git a/test/time-test.js b/test/time-test.js index 0fc6837..c706077 100644 --- a/test/time-test.js +++ b/test/time-test.js @@ -1,48 +1,49 @@ +import {test} from "vitest"; import assert from "assert"; import {interpolateHsl} from "d3-interpolate"; import {timeDay, timeMinute, timeMonth, timeWeek, timeYear} from "d3-time"; import {scaleTime} from "../src/index.js"; import {local} from "./date.js"; -it("time.domain([-1e50, 1e50]) is equivalent to time.domain([NaN, NaN])", () => { +test("time.domain([-1e50, 1e50]) is equivalent to time.domain([NaN, NaN])", () => { const x = scaleTime().domain([-1e50, 1e50]); assert.strictEqual(isNaN(x.domain()[0]), true); // Note: also coerced on retrieval, so insufficient test! assert.strictEqual(isNaN(x.domain()[1]), true); assert.deepStrictEqual(x.ticks(10), []); }); -it("time.domain(domain) accepts an iterable", () => { +test("time.domain(domain) accepts an iterable", () => { const x = scaleTime().domain(new Set([local(2009), local(2010)])); assert.deepStrictEqual(x.domain(), [local(2009), local(2010)]); }); -it("time.nice() is an alias for time.nice(10)", () => { +test("time.nice() is an alias for time.nice(10)", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 17), local(2009, 0, 1, 23, 42)]); assert.deepStrictEqual(x.nice().domain(), [local(2009, 0, 1), local(2009, 0, 2)]); }); -it("time.nice() can nice sub-second domains", () => { +test("time.nice() can nice sub-second domains", () => { const x = scaleTime().domain([local(2013, 0, 1, 12, 0, 0, 0), local(2013, 0, 1, 12, 0, 0, 128)]); assert.deepStrictEqual(x.nice().domain(), [local(2013, 0, 1, 12, 0, 0, 0), local(2013, 0, 1, 12, 0, 0, 130)]); }); -it("time.nice() can nice multi-year domains", () => { +test("time.nice() can nice multi-year domains", () => { const x = scaleTime().domain([local(2001, 0, 1), local(2138, 0, 1)]); assert.deepStrictEqual(x.nice().domain(), [local(2000, 0, 1), local(2140, 0, 1)]); }); -it("time.nice() can nice empty domains", () => { +test("time.nice() can nice empty domains", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 12), local(2009, 0, 1, 0, 12)]); assert.deepStrictEqual(x.nice().domain(), [local(2009, 0, 1, 0, 12), local(2009, 0, 1, 0, 12)]); }); -it("time.nice(count) nices using the specified tick count", () => { +test("time.nice(count) nices using the specified tick count", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 17), local(2009, 0, 1, 23, 42)]); assert.deepStrictEqual(x.nice(100).domain(), [local(2009, 0, 1, 0, 15), local(2009, 0, 1, 23, 45)]); assert.deepStrictEqual(x.nice(10).domain(), [local(2009, 0, 1), local(2009, 0, 2)]); }); -it("time.nice(interval) nices using the specified time interval", () => { +test("time.nice(interval) nices using the specified time interval", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 12), local(2009, 0, 1, 23, 48)]); assert.deepStrictEqual(x.nice(timeDay).domain(), [local(2009, 0, 1), local(2009, 0, 2)]); assert.deepStrictEqual(x.nice(timeWeek).domain(), [local(2008, 11, 28), local(2009, 0, 4)]); @@ -50,17 +51,17 @@ it("time.nice(interval) nices using the specified time interval", () => { assert.deepStrictEqual(x.nice(timeYear).domain(), [local(2008, 0, 1), local(2010, 0, 1)]); }); -it("time.nice(interval) can nice empty domains", () => { +test("time.nice(interval) can nice empty domains", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 12), local(2009, 0, 1, 0, 12)]); assert.deepStrictEqual(x.nice(timeDay).domain(), [local(2009, 0, 1), local(2009, 0, 2)]); }); -it("time.nice(interval) can nice a polylinear domain, only affecting its extent", () => { +test("time.nice(interval) can nice a polylinear domain, only affecting its extent", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 12), local(2009, 0, 1, 23, 48), local(2009, 0, 2, 23, 48)]).nice(timeDay); assert.deepStrictEqual(x.domain(), [local(2009, 0, 1), local(2009, 0, 1, 23, 48), local(2009, 0, 3)]); }); -it("time.nice(interval.every(step)) nices using the specified time interval and step", () => { +test("time.nice(interval.every(step)) nices using the specified time interval and step", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 12), local(2009, 0, 1, 23, 48)]); assert.deepStrictEqual(x.nice(timeDay.every(3)).domain(), [local(2009, 0, 1), local(2009, 0, 4)]); assert.deepStrictEqual(x.nice(timeWeek.every(2)).domain(), [local(2008, 11, 21), local(2009, 0, 4)]); @@ -68,7 +69,7 @@ it("time.nice(interval.every(step)) nices using the specified time interval and assert.deepStrictEqual(x.nice(timeYear.every(10)).domain(), [local(2000, 0, 1), local(2010, 0, 1)]); }); -it("time.copy() isolates changes to the domain", () => { +test("time.copy() isolates changes to the domain", () => { const x = scaleTime().domain([local(2009, 0, 1), local(2010, 0, 1)]), y = x.copy(); x.domain([local(2010, 0, 1), local(2011, 0, 1)]); assert.deepStrictEqual(y.domain(), [local(2009, 0, 1), local(2010, 0, 1)]); @@ -81,7 +82,7 @@ it("time.copy() isolates changes to the domain", () => { assert.deepStrictEqual(y.domain(), [local(2011, 0, 1), local(2012, 0, 1)]); }); -it("time.copy() isolates changes to the range", () => { +test("time.copy() isolates changes to the range", () => { const x = scaleTime().domain([local(2009, 0, 1), local(2010, 0, 1)]), y = x.copy(); x.range([1, 2]); assert.deepStrictEqual(x.invert(1), local(2009, 0, 1)); @@ -94,7 +95,7 @@ it("time.copy() isolates changes to the range", () => { assert.deepStrictEqual(y.range(), [2, 3]); }); -it("time.copy() isolates changes to the interpolator", () => { +test("time.copy() isolates changes to the interpolator", () => { const x = scaleTime().domain([local(2009, 0, 1), local(2010, 0, 1)]).range(["red", "blue"]), i = x.interpolate(), y = x.copy(); @@ -104,7 +105,7 @@ it("time.copy() isolates changes to the interpolator", () => { assert.strictEqual(y.interpolate(), i); }); -it("time.copy() isolates changes to clamping", () => { +test("time.copy() isolates changes to clamping", () => { const x = scaleTime().domain([local(2009, 0, 1), local(2010, 0, 1)]).clamp(true), y = x.copy(); x.clamp(false); assert.strictEqual(x(local(2011, 0, 1)), 2); @@ -116,7 +117,7 @@ it("time.copy() isolates changes to clamping", () => { assert.strictEqual(x.clamp(), false); }); -it("time.clamp(true).invert(value) never returns a value outside the domain", () => { +test("time.clamp(true).invert(value) never returns a value outside the domain", () => { const x = scaleTime().clamp(true); assert(x.invert(0) instanceof Date); assert(x.invert(0) !== x.invert(0)); // returns a distinct copy @@ -126,7 +127,7 @@ it("time.clamp(true).invert(value) never returns a value outside the domain", () assert.strictEqual(+x.invert(2), +x.domain()[1]); }); -it("time.ticks(interval) observes the specified tick interval", () => { +test("time.ticks(interval) observes the specified tick interval", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 1, 0), local(2011, 0, 1, 12, 4, 4)]); assert.deepStrictEqual(x.ticks(timeMinute), [ local(2011, 0, 1, 12, 1), @@ -136,7 +137,7 @@ it("time.ticks(interval) observes the specified tick interval", () => { ]); }); -it("time.ticks(interval.every(step)) observes the specified tick interval and step", () => { +test("time.ticks(interval.every(step)) observes the specified tick interval and step", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 33, 4)]); assert.deepStrictEqual(x.ticks(timeMinute.every(10)), [ local(2011, 0, 1, 12, 0), @@ -146,7 +147,7 @@ it("time.ticks(interval.every(step)) observes the specified tick interval and st ]); }); -it("time.ticks(count) can generate sub-second ticks", () => { +test("time.ticks(count) can generate sub-second ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 1)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 0, 0, 0), @@ -158,7 +159,7 @@ it("time.ticks(count) can generate sub-second ticks", () => { ]); }); -it("time.ticks(count) can generate 1-second ticks", () => { +test("time.ticks(count) can generate 1-second ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 4)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 0, 0), @@ -169,7 +170,7 @@ it("time.ticks(count) can generate 1-second ticks", () => { ]); }); -it("time.ticks(count) can generate 5-second ticks", () => { +test("time.ticks(count) can generate 5-second ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 20)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 0, 0), @@ -180,7 +181,7 @@ it("time.ticks(count) can generate 5-second ticks", () => { ]); }); -it("time.ticks(count) can generate 15-second ticks", () => { +test("time.ticks(count) can generate 15-second ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 50)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 0, 0), @@ -190,7 +191,7 @@ it("time.ticks(count) can generate 15-second ticks", () => { ]); }); -it("time.ticks(count) can generate 30-second ticks", () => { +test("time.ticks(count) can generate 30-second ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 1, 50)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 0, 0), @@ -200,7 +201,7 @@ it("time.ticks(count) can generate 30-second ticks", () => { ]); }); -it("time.ticks(count) can generate 1-minute ticks", () => { +test("time.ticks(count) can generate 1-minute ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 27), local(2011, 0, 1, 12, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 1), @@ -210,7 +211,7 @@ it("time.ticks(count) can generate 1-minute ticks", () => { ]); }); -it("time.ticks(count) can generate 5-minute ticks", () => { +test("time.ticks(count) can generate 5-minute ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 3, 27), local(2011, 0, 1, 12, 21, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 5), @@ -220,7 +221,7 @@ it("time.ticks(count) can generate 5-minute ticks", () => { ]); }); -it("time.ticks(count) can generate 15-minute ticks", () => { +test("time.ticks(count) can generate 15-minute ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 8, 27), local(2011, 0, 1, 13, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 15), @@ -230,7 +231,7 @@ it("time.ticks(count) can generate 15-minute ticks", () => { ]); }); -it("time.ticks(count) can generate 30-minute ticks", () => { +test("time.ticks(count) can generate 30-minute ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 28, 27), local(2011, 0, 1, 14, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 30), @@ -240,7 +241,7 @@ it("time.ticks(count) can generate 30-minute ticks", () => { ]); }); -it("time.ticks(count) can generate 1-hour ticks", () => { +test("time.ticks(count) can generate 1-hour ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 28, 27), local(2011, 0, 1, 16, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 13, 0), @@ -250,7 +251,7 @@ it("time.ticks(count) can generate 1-hour ticks", () => { ]); }); -it("time.ticks(count) can generate 3-hour ticks", () => { +test("time.ticks(count) can generate 3-hour ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 14, 28, 27), local(2011, 0, 2, 1, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 15, 0), @@ -260,7 +261,7 @@ it("time.ticks(count) can generate 3-hour ticks", () => { ]); }); -it("time.ticks(count) can generate 6-hour ticks", () => { +test("time.ticks(count) can generate 6-hour ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 16, 28, 27), local(2011, 0, 2, 14, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 18, 0), @@ -270,7 +271,7 @@ it("time.ticks(count) can generate 6-hour ticks", () => { ]); }); -it("time.ticks(count) can generate 12-hour ticks", () => { +test("time.ticks(count) can generate 12-hour ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 16, 28, 27), local(2011, 0, 3, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 2, 0, 0), @@ -280,7 +281,7 @@ it("time.ticks(count) can generate 12-hour ticks", () => { ]); }); -it("time.ticks(count) can generate 1-day ticks", () => { +test("time.ticks(count) can generate 1-day ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 16, 28, 27), local(2011, 0, 5, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 2, 0, 0), @@ -290,7 +291,7 @@ it("time.ticks(count) can generate 1-day ticks", () => { ]); }); -it("time.ticks(count) can generate 2-day ticks", () => { +test("time.ticks(count) can generate 2-day ticks", () => { const x = scaleTime().domain([local(2011, 0, 2, 16, 28, 27), local(2011, 0, 9, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 3, 0, 0), @@ -300,7 +301,7 @@ it("time.ticks(count) can generate 2-day ticks", () => { ]); }); -it("time.ticks(count) can generate 1-week ticks", () => { +test("time.ticks(count) can generate 1-week ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 16, 28, 27), local(2011, 0, 23, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 2, 0, 0), @@ -310,7 +311,7 @@ it("time.ticks(count) can generate 1-week ticks", () => { ]); }); -it("time.ticks(count) can generate 1-month ticks", () => { +test("time.ticks(count) can generate 1-month ticks", () => { const x = scaleTime().domain([local(2011, 0, 18), local(2011, 4, 2)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 1, 1, 0, 0), @@ -320,7 +321,7 @@ it("time.ticks(count) can generate 1-month ticks", () => { ]); }); -it("time.ticks(count) can generate 3-month ticks", () => { +test("time.ticks(count) can generate 3-month ticks", () => { const x = scaleTime().domain([local(2010, 11, 18), local(2011, 10, 2)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 0, 0), @@ -330,7 +331,7 @@ it("time.ticks(count) can generate 3-month ticks", () => { ]); }); -it("time.ticks(count) can generate 1-year ticks", () => { +test("time.ticks(count) can generate 1-year ticks", () => { const x = scaleTime().domain([local(2010, 11, 18), local(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 0, 0), @@ -340,7 +341,7 @@ it("time.ticks(count) can generate 1-year ticks", () => { ]); }); -it("time.ticks(count) can generate multi-year ticks", () => { +test("time.ticks(count) can generate multi-year ticks", () => { const x = scaleTime().domain([local(0, 11, 18), local(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(6), [ local( 500, 0, 1, 0, 0), @@ -350,67 +351,67 @@ it("time.ticks(count) can generate multi-year ticks", () => { ]); }); -it("time.ticks(count) returns one tick for an empty domain", () => { +test("time.ticks(count) returns one tick for an empty domain", () => { const x = scaleTime().domain([local(2014, 2, 2), local(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(6), [local(2014, 2, 2)]); }); -it("time.ticks() returns descending ticks for a descending domain", () => { +test("time.ticks() returns descending ticks for a descending domain", () => { const x = scaleTime(); assert.deepStrictEqual(x.domain([local(2014, 2, 2), local(2010, 11, 18)]).ticks(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(x.domain([local(2011, 10, 2), local(2010, 11, 18)]).ticks(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)]); }); -it("time.tickFormat()(date) formats year on New Year's", () => { +test("time.tickFormat()(date) formats year on New Year's", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 0, 1)), "2011"); assert.strictEqual(f(local(2012, 0, 1)), "2012"); assert.strictEqual(f(local(2013, 0, 1)), "2013"); }); -it("time.tickFormat()(date) formats month on the 1st of each month", () => { +test("time.tickFormat()(date) formats month on the 1st of each month", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 1)), "February"); assert.strictEqual(f(local(2011, 2, 1)), "March"); assert.strictEqual(f(local(2011, 3, 1)), "April"); }); -it("time.tickFormat()(date) formats week on Sunday midnight", () => { +test("time.tickFormat()(date) formats week on Sunday midnight", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 6)), "Feb 06"); assert.strictEqual(f(local(2011, 1, 13)), "Feb 13"); assert.strictEqual(f(local(2011, 1, 20)), "Feb 20"); }); -it("time.tickFormat()(date) formats date on midnight", () => { +test("time.tickFormat()(date) formats date on midnight", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 2)), "Wed 02"); assert.strictEqual(f(local(2011, 1, 3)), "Thu 03"); assert.strictEqual(f(local(2011, 1, 4)), "Fri 04"); }); -it("time.tickFormat()(date) formats hour on minute zero", () => { +test("time.tickFormat()(date) formats hour on minute zero", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 2, 11)), "11 AM"); assert.strictEqual(f(local(2011, 1, 2, 12)), "12 PM"); assert.strictEqual(f(local(2011, 1, 2, 13)), "01 PM"); }); -it("time.tickFormat()(date) formats minute on second zero", () => { +test("time.tickFormat()(date) formats minute on second zero", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 2, 11, 59)), "11:59"); assert.strictEqual(f(local(2011, 1, 2, 12, 1)), "12:01"); assert.strictEqual(f(local(2011, 1, 2, 12, 2)), "12:02"); }); -it("time.tickFormat()(date) otherwise, formats second", () => { +test("time.tickFormat()(date) otherwise, formats second", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 2, 12, 1, 9)), ":09"); assert.strictEqual(f(local(2011, 1, 2, 12, 1, 10)), ":10"); assert.strictEqual(f(local(2011, 1, 2, 12, 1, 11)), ":11"); }); -it("time.tickFormat(count, specifier) returns a time format for the specified specifier", () => { +test("time.tickFormat(count, specifier) returns a time format for the specified specifier", () => { const f = scaleTime().tickFormat(10, "%c"); assert.strictEqual(f(local(2011, 1, 2, 12)), "2/2/2011, 12:00:00 PM"); }); diff --git a/test/utcTime-test.js b/test/utcTime-test.js index f0a1e40..98390e0 100644 --- a/test/utcTime-test.js +++ b/test/utcTime-test.js @@ -1,36 +1,37 @@ +import {test} from "vitest"; import assert from "assert"; import {interpolateHsl} from "d3-interpolate"; import {utcDay, utcMinute, utcMonth, utcWeek, utcYear} from "d3-time"; import {scaleUtc} from "../src/index.js"; import {utc} from "./date.js"; -it("scaleUtc.nice() is an alias for scaleUtc.nice(10)", () => { +test("scaleUtc.nice() is an alias for scaleUtc.nice(10)", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 17), utc(2009, 0, 1, 23, 42)]); assert.deepStrictEqual(x.nice().domain(), [utc(2009, 0, 1), utc(2009, 0, 2)]); }); -it("scaleUtc.nice() can nice sub-second domains", () => { +test("scaleUtc.nice() can nice sub-second domains", () => { const x = scaleUtc().domain([utc(2013, 0, 1, 12, 0, 0, 0), utc(2013, 0, 1, 12, 0, 0, 128)]); assert.deepStrictEqual(x.nice().domain(), [utc(2013, 0, 1, 12, 0, 0, 0), utc(2013, 0, 1, 12, 0, 0, 130)]); }); -it("scaleUtc.nice() can nice multi-year domains", () => { +test("scaleUtc.nice() can nice multi-year domains", () => { const x = scaleUtc().domain([utc(2001, 0, 1), utc(2138, 0, 1)]); assert.deepStrictEqual(x.nice().domain(), [utc(2000, 0, 1), utc(2140, 0, 1)]); }); -it("scaleUtc.nice() can nice empty domains", () => { +test("scaleUtc.nice() can nice empty domains", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 0, 12)]); assert.deepStrictEqual(x.nice().domain(), [utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 0, 12)]); }); -it("scaleUtc.nice(count) nices using the specified tick count", () => { +test("scaleUtc.nice(count) nices using the specified tick count", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 17), utc(2009, 0, 1, 23, 42)]); assert.deepStrictEqual(x.nice(100).domain(), [utc(2009, 0, 1, 0, 15), utc(2009, 0, 1, 23, 45)]); assert.deepStrictEqual(x.nice(10).domain(), [utc(2009, 0, 1), utc(2009, 0, 2)]); }); -it("scaleUtc.nice(interval) nices using the specified time interval", () => { +test("scaleUtc.nice(interval) nices using the specified time interval", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 23, 48)]); assert.deepStrictEqual(x.nice(utcDay).domain(), [utc(2009, 0, 1), utc(2009, 0, 2)]); assert.deepStrictEqual(x.nice(utcWeek).domain(), [utc(2008, 11, 28), utc(2009, 0, 4)]); @@ -38,17 +39,17 @@ it("scaleUtc.nice(interval) nices using the specified time interval", () => { assert.deepStrictEqual(x.nice(utcYear).domain(), [utc(2008, 0, 1), utc(2010, 0, 1)]); }); -it("scaleUtc.nice(interval) can nice empty domains", () => { +test("scaleUtc.nice(interval) can nice empty domains", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 0, 12)]); assert.deepStrictEqual(x.nice(utcDay).domain(), [utc(2009, 0, 1), utc(2009, 0, 2)]); }); -it("scaleUtc.nice(interval) can nice a polylinear domain, only affecting its extent", () => { +test("scaleUtc.nice(interval) can nice a polylinear domain, only affecting its extent", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 23, 48), utc(2009, 0, 2, 23, 48)]).nice(utcDay); assert.deepStrictEqual(x.domain(), [utc(2009, 0, 1), utc(2009, 0, 1, 23, 48), utc(2009, 0, 3)]); }); -it("scaleUtc.nice(interval.every(step)) nices using the specified time interval and step", () => { +test("scaleUtc.nice(interval.every(step)) nices using the specified time interval and step", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 23, 48)]); assert.deepStrictEqual(x.nice(utcDay.every(3)).domain(), [utc(2009, 0, 1), utc(2009, 0, 4)]); assert.deepStrictEqual(x.nice(utcWeek.every(2)).domain(), [utc(2008, 11, 21), utc(2009, 0, 4)]); @@ -56,7 +57,7 @@ it("scaleUtc.nice(interval.every(step)) nices using the specified time interval assert.deepStrictEqual(x.nice(utcYear.every(10)).domain(), [utc(2000, 0, 1), utc(2010, 0, 1)]); }); -it("scaleUtc.copy() isolates changes to the domain", () => { +test("scaleUtc.copy() isolates changes to the domain", () => { const x = scaleUtc().domain([utc(2009, 0, 1), utc(2010, 0, 1)]), y = x.copy(); x.domain([utc(2010, 0, 1), utc(2011, 0, 1)]); assert.deepStrictEqual(y.domain(), [utc(2009, 0, 1), utc(2010, 0, 1)]); @@ -69,7 +70,7 @@ it("scaleUtc.copy() isolates changes to the domain", () => { assert.deepStrictEqual(y.domain(), [utc(2011, 0, 1), utc(2012, 0, 1)]); }); -it("scaleUtc.copy() isolates changes to the range", () => { +test("scaleUtc.copy() isolates changes to the range", () => { const x = scaleUtc().domain([utc(2009, 0, 1), utc(2010, 0, 1)]), y = x.copy(); x.range([1, 2]); assert.deepStrictEqual(x.invert(1), utc(2009, 0, 1)); @@ -82,7 +83,7 @@ it("scaleUtc.copy() isolates changes to the range", () => { assert.deepStrictEqual(y.range(), [2, 3]); }); -it("scaleUtc.copy() isolates changes to the interpolator", () => { +test("scaleUtc.copy() isolates changes to the interpolator", () => { const x = scaleUtc().domain([utc(2009, 0, 1), utc(2010, 0, 1)]).range(["red", "blue"]); const i = x.interpolate(); const y = x.copy(); @@ -92,7 +93,7 @@ it("scaleUtc.copy() isolates changes to the interpolator", () => { assert.strictEqual(y.interpolate(), i); }); -it("scaleUtc.copy() isolates changes to clamping", () => { +test("scaleUtc.copy() isolates changes to clamping", () => { const x = scaleUtc().domain([utc(2009, 0, 1), utc(2010, 0, 1)]).clamp(true), y = x.copy(); x.clamp(false); assert.strictEqual(x(utc(2011, 0, 1)), 2); @@ -104,7 +105,7 @@ it("scaleUtc.copy() isolates changes to clamping", () => { assert.strictEqual(x.clamp(), false); }); -it("scaleUtc.ticks(interval) observes the specified tick interval", () => { +test("scaleUtc.ticks(interval) observes the specified tick interval", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 1, 0), utc(2011, 0, 1, 12, 4, 4)]); assert.deepStrictEqual(x.ticks(utcMinute), [ utc(2011, 0, 1, 12, 1), @@ -114,7 +115,7 @@ it("scaleUtc.ticks(interval) observes the specified tick interval", () => { ]); }); -it("scaleUtc.ticks(interval) observes the specified named tick interval", () => { +test("scaleUtc.ticks(interval) observes the specified named tick interval", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 1, 0), utc(2011, 0, 1, 12, 4, 4)]); assert.deepStrictEqual(x.ticks(utcMinute), [ utc(2011, 0, 1, 12, 1), @@ -124,7 +125,7 @@ it("scaleUtc.ticks(interval) observes the specified named tick interval", () => ]); }); -it("scaleUtc.ticks(interval.every(step)) observes the specified tick interval and step", () => { +test("scaleUtc.ticks(interval.every(step)) observes the specified tick interval and step", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 33, 4)]); assert.deepStrictEqual(x.ticks(utcMinute.every(10)), [ utc(2011, 0, 1, 12, 0), @@ -134,7 +135,7 @@ it("scaleUtc.ticks(interval.every(step)) observes the specified tick interval an ]); }); -it("scaleUtc.ticks(count) can generate sub-second ticks", () => { +test("scaleUtc.ticks(count) can generate sub-second ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 1)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 0, 0, 0), @@ -146,7 +147,7 @@ it("scaleUtc.ticks(count) can generate sub-second ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 1-second ticks", () => { +test("scaleUtc.ticks(count) can generate 1-second ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 4)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 0, 0), @@ -157,7 +158,7 @@ it("scaleUtc.ticks(count) can generate 1-second ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 5-second ticks", () => { +test("scaleUtc.ticks(count) can generate 5-second ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 20)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 0, 0), @@ -168,7 +169,7 @@ it("scaleUtc.ticks(count) can generate 5-second ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 15-second ticks", () => { +test("scaleUtc.ticks(count) can generate 15-second ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 50)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 0, 0), @@ -178,7 +179,7 @@ it("scaleUtc.ticks(count) can generate 15-second ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 30-second ticks", () => { +test("scaleUtc.ticks(count) can generate 30-second ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 1, 50)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 0, 0), @@ -188,7 +189,7 @@ it("scaleUtc.ticks(count) can generate 30-second ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 1-minute ticks", () => { +test("scaleUtc.ticks(count) can generate 1-minute ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 27), utc(2011, 0, 1, 12, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 1), @@ -198,7 +199,7 @@ it("scaleUtc.ticks(count) can generate 1-minute ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 5-minute ticks", () => { +test("scaleUtc.ticks(count) can generate 5-minute ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 3, 27), utc(2011, 0, 1, 12, 21, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 5), @@ -208,7 +209,7 @@ it("scaleUtc.ticks(count) can generate 5-minute ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 15-minute ticks", () => { +test("scaleUtc.ticks(count) can generate 15-minute ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 8, 27), utc(2011, 0, 1, 13, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 15), @@ -218,7 +219,7 @@ it("scaleUtc.ticks(count) can generate 15-minute ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 30-minute ticks", () => { +test("scaleUtc.ticks(count) can generate 30-minute ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 28, 27), utc(2011, 0, 1, 14, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 30), @@ -228,7 +229,7 @@ it("scaleUtc.ticks(count) can generate 30-minute ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 1-hour ticks", () => { +test("scaleUtc.ticks(count) can generate 1-hour ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 28, 27), utc(2011, 0, 1, 16, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 13, 0), @@ -238,7 +239,7 @@ it("scaleUtc.ticks(count) can generate 1-hour ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 3-hour ticks", () => { +test("scaleUtc.ticks(count) can generate 3-hour ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 14, 28, 27), utc(2011, 0, 2, 1, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 15, 0), @@ -248,7 +249,7 @@ it("scaleUtc.ticks(count) can generate 3-hour ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 6-hour ticks", () => { +test("scaleUtc.ticks(count) can generate 6-hour ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 2, 14, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 18, 0), @@ -258,7 +259,7 @@ it("scaleUtc.ticks(count) can generate 6-hour ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 12-hour ticks", () => { +test("scaleUtc.ticks(count) can generate 12-hour ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 3, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 2, 0, 0), @@ -268,7 +269,7 @@ it("scaleUtc.ticks(count) can generate 12-hour ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 1-day ticks", () => { +test("scaleUtc.ticks(count) can generate 1-day ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 5, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 2, 0, 0), @@ -278,7 +279,7 @@ it("scaleUtc.ticks(count) can generate 1-day ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 2-day ticks", () => { +test("scaleUtc.ticks(count) can generate 2-day ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 2, 16, 28, 27), utc(2011, 0, 9, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 4, 0, 0), @@ -287,7 +288,7 @@ it("scaleUtc.ticks(count) can generate 2-day ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 1-week ticks", () => { +test("scaleUtc.ticks(count) can generate 1-week ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 23, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 2, 0, 0), @@ -297,7 +298,7 @@ it("scaleUtc.ticks(count) can generate 1-week ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 1-month ticks", () => { +test("scaleUtc.ticks(count) can generate 1-month ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 18), utc(2011, 4, 2)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 1, 1, 0, 0), @@ -307,7 +308,7 @@ it("scaleUtc.ticks(count) can generate 1-month ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 3-month ticks", () => { +test("scaleUtc.ticks(count) can generate 3-month ticks", () => { const x = scaleUtc().domain([utc(2010, 11, 18), utc(2011, 10, 2)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 0, 0), @@ -317,7 +318,7 @@ it("scaleUtc.ticks(count) can generate 3-month ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate 1-year ticks", () => { +test("scaleUtc.ticks(count) can generate 1-year ticks", () => { const x = scaleUtc().domain([utc(2010, 11, 18), utc(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 0, 0), @@ -327,7 +328,7 @@ it("scaleUtc.ticks(count) can generate 1-year ticks", () => { ]); }); -it("scaleUtc.ticks(count) can generate multi-year ticks", () => { +test("scaleUtc.ticks(count) can generate multi-year ticks", () => { const x = scaleUtc().domain([utc(0, 11, 18), utc(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(6), [ utc( 500, 0, 1, 0, 0), @@ -337,61 +338,61 @@ it("scaleUtc.ticks(count) can generate multi-year ticks", () => { ]); }); -it("scaleUtc.ticks(count) returns one tick for an empty domain", () => { +test("scaleUtc.ticks(count) returns one tick for an empty domain", () => { const x = scaleUtc().domain([utc(2014, 2, 2), utc(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(6), [utc(2014, 2, 2)]); }); -it("scaleUtc.tickFormat()(date) formats year on New Year's", () => { +test("scaleUtc.tickFormat()(date) formats year on New Year's", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 0, 1)), "2011"); assert.strictEqual(f(utc(2012, 0, 1)), "2012"); assert.strictEqual(f(utc(2013, 0, 1)), "2013"); }); -it("scaleUtc.tickFormat()(date) formats month on the 1st of each month", () => { +test("scaleUtc.tickFormat()(date) formats month on the 1st of each month", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 1)), "February"); assert.strictEqual(f(utc(2011, 2, 1)), "March"); assert.strictEqual(f(utc(2011, 3, 1)), "April"); }); -it("scaleUtc.tickFormat()(date) formats week on Sunday midnight", () => { +test("scaleUtc.tickFormat()(date) formats week on Sunday midnight", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 6)), "Feb 06"); assert.strictEqual(f(utc(2011, 1, 13)), "Feb 13"); assert.strictEqual(f(utc(2011, 1, 20)), "Feb 20"); }); -it("scaleUtc.tickFormat()(date) formats date on midnight", () => { +test("scaleUtc.tickFormat()(date) formats date on midnight", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 2)), "Wed 02"); assert.strictEqual(f(utc(2011, 1, 3)), "Thu 03"); assert.strictEqual(f(utc(2011, 1, 4)), "Fri 04"); }); -it("scaleUtc.tickFormat()(date) formats hour on minute zero", () => { +test("scaleUtc.tickFormat()(date) formats hour on minute zero", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 2, 11)), "11 AM"); assert.strictEqual(f(utc(2011, 1, 2, 12)), "12 PM"); assert.strictEqual(f(utc(2011, 1, 2, 13)), "01 PM"); }); -it("scaleUtc.tickFormat()(date) formats minute on second zero", () => { +test("scaleUtc.tickFormat()(date) formats minute on second zero", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 2, 11, 59)), "11:59"); assert.strictEqual(f(utc(2011, 1, 2, 12, 1)), "12:01"); assert.strictEqual(f(utc(2011, 1, 2, 12, 2)), "12:02"); }); -it("scaleUtc.tickFormat()(date) otherwise, formats second", () => { +test("scaleUtc.tickFormat()(date) otherwise, formats second", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 2, 12, 1, 9)), ":09"); assert.strictEqual(f(utc(2011, 1, 2, 12, 1, 10)), ":10"); assert.strictEqual(f(utc(2011, 1, 2, 12, 1, 11)), ":11"); }); -it("scaleUtc.tickFormat(count, specifier) returns a time format for the specified specifier", () => { +test("scaleUtc.tickFormat(count, specifier) returns a time format for the specified specifier", () => { const f = scaleUtc().tickFormat(10, "%c"); assert.strictEqual(f(utc(2011, 1, 2, 12)), "2/2/2011, 12:00:00 PM"); }); 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 86940db1aaf1edebe36666b45a5fe7c2f7e211cb Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:12:37 -0800 Subject: [PATCH 03/10] 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 b5f57d0..e13905c 100644 --- a/package.json +++ b/package.json @@ -40,14 +40,14 @@ "d3-time-format": "2 - 4" }, "devDependencies": { - "@eslint/js": "^9.39.5", + "@eslint/js": "^10.0.1", "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-terser": "^1.0.2", "d3-color": "^3.1.0", - "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 7985091..b6385c1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,8 +25,8 @@ importers: version: 4.1.0 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) @@ -37,8 +37,8 @@ importers: specifier: ^3.1.0 version: 3.1.0 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 @@ -46,11 +46,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} @@ -61,33 +67,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==} @@ -125,6 +132,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} @@ -404,15 +420,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==} @@ -422,13 +438,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: @@ -436,20 +449,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==} @@ -464,54 +465,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'} @@ -571,22 +549,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: '*' @@ -594,9 +571,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==} @@ -642,17 +619,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==} @@ -669,30 +644,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'} @@ -719,21 +692,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==} @@ -817,14 +783,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==} @@ -837,8 +801,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: @@ -853,10 +817,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'} @@ -868,9 +828,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==} @@ -890,9 +847,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==} @@ -921,9 +878,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'} @@ -939,20 +893,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'} @@ -962,8 +905,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==} @@ -973,10 +917,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'} @@ -1027,23 +967,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 @@ -1073,9 +1013,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: @@ -1088,50 +1028,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': @@ -1169,6 +1109,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 @@ -1325,8 +1273,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 @@ -1334,52 +1280,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: @@ -1394,44 +1312,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 @@ -1474,59 +1376,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: @@ -1558,19 +1458,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: {} @@ -1583,22 +1484,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: {} @@ -1618,19 +1518,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: @@ -1690,15 +1584,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: {} @@ -1706,7 +1598,7 @@ snapshots: natural-compare@1.4.0: {} - obug@2.2.1: {} + obug@3.0.0: {} optionator@0.9.4: dependencies: @@ -1725,18 +1617,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: {} @@ -1751,7 +1637,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: @@ -1822,8 +1710,6 @@ snapshots: shebang-regex@3.0.0: {} - siginfo@2.0.0: {} - smob@1.6.2: {} source-map-js@1.2.2: {} @@ -1835,16 +1721,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: @@ -1854,7 +1732,7 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - tinybench@2.9.0: {} + tinybench@6.2.3: {} tinyexec@1.3.1: {} @@ -1863,8 +1741,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 @@ -1884,28 +1760,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 @@ -1913,10 +1783,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 4648b7f6f3505888d797dfdda55bb2b7ae3dca24 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:19:31 -0800 Subject: [PATCH 04/10] import it from vitest Co-Authored-By: Claude Opus 5.5 --- test/band-test.js | 58 ++++++++--------- test/diverging-test.js | 34 +++++----- test/identity-test.js | 36 +++++----- test/linear-test.js | 112 ++++++++++++++++---------------- test/log-test.js | 94 +++++++++++++-------------- test/ordinal-test.js | 50 +++++++------- test/point-test.js | 12 ++-- test/pow-test.js | 102 ++++++++++++++--------------- test/quantile-test.js | 36 +++++----- test/quantize-test.js | 30 ++++----- test/radial-test.js | 26 ++++---- test/sequential-test.js | 30 ++++----- test/sequentialQuantile-test.js | 10 +-- test/sqrt-test.js | 6 +- test/symlog-test.js | 48 +++++++------- test/threshold-test.js | 18 ++--- test/tickFormat-test.js | 12 ++-- test/time-test.js | 98 ++++++++++++++-------------- test/utcTime-test.js | 92 +++++++++++++------------- 19 files changed, 452 insertions(+), 452 deletions(-) diff --git a/test/band-test.js b/test/band-test.js index aea01fc..6bac53a 100644 --- a/test/band-test.js +++ b/test/band-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleBand} from "../src/index.js"; -test("scaleBand() has the expected defaults", () => { +it("scaleBand() has the expected defaults", () => { const s = scaleBand(); assert.deepStrictEqual(s.domain(), []); assert.deepStrictEqual(s.range(), [0, 1]); @@ -14,7 +14,7 @@ test("scaleBand() has the expected defaults", () => { assert.strictEqual(s.align(), 0.5); }); -test("band(value) computes discrete bands in a continuous range", () => { +it("band(value) computes discrete bands in a continuous range", () => { const s = scaleBand([0, 960]); assert.strictEqual(s("foo"), undefined); s.domain(["foo", "bar"]); @@ -28,21 +28,21 @@ test("band(value) computes discrete bands in a continuous range", () => { assert.strictEqual(s.bandwidth(), 30); }); -test("band(value) returns undefined for values outside the domain", () => { +it("band(value) returns undefined for values outside the domain", () => { const s = scaleBand(["a", "b", "c"], [0, 1]); assert.strictEqual(s("d"), undefined); assert.strictEqual(s("e"), undefined); assert.strictEqual(s("f"), undefined); }); -test("band(value) does not implicitly add values to the domain", () => { +it("band(value) does not implicitly add values to the domain", () => { const s = scaleBand(["a", "b", "c"], [0, 1]); s("d"); s("e"); assert.deepStrictEqual(s.domain(), ["a", "b", "c"]); }); -test("band.step() returns the distance between the starts of adjacent bands", () => { +it("band.step() returns the distance between the starts of adjacent bands", () => { const s = scaleBand([0, 960]); assert.strictEqual(s.domain(["foo"]).step(), 960); assert.strictEqual(s.domain(["foo", "bar"]).step(), 480); @@ -52,7 +52,7 @@ test("band.step() returns the distance between the starts of adjacent bands", () assert.strictEqual(s.domain(["foo", "bar"]).step(), 384); }); -test("band.bandwidth() returns the width of the band", () => { +it("band.bandwidth() returns the width of the band", () => { const s = scaleBand([0, 960]); assert.strictEqual(s.domain([]).bandwidth(), 960); assert.strictEqual(s.domain(["foo"]).bandwidth(), 960); @@ -64,7 +64,7 @@ test("band.bandwidth() returns the width of the band", () => { assert.strictEqual(s.domain(["foo", "bar"]).bandwidth(), 192); }); -test("band.domain([]) computes reasonable band and step values", () => { +it("band.domain([]) computes reasonable band and step values", () => { const s = scaleBand([0, 960]).domain([]); assert.strictEqual(s.step(), 960); assert.strictEqual(s.bandwidth(), 960); @@ -76,7 +76,7 @@ test("band.domain([]) computes reasonable band and step values", () => { assert.strictEqual(s.bandwidth(), 0); }); -test("band.domain([value]) computes a reasonable singleton band, even with padding", () => { +it("band.domain([value]) computes a reasonable singleton band, even with padding", () => { const s = scaleBand([0, 960]).domain(["foo"]); assert.strictEqual(s("foo"), 0); assert.strictEqual(s.step(), 960); @@ -91,7 +91,7 @@ test("band.domain([value]) computes a reasonable singleton band, even with paddi assert.strictEqual(s.bandwidth(), 0); }); -test("band.domain(values) recomputes the bands", () => { +it("band.domain(values) recomputes the bands", () => { const s = scaleBand().domain(["a", "b", "c"]).rangeRound([0, 100]); assert.deepStrictEqual(s.domain().map(s), [1, 34, 67]); assert.strictEqual(s.bandwidth(), 33); @@ -100,18 +100,18 @@ test("band.domain(values) recomputes the bands", () => { assert.strictEqual(s.bandwidth(), 25); }); -test("band.domain(domain) accepts an iterable", () => { +it("band.domain(domain) accepts an iterable", () => { assert.deepStrictEqual(scaleBand().domain(new Set(["a", "b", "c"])).domain(), ["a", "b", "c"]); }); -test("band.domain(values) makes a copy of the specified domain values", () => { +it("band.domain(values) makes a copy of the specified domain values", () => { const domain = ["red", "green"]; const s = scaleBand().domain(domain); domain.push("blue"); assert.deepStrictEqual(s.domain(), ["red", "green"]); }); -test("band.domain() returns a copy of the domain", () => { +it("band.domain() returns a copy of the domain", () => { const s = scaleBand().domain(["red", "green"]); const domain = s.domain(); assert.deepStrictEqual(domain, ["red", "green"]); @@ -119,7 +119,7 @@ test("band.domain() returns a copy of the domain", () => { assert.deepStrictEqual(s.domain(), ["red", "green"]); }); -test("band.range(values) can be descending", () => { +it("band.range(values) can be descending", () => { const s = scaleBand().domain(["a", "b", "c"]).range([120, 0]); assert.deepStrictEqual(s.domain().map(s), [80, 40, 0]); assert.strictEqual(s.bandwidth(), 40); @@ -128,14 +128,14 @@ test("band.range(values) can be descending", () => { assert.strictEqual(s.bandwidth(), 30); }); -test("band.range(values) makes a copy of the specified range values", () => { +it("band.range(values) makes a copy of the specified range values", () => { const range = [1, 2]; const s = scaleBand().range(range); range.push("blue"); assert.deepStrictEqual(s.range(), [1, 2]); }); -test("band.range() returns a copy of the range", () => { +it("band.range() returns a copy of the range", () => { const s = scaleBand().range([1, 2]); const range = s.range(); assert.deepStrictEqual(range, [1, 2]); @@ -143,27 +143,27 @@ test("band.range() returns a copy of the range", () => { assert.deepStrictEqual(s.range(), [1, 2]); }); -test("band.range(values) accepts an iterable", () => { +it("band.range(values) accepts an iterable", () => { const s = scaleBand().range(new Set([1, 2])); assert.deepStrictEqual(s.range(), [1, 2]); }); -test("band.rangeRound(values) accepts an iterable", () => { +it("band.rangeRound(values) accepts an iterable", () => { const s = scaleBand().rangeRound(new Set([1, 2])); assert.deepStrictEqual(s.range(), [1, 2]); }); -test("band.range(values) coerces values to numbers", () => { +it("band.range(values) coerces values to numbers", () => { const s = scaleBand().range(["1.0", "2.0"]); assert.deepStrictEqual(s.range(), [1, 2]); }); -test("band.rangeRound(values) coerces values to numbers", () => { +it("band.rangeRound(values) coerces values to numbers", () => { const s = scaleBand().rangeRound(["1.0", "2.0"]); assert.deepStrictEqual(s.range(), [1, 2]); }); -test("band.paddingInner(p) specifies the inner padding p", () => { +it("band.paddingInner(p) specifies the inner padding p", () => { const s = scaleBand().domain(["a", "b", "c"]).range([120, 0]).paddingInner(0.1).round(true); assert.deepStrictEqual(s.domain().map(s), [83, 42, 1]); assert.strictEqual(s.bandwidth(), 37); @@ -172,7 +172,7 @@ test("band.paddingInner(p) specifies the inner padding p", () => { assert.strictEqual(s.bandwidth(), 34); }); -test("band.paddingInner(p) coerces p to a number <= 1", () => { +it("band.paddingInner(p) coerces p to a number <= 1", () => { const s = scaleBand(); assert.strictEqual(s.paddingInner("1.0").paddingInner(), 1); assert.strictEqual(s.paddingInner("-1.0").paddingInner(), -1); @@ -180,7 +180,7 @@ test("band.paddingInner(p) coerces p to a number <= 1", () => { assert(Number.isNaN(s.paddingInner(NaN).paddingInner())); }); -test("band.paddingOuter(p) specifies the outer padding p", () => { +it("band.paddingOuter(p) specifies the outer padding p", () => { const s = scaleBand().domain(["a", "b", "c"]).range([120, 0]).paddingInner(0.2).paddingOuter(0.1); assert.deepStrictEqual(s.domain().map(s), [84, 44, 4]); assert.strictEqual(s.bandwidth(), 32); @@ -189,7 +189,7 @@ test("band.paddingOuter(p) specifies the outer padding p", () => { assert.strictEqual(s.bandwidth(), 20); }); -test("band.paddingOuter(p) coerces p to a number", () => { +it("band.paddingOuter(p) coerces p to a number", () => { const s = scaleBand(); assert.strictEqual(s.paddingOuter("1.0").paddingOuter(), 1); assert.strictEqual(s.paddingOuter("-1.0").paddingOuter(), -1); @@ -197,13 +197,13 @@ test("band.paddingOuter(p) coerces p to a number", () => { assert(Number.isNaN(s.paddingOuter(NaN).paddingOuter())); }); -test("band.rangeRound(values) is an alias for band.range(values).round(true)", () => { +it("band.rangeRound(values) is an alias for band.range(values).round(true)", () => { const s = scaleBand().domain(["a", "b", "c"]).rangeRound([0, 100]); assert.deepStrictEqual(s.range(), [0, 100]); assert.strictEqual(s.round(), true); }); -test("band.round(true) computes discrete rounded bands in a continuous range", () => { +it("band.round(true) computes discrete rounded bands in a continuous range", () => { const s = scaleBand().domain(["a", "b", "c"]).range([0, 100]).round(true); assert.deepStrictEqual(s.domain().map(s), [1, 34, 67]); assert.strictEqual(s.bandwidth(), 33); @@ -212,7 +212,7 @@ test("band.round(true) computes discrete rounded bands in a continuous range", ( assert.strictEqual(s.bandwidth(), 25); }); -test("band.copy() copies all fields", () => { +it("band.copy() copies all fields", () => { const s1 = scaleBand().domain(["red", "green"]).range([1, 2]).round(true).paddingInner(0.1).paddingOuter(0.2); const s2 = s1.copy(); assert.deepStrictEqual(s2.domain(), s1.domain()); @@ -222,7 +222,7 @@ test("band.copy() copies all fields", () => { assert.strictEqual(s2.paddingOuter(), s1.paddingOuter()); }); -test("band.copy() isolates changes to the domain", () => { +it("band.copy() isolates changes to the domain", () => { const s1 = scaleBand().domain(["foo", "bar"]).range([0, 2]); const s2 = s1.copy(); s1.domain(["red", "blue"]); @@ -235,7 +235,7 @@ test("band.copy() isolates changes to the domain", () => { assert.deepStrictEqual(s2.domain().map(s2), [0, 1]); }); -test("band.copy() isolates changes to the range", () => { +it("band.copy() isolates changes to the range", () => { const s1 = scaleBand().domain(["foo", "bar"]).range([0, 2]); const s2 = s1.copy(); s1.range([3, 5]); diff --git a/test/diverging-test.js b/test/diverging-test.js index 7dac75e..aa2a552 100644 --- a/test/diverging-test.js +++ b/test/diverging-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleDiverging, scaleDivergingLog} from "../src/index.js"; -test("scaleDiverging() has the expected defaults", () => { +it("scaleDiverging() has the expected defaults", () => { const s = scaleDiverging(); assert.deepStrictEqual(s.domain(), [0, 0.5, 1]); assert.strictEqual(s.interpolator()(0.42), 0.42); @@ -14,7 +14,7 @@ test("scaleDiverging() has the expected defaults", () => { assert.strictEqual(s( 1.5), 1.5); }); -test("diverging.clamp(true) enables clamping", () => { +it("diverging.clamp(true) enables clamping", () => { const s = scaleDiverging().clamp(true); assert.strictEqual(s.clamp(), true); assert.strictEqual(s(-0.5), 0.0); @@ -24,7 +24,7 @@ test("diverging.clamp(true) enables clamping", () => { assert.strictEqual(s( 1.5), 1.0); }); -test("diverging.domain() coerces domain values to numbers", () => { +it("diverging.domain() coerces domain values to numbers", () => { const s = scaleDiverging().domain(["-1.20", " 0", "2.40"]); assert.deepStrictEqual(s.domain(), [-1.2, 0, 2.4]); assert.strictEqual(s(-1.2), 0.000); @@ -32,12 +32,12 @@ test("diverging.domain() coerces domain values to numbers", () => { assert.strictEqual(s( 2.4), 1.000); }); -test("diverging.domain() accepts an iterable", () => { +it("diverging.domain() accepts an iterable", () => { const s = scaleDiverging().domain(new Set([-1.2, 0, 2.4])); assert.deepStrictEqual(s.domain(), [-1.2, 0, 2.4]); }); -test("diverging.domain() handles a degenerate domain", () => { +it("diverging.domain() handles a degenerate domain", () => { const s = scaleDiverging().domain([2, 2, 3]); assert.deepStrictEqual(s.domain(), [2, 2, 3]); assert.strictEqual(s(-1.2), 0.5); @@ -53,7 +53,7 @@ test("diverging.domain() handles a degenerate domain", () => { assert.strictEqual(s( 2.4), 0.5); }); -test("diverging.domain() handles a descending domain", () => { +it("diverging.domain() handles a descending domain", () => { const s = scaleDiverging().domain([4, 2, 1]); assert.deepStrictEqual(s.domain(), [4, 2, 1]); assert.strictEqual(s(1.2), 0.9); @@ -61,7 +61,7 @@ test("diverging.domain() handles a descending domain", () => { assert.strictEqual(s(3.0), 0.25); }); -test("divergingLog.domain() handles a descending domain", () => { +it("divergingLog.domain() handles a descending domain", () => { const s = scaleDivergingLog().domain([3, 2, 1]); assert.deepStrictEqual(s.domain(), [3, 2, 1]); assert.strictEqual(s(1.2), 1 - 0.1315172029168969); @@ -69,7 +69,7 @@ test("divergingLog.domain() handles a descending domain", () => { assert.strictEqual(s(2.8), 1 - 0.9149213210862197); }); -test("divergingLog.domain() handles a descending negative domain", () => { +it("divergingLog.domain() handles a descending negative domain", () => { const s = scaleDivergingLog().domain([-1, -2, -3]); assert.deepStrictEqual(s.domain(), [-1, -2, -3]); assert.strictEqual(s(-1.2), 0.1315172029168969); @@ -77,7 +77,7 @@ test("divergingLog.domain() handles a descending negative domain", () => { assert.strictEqual(s(-2.8), 0.9149213210862197); }); -test("diverging.domain() handles a non-numeric domain", () => { +it("diverging.domain() handles a non-numeric domain", () => { const s = scaleDiverging().domain([NaN, 2, 3]); assert.strictEqual(isNaN(s.domain()[0]), true); assert.strictEqual(isNaN(s(-1.2)), true); @@ -93,12 +93,12 @@ test("diverging.domain() handles a non-numeric domain", () => { assert.strictEqual(isNaN(s( 2.4)), true); }); -test("diverging.domain() only considers the first three elements of the domain", () => { +it("diverging.domain() only considers the first three elements of the domain", () => { const s = scaleDiverging().domain([-1, 100, 200, 3]); assert.deepStrictEqual(s.domain(), [-1, 100, 200]); }); -test("diverging.copy() returns an isolated copy of the scale", () => { +it("diverging.copy() returns an isolated copy of the scale", () => { const s1 = scaleDiverging().domain([1, 2, 3]).clamp(true); const s2 = s1.copy(); assert.deepStrictEqual(s2.domain(), [1, 2, 3]); @@ -113,12 +113,12 @@ test("diverging.copy() returns an isolated copy of the scale", () => { assert.deepStrictEqual(s1.clamp(), false); }); -test("diverging.range() returns the computed range", () => { +it("diverging.range() returns the computed range", () => { const s = scaleDiverging(function(t) { return t * 2 + 1; }); assert.deepStrictEqual(s.range(), [1, 2, 3]); }); -test("diverging.interpolator(interpolator) sets the interpolator", () => { +it("diverging.interpolator(interpolator) sets the interpolator", () => { const i0 = function(t) { return t; }; const i1 = function(t) { return t * 2; }; const s = scaleDiverging(i0); @@ -130,19 +130,19 @@ test("diverging.interpolator(interpolator) sets the interpolator", () => { assert.strictEqual(s( 0.5), 1.0); }); -test("diverging.range(range) sets the interpolator", () => { +it("diverging.range(range) sets the interpolator", () => { const s = scaleDiverging().range([1, 3, 10]); assert.strictEqual(s.interpolator()(0.5), 3); assert.deepStrictEqual(s.range(), [1, 3, 10]); }); -test("diverging.range(range) ignores additional values", () => { +it("diverging.range(range) ignores additional values", () => { const s = scaleDiverging().range([1, 3, 10, 20]); assert.strictEqual(s.interpolator()(0.5), 3); assert.deepStrictEqual(s.range(), [1, 3, 10]); }); -test("scaleDiverging(range) sets the interpolator", () => { +it("scaleDiverging(range) sets the interpolator", () => { const s = scaleDiverging([1, 3, 10]); assert.strictEqual(s.interpolator()(0.5), 3); assert.deepStrictEqual(s.range(), [1, 3, 10]); diff --git a/test/identity-test.js b/test/identity-test.js index b1b79a9..d4a1d79 100644 --- a/test/identity-test.js +++ b/test/identity-test.js @@ -1,20 +1,20 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleIdentity} from "../src/index.js"; -test("scaleIdentity() has the expected defaults", () => { +it("scaleIdentity() has the expected defaults", () => { const s = scaleIdentity(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); }); -test("scaleIdentity(range) sets the domain and range", () => { +it("scaleIdentity(range) sets the domain and range", () => { const s = scaleIdentity([1, 2]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.deepStrictEqual(s.range(), [1, 2]); }); -test("identity(x) is the identity function", () => { +it("identity(x) is the identity function", () => { const s = scaleIdentity().domain([1, 2]); assert.strictEqual(s(0.5), 0.5); assert.strictEqual(s(1), 1); @@ -23,12 +23,12 @@ test("identity(x) is the identity function", () => { assert.strictEqual(s(2.5), 2.5); }); -test("identity(x) coerces input to a number", () => { +it("identity(x) coerces input to a number", () => { const s = scaleIdentity().domain([1, 2]); assert.strictEqual(s("2"), 2); }); -test("identity(undefined) returns unknown", () => { +it("identity(undefined) returns unknown", () => { const s = scaleIdentity().unknown(-1); assert.strictEqual(s(undefined), -1); assert.strictEqual(s(null), -1); @@ -37,7 +37,7 @@ test("identity(undefined) returns unknown", () => { assert.strictEqual(s(0.4), 0.4); }); -test("identity.invert(y) is the identity function", () => { +it("identity.invert(y) is the identity function", () => { const s = scaleIdentity().domain([1, 2]); assert.strictEqual(s.invert(0.5), 0.5); assert.strictEqual(s.invert(1), 1); @@ -46,7 +46,7 @@ test("identity.invert(y) is the identity function", () => { assert.strictEqual(s.invert(2.5), 2.5); }); -test("identity.invert(y) coerces range value to numbers", () => { +it("identity.invert(y) coerces range value to numbers", () => { const s = scaleIdentity().range(["0", "2"]); assert.strictEqual(s.invert("1"), 1); s.range([new Date(1990, 0, 1), new Date(1991, 0, 1)]); @@ -55,12 +55,12 @@ test("identity.invert(y) coerces range value to numbers", () => { assert(isNaN(s.invert("#999"))); }); -test("identity.invert(y) coerces input to a number", () => { +it("identity.invert(y) coerces input to a number", () => { const s = scaleIdentity().domain([1, 2]); assert.strictEqual(s.invert("2"), 2); }); -test("identity.domain() is an alias for range()", () => { +it("identity.domain() is an alias for range()", () => { const s = scaleIdentity(); assert.strictEqual(s.domain, s.range); assert.deepStrictEqual(s.domain(), s.range()); @@ -70,14 +70,14 @@ test("identity.domain() is an alias for range()", () => { assert.deepStrictEqual(s.domain(), [-10, 0, 100]); }); -test("identity.domain() defaults to [0, 1]", () => { +it("identity.domain() defaults to [0, 1]", () => { const s = scaleIdentity(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); assert.strictEqual(s(0.5), 0.5); }); -test("identity.domain() coerces values to numbers", () => { +it("identity.domain() coerces values to numbers", () => { const s = scaleIdentity().domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]); assert.strictEqual(typeof s.domain()[0], "number"); assert.strictEqual(typeof s.domain()[1], "number"); @@ -110,13 +110,13 @@ test("identity.domain() coerces values to numbers", () => { assert.strictEqual(s(0.5), 0.5); }); -test("identity.domain() accepts an iterable", () => { +it("identity.domain() accepts an iterable", () => { const s = scaleIdentity().domain(new Set([1, 2])); assert.deepStrictEqual(s.domain(), [1, 2]); assert.deepStrictEqual(s.range(), [1, 2]); }); -test("identity.domain() can specify a polyidentity domain and range", () => { +it("identity.domain() can specify a polyidentity domain and range", () => { const s = scaleIdentity().domain([-10, 0, 100]); assert.deepStrictEqual(s.domain(), [-10, 0, 100]); assert.strictEqual(s(-5), -5); @@ -129,13 +129,13 @@ test("identity.domain() can specify a polyidentity domain and range", () => { assert.strictEqual(s(75), 75); }); -test("identity.domain() does not affect the identity function", () => { +it("identity.domain() does not affect the identity function", () => { const s = scaleIdentity().domain([Infinity, NaN]); assert.strictEqual(s(42), 42); assert.strictEqual(s.invert(-42), -42); }); -test("identity.ticks(count) generates ticks of varying degree", () => { +it("identity.ticks(count) generates ticks of varying degree", () => { const s = scaleIdentity(); assert.deepStrictEqual(s.ticks(1).map(s.tickFormat(1)), ["0", "1"]); assert.deepStrictEqual(s.ticks(2).map(s.tickFormat(2)), ["0.0", "0.5", "1.0"]); @@ -148,7 +148,7 @@ test("identity.ticks(count) generates ticks of varying degree", () => { assert.deepStrictEqual(s.ticks(10).map(s.tickFormat(10)), ["0.0", "0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1.0"].reverse()); }); -test("identity.tickFormat(count) formats ticks with the appropriate precision", () => { +it("identity.tickFormat(count) formats ticks with the appropriate precision", () => { const s = scaleIdentity().domain([0.123456789, 1.23456789]); assert.strictEqual(s.tickFormat(1)(s.ticks(1)[0]), "1"); assert.strictEqual(s.tickFormat(2)(s.ticks(2)[0]), "0.5"); @@ -161,7 +161,7 @@ test("identity.tickFormat(count) formats ticks with the appropriate precision", assert.strictEqual(s.tickFormat(256)(s.ticks(256)[0]), "0.125"); }); -test("identity.copy() isolates changes to the domain or range", () => { +it("identity.copy() isolates changes to the domain or range", () => { const s1 = scaleIdentity(); const s2 = s1.copy(); const s3 = s1.copy(); diff --git a/test/linear-test.js b/test/linear-test.js index fbd1811..61b1372 100644 --- a/test/linear-test.js +++ b/test/linear-test.js @@ -1,9 +1,9 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleLinear} from "../src/index.js"; import {roundEpsilon} from "./roundEpsilon.js"; -test("scaleLinear() has the expected defaults", () => { +it("scaleLinear() has the expected defaults", () => { const s = scaleLinear(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -12,40 +12,40 @@ test("scaleLinear() has the expected defaults", () => { assert.deepStrictEqual(s.interpolate()({array: ["red"]}, {array: ["blue"]})(0.5), {array: ["rgb(128, 0, 128)"]}); }); -test("scaleLinear(range) sets the range", () => { +it("scaleLinear(range) sets the range", () => { const s = scaleLinear([1, 2]); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [1, 2]); assert.strictEqual(s(0.5), 1.5); }); -test("scaleLinear(domain, range) sets the domain and range", () => { +it("scaleLinear(domain, range) sets the domain and range", () => { const s = scaleLinear([1, 2], [3, 4]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.deepStrictEqual(s.range(), [3, 4]); assert.strictEqual(s(1.5), 3.5); }); -test("linear(x) maps a domain value x to a range value y", () => { +it("linear(x) maps a domain value x to a range value y", () => { assert.strictEqual(scaleLinear().range([1, 2])(0.5), 1.5); }); -test("linear(x) ignores extra range values if the domain is smaller than the range", () => { +it("linear(x) ignores extra range values if the domain is smaller than the range", () => { assert.strictEqual(scaleLinear().domain([-10, 0]).range([0, 1, 2]).clamp(true)(-5), 0.5); assert.strictEqual(scaleLinear().domain([-10, 0]).range([0, 1, 2]).clamp(true)(50), 1); }); -test("linear(x) ignores extra domain values if the range is smaller than the domain", () => { +it("linear(x) ignores extra domain values if the range is smaller than the domain", () => { assert.strictEqual(scaleLinear().domain([-10, 0, 100]).range([0, 1]).clamp(true)(-5), 0.5); assert.strictEqual(scaleLinear().domain([-10, 0, 100]).range([0, 1]).clamp(true)(50), 1); }); -test("linear(x) maps an empty domain to the middle of the range", () => { +it("linear(x) maps an empty domain to the middle of the range", () => { assert.strictEqual(scaleLinear().domain([0, 0]).range([1, 2])(0), 1.5); assert.strictEqual(scaleLinear().domain([0, 0]).range([2, 1])(1), 1.5); }); -test("linear(x) can map a bilinear domain with two values to the corresponding range", () => { +it("linear(x) can map a bilinear domain with two values to the corresponding range", () => { const s = scaleLinear().domain([1, 2]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.strictEqual(s(0.5), -0.5); @@ -60,7 +60,7 @@ test("linear(x) can map a bilinear domain with two values to the corresponding r assert.strictEqual(s.invert( 1.5), 2.5); }); -test("linear(x) can map a polylinear domain with more than two values to the corresponding range", () => { +it("linear(x) can map a polylinear domain with more than two values to the corresponding range", () => { const s = scaleLinear().domain([-10, 0, 100]).range(["red", "white", "green"]); assert.deepStrictEqual(s.domain(), [-10, 0, 100]); assert.strictEqual(s(-5), "rgb(255, 128, 128)"); @@ -78,42 +78,42 @@ test("linear(x) can map a polylinear domain with more than two values to the cor assert.strictEqual(s.invert(3), 1.5); }); -test("linear.invert(y) maps a range value y to a domain value x", () => { +it("linear.invert(y) maps a range value y to a domain value x", () => { assert.strictEqual(scaleLinear().range([1, 2]).invert(1.5), 0.5); }); -test("linear.invert(y) maps an empty range to the middle of the domain", () => { +it("linear.invert(y) maps an empty range to the middle of the domain", () => { assert.strictEqual(scaleLinear().domain([1, 2]).range([0, 0]).invert(0), 1.5); assert.strictEqual(scaleLinear().domain([2, 1]).range([0, 0]).invert(1), 1.5); }); -test("linear.invert(y) coerces range values to numbers", () => { +it("linear.invert(y) coerces range values to numbers", () => { assert.strictEqual(scaleLinear().range(["0", "2"]).invert("1"), 0.5); assert.strictEqual(scaleLinear().range([new Date(1990, 0, 1), new Date(1991, 0, 1)]).invert(new Date(1990, 6, 2, 13)), 0.5); }); -test("linear.invert(y) returns NaN if the range is not coercible to number", () => { +it("linear.invert(y) returns NaN if the range is not coercible to number", () => { assert(isNaN(scaleLinear().range(["#000", "#fff"]).invert("#999"))); assert(isNaN(scaleLinear().range([0, "#fff"]).invert("#999"))); }); -test("linear.domain(domain) accepts an array of numbers", () => { +it("linear.domain(domain) accepts an array of numbers", () => { assert.deepStrictEqual(scaleLinear().domain([]).domain(), []); assert.deepStrictEqual(scaleLinear().domain([1, 0]).domain(), [1, 0]); assert.deepStrictEqual(scaleLinear().domain([1, 2, 3]).domain(), [1, 2, 3]); }); -test("linear.domain(domain) coerces domain values to numbers", () => { +it("linear.domain(domain) coerces domain values to numbers", () => { assert.deepStrictEqual(scaleLinear().domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]).domain(), [631180800000, 662716800000]); assert.deepStrictEqual(scaleLinear().domain(["0.0", "1.0"]).domain(), [0, 1]); assert.deepStrictEqual(scaleLinear().domain([new Number(0), new Number(1)]).domain(), [0, 1]); }); -test("linear.domain(domain) accepts an iterable", () => { +it("linear.domain(domain) accepts an iterable", () => { assert.deepStrictEqual(scaleLinear().domain(new Set([1, 2])).domain(), [1, 2]); }); -test("linear.domain(domain) makes a copy of domain values", () => { +it("linear.domain(domain) makes a copy of domain values", () => { const d = [1, 2], s = scaleLinear().domain(d); assert.deepStrictEqual(s.domain(), [1, 2]); d.push(3); @@ -121,24 +121,24 @@ test("linear.domain(domain) makes a copy of domain values", () => { assert.deepStrictEqual(d, [1, 2, 3]); }); -test("linear.domain() returns a copy of domain values", () => { +it("linear.domain() returns a copy of domain values", () => { const s = scaleLinear(), d = s.domain(); assert.deepStrictEqual(d, [0, 1]); d.push(3); assert.deepStrictEqual(s.domain(), [0, 1]); }); -test("linear.range(range) does not coerce range to numbers", () => { +it("linear.range(range) does not coerce range to numbers", () => { const s = scaleLinear().range(["0px", "2px"]); assert.deepStrictEqual(s.range(), ["0px", "2px"]); assert.strictEqual(s(0.5), "1px"); }); -test("linear.range(range) accepts an iterable", () => { +it("linear.range(range) accepts an iterable", () => { assert.deepStrictEqual(scaleLinear().range(new Set([1, 2])).range(), [1, 2]); }); -test("linear.range(range) can accept range values as colors", () => { +it("linear.range(range) can accept range values as colors", () => { assert.strictEqual(scaleLinear().range(["red", "blue"])(0.5), "rgb(128, 0, 128)"); assert.strictEqual(scaleLinear().range(["#ff0000", "#0000ff"])(0.5), "rgb(128, 0, 128)"); assert.strictEqual(scaleLinear().range(["#f00", "#00f"])(0.5), "rgb(128, 0, 128)"); @@ -147,12 +147,12 @@ test("linear.range(range) can accept range values as colors", () => { assert.strictEqual(scaleLinear().range(["hsl(0,100%,50%)", "hsl(240,100%,50%)"])(0.5), "rgb(128, 0, 128)"); }); -test("linear.range(range) can accept range values as arrays or objects", () => { +it("linear.range(range) can accept range values as arrays or objects", () => { assert.deepStrictEqual(scaleLinear().range([{color: "red"}, {color: "blue"}])(0.5), {color: "rgb(128, 0, 128)"}); assert.deepStrictEqual(scaleLinear().range([["red"], ["blue"]])(0.5), ["rgb(128, 0, 128)"]); }); -test("linear.range(range) makes a copy of range values", () => { +it("linear.range(range) makes a copy of range values", () => { const r = [1, 2], s = scaleLinear().range(r); assert.deepStrictEqual(s.range(), [1, 2]); r.push(3); @@ -160,22 +160,22 @@ test("linear.range(range) makes a copy of range values", () => { assert.deepStrictEqual(r, [1, 2, 3]); }); -test("linear.range() returns a copy of range values", () => { +it("linear.range() returns a copy of range values", () => { const s = scaleLinear(), r = s.range(); assert.deepStrictEqual(r, [0, 1]); r.push(3); assert.deepStrictEqual(s.range(), [0, 1]); }); -test("linear.rangeRound(range) is an alias for linear.range(range).interpolate(interpolateRound)", () => { +it("linear.rangeRound(range) is an alias for linear.range(range).interpolate(interpolateRound)", () => { assert.strictEqual(scaleLinear().rangeRound([0, 10])(0.59), 6); }); -test("linear.rangeRound(range) accepts an iterable", () => { +it("linear.rangeRound(range) accepts an iterable", () => { assert.deepStrictEqual(scaleLinear().rangeRound(new Set([1, 2])).range(), [1, 2]); }); -test("linear.unknown(value) sets the return value for undefined, null, and NaN input", () => { +it("linear.unknown(value) sets the return value for undefined, null, and NaN input", () => { const s = scaleLinear().unknown(-1); assert.strictEqual(s(null), -1); assert.strictEqual(s(undefined), -1); @@ -184,7 +184,7 @@ test("linear.unknown(value) sets the return value for undefined, null, and NaN i assert.strictEqual(s(0.4), 0.4); }); -test("linear.clamp() is false by default", () => { +it("linear.clamp() is false by default", () => { assert.strictEqual(scaleLinear().clamp(), false); assert.strictEqual(scaleLinear().range([10, 20])(2), 30); assert.strictEqual(scaleLinear().range([10, 20])(-1), 0); @@ -192,36 +192,36 @@ test("linear.clamp() is false by default", () => { assert.strictEqual(scaleLinear().range([10, 20]).invert(0), -1); }); -test("linear.clamp(true) restricts output values to the range", () => { +it("linear.clamp(true) restricts output values to the range", () => { assert.strictEqual(scaleLinear().clamp(true).range([10, 20])(2), 20); assert.strictEqual(scaleLinear().clamp(true).range([10, 20])(-1), 10); }); -test("linear.clamp(true) restricts input values to the domain", () => { +it("linear.clamp(true) restricts input values to the domain", () => { assert.strictEqual(scaleLinear().clamp(true).range([10, 20]).invert(30), 1); assert.strictEqual(scaleLinear().clamp(true).range([10, 20]).invert(0), 0); }); -test("linear.clamp(clamp) coerces the specified clamp value to a boolean", () => { +it("linear.clamp(clamp) coerces the specified clamp value to a boolean", () => { assert.strictEqual(scaleLinear().clamp("true").clamp(), true); assert.strictEqual(scaleLinear().clamp(1).clamp(), true); assert.strictEqual(scaleLinear().clamp("").clamp(), false); assert.strictEqual(scaleLinear().clamp(0).clamp(), false); }); -test("linear.interpolate(interpolate) takes a custom interpolator factory", () => { +it("linear.interpolate(interpolate) takes a custom interpolator factory", () => { function interpolate(a, b) { return function(t) { return [a, b, t]; }; } const s = scaleLinear().domain([10, 20]).range(["a", "b"]).interpolate(interpolate); assert.strictEqual(s.interpolate(), interpolate); assert.deepStrictEqual(s(15), ["a", "b", 0.5]); }); -test("linear.nice() is an alias for linear.nice(10)", () => { +it("linear.nice() is an alias for linear.nice(10)", () => { assert.deepStrictEqual(scaleLinear().domain([0, 0.96]).nice().domain(), [0, 1]); assert.deepStrictEqual(scaleLinear().domain([0, 96]).nice().domain(), [0, 100]); }); -test("linear.nice(count) extends the domain to match the desired ticks", () => { +it("linear.nice(count) extends the domain to match the desired ticks", () => { assert.deepStrictEqual(scaleLinear().domain([0, 0.96]).nice(10).domain(), [0, 1]); assert.deepStrictEqual(scaleLinear().domain([0, 96]).nice(10).domain(), [0, 100]); assert.deepStrictEqual(scaleLinear().domain([0.96, 0]).nice(10).domain(), [1, 0]); @@ -233,7 +233,7 @@ test("linear.nice(count) extends the domain to match the desired ticks", () => { assert.deepStrictEqual(scaleLinear().domain([-0.1, 51.1]).nice(8).domain(), [-10, 60]); }); -test("linear.nice(count) nices the domain, extending it to round numbers", () => { +it("linear.nice(count) nices the domain, extending it to round numbers", () => { assert.deepStrictEqual(scaleLinear().domain([1.1, 10.9]).nice(10).domain(), [1, 11]); assert.deepStrictEqual(scaleLinear().domain([10.9, 1.1]).nice(10).domain(), [11, 1]); assert.deepStrictEqual(scaleLinear().domain([0.7, 11.001]).nice(10).domain(), [0, 12]); @@ -243,23 +243,23 @@ test("linear.nice(count) nices the domain, extending it to round numbers", () => assert.deepStrictEqual(scaleLinear().domain([0, 15]).nice(5).domain(), [0, 20]); }); -test("linear.nice(count) has no effect on degenerate domains", () => { +it("linear.nice(count) has no effect on degenerate domains", () => { assert.deepStrictEqual(scaleLinear().domain([0, 0]).nice(10).domain(), [0, 0]); assert.deepStrictEqual(scaleLinear().domain([0.5, 0.5]).nice(10).domain(), [0.5, 0.5]); }); -test("linear.nice(count) nicing a polylinear domain only affects the extent", () => { +it("linear.nice(count) nicing a polylinear domain only affects the extent", () => { assert.deepStrictEqual(scaleLinear().domain([1.1, 1, 2, 3, 10.9]).nice(10).domain(), [1, 1, 2, 3, 11]); assert.deepStrictEqual(scaleLinear().domain([123.1, 1, 2, 3, -0.9]).nice(10).domain(), [130, 1, 2, 3, -10]); }); -test("linear.nice(count) accepts a tick count to control nicing step", () => { +it("linear.nice(count) accepts a tick count to control nicing step", () => { assert.deepStrictEqual(scaleLinear().domain([12, 87]).nice(5).domain(), [0, 100]); assert.deepStrictEqual(scaleLinear().domain([12, 87]).nice(10).domain(), [10, 90]); assert.deepStrictEqual(scaleLinear().domain([12, 87]).nice(100).domain(), [12, 87]); }); -test("linear.ticks(count) returns the expected ticks for an ascending domain", () => { +it("linear.ticks(count) returns the expected ticks for an ascending domain", () => { const s = scaleLinear(); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); @@ -284,7 +284,7 @@ test("linear.ticks(count) returns the expected ticks for an ascending domain", ( assert.deepStrictEqual(s.ticks(1), [ 0 ]); }); -test("linear.ticks(count) returns the expected ticks for a descending domain", () => { +it("linear.ticks(count) returns the expected ticks for a descending domain", () => { const s = scaleLinear().domain([1, 0]); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0].reverse()); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0].reverse()); @@ -309,7 +309,7 @@ test("linear.ticks(count) returns the expected ticks for a descending domain", ( assert.deepStrictEqual(s.ticks(1), [ 0 ].reverse()); }); -test("linear.ticks(count) returns the expected ticks for a polylinear domain", () => { +it("linear.ticks(count) returns the expected ticks for a polylinear domain", () => { const s = scaleLinear().domain([0, 0.25, 0.9, 1]); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); @@ -334,7 +334,7 @@ test("linear.ticks(count) returns the expected ticks for a polylinear domain", ( assert.deepStrictEqual(s.ticks(1), [ 0 ]); }); -test("linear.ticks(X) spans linear.nice(X).domain()", () => { +it("linear.ticks(X) spans linear.nice(X).domain()", () => { function check(domain, count) { const s = scaleLinear().domain(domain).nice(count); const ticks = s.ticks(count); @@ -359,7 +359,7 @@ test("linear.ticks(X) spans linear.nice(X).domain()", () => { check([11, 21], 2); }) -test("linear.ticks(count) returns the empty array if count is not a positive integer", () => { +it("linear.ticks(count) returns the empty array if count is not a positive integer", () => { const s = scaleLinear(); assert.deepStrictEqual(s.ticks(NaN), []); assert.deepStrictEqual(s.ticks(0), []); @@ -367,30 +367,30 @@ test("linear.ticks(count) returns the empty array if count is not a positive int assert.deepStrictEqual(s.ticks(Infinity), []); }); -test("linear.ticks() is an alias for linear.ticks(10)", () => { +it("linear.ticks() is an alias for linear.ticks(10)", () => { const s = scaleLinear(); assert.deepStrictEqual(s.ticks(), s.ticks(10)); }); -test("linear.tickFormat() is an alias for linear.tickFormat(10)", () => { +it("linear.tickFormat() is an alias for linear.tickFormat(10)", () => { assert.strictEqual(scaleLinear().tickFormat()(0.2), "0.2"); assert.strictEqual(scaleLinear().domain([-100, 100]).tickFormat()(-20), "−20"); }); -test("linear.tickFormat(count) returns a format suitable for the ticks", () => { +it("linear.tickFormat(count) returns a format suitable for the ticks", () => { assert.strictEqual(scaleLinear().tickFormat(10)(0.2), "0.2"); assert.strictEqual(scaleLinear().tickFormat(20)(0.2), "0.20"); assert.strictEqual(scaleLinear().domain([-100, 100]).tickFormat(10)(-20), "−20"); }); -test("linear.tickFormat(count, specifier) sets the appropriate fixed precision if not specified", () => { +it("linear.tickFormat(count, specifier) sets the appropriate fixed precision if not specified", () => { assert.strictEqual(scaleLinear().tickFormat(10, "+f")(0.2), "+0.2"); assert.strictEqual(scaleLinear().tickFormat(20, "+f")(0.2), "+0.20"); assert.strictEqual(scaleLinear().tickFormat(10, "+%")(0.2), "+20%"); assert.strictEqual(scaleLinear().domain([0.19, 0.21]).tickFormat(10, "+%")(0.2), "+20.0%"); }); -test("linear.tickFormat(count, specifier) sets the appropriate round precision if not specified", () => { +it("linear.tickFormat(count, specifier) sets the appropriate round precision if not specified", () => { assert.strictEqual(scaleLinear().domain([0, 9]).tickFormat(10, "")(2.10), "2"); assert.strictEqual(scaleLinear().domain([0, 9]).tickFormat(100, "")(2.01), "2"); assert.strictEqual(scaleLinear().domain([0, 9]).tickFormat(100, "")(2.11), "2.1"); @@ -407,18 +407,18 @@ test("linear.tickFormat(count, specifier) sets the appropriate round precision i assert.strictEqual(scaleLinear().domain([0.19, 0.21]).tickFormat(10, "p")(0.201), "20.1%"); }); -test("linear.tickFormat(count, specifier) sets the appropriate prefix precision if not specified", () => { +it("linear.tickFormat(count, specifier) sets the appropriate prefix precision if not specified", () => { assert.strictEqual(scaleLinear().domain([0, 1e6]).tickFormat(10, "$s")(0.51e6), "$0.5M"); assert.strictEqual(scaleLinear().domain([0, 1e6]).tickFormat(100, "$s")(0.501e6), "$0.50M"); }); -test("linear.tickFormat() uses the default precision when the domain is invalid", () => { +it("linear.tickFormat() uses the default precision when the domain is invalid", () => { const f = scaleLinear().domain([0, NaN]).tickFormat(); assert.strictEqual(f + "", " >-,f"); assert.strictEqual(f(0.12), "0.120000"); }); -test("linear.copy() returns a copy with changes to the domain are isolated", () => { +it("linear.copy() returns a copy with changes to the domain are isolated", () => { const x = scaleLinear(), y = x.copy(); x.domain([1, 2]); assert.deepStrictEqual(y.domain(), [0, 1]); @@ -435,7 +435,7 @@ test("linear.copy() returns a copy with changes to the domain are isolated", () assert.deepStrictEqual(y2.domain(), [1, 1.9]); }); -test("linear.copy() returns a copy with changes to the range are isolated", () => { +it("linear.copy() returns a copy with changes to the range are isolated", () => { const x = scaleLinear(), y = x.copy(); x.range([1, 2]); assert.strictEqual(x.invert(1), 0); @@ -448,7 +448,7 @@ test("linear.copy() returns a copy with changes to the range are isolated", () = assert.deepStrictEqual(y.range(), [2, 3]); }); -test("linear.copy() returns a copy with changes to the interpolator are isolated", () => { +it("linear.copy() returns a copy with changes to the interpolator are isolated", () => { const x = scaleLinear().range(["red", "blue"]); const y = x.copy(); const i0 = x.interpolate(); @@ -459,7 +459,7 @@ test("linear.copy() returns a copy with changes to the interpolator are isolated assert.strictEqual(y(0.5), "rgb(128, 0, 128)"); }); -test("linear.copy() returns a copy with changes to clamping are isolated", () => { +it("linear.copy() returns a copy with changes to clamping are isolated", () => { const x = scaleLinear().clamp(true), y = x.copy(); x.clamp(false); assert.strictEqual(x(2), 2); @@ -471,7 +471,7 @@ test("linear.copy() returns a copy with changes to clamping are isolated", () => assert.strictEqual(x.clamp(), false); }); -test("linear.copy() returns a copy with changes to the unknown value are isolated", () => { +it("linear.copy() returns a copy with changes to the unknown value are isolated", () => { const x = scaleLinear(), y = x.copy(); x.unknown(2); assert.strictEqual(x(NaN), 2); diff --git a/test/log-test.js b/test/log-test.js index 26b4eec..22dc7ae 100644 --- a/test/log-test.js +++ b/test/log-test.js @@ -1,4 +1,4 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {hsl, rgb} from "d3-color"; import {interpolate, interpolateHsl} from "d3-interpolate"; @@ -6,7 +6,7 @@ import {format} from "d3-format"; import {scaleLog} from "../src/index.js"; import {assertInDelta} from "./asserts.js"; -test("scaleLog() has the expected defaults", () => { +it("scaleLog() has the expected defaults", () => { const x = scaleLog(); assert.deepStrictEqual(x.domain(), [1, 10]); assert.deepStrictEqual(x.range(), [0, 1]); @@ -20,7 +20,7 @@ test("scaleLog() has the expected defaults", () => { assertInDelta(x.invert(0.5), 3.162278); }); -test("log.domain(…) coerces values to numbers", () => { +it("log.domain(…) coerces values to numbers", () => { const x = scaleLog().domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]); assert.strictEqual(typeof x.domain()[0], "number"); assert.strictEqual(typeof x.domain()[1], "number"); @@ -40,7 +40,7 @@ test("log.domain(…) coerces values to numbers", () => { assertInDelta(x(5), 0.69897); }); -test("log.domain(…) can take negative values", () => { +it("log.domain(…) can take negative values", () => { const x = scaleLog().domain([-100, -1]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(Infinity)), [ "−100", @@ -50,32 +50,32 @@ test("log.domain(…) can take negative values", () => { assertInDelta(x(-50), 0.150515); }); -test("log.domain(…).range(…) can take more than two values", () => { +it("log.domain(…).range(…) can take more than two values", () => { const x = scaleLog().domain([0.1, 1, 100]).range(["red", "white", "green"]); assert.strictEqual(x(0.5), "rgb(255, 178, 178)"); assert.strictEqual(x(50), "rgb(38, 147, 38)"); assert.strictEqual(x(75), "rgb(16, 136, 16)"); }); -test("log.domain(…) preserves specified domain exactly, with no floating point error", () => { +it("log.domain(…) preserves specified domain exactly, with no floating point error", () => { const x = scaleLog().domain([0.1, 1000]); assert.deepStrictEqual(x.domain(), [0.1, 1000]); }); -test("log.ticks(…) returns exact ticks, with no floating point error", () => { +it("log.ticks(…) returns exact ticks, with no floating point error", () => { assert.deepStrictEqual(scaleLog().domain([0.15, 0.68]).ticks(), [0.2, 0.3, 0.4, 0.5, 0.6]); assert.deepStrictEqual(scaleLog().domain([0.68, 0.15]).ticks(), [0.6, 0.5, 0.4, 0.3, 0.2]); assert.deepStrictEqual(scaleLog().domain([-0.15, -0.68]).ticks(), [-0.2, -0.3, -0.4, -0.5, -0.6]); assert.deepStrictEqual(scaleLog().domain([-0.68, -0.15]).ticks(), [-0.6, -0.5, -0.4, -0.3, -0.2]); }); -test("log.range(…) does not coerce values to numbers", () => { +it("log.range(…) does not coerce values to numbers", () => { const x = scaleLog().range(["0", "2"]); assert.strictEqual(typeof x.range()[0], "string"); assert.strictEqual(typeof x.range()[1], "string"); }); -test("log.range(…) can take colors", () => { +it("log.range(…) can take colors", () => { const x = scaleLog().range(["red", "blue"]); assert.strictEqual(x(5), "rgb(77, 0, 178)"); x.range(["#ff0000", "#0000ff"]); @@ -88,14 +88,14 @@ test("log.range(…) can take colors", () => { assert.strictEqual(x(5), "rgb(77, 0, 178)"); }); -test("log.range(…) can take arrays or objects", () => { +it("log.range(…) can take arrays or objects", () => { const x = scaleLog().range([{color: "red"}, {color: "blue"}]); assert.deepStrictEqual(x(5), {color: "rgb(77, 0, 178)"}); x.range([["red"], ["blue"]]); assert.deepStrictEqual(x(5), ["rgb(77, 0, 178)"]); }); -test("log.interpolate(f) sets the interpolator", () => { +it("log.interpolate(f) sets the interpolator", () => { const x = scaleLog().range(["red", "blue"]); assert.strictEqual(x.interpolate(), interpolate); assert.strictEqual(x(5), "rgb(77, 0, 178)"); @@ -103,14 +103,14 @@ test("log.interpolate(f) sets the interpolator", () => { assert.strictEqual(x(5), "rgb(154, 0, 255)"); }); -test("log(x) does not clamp by default", () => { +it("log(x) does not clamp by default", () => { const x = scaleLog(); assert.strictEqual(x.clamp(), false); assertInDelta(x(0.5), -0.3010299); assertInDelta(x(15), 1.1760913); }); -test("log.clamp(true)(x) clamps to the domain", () => { +it("log.clamp(true)(x) clamps to the domain", () => { const x = scaleLog().clamp(true); assertInDelta(x(-1), 0); assertInDelta(x(5), 0.69897); @@ -121,7 +121,7 @@ test("log.clamp(true)(x) clamps to the domain", () => { assertInDelta(x(15), 0); }); -test("log.clamp(true).invert(y) clamps to the range", () => { +it("log.clamp(true).invert(y) clamps to the range", () => { const x = scaleLog().clamp(true); assertInDelta(x.invert(-0.1), 1); assertInDelta(x.invert(0.69897), 5); @@ -132,7 +132,7 @@ test("log.clamp(true).invert(y) clamps to the range", () => { assertInDelta(x.invert(1.5), 1); }); -test("log(x) maps a number x to a number y", () => { +it("log(x) maps a number x to a number y", () => { const x = scaleLog().domain([1, 2]); assertInDelta(x(0.5), -1.0000000); assertInDelta(x(1.0), 0.0000000); @@ -141,7 +141,7 @@ test("log(x) maps a number x to a number y", () => { assertInDelta(x(2.5), 1.3219281); }); -test("log.invert(y) maps a number y to a number x", () => { +it("log.invert(y) maps a number y to a number x", () => { const x = scaleLog().domain([1, 2]); assertInDelta(x.invert(-1.0000000), 0.5); assertInDelta(x.invert( 0.0000000), 1.0); @@ -150,7 +150,7 @@ test("log.invert(y) maps a number y to a number x", () => { assertInDelta(x.invert( 1.3219281), 2.5); }); -test("log.invert(y) coerces y to number", () => { +it("log.invert(y) coerces y to number", () => { const x = scaleLog().range(["0", "2"]); assertInDelta(x.invert("1"), 3.1622777); x.range([new Date(1990, 0, 1), new Date(1991, 0, 1)]); @@ -159,13 +159,13 @@ test("log.invert(y) coerces y to number", () => { assert(Number.isNaN(x.invert("#999"))); }); -test("log.base(b) sets the log base, changing the ticks", () => { +it("log.base(b) sets the log base, changing the ticks", () => { const x = scaleLog().domain([1, 32]); assert.deepStrictEqual(x.base(2).ticks().map(x.tickFormat()), ["1", "2", "4", "8", "16", "32"]); assert.deepStrictEqual(x.base(Math.E).ticks().map(x.tickFormat()), ["1", "2.71828182846", "7.38905609893", "20.0855369232"]); }); -test("log.nice() nices the domain, extending it to powers of ten", () => { +it("log.nice() nices the domain, extending it to powers of ten", () => { const x = scaleLog().domain([1.1, 10.9]).nice(); assert.deepStrictEqual(x.domain(), [1, 100]); x.domain([10.9, 1.1]).nice(); @@ -182,21 +182,21 @@ test("log.nice() nices the domain, extending it to powers of ten", () => { assertInDelta(x(100), 1); }); -test("log.nice() works on degenerate domains", () => { +it("log.nice() works on degenerate domains", () => { const x = scaleLog().domain([0, 0]).nice(); assert.deepStrictEqual(x.domain(), [0, 0]); x.domain([0.5, 0.5]).nice(); assert.deepStrictEqual(x.domain(), [0.1, 1]); }); -test("log.nice() on a polylog domain only affects the extent", () => { +it("log.nice() on a polylog domain only affects the extent", () => { const x = scaleLog().domain([1.1, 1.5, 10.9]).nice(); assert.deepStrictEqual(x.domain(), [1, 1.5, 100]); x.domain([-123.1, -1.5, -0.5]).nice(); assert.deepStrictEqual(x.domain(), [-1000, -1.5, -0.1]); }); -test("log.copy() isolates changes to the domain", () => { +it("log.copy() isolates changes to the domain", () => { const x = scaleLog(), y = x.copy(); x.domain([10, 100]); assert.deepStrictEqual(y.domain(), [1, 10]); @@ -209,7 +209,7 @@ test("log.copy() isolates changes to the domain", () => { assert.deepStrictEqual(y.domain(), [100, 1000]); }); -test("log.copy() isolates changes to the domain via nice", () => { +it("log.copy() isolates changes to the domain via nice", () => { const x = scaleLog().domain([1.5, 50]), y = x.copy().nice(); assert.deepStrictEqual(x.domain(), [1.5, 50]); assertInDelta(x(1.5), 0); @@ -223,7 +223,7 @@ test("log.copy() isolates changes to the domain via nice", () => { assertInDelta(y.invert(1), 100); }); -test("log.copy() isolates changes to the range", () => { +it("log.copy() isolates changes to the range", () => { const x = scaleLog(), y = x.copy(); x.range([1, 2]); assertInDelta(x.invert(1), 1); @@ -236,7 +236,7 @@ test("log.copy() isolates changes to the range", () => { assert.deepStrictEqual(y.range(), [2, 3]); }); -test("log.copy() isolates changes to the interpolator", () => { +it("log.copy() isolates changes to the interpolator", () => { const x = scaleLog().range(["red", "blue"]), y = x.copy(); x.interpolate(interpolateHsl); assert.strictEqual(x(5), "rgb(154, 0, 255)"); @@ -244,7 +244,7 @@ test("log.copy() isolates changes to the interpolator", () => { assert.strictEqual(y.interpolate(), interpolate); }); -test("log.copy() isolates changes to clamping", () => { +it("log.copy() isolates changes to clamping", () => { const x = scaleLog().clamp(true), y = x.copy(); x.clamp(false); assertInDelta(x(0.5), -0.30103); @@ -256,7 +256,7 @@ test("log.copy() isolates changes to clamping", () => { assert.strictEqual(x.clamp(), false); }); -test("log.ticks() generates the expected power-of-ten for ascending ticks", () => { +it("log.ticks() generates the expected power-of-ten for ascending ticks", () => { const s = scaleLog(); assert.deepStrictEqual(s.domain([1e-1, 1e1]).ticks().map(round), [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); assert.deepStrictEqual(s.domain([1e-1, 1e0]).ticks().map(round), [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]); @@ -264,14 +264,14 @@ test("log.ticks() generates the expected power-of-ten for ascending ticks", () = }); -test("log.ticks() generates the expected power-of-ten ticks for descending domains", () => { +it("log.ticks() generates the expected power-of-ten ticks for descending domains", () => { const s = scaleLog(); assert.deepStrictEqual(s.domain([-1e-1, -1e1]).ticks().map(round), [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1].reverse()); assert.deepStrictEqual(s.domain([-1e-1, -1e0]).ticks().map(round), [-1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1].reverse()); assert.deepStrictEqual(s.domain([1e0, 1e-1]).ticks().map(round), [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1].reverse()); }); -test("log.ticks() generates the expected power-of-ten ticks for small domains", () => { +it("log.ticks() generates the expected power-of-ten ticks for small domains", () => { const s = scaleLog(); assert.deepStrictEqual(s.domain([1, 5]).ticks(), [1, 2, 3, 4, 5]); assert.deepStrictEqual(s.domain([5, 1]).ticks(), [5, 4, 3, 2, 1]); @@ -284,24 +284,24 @@ test("log.ticks() generates the expected power-of-ten ticks for small domains", assert.deepStrictEqual(s.domain([286.9252014, 329.4978332]).ticks(), [290, 295, 300, 305, 310, 315, 320, 325]); }); -test("log.ticks() generates linear ticks when the domain extent is small", () => { +it("log.ticks() generates linear ticks when the domain extent is small", () => { const s = scaleLog(); assert.deepStrictEqual(s.domain([41, 42]).ticks(), [41, 41.1, 41.2, 41.3, 41.4, 41.5, 41.6, 41.7, 41.8, 41.9, 42]); assert.deepStrictEqual(s.domain([42, 41]).ticks(), [42, 41.9, 41.8, 41.7, 41.6, 41.5, 41.4, 41.3, 41.2, 41.1, 41]); assert.deepStrictEqual(s.domain([1600, 1400]).ticks(), [1600, 1580, 1560, 1540, 1520, 1500, 1480, 1460, 1440, 1420, 1400]); }); -test("log.base(base).ticks() generates the expected power-of-base ticks", () => { +it("log.base(base).ticks() generates the expected power-of-base ticks", () => { const s = scaleLog().base(Math.E); assert.deepStrictEqual(s.domain([0.1, 100]).ticks().map(round), [0.135335283237, 0.367879441171, 1, 2.718281828459, 7.389056098931, 20.085536923188, 54.598150033144]); }); -test("log.tickFormat() is equivalent to log.tickFormat(10)", () => { +it("log.tickFormat() is equivalent to log.tickFormat(10)", () => { const s = scaleLog(); assert.deepStrictEqual(s.domain([1e-1, 1e1]).ticks().map(s.tickFormat()), ["100m", "200m", "300m", "400m", "500m", "", "", "", "", "1", "2", "3", "4", "5", "", "", "", "", "10"]); }); -test("log.tickFormat(count) returns a filtered \"s\" format", () => { +it("log.tickFormat(count) returns a filtered \"s\" format", () => { const s = scaleLog(), t = s.domain([1e-1, 1e1]).ticks(); assert.deepStrictEqual(t.map(s.tickFormat(10)), ["100m", "200m", "300m", "400m", "500m", "", "", "", "", "1", "2", "3", "4", "5", "", "", "", "", "10"]); assert.deepStrictEqual(t.map(s.tickFormat(5)), ["100m", "200m", "", "", "", "", "", "", "", "1", "2", "", "", "", "", "", "", "", "10"]); @@ -309,24 +309,24 @@ test("log.tickFormat(count) returns a filtered \"s\" format", () => { assert.deepStrictEqual(t.map(s.tickFormat(0)), ["100m", "", "", "", "", "", "", "", "", "1", "", "", "", "", "", "", "", "", "10"]); }); -test("log.tickFormat(count, format) returns the specified format, filtered", () => { +it("log.tickFormat(count, format) returns the specified format, filtered", () => { const s = scaleLog(), t = s.domain([1e-1, 1e1]).ticks(); assert.deepStrictEqual(t.map(s.tickFormat(10, "+")), ["+0.1", "+0.2", "+0.3", "+0.4", "+0.5", "", "", "", "", "+1", "+2", "+3", "+4", "+5", "", "", "", "", "+10"]); }); -test("log.base(base).tickFormat() returns the \",\" format", () => { +it("log.base(base).tickFormat() returns the \",\" format", () => { const s = scaleLog().base(Math.E); assert.deepStrictEqual(s.domain([1e-1, 1e1]).ticks().map(s.tickFormat()), ["0.135335283237", "0.367879441171", "1", "2.71828182846", "7.38905609893"]); }); -test("log.base(base).tickFormat(count) returns a filtered \",\" format", () => { +it("log.base(base).tickFormat(count) returns a filtered \",\" format", () => { const s = scaleLog().base(16), t = s.domain([1e-1, 1e1]).ticks(); assert.deepStrictEqual(t.map(s.tickFormat(10)), ["0.125", "0.1875", "0.25", "0.3125", "0.375", "", "", "", "", "", "", "", "", "", "1", "2", "3", "4", "5", "6", "", "", "", ""]); assert.deepStrictEqual(t.map(s.tickFormat(5)), ["0.125", "0.1875", "", "", "", "", "", "", "", "", "", "", "", "", "1", "2", "3", "", "", "", "", "", "", ""]); assert.deepStrictEqual(t.map(s.tickFormat(1)), ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "1", "", "", "", "", "", "", "", "", ""]); }); -test("log.ticks() generates log ticks", () => { +it("log.ticks() generates log ticks", () => { const x = scaleLog(); assert.deepStrictEqual(x.ticks().map(x.tickFormat(Infinity)), [ "1", "2", "3", "4", "5", "6", "7", "8", "9", @@ -350,7 +350,7 @@ test("log.ticks() generates log ticks", () => { ]); }); -test("log.tickFormat(count) filters ticks to about count", () => { +it("log.tickFormat(count) filters ticks to about count", () => { const x = scaleLog(); assert.deepStrictEqual(x.ticks().map(x.tickFormat(5)), [ "1", "2", "3", "4", "5", "", "", "", "", @@ -364,14 +364,14 @@ test("log.tickFormat(count) filters ticks to about count", () => { ]); }); -test("log.ticks(count) filters powers-of-ten ticks for huge domains", () => { +it("log.ticks(count) filters powers-of-ten ticks for huge domains", () => { const x = scaleLog().domain([1e10, 1]); assert.deepStrictEqual(x.ticks().map(x.tickFormat()), ["10G", "1G", "100M", "10M", "1M", "100k", "10k", "1k", "100", "10", "1"]); x.domain([1e-29, 1e-1]); assert.deepStrictEqual(x.ticks().map(x.tickFormat()), ["0.0001y", "0.01y", "1y", "100y", "10z", "1a", "100a", "10f", "1p", "100p", "10n", "1µ", "100µ", "10m"]); }); -test("log.ticks() generates ticks that cover the domain", () => { +it("log.ticks() generates ticks that cover the domain", () => { const x = scaleLog().domain([0.01, 10000]); assert.deepStrictEqual(x.ticks(20).map(x.tickFormat(20)), [ "10m", "20m", "30m", "", "", "", "", "", "", @@ -384,7 +384,7 @@ test("log.ticks() generates ticks that cover the domain", () => { ]); }); -test("log.ticks() generates ticks that cover the niced domain", () => { +it("log.ticks() generates ticks that cover the niced domain", () => { const x = scaleLog().domain([0.0124123, 1230.4]).nice(); assert.deepStrictEqual(x.ticks(20).map(x.tickFormat(20)), [ "10m", "20m", "30m", "", "", "", "", "", "", @@ -397,7 +397,7 @@ test("log.ticks() generates ticks that cover the niced domain", () => { ]); }); -test("log.tickFormat(count, format) returns a filtered format", () => { +it("log.tickFormat(count, format) returns a filtered format", () => { const x = scaleLog().domain([1000.1, 1]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(10, format("+,d"))), [ "+1,000", @@ -407,7 +407,7 @@ test("log.tickFormat(count, format) returns a filtered format", () => { ]); }); -test("log.tickFormat(count, specifier) returns a filtered format", () => { +it("log.tickFormat(count, specifier) returns a filtered format", () => { const x = scaleLog().domain([1000.1, 1]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(10, "s")), [ "1k", @@ -417,7 +417,7 @@ test("log.tickFormat(count, specifier) returns a filtered format", () => { ]); }); -test("log.tickFormat(count, specifier) trims trailing zeroes by default", () => { +it("log.tickFormat(count, specifier) trims trailing zeroes by default", () => { const x = scaleLog().domain([100.1, 0.02]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(10, "f")), [ "100", @@ -428,14 +428,14 @@ test("log.tickFormat(count, specifier) trims trailing zeroes by default", () => ]); }); -test("log.tickFormat(count, specifier) with base two trims trailing zeroes by default", () => { +it("log.tickFormat(count, specifier) with base two trims trailing zeroes by default", () => { const x = scaleLog().base(2).domain([100.1, 0.02]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(10, "f")), [ "64", "32", "16", "8", "4", "2", "1", "0.5", "0.25", "0.125", "0.0625", "0.03125" ]); }); -test("log.tickFormat(count, specifier) preserves trailing zeroes if needed", () => { +it("log.tickFormat(count, specifier) preserves trailing zeroes if needed", () => { const x = scaleLog().domain([100.1, 0.02]); assert.deepStrictEqual(x.ticks().map(x.tickFormat(10, ".1f")), [ "100.0", @@ -446,7 +446,7 @@ test("log.tickFormat(count, specifier) preserves trailing zeroes if needed", () ]); }); -test("log.ticks() returns the empty array when the domain is degenerate", () => { +it("log.ticks() returns the empty array when the domain is degenerate", () => { const x = scaleLog(); assert.deepStrictEqual(x.domain([0, 1]).ticks(), []); assert.deepStrictEqual(x.domain([1, 0]).ticks(), []); diff --git a/test/ordinal-test.js b/test/ordinal-test.js index 70398d7..33cf8ad 100644 --- a/test/ordinal-test.js +++ b/test/ordinal-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleImplicit, scaleOrdinal} from "../src/index.js"; -test("scaleOrdinal() has the expected defaults", () => { +it("scaleOrdinal() has the expected defaults", () => { const s = scaleOrdinal(); assert.deepStrictEqual(s.domain(), []); assert.deepStrictEqual(s.range(), []); @@ -11,7 +11,7 @@ test("scaleOrdinal() has the expected defaults", () => { assert.deepStrictEqual(s.domain(), [0]); }); -test("ordinal(x) maps a unique name x in the domain to the corresponding value y in the range", () => { +it("ordinal(x) maps a unique name x in the domain to the corresponding value y in the range", () => { const s = scaleOrdinal().domain([0, 1]).range(["foo", "bar"]).unknown(undefined); assert.strictEqual(s(0), "foo"); assert.strictEqual(s(1), "bar"); @@ -24,7 +24,7 @@ test("ordinal(x) maps a unique name x in the domain to the corresponding value y assert.strictEqual(s(2), undefined); }); -test("ordinal(x) implicitly extends the domain when a range is explicitly specified", () => { +it("ordinal(x) implicitly extends the domain when a range is explicitly specified", () => { const s = scaleOrdinal().range(["foo", "bar"]); assert.deepStrictEqual(s.domain(), []); assert.strictEqual(s(0), "foo"); @@ -35,26 +35,26 @@ test("ordinal(x) implicitly extends the domain when a range is explicitly specif assert.deepStrictEqual(s.domain(), [0, 1]); }); -test("ordinal.domain(x) makes a copy of the domain", () => { +it("ordinal.domain(x) makes a copy of the domain", () => { const domain = ["red", "green"]; const s = scaleOrdinal().domain(domain); domain.push("blue"); assert.deepStrictEqual(s.domain(), ["red", "green"]); }); -test("ordinal.domain() returns a copy of the domain", () => { +it("ordinal.domain() returns a copy of the domain", () => { const s = scaleOrdinal().domain(["red", "green"]); const domain = s.domain(); s("blue"); assert.deepStrictEqual(domain, ["red", "green"]); }); -test("ordinal.domain() accepts an iterable", () => { +it("ordinal.domain() accepts an iterable", () => { const s = scaleOrdinal().domain(new Set(["red", "green"])); assert.deepStrictEqual(s.domain(), ["red", "green"]); }); -test("ordinal.domain() replaces previous domain values", () => { +it("ordinal.domain() replaces previous domain values", () => { const s = scaleOrdinal().range(["foo", "bar"]); assert.strictEqual(s(1), "foo"); assert.strictEqual(s(0), "bar"); @@ -65,28 +65,28 @@ test("ordinal.domain() replaces previous domain values", () => { assert.deepStrictEqual(s.domain(), ["0", "1"]); }); -test("ordinal.domain() uniqueness is based on primitive coercion", () => { +it("ordinal.domain() uniqueness is based on primitive coercion", () => { const s = scaleOrdinal().domain(["foo"]).range([42, 43, 44]); assert.strictEqual(s(new String("foo")), 42); assert.strictEqual(s({valueOf: function() { return "foo"; }}), 42); assert.strictEqual(s({valueOf: function() { return "bar"; }}), 43); }); -test("ordinal.domain() does not coerce domain values to strings", () => { +it("ordinal.domain() does not coerce domain values to strings", () => { const s = scaleOrdinal().domain([0, 1]); assert.deepStrictEqual(s.domain(), [0, 1]); assert.strictEqual(typeof s.domain()[0], "number"); assert.strictEqual(typeof s.domain()[1], "number"); }); -test("ordinal.domain() does not barf on object built-ins", () => { +it("ordinal.domain() does not barf on object built-ins", () => { const s = scaleOrdinal().domain(["__proto__", "hasOwnProperty"]).range([42, 43]); assert.strictEqual(s("__proto__"), 42); assert.strictEqual(s("hasOwnProperty"), 43); assert.deepStrictEqual(s.domain(), ["__proto__", "hasOwnProperty"]); }); -test("ordinal() accepts dates", () => { +it("ordinal() accepts dates", () => { const s = scaleOrdinal(); s(new Date(1970, 2, 1)); s(new Date(2001, 4, 13)); @@ -95,7 +95,7 @@ test("ordinal() accepts dates", () => { assert.deepStrictEqual(s.domain(), [new Date(1970, 2, 1), new Date(2001, 4, 13)]); }); -test("ordinal.domain() accepts dates", () => { +it("ordinal.domain() accepts dates", () => { const s = scaleOrdinal().domain([ new Date(1970, 2, 1), new Date(2001, 4, 13), @@ -107,14 +107,14 @@ test("ordinal.domain() accepts dates", () => { assert.deepStrictEqual(s.domain(), [new Date(1970, 2, 1), new Date(2001, 4, 13), new Date(1999, 11, 31)]); }); -test("ordinal.domain() does not barf on object built-ins", () => { +it("ordinal.domain() does not barf on object built-ins", () => { const s = scaleOrdinal().domain(["__proto__", "hasOwnProperty"]).range([42, 43]); assert.strictEqual(s("__proto__"), 42); assert.strictEqual(s("hasOwnProperty"), 43); assert.deepStrictEqual(s.domain(), ["__proto__", "hasOwnProperty"]); }); -test("ordinal.domain() is ordered by appearance", () => { +it("ordinal.domain() is ordered by appearance", () => { const s = scaleOrdinal(); s("foo"); s("bar"); @@ -131,19 +131,19 @@ test("ordinal.domain() is ordered by appearance", () => { assert.deepStrictEqual(s.domain(), ["foo", "bar"]); }); -test("ordinal.range(x) makes a copy of the range", () => { +it("ordinal.range(x) makes a copy of the range", () => { const range = ["red", "green"]; const s = scaleOrdinal().range(range); range.push("blue"); assert.deepStrictEqual(s.range(), ["red", "green"]); }); -test("ordinal.range() accepts an iterable", () => { +it("ordinal.range() accepts an iterable", () => { const s = scaleOrdinal().range(new Set(["red", "green"])); assert.deepStrictEqual(s.range(), ["red", "green"]); }); -test("ordinal.range() returns a copy of the range", () => { +it("ordinal.range() returns a copy of the range", () => { const s = scaleOrdinal().range(["red", "green"]); const range = s.range(); assert.deepStrictEqual(range, ["red", "green"]); @@ -151,7 +151,7 @@ test("ordinal.range() returns a copy of the range", () => { assert.deepStrictEqual(s.range(), ["red", "green"]); }); -test("ordinal.range(values) does not discard implicit domain associations", () => { +it("ordinal.range(values) does not discard implicit domain associations", () => { const s = scaleOrdinal(); assert.strictEqual(s(0), undefined); assert.strictEqual(s(1), undefined); @@ -160,7 +160,7 @@ test("ordinal.range(values) does not discard implicit domain associations", () = assert.strictEqual(s(0), "foo"); }); -test("ordinal(value) recycles values when exhausted", () => { +it("ordinal(value) recycles values when exhausted", () => { const s = scaleOrdinal().range(["a", "b", "c"]); assert.strictEqual(s(0), "a"); assert.strictEqual(s(1), "b"); @@ -173,7 +173,7 @@ test("ordinal(value) recycles values when exhausted", () => { assert.strictEqual(s(0), "a"); }); -test("ordinal.unknown(x) sets the output value for unknown inputs", () => { +it("ordinal.unknown(x) sets the output value for unknown inputs", () => { const s = scaleOrdinal().domain(["foo", "bar"]).unknown("gray").range(["red", "blue"]); assert.strictEqual(s("foo"), "red"); assert.strictEqual(s("bar"), "blue"); @@ -181,13 +181,13 @@ test("ordinal.unknown(x) sets the output value for unknown inputs", () => { assert.strictEqual(s("quux"), "gray"); }); -test("ordinal.unknown(x) prevents implicit domain extension if x is not implicit", () => { +it("ordinal.unknown(x) prevents implicit domain extension if x is not implicit", () => { const s = scaleOrdinal().domain(["foo", "bar"]).unknown(undefined).range(["red", "blue"]); assert.strictEqual(s("baz"), undefined); assert.deepStrictEqual(s.domain(), ["foo", "bar"]); }); -test("ordinal.copy() copies all fields", () => { +it("ordinal.copy() copies all fields", () => { const s1 = scaleOrdinal().domain([1, 2]).range(["red", "green"]).unknown("gray"); const s2 = s1.copy(); assert.deepStrictEqual(s2.domain(), s1.domain()); @@ -195,7 +195,7 @@ test("ordinal.copy() copies all fields", () => { assert.deepStrictEqual(s2.unknown(), s1.unknown()); }); -test("ordinal.copy() changes to the domain are isolated", () => { +it("ordinal.copy() changes to the domain are isolated", () => { const s1 = scaleOrdinal().range(["foo", "bar"]); const s2 = s1.copy(); s1.domain([1, 2]); @@ -209,7 +209,7 @@ test("ordinal.copy() changes to the domain are isolated", () => { assert.deepStrictEqual(s2.domain(), [2, 3]); }); -test("ordinal.copy() changes to the range are isolated", () => { +it("ordinal.copy() changes to the range are isolated", () => { const s1 = scaleOrdinal().range(["foo", "bar"]); const s2 = s1.copy(); s1.range(["bar", "foo"]); diff --git a/test/point-test.js b/test/point-test.js index 451a61e..94df36e 100644 --- a/test/point-test.js +++ b/test/point-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleBand, scalePoint} from "../src/index.js"; -test("scalePoint() has the expected defaults", () => { +it("scalePoint() has the expected defaults", () => { const s = scalePoint(); assert.deepStrictEqual(s.domain(), []); assert.deepStrictEqual(s.range(), [0, 1]); @@ -13,13 +13,13 @@ test("scalePoint() has the expected defaults", () => { assert.strictEqual(s.align(), 0.5); }); -test("scalePoint() does not expose paddingInner and paddingOuter", () => { +it("scalePoint() does not expose paddingInner and paddingOuter", () => { const s = scalePoint(); assert.strictEqual(s.paddingInner, undefined); assert.strictEqual(s.paddingOuter, undefined); }); -test("scalePoint() is similar to scaleBand().paddingInner(1)", () => { +it("scalePoint() is similar to scaleBand().paddingInner(1)", () => { const p = scalePoint().domain(["foo", "bar"]).range([0, 960]); const b = scaleBand().domain(["foo", "bar"]).range([0, 960]).paddingInner(1); assert.deepStrictEqual(p.domain().map(p), b.domain().map(b)); @@ -27,7 +27,7 @@ test("scalePoint() is similar to scaleBand().paddingInner(1)", () => { assert.strictEqual(p.step(), b.step()); }); -test("point.padding(p) sets the band outer padding to p", () => { +it("point.padding(p) sets the band outer padding to p", () => { const p = scalePoint().domain(["foo", "bar"]).range([0, 960]).padding(0.5); const b = scaleBand().domain(["foo", "bar"]).range([0, 960]).paddingInner(1).paddingOuter(0.5); assert.deepStrictEqual(p.domain().map(p), b.domain().map(b)); @@ -35,7 +35,7 @@ test("point.padding(p) sets the band outer padding to p", () => { assert.strictEqual(p.step(), b.step()); }); -test("point.copy() returns a copy", () => { +it("point.copy() returns a copy", () => { const s = scalePoint(); assert.deepStrictEqual(s.domain(), []); assert.deepStrictEqual(s.range(), [0, 1]); diff --git a/test/pow-test.js b/test/pow-test.js index af14c05..9fdb010 100644 --- a/test/pow-test.js +++ b/test/pow-test.js @@ -1,10 +1,10 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scalePow, scaleSqrt} from "../src/index.js"; import {roundEpsilon} from "./roundEpsilon.js"; import {assertInDelta} from "./asserts.js"; -test("scalePow() has the expected defaults", () => { +it("scalePow() has the expected defaults", () => { const s = scalePow(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -13,26 +13,26 @@ test("scalePow() has the expected defaults", () => { assert.deepStrictEqual(s.interpolate()({array: ["red"]}, {array: ["blue"]})(0.5), {array: ["rgb(128, 0, 128)"]}); }); -test("pow(x) maps a domain value x to a range value y", () => { +it("pow(x) maps a domain value x to a range value y", () => { assert.strictEqual(scalePow().exponent(0.5)(0.5), Math.SQRT1_2); }); -test("pow(x) ignores extra range values if the domain is smaller than the range", () => { +it("pow(x) ignores extra range values if the domain is smaller than the range", () => { assert.strictEqual(scalePow().domain([-10, 0]).range(["red", "white", "green"]).clamp(true)(-5), "rgb(255, 128, 128)"); assert.strictEqual(scalePow().domain([-10, 0]).range(["red", "white", "green"]).clamp(true)(50), "rgb(255, 255, 255)"); }); -test("pow(x) ignores extra domain values if the range is smaller than the domain", () => { +it("pow(x) ignores extra domain values if the range is smaller than the domain", () => { assert.strictEqual(scalePow().domain([-10, 0, 100]).range(["red", "white"]).clamp(true)(-5), "rgb(255, 128, 128)"); assert.strictEqual(scalePow().domain([-10, 0, 100]).range(["red", "white"]).clamp(true)(50), "rgb(255, 255, 255)"); }); -test("pow(x) maps an empty domain to the middle of the range", () => { +it("pow(x) maps an empty domain to the middle of the range", () => { assert.strictEqual(scalePow().domain([0, 0]).range([1, 2])(0), 1.5); assert.strictEqual(scalePow().domain([0, 0]).range([2, 1])(1), 1.5); }); -test("pow(x) can map a bipow domain with two values to the corresponding range", () => { +it("pow(x) can map a bipow domain with two values to the corresponding range", () => { const s = scalePow().domain([1, 2]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.strictEqual(s(0.5), -0.5); @@ -47,7 +47,7 @@ test("pow(x) can map a bipow domain with two values to the corresponding range", assert.strictEqual(s.invert( 1.5), 2.5); }); -test("pow(x) can map a polypow domain with more than two values to the corresponding range", () => { +it("pow(x) can map a polypow domain with more than two values to the corresponding range", () => { const s = scalePow().domain([-10, 0, 100]).range(["red", "white", "green"]); assert.deepStrictEqual(s.domain(), [-10, 0, 100]); assert.strictEqual(s(-5), "rgb(255, 128, 128)"); @@ -65,26 +65,26 @@ test("pow(x) can map a polypow domain with more than two values to the correspon assert.strictEqual(s.invert(3), 1.5); }); -test("pow.invert(y) maps a range value y to a domain value x", () => { +it("pow.invert(y) maps a range value y to a domain value x", () => { assert.strictEqual(scalePow().range([1, 2]).invert(1.5), 0.5); }); -test("pow.invert(y) maps an empty range to the middle of the domain", () => { +it("pow.invert(y) maps an empty range to the middle of the domain", () => { assert.strictEqual(scalePow().domain([1, 2]).range([0, 0]).invert(0), 1.5); assert.strictEqual(scalePow().domain([2, 1]).range([0, 0]).invert(1), 1.5); }); -test("pow.invert(y) coerces range values to numbers", () => { +it("pow.invert(y) coerces range values to numbers", () => { assert.strictEqual(scalePow().range(["0", "2"]).invert("1"), 0.5); assert.strictEqual(scalePow().range([new Date(1990, 0, 1), new Date(1991, 0, 1)]).invert(new Date(1990, 6, 2, 13)), 0.5); }); -test("pow.invert(y) returns NaN if the range is not coercible to number", () => { +it("pow.invert(y) returns NaN if the range is not coercible to number", () => { assert(isNaN(scalePow().range(["#000", "#fff"]).invert("#999"))); assert(isNaN(scalePow().range([0, "#fff"]).invert("#999"))); }); -test("pow.exponent(exponent) sets the exponent to the specified value", () => { +it("pow.exponent(exponent) sets the exponent to the specified value", () => { const x = scalePow().exponent(0.5).domain([1, 2]); assertInDelta(x(1), 0, 1e-6); assertInDelta(x(1.5), 0.5425821, 1e-6); @@ -102,7 +102,7 @@ test("pow.exponent(exponent) sets the exponent to the specified value", () => { assert.strictEqual(x.exponent(), -1); }); -test("pow.exponent(exponent) changing the exponent does not change the domain or range", () => { +it("pow.exponent(exponent) changing the exponent does not change the domain or range", () => { const x = scalePow().domain([1, 2]).range([3, 4]); x.exponent(0.5); assert.deepStrictEqual(x.domain(), [1, 2]); @@ -115,19 +115,19 @@ test("pow.exponent(exponent) changing the exponent does not change the domain or assert.deepStrictEqual(x.range(), [3, 4]); }); -test("pow.domain(domain) accepts an array of numbers", () => { +it("pow.domain(domain) accepts an array of numbers", () => { assert.deepStrictEqual(scalePow().domain([]).domain(), []); assert.deepStrictEqual(scalePow().domain([1, 0]).domain(), [1, 0]); assert.deepStrictEqual(scalePow().domain([1, 2, 3]).domain(), [1, 2, 3]); }); -test("pow.domain(domain) coerces domain values to numbers", () => { +it("pow.domain(domain) coerces domain values to numbers", () => { assert.deepStrictEqual(scalePow().domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]).domain(), [631180800000, 662716800000]); assert.deepStrictEqual(scalePow().domain(["0.0", "1.0"]).domain(), [0, 1]); assert.deepStrictEqual(scalePow().domain([new Number(0), new Number(1)]).domain(), [0, 1]); }); -test("pow.domain(domain) makes a copy of domain values", () => { +it("pow.domain(domain) makes a copy of domain values", () => { const d = [1, 2], s = scalePow().domain(d); assert.deepStrictEqual(s.domain(), [1, 2]); d.push(3); @@ -135,20 +135,20 @@ test("pow.domain(domain) makes a copy of domain values", () => { assert.deepStrictEqual(d, [1, 2, 3]); }); -test("pow.domain() returns a copy of domain values", () => { +it("pow.domain() returns a copy of domain values", () => { const s = scalePow(), d = s.domain(); assert.deepStrictEqual(d, [0, 1]); d.push(3); assert.deepStrictEqual(s.domain(), [0, 1]); }); -test("pow.range(range) does not coerce range to numbers", () => { +it("pow.range(range) does not coerce range to numbers", () => { const s = scalePow().range(["0px", "2px"]); assert.deepStrictEqual(s.range(), ["0px", "2px"]); assert.strictEqual(s(0.5), "1px"); }); -test("pow.range(range) can accept range values as colors", () => { +it("pow.range(range) can accept range values as colors", () => { assert.strictEqual(scalePow().range(["red", "blue"])(0.5), "rgb(128, 0, 128)"); assert.strictEqual(scalePow().range(["#ff0000", "#0000ff"])(0.5), "rgb(128, 0, 128)"); assert.strictEqual(scalePow().range(["#f00", "#00f"])(0.5), "rgb(128, 0, 128)"); @@ -157,12 +157,12 @@ test("pow.range(range) can accept range values as colors", () => { assert.strictEqual(scalePow().range(["hsl(0,100%,50%)", "hsl(240,100%,50%)"])(0.5), "rgb(128, 0, 128)"); }); -test("pow.range(range) can accept range values as arrays or objects", () => { +it("pow.range(range) can accept range values as arrays or objects", () => { assert.deepStrictEqual(scalePow().range([{color: "red"}, {color: "blue"}])(0.5), {color: "rgb(128, 0, 128)"}); assert.deepStrictEqual(scalePow().range([["red"], ["blue"]])(0.5), ["rgb(128, 0, 128)"]); }); -test("pow.range(range) makes a copy of range values", () => { +it("pow.range(range) makes a copy of range values", () => { const r = [1, 2], s = scalePow().range(r); assert.deepStrictEqual(s.range(), [1, 2]); r.push(3); @@ -170,18 +170,18 @@ test("pow.range(range) makes a copy of range values", () => { assert.deepStrictEqual(r, [1, 2, 3]); }); -test("pow.range() returns a copy of range values", () => { +it("pow.range() returns a copy of range values", () => { const s = scalePow(), r = s.range(); assert.deepStrictEqual(r, [0, 1]); r.push(3); assert.deepStrictEqual(s.range(), [0, 1]); }); -test("pow.rangeRound(range) is an alias for pow.range(range).interpolate(interpolateRound)", () => { +it("pow.rangeRound(range) is an alias for pow.range(range).interpolate(interpolateRound)", () => { assert.strictEqual(scalePow().rangeRound([0, 10])(0.59), 6); }); -test("pow.clamp() is false by default", () => { +it("pow.clamp() is false by default", () => { assert.strictEqual(scalePow().clamp(), false); assert.strictEqual(scalePow().range([10, 20])(2), 30); assert.strictEqual(scalePow().range([10, 20])(-1), 0); @@ -189,36 +189,36 @@ test("pow.clamp() is false by default", () => { assert.strictEqual(scalePow().range([10, 20]).invert(0), -1); }); -test("pow.clamp(true) restricts output values to the range", () => { +it("pow.clamp(true) restricts output values to the range", () => { assert.strictEqual(scalePow().clamp(true).range([10, 20])(2), 20); assert.strictEqual(scalePow().clamp(true).range([10, 20])(-1), 10); }); -test("pow.clamp(true) restricts input values to the domain", () => { +it("pow.clamp(true) restricts input values to the domain", () => { assert.strictEqual(scalePow().clamp(true).range([10, 20]).invert(30), 1); assert.strictEqual(scalePow().clamp(true).range([10, 20]).invert(0), 0); }); -test("pow.clamp(clamp) coerces the specified clamp value to a boolean", () => { +it("pow.clamp(clamp) coerces the specified clamp value to a boolean", () => { assert.strictEqual(scalePow().clamp("true").clamp(), true); assert.strictEqual(scalePow().clamp(1).clamp(), true); assert.strictEqual(scalePow().clamp("").clamp(), false); assert.strictEqual(scalePow().clamp(0).clamp(), false); }); -test("pow.interpolate(interpolate) takes a custom interpolator factory", () => { +it("pow.interpolate(interpolate) takes a custom interpolator factory", () => { function interpolate(a, b) { return function(t) { return [a, b, t]; }; } const s = scalePow().domain([10, 20]).range(["a", "b"]).interpolate(interpolate); assert.strictEqual(s.interpolate(), interpolate); assert.deepStrictEqual(s(15), ["a", "b", 0.5]); }); -test("pow.nice() is an alias for pow.nice(10)", () => { +it("pow.nice() is an alias for pow.nice(10)", () => { assert.deepStrictEqual(scalePow().domain([0, 0.96]).nice().domain(), [0, 1]); assert.deepStrictEqual(scalePow().domain([0, 96]).nice().domain(), [0, 100]); }); -test("pow.nice(count) extends the domain to match the desired ticks", () => { +it("pow.nice(count) extends the domain to match the desired ticks", () => { assert.deepStrictEqual(scalePow().domain([0, 0.96]).nice(10).domain(), [0, 1]); assert.deepStrictEqual(scalePow().domain([0, 96]).nice(10).domain(), [0, 100]); assert.deepStrictEqual(scalePow().domain([0.96, 0]).nice(10).domain(), [1, 0]); @@ -229,7 +229,7 @@ test("pow.nice(count) extends the domain to match the desired ticks", () => { assert.deepStrictEqual(scalePow().domain([-96, 0]).nice(10).domain(), [-100, 0]); }); -test("pow.nice(count) nices the domain, extending it to round numbers", () => { +it("pow.nice(count) nices the domain, extending it to round numbers", () => { assert.deepStrictEqual(scalePow().domain([1.1, 10.9]).nice(10).domain(), [1, 11]); assert.deepStrictEqual(scalePow().domain([10.9, 1.1]).nice(10).domain(), [11, 1]); assert.deepStrictEqual(scalePow().domain([0.7, 11.001]).nice(10).domain(), [0, 12]); @@ -237,23 +237,23 @@ test("pow.nice(count) nices the domain, extending it to round numbers", () => { assert.deepStrictEqual(scalePow().domain([0, 0.49]).nice(10).domain(), [0, 0.5]); }); -test("pow.nice(count) has no effect on degenerate domains", () => { +it("pow.nice(count) has no effect on degenerate domains", () => { assert.deepStrictEqual(scalePow().domain([0, 0]).nice(10).domain(), [0, 0]); assert.deepStrictEqual(scalePow().domain([0.5, 0.5]).nice(10).domain(), [0.5, 0.5]); }); -test("pow.nice(count) nicing a polypow domain only affects the extent", () => { +it("pow.nice(count) nicing a polypow domain only affects the extent", () => { assert.deepStrictEqual(scalePow().domain([1.1, 1, 2, 3, 10.9]).nice(10).domain(), [1, 1, 2, 3, 11]); assert.deepStrictEqual(scalePow().domain([123.1, 1, 2, 3, -0.9]).nice(10).domain(), [130, 1, 2, 3, -10]); }); -test("pow.nice(count) accepts a tick count to control nicing step", () => { +it("pow.nice(count) accepts a tick count to control nicing step", () => { assert.deepStrictEqual(scalePow().domain([12, 87]).nice(5).domain(), [0, 100]); assert.deepStrictEqual(scalePow().domain([12, 87]).nice(10).domain(), [10, 90]); assert.deepStrictEqual(scalePow().domain([12, 87]).nice(100).domain(), [12, 87]); }); -test("pow.ticks(count) returns the expected ticks for an ascending domain", () => { +it("pow.ticks(count) returns the expected ticks for an ascending domain", () => { const s = scalePow(); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); @@ -278,7 +278,7 @@ test("pow.ticks(count) returns the expected ticks for an ascending domain", () = assert.deepStrictEqual(s.ticks(1), [ 0 ]); }); -test("pow.ticks(count) returns the expected ticks for a descending domain", () => { +it("pow.ticks(count) returns the expected ticks for a descending domain", () => { const s = scalePow().domain([1, 0]); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0].reverse()); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0].reverse()); @@ -303,7 +303,7 @@ test("pow.ticks(count) returns the expected ticks for a descending domain", () = assert.deepStrictEqual(s.ticks(1), [ 0 ].reverse()); }); -test("pow.ticks(count) returns the expected ticks for a polypow domain", () => { +it("pow.ticks(count) returns the expected ticks for a polypow domain", () => { const s = scalePow().domain([0, 0.25, 0.9, 1]); assert.deepStrictEqual(s.ticks(10).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(s.ticks(9).map(roundEpsilon), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); @@ -328,7 +328,7 @@ test("pow.ticks(count) returns the expected ticks for a polypow domain", () => { assert.deepStrictEqual(s.ticks(1), [ 0 ]); }); -test("pow.ticks(count) returns the empty array if count is not a positive integer", () => { +it("pow.ticks(count) returns the empty array if count is not a positive integer", () => { const s = scalePow(); assert.deepStrictEqual(s.ticks(NaN), []); assert.deepStrictEqual(s.ticks(0), []); @@ -336,30 +336,30 @@ test("pow.ticks(count) returns the empty array if count is not a positive intege assert.deepStrictEqual(s.ticks(Infinity), []); }); -test("pow.ticks() is an alias for pow.ticks(10)", () => { +it("pow.ticks() is an alias for pow.ticks(10)", () => { const s = scalePow(); assert.deepStrictEqual(s.ticks(), s.ticks(10)); }); -test("pow.tickFormat() is an alias for pow.tickFormat(10)", () => { +it("pow.tickFormat() is an alias for pow.tickFormat(10)", () => { assert.strictEqual(scalePow().tickFormat()(0.2), "0.2"); assert.strictEqual(scalePow().domain([-100, 100]).tickFormat()(-20), "−20"); }); -test("pow.tickFormat(count) returns a format suitable for the ticks", () => { +it("pow.tickFormat(count) returns a format suitable for the ticks", () => { assert.strictEqual(scalePow().tickFormat(10)(0.2), "0.2"); assert.strictEqual(scalePow().tickFormat(20)(0.2), "0.20"); assert.strictEqual(scalePow().domain([-100, 100]).tickFormat(10)(-20), "−20"); }); -test("pow.tickFormat(count, specifier) sets the appropriate fixed precision if not specified", () => { +it("pow.tickFormat(count, specifier) sets the appropriate fixed precision if not specified", () => { assert.strictEqual(scalePow().tickFormat(10, "+f")(0.2), "+0.2"); assert.strictEqual(scalePow().tickFormat(20, "+f")(0.2), "+0.20"); assert.strictEqual(scalePow().tickFormat(10, "+%")(0.2), "+20%"); assert.strictEqual(scalePow().domain([0.19, 0.21]).tickFormat(10, "+%")(0.2), "+20.0%"); }); -test("pow.tickFormat(count, specifier) sets the appropriate round precision if not specified", () => { +it("pow.tickFormat(count, specifier) sets the appropriate round precision if not specified", () => { assert.strictEqual(scalePow().domain([0, 9]).tickFormat(10, "")(2.10), "2"); assert.strictEqual(scalePow().domain([0, 9]).tickFormat(100, "")(2.01), "2"); assert.strictEqual(scalePow().domain([0, 9]).tickFormat(100, "")(2.11), "2.1"); @@ -376,12 +376,12 @@ test("pow.tickFormat(count, specifier) sets the appropriate round precision if n assert.strictEqual(scalePow().domain([0.19, 0.21]).tickFormat(10, "p")(0.201), "20.1%"); }); -test("pow.tickFormat(count, specifier) sets the appropriate prefix precision if not specified", () => { +it("pow.tickFormat(count, specifier) sets the appropriate prefix precision if not specified", () => { assert.strictEqual(scalePow().domain([0, 1e6]).tickFormat(10, "$s")(0.51e6), "$0.5M"); assert.strictEqual(scalePow().domain([0, 1e6]).tickFormat(100, "$s")(0.501e6), "$0.50M"); }); -test("pow.copy() returns a copy with changes to the domain are isolated", () => { +it("pow.copy() returns a copy with changes to the domain are isolated", () => { const x = scalePow(), y = x.copy(); x.domain([1, 2]); assert.deepStrictEqual(y.domain(), [0, 1]); @@ -398,7 +398,7 @@ test("pow.copy() returns a copy with changes to the domain are isolated", () => assert.deepStrictEqual(y2.domain(), [1, 1.9]); }); -test("pow.copy() returns a copy with changes to the range are isolated", () => { +it("pow.copy() returns a copy with changes to the range are isolated", () => { const x = scalePow(), y = x.copy(); x.range([1, 2]); assert.strictEqual(x.invert(1), 0); @@ -411,7 +411,7 @@ test("pow.copy() returns a copy with changes to the range are isolated", () => { assert.deepStrictEqual(y.range(), [2, 3]); }); -test("pow.copy() returns a copy with changes to the interpolator are isolated", () => { +it("pow.copy() returns a copy with changes to the interpolator are isolated", () => { const x = scalePow().range(["red", "blue"]), y = x.copy(), i0 = x.interpolate(), @@ -422,7 +422,7 @@ test("pow.copy() returns a copy with changes to the interpolator are isolated", assert.strictEqual(y(0.5), "rgb(128, 0, 128)"); }); -test("pow.copy() returns a copy with changes to clamping are isolated", () => { +it("pow.copy() returns a copy with changes to clamping are isolated", () => { const x = scalePow().clamp(true), y = x.copy(); x.clamp(false); assert.strictEqual(x(2), 2); @@ -434,13 +434,13 @@ test("pow.copy() returns a copy with changes to clamping are isolated", () => { assert.strictEqual(x.clamp(), false); }); -test("pow().clamp(true).invert(x) cannot return a value outside the domain", () => { +it("pow().clamp(true).invert(x) cannot return a value outside the domain", () => { const x = scalePow().exponent(0.5).domain([1, 20]).clamp(true); assert.strictEqual(x.invert(0), 1); assert.strictEqual(x.invert(1), 20); }); -test("scaleSqrt() is an alias for pow().exponent(0.5)", () => { +it("scaleSqrt() is an alias for pow().exponent(0.5)", () => { const s = scaleSqrt(); assert.strictEqual(s.exponent(), 0.5); assertInDelta(s(0.5), Math.SQRT1_2, 1e-6); diff --git a/test/quantile-test.js b/test/quantile-test.js index 3a7842a..ad137e8 100644 --- a/test/quantile-test.js +++ b/test/quantile-test.js @@ -1,15 +1,15 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleQuantile} from "../src/index.js"; -test("scaleQuantile() has the expected default", () => { +it("scaleQuantile() has the expected default", () => { const s = scaleQuantile(); assert.deepStrictEqual(s.domain(), []); assert.deepStrictEqual(s.range(), []); assert.strictEqual(s.unknown(), undefined); }); -test("quantile(x) uses the R-7 algorithm to compute quantiles", () => { +it("quantile(x) uses the R-7 algorithm to compute quantiles", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]); assert.deepStrictEqual([3, 6, 6.9, 7, 7.1].map(s), [0, 0, 0, 0, 0]); assert.deepStrictEqual([8, 8.9].map(s), [1, 1]); @@ -22,44 +22,44 @@ test("quantile(x) uses the R-7 algorithm to compute quantiles", () => { assert.deepStrictEqual([14.9, 15, 15.1, 16, 20].map(s), [3, 3, 3, 3, 3]); }); -test("quantile(x) returns undefined if the input value is NaN", () => { +it("quantile(x) returns undefined if the input value is NaN", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]); assert.strictEqual(s(NaN), undefined); }); -test("quantile.domain() values are sorted in ascending order", () => { +it("quantile.domain() values are sorted in ascending order", () => { const s = scaleQuantile().domain([6, 3, 7, 8, 8, 13, 20, 15, 16, 10]); assert.deepStrictEqual(s.domain(), [3, 6, 7, 8, 8, 10, 13, 15, 16, 20]); }); -test("quantile.domain() values are coerced to numbers", () => { +it("quantile.domain() values are coerced to numbers", () => { const s = scaleQuantile().domain(["6", "13", "20"]); assert.deepStrictEqual(s.domain(), [6, 13, 20]); }); -test("quantile.domain() accepts an iterable", () => { +it("quantile.domain() accepts an iterable", () => { const s = scaleQuantile().domain(new Set([6, 13, 20])); assert.deepStrictEqual(s.domain(), [6, 13, 20]); }); -test("quantile.domain() values are allowed to be zero", () => { +it("quantile.domain() values are allowed to be zero", () => { const s = scaleQuantile().domain([1, 2, 0, 0, null]); assert.deepStrictEqual(s.domain(), [0, 0, 1, 2]); }); -test("quantile.domain() non-numeric values are ignored", () => { +it("quantile.domain() non-numeric values are ignored", () => { const s = scaleQuantile().domain([6, 3, NaN, undefined, 7, 8, 8, 13, null, 20, 15, 16, 10, NaN]); assert.deepStrictEqual(s.domain(), [3, 6, 7, 8, 8, 10, 13, 15, 16, 20]); }); -test("quantile.quantiles() returns the inner thresholds", () => { +it("quantile.quantiles() returns the inner thresholds", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]); assert.deepStrictEqual(s.quantiles(), [7.25, 9, 14.5]); s.domain([3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]); assert.deepStrictEqual(s.quantiles(), [7.5, 9, 14]); }); -test("quantile.range() cardinality determines the number of quantiles", () => { +it("quantile.range() cardinality determines the number of quantiles", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]); assert.deepStrictEqual(s.range([0, 1, 2, 3]).quantiles(), [7.25, 9, 14.5]); assert.deepStrictEqual(s.range([0, 1]).quantiles(), [9]); @@ -67,12 +67,12 @@ test("quantile.range() cardinality determines the number of quantiles", () => { assert.deepStrictEqual(s.range([,,,,,,]).quantiles(), [6.5, 8, 9, 13, 15.5]); }); -test("quantile.range() accepts an iterable", () => { +it("quantile.range() accepts an iterable", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range(new Set([0, 1, 2, 3])); assert.deepStrictEqual(s.range(), [0, 1, 2, 3]); }); -test("quantile.range() values are arbitrary", () => { +it("quantile.range() values are arbitrary", () => { const a = {}; const b = {}; const c = {}; @@ -83,7 +83,7 @@ test("quantile.range() values are arbitrary", () => { assert.deepStrictEqual([14.9, 15, 15.1, 16, 20].map(s), [a, a, a, a, a]); }); -test("quantile.invertExtent() maps a value in the range to a domain extent", () => { +it("quantile.invertExtent() maps a value in the range to a domain extent", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]); assert.deepStrictEqual(s.invertExtent(0), [3, 7.25]); assert.deepStrictEqual(s.invertExtent(1), [7.25, 9]); @@ -91,7 +91,7 @@ test("quantile.invertExtent() maps a value in the range to a domain extent", () assert.deepStrictEqual(s.invertExtent(3), [14.5, 20]); }); -test("quantile.invertExtent() allows arbitrary range values", () => { +it("quantile.invertExtent() allows arbitrary range values", () => { const a = {}; const b = {}; const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([a, b]); @@ -99,7 +99,7 @@ test("quantile.invertExtent() allows arbitrary range values", () => { assert.deepStrictEqual(s.invertExtent(b), [9, 20]); }); -test("quantile.invertExtent() returns [NaN, NaN] when the given value is not in the range", () => { +it("quantile.invertExtent() returns [NaN, NaN] when the given value is not in the range", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]); assert(s.invertExtent(-1).every(isNaN)); assert(s.invertExtent(0.5).every(isNaN)); @@ -107,14 +107,14 @@ test("quantile.invertExtent() returns [NaN, NaN] when the given value is not in assert(s.invertExtent('a').every(isNaN)); }); -test("quantile.invertExtent() returns the first match if duplicate values exist in the range", () => { +it("quantile.invertExtent() returns the first match if duplicate values exist in the range", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 0]); assert.deepStrictEqual(s.invertExtent(0), [3, 7.25]); assert.deepStrictEqual(s.invertExtent(1), [7.25, 9]); assert.deepStrictEqual(s.invertExtent(2), [9, 14.5]); }); -test("quantile.unknown(value) sets the return value for undefined, null, and NaN input", () => { +it("quantile.unknown(value) sets the return value for undefined, null, and NaN input", () => { const s = scaleQuantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]).range([0, 1, 2, 3]).unknown(-1); assert.strictEqual(s(undefined), -1); assert.strictEqual(s(null), -1); diff --git a/test/quantize-test.js b/test/quantize-test.js index b3930bd..23b866c 100644 --- a/test/quantize-test.js +++ b/test/quantize-test.js @@ -1,10 +1,10 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {range} from "d3-array"; import {scaleQuantize} from "../src/index.js"; import {assertInDelta} from "./asserts.js"; -test("scaleQuantize() has the expected defaults", () => { +it("scaleQuantize() has the expected defaults", () => { const s = scaleQuantize(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -13,7 +13,7 @@ test("scaleQuantize() has the expected defaults", () => { assert.strictEqual(s(0.75), 1); }); -test("quantize(value) maps a number to a discrete value in the range", () => { +it("quantize(value) maps a number to a discrete value in the range", () => { const s = scaleQuantize().range([0, 1, 2]); assert.deepStrictEqual(s.thresholds(), [1 / 3, 2 / 3]); assert.strictEqual(s(0.0), 0); @@ -24,7 +24,7 @@ test("quantize(value) maps a number to a discrete value in the range", () => { assert.strictEqual(s(1.0), 2); }); -test("quantize(value) clamps input values to the domain", () => { +it("quantize(value) clamps input values to the domain", () => { const a = {}; const b = {}; const c = {}; @@ -33,14 +33,14 @@ test("quantize(value) clamps input values to the domain", () => { assert.strictEqual(s(+1.5), c); }); -test("quantize.unknown(value) sets the return value for undefined, null, and NaN input", () => { +it("quantize.unknown(value) sets the return value for undefined, null, and NaN input", () => { const s = scaleQuantize().range([0, 1, 2]).unknown(-1); assert.strictEqual(s(undefined), -1); assert.strictEqual(s(null), -1); assert.strictEqual(s(NaN), -1); }); -test("quantize.domain() coerces domain values to numbers", () => { +it("quantize.domain() coerces domain values to numbers", () => { const s = scaleQuantize().domain(["-1.20", "2.40"]); assert.deepStrictEqual(s.domain(), [-1.2, 2.4]); assert.strictEqual(s(-1.2), 0); @@ -49,17 +49,17 @@ test("quantize.domain() coerces domain values to numbers", () => { assert.strictEqual(s( 2.4), 1); }); -test("quantize.domain() accepts an iterable", () => { +it("quantize.domain() accepts an iterable", () => { const s = scaleQuantize().domain(new Set([1, 2])); assert.deepStrictEqual(s.domain(), [1, 2]); }); -test("quantize.domain() only considers the first and second element of the domain", () => { +it("quantize.domain() only considers the first and second element of the domain", () => { const s = scaleQuantize().domain([-1, 100, 200]); assert.deepStrictEqual(s.domain(), [-1, 100]); }); -test("quantize.range() cardinality determines the degree of quantization", () => { +it("quantize.range() cardinality determines the degree of quantization", () => { const s = scaleQuantize(); assertInDelta(s.range(range(0, 1.001, 0.001))(1/3), 0.333, 1e-6); assertInDelta(s.range(range(0, 1.010, 0.010))(1/3), 0.330, 1e-6); @@ -70,7 +70,7 @@ test("quantize.range() cardinality determines the degree of quantization", () => assertInDelta(s.range(range(1))(1/3), 0, 1e-6); }); -test("quantize.range() values are arbitrary", () => { +it("quantize.range() values are arbitrary", () => { const a = {}; const b = {}; const c = {}; @@ -83,7 +83,7 @@ test("quantize.range() values are arbitrary", () => { assert.strictEqual(s(1.0), c); }); -test("quantize.invertExtent() maps a value in the range to a domain extent", () => { +it("quantize.invertExtent() maps a value in the range to a domain extent", () => { const s = scaleQuantize().range([0, 1, 2, 3]); assert.deepStrictEqual(s.invertExtent(0), [0.00, 0.25]); assert.deepStrictEqual(s.invertExtent(1), [0.25, 0.50]); @@ -91,7 +91,7 @@ test("quantize.invertExtent() maps a value in the range to a domain extent", () assert.deepStrictEqual(s.invertExtent(3), [0.75, 1.00]); }); -test("quantize.invertExtent() allows arbitrary range values", () => { +it("quantize.invertExtent() allows arbitrary range values", () => { const a = {}; const b = {}; const s = scaleQuantize().range([a, b]); @@ -99,7 +99,7 @@ test("quantize.invertExtent() allows arbitrary range values", () => { assert.deepStrictEqual(s.invertExtent(b), [0.5, 1.0]); }); -test("quantize.invertExtent() returns [NaN, NaN] when the given value is not in the range", () => { +it("quantize.invertExtent() returns [NaN, NaN] when the given value is not in the range", () => { const s = scaleQuantize(); assert(s.invertExtent(-1).every(Number.isNaN)); assert(s.invertExtent(0.5).every(Number.isNaN)); @@ -107,13 +107,13 @@ test("quantize.invertExtent() returns [NaN, NaN] when the given value is not in assert(s.invertExtent("a").every(Number.isNaN)); }); -test("quantize.invertExtent() returns the first match if duplicate values exist in the range", () => { +it("quantize.invertExtent() returns the first match if duplicate values exist in the range", () => { const s = scaleQuantize().range([0, 1, 2, 0]); assert.deepStrictEqual(s.invertExtent(0), [0.00, 0.25]); assert.deepStrictEqual(s.invertExtent(1), [0.25, 0.50]); }); -test("quantize.invertExtent(y) is exactly consistent with quantize(x)", () => { +it("quantize.invertExtent(y) is exactly consistent with quantize(x)", () => { const s = scaleQuantize().domain([4.2, 6.2]).range(range(10)); s.range().forEach(function(y) { const e = s.invertExtent(y); diff --git a/test/radial-test.js b/test/radial-test.js index 472072e..ce5d2f2 100644 --- a/test/radial-test.js +++ b/test/radial-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleRadial} from "../src/index.js"; -test("scaleRadial() has the expected defaults", () => { +it("scaleRadial() has the expected defaults", () => { const s = scaleRadial(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -10,40 +10,40 @@ test("scaleRadial() has the expected defaults", () => { assert.strictEqual(s.round(), false); }); -test("scaleRadial(range) sets the range", () => { +it("scaleRadial(range) sets the range", () => { const s = scaleRadial([100, 200]); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [100, 200]); assert.strictEqual(s(0.5), 158.11388300841898); }); -test("scaleRadial(domain, range) sets the range", () => { +it("scaleRadial(domain, range) sets the range", () => { const s = scaleRadial([1, 2], [10, 20]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.deepStrictEqual(s.range(), [10, 20]); assert.strictEqual(s(1.5), 15.811388300841896); }); -test("radial(x) maps a domain value x to a range value y", () => { +it("radial(x) maps a domain value x to a range value y", () => { assert.strictEqual(scaleRadial([1, 2])(0.5), 1.5811388300841898); }); -test("radial(x) ignores extra range values if the domain is smaller than the range", () => { +it("radial(x) ignores extra range values if the domain is smaller than the range", () => { assert.strictEqual(scaleRadial().domain([-10, 0]).range([2, 3, 4]).clamp(true)(-5), 2.5495097567963922); assert.strictEqual(scaleRadial().domain([-10, 0]).range([2, 3, 4]).clamp(true)(50), 3); }); -test("radial(x) ignores extra domain values if the range is smaller than the domain", () => { +it("radial(x) ignores extra domain values if the range is smaller than the domain", () => { assert.strictEqual(scaleRadial().domain([-10, 0, 100]).range([2, 3]).clamp(true)(-5), 2.5495097567963922); assert.strictEqual(scaleRadial().domain([-10, 0, 100]).range([2, 3]).clamp(true)(50), 3); }); -test("radial(x) maps an empty domain to the middle of the range", () => { +it("radial(x) maps an empty domain to the middle of the range", () => { assert.strictEqual(scaleRadial().domain([0, 0]).range([1, 2])(0), 1.5811388300841898); assert.strictEqual(scaleRadial().domain([0, 0]).range([2, 1])(1), 1.5811388300841898); }); -test("radial(x) can map a bilinear domain with two values to the corresponding range", () => { +it("radial(x) can map a bilinear domain with two values to the corresponding range", () => { const s = scaleRadial().domain([1, 2]); assert.deepStrictEqual(s.domain(), [1, 2]); assert.strictEqual(s(0.5), -0.7071067811865476); @@ -58,7 +58,7 @@ test("radial(x) can map a bilinear domain with two values to the corresponding r assert.strictEqual(s.invert( 1.5), 3.25); }); -test("radial(NaN) returns undefined", () => { +it("radial(NaN) returns undefined", () => { const s = scaleRadial(); assert.strictEqual(s(NaN), undefined); assert.strictEqual(s(undefined), undefined); @@ -66,15 +66,15 @@ test("radial(NaN) returns undefined", () => { assert.strictEqual(s({}), undefined); }); -test("radial.unknown(unknown)(NaN) returns the specified unknown value", () => { +it("radial.unknown(unknown)(NaN) returns the specified unknown value", () => { assert.strictEqual(scaleRadial().unknown("foo")(NaN), "foo"); }); -test("radial(x) can handle a negative range", () => { +it("radial(x) can handle a negative range", () => { assert.strictEqual(scaleRadial([-1, -2])(0.5), -1.5811388300841898); }); -test("radial(x) can clamp negative values", () => { +it("radial(x) can clamp negative values", () => { assert.strictEqual(scaleRadial([-1, -2]).clamp(true)(-0.5), -1); assert.strictEqual(scaleRadial().clamp(true)(-0.5), 0); assert.strictEqual(scaleRadial([-0.25, 0], [1, 2]).clamp(true)(-0.5), 1); diff --git a/test/sequential-test.js b/test/sequential-test.js index 058129e..aba3f8c 100644 --- a/test/sequential-test.js +++ b/test/sequential-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleSequential} from "../src/index.js"; -test("scaleSequential() has the expected defaults", () => { +it("scaleSequential() has the expected defaults", () => { const s = scaleSequential(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.strictEqual(s.interpolator()(0.42), 0.42); @@ -15,7 +15,7 @@ test("scaleSequential() has the expected defaults", () => { assert.strictEqual(s( 1.5), 1.5); }); -test("sequential.clamp(true) enables clamping", () => { +it("sequential.clamp(true) enables clamping", () => { const s = scaleSequential().clamp(true); assert.strictEqual(s.clamp(), true); assert.strictEqual(s(-0.5), 0.0); @@ -25,7 +25,7 @@ test("sequential.clamp(true) enables clamping", () => { assert.strictEqual(s( 1.5), 1.0); }); -test("sequential.unknown(value) sets the return value for undefined and NaN input", () => { +it("sequential.unknown(value) sets the return value for undefined and NaN input", () => { const s = scaleSequential().unknown(-1); assert.strictEqual(s.unknown(), -1); assert.strictEqual(s(undefined), -1); @@ -34,7 +34,7 @@ test("sequential.unknown(value) sets the return value for undefined and NaN inpu assert.strictEqual(s(0.4), 0.4); }); -test("sequential.domain() coerces domain values to numbers", () => { +it("sequential.domain() coerces domain values to numbers", () => { const s = scaleSequential().domain(["-1.20", "2.40"]); assert.deepStrictEqual(s.domain(), [-1.2, 2.4]); assert.strictEqual(s(-1.2), 0.0); @@ -42,12 +42,12 @@ test("sequential.domain() coerces domain values to numbers", () => { assert.strictEqual(s( 2.4), 1.0); }); -test("sequential.domain() accepts an iterable", () => { +it("sequential.domain() accepts an iterable", () => { const s = scaleSequential().domain(new Set(["-1.20", "2.40"])); assert.deepStrictEqual(s.domain(), [-1.2, 2.4]); }); -test("sequential.domain() handles a degenerate domain", () => { +it("sequential.domain() handles a degenerate domain", () => { const s = scaleSequential().domain([2, 2]); assert.deepStrictEqual(s.domain(), [2, 2]); assert.strictEqual(s(-1.2), 0.5); @@ -55,7 +55,7 @@ test("sequential.domain() handles a degenerate domain", () => { assert.strictEqual(s( 2.4), 0.5); }); -test("sequential.domain() handles a non-numeric domain", () => { +it("sequential.domain() handles a non-numeric domain", () => { const s = scaleSequential().domain([NaN, 2]); assert.strictEqual(isNaN(s.domain()[0]), true); assert.strictEqual(s.domain()[1], 2); @@ -64,12 +64,12 @@ test("sequential.domain() handles a non-numeric domain", () => { assert.strictEqual(isNaN(s( 2.4)), true); }); -test("sequential.domain() only considers the first and second element of the domain", () => { +it("sequential.domain() only considers the first and second element of the domain", () => { const s = scaleSequential().domain([-1, 100, 200]); assert.deepStrictEqual(s.domain(), [-1, 100]); }); -test("sequential.copy() returns an isolated copy of the scale", () => { +it("sequential.copy() returns an isolated copy of the scale", () => { const s1 = scaleSequential().domain([1, 3]).clamp(true); const s2 = s1.copy(); assert.deepStrictEqual(s2.domain(), [1, 3]); @@ -84,7 +84,7 @@ test("sequential.copy() returns an isolated copy of the scale", () => { assert.deepStrictEqual(s1.clamp(), false); }); -test("sequential.interpolator(interpolator) sets the interpolator", () => { +it("sequential.interpolator(interpolator) sets the interpolator", () => { const i0 = function(t) { return t; }; const i1 = function(t) { return t * 2; }; const s = scaleSequential(i0); @@ -96,24 +96,24 @@ test("sequential.interpolator(interpolator) sets the interpolator", () => { assert.strictEqual(s( 0.5), 1.0); }); -test("sequential.range() returns the computed range", () => { +it("sequential.range() returns the computed range", () => { const s = scaleSequential(function(t) { return t * 2 + 1; }); assert.deepStrictEqual(s.range(), [1, 3]); }); -test("sequential.range(range) sets the interpolator", () => { +it("sequential.range(range) sets the interpolator", () => { const s = scaleSequential().range([1, 3]); assert.strictEqual(s.interpolator()(0.5), 2); assert.deepStrictEqual(s.range(), [1, 3]); }); -test("sequential.range(range) ignores additional values", () => { +it("sequential.range(range) ignores additional values", () => { const s = scaleSequential().range([1, 3, 10]); assert.strictEqual(s.interpolator()(0.5), 2); assert.deepStrictEqual(s.range(), [1, 3]); }); -test("scaleSequential(range) sets the interpolator", () => { +it("scaleSequential(range) sets the interpolator", () => { const s = scaleSequential([1, 3]); assert.strictEqual(s.interpolator()(0.5), 2); assert.deepStrictEqual(s.range(), [1, 3]); diff --git a/test/sequentialQuantile-test.js b/test/sequentialQuantile-test.js index 3b39adf..1f5b80e 100644 --- a/test/sequentialQuantile-test.js +++ b/test/sequentialQuantile-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleSequentialQuantile} from "../src/index.js"; -test("sequentialQuantile() clamps", () => { +it("sequentialQuantile() clamps", () => { const s = scaleSequentialQuantile().domain([0, 1, 2, 3, 10]); assert.strictEqual(s(-1), 0); assert.strictEqual(s(0), 0); @@ -11,17 +11,17 @@ test("sequentialQuantile() clamps", () => { assert.strictEqual(s(20), 1); }); -test("sequentialQuantile().domain() sorts the domain", () => { +it("sequentialQuantile().domain() sorts the domain", () => { const s = scaleSequentialQuantile().domain([0, 2, 9, 0.1, 10]); assert.deepStrictEqual(s.domain(), [0, 0.1, 2, 9, 10]); }); -test("sequentialQuantile().range() returns the computed range", () => { +it("sequentialQuantile().range() returns the computed range", () => { const s = scaleSequentialQuantile().domain([0, 2, 9, 0.1, 10]); assert.deepStrictEqual(s.range(), [0 / 4, 1 / 4, 2 / 4, 3 / 4, 4 / 4]); }); -test("sequentialQuantile().quantiles(n) computes n + 1 quantiles", () => { +it("sequentialQuantile().quantiles(n) computes n + 1 quantiles", () => { const s = scaleSequentialQuantile().domain(Array.from({length: 2000}, (_, i) => 2 * i / 1999)); assert.deepStrictEqual(s.quantiles(4), [0, 0.5, 1, 1.5, 2]); }); diff --git a/test/sqrt-test.js b/test/sqrt-test.js index 15422a9..52a3180 100644 --- a/test/sqrt-test.js +++ b/test/sqrt-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleSqrt} from "../src/index.js"; -test("scaleSqrt() has the expected defaults", () => { +it("scaleSqrt() has the expected defaults", () => { const s = scaleSqrt(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -11,6 +11,6 @@ test("scaleSqrt() has the expected defaults", () => { assert.deepStrictEqual(s.interpolate()({array: ["red"]}, {array: ["blue"]})(0.5), {array: ["rgb(128, 0, 128)"]}); }); -test("sqrt(x) maps a domain value x to a range value y", () => { +it("sqrt(x) maps a domain value x to a range value y", () => { assert.strictEqual(scaleSqrt()(0.5), Math.SQRT1_2); }); diff --git a/test/symlog-test.js b/test/symlog-test.js index efa6767..eed8006 100644 --- a/test/symlog-test.js +++ b/test/symlog-test.js @@ -1,9 +1,9 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleSymlog} from "../src/index.js"; import {assertInDelta} from "./asserts.js"; -test("scaleSymlog() has the expected defaults", () => { +it("scaleSymlog() has the expected defaults", () => { const s = scaleSymlog(); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); @@ -11,52 +11,52 @@ test("scaleSymlog() has the expected defaults", () => { assert.strictEqual(s.constant(), 1); }); -test("symlog(x) maps a domain value x to a range value y", () => { +it("symlog(x) maps a domain value x to a range value y", () => { const s = scaleSymlog().domain([-100, 100]); assert.strictEqual(s(-100), 0); assert.strictEqual(s(100), 1); assert.strictEqual(s(0), 0.5); }); -test("symlog.invert(y) maps a range value y to a domain value x", () => { +it("symlog.invert(y) maps a range value y to a domain value x", () => { const s = scaleSymlog().domain([-100, 100]); assertInDelta(s.invert(1), 100); }); -test("symlog.invert(y) coerces range values to numbers", () => { +it("symlog.invert(y) coerces range values to numbers", () => { const s = scaleSymlog().range(["-3", "3"]); assert.deepStrictEqual(s.invert(3), 1); }); -test("symlog.invert(y) returns NaN if the range is not coercible to number", () => { +it("symlog.invert(y) returns NaN if the range is not coercible to number", () => { assert(isNaN(scaleSymlog().range(["#000", "#fff"]).invert("#999"))); assert(isNaN(scaleSymlog().range([0, "#fff"]).invert("#999"))); }); -test("symlog.constant(constant) sets the constant to the specified value", () => { +it("symlog.constant(constant) sets the constant to the specified value", () => { const s = scaleSymlog().constant(5); assert.strictEqual(s.constant(), 5); }); -test("symlog.constant(constant) changing the constant does not change the domain or range", () => { +it("symlog.constant(constant) changing the constant does not change the domain or range", () => { const s = scaleSymlog().constant(2); assert.deepStrictEqual(s.domain(), [0, 1]); assert.deepStrictEqual(s.range(), [0, 1]); }); -test("symlog.domain(domain) accepts an array of numbers", () => { +it("symlog.domain(domain) accepts an array of numbers", () => { assert.deepStrictEqual(scaleSymlog().domain([]).domain(), []); assert.deepStrictEqual(scaleSymlog().domain([1, 0]).domain(), [1, 0]); assert.deepStrictEqual(scaleSymlog().domain([1, 2, 3]).domain(), [1, 2, 3]); }); -test("symlog.domain(domain) coerces domain values to numbers", () => { +it("symlog.domain(domain) coerces domain values to numbers", () => { assert.deepStrictEqual(scaleSymlog().domain([new Date(Date.UTC(1990, 0, 1)), new Date(Date.UTC(1991, 0, 1))]).domain(), [631152000000, 662688000000]); assert.deepStrictEqual(scaleSymlog().domain(["0.0", "1.0"]).domain(), [0, 1]); assert.deepStrictEqual(scaleSymlog().domain([new Number(0), new Number(1)]).domain(), [0, 1]); }); -test("symlog.domain(domain) makes a copy of domain values", () => { +it("symlog.domain(domain) makes a copy of domain values", () => { const d = [1, 2], s = scaleSymlog().domain(d); assert.deepStrictEqual(s.domain(), [1, 2]); d.push(3); @@ -64,25 +64,25 @@ test("symlog.domain(domain) makes a copy of domain values", () => { assert.deepStrictEqual(d, [1, 2, 3]); }); -test("symlog.domain() returns a copy of domain values", () => { +it("symlog.domain() returns a copy of domain values", () => { const s = scaleSymlog(), d = s.domain(); assert.deepStrictEqual(d, [0, 1]); d.push(3); assert.deepStrictEqual(s.domain(), [0, 1]); }); -test("symlog.range(range) does not coerce range to numbers", () => { +it("symlog.range(range) does not coerce range to numbers", () => { const s = scaleSymlog().range(["0px", "2px"]); assert.deepStrictEqual(s.range(), ["0px", "2px"]); assert.strictEqual(s(1), "2px"); }); -test("symlog.range(range) can accept range values as arrays or objects", () => { +it("symlog.range(range) can accept range values as arrays or objects", () => { assert.deepStrictEqual(scaleSymlog().range([{color: "red"}, {color: "blue"}])(1), {color: "rgb(0, 0, 255)"}); assert.deepStrictEqual(scaleSymlog().range([["red"], ["blue"]])(0), ["rgb(255, 0, 0)"]); }); -test("symlog.range(range) makes a copy of range values", () => { +it("symlog.range(range) makes a copy of range values", () => { const r = [1, 2], s = scaleSymlog().range(r); assert.deepStrictEqual(s.range(), [1, 2]); r.push(3); @@ -90,14 +90,14 @@ test("symlog.range(range) makes a copy of range values", () => { assert.deepStrictEqual(r, [1, 2, 3]); }); -test("symlog.range() returns a copy of range values", () => { +it("symlog.range() returns a copy of range values", () => { const s = scaleSymlog(), r = s.range(); assert.deepStrictEqual(r, [0, 1]); r.push(3); assert.deepStrictEqual(s.range(), [0, 1]); }); -test("symlog.clamp() is false by default", () => { +it("symlog.clamp() is false by default", () => { assert.strictEqual(scaleSymlog().clamp(), false); assert.strictEqual(scaleSymlog().range([10, 20])(3), 30); assert.strictEqual(scaleSymlog().range([10, 20])(-1), 0); @@ -105,24 +105,24 @@ test("symlog.clamp() is false by default", () => { assert.strictEqual(scaleSymlog().range([10, 20]).invert(0), -1); }); -test("symlog.clamp(true) restricts output values to the range", () => { +it("symlog.clamp(true) restricts output values to the range", () => { assert.strictEqual(scaleSymlog().clamp(true).range([10, 20])(2), 20); assert.strictEqual(scaleSymlog().clamp(true).range([10, 20])(-1), 10); }); -test("symlog.clamp(true) restricts input values to the domain", () => { +it("symlog.clamp(true) restricts input values to the domain", () => { assert.strictEqual(scaleSymlog().clamp(true).range([10, 20]).invert(30), 1); assert.strictEqual(scaleSymlog().clamp(true).range([10, 20]).invert(0), 0); }); -test("symlog.clamp(clamp) coerces the specified clamp value to a boolean", () => { +it("symlog.clamp(clamp) coerces the specified clamp value to a boolean", () => { assert.strictEqual(scaleSymlog().clamp("true").clamp(), true); assert.strictEqual(scaleSymlog().clamp(1).clamp(), true); assert.strictEqual(scaleSymlog().clamp("").clamp(), false); assert.strictEqual(scaleSymlog().clamp(0).clamp(), false); }); -test("symlog.copy() returns a copy with changes to the domain are isolated", () => { +it("symlog.copy() returns a copy with changes to the domain are isolated", () => { const x = scaleSymlog(), y = x.copy(); x.domain([1, 2]); assert.deepStrictEqual(y.domain(), [0, 1]); @@ -139,7 +139,7 @@ test("symlog.copy() returns a copy with changes to the domain are isolated", () assert.deepStrictEqual(y2.domain(), [1, 1.9]); }); -test("symlog.copy() returns a copy with changes to the range are isolated", () => { +it("symlog.copy() returns a copy with changes to the range are isolated", () => { const x = scaleSymlog(), y = x.copy(); x.range([1, 2]); assert.strictEqual(x.invert(1), 0); @@ -152,7 +152,7 @@ test("symlog.copy() returns a copy with changes to the range are isolated", () = assert.deepStrictEqual(y.range(), [2, 3]); }); -test("symlog.copy() returns a copy with changes to clamping are isolated", () => { +it("symlog.copy() returns a copy with changes to clamping are isolated", () => { const x = scaleSymlog().clamp(true), y = x.copy(); x.clamp(false); assert.strictEqual(x(3), 2); @@ -164,7 +164,7 @@ test("symlog.copy() returns a copy with changes to clamping are isolated", () => assert.strictEqual(x.clamp(), false); }); -test("symlog().clamp(true).invert(x) cannot return a value outside the domain", () => { +it("symlog().clamp(true).invert(x) cannot return a value outside the domain", () => { const x = scaleSymlog().domain([1, 20]).clamp(true); assert.strictEqual(x.invert(0), 1); assert.strictEqual(x.invert(1), 20); diff --git a/test/threshold-test.js b/test/threshold-test.js index 66e201e..3d5da69 100644 --- a/test/threshold-test.js +++ b/test/threshold-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {scaleThreshold} from "../src/index.js"; -test("scaleThreshold() has the expected defaults", () => { +it("scaleThreshold() has the expected defaults", () => { const x = scaleThreshold(); assert.deepStrictEqual(x.domain(), [0.5]); assert.deepStrictEqual(x.range(), [0, 1]); @@ -10,7 +10,7 @@ test("scaleThreshold() has the expected defaults", () => { assert.strictEqual(x(0.49), 0); }); -test("threshold(x) maps a number to a discrete value in the range", () => { +it("threshold(x) maps a number to a discrete value in the range", () => { const x = scaleThreshold().domain([1/3, 2/3]).range(["a", "b", "c"]); assert.strictEqual(x(0), "a"); assert.strictEqual(x(0.2), "a"); @@ -20,7 +20,7 @@ test("threshold(x) maps a number to a discrete value in the range", () => { assert.strictEqual(x(1), "c"); }); -test("threshold(x) returns undefined if the specified value x is not orderable", () => { +it("threshold(x) returns undefined if the specified value x is not orderable", () => { const x = scaleThreshold().domain([1/3, 2/3]).range(["a", "b", "c"]); assert.strictEqual(x(), undefined); assert.strictEqual(x(undefined), undefined); @@ -28,7 +28,7 @@ test("threshold(x) returns undefined if the specified value x is not orderable", assert.strictEqual(x(null), undefined); }); -test("threshold.domain(…) supports arbitrary orderable values", () => { +it("threshold.domain(…) supports arbitrary orderable values", () => { const x = scaleThreshold().domain(["10", "2"]).range([0, 1, 2]); assert.strictEqual(x.domain()[0], "10"); assert.strictEqual(x.domain()[1], "2"); @@ -37,12 +37,12 @@ test("threshold.domain(…) supports arbitrary orderable values", () => { assert.strictEqual(x("3"), 2); }); -test("threshold.domain(…) accepts an iterable", () => { +it("threshold.domain(…) accepts an iterable", () => { const x = scaleThreshold().domain(new Set(["10", "2"])).range([0, 1, 2]); assert.deepStrictEqual(x.domain(), ["10", "2"]); }); -test("threshold.range(…) supports arbitrary values", () => { +it("threshold.range(…) supports arbitrary values", () => { const a = {}, b = {}, c = {}, x = scaleThreshold().domain([1/3, 2/3]).range([a, b, c]); assert.strictEqual(x(0), a); assert.strictEqual(x(0.2), a); @@ -52,12 +52,12 @@ test("threshold.range(…) supports arbitrary values", () => { assert.strictEqual(x(1), c); }); -test("threshold.range(…) accepts an iterable", () => { +it("threshold.range(…) accepts an iterable", () => { const x = scaleThreshold().domain(["10", "2"]).range(new Set([0, 1, 2])); assert.deepStrictEqual(x.range(), [0, 1, 2]); }); -test("threshold.invertExtent(y) returns the domain extent for the specified range value", () => { +it("threshold.invertExtent(y) returns the domain extent for the specified range value", () => { const a = {}, b = {}, c = {}, x = scaleThreshold().domain([1/3, 2/3]).range([a, b, c]); assert.deepStrictEqual(x.invertExtent(a), [undefined, 1/3]); assert.deepStrictEqual(x.invertExtent(b), [1/3, 2/3]); diff --git a/test/tickFormat-test.js b/test/tickFormat-test.js index f046665..289d955 100644 --- a/test/tickFormat-test.js +++ b/test/tickFormat-test.js @@ -1,21 +1,21 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {tickFormat} from "../src/index.js"; -test("tickFormat(start, stop, count) returns a format suitable for the ticks", () => { +it("tickFormat(start, stop, count) returns a format suitable for the ticks", () => { assert.strictEqual(tickFormat(0, 1, 10)(0.2), "0.2"); assert.strictEqual(tickFormat(0, 1, 20)(0.2), "0.20"); assert.strictEqual(tickFormat(-100, 100, 10)(-20), "−20"); }); -test("tickFormat(start, stop, count, specifier) sets the appropriate fixed precision if not specified", () => { +it("tickFormat(start, stop, count, specifier) sets the appropriate fixed precision if not specified", () => { assert.strictEqual(tickFormat(0, 1, 10, "+f")(0.2), "+0.2"); assert.strictEqual(tickFormat(0, 1, 20, "+f")(0.2), "+0.20"); assert.strictEqual(tickFormat(0, 1, 10, "+%")(0.2), "+20%"); assert.strictEqual(tickFormat(0.19, 0.21, 10, "+%")(0.2), "+20.0%"); }); -test("tickFormat(start, stop, count, specifier) sets the appropriate round precision if not specified", () => { +it("tickFormat(start, stop, count, specifier) sets the appropriate round precision if not specified", () => { assert.strictEqual(tickFormat(0, 9, 10, "")(2.10), "2"); assert.strictEqual(tickFormat(0, 9, 100, "")(2.01), "2"); assert.strictEqual(tickFormat(0, 9, 100, "")(2.11), "2.1"); @@ -32,12 +32,12 @@ test("tickFormat(start, stop, count, specifier) sets the appropriate round preci assert.strictEqual(tickFormat(0.19, 0.21, 10, "p")(0.201), "20.1%"); }); -test("tickFormat(start, stop, count, specifier) sets the appropriate prefix precision if not specified", () => { +it("tickFormat(start, stop, count, specifier) sets the appropriate prefix precision if not specified", () => { assert.strictEqual(tickFormat(0, 1e6, 10, "$s")(0.51e6), "$0.5M"); assert.strictEqual(tickFormat(0, 1e6, 100, "$s")(0.501e6), "$0.50M"); }); -test("tickFormat(start, stop, count) uses the default precision when the domain is invalid", () => { +it("tickFormat(start, stop, count) uses the default precision when the domain is invalid", () => { const f = tickFormat(0, NaN, 10); assert.strictEqual(f + "", " >-,f"); assert.strictEqual(f(0.12), "0.120000"); diff --git a/test/time-test.js b/test/time-test.js index c706077..8b5a0ad 100644 --- a/test/time-test.js +++ b/test/time-test.js @@ -1,49 +1,49 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {interpolateHsl} from "d3-interpolate"; import {timeDay, timeMinute, timeMonth, timeWeek, timeYear} from "d3-time"; import {scaleTime} from "../src/index.js"; import {local} from "./date.js"; -test("time.domain([-1e50, 1e50]) is equivalent to time.domain([NaN, NaN])", () => { +it("time.domain([-1e50, 1e50]) is equivalent to time.domain([NaN, NaN])", () => { const x = scaleTime().domain([-1e50, 1e50]); assert.strictEqual(isNaN(x.domain()[0]), true); // Note: also coerced on retrieval, so insufficient test! assert.strictEqual(isNaN(x.domain()[1]), true); assert.deepStrictEqual(x.ticks(10), []); }); -test("time.domain(domain) accepts an iterable", () => { +it("time.domain(domain) accepts an iterable", () => { const x = scaleTime().domain(new Set([local(2009), local(2010)])); assert.deepStrictEqual(x.domain(), [local(2009), local(2010)]); }); -test("time.nice() is an alias for time.nice(10)", () => { +it("time.nice() is an alias for time.nice(10)", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 17), local(2009, 0, 1, 23, 42)]); assert.deepStrictEqual(x.nice().domain(), [local(2009, 0, 1), local(2009, 0, 2)]); }); -test("time.nice() can nice sub-second domains", () => { +it("time.nice() can nice sub-second domains", () => { const x = scaleTime().domain([local(2013, 0, 1, 12, 0, 0, 0), local(2013, 0, 1, 12, 0, 0, 128)]); assert.deepStrictEqual(x.nice().domain(), [local(2013, 0, 1, 12, 0, 0, 0), local(2013, 0, 1, 12, 0, 0, 130)]); }); -test("time.nice() can nice multi-year domains", () => { +it("time.nice() can nice multi-year domains", () => { const x = scaleTime().domain([local(2001, 0, 1), local(2138, 0, 1)]); assert.deepStrictEqual(x.nice().domain(), [local(2000, 0, 1), local(2140, 0, 1)]); }); -test("time.nice() can nice empty domains", () => { +it("time.nice() can nice empty domains", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 12), local(2009, 0, 1, 0, 12)]); assert.deepStrictEqual(x.nice().domain(), [local(2009, 0, 1, 0, 12), local(2009, 0, 1, 0, 12)]); }); -test("time.nice(count) nices using the specified tick count", () => { +it("time.nice(count) nices using the specified tick count", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 17), local(2009, 0, 1, 23, 42)]); assert.deepStrictEqual(x.nice(100).domain(), [local(2009, 0, 1, 0, 15), local(2009, 0, 1, 23, 45)]); assert.deepStrictEqual(x.nice(10).domain(), [local(2009, 0, 1), local(2009, 0, 2)]); }); -test("time.nice(interval) nices using the specified time interval", () => { +it("time.nice(interval) nices using the specified time interval", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 12), local(2009, 0, 1, 23, 48)]); assert.deepStrictEqual(x.nice(timeDay).domain(), [local(2009, 0, 1), local(2009, 0, 2)]); assert.deepStrictEqual(x.nice(timeWeek).domain(), [local(2008, 11, 28), local(2009, 0, 4)]); @@ -51,17 +51,17 @@ test("time.nice(interval) nices using the specified time interval", () => { assert.deepStrictEqual(x.nice(timeYear).domain(), [local(2008, 0, 1), local(2010, 0, 1)]); }); -test("time.nice(interval) can nice empty domains", () => { +it("time.nice(interval) can nice empty domains", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 12), local(2009, 0, 1, 0, 12)]); assert.deepStrictEqual(x.nice(timeDay).domain(), [local(2009, 0, 1), local(2009, 0, 2)]); }); -test("time.nice(interval) can nice a polylinear domain, only affecting its extent", () => { +it("time.nice(interval) can nice a polylinear domain, only affecting its extent", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 12), local(2009, 0, 1, 23, 48), local(2009, 0, 2, 23, 48)]).nice(timeDay); assert.deepStrictEqual(x.domain(), [local(2009, 0, 1), local(2009, 0, 1, 23, 48), local(2009, 0, 3)]); }); -test("time.nice(interval.every(step)) nices using the specified time interval and step", () => { +it("time.nice(interval.every(step)) nices using the specified time interval and step", () => { const x = scaleTime().domain([local(2009, 0, 1, 0, 12), local(2009, 0, 1, 23, 48)]); assert.deepStrictEqual(x.nice(timeDay.every(3)).domain(), [local(2009, 0, 1), local(2009, 0, 4)]); assert.deepStrictEqual(x.nice(timeWeek.every(2)).domain(), [local(2008, 11, 21), local(2009, 0, 4)]); @@ -69,7 +69,7 @@ test("time.nice(interval.every(step)) nices using the specified time interval an assert.deepStrictEqual(x.nice(timeYear.every(10)).domain(), [local(2000, 0, 1), local(2010, 0, 1)]); }); -test("time.copy() isolates changes to the domain", () => { +it("time.copy() isolates changes to the domain", () => { const x = scaleTime().domain([local(2009, 0, 1), local(2010, 0, 1)]), y = x.copy(); x.domain([local(2010, 0, 1), local(2011, 0, 1)]); assert.deepStrictEqual(y.domain(), [local(2009, 0, 1), local(2010, 0, 1)]); @@ -82,7 +82,7 @@ test("time.copy() isolates changes to the domain", () => { assert.deepStrictEqual(y.domain(), [local(2011, 0, 1), local(2012, 0, 1)]); }); -test("time.copy() isolates changes to the range", () => { +it("time.copy() isolates changes to the range", () => { const x = scaleTime().domain([local(2009, 0, 1), local(2010, 0, 1)]), y = x.copy(); x.range([1, 2]); assert.deepStrictEqual(x.invert(1), local(2009, 0, 1)); @@ -95,7 +95,7 @@ test("time.copy() isolates changes to the range", () => { assert.deepStrictEqual(y.range(), [2, 3]); }); -test("time.copy() isolates changes to the interpolator", () => { +it("time.copy() isolates changes to the interpolator", () => { const x = scaleTime().domain([local(2009, 0, 1), local(2010, 0, 1)]).range(["red", "blue"]), i = x.interpolate(), y = x.copy(); @@ -105,7 +105,7 @@ test("time.copy() isolates changes to the interpolator", () => { assert.strictEqual(y.interpolate(), i); }); -test("time.copy() isolates changes to clamping", () => { +it("time.copy() isolates changes to clamping", () => { const x = scaleTime().domain([local(2009, 0, 1), local(2010, 0, 1)]).clamp(true), y = x.copy(); x.clamp(false); assert.strictEqual(x(local(2011, 0, 1)), 2); @@ -117,7 +117,7 @@ test("time.copy() isolates changes to clamping", () => { assert.strictEqual(x.clamp(), false); }); -test("time.clamp(true).invert(value) never returns a value outside the domain", () => { +it("time.clamp(true).invert(value) never returns a value outside the domain", () => { const x = scaleTime().clamp(true); assert(x.invert(0) instanceof Date); assert(x.invert(0) !== x.invert(0)); // returns a distinct copy @@ -127,7 +127,7 @@ test("time.clamp(true).invert(value) never returns a value outside the domain", assert.strictEqual(+x.invert(2), +x.domain()[1]); }); -test("time.ticks(interval) observes the specified tick interval", () => { +it("time.ticks(interval) observes the specified tick interval", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 1, 0), local(2011, 0, 1, 12, 4, 4)]); assert.deepStrictEqual(x.ticks(timeMinute), [ local(2011, 0, 1, 12, 1), @@ -137,7 +137,7 @@ test("time.ticks(interval) observes the specified tick interval", () => { ]); }); -test("time.ticks(interval.every(step)) observes the specified tick interval and step", () => { +it("time.ticks(interval.every(step)) observes the specified tick interval and step", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 33, 4)]); assert.deepStrictEqual(x.ticks(timeMinute.every(10)), [ local(2011, 0, 1, 12, 0), @@ -147,7 +147,7 @@ test("time.ticks(interval.every(step)) observes the specified tick interval and ]); }); -test("time.ticks(count) can generate sub-second ticks", () => { +it("time.ticks(count) can generate sub-second ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 1)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 0, 0, 0), @@ -159,7 +159,7 @@ test("time.ticks(count) can generate sub-second ticks", () => { ]); }); -test("time.ticks(count) can generate 1-second ticks", () => { +it("time.ticks(count) can generate 1-second ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 4)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 0, 0), @@ -170,7 +170,7 @@ test("time.ticks(count) can generate 1-second ticks", () => { ]); }); -test("time.ticks(count) can generate 5-second ticks", () => { +it("time.ticks(count) can generate 5-second ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 20)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 0, 0), @@ -181,7 +181,7 @@ test("time.ticks(count) can generate 5-second ticks", () => { ]); }); -test("time.ticks(count) can generate 15-second ticks", () => { +it("time.ticks(count) can generate 15-second ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 0, 50)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 0, 0), @@ -191,7 +191,7 @@ test("time.ticks(count) can generate 15-second ticks", () => { ]); }); -test("time.ticks(count) can generate 30-second ticks", () => { +it("time.ticks(count) can generate 30-second ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 0), local(2011, 0, 1, 12, 1, 50)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 0, 0), @@ -201,7 +201,7 @@ test("time.ticks(count) can generate 30-second ticks", () => { ]); }); -test("time.ticks(count) can generate 1-minute ticks", () => { +it("time.ticks(count) can generate 1-minute ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 0, 27), local(2011, 0, 1, 12, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 1), @@ -211,7 +211,7 @@ test("time.ticks(count) can generate 1-minute ticks", () => { ]); }); -test("time.ticks(count) can generate 5-minute ticks", () => { +it("time.ticks(count) can generate 5-minute ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 3, 27), local(2011, 0, 1, 12, 21, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 5), @@ -221,7 +221,7 @@ test("time.ticks(count) can generate 5-minute ticks", () => { ]); }); -test("time.ticks(count) can generate 15-minute ticks", () => { +it("time.ticks(count) can generate 15-minute ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 8, 27), local(2011, 0, 1, 13, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 15), @@ -231,7 +231,7 @@ test("time.ticks(count) can generate 15-minute ticks", () => { ]); }); -test("time.ticks(count) can generate 30-minute ticks", () => { +it("time.ticks(count) can generate 30-minute ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 28, 27), local(2011, 0, 1, 14, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 12, 30), @@ -241,7 +241,7 @@ test("time.ticks(count) can generate 30-minute ticks", () => { ]); }); -test("time.ticks(count) can generate 1-hour ticks", () => { +it("time.ticks(count) can generate 1-hour ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 12, 28, 27), local(2011, 0, 1, 16, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 13, 0), @@ -251,7 +251,7 @@ test("time.ticks(count) can generate 1-hour ticks", () => { ]); }); -test("time.ticks(count) can generate 3-hour ticks", () => { +it("time.ticks(count) can generate 3-hour ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 14, 28, 27), local(2011, 0, 2, 1, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 15, 0), @@ -261,7 +261,7 @@ test("time.ticks(count) can generate 3-hour ticks", () => { ]); }); -test("time.ticks(count) can generate 6-hour ticks", () => { +it("time.ticks(count) can generate 6-hour ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 16, 28, 27), local(2011, 0, 2, 14, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 18, 0), @@ -271,7 +271,7 @@ test("time.ticks(count) can generate 6-hour ticks", () => { ]); }); -test("time.ticks(count) can generate 12-hour ticks", () => { +it("time.ticks(count) can generate 12-hour ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 16, 28, 27), local(2011, 0, 3, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 2, 0, 0), @@ -281,7 +281,7 @@ test("time.ticks(count) can generate 12-hour ticks", () => { ]); }); -test("time.ticks(count) can generate 1-day ticks", () => { +it("time.ticks(count) can generate 1-day ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 16, 28, 27), local(2011, 0, 5, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 2, 0, 0), @@ -291,7 +291,7 @@ test("time.ticks(count) can generate 1-day ticks", () => { ]); }); -test("time.ticks(count) can generate 2-day ticks", () => { +it("time.ticks(count) can generate 2-day ticks", () => { const x = scaleTime().domain([local(2011, 0, 2, 16, 28, 27), local(2011, 0, 9, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 3, 0, 0), @@ -301,7 +301,7 @@ test("time.ticks(count) can generate 2-day ticks", () => { ]); }); -test("time.ticks(count) can generate 1-week ticks", () => { +it("time.ticks(count) can generate 1-week ticks", () => { const x = scaleTime().domain([local(2011, 0, 1, 16, 28, 27), local(2011, 0, 23, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 2, 0, 0), @@ -311,7 +311,7 @@ test("time.ticks(count) can generate 1-week ticks", () => { ]); }); -test("time.ticks(count) can generate 1-month ticks", () => { +it("time.ticks(count) can generate 1-month ticks", () => { const x = scaleTime().domain([local(2011, 0, 18), local(2011, 4, 2)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 1, 1, 0, 0), @@ -321,7 +321,7 @@ test("time.ticks(count) can generate 1-month ticks", () => { ]); }); -test("time.ticks(count) can generate 3-month ticks", () => { +it("time.ticks(count) can generate 3-month ticks", () => { const x = scaleTime().domain([local(2010, 11, 18), local(2011, 10, 2)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 0, 0), @@ -331,7 +331,7 @@ test("time.ticks(count) can generate 3-month ticks", () => { ]); }); -test("time.ticks(count) can generate 1-year ticks", () => { +it("time.ticks(count) can generate 1-year ticks", () => { const x = scaleTime().domain([local(2010, 11, 18), local(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(4), [ local(2011, 0, 1, 0, 0), @@ -341,7 +341,7 @@ test("time.ticks(count) can generate 1-year ticks", () => { ]); }); -test("time.ticks(count) can generate multi-year ticks", () => { +it("time.ticks(count) can generate multi-year ticks", () => { const x = scaleTime().domain([local(0, 11, 18), local(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(6), [ local( 500, 0, 1, 0, 0), @@ -351,67 +351,67 @@ test("time.ticks(count) can generate multi-year ticks", () => { ]); }); -test("time.ticks(count) returns one tick for an empty domain", () => { +it("time.ticks(count) returns one tick for an empty domain", () => { const x = scaleTime().domain([local(2014, 2, 2), local(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(6), [local(2014, 2, 2)]); }); -test("time.ticks() returns descending ticks for a descending domain", () => { +it("time.ticks() returns descending ticks for a descending domain", () => { const x = scaleTime(); assert.deepStrictEqual(x.domain([local(2014, 2, 2), local(2010, 11, 18)]).ticks(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(x.domain([local(2011, 10, 2), local(2010, 11, 18)]).ticks(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)]); }); -test("time.tickFormat()(date) formats year on New Year's", () => { +it("time.tickFormat()(date) formats year on New Year's", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 0, 1)), "2011"); assert.strictEqual(f(local(2012, 0, 1)), "2012"); assert.strictEqual(f(local(2013, 0, 1)), "2013"); }); -test("time.tickFormat()(date) formats month on the 1st of each month", () => { +it("time.tickFormat()(date) formats month on the 1st of each month", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 1)), "February"); assert.strictEqual(f(local(2011, 2, 1)), "March"); assert.strictEqual(f(local(2011, 3, 1)), "April"); }); -test("time.tickFormat()(date) formats week on Sunday midnight", () => { +it("time.tickFormat()(date) formats week on Sunday midnight", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 6)), "Feb 06"); assert.strictEqual(f(local(2011, 1, 13)), "Feb 13"); assert.strictEqual(f(local(2011, 1, 20)), "Feb 20"); }); -test("time.tickFormat()(date) formats date on midnight", () => { +it("time.tickFormat()(date) formats date on midnight", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 2)), "Wed 02"); assert.strictEqual(f(local(2011, 1, 3)), "Thu 03"); assert.strictEqual(f(local(2011, 1, 4)), "Fri 04"); }); -test("time.tickFormat()(date) formats hour on minute zero", () => { +it("time.tickFormat()(date) formats hour on minute zero", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 2, 11)), "11 AM"); assert.strictEqual(f(local(2011, 1, 2, 12)), "12 PM"); assert.strictEqual(f(local(2011, 1, 2, 13)), "01 PM"); }); -test("time.tickFormat()(date) formats minute on second zero", () => { +it("time.tickFormat()(date) formats minute on second zero", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 2, 11, 59)), "11:59"); assert.strictEqual(f(local(2011, 1, 2, 12, 1)), "12:01"); assert.strictEqual(f(local(2011, 1, 2, 12, 2)), "12:02"); }); -test("time.tickFormat()(date) otherwise, formats second", () => { +it("time.tickFormat()(date) otherwise, formats second", () => { const f = scaleTime().tickFormat(); assert.strictEqual(f(local(2011, 1, 2, 12, 1, 9)), ":09"); assert.strictEqual(f(local(2011, 1, 2, 12, 1, 10)), ":10"); assert.strictEqual(f(local(2011, 1, 2, 12, 1, 11)), ":11"); }); -test("time.tickFormat(count, specifier) returns a time format for the specified specifier", () => { +it("time.tickFormat(count, specifier) returns a time format for the specified specifier", () => { const f = scaleTime().tickFormat(10, "%c"); assert.strictEqual(f(local(2011, 1, 2, 12)), "2/2/2011, 12:00:00 PM"); }); diff --git a/test/utcTime-test.js b/test/utcTime-test.js index 98390e0..5256254 100644 --- a/test/utcTime-test.js +++ b/test/utcTime-test.js @@ -1,37 +1,37 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {interpolateHsl} from "d3-interpolate"; import {utcDay, utcMinute, utcMonth, utcWeek, utcYear} from "d3-time"; import {scaleUtc} from "../src/index.js"; import {utc} from "./date.js"; -test("scaleUtc.nice() is an alias for scaleUtc.nice(10)", () => { +it("scaleUtc.nice() is an alias for scaleUtc.nice(10)", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 17), utc(2009, 0, 1, 23, 42)]); assert.deepStrictEqual(x.nice().domain(), [utc(2009, 0, 1), utc(2009, 0, 2)]); }); -test("scaleUtc.nice() can nice sub-second domains", () => { +it("scaleUtc.nice() can nice sub-second domains", () => { const x = scaleUtc().domain([utc(2013, 0, 1, 12, 0, 0, 0), utc(2013, 0, 1, 12, 0, 0, 128)]); assert.deepStrictEqual(x.nice().domain(), [utc(2013, 0, 1, 12, 0, 0, 0), utc(2013, 0, 1, 12, 0, 0, 130)]); }); -test("scaleUtc.nice() can nice multi-year domains", () => { +it("scaleUtc.nice() can nice multi-year domains", () => { const x = scaleUtc().domain([utc(2001, 0, 1), utc(2138, 0, 1)]); assert.deepStrictEqual(x.nice().domain(), [utc(2000, 0, 1), utc(2140, 0, 1)]); }); -test("scaleUtc.nice() can nice empty domains", () => { +it("scaleUtc.nice() can nice empty domains", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 0, 12)]); assert.deepStrictEqual(x.nice().domain(), [utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 0, 12)]); }); -test("scaleUtc.nice(count) nices using the specified tick count", () => { +it("scaleUtc.nice(count) nices using the specified tick count", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 17), utc(2009, 0, 1, 23, 42)]); assert.deepStrictEqual(x.nice(100).domain(), [utc(2009, 0, 1, 0, 15), utc(2009, 0, 1, 23, 45)]); assert.deepStrictEqual(x.nice(10).domain(), [utc(2009, 0, 1), utc(2009, 0, 2)]); }); -test("scaleUtc.nice(interval) nices using the specified time interval", () => { +it("scaleUtc.nice(interval) nices using the specified time interval", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 23, 48)]); assert.deepStrictEqual(x.nice(utcDay).domain(), [utc(2009, 0, 1), utc(2009, 0, 2)]); assert.deepStrictEqual(x.nice(utcWeek).domain(), [utc(2008, 11, 28), utc(2009, 0, 4)]); @@ -39,17 +39,17 @@ test("scaleUtc.nice(interval) nices using the specified time interval", () => { assert.deepStrictEqual(x.nice(utcYear).domain(), [utc(2008, 0, 1), utc(2010, 0, 1)]); }); -test("scaleUtc.nice(interval) can nice empty domains", () => { +it("scaleUtc.nice(interval) can nice empty domains", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 0, 12)]); assert.deepStrictEqual(x.nice(utcDay).domain(), [utc(2009, 0, 1), utc(2009, 0, 2)]); }); -test("scaleUtc.nice(interval) can nice a polylinear domain, only affecting its extent", () => { +it("scaleUtc.nice(interval) can nice a polylinear domain, only affecting its extent", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 23, 48), utc(2009, 0, 2, 23, 48)]).nice(utcDay); assert.deepStrictEqual(x.domain(), [utc(2009, 0, 1), utc(2009, 0, 1, 23, 48), utc(2009, 0, 3)]); }); -test("scaleUtc.nice(interval.every(step)) nices using the specified time interval and step", () => { +it("scaleUtc.nice(interval.every(step)) nices using the specified time interval and step", () => { const x = scaleUtc().domain([utc(2009, 0, 1, 0, 12), utc(2009, 0, 1, 23, 48)]); assert.deepStrictEqual(x.nice(utcDay.every(3)).domain(), [utc(2009, 0, 1), utc(2009, 0, 4)]); assert.deepStrictEqual(x.nice(utcWeek.every(2)).domain(), [utc(2008, 11, 21), utc(2009, 0, 4)]); @@ -57,7 +57,7 @@ test("scaleUtc.nice(interval.every(step)) nices using the specified time interva assert.deepStrictEqual(x.nice(utcYear.every(10)).domain(), [utc(2000, 0, 1), utc(2010, 0, 1)]); }); -test("scaleUtc.copy() isolates changes to the domain", () => { +it("scaleUtc.copy() isolates changes to the domain", () => { const x = scaleUtc().domain([utc(2009, 0, 1), utc(2010, 0, 1)]), y = x.copy(); x.domain([utc(2010, 0, 1), utc(2011, 0, 1)]); assert.deepStrictEqual(y.domain(), [utc(2009, 0, 1), utc(2010, 0, 1)]); @@ -70,7 +70,7 @@ test("scaleUtc.copy() isolates changes to the domain", () => { assert.deepStrictEqual(y.domain(), [utc(2011, 0, 1), utc(2012, 0, 1)]); }); -test("scaleUtc.copy() isolates changes to the range", () => { +it("scaleUtc.copy() isolates changes to the range", () => { const x = scaleUtc().domain([utc(2009, 0, 1), utc(2010, 0, 1)]), y = x.copy(); x.range([1, 2]); assert.deepStrictEqual(x.invert(1), utc(2009, 0, 1)); @@ -83,7 +83,7 @@ test("scaleUtc.copy() isolates changes to the range", () => { assert.deepStrictEqual(y.range(), [2, 3]); }); -test("scaleUtc.copy() isolates changes to the interpolator", () => { +it("scaleUtc.copy() isolates changes to the interpolator", () => { const x = scaleUtc().domain([utc(2009, 0, 1), utc(2010, 0, 1)]).range(["red", "blue"]); const i = x.interpolate(); const y = x.copy(); @@ -93,7 +93,7 @@ test("scaleUtc.copy() isolates changes to the interpolator", () => { assert.strictEqual(y.interpolate(), i); }); -test("scaleUtc.copy() isolates changes to clamping", () => { +it("scaleUtc.copy() isolates changes to clamping", () => { const x = scaleUtc().domain([utc(2009, 0, 1), utc(2010, 0, 1)]).clamp(true), y = x.copy(); x.clamp(false); assert.strictEqual(x(utc(2011, 0, 1)), 2); @@ -105,7 +105,7 @@ test("scaleUtc.copy() isolates changes to clamping", () => { assert.strictEqual(x.clamp(), false); }); -test("scaleUtc.ticks(interval) observes the specified tick interval", () => { +it("scaleUtc.ticks(interval) observes the specified tick interval", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 1, 0), utc(2011, 0, 1, 12, 4, 4)]); assert.deepStrictEqual(x.ticks(utcMinute), [ utc(2011, 0, 1, 12, 1), @@ -115,7 +115,7 @@ test("scaleUtc.ticks(interval) observes the specified tick interval", () => { ]); }); -test("scaleUtc.ticks(interval) observes the specified named tick interval", () => { +it("scaleUtc.ticks(interval) observes the specified named tick interval", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 1, 0), utc(2011, 0, 1, 12, 4, 4)]); assert.deepStrictEqual(x.ticks(utcMinute), [ utc(2011, 0, 1, 12, 1), @@ -125,7 +125,7 @@ test("scaleUtc.ticks(interval) observes the specified named tick interval", () = ]); }); -test("scaleUtc.ticks(interval.every(step)) observes the specified tick interval and step", () => { +it("scaleUtc.ticks(interval.every(step)) observes the specified tick interval and step", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 33, 4)]); assert.deepStrictEqual(x.ticks(utcMinute.every(10)), [ utc(2011, 0, 1, 12, 0), @@ -135,7 +135,7 @@ test("scaleUtc.ticks(interval.every(step)) observes the specified tick interval ]); }); -test("scaleUtc.ticks(count) can generate sub-second ticks", () => { +it("scaleUtc.ticks(count) can generate sub-second ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 1)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 0, 0, 0), @@ -147,7 +147,7 @@ test("scaleUtc.ticks(count) can generate sub-second ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 1-second ticks", () => { +it("scaleUtc.ticks(count) can generate 1-second ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 4)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 0, 0), @@ -158,7 +158,7 @@ test("scaleUtc.ticks(count) can generate 1-second ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 5-second ticks", () => { +it("scaleUtc.ticks(count) can generate 5-second ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 20)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 0, 0), @@ -169,7 +169,7 @@ test("scaleUtc.ticks(count) can generate 5-second ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 15-second ticks", () => { +it("scaleUtc.ticks(count) can generate 15-second ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 0, 50)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 0, 0), @@ -179,7 +179,7 @@ test("scaleUtc.ticks(count) can generate 15-second ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 30-second ticks", () => { +it("scaleUtc.ticks(count) can generate 30-second ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 0), utc(2011, 0, 1, 12, 1, 50)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 0, 0), @@ -189,7 +189,7 @@ test("scaleUtc.ticks(count) can generate 30-second ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 1-minute ticks", () => { +it("scaleUtc.ticks(count) can generate 1-minute ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 0, 27), utc(2011, 0, 1, 12, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 1), @@ -199,7 +199,7 @@ test("scaleUtc.ticks(count) can generate 1-minute ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 5-minute ticks", () => { +it("scaleUtc.ticks(count) can generate 5-minute ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 3, 27), utc(2011, 0, 1, 12, 21, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 5), @@ -209,7 +209,7 @@ test("scaleUtc.ticks(count) can generate 5-minute ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 15-minute ticks", () => { +it("scaleUtc.ticks(count) can generate 15-minute ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 8, 27), utc(2011, 0, 1, 13, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 15), @@ -219,7 +219,7 @@ test("scaleUtc.ticks(count) can generate 15-minute ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 30-minute ticks", () => { +it("scaleUtc.ticks(count) can generate 30-minute ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 28, 27), utc(2011, 0, 1, 14, 4, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 12, 30), @@ -229,7 +229,7 @@ test("scaleUtc.ticks(count) can generate 30-minute ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 1-hour ticks", () => { +it("scaleUtc.ticks(count) can generate 1-hour ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 12, 28, 27), utc(2011, 0, 1, 16, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 13, 0), @@ -239,7 +239,7 @@ test("scaleUtc.ticks(count) can generate 1-hour ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 3-hour ticks", () => { +it("scaleUtc.ticks(count) can generate 3-hour ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 14, 28, 27), utc(2011, 0, 2, 1, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 15, 0), @@ -249,7 +249,7 @@ test("scaleUtc.ticks(count) can generate 3-hour ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 6-hour ticks", () => { +it("scaleUtc.ticks(count) can generate 6-hour ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 2, 14, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 18, 0), @@ -259,7 +259,7 @@ test("scaleUtc.ticks(count) can generate 6-hour ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 12-hour ticks", () => { +it("scaleUtc.ticks(count) can generate 12-hour ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 3, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 2, 0, 0), @@ -269,7 +269,7 @@ test("scaleUtc.ticks(count) can generate 12-hour ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 1-day ticks", () => { +it("scaleUtc.ticks(count) can generate 1-day ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 5, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 2, 0, 0), @@ -279,7 +279,7 @@ test("scaleUtc.ticks(count) can generate 1-day ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 2-day ticks", () => { +it("scaleUtc.ticks(count) can generate 2-day ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 2, 16, 28, 27), utc(2011, 0, 9, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 4, 0, 0), @@ -288,7 +288,7 @@ test("scaleUtc.ticks(count) can generate 2-day ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 1-week ticks", () => { +it("scaleUtc.ticks(count) can generate 1-week ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 1, 16, 28, 27), utc(2011, 0, 23, 21, 34, 12)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 2, 0, 0), @@ -298,7 +298,7 @@ test("scaleUtc.ticks(count) can generate 1-week ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 1-month ticks", () => { +it("scaleUtc.ticks(count) can generate 1-month ticks", () => { const x = scaleUtc().domain([utc(2011, 0, 18), utc(2011, 4, 2)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 1, 1, 0, 0), @@ -308,7 +308,7 @@ test("scaleUtc.ticks(count) can generate 1-month ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 3-month ticks", () => { +it("scaleUtc.ticks(count) can generate 3-month ticks", () => { const x = scaleUtc().domain([utc(2010, 11, 18), utc(2011, 10, 2)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 0, 0), @@ -318,7 +318,7 @@ test("scaleUtc.ticks(count) can generate 3-month ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate 1-year ticks", () => { +it("scaleUtc.ticks(count) can generate 1-year ticks", () => { const x = scaleUtc().domain([utc(2010, 11, 18), utc(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(4), [ utc(2011, 0, 1, 0, 0), @@ -328,7 +328,7 @@ test("scaleUtc.ticks(count) can generate 1-year ticks", () => { ]); }); -test("scaleUtc.ticks(count) can generate multi-year ticks", () => { +it("scaleUtc.ticks(count) can generate multi-year ticks", () => { const x = scaleUtc().domain([utc(0, 11, 18), utc(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(6), [ utc( 500, 0, 1, 0, 0), @@ -338,61 +338,61 @@ test("scaleUtc.ticks(count) can generate multi-year ticks", () => { ]); }); -test("scaleUtc.ticks(count) returns one tick for an empty domain", () => { +it("scaleUtc.ticks(count) returns one tick for an empty domain", () => { const x = scaleUtc().domain([utc(2014, 2, 2), utc(2014, 2, 2)]); assert.deepStrictEqual(x.ticks(6), [utc(2014, 2, 2)]); }); -test("scaleUtc.tickFormat()(date) formats year on New Year's", () => { +it("scaleUtc.tickFormat()(date) formats year on New Year's", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 0, 1)), "2011"); assert.strictEqual(f(utc(2012, 0, 1)), "2012"); assert.strictEqual(f(utc(2013, 0, 1)), "2013"); }); -test("scaleUtc.tickFormat()(date) formats month on the 1st of each month", () => { +it("scaleUtc.tickFormat()(date) formats month on the 1st of each month", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 1)), "February"); assert.strictEqual(f(utc(2011, 2, 1)), "March"); assert.strictEqual(f(utc(2011, 3, 1)), "April"); }); -test("scaleUtc.tickFormat()(date) formats week on Sunday midnight", () => { +it("scaleUtc.tickFormat()(date) formats week on Sunday midnight", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 6)), "Feb 06"); assert.strictEqual(f(utc(2011, 1, 13)), "Feb 13"); assert.strictEqual(f(utc(2011, 1, 20)), "Feb 20"); }); -test("scaleUtc.tickFormat()(date) formats date on midnight", () => { +it("scaleUtc.tickFormat()(date) formats date on midnight", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 2)), "Wed 02"); assert.strictEqual(f(utc(2011, 1, 3)), "Thu 03"); assert.strictEqual(f(utc(2011, 1, 4)), "Fri 04"); }); -test("scaleUtc.tickFormat()(date) formats hour on minute zero", () => { +it("scaleUtc.tickFormat()(date) formats hour on minute zero", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 2, 11)), "11 AM"); assert.strictEqual(f(utc(2011, 1, 2, 12)), "12 PM"); assert.strictEqual(f(utc(2011, 1, 2, 13)), "01 PM"); }); -test("scaleUtc.tickFormat()(date) formats minute on second zero", () => { +it("scaleUtc.tickFormat()(date) formats minute on second zero", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 2, 11, 59)), "11:59"); assert.strictEqual(f(utc(2011, 1, 2, 12, 1)), "12:01"); assert.strictEqual(f(utc(2011, 1, 2, 12, 2)), "12:02"); }); -test("scaleUtc.tickFormat()(date) otherwise, formats second", () => { +it("scaleUtc.tickFormat()(date) otherwise, formats second", () => { const f = scaleUtc().tickFormat(); assert.strictEqual(f(utc(2011, 1, 2, 12, 1, 9)), ":09"); assert.strictEqual(f(utc(2011, 1, 2, 12, 1, 10)), ":10"); assert.strictEqual(f(utc(2011, 1, 2, 12, 1, 11)), ":11"); }); -test("scaleUtc.tickFormat(count, specifier) returns a time format for the specified specifier", () => { +it("scaleUtc.tickFormat(count, specifier) returns a time format for the specified specifier", () => { const f = scaleUtc().tickFormat(10, "%c"); assert.strictEqual(f(utc(2011, 1, 2, 12)), "2/2/2011, 12:00:00 PM"); }); From 537c1a9d34f99e3665ce702f2668c1eae21b05df Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:31:29 -0800 Subject: [PATCH 05/10] node: imports Co-Authored-By: Claude Opus 5.5 --- test/asserts.js | 2 +- test/band-test.js | 2 +- test/diverging-test.js | 2 +- test/identity-test.js | 2 +- test/linear-test.js | 2 +- test/log-test.js | 2 +- test/ordinal-test.js | 2 +- test/point-test.js | 2 +- test/pow-test.js | 2 +- test/quantile-test.js | 2 +- test/quantize-test.js | 2 +- test/radial-test.js | 2 +- test/sequential-test.js | 2 +- test/sequentialQuantile-test.js | 2 +- test/sqrt-test.js | 2 +- test/symlog-test.js | 2 +- test/threshold-test.js | 2 +- test/tickFormat-test.js | 2 +- test/time-test.js | 2 +- test/utcTime-test.js | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/test/asserts.js b/test/asserts.js index 1d44e17..f72b18f 100644 --- a/test/asserts.js +++ b/test/asserts.js @@ -1,4 +1,4 @@ -import assert from "assert"; +import assert from "node:assert"; export function assertInDelta(actual, expected, delta = 1e-6) { assert(inDelta(actual, expected, delta), `${actual} should be within ${delta} of ${expected}`); diff --git a/test/band-test.js b/test/band-test.js index 6bac53a..52d9f68 100644 --- a/test/band-test.js +++ b/test/band-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleBand} from "../src/index.js"; it("scaleBand() has the expected defaults", () => { diff --git a/test/diverging-test.js b/test/diverging-test.js index aa2a552..abd1222 100644 --- a/test/diverging-test.js +++ b/test/diverging-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleDiverging, scaleDivergingLog} from "../src/index.js"; it("scaleDiverging() has the expected defaults", () => { diff --git a/test/identity-test.js b/test/identity-test.js index d4a1d79..e0e5907 100644 --- a/test/identity-test.js +++ b/test/identity-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleIdentity} from "../src/index.js"; it("scaleIdentity() has the expected defaults", () => { diff --git a/test/linear-test.js b/test/linear-test.js index 61b1372..2d4b17c 100644 --- a/test/linear-test.js +++ b/test/linear-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleLinear} from "../src/index.js"; import {roundEpsilon} from "./roundEpsilon.js"; diff --git a/test/log-test.js b/test/log-test.js index 22dc7ae..a7b52b1 100644 --- a/test/log-test.js +++ b/test/log-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {hsl, rgb} from "d3-color"; import {interpolate, interpolateHsl} from "d3-interpolate"; import {format} from "d3-format"; diff --git a/test/ordinal-test.js b/test/ordinal-test.js index 33cf8ad..a145101 100644 --- a/test/ordinal-test.js +++ b/test/ordinal-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleImplicit, scaleOrdinal} from "../src/index.js"; it("scaleOrdinal() has the expected defaults", () => { diff --git a/test/point-test.js b/test/point-test.js index 94df36e..ac30b62 100644 --- a/test/point-test.js +++ b/test/point-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleBand, scalePoint} from "../src/index.js"; it("scalePoint() has the expected defaults", () => { diff --git a/test/pow-test.js b/test/pow-test.js index 9fdb010..20b72ae 100644 --- a/test/pow-test.js +++ b/test/pow-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scalePow, scaleSqrt} from "../src/index.js"; import {roundEpsilon} from "./roundEpsilon.js"; import {assertInDelta} from "./asserts.js"; diff --git a/test/quantile-test.js b/test/quantile-test.js index ad137e8..c94f14d 100644 --- a/test/quantile-test.js +++ b/test/quantile-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleQuantile} from "../src/index.js"; it("scaleQuantile() has the expected default", () => { diff --git a/test/quantize-test.js b/test/quantize-test.js index 23b866c..40af8c1 100644 --- a/test/quantize-test.js +++ b/test/quantize-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {range} from "d3-array"; import {scaleQuantize} from "../src/index.js"; import {assertInDelta} from "./asserts.js"; diff --git a/test/radial-test.js b/test/radial-test.js index ce5d2f2..014427d 100644 --- a/test/radial-test.js +++ b/test/radial-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleRadial} from "../src/index.js"; it("scaleRadial() has the expected defaults", () => { diff --git a/test/sequential-test.js b/test/sequential-test.js index aba3f8c..e00cb7b 100644 --- a/test/sequential-test.js +++ b/test/sequential-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleSequential} from "../src/index.js"; it("scaleSequential() has the expected defaults", () => { diff --git a/test/sequentialQuantile-test.js b/test/sequentialQuantile-test.js index 1f5b80e..7402615 100644 --- a/test/sequentialQuantile-test.js +++ b/test/sequentialQuantile-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleSequentialQuantile} from "../src/index.js"; it("sequentialQuantile() clamps", () => { diff --git a/test/sqrt-test.js b/test/sqrt-test.js index 52a3180..c54b1c7 100644 --- a/test/sqrt-test.js +++ b/test/sqrt-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleSqrt} from "../src/index.js"; it("scaleSqrt() has the expected defaults", () => { diff --git a/test/symlog-test.js b/test/symlog-test.js index eed8006..4e33341 100644 --- a/test/symlog-test.js +++ b/test/symlog-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleSymlog} from "../src/index.js"; import {assertInDelta} from "./asserts.js"; diff --git a/test/threshold-test.js b/test/threshold-test.js index 3d5da69..0b30ea4 100644 --- a/test/threshold-test.js +++ b/test/threshold-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {scaleThreshold} from "../src/index.js"; it("scaleThreshold() has the expected defaults", () => { diff --git a/test/tickFormat-test.js b/test/tickFormat-test.js index 289d955..a870527 100644 --- a/test/tickFormat-test.js +++ b/test/tickFormat-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {tickFormat} from "../src/index.js"; it("tickFormat(start, stop, count) returns a format suitable for the ticks", () => { diff --git a/test/time-test.js b/test/time-test.js index 8b5a0ad..8d4614f 100644 --- a/test/time-test.js +++ b/test/time-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {interpolateHsl} from "d3-interpolate"; import {timeDay, timeMinute, timeMonth, timeWeek, timeYear} from "d3-time"; import {scaleTime} from "../src/index.js"; diff --git a/test/utcTime-test.js b/test/utcTime-test.js index 5256254..7b372ef 100644 --- a/test/utcTime-test.js +++ b/test/utcTime-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {interpolateHsl} from "d3-interpolate"; import {utcDay, utcMinute, utcMonth, utcWeek, utcYear} from "d3-time"; import {scaleUtc} from "../src/index.js"; From 6442f983fb1df654b7ff799103967ac35c074f45 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 19:00:03 -0800 Subject: [PATCH 06/10] 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 a82270b..c85bab3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -3,9 +3,11 @@ 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}}, + {ignores: ["dist/"]}, + {files: ["**/*.{js,ts}"], plugins: {js}, extends: ["js/recommended"]}, + {files: ["**/*.{js,ts}"], languageOptions: {globals: globals.node}}, {languageOptions: {ecmaVersion: 2019, sourceType: "module"}}, {rules: {"no-cond-assign": 0}}, - {files: ["test/**/*.js"], rules: {"no-sparse-arrays": 0}} + {files: ["test/**/*.js"], rules: {"no-sparse-arrays": 0}}, + {files: ["rollup.config.js"], languageOptions: {ecmaVersion: 2026}} ]); diff --git a/package.json b/package.json index e13905c..18cce1f 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,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 45fb3d2b4af318c18f795c96ee0e7050a98f7539 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 19:05:19 -0800 Subject: [PATCH 07/10] 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 c85bab3..a65df93 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"}}, {rules: {"no-cond-assign": 0}}, {files: ["test/**/*.js"], rules: {"no-sparse-arrays": 0}}, From 44cabde618a1c53c1fd77a96252af0d6bda18c62 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 22:45:38 -0800 Subject: [PATCH 08/10] d3-scale alias --- test/band-test.js | 2 +- test/diverging-test.js | 2 +- test/identity-test.js | 2 +- test/linear-test.js | 2 +- test/log-test.js | 2 +- test/ordinal-test.js | 2 +- test/point-test.js | 2 +- test/pow-test.js | 2 +- test/quantile-test.js | 2 +- test/quantize-test.js | 2 +- test/radial-test.js | 2 +- test/sequential-test.js | 2 +- test/sequentialQuantile-test.js | 2 +- test/sqrt-test.js | 2 +- test/symlog-test.js | 2 +- test/threshold-test.js | 2 +- test/tickFormat-test.js | 2 +- test/time-test.js | 2 +- test/utcTime-test.js | 2 +- vitest.config.js | 5 ++++- 20 files changed, 23 insertions(+), 20 deletions(-) diff --git a/test/band-test.js b/test/band-test.js index 52d9f68..5fa310a 100644 --- a/test/band-test.js +++ b/test/band-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleBand} from "../src/index.js"; +import {scaleBand} from "d3-scale"; it("scaleBand() has the expected defaults", () => { const s = scaleBand(); diff --git a/test/diverging-test.js b/test/diverging-test.js index abd1222..5e878e1 100644 --- a/test/diverging-test.js +++ b/test/diverging-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleDiverging, scaleDivergingLog} from "../src/index.js"; +import {scaleDiverging, scaleDivergingLog} from "d3-scale"; it("scaleDiverging() has the expected defaults", () => { const s = scaleDiverging(); diff --git a/test/identity-test.js b/test/identity-test.js index e0e5907..f02f55b 100644 --- a/test/identity-test.js +++ b/test/identity-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleIdentity} from "../src/index.js"; +import {scaleIdentity} from "d3-scale"; it("scaleIdentity() has the expected defaults", () => { const s = scaleIdentity(); diff --git a/test/linear-test.js b/test/linear-test.js index 2d4b17c..5e84d2d 100644 --- a/test/linear-test.js +++ b/test/linear-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleLinear} from "../src/index.js"; +import {scaleLinear} from "d3-scale"; import {roundEpsilon} from "./roundEpsilon.js"; it("scaleLinear() has the expected defaults", () => { diff --git a/test/log-test.js b/test/log-test.js index a7b52b1..27faf2d 100644 --- a/test/log-test.js +++ b/test/log-test.js @@ -3,7 +3,7 @@ import {it} from "vitest"; import {hsl, rgb} from "d3-color"; import {interpolate, interpolateHsl} from "d3-interpolate"; import {format} from "d3-format"; -import {scaleLog} from "../src/index.js"; +import {scaleLog} from "d3-scale"; import {assertInDelta} from "./asserts.js"; it("scaleLog() has the expected defaults", () => { diff --git a/test/ordinal-test.js b/test/ordinal-test.js index a145101..dc2f327 100644 --- a/test/ordinal-test.js +++ b/test/ordinal-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleImplicit, scaleOrdinal} from "../src/index.js"; +import {scaleImplicit, scaleOrdinal} from "d3-scale"; it("scaleOrdinal() has the expected defaults", () => { const s = scaleOrdinal(); diff --git a/test/point-test.js b/test/point-test.js index ac30b62..a33b135 100644 --- a/test/point-test.js +++ b/test/point-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleBand, scalePoint} from "../src/index.js"; +import {scaleBand, scalePoint} from "d3-scale"; it("scalePoint() has the expected defaults", () => { const s = scalePoint(); diff --git a/test/pow-test.js b/test/pow-test.js index 20b72ae..73109c8 100644 --- a/test/pow-test.js +++ b/test/pow-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scalePow, scaleSqrt} from "../src/index.js"; +import {scalePow, scaleSqrt} from "d3-scale"; import {roundEpsilon} from "./roundEpsilon.js"; import {assertInDelta} from "./asserts.js"; diff --git a/test/quantile-test.js b/test/quantile-test.js index c94f14d..1056bfe 100644 --- a/test/quantile-test.js +++ b/test/quantile-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleQuantile} from "../src/index.js"; +import {scaleQuantile} from "d3-scale"; it("scaleQuantile() has the expected default", () => { const s = scaleQuantile(); diff --git a/test/quantize-test.js b/test/quantize-test.js index 40af8c1..fe486e2 100644 --- a/test/quantize-test.js +++ b/test/quantize-test.js @@ -1,7 +1,7 @@ import assert from "node:assert"; import {it} from "vitest"; import {range} from "d3-array"; -import {scaleQuantize} from "../src/index.js"; +import {scaleQuantize} from "d3-scale"; import {assertInDelta} from "./asserts.js"; it("scaleQuantize() has the expected defaults", () => { diff --git a/test/radial-test.js b/test/radial-test.js index 014427d..97e7bef 100644 --- a/test/radial-test.js +++ b/test/radial-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleRadial} from "../src/index.js"; +import {scaleRadial} from "d3-scale"; it("scaleRadial() has the expected defaults", () => { const s = scaleRadial(); diff --git a/test/sequential-test.js b/test/sequential-test.js index e00cb7b..4549169 100644 --- a/test/sequential-test.js +++ b/test/sequential-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleSequential} from "../src/index.js"; +import {scaleSequential} from "d3-scale"; it("scaleSequential() has the expected defaults", () => { const s = scaleSequential(); diff --git a/test/sequentialQuantile-test.js b/test/sequentialQuantile-test.js index 7402615..3842e42 100644 --- a/test/sequentialQuantile-test.js +++ b/test/sequentialQuantile-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleSequentialQuantile} from "../src/index.js"; +import {scaleSequentialQuantile} from "d3-scale"; it("sequentialQuantile() clamps", () => { const s = scaleSequentialQuantile().domain([0, 1, 2, 3, 10]); diff --git a/test/sqrt-test.js b/test/sqrt-test.js index c54b1c7..6298a12 100644 --- a/test/sqrt-test.js +++ b/test/sqrt-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleSqrt} from "../src/index.js"; +import {scaleSqrt} from "d3-scale"; it("scaleSqrt() has the expected defaults", () => { const s = scaleSqrt(); diff --git a/test/symlog-test.js b/test/symlog-test.js index 4e33341..9a87b57 100644 --- a/test/symlog-test.js +++ b/test/symlog-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleSymlog} from "../src/index.js"; +import {scaleSymlog} from "d3-scale"; import {assertInDelta} from "./asserts.js"; it("scaleSymlog() has the expected defaults", () => { diff --git a/test/threshold-test.js b/test/threshold-test.js index 0b30ea4..6eea847 100644 --- a/test/threshold-test.js +++ b/test/threshold-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {scaleThreshold} from "../src/index.js"; +import {scaleThreshold} from "d3-scale"; it("scaleThreshold() has the expected defaults", () => { const x = scaleThreshold(); diff --git a/test/tickFormat-test.js b/test/tickFormat-test.js index a870527..cc421ec 100644 --- a/test/tickFormat-test.js +++ b/test/tickFormat-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {tickFormat} from "../src/index.js"; +import {tickFormat} from "d3-scale"; it("tickFormat(start, stop, count) returns a format suitable for the ticks", () => { assert.strictEqual(tickFormat(0, 1, 10)(0.2), "0.2"); diff --git a/test/time-test.js b/test/time-test.js index 8d4614f..33434db 100644 --- a/test/time-test.js +++ b/test/time-test.js @@ -2,7 +2,7 @@ import assert from "node:assert"; import {it} from "vitest"; import {interpolateHsl} from "d3-interpolate"; import {timeDay, timeMinute, timeMonth, timeWeek, timeYear} from "d3-time"; -import {scaleTime} from "../src/index.js"; +import {scaleTime} from "d3-scale"; import {local} from "./date.js"; it("time.domain([-1e50, 1e50]) is equivalent to time.domain([NaN, NaN])", () => { diff --git a/test/utcTime-test.js b/test/utcTime-test.js index 7b372ef..e2dcebc 100644 --- a/test/utcTime-test.js +++ b/test/utcTime-test.js @@ -2,7 +2,7 @@ import assert from "node:assert"; import {it} from "vitest"; import {interpolateHsl} from "d3-interpolate"; import {utcDay, utcMinute, utcMonth, utcWeek, utcYear} from "d3-time"; -import {scaleUtc} from "../src/index.js"; +import {scaleUtc} from "d3-scale"; import {utc} from "./date.js"; it("scaleUtc.nice() is an alias for scaleUtc.nice(10)", () => { diff --git a/vitest.config.js b/vitest.config.js index b728050..d2b9b08 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-scale": "src/index.js"}}, + test: {include: ["test/**/*-test.js"]} +}); From cfb9056db1b694ab8a8f6fd1a7124b0eca36882f Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 22:46:10 -0800 Subject: [PATCH 09/10] update dependencies --- package.json | 2 +- pnpm-lock.yaml | 56 +++++++++++++++++++++++++------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 18cce1f..2e683e9 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@eslint/js": "^10.0.1", "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-terser": "^1.0.2", - "d3-color": "^3.1.0", + "d3-color": "^3.1.1", "eslint": "^10.14.0", "globals": "^17.14.0", "rollup": "^4.67.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6385c1..5ff4689 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,19 +10,19 @@ importers: dependencies: d3-array: specifier: 2.10.0 - 3 - version: 3.2.4 + version: 3.2.5 d3-format: specifier: 1 - 3 - version: 3.1.2 + version: 3.1.3 d3-interpolate: specifier: 1.2.0 - 3 - version: 3.0.1 + version: 3.0.2 d3-time: specifier: 2.1.1 - 3 - version: 3.1.0 + version: 3.1.1 d3-time-format: specifier: 2 - 4 - version: 4.1.0 + version: 4.1.1 devDependencies: '@eslint/js': specifier: ^10.0.1 @@ -34,8 +34,8 @@ importers: specifier: ^1.0.2 version: 1.0.2(rollup@4.67.4) d3-color: - specifier: ^3.1.0 - version: 3.1.0 + specifier: ^3.1.1 + version: 3.1.1 eslint: specifier: ^10.14.0 version: 10.14.0 @@ -494,28 +494,28 @@ 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'} - d3-color@3.1.0: - resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + d3-color@3.1.1: + resolution: {integrity: sha512-lfab8x0Bj0UO7SNsY8dZSbNIA6ipbkE3X0NG9nqjCu6CfCHZseuDnOSJY7hidKrjpP++i1M2qT+FlAdPKYRilA==} engines: {node: '>=12'} - d3-format@3.1.2: - resolution: {integrity: sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==} + d3-format@3.1.3: + resolution: {integrity: sha512-+F+/49swqmGuQJmSKnVMIDH/QkEFV5li9QRj0xm/KhyAUBv099O5PrvpQFxBp24PYph17Mnvt9mjKQV0ii0nMA==} engines: {node: '>=12'} - d3-interpolate@3.0.1: - resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + d3-interpolate@3.0.2: + resolution: {integrity: sha512-IRzGU62DtxhvsnSTWMQIdnoZ6gA+BCWwBon1EJI6SjoN595799b6z/QRBzXfFhE8iupUPp3042yBNo0STPqnzQ==} engines: {node: '>=12'} - d3-time-format@4.1.0: - resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + d3-time-format@4.1.1: + resolution: {integrity: sha512-22XaqjyCjpqgda20erhsOjGmC3vvYwTNYniKAd45W5UWLDF43moeOuV9qYpRqobIlsnK0UhnKZjUUJm3VgORUA==} engines: {node: '>=12'} - d3-time@3.1.0: - resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + d3-time@3.1.1: + resolution: {integrity: sha512-Ze7rjrhMzdeulh0/hjcfFj7XLAHOfowtEMfsoG6DU866HPynQNW7Wfen6hzXcqKTv8XzxvF6Hzr5XD6bMHr2ug==} engines: {node: '>=12'} debug@4.4.3: @@ -1340,25 +1340,25 @@ 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 - d3-color@3.1.0: {} + d3-color@3.1.1: {} - d3-format@3.1.2: {} + d3-format@3.1.3: {} - d3-interpolate@3.0.1: + d3-interpolate@3.0.2: dependencies: - d3-color: 3.1.0 + d3-color: 3.1.1 - d3-time-format@4.1.0: + d3-time-format@4.1.1: dependencies: - d3-time: 3.1.0 + d3-time: 3.1.1 - d3-time@3.1.0: + d3-time@3.1.1: dependencies: - d3-array: 3.2.4 + d3-array: 3.2.5 debug@4.4.3: dependencies: From c8f288bf11b82ea4b92c8342c2235f58b823378a Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 22:46:21 -0800 Subject: [PATCH 10/10] 4.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2e683e9..b770ab2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "d3-scale", - "version": "4.0.2", + "version": "4.0.3", "description": "Encodings that map abstract data to visual representation.", "homepage": "https://d3js.org/d3-scale/", "repository": {