diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 815e07e..7369837 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,6 +1,6 @@ name: Bug Report description: Create a bug report to help us improve -title: "[Bug]: " +title: '[Bug]: ' labels: [bug, triage] body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 6d78771..5eb1984 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,6 +1,6 @@ name: Feature request description: Suggest a feature or an improvement -title: "[Feature Request]: " +title: '[Feature Request]: ' labels: [enhancement, triage] body: - type: markdown diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 35ca989..e03d533 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,12 @@ version: 2 updates: - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: 'github-actions' + directory: '/' schedule: - interval: "weekly" + interval: 'weekly' cooldown: default-days: 2 groups: github-actions: patterns: - - "*" + - '*' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 62d1add..95a303c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,7 +3,7 @@ name: Publish Package on: workflow_dispatch permissions: - id-token: write # Required for OIDC + id-token: write # Required for OIDC contents: read jobs: @@ -20,7 +20,7 @@ jobs: with: node-version: 24 registry-url: 'https://registry.npmjs.org' - package-manager-cache: false # never use caching in release builds + package-manager-cache: false # never use caching in release builds - run: pnpm install --frozen-lockfile - name: Lint run: pnpm lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5268d2..f68dc4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,9 @@ name: Test on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] permissions: {} diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 0000000..1a44b93 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,8 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "trailingComma": "es5", + "singleQuote": true, + "printWidth": 80, + "sortPackageJson": false, + "ignorePatterns": ["CHANGELOG.md"] +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..97c774d --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,27 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["typescript", "unicorn", "oxc"], + "categories": { + "correctness": "error" + }, + "rules": { + "array-callback-return": "error", + "complexity": ["error", { "max": 25 }], + "guard-for-in": "error", + "no-bitwise": "error", + "no-case-declarations": "error", + "no-empty": "error", + "no-fallthrough": "error", + "no-labels": "error", + "no-prototype-builtins": "error", + "no-redeclare": "error", + "no-regex-spaces": "error", + "no-void": "error", + "preserve-caught-error": "error", + "unicorn/no-array-for-each": "error", + "unicorn/no-array-reduce": "error" + }, + "env": { + "builtin": true + } +} diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index c6a1376..0000000 --- a/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "trailingComma": "es5", - "singleQuote": true -} diff --git a/CHANGELOG.md b/CHANGELOG.md index 98a506c..0d7cc2c 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,3 @@ - # Changelog All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. @@ -7,112 +6,107 @@ All notable changes to this project will be documented in this file. See [commit ### Bug Fixes -* Improve rounding +- Improve rounding ## [11.0.0-rc.0](https://github.com/postcss/postcss-calc/compare/v10.1.1...v11.0.0-rc.0) (2026-07-17) ### Breaking changes -* Requires Node.js 22.12 or greater +- Requires Node.js 22.12 or greater ### Features -* **core:** pratt tokenizer, parser, AST, type system ([549c8ad](https://github.com/postcss/postcss-calc/commit/549c8ad2677869ce8185e281b82f9b3b4e6ab8f4)) -* **core:** simplifier (per-function fold modules) + serializer ([9e82450](https://github.com/postcss/postcss-calc/commit/9e8245061fb5aa3e82dc0de003684eea6f60ff81)) -* **plugin:** PostCSS adapter + public entry + v10 regression patches ([b588797](https://github.com/postcss/postcss-calc/commit/b5887974590be7fce8c2cf6f07e8cae993d37618)) - +- **core:** pratt tokenizer, parser, AST, type system ([549c8ad](https://github.com/postcss/postcss-calc/commit/549c8ad2677869ce8185e281b82f9b3b4e6ab8f4)) +- **core:** simplifier (per-function fold modules) + serializer ([9e82450](https://github.com/postcss/postcss-calc/commit/9e8245061fb5aa3e82dc0de003684eea6f60ff81)) +- **plugin:** PostCSS adapter + public entry + v10 regression patches ([b588797](https://github.com/postcss/postcss-calc/commit/b5887974590be7fce8c2cf6f07e8cae993d37618)) ### Bug Fixes -* **core:** spec-compliant -{ident-start} tokenization + selectors fix ([dcb34c1](https://github.com/postcss/postcss-calc/commit/dcb34c12cc6491495904283504184a7baea3626c)) -* **mod-rem:** match IEEE-754 signed-zero semantics on exact-multiple results ([ef9b1f6](https://github.com/postcss/postcss-calc/commit/ef9b1f634e065dcceb855969b224f2168d9d5a09)) -* **product:** flatten negated single-term Sum so cancellation can see through it ([61fe7b3](https://github.com/postcss/postcss-calc/commit/61fe7b370dc7d4ce9f4c5c2b5297e717014cf33b)) -* **product:** fold dim value in original position to match left-to-right evaluation order ([af0835b](https://github.com/postcss/postcss-calc/commit/af0835b1f17407add03649ae7e91acea865695d1)) -* **round:** strategy-dependent result for infinite step ([ffdb50e](https://github.com/postcss/postcss-calc/commit/ffdb50e11f2e0fcb8eba9ceb01709f196e4e9cde)) -* **serialize:** preserve signed zero and drop redundant coefficient when folding leading negation ([09b2453](https://github.com/postcss/postcss-calc/commit/09b2453b1c1c40f02c42dabb6ac05506473eee9f)) -* update TypeScript ([0b7ff00](https://github.com/postcss/postcss-calc/commit/0b7ff00e4bbfa824e98a755861ea818863730b21)) +- **core:** spec-compliant -{ident-start} tokenization + selectors fix ([dcb34c1](https://github.com/postcss/postcss-calc/commit/dcb34c12cc6491495904283504184a7baea3626c)) +- **mod-rem:** match IEEE-754 signed-zero semantics on exact-multiple results ([ef9b1f6](https://github.com/postcss/postcss-calc/commit/ef9b1f634e065dcceb855969b224f2168d9d5a09)) +- **product:** flatten negated single-term Sum so cancellation can see through it ([61fe7b3](https://github.com/postcss/postcss-calc/commit/61fe7b370dc7d4ce9f4c5c2b5297e717014cf33b)) +- **product:** fold dim value in original position to match left-to-right evaluation order ([af0835b](https://github.com/postcss/postcss-calc/commit/af0835b1f17407add03649ae7e91acea865695d1)) +- **round:** strategy-dependent result for infinite step ([ffdb50e](https://github.com/postcss/postcss-calc/commit/ffdb50e11f2e0fcb8eba9ceb01709f196e4e9cde)) +- **serialize:** preserve signed zero and drop redundant coefficient when folding leading negation ([09b2453](https://github.com/postcss/postcss-calc/commit/09b2453b1c1c40f02c42dabb6ac05506473eee9f)) +- update TypeScript ([0b7ff00](https://github.com/postcss/postcss-calc/commit/0b7ff00e4bbfa824e98a755861ea818863730b21)) ## [10.1.1](https://github.com/postcss/postcss-calc/compare/v10.1.0...v10.1.1) (2025-01-31) - ### Bug Fixes -* handle calc keywords correctly ([#234](https://github.com/postcss/postcss-calc/issues/234)) ([87d57ef](https://github.com/postcss/postcss-calc/commit/87d57ef74d897fb2b9f1ecc759bedaecee3989e6)), closes [#210](https://github.com/postcss/postcss-calc/issues/210) +- handle calc keywords correctly ([#234](https://github.com/postcss/postcss-calc/issues/234)) ([87d57ef](https://github.com/postcss/postcss-calc/commit/87d57ef74d897fb2b9f1ecc759bedaecee3989e6)), closes [#210](https://github.com/postcss/postcss-calc/issues/210) ## [10.1.0](https://github.com/postcss/postcss-calc/compare/v10.0.2...v10.1.0) (2025-01-07) - ### Features -* add support for lh & rlh units ([9b6d7a1](https://github.com/postcss/postcss-calc/commit/9b6d7a16553f9d61ef8097f4e5425ae0c8a7574f)) - +- add support for lh & rlh units ([9b6d7a1](https://github.com/postcss/postcss-calc/commit/9b6d7a16553f9d61ef8097f4e5425ae0c8a7574f)) ### Bug Fixes -* Ignore calc-size from detection ([#230](https://github.com/postcss/postcss-calc/issues/230)) ([cac6f39](https://github.com/postcss/postcss-calc/commit/cac6f39951617b45bc5bed84be3ed099df619bbf)) +- Ignore calc-size from detection ([#230](https://github.com/postcss/postcss-calc/issues/230)) ([cac6f39](https://github.com/postcss/postcss-calc/commit/cac6f39951617b45bc5bed84be3ed099df619bbf)) ## [10.0.2](https://github.com/postcss/postcss-calc/compare/v10.0.1...v10.0.2) (2024-08-16) - ### Bug Fixes -* add support for svh, lvh, dvh, svw, lvw, dvw, svmin, lvmin, dvmin, svmax, lvmax, dvmax units ([f5eaea1](https://github.com/postcss/postcss-calc/commit/f5eaea129f0546451638c6508009a5cfff1a6ddc)) +- add support for svh, lvh, dvh, svw, lvw, dvw, svmin, lvmin, dvmin, svmax, lvmax, dvmax units ([f5eaea1](https://github.com/postcss/postcss-calc/commit/f5eaea129f0546451638c6508009a5cfff1a6ddc)) # [11.0.1](https://github.com/postcss/postcss-calc/compare/v10.0.0...v10.0.1) (2024-08-05) ## Bug Fixes -* add support for container query units ([#214](https://github.com/postcss/postcss-calc/issues/214)) ([3f2b43a](https://github.com/postcss/postcss-calc/commit/3f2b43a9d65589c907fa8cbb79a6141603c56c3d)), closes [#199](https://github.com/postcss/postcss-calc/issues/199) -* update postcss-selector-parser ([3606777](https://github.com/postcss/postcss-calc/commit/3606777a1611bdfa67672e4dadd6c1b1871e163f)) -* update postcss-selector-parser ([a03fb73](https://github.com/postcss/postcss-calc/commit/a03fb73c0d60845c2f98918d8108e231b8f7f80d)) +- add support for container query units ([#214](https://github.com/postcss/postcss-calc/issues/214)) ([3f2b43a](https://github.com/postcss/postcss-calc/commit/3f2b43a9d65589c907fa8cbb79a6141603c56c3d)), closes [#199](https://github.com/postcss/postcss-calc/issues/199) +- update postcss-selector-parser ([3606777](https://github.com/postcss/postcss-calc/commit/3606777a1611bdfa67672e4dadd6c1b1871e163f)) +- update postcss-selector-parser ([a03fb73](https://github.com/postcss/postcss-calc/commit/a03fb73c0d60845c2f98918d8108e231b8f7f80d)) # 10.0.0 (2024-04-26) ## Breaking Changes -* drop support for Node.js 14, 16, 19 and 21 +- drop support for Node.js 14, 16, 19 and 21 # 9.0.1 (2023-05-05) ## Bug Fixes -* fix disappearing calc expression when source contains extra brackets ([18bb47bd0](https://github.com/postcss/postcss-calc/commit/18bb47bd095d2a5b224b0a60521e52f620474b3d)) +- fix disappearing calc expression when source contains extra brackets ([18bb47bd0](https://github.com/postcss/postcss-calc/commit/18bb47bd095d2a5b224b0a60521e52f620474b3d)) # 9.0.0 (2023-04-29) ## Breaking Changes -* drop support for Node.js versions before 14 +- drop support for Node.js versions before 14 # [8.2.4](https://github.com/postcss/postcss-calc/compare/v8.2.3...v8.2.4) (2022-02-05) ## Patch Changes -* convert source to CommonJS and publish untranspiled code ([b55adcb](https://github.com/postcss/postcss-calc/commit/b55adcb285ea8d385bf802a0f7edeb2d12be1549)) +- convert source to CommonJS and publish untranspiled code ([b55adcb](https://github.com/postcss/postcss-calc/commit/b55adcb285ea8d385bf802a0f7edeb2d12be1549)) # [8.2.3](https://github.com/postcss/postcss-calc/compare/v8.2.2...v8.2.3) (2022-01-28) ## Bug Fixes -* improve types ([f2cce1b](https://github.com/postcss/postcss-calc/commit/f2cce1bc1d47af7ab02891c61b4c1485d6e6dfd3)) +- improve types ([f2cce1b](https://github.com/postcss/postcss-calc/commit/f2cce1bc1d47af7ab02891c61b4c1485d6e6dfd3)) ## [8.2.2](https://github.com/postcss/postcss-calc/compare/v8.2.1...v8.2.2) (2022-01-12) ## Bug Fixes -* respect CSS var when reducing ([99d9fa5](https://github.com/postcss/postcss-calc/commit/99d9fa53a7fba3586590d0c45a0982b09e8bf5c6)) +- respect CSS var when reducing ([99d9fa5](https://github.com/postcss/postcss-calc/commit/99d9fa53a7fba3586590d0c45a0982b09e8bf5c6)) # [8.2.1](https://github.com/postcss/postcss-calc/compare/v8.2.0...v8.2.1) (2022-01-11) ## Bug Fixes -* preserve brackets around functions ([0b70a1d](https://github.com/postcss/postcss-calc/commit/0b70a1d5773f17373991b1294e3ae618600aae7d)), closes [#113](https://github.com/postcss/postcss-calc/issues/113) [#115](https://github.com/postcss/postcss-calc/issues/115) +- preserve brackets around functions ([0b70a1d](https://github.com/postcss/postcss-calc/commit/0b70a1d5773f17373991b1294e3ae618600aae7d)), closes [#113](https://github.com/postcss/postcss-calc/issues/113) [#115](https://github.com/postcss/postcss-calc/issues/115) # [8.2.0](https://github.com/postcss/postcss-calc/compare/v8.1.0...v8.2.0) (2022-01-07) ## Features -* add types ([#155](https://github.com/postcss/postcss-calc/issues/155)) ([4c96c79](https://github.com/postcss/postcss-calc/commit/4c96c793fbc7807bb138d05b92a93bd29a2e94ac)) +- add types ([#155](https://github.com/postcss/postcss-calc/issues/155)) ([4c96c79](https://github.com/postcss/postcss-calc/commit/4c96c793fbc7807bb138d05b92a93bd29a2e94ac)) # [8.1.0](https://github.com/postcss/postcss-calc/compare/v8.0.0...v8.1.0) (2022-01-03) @@ -185,7 +179,7 @@ All notable changes to this project will be documented in this file. See [commit # 5.3.1 - 2016-08-22 -- Fixed: avoid security issue related to ``reduce-css-calc@< 1.2.4``. +- Fixed: avoid security issue related to `reduce-css-calc@< 1.2.4`. # 5.3.0 - 2016-07-11 @@ -200,12 +194,12 @@ All notable changes to this project will be documented in this file. See [commit # 5.2.0 - 2016-01-08 - Added: "mediaQueries" option for `@media` support -([#22](https://github.com/postcss/postcss-calc/pull/22)) + ([#22](https://github.com/postcss/postcss-calc/pull/22)) # 5.1.0 - 2016-01-07 - Added: "warnWhenCannotResolve" option to warn when calc() are not reduced to a single value -([#20](https://github.com/postcss/postcss-calc/pull/20)) + ([#20](https://github.com/postcss/postcss-calc/pull/20)) # 5.0.0 - 2015-08-25 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4af36e2..7ffd190 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,40 +5,40 @@ The following outlines a set of guidelines for contributing to this project. The ## Asking questions Prefer asking questions in the [PostCSS chat](https://gitter.im/postcss/postcss) over opening issues. -Leveraging the community would likely get you an answer faster, as well as leave us available to solve issues and make the product better. +Leveraging the community would likely get you an answer faster, as well as leave us available to solve issues and make the product better. ## Reporting Bugs -Before submitting a new issue, be sure to make a cursory search to see if the problem has already been reported. If it has and the issue is still open, leave a comment on the existing issue instead of opening a new one. +Before submitting a new issue, be sure to make a cursory search to see if the problem has already been reported. If it has and the issue is still open, leave a comment on the existing issue instead of opening a new one. If no prior issue exist, create a new one. Explain the problem and include additional details to help maintainers reproduce the problem: -* Use a clear and descriptive title. -* Summarize the problem you are having. -* Include details about your configuration and environment. -* Provide steps to reproduce the problem. -* Describe what behavior you expected to see. +- Use a clear and descriptive title. +- Summarize the problem you are having. +- Include details about your configuration and environment. +- Provide steps to reproduce the problem. +- Describe what behavior you expected to see. ## Requesting Enhancements -Before submitting a new issue, be sure to make a cursory search to see if the enhancement has already been requested. If no such issue exists, create a new one and detail it to the best of your ability: +Before submitting a new issue, be sure to make a cursory search to see if the enhancement has already been requested. If no such issue exists, create a new one and detail it to the best of your ability: -* Use a clear and descriptive title. -* Provide a description of the proposed enhancement. -* Exemplify what needs/uses this enhancement would address. +- Use a clear and descriptive title. +- Provide a description of the proposed enhancement. +- Exemplify what needs/uses this enhancement would address. ## Submitting Pull Requests Before contributing any code to the project, be sure to either open a new issue in the issue tracker detailing what you intend to contribute, or comment on an existing issue if one exists. This allows us to: -* give feedback early on before significant effort has been put into the endevour. -* align your contribution with ongoing efforts. -* make sure that there's no ongoing effort into the issue already. +- give feedback early on before significant effort has been put into the endevour. +- align your contribution with ongoing efforts. +- make sure that there's no ongoing effort into the issue already. -When submitting your pull request, make sure that you: +When submitting your pull request, make sure that you: -* use a clear and descriptive title. -* summarize your contribution. -* list the issues that this contribution addresses. -* include tests for your contribution. +- use a clear and descriptive title. +- summarize your contribution. +- list the issues that this contribution addresses. +- include tests for your contribution. diff --git a/README.md b/README.md index cd2635d..4108926 100755 --- a/README.md +++ b/README.md @@ -17,18 +17,15 @@ npm install postcss-calc ```js // dependencies -var fs = require("fs") -var postcss = require("postcss") -var calc = require("postcss-calc") +var fs = require('fs'); +var postcss = require('postcss'); +var calc = require('postcss-calc'); // css to be processed -var css = fs.readFileSync("input.css", "utf8") +var css = fs.readFileSync('input.css', 'utf8'); // process css -var output = postcss() - .use(calc()) - .process(css) - .css +var output = postcss().use(calc()).process(css).css; ``` Using this `input.css`: @@ -37,7 +34,7 @@ Using this `input.css`: h1 { font-size: calc(16px * 2); height: calc(100px - 2em); - width: calc(2*var(--base-width)); + width: calc(2 * var(--base-width)); margin-bottom: calc(16px * 1.5); } ``` @@ -48,10 +45,11 @@ you will get: h1 { font-size: 32px; height: calc(100px - 2em); - width: calc(2*var(--base-width)); - margin-bottom: 24px + width: calc(2 * var(--base-width)); + margin-bottom: 24px; } ``` + Checkout [tests] for more examples. ### Options @@ -62,9 +60,8 @@ Allow you to define the precision for decimal numbers. ```js var out = postcss() - .use(calc({precision: 10})) - .process(css) - .css + .use(calc({ precision: 10 })) + .process(css).css; ``` #### `preserve` (default: `false`) @@ -74,9 +71,8 @@ precision themselves. ```js var out = postcss() - .use(calc({preserve: true})) - .process(css) - .css + .use(calc({ preserve: true })) + .process(css).css; ``` #### `warnWhenCannotResolve` (default: `false`) @@ -85,9 +81,8 @@ Adds warnings when calc() are not reduced to a single value. ```js var out = postcss() - .use(calc({warnWhenCannotResolve: true})) - .process(css) - .css + .use(calc({ warnWhenCannotResolve: true })) + .process(css).css; ``` #### `mediaQueries` (default: `false`) @@ -96,9 +91,8 @@ Allows calc() usage as part of media query declarations. ```js var out = postcss() - .use(calc({mediaQueries: true})) - .process(css) - .css + .use(calc({ mediaQueries: true })) + .process(css).css; ``` #### `selectors` (default: `false`) @@ -107,15 +101,14 @@ Allows calc() usage as part of selectors. ```js var out = postcss() - .use(calc({selectors: true})) - .process(css) - .css + .use(calc({ selectors: true })) + .process(css).css; ``` Example: ```css -div[data-size="calc(3*3)"] { +div[data-size='calc(3*3)'] { width: 100px; } ``` @@ -129,8 +122,8 @@ Callback invoked when a `calc()` body fails to parse or simplify. Matches calc({ onParseError: (err, input) => { throw err; // or log, route to a different channel, etc. - } -}) + }, +}); ``` When omitted, errors are reported via PostCSS `result.warn()` so the @@ -178,6 +171,7 @@ canonical-form decisions: --- ## Related PostCSS plugins + To replace the value of CSS custom properties at build time, try [PostCSS Custom Properties]. ## Contributing @@ -200,7 +194,6 @@ npm test [git-url]: https://gitter.im/postcss/postcss [npm-img]: https://img.shields.io/npm/v/postcss-calc.svg [npm-url]: https://www.npmjs.com/package/postcss-calc - [PostCSS]: https://github.com/postcss [PostCSS Calc]: https://github.com/postcss/postcss-calc [PostCSS Custom Properties]: https://github.com/postcss/postcss-custom-properties diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index e2ff9f5..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,63 +0,0 @@ -const js = require('@eslint/js'); -const eslintConfigPrettier = require('eslint-config-prettier'); -const sonarjs = require('eslint-plugin-sonarjs'); - -module.exports = [ - { - ignores: ['node_modules/**', '.stryker-tmp/**', 'reports/**', 'types/**'], - }, - js.configs.recommended, - // SonarJS — code smells, cognitive complexity, dead stores, etc. - { - files: ['src/**/*.js', 'test/**/*.mjs', 'scripts/**/*.mjs'], - plugins: { sonarjs }, - rules: { - ...sonarjs.configs.recommended.rules, - // Math hot paths (simplify, tokenizer, foldConstArgs, naive oracles) - // have intrinsic complexity that's not extractable without diluting - // single-pass intent. Default 15 is too tight; 25 still flags real - // accidental complexity. - 'sonarjs/cognitive-complexity': ['error', 25], - }, - }, - { - rules: { - // Underscore-prefix is the convention for "intentionally unused". - 'no-unused-vars': [ - 'error', - { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, - ], - }, - }, - eslintConfigPrettier, - { - files: ['src/**/*.js', 'test/**/*.js', 'eslint.config.js'], - languageOptions: { - sourceType: 'commonjs', - globals: { - process: 'readonly', - require: 'readonly', - module: 'readonly', - __dirname: 'readonly', - Buffer: 'readonly', - }, - }, - rules: { - curly: 'error', - }, - }, - { - files: ['**/*.mjs'], - languageOptions: { - sourceType: 'module', - globals: { - console: 'readonly', - performance: 'readonly', - process: 'readonly', - fetch: 'readonly', - URL: 'readonly', - setTimeout: 'readonly', - }, - }, - }, -]; diff --git a/package.json b/package.json index f26d599..b16a7ad 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "LICENSE" ], "scripts": { - "lint": "eslint . && tsc", + "lint": "oxlint . && tsc && oxfmt --check", + "fmt": "oxfmt", "test": "node --test", "test:mutation": "stryker run" }, @@ -33,18 +34,15 @@ }, "devDependencies": { "@csstools/css-calc": "^3.2.1", - "@eslint/js": "^10.0.1", "@rmenke/css-tokenizer-tests": "^1.2.0", "@stryker-mutator/core": "^9.6.1", "@stryker-mutator/tap-runner": "^9.6.1", "@stryker-mutator/typescript-checker": "^9.6.1", "@types/node": "^26.1.1", - "eslint": "^10.7.0", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-sonarjs": "^4.2.0", "fast-check": "^4.9.0", + "oxfmt": "^0.61.0", + "oxlint": "^1.76.0", "postcss": "^8.5.19", - "prettier": "^3.9.5", "typescript": "~6.0.3" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 67414e3..11a65a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,9 +18,6 @@ importers: '@csstools/css-calc': specifier: ^3.2.1 version: 3.2.1(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0) - '@eslint/js': - specifier: ^10.0.1 - version: 10.0.1(eslint@10.7.0) '@rmenke/css-tokenizer-tests': specifier: ^1.2.0 version: 1.2.0 @@ -36,24 +33,18 @@ importers: '@types/node': specifier: ^26.1.1 version: 26.1.1 - eslint: - specifier: ^10.7.0 - version: 10.7.0 - eslint-config-prettier: - specifier: ^10.1.8 - version: 10.1.8(eslint@10.7.0) - eslint-plugin-sonarjs: - specifier: ^4.2.0 - version: 4.2.0(eslint@10.7.0) fast-check: specifier: ^4.9.0 version: 4.9.0 + oxfmt: + specifier: ^0.61.0 + version: 0.61.0 + oxlint: + specifier: ^1.76.0 + version: 1.76.0 postcss: specifier: ^8.5.19 version: 8.5.19 - prettier: - specifier: ^3.9.5 - version: 3.9.5 typescript: specifier: ~6.0.3 version: 6.0.3 @@ -230,65 +221,6 @@ packages: resolution: {integrity: sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==} engines: {node: '>=20.19.0'} - '@eslint-community/eslint-utils@4.9.1': - resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} - 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.23.5': - resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - - '@eslint/config-helpers@0.6.0': - resolution: {integrity: sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - - '@eslint/core@1.2.1': - resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - - '@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@3.0.5': - resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - - '@eslint/plugin-kit@0.7.2': - resolution: {integrity: sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - - '@humanfs/core@0.19.2': - resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} - engines: {node: '>=18.18.0'} - - '@humanfs/node@0.16.8': - resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} - engines: {node: '>=18.18.0'} - - '@humanfs/types@0.15.0': - resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} - engines: {node: '>=18.18.0'} - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/retry@0.4.3': - resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} - engines: {node: '>=18.18'} - '@inquirer/ansi@2.0.7': resolution: {integrity: sha512-3eTuUO1vH2cZm2ZKHeQxnOqlTi9EfZDGgIe3BL3I4u+rJHocr9Fz86M4fjYABPvFnQG/gGK551HqDiIcETwU6Q==} engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} @@ -439,6 +371,250 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@oxfmt/binding-android-arm-eabi@0.61.0': + resolution: {integrity: sha512-BaS+1OVvg9sr+Xav0+KdWedQRcAzrdoEcwMZeqoc2F6ieC1s/t5eM35YQoRPQ7vAqkZ+p3tbQb1r9I9mrV5oGA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxfmt/binding-android-arm64@0.61.0': + resolution: {integrity: sha512-of8atAV0M1egGcVOMbgZCvc10sFOP3ayQBNQV5h5G3fNq8gACdEswfFk9bzGrdbM23rtg0Coxi7np7oPLcueNw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxfmt/binding-darwin-arm64@0.61.0': + resolution: {integrity: sha512-7l8+5ov4BGwtAcmpzvEik/TG3bciwyw/S3e6j5GKH7pcQqcgCVxD3AuJeP6upto+SOTBKQ4wrrdbMt0gq8fHSQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxfmt/binding-darwin-x64@0.61.0': + resolution: {integrity: sha512-Fnz4dDDXBb7udk+DmwelNjxbD6yptyxwCqwCH2ebo4RVLxVsRfFsn/AHJC49KIltPrVokamGv4SSOsiV50DTxQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxfmt/binding-freebsd-x64@0.61.0': + resolution: {integrity: sha512-mddOebKNCP+AucmzfNsk3jgbr681qAUvgMqi865GW5gWLJ/AnzXbvjQRrny0e++NAN8aphav/aRSrfFxNsNjpA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxfmt/binding-linux-arm-gnueabihf@0.61.0': + resolution: {integrity: sha512-svx59iYL+DbaZGZUIoice4W0CjRXGExnbz7Re+awIb60rVxBS2KrU7Hnlx+nZYanLGLpjneUEgo/VFEKkSZAyQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm-musleabihf@0.61.0': + resolution: {integrity: sha512-BYK9MPJPCf6d+fLKMTruThmEyCtHzQ1zLcsrTlUVkmnoXIaHAbfpeLYQwX1tkjs7W11dyzoi6HFvKcdnvX1zNg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm64-gnu@0.61.0': + resolution: {integrity: sha512-QUaCNLq2/EC6G5ljOuFanl9Lgw6ZWp4co7rs4+KOMUzbGfA4Lq58FHRjjF9sVIG+93XSbo343MxFATrOU1qctA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-arm64-musl@0.61.0': + resolution: {integrity: sha512-S6uvJ6MXnRXl+zTs0CARNDvkE+cymj0EVWEKKsyKnlLlqTyQJBjw5s4D2pSIOZc+S46cy4STefzcr/sm0VzVPA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-ppc64-gnu@0.61.0': + resolution: {integrity: sha512-6VDlRcytvZG6UlSIdAFKDLbppo9tvPxrWzle6vHldYFMeuDPQEfMKrkwezp7FaBq1wik9ra554ZZeRPsyIkFpg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-gnu@0.61.0': + resolution: {integrity: sha512-KkBTYbzExpbmn15XjKPLu2fRV2PVlq+KWt+brad5rwIa03vdYoaDRWiS7raHII/dCTR6Ro4UpYUCH4t6lif4WQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-musl@0.61.0': + resolution: {integrity: sha512-69tzIq7sJLVB9dxYYtvMzcSSsnZHSO+U2U19O2RqDqgj6+Q4O7HjSXdaszbcgqzhsUwzSH7z5kWvk8nmf6BHTg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-s390x-gnu@0.61.0': + resolution: {integrity: sha512-Oqi/N0OvtOVXsPKAOOhKgGH3msRYF8BLJaNBbWiupRiKoKVyc8JRKPCfarkQJC+RgP9U8raUKLe+bNwd0HUMiA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-gnu@0.61.0': + resolution: {integrity: sha512-3TKwv/ed4uwJSemAA8P9XcoqETpjQI4waquF9UilhA9Mn/dhr1PdUEXWlL74mtc6ZNfmKPA9+NEJm01nRF8CVA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-musl@0.61.0': + resolution: {integrity: sha512-uFso4u4nLkVSlMCpgjyvWV60Gt7GvDQHnk1mmRxHIkZTMB0ljpUKwCD9FYGgN9H97x2wYl0UwEjgRZaPIuhEhw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-openharmony-arm64@0.61.0': + resolution: {integrity: sha512-keGLkzeOvkMpNmPp4hffXWpfoSsY6e1K8++KXD4mSSfxdvM8q9QUDsYY689TB1k6Co832DZn1MnaaVx6cIBMWQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxfmt/binding-win32-arm64-msvc@0.61.0': + resolution: {integrity: sha512-VzsAISkFxmNhJ5LBDEL9VuH6tJsVJMtqYit2LyIUf/HLnsCe4Pg9SMOjjVQzGWt0bnpyfJ94CrqTqcpNZzK+ug==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxfmt/binding-win32-ia32-msvc@0.61.0': + resolution: {integrity: sha512-xv4t7yzwJoYaLB6Zv28B3W+j7brEjsyv50rLTAQgmxJzddce9fAMCxed8dSAkbWES0zz2J29nYK5FaTuD2YBHg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxfmt/binding-win32-x64-msvc@0.61.0': + resolution: {integrity: sha512-6EZXFkqOwxdDYjIn3TSNnPk3ST5E5GiYd4FiM6UF/mCL/LZSfr6D6UygTfW3R1PCQP2quCKpCEGRlij8E3VYbg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@oxlint/binding-android-arm-eabi@1.76.0': + resolution: {integrity: sha512-ZHIE5Zt9AsPDcY4nOlofXt0YfneEeo+QrKMPcPzLf2Z6Q8VtV2W73d7SFJ920WUwyik783u/doKCs3KXdwG+7w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxlint/binding-android-arm64@1.76.0': + resolution: {integrity: sha512-shm/ngQilHK6bs+ElJWa4oHfNj5vL1Gl/iVEJldTQjpr0/67oSgr0KUpbmcnLig5Fo0v/l6j2567A7TOL89ONA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxlint/binding-darwin-arm64@1.76.0': + resolution: {integrity: sha512-rvJmrAPKSQ9aWJ6wIS6CK2tJjwzfW0ApQH9qokq6sfDvmHwoyIHxHFMq7z7i7GiV6fdE6s8qvBqWKPTu8RmT6Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxlint/binding-darwin-x64@1.76.0': + resolution: {integrity: sha512-U/zYdb7VYKGY6pA9Vd2rYl9O/HlCylcOlb5PGPvVLtg+oLGsk6H3XGKEMHKyqD3nmmtmlmwb/8SwU2vfSAtvMw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxlint/binding-freebsd-x64@1.76.0': + resolution: {integrity: sha512-WvKG9CAriuo0XNiFzpXjDngUZcRGFNpaK2kLyMUsnJlShxkT96u+BpJQ3KqdQwGOrvI14L6V8bAwXwAYNNY6Jg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxlint/binding-linux-arm-gnueabihf@1.76.0': + resolution: {integrity: sha512-qJ5+RH99TqFRq3UCDxkW0zJJu9c+OAHFY72vGlxZLEpuO+MpKo3POgqb8sYipL9KYm8XY6ofb0HsOuvY6hQNqQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm-musleabihf@1.76.0': + resolution: {integrity: sha512-PvPCVptkgVARsucgIqFQQcSmJ6xc6GtnVB5bRBekRahTc9eObMtjHfMjy5M+C2tHt5UCMttWM9RuSk/H9NqYeg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm64-gnu@1.76.0': + resolution: {integrity: sha512-3KeFDx8Bu4HPAXbuHZOr/oHvN+QT+JQhMw/NYPz7Z071xLSsG27Jfh9PIQVEY7hk1I+jr43ExqRIeJ6VKk2yLw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-arm64-musl@1.76.0': + resolution: {integrity: sha512-oPFkkKTgl0K/EIg9fQ8oA3IGcI05/Mq1en04iFa41mmNPT+6KEiByVazTOZZJiHMBBrbsns1YJ2e1Scqwzesjw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxlint/binding-linux-ppc64-gnu@1.76.0': + resolution: {integrity: sha512-gN7yZ0eqflA5Fhf1wvHxGUltIV3FsvmB1zhNMDEK9vSHhc7E6qg9CuPeBgPZab66Tjzq6w6kHAtNEvnTHf4cyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-riscv64-gnu@1.76.0': + resolution: {integrity: sha512-S/HqMbn22mQrjtErUxEoS/a55u8kIeXvreIxiJu5G7Le3UecEd6SQZxrDIpuhtgaFnsY/nVra3ytP+pRljDilA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-riscv64-musl@1.76.0': + resolution: {integrity: sha512-ZIga3097VJZolGZk6SrIAUokIGfRkxRlhiHDUznZptGBfwrhD7pNfD1rzEzsCwvk/1DX0A1bLz+liuNh5QKIVQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxlint/binding-linux-s390x-gnu@1.76.0': + resolution: {integrity: sha512-ZGiiA7pFzMJSyMWYZTVlPgbTsx+Vl8ihLGMIujPwaslUF7kIPPWAbVmAlTc+9lWDV+DCiB8Ikixu+lSHeOIIWQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-x64-gnu@1.76.0': + resolution: {integrity: sha512-JLiy5WuvEBFTT6ErIFV35SLzi0R7Iri6MKU6dZbTxfIx8pndbbPs3Mj780nMipBFcPkti+okAPOJ9POKkHFEgg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-x64-musl@1.76.0': + resolution: {integrity: sha512-z7lgKQtbo/I1NIe8G5NHLesxJDv0tRSUWTpXKb9Pm3E9nKFKfO4IOSDtFroKgXtOYb0jQbcdH+0wzTyMXVes+A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxlint/binding-openharmony-arm64@1.76.0': + resolution: {integrity: sha512-JOjKymIpb9QcYfEhZsN6h4V9Ivd474W38cNIBRv6bg2TbIvogbMTH0Mg6YWW9TiRDqfcX+/Hyfsbo5vcSE5guQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxlint/binding-win32-arm64-msvc@1.76.0': + resolution: {integrity: sha512-pqDWZiwcmByWUEm1NFUBNiT6aentCcaoMWJv0HbXEmuYermJ4sg8ppVrshubYP2MZ6SHccJJcpr6x469PuDFIw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxlint/binding-win32-ia32-msvc@1.76.0': + resolution: {integrity: sha512-Ba0O659kgMv6pwO3z9PdO+K3aMxQRaw9HnG+e6AtOfgwcKFvYilciQYBoUBmxfQvOCKZe1SwjMkuB542NkuDMQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxlint/binding-win32-x64-msvc@1.76.0': + resolution: {integrity: sha512-5qcirPHO8nKfkoowEVWtpAoVTcYDy6g0UT0NGic450Qv8J2NrOqg4uQ8QppRP4MDTC7Xx47lbZnmadTH03CGGA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@rmenke/css-tokenizer-tests@1.2.0': resolution: {integrity: sha512-XfdeXzW5QGc3inl69eid2FTLGY/514xs+VXQWlEzdUVm1QdU6MicU5S2hcEbHoC9WMzIMALTzxiZb49w+xJk0Q==} @@ -478,31 +654,9 @@ packages: '@stryker-mutator/util@9.6.1': resolution: {integrity: sha512-Lk/ALVctJjFv1vvwR+CFoKzDCWvsBlq7flDUnmnpuwTrGbm156EdZD1Jjq4o8KdOap0ezUZqQNE9OAI1m2+pUQ==} - '@types/esrecurse@4.3.1': - resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==} - - '@types/estree@1.0.9': - resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} - - '@types/json-schema@7.0.15': - resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/node@26.1.1': resolution: {integrity: sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==} - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - - acorn@8.17.0: - resolution: {integrity: sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==} - engines: {node: '>=0.4.0'} - hasBin: true - - ajv@6.15.0: - resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} - ajv@8.18.0: resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} @@ -528,14 +682,6 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - builtin-modules@3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} - engines: {node: '>=6'} - - bytes@3.1.2: - resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} - engines: {node: '>= 0.8'} - call-bind-apply-helpers@1.0.2: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} @@ -578,9 +724,6 @@ packages: supports-color: optional: true - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - des.js@1.1.0: resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} @@ -613,63 +756,6 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - eslint-config-prettier@10.1.8: - resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - - eslint-plugin-sonarjs@4.2.0: - resolution: {integrity: sha512-bqADfuNtTL7VK6RU29eoiFTtaaBKIpVPuX3bOl+rBpWSBa0zIBVZlqZNZQjfP6s4iXkAJokv5IsD8OsACkwApg==} - peerDependencies: - eslint: ^8.0.0 || ^9.0.0 || ^10.0.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@5.0.1: - resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - - eslint@10.7.0: - resolution: {integrity: sha512-GVTD7s1vdIl6UYvAfriOPeY1Df8LIZjfofLvHwde+erDHGGuHyuM6xoxRxmHiebhYuD2p1vN4wWh0XzPARSGDQ==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - - 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==} - engines: {node: '>=0.10'} - - esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - - esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - events-to-array@2.0.3: resolution: {integrity: sha512-f/qE2gImHRa4Cp2y1stEOSgw8wTFyUdVJX7G//bMwbaV9JqISFxg99NbmVQeP7YLnDUZ2un851jlaDrlpmGehQ==} engines: {node: '>=12'} @@ -685,12 +771,6 @@ packages: 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-string-truncated-width@3.0.3: resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==} @@ -707,27 +787,9 @@ packages: resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} engines: {node: '>=18'} - 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@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} - - flatted@3.4.2: - resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} - 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==} - gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -744,18 +806,10 @@ packages: resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} engines: {node: '>=18'} - glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - glob@13.0.6: resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} engines: {node: 18 || 20 || >=22} - globals@17.7.0: - resolution: {integrity: sha512-Czmyns5dUsq4seFBR/Kdydhmo8y9kC79hiSkPn0YcGtNnYWnrgt0vjrSjx9tspoDGWm2CMarffRuLjM4xUz8xg==} - engines: {node: '>=18'} - gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -776,25 +830,9 @@ packages: resolution: {integrity: sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==} engines: {node: '>=0.10.0'} - ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} - engines: {node: '>= 4'} - - imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - is-plain-obj@4.1.0: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} @@ -821,47 +859,20 @@ packages: engines: {node: '>=6'} hasBin: true - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - json-rpc-2.0@1.7.1: resolution: {integrity: sha512-JqZjhjAanbpkXIzFE7u8mE/iFblawwlXtONaCvRqI+pyABVz7B4M1EUNpyVW+dZjqgQ2L5HFmZCmOCgUKm00hg==} - 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==} - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true - jsx-ast-utils-x@0.1.0: - resolution: {integrity: sha512-eQQBjBnsVtGacsG9uJNB8qOr3yA8rga4wAaGG1qRcBzSIvfhERLrWxMAM1hp5fcS6Abo8M4+bUBTekYR0qTPQw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - 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.groupby@4.6.0: resolution: {integrity: sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==} - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - lru-cache@11.5.2: resolution: {integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==} engines: {node: 20 || >=22} @@ -909,9 +920,6 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - node-releases@2.0.51: resolution: {integrity: sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==} engines: {node: '>=18'} @@ -924,26 +932,36 @@ packages: resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} - 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'} + oxfmt@0.61.0: + resolution: {integrity: sha512-DxdHBEMYpcEnHoUHjjOigUqV2TYKsvxLwUPXnVYBjgFdqrcQ/91OtwubtZ2PUodCs3sStI8R5Qw3fKNGK4e8wQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + svelte: ^5.0.0 + vite-plus: '*' + peerDependenciesMeta: + svelte: + optional: true + vite-plus: + optional: true - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} + oxlint@1.76.0: + resolution: {integrity: sha512-6QoFioEU4fNdiUx/2Eo6TRd6NG7H7njnRCz8rhB66cZmMHDTqcm1Rjvl8Wry+ZTQMBAmyb4Mlf62Mk5X+eHSOw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + oxlint-tsgolint: '>=7.0.2001' + vite-plus: '*' + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + vite-plus: + optional: true parse-ms@4.0.0: resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} engines: {node: '>=18'} - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -966,15 +984,6 @@ packages: resolution: {integrity: sha512-Mz8SaolMd8nB+G13WkORcxQKHZ/NE4xXevtkJHVuG+guo9/wYKlIMTKAqGdEmYOXR2ijPjTYNHssizdaVSUNdQ==} engines: {node: ^10 || ^12 || >=14} - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - - prettier@3.9.5: - resolution: {integrity: sha512-/FVl766LpUfB5vXgCYOYa0MeV/441Ia99AeICQIQFTY/Nw0roZwULcXpku5i1/m5kt/baz+s4Zogspd839HSMg==} - engines: {node: '>=14'} - hasBin: true - pretty-ms@9.3.0: resolution: {integrity: sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==} engines: {node: '>=18'} @@ -983,10 +992,6 @@ packages: 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'} - pure-rand@8.4.2: resolution: {integrity: sha512-vvuOGgcuPJAirlHvuQw1TrOiw7ptaIXXmIbNuiNOY6lNGJJH49PQ1Kj4nd783nPdQhQdicgOjVI2yI/9BD6/Ng==} @@ -994,14 +999,6 @@ packages: resolution: {integrity: sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==} engines: {node: '>=0.6'} - refa@0.12.1: - resolution: {integrity: sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - regexp-ast-analysis@0.7.1: - resolution: {integrity: sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -1012,10 +1009,6 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - scslre@0.3.0: - resolution: {integrity: sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==} - engines: {node: ^14.0.0 || >=16.0.0} - semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -1079,16 +1072,14 @@ packages: resolution: {integrity: sha512-qtbgXJqE9xdWqlE520y+vG4c1lgqWrDHN7Y2YcrV1XudLuc2Y5aMXhAyPBGl57h8MNoprvL/mAJiISUIadvS9w==} engines: {node: '>= 18.6.0'} + tinypool@2.1.0: + resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} + engines: {node: ^20.0.0 || >=22.0.0} + tree-kill@1.2.2: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - ts-api-utils@2.5.0: - resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} - engines: {node: '>=18.12'} - peerDependencies: - typescript: '>=4.8.4' - tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -1096,10 +1087,6 @@ packages: resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - typed-inject@5.0.0: resolution: {integrity: sha512-0Ql2ORqBORLMdAW89TQKZsb1PQkFGImFfVmncXWe7a+AA3+7dh7Se9exxZowH4kbnlvKEFkMxUYdHUpjYWFJaA==} engines: {node: '>=18'} @@ -1129,9 +1116,6 @@ packages: peerDependencies: browserslist: '>= 4.21.0' - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - weapon-regex@1.3.6: resolution: {integrity: sha512-wsf1m1jmMrso5nhwVFJJHSubEBf3+pereGd7+nBKtYJ18KoB/PWJOHS3WRkwS04VrOU0iJr2bZU+l1QaTJ+9nA==} @@ -1140,10 +1124,6 @@ packages: engines: {node: '>= 8'} hasBin: true - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -1158,10 +1138,6 @@ packages: engines: {node: '>= 14.6'} hasBin: true - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - yoctocolors@2.1.2: resolution: {integrity: sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==} engines: {node: '>=18'} @@ -1398,56 +1374,6 @@ snapshots: '@csstools/css-tokenizer@4.0.0': {} - '@eslint-community/eslint-utils@4.9.1(eslint@10.7.0)': - dependencies: - eslint: 10.7.0 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.12.2': {} - - '@eslint/config-array@0.23.5': - dependencies: - '@eslint/object-schema': 3.0.5 - debug: 4.4.3 - minimatch: 10.2.5 - transitivePeerDependencies: - - supports-color - - '@eslint/config-helpers@0.6.0': - dependencies: - '@eslint/core': 1.2.1 - - '@eslint/core@1.2.1': - dependencies: - '@types/json-schema': 7.0.15 - - '@eslint/js@10.0.1(eslint@10.7.0)': - optionalDependencies: - eslint: 10.7.0 - - '@eslint/object-schema@3.0.5': {} - - '@eslint/plugin-kit@0.7.2': - dependencies: - '@eslint/core': 1.2.1 - levn: 0.4.1 - - '@humanfs/core@0.19.2': - dependencies: - '@humanfs/types': 0.15.0 - - '@humanfs/node@0.16.8': - dependencies: - '@humanfs/core': 0.19.2 - '@humanfs/types': 0.15.0 - '@humanwhocodes/retry': 0.4.3 - - '@humanfs/types@0.15.0': {} - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/retry@0.4.3': {} - '@inquirer/ansi@2.0.7': {} '@inquirer/checkbox@5.2.1(@types/node@26.1.1)': @@ -1586,6 +1512,120 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 + '@oxfmt/binding-android-arm-eabi@0.61.0': + optional: true + + '@oxfmt/binding-android-arm64@0.61.0': + optional: true + + '@oxfmt/binding-darwin-arm64@0.61.0': + optional: true + + '@oxfmt/binding-darwin-x64@0.61.0': + optional: true + + '@oxfmt/binding-freebsd-x64@0.61.0': + optional: true + + '@oxfmt/binding-linux-arm-gnueabihf@0.61.0': + optional: true + + '@oxfmt/binding-linux-arm-musleabihf@0.61.0': + optional: true + + '@oxfmt/binding-linux-arm64-gnu@0.61.0': + optional: true + + '@oxfmt/binding-linux-arm64-musl@0.61.0': + optional: true + + '@oxfmt/binding-linux-ppc64-gnu@0.61.0': + optional: true + + '@oxfmt/binding-linux-riscv64-gnu@0.61.0': + optional: true + + '@oxfmt/binding-linux-riscv64-musl@0.61.0': + optional: true + + '@oxfmt/binding-linux-s390x-gnu@0.61.0': + optional: true + + '@oxfmt/binding-linux-x64-gnu@0.61.0': + optional: true + + '@oxfmt/binding-linux-x64-musl@0.61.0': + optional: true + + '@oxfmt/binding-openharmony-arm64@0.61.0': + optional: true + + '@oxfmt/binding-win32-arm64-msvc@0.61.0': + optional: true + + '@oxfmt/binding-win32-ia32-msvc@0.61.0': + optional: true + + '@oxfmt/binding-win32-x64-msvc@0.61.0': + optional: true + + '@oxlint/binding-android-arm-eabi@1.76.0': + optional: true + + '@oxlint/binding-android-arm64@1.76.0': + optional: true + + '@oxlint/binding-darwin-arm64@1.76.0': + optional: true + + '@oxlint/binding-darwin-x64@1.76.0': + optional: true + + '@oxlint/binding-freebsd-x64@1.76.0': + optional: true + + '@oxlint/binding-linux-arm-gnueabihf@1.76.0': + optional: true + + '@oxlint/binding-linux-arm-musleabihf@1.76.0': + optional: true + + '@oxlint/binding-linux-arm64-gnu@1.76.0': + optional: true + + '@oxlint/binding-linux-arm64-musl@1.76.0': + optional: true + + '@oxlint/binding-linux-ppc64-gnu@1.76.0': + optional: true + + '@oxlint/binding-linux-riscv64-gnu@1.76.0': + optional: true + + '@oxlint/binding-linux-riscv64-musl@1.76.0': + optional: true + + '@oxlint/binding-linux-s390x-gnu@1.76.0': + optional: true + + '@oxlint/binding-linux-x64-gnu@1.76.0': + optional: true + + '@oxlint/binding-linux-x64-musl@1.76.0': + optional: true + + '@oxlint/binding-openharmony-arm64@1.76.0': + optional: true + + '@oxlint/binding-win32-arm64-msvc@1.76.0': + optional: true + + '@oxlint/binding-win32-ia32-msvc@1.76.0': + optional: true + + '@oxlint/binding-win32-x64-msvc@1.76.0': + optional: true + '@rmenke/css-tokenizer-tests@1.2.0': {} '@sec-ant/readable-stream@0.4.1': {} @@ -1667,29 +1707,10 @@ snapshots: '@stryker-mutator/util@9.6.1': {} - '@types/esrecurse@4.3.1': {} - - '@types/estree@1.0.9': {} - - '@types/json-schema@7.0.15': {} - '@types/node@26.1.1': dependencies: undici-types: 8.3.0 - acorn-jsx@5.3.2(acorn@8.17.0): - dependencies: - acorn: 8.17.0 - - acorn@8.17.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.18.0: dependencies: fast-deep-equal: 3.1.3 @@ -1715,10 +1736,6 @@ snapshots: node-releases: 2.0.51 update-browserslist-db: 1.2.3(browserslist@4.28.6) - builtin-modules@3.3.0: {} - - bytes@3.1.2: {} - call-bind-apply-helpers@1.0.2: dependencies: es-errors: 1.3.0 @@ -1751,8 +1768,6 @@ snapshots: dependencies: ms: 2.1.3 - deep-is@0.1.4: {} - des.js@1.1.0: dependencies: inherits: 2.0.4 @@ -1780,93 +1795,6 @@ snapshots: escalade@3.2.0: {} - escape-string-regexp@4.0.0: {} - - eslint-config-prettier@10.1.8(eslint@10.7.0): - dependencies: - eslint: 10.7.0 - - eslint-plugin-sonarjs@4.2.0(eslint@10.7.0): - dependencies: - '@eslint-community/regexpp': 4.12.2 - builtin-modules: 3.3.0 - bytes: 3.1.2 - eslint: 10.7.0 - functional-red-black-tree: 1.0.1 - globals: 17.7.0 - jsx-ast-utils-x: 0.1.0 - lodash.merge: 4.6.2 - minimatch: 10.2.5 - scslre: 0.3.0 - semver: 7.8.5 - ts-api-utils: 2.5.0(typescript@6.0.3) - typescript: 6.0.3 - yaml: 2.9.0 - - eslint-scope@9.1.2: - dependencies: - '@types/esrecurse': 4.3.1 - '@types/estree': 1.0.9 - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint-visitor-keys@5.0.1: {} - - eslint@10.7.0: - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.7.0) - '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.23.5 - '@eslint/config-helpers': 0.6.0 - '@eslint/core': 1.2.1 - '@eslint/plugin-kit': 0.7.2 - '@humanfs/node': 0.16.8 - '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.3 - '@types/estree': 1.0.9 - ajv: 6.15.0 - cross-spawn: 7.0.6 - debug: 4.4.3 - escape-string-regexp: 4.0.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 - 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 - minimatch: 10.2.5 - natural-compare: 1.4.0 - optionator: 0.9.4 - transitivePeerDependencies: - - supports-color - - espree@11.2.0: - dependencies: - acorn: 8.17.0 - acorn-jsx: 5.3.2(acorn@8.17.0) - eslint-visitor-keys: 5.0.1 - - esquery@1.7.0: - dependencies: - estraverse: 5.3.0 - - esrecurse@4.3.0: - dependencies: - estraverse: 5.3.0 - - estraverse@5.3.0: {} - - esutils@2.0.3: {} - events-to-array@2.0.3: {} execa@9.6.1: @@ -1890,10 +1818,6 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-json-stable-stringify@2.1.0: {} - - fast-levenshtein@2.0.6: {} - fast-string-truncated-width@3.0.3: {} fast-string-width@3.0.2: @@ -1910,26 +1834,8 @@ snapshots: dependencies: is-unicode-supported: 2.1.0 - file-entry-cache@8.0.0: - dependencies: - flat-cache: 4.0.1 - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat-cache@4.0.1: - dependencies: - flatted: 3.4.2 - keyv: 4.5.4 - - flatted@3.4.2: {} - function-bind@1.1.2: {} - functional-red-black-tree@1.0.1: {} - gensync@1.0.0-beta.2: {} get-intrinsic@1.3.0: @@ -1955,18 +1861,12 @@ snapshots: '@sec-ant/readable-stream': 0.4.1 is-stream: 4.0.1 - glob-parent@6.0.2: - dependencies: - is-glob: 4.0.3 - glob@13.0.6: dependencies: minimatch: 10.2.5 minipass: 7.1.3 path-scurry: 2.0.2 - globals@17.7.0: {} - gopd@1.2.0: {} has-symbols@1.1.0: {} @@ -1981,18 +1881,8 @@ snapshots: dependencies: safer-buffer: 2.1.2 - ignore@5.3.2: {} - - imurmurhash@0.1.4: {} - inherits@2.0.4: {} - is-extglob@2.1.1: {} - - is-glob@4.0.3: - dependencies: - is-extglob: 2.1.1 - is-plain-obj@4.1.0: {} is-stream@4.0.1: {} @@ -2007,37 +1897,14 @@ snapshots: jsesc@3.1.0: {} - json-buffer@3.0.1: {} - json-rpc-2.0@1.7.1: {} - json-schema-traverse@0.4.1: {} - json-schema-traverse@1.0.0: {} - json-stable-stringify-without-jsonify@1.0.1: {} - json5@2.2.3: {} - jsx-ast-utils-x@0.1.0: {} - - 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.groupby@4.6.0: {} - lodash.merge@4.6.2: {} - lru-cache@11.5.2: {} lru-cache@5.1.1: @@ -2072,8 +1939,6 @@ snapshots: nanoid@3.3.16: {} - natural-compare@1.4.0: {} - node-releases@2.0.51: {} npm-run-path@6.0.0: @@ -2083,27 +1948,54 @@ snapshots: object-inspect@1.13.4: {} - optionator@0.9.4: + oxfmt@0.61.0: 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 + tinypool: 2.1.0 + optionalDependencies: + '@oxfmt/binding-android-arm-eabi': 0.61.0 + '@oxfmt/binding-android-arm64': 0.61.0 + '@oxfmt/binding-darwin-arm64': 0.61.0 + '@oxfmt/binding-darwin-x64': 0.61.0 + '@oxfmt/binding-freebsd-x64': 0.61.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.61.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.61.0 + '@oxfmt/binding-linux-arm64-gnu': 0.61.0 + '@oxfmt/binding-linux-arm64-musl': 0.61.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.61.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.61.0 + '@oxfmt/binding-linux-riscv64-musl': 0.61.0 + '@oxfmt/binding-linux-s390x-gnu': 0.61.0 + '@oxfmt/binding-linux-x64-gnu': 0.61.0 + '@oxfmt/binding-linux-x64-musl': 0.61.0 + '@oxfmt/binding-openharmony-arm64': 0.61.0 + '@oxfmt/binding-win32-arm64-msvc': 0.61.0 + '@oxfmt/binding-win32-ia32-msvc': 0.61.0 + '@oxfmt/binding-win32-x64-msvc': 0.61.0 + + oxlint@1.76.0: + optionalDependencies: + '@oxlint/binding-android-arm-eabi': 1.76.0 + '@oxlint/binding-android-arm64': 1.76.0 + '@oxlint/binding-darwin-arm64': 1.76.0 + '@oxlint/binding-darwin-x64': 1.76.0 + '@oxlint/binding-freebsd-x64': 1.76.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.76.0 + '@oxlint/binding-linux-arm-musleabihf': 1.76.0 + '@oxlint/binding-linux-arm64-gnu': 1.76.0 + '@oxlint/binding-linux-arm64-musl': 1.76.0 + '@oxlint/binding-linux-ppc64-gnu': 1.76.0 + '@oxlint/binding-linux-riscv64-gnu': 1.76.0 + '@oxlint/binding-linux-riscv64-musl': 1.76.0 + '@oxlint/binding-linux-s390x-gnu': 1.76.0 + '@oxlint/binding-linux-x64-gnu': 1.76.0 + '@oxlint/binding-linux-x64-musl': 1.76.0 + '@oxlint/binding-openharmony-arm64': 1.76.0 + '@oxlint/binding-win32-arm64-msvc': 1.76.0 + '@oxlint/binding-win32-ia32-msvc': 1.76.0 + '@oxlint/binding-win32-x64-msvc': 1.76.0 parse-ms@4.0.0: {} - path-exists@4.0.0: {} - path-key@3.1.1: {} path-key@4.0.0: {} @@ -2123,33 +2015,18 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - prelude-ls@1.2.1: {} - - prettier@3.9.5: {} - pretty-ms@9.3.0: dependencies: parse-ms: 4.0.0 progress@2.0.3: {} - punycode@2.3.1: {} - pure-rand@8.4.2: {} qs@6.15.1: dependencies: side-channel: 1.1.1 - refa@0.12.1: - dependencies: - '@eslint-community/regexpp': 4.12.2 - - regexp-ast-analysis@0.7.1: - dependencies: - '@eslint-community/regexpp': 4.12.2 - refa: 0.12.1 - require-from-string@2.0.2: {} rxjs@7.8.2: @@ -2158,12 +2035,6 @@ snapshots: safer-buffer@2.1.2: {} - scslre@0.3.0: - dependencies: - '@eslint-community/regexpp': 4.12.2 - refa: 0.12.1 - regexp-ast-analysis: 0.7.1 - semver@6.3.1: {} semver@7.7.4: {} @@ -2222,20 +2093,14 @@ snapshots: yaml: 2.9.0 yaml-types: 0.3.0(yaml@2.9.0) - tree-kill@1.2.2: {} + tinypool@2.1.0: {} - ts-api-utils@2.5.0(typescript@6.0.3): - dependencies: - typescript: 6.0.3 + tree-kill@1.2.2: {} tslib@2.8.1: {} tunnel@0.0.6: {} - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 - typed-inject@5.0.0: {} typed-rest-client@2.3.1: @@ -2260,18 +2125,12 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 - uri-js@4.4.1: - dependencies: - punycode: 2.3.1 - weapon-regex@1.3.6: {} which@2.0.2: dependencies: isexe: 2.0.0 - word-wrap@1.2.5: {} - yallist@3.1.1: {} yaml-types@0.3.0(yaml@2.9.0): @@ -2280,8 +2139,6 @@ snapshots: yaml@2.9.0: {} - yocto-queue@0.1.0: {} - yoctocolors@2.1.2: {} zod@4.4.3: {} diff --git a/src/index.js b/src/index.js index 8009a97..860046b 100644 --- a/src/index.js +++ b/src/index.js @@ -16,11 +16,26 @@ const MATCH_CALC = /^(?:-(?:moz|webkit)-)?calc$/i; // Bare math-function calls (no calc() wrapper) — fed to the same pipeline. // Mirrors the dispatch in lib/simplify/call.js. const MATH_FUNCTIONS = new Set([ - 'min', 'max', 'clamp', - 'abs', 'sign', - 'mod', 'rem', 'round', - 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', - 'pow', 'sqrt', 'hypot', 'log', 'exp', + 'min', + 'max', + 'clamp', + 'abs', + 'sign', + 'mod', + 'rem', + 'round', + 'sin', + 'cos', + 'tan', + 'asin', + 'acos', + 'atan', + 'atan2', + 'pow', + 'sqrt', + 'hypot', + 'log', + 'exp', ]); /** @@ -45,10 +60,14 @@ const MATH_FUNCTIONS = new Set([ function transformValue(value, options, result, item) { return valueParser(value) .walk((node) => { - if (node.type !== 'function') {return;} + if (node.type !== 'function') { + return; + } const isCalc = MATCH_CALC.test(node.value); const isMath = !isCalc && MATH_FUNCTIONS.has(node.value.toLowerCase()); - if (!isCalc && !isMath) {return;} + if (!isCalc && !isMath) { + return; + } // calc(): feed the body. Bare math: feed the whole call. const inner = valueParser.stringify(node.nodes); diff --git a/src/lib/convertUnits.js b/src/lib/convertUnits.js index 549a096..0d55b8f 100644 --- a/src/lib/convertUnits.js +++ b/src/lib/convertUnits.js @@ -8,28 +8,67 @@ /** @type {Record} */ const UNIT_TO_BASE = { - px: 'length', cm: 'length', mm: 'length', q: 'length', - in: 'length', pt: 'length', pc: 'length', - em: 'length', ex: 'length', ch: 'length', rem: 'length', - lh: 'length', rlh: 'length', ic: 'length', cap: 'length', - vw: 'length', vh: 'length', vmin: 'length', vmax: 'length', - vb: 'length', vi: 'length', - svw: 'length', svh: 'length', svmin: 'length', svmax: 'length', - svb: 'length', svi: 'length', - lvw: 'length', lvh: 'length', lvmin: 'length', lvmax: 'length', - lvb: 'length', lvi: 'length', - dvw: 'length', dvh: 'length', dvmin: 'length', dvmax: 'length', - dvb: 'length', dvi: 'length', - cqw: 'length', cqh: 'length', cqi: 'length', cqb: 'length', - cqmin: 'length', cqmax: 'length', + px: 'length', + cm: 'length', + mm: 'length', + q: 'length', + in: 'length', + pt: 'length', + pc: 'length', + em: 'length', + ex: 'length', + ch: 'length', + rem: 'length', + lh: 'length', + rlh: 'length', + ic: 'length', + cap: 'length', + vw: 'length', + vh: 'length', + vmin: 'length', + vmax: 'length', + vb: 'length', + vi: 'length', + svw: 'length', + svh: 'length', + svmin: 'length', + svmax: 'length', + svb: 'length', + svi: 'length', + lvw: 'length', + lvh: 'length', + lvmin: 'length', + lvmax: 'length', + lvb: 'length', + lvi: 'length', + dvw: 'length', + dvh: 'length', + dvmin: 'length', + dvmax: 'length', + dvb: 'length', + dvi: 'length', + cqw: 'length', + cqh: 'length', + cqi: 'length', + cqb: 'length', + cqmin: 'length', + cqmax: 'length', - deg: 'angle', grad: 'angle', rad: 'angle', turn: 'angle', + deg: 'angle', + grad: 'angle', + rad: 'angle', + turn: 'angle', - s: 'time', ms: 'time', + s: 'time', + ms: 'time', - hz: 'frequency', khz: 'frequency', + hz: 'frequency', + khz: 'frequency', - dpi: 'resolution', dpcm: 'resolution', dppx: 'resolution', x: 'resolution', + dpi: 'resolution', + dpcm: 'resolution', + dppx: 'resolution', + x: 'resolution', fr: 'flex', diff --git a/src/lib/parser.js b/src/lib/parser.js index 8e0a708..f0e8d56 100644 --- a/src/lib/parser.js +++ b/src/lib/parser.js @@ -157,7 +157,9 @@ const OPAQUE_ARG_FUNCTIONS = new Set(['anchor', 'anchor-size']); * @return {string} */ function tokenText(t) { - if (t.type === 'dimension') {return `${t.value}${t.unit ?? ''}`;} + if (t.type === 'dimension') { + return `${t.value}${t.unit ?? ''}`; + } return t.value; } @@ -174,7 +176,9 @@ function parseOpaqueCall(p, name) { let depth = 1; const flush = () => { const trimmed = buf.trim(); - if (trimmed) {args.push({ type: 'Ident', name: trimmed });} + if (trimmed) { + args.push({ type: 'Ident', name: trimmed }); + } buf = ''; }; while (true) { @@ -183,8 +187,9 @@ function parseOpaqueCall(p, name) { throw new Error(`Unclosed ${name}( at position ${tk.pos}`); } if (tk.type === 'punct') { - if (tk.value === '(') {depth++;} - else if (tk.value === ')') { + if (tk.value === '(') { + depth++; + } else if (tk.value === ')') { depth--; if (depth === 0) { p.next(); @@ -197,7 +202,9 @@ function parseOpaqueCall(p, name) { continue; } } - if (tk.ws && buf) {buf += ' ';} + if (tk.ws && buf) { + buf += ' '; + } buf += tokenText(tk); p.next(); } diff --git a/src/lib/serialize.js b/src/lib/serialize.js index 9b45fc2..dc4335d 100644 --- a/src/lib/serialize.js +++ b/src/lib/serialize.js @@ -55,7 +55,9 @@ function isDegenerate(v) { * @return {string} */ function degenerateKeyword(v) { - if (isNaN(v)) {return 'NaN';} + if (isNaN(v)) { + return 'NaN'; + } return v > 0 ? 'infinity' : '-infinity'; } @@ -105,7 +107,9 @@ function serialize(node, opts = {}) { function serializeExpr(node, prec) { switch (node.type) { case 'Num': - if (isDegenerate(node.value)) {return degenerateKeyword(node.value);} + if (isDegenerate(node.value)) { + return degenerateKeyword(node.value); + } return String(round(node.value, prec)); case 'Dim': if (isDegenerate(node.value)) { @@ -161,18 +165,19 @@ function displaySign(term) { */ function serializeSum(sum, prec) { let out = ''; - sum.terms.forEach((t, i) => { + for (const [i, t] of sum.terms.entries()) { const { sign, magnitude } = displaySign(t); if (i === 0) { - out = sign === 1 - ? serializeExpr(magnitude, prec) - : serializeLeadingNeg(magnitude, prec); + out = + sign === 1 + ? serializeExpr(magnitude, prec) + : serializeLeadingNeg(magnitude, prec); } else { // `-` binds looser than `*`/`/` so the right side never needs parens. const body = serializeExpr(magnitude, prec); out += sign === 1 ? ` + ${body}` : ` - ${body}`; } - }); + } return out; } @@ -207,7 +212,9 @@ function serializeLeadingNeg(node, prec) { return serializeProduct({ type: 'Product', factors: negatedFactors }, prec); } const body = serializeExpr(node, prec); - return node.type === 'Sum' || node.type === 'Product' ? `-(${body})` : `-${body}`; + return node.type === 'Sum' || node.type === 'Product' + ? `-(${body})` + : `-${body}`; } /** @@ -217,7 +224,7 @@ function serializeLeadingNeg(node, prec) { */ function serializeProduct(product, prec) { let out = ''; - product.factors.forEach((f, i) => { + for (const [i, f] of product.factors.entries()) { let body = serializeExpr(f.node, prec); // A Sum factor needs parens: `a * (b + c)`. Flat canonical form means // this is the only place parens are required. @@ -230,7 +237,7 @@ function serializeProduct(product, prec) { } else { out += f.exponent === 1 ? ` * ${body}` : ` / ${body}`; } - }); + } return out; } diff --git a/src/lib/simplify/abs.js b/src/lib/simplify/abs.js index 21c8754..a0d5c6b 100644 --- a/src/lib/simplify/abs.js +++ b/src/lib/simplify/abs.js @@ -13,8 +13,12 @@ function simplifyAbs(args) { return { type: 'Call', name: 'abs', args }; } const a = args[0]; - if (a.type === 'Num') {return num(Math.abs(a.value));} - if (a.type === 'Dim' && a.unit !== '%') {return dim(Math.abs(a.value), a.unit);} + if (a.type === 'Num') { + return num(Math.abs(a.value)); + } + if (a.type === 'Dim' && a.unit !== '%') { + return dim(Math.abs(a.value), a.unit); + } return { type: 'Call', name: 'abs', args: [a] }; } diff --git a/src/lib/simplify/atan2.js b/src/lib/simplify/atan2.js index 18b1148..10cef4f 100644 --- a/src/lib/simplify/atan2.js +++ b/src/lib/simplify/atan2.js @@ -13,12 +13,18 @@ const { foldConstArgs } = require('./fold.js'); * @return {Node} */ function simplifyAtan2(args) { - if (args.length !== 2) {return { type: 'Call', name: 'atan2', args };} + if (args.length !== 2) { + return { type: 'Call', name: 'atan2', args }; + } const fold = foldConstArgs(args); - if (fold === null) {return { type: 'Call', name: 'atan2', args };} + if (fold === null) { + return { type: 'Call', name: 'atan2', args }; + } const [y, x] = /** @type {[number, number]} */ (fold.values); const radians = Math.atan2(y, x); - if (isNaN(radians)) {return num(NaN);} + if (isNaN(radians)) { + return num(NaN); + } return dim((radians * 180) / Math.PI, 'deg'); } diff --git a/src/lib/simplify/bucket.js b/src/lib/simplify/bucket.js index a70b493..a066935 100644 --- a/src/lib/simplify/bucket.js +++ b/src/lib/simplify/bucket.js @@ -27,13 +27,19 @@ function mergeConvertibleBuckets(buckets) { /** @type {UnitBucket[]} */ const out = []; for (const b of ordered) { const keyB = b.unit.toLowerCase(); - if (merged.has(keyB)) {continue;} + if (merged.has(keyB)) { + continue; + } merged.add(keyB); if (b.base !== null) { for (const other of ordered) { const keyO = other.unit.toLowerCase(); - if (merged.has(keyO)) {continue;} - if (other.base !== b.base) {continue;} + if (merged.has(keyO)) { + continue; + } + if (other.base !== b.base) { + continue; + } const converted = convert(other.total, other.unit, b.unit); if (converted !== null) { b.total += converted; diff --git a/src/lib/simplify/call.js b/src/lib/simplify/call.js index a3556c4..56ca639 100644 --- a/src/lib/simplify/call.js +++ b/src/lib/simplify/call.js @@ -38,20 +38,48 @@ function simplifyCall(node, simplify) { const args = node.args.map((a) => simplify(a)); - if (name === 'min' || name === 'max') {return simplifyMinMax(node.name, args);} - if (name === 'clamp') {return simplifyClamp(args);} - if (name === 'abs') {return simplifyAbs(args);} - if (name === 'sign') {return simplifySign(args);} - if (name === 'mod' || name === 'rem') {return simplifyModRem(name, args);} - if (name === 'round') {return simplifyRound(args);} - if (name === 'sin' || name === 'cos' || name === 'tan') {return simplifyTrig(name, args);} - if (name === 'asin' || name === 'acos' || name === 'atan') {return simplifyInverseTrig(name, args);} - if (name === 'atan2') {return simplifyAtan2(args);} - if (name === 'pow') {return simplifyPow(args);} - if (name === 'sqrt') {return simplifySqrt(args);} - if (name === 'hypot') {return simplifyHypot(args);} - if (name === 'log') {return simplifyLog(args);} - if (name === 'exp') {return simplifyExp(args);} + if (name === 'min' || name === 'max') { + return simplifyMinMax(node.name, args); + } + if (name === 'clamp') { + return simplifyClamp(args); + } + if (name === 'abs') { + return simplifyAbs(args); + } + if (name === 'sign') { + return simplifySign(args); + } + if (name === 'mod' || name === 'rem') { + return simplifyModRem(name, args); + } + if (name === 'round') { + return simplifyRound(args); + } + if (name === 'sin' || name === 'cos' || name === 'tan') { + return simplifyTrig(name, args); + } + if (name === 'asin' || name === 'acos' || name === 'atan') { + return simplifyInverseTrig(name, args); + } + if (name === 'atan2') { + return simplifyAtan2(args); + } + if (name === 'pow') { + return simplifyPow(args); + } + if (name === 'sqrt') { + return simplifySqrt(args); + } + if (name === 'hypot') { + return simplifyHypot(args); + } + if (name === 'log') { + return simplifyLog(args); + } + if (name === 'exp') { + return simplifyExp(args); + } return { type: 'Call', name: node.name, args }; } diff --git a/src/lib/simplify/fold.js b/src/lib/simplify/fold.js index c9c83d7..a911780 100644 --- a/src/lib/simplify/fold.js +++ b/src/lib/simplify/fold.js @@ -14,7 +14,9 @@ const { baseOf, convert } = require('../convertUnits.js'); * @return {{ values: number[], unit: string } | null} */ function foldConstArgs(args) { - if (args.length === 0) {return null;} + if (args.length === 0) { + return null; + } const first = args[0]; if (first.type === 'Num') { @@ -22,7 +24,9 @@ function foldConstArgs(args) { } if (first.type === 'Dim') { const b = first.unit === '%' ? null : baseOf(first.unit); - if (!b) {return null;} + if (!b) { + return null; + } return foldDimArgs(args, first.unit, b); } return null; @@ -35,7 +39,9 @@ function foldConstArgs(args) { function foldNumberArgs(args) { /** @type {number[]} */ const values = []; for (const a of args) { - if (a.type !== 'Num') {return null;} + if (a.type !== 'Num') { + return null; + } values.push(a.value); } return { values, unit: '' }; @@ -54,7 +60,9 @@ function foldDimArgs(args, unit, base) { return null; } const converted = convert(a.value, a.unit, unit); - if (converted === null) {return null;} + if (converted === null) { + return null; + } values.push(converted); } return { values, unit }; diff --git a/src/lib/simplify/hypot.js b/src/lib/simplify/hypot.js index bbedcb1..530b682 100644 --- a/src/lib/simplify/hypot.js +++ b/src/lib/simplify/hypot.js @@ -13,7 +13,9 @@ const { foldConstArgs } = require('./fold.js'); */ function simplifyHypot(args) { const fold = foldConstArgs(args); - if (fold === null) {return { type: 'Call', name: 'hypot', args };} + if (fold === null) { + return { type: 'Call', name: 'hypot', args }; + } const sumSq = fold.values.reduce((acc, v) => acc + v * v, 0); const result = Math.sqrt(sumSq); return fold.unit === '' ? num(result) : dim(result, fold.unit); diff --git a/src/lib/simplify/inverse-trig.js b/src/lib/simplify/inverse-trig.js index 81a15b5..2a5d86e 100644 --- a/src/lib/simplify/inverse-trig.js +++ b/src/lib/simplify/inverse-trig.js @@ -18,11 +18,17 @@ const INVERSE_TRIG_OPS = /** @type {const} */ ({ * @return {Node} */ function simplifyInverseTrig(name, args) { - if (args.length !== 1) {return { type: 'Call', name, args };} + if (args.length !== 1) { + return { type: 'Call', name, args }; + } const a = args[0]; - if (a.type !== 'Num') {return { type: 'Call', name, args };} + if (a.type !== 'Num') { + return { type: 'Call', name, args }; + } const radians = INVERSE_TRIG_OPS[name](a.value); - if (isNaN(radians)) {return num(NaN);} + if (isNaN(radians)) { + return num(NaN); + } return dim((radians * 180) / Math.PI, 'deg'); } diff --git a/src/lib/simplify/log.js b/src/lib/simplify/log.js index a6f2d47..7c39e7c 100644 --- a/src/lib/simplify/log.js +++ b/src/lib/simplify/log.js @@ -12,11 +12,7 @@ function simplifyLog(args) { if (args.length === 1 && args[0].type === 'Num') { return num(Math.log(args[0].value)); } - if ( - args.length === 2 && - args[0].type === 'Num' && - args[1].type === 'Num' - ) { + if (args.length === 2 && args[0].type === 'Num' && args[1].type === 'Num') { return num(Math.log(args[0].value) / Math.log(args[1].value)); } return { type: 'Call', name: 'log', args }; diff --git a/src/lib/simplify/mod-rem.js b/src/lib/simplify/mod-rem.js index 6a4eeab..3fb4eb0 100644 --- a/src/lib/simplify/mod-rem.js +++ b/src/lib/simplify/mod-rem.js @@ -11,14 +11,20 @@ const { foldConstArgs } = require('./fold.js'); * @return {Node} */ function simplifyModRem(name, args) { - if (args.length !== 2) {return { type: 'Call', name, args };} + if (args.length !== 2) { + return { type: 'Call', name, args }; + } const fold = foldConstArgs(args); - if (fold === null) {return { type: 'Call', name, args };} + if (fold === null) { + return { type: 'Call', name, args }; + } const [a, b] = /** @type {[number, number]} */ (fold.values); const result = applyModRem(name, a, b); // NaN results drop the unit (`mod(5px, 0px)` → `calc(NaN)`, not // `calc(NaN * 1px)`). §10.12 unit-preserving form is a known divergence. - if (isNaN(result)) {return num(NaN);} + if (isNaN(result)) { + return num(NaN); + } return fold.unit === '' ? num(result) : dim(result, fold.unit); } @@ -29,19 +35,25 @@ function simplifyModRem(name, args) { * @return {number} */ function applyModRem(name, a, b) { - if (b === 0) {return NaN;} - if (!isFinite(a)) {return NaN;} + if (b === 0) { + return NaN; + } + if (!isFinite(a)) { + return NaN; + } if (!isFinite(b)) { // mod: result is NaN when A has opposite sign to B; otherwise A. // rem: result is A regardless of signs. - if (name === 'mod' && a !== 0 && Math.sign(a) !== Math.sign(b)) {return NaN;} + if (name === 'mod' && a !== 0 && Math.sign(a) !== Math.sign(b)) { + return NaN; + } return a; } if (name === 'rem') { return a % b; // sign follows dividend } - const result = a - b * Math.floor(a / b); // sign follows divisor - return result === 0 ? b * 0 : result; + // sign follows divisor + return a - b * Math.floor(a / b); } module.exports = { simplifyModRem }; diff --git a/src/lib/simplify/product.js b/src/lib/simplify/product.js index de8739f..185eb2a 100644 --- a/src/lib/simplify/product.js +++ b/src/lib/simplify/product.js @@ -106,10 +106,14 @@ function simplifyProduct(product, simplify) { opaque.length === 0 ) { const d = remainingDims[0]; - const value = scalarChain.reduce( - (acc, f) => (f.exponent === 1 ? acc * f.value : acc / f.value), - 1 - ); + let value = 1; + for (const f of scalarChain) { + if (f.exponent === 1) { + value = value * f.value; + } else { + value = value / f.value; + } + } return dim(value, d.unit); } diff --git a/src/lib/simplify/round.js b/src/lib/simplify/round.js index 5954680..f86ebe4 100644 --- a/src/lib/simplify/round.js +++ b/src/lib/simplify/round.js @@ -39,7 +39,9 @@ function simplifyRound(args) { // B omitted: defaults to 1 when A is ; else opaque. const argsForFold = argsForRoundFold(rest); const fold = argsForFold && foldConstArgs(argsForFold); - if (!fold) {return passthrough();} + if (!fold) { + return passthrough(); + } const [a, b] = /** @type {[number, number]} */ (fold.values); // Spec §10.7.1 non-finite step: NaN propagates; both infinite cancels to @@ -49,9 +51,13 @@ function simplifyRound(args) { // case folds to ±0 carrying A's sign. Infinite-A / finite-B falls through // to applyRound, where floor*b===ceil*b===±∞ collapses back to A // (§10.3.1 "result is the same infinity"). - if (isNaN(b)) {return num(NaN);} + if (isNaN(b)) { + return num(NaN); + } if (!isFinite(b)) { - if (!isFinite(a)) {return num(NaN);} + if (!isFinite(a)) { + return num(NaN); + } let result; if (strategy === 'up' && a > 0) { result = Infinity; @@ -64,7 +70,9 @@ function simplifyRound(args) { } const result = applyRound(strategy, a, b); - if (isNaN(result)) {return num(NaN);} + if (isNaN(result)) { + return num(NaN); + } return fold.unit === '' ? num(result) : dim(result, fold.unit); } @@ -73,7 +81,9 @@ function simplifyRound(args) { * @return {Node[] | null} */ function argsForRoundFold(args) { - if (args.length === 2) {return args;} + if (args.length === 2) { + return args; + } if (args.length === 1 && args[0].type === 'Num') { return [args[0], num(1)]; } @@ -87,14 +97,18 @@ function argsForRoundFold(args) { * @return {number} */ function applyRound(strategy, a, b) { - if (b === 0) {return NaN;} + if (b === 0) { + return NaN; + } const q = a / b; const c1 = Math.floor(q) * b; const c2 = Math.ceil(q) * b; // With negative B, floor*B > ceil*B; spec defines lower as closer to -∞. const lower = Math.min(c1, c2); const upper = Math.max(c1, c2); - if (lower === upper) {return a;} + if (lower === upper) { + return a; + } switch (strategy) { case 'up': return upper; diff --git a/src/lib/simplify/sign.js b/src/lib/simplify/sign.js index 388c97f..1956d32 100644 --- a/src/lib/simplify/sign.js +++ b/src/lib/simplify/sign.js @@ -13,9 +13,13 @@ function simplifySign(args) { return { type: 'Call', name: 'sign', args }; } const a = args[0]; - if (a.type === 'Num') {return num(Math.sign(a.value));} + if (a.type === 'Num') { + return num(Math.sign(a.value)); + } // %: sign is property-context-dependent (§10.6) — opaque. - if (a.type === 'Dim' && a.unit !== '%') {return num(Math.sign(a.value));} + if (a.type === 'Dim' && a.unit !== '%') { + return num(Math.sign(a.value)); + } return { type: 'Call', name: 'sign', args: [a] }; } diff --git a/src/lib/simplify/sum.js b/src/lib/simplify/sum.js index 6c491c0..ad65f40 100644 --- a/src/lib/simplify/sum.js +++ b/src/lib/simplify/sum.js @@ -90,7 +90,10 @@ function simplifySum(sum, simplify) { /** @type {SumTerm[]} */ const terms = [{ sign: 1, node: num(denoise(numTotal, numScale)) }]; for (const bucket of mergeConvertibleBuckets([...byUnit.values()])) { - terms.push({ sign: 1, node: dim(denoise(bucket.total, bucket.scale), bucket.unit) }); + terms.push({ + sign: 1, + node: dim(denoise(bucket.total, bucket.scale), bucket.unit), + }); } terms.push(...opaque); diff --git a/src/lib/simplify/trig.js b/src/lib/simplify/trig.js index 0bdd2c9..b305c3a 100644 --- a/src/lib/simplify/trig.js +++ b/src/lib/simplify/trig.js @@ -19,7 +19,9 @@ const TRIG_OPS = /** @type {const} */ ({ * @return {Node} */ function simplifyTrig(name, args) { - if (args.length !== 1) {return { type: 'Call', name, args };} + if (args.length !== 1) { + return { type: 'Call', name, args }; + } const a = args[0]; /** @type {number | null} */ let radians = null; if (a.type === 'Num') { @@ -31,9 +33,13 @@ function simplifyTrig(name, args) { // equivalent-mutant survivors — keep them; they're load-bearing // defense against future unit additions. const inDeg = convert(a.value, a.unit, 'deg'); - if (inDeg !== null) {radians = (inDeg * Math.PI) / 180;} + if (inDeg !== null) { + radians = (inDeg * Math.PI) / 180; + } + } + if (radians === null) { + return { type: 'Call', name, args }; } - if (radians === null) {return { type: 'Call', name, args };} return num(TRIG_OPS[name](radians)); } diff --git a/src/lib/tokenizer.js b/src/lib/tokenizer.js index 793f161..a9c01ef 100644 --- a/src/lib/tokenizer.js +++ b/src/lib/tokenizer.js @@ -79,7 +79,12 @@ function tokenize(input) { break; case CssType.Function: tokens.push({ type: 'ident', value: t[4].value, pos: t[2], ws }); - tokens.push({ type: 'punct', value: '(', pos: t[2] + t[1].length - 1, ws: false }); + tokens.push({ + type: 'punct', + value: '(', + pos: t[2] + t[1].length - 1, + ws: false, + }); break; case CssType.OpenParen: tokens.push({ type: 'punct', value: '(', pos: t[2], ws }); diff --git a/stryker.conf.mjs b/stryker.conf.mjs index 58b660e..de0611b 100644 --- a/stryker.conf.mjs +++ b/stryker.conf.mjs @@ -11,14 +11,10 @@ /** @type {import('@stryker-mutator/api/core').PartialStrykerOptions} */ export default { testRunner: 'tap', - mutate: [ - 'src/lib/simplify.js', - 'src/lib/serialize.js', - 'src/lib/node.js', - ], + mutate: ['src/lib/simplify.js', 'src/lib/serialize.js', 'src/lib/node.js'], plugins: [ - "@stryker-mutator/tap-runner", - "@stryker-mutator/typescript-checker" + '@stryker-mutator/tap-runner', + '@stryker-mutator/typescript-checker', ], ignorePatterns: ['node_modules', 'types'], // Mutation score targets — anything below 70 fails CI. diff --git a/test/convertUnit.js b/test/convertUnit.js index b6c3114..7358fd6 100644 --- a/test/convertUnit.js +++ b/test/convertUnit.js @@ -97,7 +97,7 @@ test('valid conversions', () => { [10, 'dppx', 10, 'dppx'], ]; - conversions.forEach(function (e) { + for (const e of conversions) { const value = e[0]; const unit = e[1]; const expected = e[2]; @@ -106,39 +106,288 @@ test('valid conversions', () => { const actual = convert(value, unit, targetUnit); assert.ok(actual !== null, unit + ' -> ' + targetUnit); assert.strictEqual(round(actual, 5), expected, unit + ' -> ' + targetUnit); - }); + } }); test('invalid conversions', () => { const invalid_units = { - px: ['deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - cm: ['deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - mm: ['deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - q: ['deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - in: ['deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - pt: ['deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - pc: ['deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - deg: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - grad: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - rad: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - turn: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 's', 'ms', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - s: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 'deg', 'grad', 'rad', 'turn', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - ms: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 'deg', 'grad', 'rad', 'turn', 'Hz', 'kHz', 'dpi', 'dpcm', 'dppx'], - Hz: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 'deg', 'grad', 'rad', 'turn', 's', 'ms', 'dpi', 'dpcm', 'dppx'], - kHz: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 'deg', 'grad', 'rad', 'turn', 's', 'ms', 'dpi', 'dpcm', 'dppx'], - dpi: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 'deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz'], - dpcm: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 'deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz'], - dppx: ['px', 'cm', 'mm', 'in', 'pt', 'pc', 'deg', 'grad', 'rad', 'turn', 's', 'ms', 'Hz', 'kHz'], + px: [ + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + cm: [ + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + mm: [ + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + q: [ + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + in: [ + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + pt: [ + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + pc: [ + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + deg: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + grad: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + rad: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + turn: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 's', + 'ms', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + s: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 'deg', + 'grad', + 'rad', + 'turn', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + ms: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 'deg', + 'grad', + 'rad', + 'turn', + 'Hz', + 'kHz', + 'dpi', + 'dpcm', + 'dppx', + ], + Hz: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'dpi', + 'dpcm', + 'dppx', + ], + kHz: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'dpi', + 'dpcm', + 'dppx', + ], + dpi: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'Hz', + 'kHz', + ], + dpcm: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'Hz', + 'kHz', + ], + dppx: [ + 'px', + 'cm', + 'mm', + 'in', + 'pt', + 'pc', + 'deg', + 'grad', + 'rad', + 'turn', + 's', + 'ms', + 'Hz', + 'kHz', + ], }; - for (const unit in invalid_units) { - invalid_units[unit].forEach((targetUnit) => { + for (const [unit, invalidTargets] of Object.entries(invalid_units)) { + for (const invalidTarget of invalidTargets) { assert.strictEqual( - convert(10, unit, targetUnit), + convert(10, unit, invalidTarget), null, - unit + ' -> ' + targetUnit + unit + ' -> ' + invalidTarget ); - }); + } } }); diff --git a/test/index.js b/test/index.js index 2d3957e..58e14c9 100644 --- a/test/index.js +++ b/test/index.js @@ -47,7 +47,10 @@ test('should reduce simple calc (1)', testValue('calc(1px + 1px)', '2px')); test( 'should reduce simple calc (2)', // `2px+3px` violates §10.1 whitespace → preserved with a warning. - testValue('calc(1px + 1px);baz:calc(2px+3px)', /* '2px;baz:5px' */ '2px;baz:calc(2px+3px)') + testValue( + 'calc(1px + 1px);baz:calc(2px+3px)', + /* '2px;baz:5px' */ '2px;baz:calc(2px+3px)' + ) ); test('should reduce simple calc (3)', testValue('calc(1rem * 1.5)', '1.5rem')); @@ -204,7 +207,10 @@ test( test( 'should ignore calc with css variables (1)', // spec-style spaces; canonical order puts the dim first. - testValue('calc(var(--mouseX) * 1px)', /* 'calc(var(--mouseX)*1px)' */ 'calc(1px * var(--mouseX))') + testValue( + 'calc(var(--mouseX) * 1px)', + /* 'calc(var(--mouseX)*1px)' */ 'calc(1px * var(--mouseX))' + ) ); test( @@ -244,7 +250,10 @@ test( test( 'should ignore calc with css variables (6)', // `/2` → `* 0.5` (reciprocal); coefficient first. - testValue('calc(var(--popupHeight) / 2)', /* 'calc(var(--popupHeight)/2)' */ 'calc(0.5 * var(--popupHeight))') + testValue( + 'calc(var(--popupHeight) / 2)', + /* 'calc(var(--popupHeight)/2)' */ 'calc(0.5 * var(--popupHeight))' + ) ); test( @@ -256,37 +265,38 @@ test( ) ); - test( - 'should ignore multiplication with infinity', -// spec-style spaces around `*`. -testValue('calc(infinity * 1px)', /* 'calc(infinity*1px)' */ 'calc(infinity * 1px)') + 'should ignore multiplication with infinity', + // spec-style spaces around `*`. + testValue( + 'calc(infinity * 1px)', + /* 'calc(infinity*1px)' */ 'calc(infinity * 1px)' + ) ); test( - 'should ignore addition with infinity', -testValue('calc(infinity + 1px)', 'calc(infinity + 1px)') + 'should ignore addition with infinity', + testValue('calc(infinity + 1px)', 'calc(infinity + 1px)') ); test( - 'should ignore multiplication with pi', -// fold `pi` (§10.7.1). -testValue('calc(1px * pi)', /* 'calc(1px*pi)' */ '3.14159px') + 'should ignore multiplication with pi', + // fold `pi` (§10.7.1). + testValue('calc(1px * pi)', /* 'calc(1px*pi)' */ '3.14159px') ); test( - 'should ignore addition with pi', -// fold `pi` (§10.7.1). -testValue('calc(43 + pi)', /* 'calc(43 + pi)' */ '46.14159') + 'should ignore addition with pi', + // fold `pi` (§10.7.1). + testValue('calc(43 + pi)', /* 'calc(43 + pi)' */ '46.14159') ); test( - 'should preserve e', -// fold `e` (§10.7.1). -testValue('calc(e)', /* 'calc(e)' */ '2.71828') + 'should preserve e', + // fold `e` (§10.7.1). + testValue('calc(e)', /* 'calc(e)' */ '2.71828') ); - test( 'should reduce calc with newline characters', testValue('calc(\n1rem \n* 2 \n* 1.5)', '3rem') @@ -345,10 +355,7 @@ test( testValue('calc(100svmax - 44.5svh)', 'calc(100svmax - 44.5svh)') ); -test( - 'should add numbers with lh units', - testValue('calc(1lh + 4lh)', '5lh') -); +test('should add numbers with lh units', testValue('calc(1lh + 4lh)', '5lh')); test( 'should add numbers with rlh units', @@ -511,7 +518,10 @@ test( test( 'should reduce nested expression', // zero bucket kept for type info. - testValue('calc( (1em - calc( 10px + 1em)) / 2)', /* '-5px' */ 'calc(0em - 5px)') + testValue( + 'calc( (1em - calc( 10px + 1em)) / 2)', + /* '-5px' */ 'calc(0em - 5px)' + ) ); test( @@ -585,7 +595,10 @@ test( test( 'should apply algebraic reduction (cssnano#319)', // zero bucket kept for type info. - testValue('calc((100px - 1em) + (-50px + 1em))', /* '50px' */ 'calc(50px + 0em)') + testValue( + 'calc((100px - 1em) + (-50px + 1em))', + /* '50px' */ 'calc(50px + 0em)' + ) ); test( @@ -629,9 +642,13 @@ test( test( 'should reduce calc in media queries when `mediaQueries` option is set to true', // `10px+10px` violates §10.1 whitespace → preserved with a warning. - testCss('@media (min-width:calc(10px+10px)){}', /* '@media (min-width:20px){}' */ '@media (min-width:calc(10px+10px)){}', { - mediaQueries: true, - }) + testCss( + '@media (min-width:calc(10px+10px)){}', + /* '@media (min-width:20px){}' */ '@media (min-width:calc(10px+10px)){}', + { + mediaQueries: true, + } + ) ); test( @@ -709,7 +726,10 @@ test( test( 'should handle nested calc statements (reduce-css-calc#49)', // zero bucket kept for type info. - testValue('calc(calc(2.25rem + 2px) - 1px * 2)', /* '2.25rem' */ 'calc(2.25rem + 0px)') + testValue( + 'calc(calc(2.25rem + 2px) - 1px * 2)', + /* '2.25rem' */ 'calc(2.25rem + 0px)' + ) ); test( @@ -765,11 +785,17 @@ test( test( 'should not strip calc with single CSS custom variables and value', // canonical order: dim before opaque var(). - testValue('calc(var(--foo) + 10px)', /* 'calc(var(--foo) + 10px)' */ 'calc(10px + var(--foo))') + testValue( + 'calc(var(--foo) + 10px)', + /* 'calc(var(--foo) + 10px)' */ 'calc(10px + var(--foo))' + ) ); // unit case lowercased. -test('should reduce calc (uppercase)', testValue('CALC(1PX + 1PX)', /* '2PX' */ '2px')); +test( + 'should reduce calc (uppercase)', + testValue('CALC(1PX + 1PX)', /* '2PX' */ '2px') +); test( 'should reduce calc (uppercase) (#1)', @@ -779,7 +805,10 @@ test( test( 'should reduce calc (uppercase) (#2)', // zero bucket kept → calc() wrapper survives (name case preserved). - testValue('CALC( (1EM - CALC( 10PX + 1EM)) / 2)', /* '-5PX' */ 'CALC(0em - 5px)') + testValue( + 'CALC( (1EM - CALC( 10PX + 1EM)) / 2)', + /* '-5PX' */ 'CALC(0em - 5px)' + ) ); test( @@ -924,7 +953,10 @@ test( test( 'should preserve division precedence (3)', // `1/(10/x)` folds to `0.1 * x` via reciprocal. - testValue('calc(1/(10/var(--dot-size)))', /* 'calc(1/(10/var(--dot-size)))' */ 'calc(0.1 * var(--dot-size))') + testValue( + 'calc(1/(10/var(--dot-size)))', + /* 'calc(1/(10/var(--dot-size)))' */ 'calc(0.1 * var(--dot-size))' + ) ); test( @@ -1057,7 +1089,10 @@ test('convert units (#18)', testValue('calc(1q + 10pc)', '170.33333q')); test( 'unknown units', // same-unit arithmetic is purely numeric (§10.9; matches csstools). - testValue('calc(1unknown + 2unknown)', /* 'calc(1unknown + 2unknown)' */ '3unknown') + testValue( + 'calc(1unknown + 2unknown)', + /* 'calc(1unknown + 2unknown)' */ '3unknown' + ) ); test( @@ -1072,7 +1107,10 @@ test( test( 'calc-size should be ignored', - testCssDoesNotThrow('.foo{block-size: calc-size(auto, size)}', '.foo{block-size: calc-size(auto, size)}') + testCssDoesNotThrow( + '.foo{block-size: calc-size(auto, size)}', + '.foo{block-size: calc-size(auto, size)}' + ) ); test( diff --git a/test/unit/simplify/min-max.test.mjs b/test/unit/simplify/min-max.test.mjs index a40a8b8..75a5035 100644 --- a/test/unit/simplify/min-max.test.mjs +++ b/test/unit/simplify/min-max.test.mjs @@ -31,4 +31,4 @@ test('min with subtraction', () => { out('min(360px, 100% - 24px - 24px)'), 'min(360px, 100% - 48px)' ); -}) +}); diff --git a/test/unit/simplify/pow.test.mjs b/test/unit/simplify/pow.test.mjs index a93a33f..55c89ac 100644 --- a/test/unit/simplify/pow.test.mjs +++ b/test/unit/simplify/pow.test.mjs @@ -53,6 +53,6 @@ test('pow: case-insensitive', () => { assert.equal(out('POW(2, 3)'), out('pow(2, 3)')); }); -test('reduces pow with multiplication', () =>{ +test('reduces pow with multiplication', () => { assert.equal(out('1rem * pow(1.618, 3)'), '4.2358rem'); -}) +});