diff --git a/.eslintrc.json b/.eslintrc.json index bc166af3d..3adec837b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,15 +12,20 @@ "prettier" ], "parserOptions": { - "project": [ - "./tsconfig.json", - "./tests/tsconfig.json", - "./cz-adapter/tsconfig.json" - ] + "project": true }, - "ignorePatterns": ["/build/", "/coverage/", "/lib/", "/cz-adapter/**/*.js"], + "ignorePatterns": [ + "/build/", + "/coverage/", + "/lib/", + "/tests-compiled/", + "/cz-adapter/**/*.js" + ], "rules": { - "functional/prefer-immutable-types": "off" + "functional/prefer-immutable-types": "off", + "@typescript-eslint/no-explicit-any": "warn", + "@typescript-eslint/no-unnecessary-condition": "off", + "@typescript-eslint/restrict-plus-operands": "off" }, "overrides": [ { @@ -59,15 +64,26 @@ }, { "files": ["**/*.test.ts"], - "plugins": ["ava"], - "extends": ["plugin:ava/recommended"], "rules": { "@typescript-eslint/no-unsafe-argument": "off", "@typescript-eslint/no-unsafe-assignment": "off", "@typescript-eslint/no-unsafe-call": "off", "@typescript-eslint/no-unsafe-member-access": "off", "@typescript-eslint/no-unsafe-return": "off", - "jsdoc/require-jsdoc": "off" + "@typescript-eslint/no-unused-vars-experimental": "off", + "@typescript-eslint/strict-boolean-expressions": "off", + "eslint-comments/disable-enable-pair": "off", + "eslint-comments/no-unlimited-disable": "off", + "functional/functional-parameters": "off", + "functional/no-conditional-statements": "off", + "functional/no-expression-statements": "off", + "functional/no-loop-statements": "off", + "functional/no-return-void": "off", + "import/no-named-as-default-member": "off", + "jsdoc/require-jsdoc": "off", + "sonarjs/no-duplicate-string": "off", + "sonarjs/no-identical-functions": "off", + "unicorn/prefer-module": "off" } }, { @@ -84,53 +100,24 @@ "parserOptions": { "project": null }, - "extends": ["plugin:markdown/recommended", "plugin:functional/off"], + "extends": [ + "plugin:markdown/recommended", + "plugin:@typescript-eslint/disable-type-checked", + "plugin:functional/off" + ], "rules": { - "@typescript-eslint/await-thenable": "off", "@typescript-eslint/consistent-type-definitions": "off", - "@typescript-eslint/dot-notation": "off", "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-confusing-void-expression": "off", "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-floating-promises": "off", - "@typescript-eslint/no-for-in-array": "off", - "@typescript-eslint/no-implied-eval": "off", - "@typescript-eslint/no-misused-promises": "off", - "@typescript-eslint/no-throw-literal": "off", - "@typescript-eslint/no-unnecessary-condition": "off", - "@typescript-eslint/no-unnecessary-type-assertion": "off", - "@typescript-eslint/no-unsafe-argument": "off", - "@typescript-eslint/no-unsafe-assignment": "off", - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-return": "off", "@typescript-eslint/no-unused-expressions": "off", "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/non-nullable-type-assertion-style": "off", - "@typescript-eslint/prefer-includes": "off", - "@typescript-eslint/prefer-nullish-coalescing": "off", - "@typescript-eslint/prefer-readonly-parameter-types": "off", - "@typescript-eslint/prefer-readonly": "off", - "@typescript-eslint/prefer-regexp-exec": "off", - "@typescript-eslint/prefer-string-starts-ends-with": "off", - "@typescript-eslint/promise-function-async": "off", - "@typescript-eslint/require-await": "off", - "@typescript-eslint/restrict-plus-operands": "off", - "@typescript-eslint/restrict-template-expressions": "off", - "@typescript-eslint/strict-boolean-expressions": "off", - "@typescript-eslint/switch-exhaustiveness-check": "off", - "@typescript-eslint/unbound-method": "off", + "@typescript-eslint/prefer-function-type": "off", + "@typescript-eslint/consistent-generic-constructors": "off", "import/no-unresolved": "off", "init-declarations": "off", "jsdoc/require-jsdoc": "off", - "no-console": "off", - "no-empty": "off", - "no-invalid-this": "off", - "no-undef": "off", - "no-useless-return": "off", - "node/handle-callback-err": "off", + "n/handle-callback-err": "off", "prefer-const": "off", "prettier/prettier": "off", "sonarjs/no-extra-arguments": "off", @@ -138,10 +125,15 @@ "unicorn/prefer-optional-catch-binding": "off", "unicorn/prefer-top-level-await": "off", "unicorn/switch-case-braces": "off", - - "dot-notation": "error", - "no-implied-eval": "error", - "require-await": "error" + "no-console": "off", + "no-empty": "off", + "no-invalid-this": "off", + "no-undef": "off", + "no-useless-return": "off", + "dot-notation": "off", + "no-empty-function": "off", + "no-throw-literal": "off", + "no-unused-vars": "off" } } ] diff --git a/.gitattributes b/.gitattributes index 02bc46020..4479c4f7a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,7 +6,6 @@ /.husky/** linguist-detectable=false **/tsconfig.json linguist-language=jsonc -**/tsconfig.*.json linguist-language=jsonc /.lintstagedrc linguist-language=json /.vscode/*.json linguist-language=jsonc diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index cc73d2088..5a97f12ac 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ -issuehunt: eslint-functional/eslint-plugin-functional +tidelift: npm/eslint-plugin-functional ko_fi: rebeccastevens custom: https://github.com/eslint-functional/eslint-plugin-functional/blob/main/DONATIONS.md +issuehunt: eslint-functional/eslint-plugin-functional diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 0c2904592..2d312b982 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -4,8 +4,13 @@ on: push: branches: - main + paths: + - .github/labels.yml workflow_dispatch: +permissions: + pull-requests: write + jobs: build: runs-on: ubuntu-latest @@ -13,5 +18,7 @@ jobs: - uses: actions/checkout@v3 - uses: micnncim/action-label-syncer@v1 + with: + manifest: .github/labels.yml env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/test-js.yml b/.github/workflows/test-js.yml index 1b840f79d..6ecb4edb4 100644 --- a/.github/workflows/test-js.yml +++ b/.github/workflows/test-js.yml @@ -19,8 +19,8 @@ jobs: ts_version: - "next" - "latest" - - "4.0.2" - - "JS" + - "4.3.5" + # - "JS" runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.ts_version == 'next' }} env: @@ -47,21 +47,6 @@ jobs: if: matrix.ts_version != 'JS' run: pnpm add -D typescript@"${{ matrix.ts_version }}" - - name: Remove incompatible settings for ts 4.0.2 - if: matrix.ts_version == '4.0.2' - run: | - node -e ' - const fs = require("fs"); - const filename = "./tsconfig.base.json"; - const tsConfig = require(filename); - delete tsConfig.compilerOptions.exactOptionalPropertyTypes; - delete tsConfig.compilerOptions.noPropertyAccessFromIndexSignature; - delete tsConfig.compilerOptions.noUncheckedIndexedAccess; - const tsConfigString = JSON.stringify(tsConfig, undefined, 2); - fs.writeFileSync(filename, tsConfigString, { encoding: "utf8" }); - console.log("TS Config updated successfully."); - ' - - name: Run Tests run: pnpm test-compiled diff --git a/.gitignore b/.gitignore index bc8259f6b..675373f4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ /lib/ /build/ /coverage/ - -.nyc_output/ +/tests-compiled/ node_modules/ diff --git a/.nycrc b/.nycrc deleted file mode 100644 index 77fff9689..000000000 --- a/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "@istanbuljs/nyc-config-typescript", - "include": ["src/**/*", "build/src/**/*"], - "exclude": ["src/util/conditional-imports/**/*"], - "reporter": ["lcov", "text"], - "check-coverage": false, - "watermarks": { - "lines": [80, 95], - "functions": [80, 95], - "branches": [80, 95], - "statements": [80, 95] - } -} diff --git a/.prettierignore b/.prettierignore index 9ca83c33d..d6048039d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,8 +2,7 @@ /lib/ /build/ /coverage/ - -.nyc_output/ +/tests-compiled/ node_modules/ pnpm-lock.yaml diff --git a/.releaserc.yml b/.releaserc.yml index d8ecc2558..5a3ec16dc 100644 --- a/.releaserc.yml +++ b/.releaserc.yml @@ -44,7 +44,7 @@ plugins: - changelogTitle: "# Changelog All notable changes to this project will be documented in this file. Dates are displayed in UTC." - - - "@google/semantic-release-replace-plugin" + - - "semantic-release-replace-plugin" - replacements: - files: - "./lib/**/*" diff --git a/.vscode/launch.json b/.vscode/launch.json index 3ba828013..1d1b20d3e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,23 +1,18 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", - "name": "AVA Test Current Test File", - "program": "${workspaceFolder}/node_modules/ava/entrypoints/cli.mjs", - "args": ["${file}"], - "outputCapture": "std", - "skipFiles": ["/**/*.js"], - "env": { - "TEST_ALL_FILES": "1" - }, + "name": "Debug Current Test File", + "autoAttachChildProcesses": true, + "skipFiles": ["/**", "**/node_modules/**"], + "program": "${workspaceRoot}/node_modules/vitest/vitest.mjs", + "args": ["run", "${relativeFile}"], + "smartStep": true, "sourceMaps": true, - "console": "integratedTerminal", - "internalConsoleOptions": "neverOpen" + "console": "integratedTerminal" } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index bedfb5696..117d88155 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,5 @@ { "files.exclude": { - ".nyc_output": true, "coverage": true, "cz-adapter/index.js": true }, diff --git a/CHANGELOG.md b/CHANGELOG.md index cdf44cd1f..f97dad111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,80 @@ # Changelog All notable changes to this project will be documented in this file. Dates are displayed in UTC. +# [6.0.0-next.7](https://github.com/eslint-functional/eslint-plugin-functional/compare/v6.0.0-next.6...v6.0.0-next.7) (2023-07-24) + + +### Bug Fixes + +* **immutable-data:** rework logic, it should work now ([9644994](https://github.com/eslint-functional/eslint-plugin-functional/commit/96449949d35b5b8dcbb87f91065f1d08131364fb)), closes [#692](https://github.com/eslint-functional/eslint-plugin-functional/issues/692) + +# [6.0.0-next.6](https://github.com/eslint-functional/eslint-plugin-functional/compare/v6.0.0-next.5...v6.0.0-next.6) (2023-07-21) + + +### Features + +* **immutable-data:** add new option `ignoreNonConstDeclarations` ([ecde24a](https://github.com/eslint-functional/eslint-plugin-functional/commit/ecde24afed487b9b495832ea067c662a0848825a)), closes [#691](https://github.com/eslint-functional/eslint-plugin-functional/issues/691) + +# [6.0.0-next.5](https://github.com/eslint-functional/eslint-plugin-functional/compare/v6.0.0-next.4...v6.0.0-next.5) (2023-07-21) + + +### Bug Fixes + +* replace `ignorePattern` option with `ignoreIdentifierPattern` and `ignoreCodePattern` ([48d8eba](https://github.com/eslint-functional/eslint-plugin-functional/commit/48d8eba1356c54b2e0fa568c5cb2526e224c31ed)), closes [#467](https://github.com/eslint-functional/eslint-plugin-functional/issues/467) + + +### BREAKING CHANGES + +* replace `ignorePattern` option with `ignoreIdentifierPattern` and `ignoreCodePattern` + +# [6.0.0-next.4](https://github.com/eslint-functional/eslint-plugin-functional/compare/v6.0.0-next.3...v6.0.0-next.4) (2023-07-21) + + +### Features + +* **no-expression-statements:** add option to ignore self returning functions ([894fb91](https://github.com/eslint-functional/eslint-plugin-functional/commit/894fb915b5418e7ee47019b3d7296eee0e307f20)), closes [#611](https://github.com/eslint-functional/eslint-plugin-functional/issues/611) + +# [6.0.0-next.3](https://github.com/eslint-functional/eslint-plugin-functional/compare/v6.0.0-next.2...v6.0.0-next.3) (2023-07-17) + + +### Bug Fixes + +* add sanity checks to type immutablity override settings ([d3ce5b0](https://github.com/eslint-functional/eslint-plugin-functional/commit/d3ce5b0db162af843886489850706c070f375d01)) + +# [6.0.0-next.2](https://github.com/eslint-functional/eslint-plugin-functional/compare/v6.0.0-next.1...v6.0.0-next.2) (2023-07-17) + + +### Features + +* **functional-parameters:** add option to ignore getters and setters ([9c89b9e](https://github.com/eslint-functional/eslint-plugin-functional/commit/9c89b9e4f8960e4ee211b640cd7bb2e3c79b0ed8)) + +# [6.0.0-next.1](https://github.com/eslint-functional/eslint-plugin-functional/compare/v5.0.8...v6.0.0-next.1) (2023-07-15) + + +### Bug Fixes + +* further updates for v6 ([71ecdb5](https://github.com/eslint-functional/eslint-plugin-functional/commit/71ecdb50c5fe7cd392141fbd9009dc1d091368be)) +* migrate code for [@typescript-eslint](https://github.com/typescript-eslint) v6 ([5c6b1a2](https://github.com/eslint-functional/eslint-plugin-functional/commit/5c6b1a20937afd63425a65492cb05928f06d80ac)) + + +### Build System + +* increase minimum supported TypeScript version to 4.3.5 ([aefe6b2](https://github.com/eslint-functional/eslint-plugin-functional/commit/aefe6b2012440d54d006924732975e75ac903716)) + + +### Features + +* **prefer-immutable-types:** use suggestions instead of a fixer by default ([#598](https://github.com/eslint-functional/eslint-plugin-functional/issues/598)) ([3fb9028](https://github.com/eslint-functional/eslint-plugin-functional/commit/3fb902842fa256bde98c0b7fd9c360a6456fd250)) +* remove `assumeTypes` option ([6be5862](https://github.com/eslint-functional/eslint-plugin-functional/commit/6be5862a65c65b389f2cc787c93a42b10407938a)) + + +### BREAKING CHANGES + +* increase minimum supported TypeScript version to 4.3.5 +* remove `assumeTypes` option +* **prefer-immutable-types:** The fixer config no longer inherits as many options as before; be sure to be +explicit in your configs. + ## [5.0.8](https://github.com/eslint-functional/eslint-plugin-functional/compare/v5.0.7...v5.0.8) (2023-04-15) diff --git a/DONATIONS.md b/DONATIONS.md index c7c054584..4ebb4a594 100644 --- a/DONATIONS.md +++ b/DONATIONS.md @@ -2,6 +2,10 @@ Any donations would be much appreciated. 😄 +## Enterprise Users + +`eslint-plugin-functional` is available as part of the [Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-eslint-plugin-functional?utm_source=npm-eslint-plugin-functional&utm_medium=referral&utm_campaign=enterprise&utm_term=repo). + ## Real money [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/rebeccastevens) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 41d75201e..bb1fc2612 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -60,12 +60,13 @@ Enable rulesets via the "extends" property of your `.eslintrc` configuration fil Add `@typescript-eslint/parser` to the "parser" filed in your `.eslintrc` configuration file. To use type information, you will need to specify a path to your `tsconfig.json` file in the "project" property of "parserOptions". +Alternatively, you can just set "project" to `true` to automatically use the nearest `tsconfig.json` files. ```jsonc { "parser": "@typescript-eslint/parser", "parserOptions": { - "project": "./tsconfig.json" + "project": true } } ``` @@ -78,7 +79,7 @@ See [@typescript-eslint/parser's README.md](https://github.com/typescript-eslint { "parser": "@typescript-eslint/parser", "parserOptions": { - "project": "tsconfig.json" + "project": true }, "env": { "es6": true diff --git a/README.md b/README.md index 2a4107d06..387a3ed03 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,13 @@ An [ESLint](http://eslint.org) plugin to disable mutation and promote functional [Any donations would be much appreciated](./DONATIONS.md). 😄 +### Enterprise Users + +`eslint-plugin-functional` is available as part of the Tidelift Subscription. + +Tidelift is working with the maintainers of `eslint-plugin-functional` and a growing network of open source maintainers to ensure your open source software supply chain meets enterprise standards now and into the future. +[Learn more.](https://tidelift.com/subscription/pkg/npm-eslint-plugin-functional?utm_source=npm-eslint-plugin-functional&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + ## Getting Started [See our getting started guide](./GETTING_STARTED.md). @@ -110,7 +117,7 @@ The [below section](#rules) gives details on which rules are enabled by each rul | :--------------------------------------------------------------------------- | :-------------------------------------------------------------- | :------------------------------- | :-- | :-- | :-- | :-- | :-- | | [immutable-data](docs/rules/immutable-data.md) | Enforce treating data as immutable. | ☑️ ✅ 🔒 ![badge-no-mutations][] | | | | | | | [no-let](docs/rules/no-let.md) | Disallow mutable variables. | ☑️ ✅ 🔒 ![badge-no-mutations][] | | | | | | -| [prefer-immutable-types](docs/rules/prefer-immutable-types.md) | Require function parameters to be typed as certain immutability | ☑️ ✅ 🔒 ![badge-no-mutations][] | | | 🔧 | | | +| [prefer-immutable-types](docs/rules/prefer-immutable-types.md) | Require function parameters to be typed as certain immutability | ☑️ ✅ 🔒 ![badge-no-mutations][] | | | 🔧 | 💡 | | | [prefer-readonly-type](docs/rules/prefer-readonly-type.md) | Prefer readonly types over mutable types. | | | | 🔧 | | ❌ | | [type-declaration-immutability](docs/rules/type-declaration-immutability.md) | Enforce the immutability of types based on patterns. | ☑️ ✅ 🔒 ![badge-no-mutations][] | | | 🔧 | | | diff --git a/ava.config.mjs b/ava.config.mjs deleted file mode 100644 index 40ea9347d..000000000 --- a/ava.config.mjs +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Get the intended boolean value from the given string. - */ -function getBoolean(value) { - if (value === undefined) { - return false; - } - const asNumber = Number(value); - return Number.isNaN(asNumber) - ? Boolean(String(value).toLowerCase().replace("false", "")) - : Boolean(asNumber); -} - -const testAllFiles = getBoolean(process.env["TEST_ALL_FILES"]); -const useCompiledTests = getBoolean(process.env["USE_COMPILED_TESTS"]); -const onlyTestWorkFile = getBoolean(process.env["ONLY_TEST_WORK_FILE"]); - -const avaCommonConfig = { - files: testAllFiles - ? ["tests/rules/*.test.*"] - : onlyTestWorkFile - ? ["tests/rules/work.test.*"] - : ["tests/**/!(work)*.test.*"], - timeout: "5m", -}; - -const avaTsConfig = { - ...avaCommonConfig, - extensions: ["ts"], - require: ["ts-node/register", "tsconfig-paths/register"], - environmentVariables: { - TS_NODE_PROJECT: "tests/tsconfig.json", - }, -}; - -const avaJsConfig = { - ...avaCommonConfig, - extensions: ["js"], - require: ["tsconfig-paths/register"], - environmentVariables: { - TS_NODE_PROJECT: "build/tests/tsconfig.json", - }, - typescript: { - rewritePaths: { - "src/": "build/src/", - "tests/": "build/tests/", - }, - compile: false, - }, -}; - -export default useCompiledTests ? avaJsConfig : avaTsConfig; diff --git a/cz-adapter/engine.ts b/cz-adapter/engine.ts index 9c1ddcc10..62e9b91b5 100644 --- a/cz-adapter/engine.ts +++ b/cz-adapter/engine.ts @@ -1,9 +1,9 @@ import chalk from "chalk"; import wrap from "word-wrap"; -import { rules } from "~/rules"; +import { rules } from "#eslint-plugin-functional/rules"; -import type { Options } from "./options"; +import { type Options } from "./options"; type Answers = Readonly<{ type: string; @@ -22,7 +22,7 @@ type CZ = any; * The engine. */ export default ( - options: Options + options: Options, ): { prompter: (cz: CZ, commit: (msg: string) => unknown) => void } => { return { prompter: (cz, commit) => @@ -47,7 +47,7 @@ function promptUser(cz: CZ, options: Options) { Object.keys(types).reduce( (longest, current) => longest >= current.length ? longest : current.length, - 0 + 0, ) + 1; const typesChoices = Object.entries(types).map(([key, type]) => { const label = `${key}:`.padEnd(typesLength); @@ -117,7 +117,7 @@ function promptUser(cz: CZ, options: Options) { message(answers: Answers) { return `Write a short, imperative tense description of the change (max ${maxSummaryLength( options, - answers + answers, )} chars):\n`; }, default: defaultSubject, @@ -129,7 +129,7 @@ function promptUser(cz: CZ, options: Options) { ? true : `Subject length must be less than or equal to ${maxSummaryLength( options, - answers + answers, )} characters. Current length is ${ filteredSubject.length } characters.`; @@ -174,7 +174,7 @@ function promptUser(cz: CZ, options: Options) { */ function doCommit( commit: (msg: string) => unknown, - options: Options + options: Options, ): (answers: Answers) => unknown { const wrapOptions = { trim: true, diff --git a/cz-adapter/tsconfig.json b/cz-adapter/tsconfig.json index 4824b2ee0..c5a7547b2 100644 --- a/cz-adapter/tsconfig.json +++ b/cz-adapter/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.json", "compilerOptions": { "module": "commonjs", "moduleResolution": "node", - "skipLibCheck": true, - "declaration": false + "skipLibCheck": true }, "ts-node": { "emit": true, diff --git a/docs/rules/functional-parameters.md b/docs/rules/functional-parameters.md index c475654e8..cc6f795ea 100644 --- a/docs/rules/functional-parameters.md +++ b/docs/rules/functional-parameters.md @@ -63,8 +63,9 @@ type Options = { count: "atLeastOne" | "exactlyOne"; ignoreLambdaExpression: boolean; ignoreIIFE: boolean; + ignoreGettersAndSetters: boolean; }; - ignorePattern?: string[] | string; + ignoreIdentifierPattern?: string[] | string; ignorePrefixSelector?: string[] | string; }; ``` @@ -79,6 +80,7 @@ const defaults = { count: "atLeastOne", ignoreLambdaExpression: false, ignoreIIFE: true, + ignoreGettersAndSetters: true, }, }; ``` @@ -92,6 +94,7 @@ const recommendedOptions = { enforceParameterCount: { ignoreLambdaExpression: true, ignoreIIFE: true, + ignoreGettersAndSetters: true, }, }; ``` @@ -163,6 +166,10 @@ Here, a lambda function expression refers to any function being defined in place If true, this option allows for the use of [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) that do not have any parameters. +#### `enforceParameterCount.ignoreGettersAndSetters` + +Getters should always take zero parameters, and setter one. If for some reason you want to treat these function like any other function, then you can set this option to `false`. + ### `ignorePrefixSelector` This allows for ignore functions where one of the given selectors matches the parent node in the AST of the function node.\ @@ -185,7 +192,7 @@ The following inline callback won't be flagged: const sum = [1, 2, 3].reduce((carry, current) => current, 0); ``` -### `ignorePattern` +### `ignoreIdentifierPattern` -Patterns will be matched against function names. -See the [ignorePattern](./options/ignore-pattern.md) docs for more information. +This option takes a RegExp string or an array of RegExp strings. +It allows for the ability to ignore violations based on a function's name. diff --git a/docs/rules/immutable-data.md b/docs/rules/immutable-data.md index 510854bcd..7661c5fe7 100644 --- a/docs/rules/immutable-data.md +++ b/docs/rules/immutable-data.md @@ -59,15 +59,10 @@ This rule accepts an options object of the following type: ```ts type Options = { - assumeTypes: - | boolean - | { - forArrays: boolean; - forObjects: boolean; - }; ignoreClasses: boolean | "fieldsOnly"; ignoreImmediateMutation: boolean; - ignorePattern?: string[] | string; + ignoreNonConstDeclarations: boolean; + ignoreIdentifierPattern?: string[] | string; ignoreAccessorPattern?: string[] | string; }; ``` @@ -76,9 +71,9 @@ type Options = { ```ts type Options = { - assumeTypes: true; ignoreClasses: false; ignoreImmediateMutation: true; + ignoreNonConstDeclarations: false; }; ``` @@ -92,25 +87,6 @@ const liteOptions = { }; ``` -### `assumeTypes` - -The rule takes advantage of TypeScript's typing engine to check if mutation is taking place. -If you are not using TypeScript, type checking cannot be performed; hence this option exists. - -This option will make the rule assume the type of the nodes it is checking are of type Array/Object. -However this may result in some false positives being picked up. - -Disabling this option can result in false negatives, for example: - -```js -// When this option is DISABLED (and type info is not available). -const x = [0, 1, 2]; -x.push(3); // This will NOT be flagged. -// This is due to the fact that without a typing engine, we cannot tell that x is an array. -``` - -Note: This option will have no effect if the TypeScript typing engine is available (i.e. you are using TypeScript and have configured ESLint correctly). - ### `ignoreImmediateMutation` If true, immediate mutation of objects before they are assigned to a variable is allowed. @@ -123,16 +99,25 @@ const original = ["foo", "bar", "baz"]; const sorted = [...original].sort((a, b) => a.localeCompare(b)); // This is OK with ignoreImmediateMutation. ``` +### `ignoreNonConstDeclarations` + +If true, this rule will ignore any mutations that happen on non-const variables. +This allow for more easily using mutable data by simply using the `let` keyword instead of `const`. + +Note: If a value is referenced by both a `let` and a `const` variable, the `let` +reference can be modified while the `const` one can't. The may lead to value of +the `const` variable unexpectedly changing when the `let` one is modified elsewhere. + ### `ignoreClasses` Ignore mutations inside classes. Classes already aren't functional so ignore mutations going on inside them. -### `ignorePattern` +### `ignoreIdentifierPattern` -Patterns will be matched against variable names. -See the [ignorePattern](./options/ignore-pattern.md) docs for more information. +This option takes a RegExp string or an array of RegExp strings. +It allows for the ability to ignore violations based on a variable's name. ### `ignoreAccessorPattern` diff --git a/docs/rules/no-expression-statements.md b/docs/rules/no-expression-statements.md index 6fedf753a..ee4c23a5c 100644 --- a/docs/rules/no-expression-statements.md +++ b/docs/rules/no-expression-statements.md @@ -58,8 +58,9 @@ This rule accepts an options object of the following type: ```ts type Options = { - ignorePattern?: string[] | string; + ignoreCodePattern?: string[] | string; ignoreVoid?: boolean; + ignoreSelfReturning?: boolean; }; ``` @@ -68,6 +69,7 @@ type Options = { ```ts const defaults = { ignoreVoid: false, + ignoreSelfReturning: false, }; ``` @@ -75,7 +77,13 @@ const defaults = { When enabled, expression of type void are not flagged as violations. This options requires TypeScript in order to work. -### `ignorePattern` +### `ignoreSelfReturning` -Patterns will be matched against the line(s) of code. -See the [ignorePattern](./options/ignore-pattern.md) docs for more information. +Like `ignoreVoid` but instead does not flag function calls that always only return `this`. + +Limitation: The function declaration must explicitly use `return this`; equivalents (such as assign this to a variable first, that is then returned) won't be considered valid. + +### `ignoreCodePattern` + +This option takes a RegExp string or an array of RegExp strings. +It allows for the ability to ignore violations based on the code itself. diff --git a/docs/rules/no-let.md b/docs/rules/no-let.md index 2149fd748..100c85fd5 100644 --- a/docs/rules/no-let.md +++ b/docs/rules/no-let.md @@ -57,7 +57,7 @@ This rule accepts an options object of the following type: ```ts type Options = { allowInFunctions: boolean; - ignorePattern?: string[] | string; + ignoreIdentifierPattern?: string[] | string; }; ``` @@ -118,9 +118,7 @@ for (let [index, element] of array.entries()) { If true, the rule will not flag any statements that are inside of function bodies. -See the [allowLocalMutation](./options/allow-local-mutation.md) docs for more information. +### `ignoreIdentifierPattern` -### `ignorePattern` - -Patterns will be matched against variable names. -See the [ignorePattern](./options/ignore-pattern.md) docs. +This option takes a RegExp string or an array of RegExp strings. +It allows for the ability to ignore violations based on a variable's name. diff --git a/docs/rules/options/allow-local-mutation.md b/docs/rules/options/allow-local-mutation.md deleted file mode 100644 index bc0fa2ca9..000000000 --- a/docs/rules/options/allow-local-mutation.md +++ /dev/null @@ -1,16 +0,0 @@ -# Using the `allowLocalMutation` option - -If this option is set to true, local state is allowed to be mutated. Local state is simply any code inside of a function. - -Note: That using this option can lead to more imperative code in functions so use with care! - -## Details - -> If a tree falls in the woods, does it make a sound? -> If a pure function mutates some local data in order to produce an immutable return value, is that ok? - -The quote above is from the [Clojure docs](https://clojure.org/reference/transients). -In general, it is more important to enforce immutability for state that is passed in and out of functions than for local state used for internal calculations within a function. -For example in Redux, the state going in and out of reducers needs to be immutable while the reducer may be allowed to mutate local state in its calculations in order to achieve higher performance. -This is what the `allowLocalMutation` option enables. With this option enabled immutability will be enforced everywhere but in local state. -Function parameters and return types are not considered local state so they will still be checked. diff --git a/docs/rules/options/ignore-pattern.md b/docs/rules/options/ignore-pattern.md deleted file mode 100644 index 64916a5ca..000000000 --- a/docs/rules/options/ignore-pattern.md +++ /dev/null @@ -1,29 +0,0 @@ -# Using the `ignorePattern` option - -This option takes a RegExp string or an array of RegExp strings. -It allows for the ability to ignore violations based on the identifier (name) of node in question. - -## Details - -Some languages are immutable by default but allows you to explicitly declare mutable variables. -For example in [reason](https://facebook.github.io/reason/) you can declare mutable record fields like this: - -```reason -type person = { - name: string, - mutable age: int -}; -``` - -TypeScript is not immutable by default but it can be if you use this package. -So in order to create an escape hatch similar to how it is done in reason the `ignorePattern` option can be used. -For example if you configure it to allow variables with names that has the prefix "mutable" you can emulate the above example in TypeScript like this: - -```ts -type Person = { - readonly name: string; - mutableAge: number; // This is OK with ignorePattern = "^mutable" -}; -``` - -Yes, variable names like `mutableAge` are ugly, but then again mutation is an ugly business 😃. diff --git a/docs/rules/prefer-immutable-types.md b/docs/rules/prefer-immutable-types.md index ba8250d35..85f70c1a8 100644 --- a/docs/rules/prefer-immutable-types.md +++ b/docs/rules/prefer-immutable-types.md @@ -2,7 +2,7 @@ 💼 This rule is enabled in the following configs: ☑️ `lite`, `no-mutations`, ✅ `recommended`, 🔒 `strict`. -🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). +🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions). @@ -23,9 +23,53 @@ something like a readonly array to a functional that wants a mutable array; even if the function does not actually mutate said array. Libraries should therefore always enforce this rule for parameters. +### Pure Functions + +Ideally a pure function should always take immutable parameters and return a mutable value. +This is because pure functions don't cause any side-effects, such as mutating the parameters; +and they don't care what the caller then does with the returned value. However in practice this +isn't often practical. + +For example, take this snippet of code: + +```ts +type Foo = { hello: number }; +type Bar = { world: number }; + +function addBar(foo: Readonly) { + return { + foo, + bar: { world: 2 }, + }; +} + +const foobar = addBar({ hello: 1 }); +``` + +Here the return type of `addBar` is shallowly mutable, but it's not deeply +mutable as its `foo` property is immutable. To make it mutable, we'd need to +deeply clone the contents of `foo`, but in many cases, and for many reasons, +this would be a very bad thing to do. Simply casting `foo` to a mutable type can +also lead to type issues later in your codebase. + +It also worth noting that the above function isn't ideally typed. The return +type of `addBar` will always state that `foo` is immutable, even if the caller +passed in a mutable `foo` value. It's putting an extra constraint on the return +type that shouldn't exits. A better typed version of this function would be as +so: + +```ts +function addBar>(foo: F) { + return { + foo, + bar: { world: 2 }, + }; +} +``` + ### ❌ Incorrect - + ```ts /* eslint functional/prefer-immutable-types: "error" */ @@ -61,7 +105,7 @@ interface Foo1 { interface Foo2 { new (arg: string[]): void; } -const x = { foo(arg: string[]): void; }; +const x = { foo(arg: string[]): void {} }; function foo(arg: string[]); type Foo3 = (arg: string[]) => void; interface Foo4 { @@ -71,7 +115,7 @@ interface Foo4 { ### ✅ Correct - + ```ts /* eslint functional/prefer-immutable-types: "error" */ @@ -113,11 +157,14 @@ function primitive9(arg: string | number | undefined) {} function fnSig(arg: () => void) {} -enum Foo { a, b } +enum Foo { + a, + b, +} function enum1(arg: Foo) {} function symb1(arg: symbol) {} -const customSymbol = Symbol('a'); +const customSymbol = Symbol("a"); function symb2(arg: typeof customSymbol) {} // function types @@ -127,7 +174,7 @@ interface Foo1 { interface Foo2 { new (arg: ReadonlyArray): void; } -const x = { foo(arg: ReadonlyArray): void; }; +const x = { foo(arg: ReadonlyArray): void {} }; function foo(arg: ReadonlyArray); type Foo3 = (arg: ReadonlyArray) => void; interface Foo4 { @@ -178,22 +225,23 @@ type Options = { ignoreTypePattern?: string[] | string; }; - fixer?: - | { - ReadonlyShallow?: - | { pattern: string; replace: string } - | Array<{ pattern: string; replace: string }> - | false; - ReadonlyDeep?: - | { pattern: string; replace: string } - | Array<{ pattern: string; replace: string }> - | false; - Immutable?: - | { pattern: string; replace: string } - | Array<{ pattern: string; replace: string }> - | false; - } - | false; + fixer?: { + ReadonlyShallow?: + | { pattern: string; replace: string } + | Array<{ pattern: string; replace: string }>; + ReadonlyDeep?: + | { pattern: string; replace: string } + | Array<{ pattern: string; replace: string }>; + Immutable?: + | { pattern: string; replace: string } + | Array<{ pattern: string; replace: string }>; + }; + + suggestions?: { + ReadonlyShallow?: Array>; + ReadonlyDeep?: Array>; + Immutable?: Array>; + }; }; ``` @@ -204,23 +252,25 @@ const defaults = { enforcement: "Immutable", ignoreClasses: false, ignoreInferredTypes: false, - fixer: { + fixer: false, + suggestions: { ReadonlyShallow: [ - { - pattern: "^([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*\\[\\])$", - replace: "readonly $1", - }, - { - pattern: "^(Array|Map|Set)<(.+)>$", - replace: "Readonly$1<$2>", - }, - { - pattern: "^(.+)$", - replace: "Readonly<$1>", - }, + [ + { + pattern: + "^([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*\\[\\])$", + replace: "readonly $1", + }, + { + pattern: "^(Array|Map|Set)<(.+)>$", + replace: "Readonly$1<$2>", + }, + { + pattern: "^(.+)$", + replace: "Readonly<$1>", + }, + ], ], - ReadonlyDeep: false, - Immutable: false, }, }; ``` @@ -262,7 +312,7 @@ The level of immutability that should be enforced. One of the following: #### ❌ Incorrect - + ```ts /* eslint functional/prefer-immutable-types: ["error", { "enforcement": "Immutable" }] */ @@ -274,7 +324,7 @@ function map(arg: ReadonlyMap) {} // ReadonlyMap is not immutable #### ✅ Correct - + ```ts /* eslint functional/prefer-immutable-types: ["error", { "enforcement": "Immutable" }] */ @@ -284,7 +334,7 @@ function map(arg: Readonly>) {} function object(arg: Readonly<{ prop: string }>) {} ``` - + ```ts /* eslint functional/prefer-immutable-types: ["error", { "enforcement": "ReadonlyShallow" }] */ @@ -313,7 +363,7 @@ A boolean to specify if checking classes should be ignored. `false` by default. #### ❌ Incorrect - + ```ts /* eslint functional/prefer-immutable-types: ["error", { "ignoreInferredTypes": true }] */ @@ -340,7 +390,7 @@ export const acceptsCallback: AcceptsCallback; #### ✅ Correct - + ```ts /* eslint functional/prefer-immutable-types: ["error", { "ignoreInferredTypes": true }] */ @@ -375,8 +425,6 @@ Override the options specifically for the given type of types. If true, the rule will not flag any variables that are inside of function bodies. -See the [allowLocalMutation](./options/allow-local-mutation.md) docs for more information. - ### `fixer` Configure the fixer to work with your setup. @@ -384,7 +432,18 @@ If set to `false`, the fixer will be disabled. #### `fixer.*` -By default we only configure the fixer to correct shallow readonly violations as TypeScript itself provides a utility type for this. +Configure how the fixer should fix issue of each of the different enforcement levels. + +### `suggestions` + +This is the same as `fixer` but for manual suggestions instead of automatic fixers. +If set to `false`, the no suggestions will be enabled. + +### `suggestions[*].*` + +Configure how the suggestion should fix issue of each of the different enforcement levels. + +By default we only configure the suggestions to correct shallow readonly violations as TypeScript itself provides a utility type for this. If you have access to other utility types (such as [type-fest's `ReadonlyDeep`](https://github.com/sindresorhus/type-fest#:~:text=set%20to%20optional.-,ReadonlyDeep,-%2D%20Create%20a%20deeply)), you can configure the fixer to use them with this option. Example using `ReadonlyDeep` instead of `Readonly`: @@ -392,12 +451,14 @@ Example using `ReadonlyDeep` instead of `Readonly`: ```jsonc { // ... - "fixer": { + "suggestions": { "ReadonlyDeep": [ - { - "pattern": "^(?:Readonly<(.+)>|(.+))$", - "replace": "ReadonlyDeep<$1$2>" - } + [ + { + "pattern": "^(?:Readonly<(.+)>|(.+))$", + "replace": "ReadonlyDeep<$1$2>" + } + ] ] } } diff --git a/docs/rules/prefer-readonly-type.md b/docs/rules/prefer-readonly-type.md index 58de245e7..c3ce9de8a 100644 --- a/docs/rules/prefer-readonly-type.md +++ b/docs/rules/prefer-readonly-type.md @@ -157,7 +157,7 @@ Examples of **correct** code for the `{ "ignoreClass": true }` option: ```ts /* eslint functional/prefer-readonly-type: ["error", { "ignoreClass": true }] */ -class { +class C { myprop: string; } ``` @@ -218,8 +218,9 @@ const qux: Map = new Map(); ### `allowLocalMutation` -See the [allowLocalMutation](./options/allow-local-mutation.md) docs. +If `true`, local state is allowed to use non-readonly types. Local state is simply any code inside of a function. ### `ignorePattern` -See the [ignorePattern](./options/ignore-pattern.md) docs. +This option takes a RegExp string or an array of RegExp strings. +It allows for the ability to ignore violations based on a type's name. diff --git a/docs/rules/prefer-tacit.md b/docs/rules/prefer-tacit.md index b6a9e8c96..45dbd8bd9 100644 --- a/docs/rules/prefer-tacit.md +++ b/docs/rules/prefer-tacit.md @@ -10,8 +10,10 @@ This rule enforces using functions directly if they can be without wrapping them ## Rule Details -Generally there's no reason to wrap a function with a callback wrapper if it's directly called anyway. -Doing so creates extra inline lambdas that slow the runtime down. +If a function can be used directly without being in a callback wrapper, then it's generally better to use it directly. +Extra inline lambdas can slow the runtime down. + +⚠️ Warning ⚠️: Use with caution as if not all parameters should be passed to the function, a wrapper function is then required. ### ❌ Incorrect @@ -21,10 +23,10 @@ Doing so creates extra inline lambdas that slow the runtime down. /* eslint functional/prefer-tacit: "error" */ function f(x) { - // ... + return x + 1; } -const foo = (x) => f(x); +const foo = [1, 2, 3].map((x) => f(x)); ``` ### ✅ Correct @@ -33,47 +35,8 @@ const foo = (x) => f(x); /* eslint functional/prefer-tacit: "error" */ function f(x) { - // ... + return x + 1; } -const foo = f; -``` - -## Options - -This rule accepts an options object of the following type: - -```ts -type Options = { - assumeTypes: boolean; - ignorePattern?: string[] | string; -}; -``` - -### Default Options - -```ts -const defaults = { - assumeTypes: false, -}; +const foo = [1, 2, 3].map(f); ``` - -### `assumeTypes` - -The rule takes advantage of TypeScript's typing engine to check if callback wrapper is in fact safe to remove. - -This option will make the rule assume that the function only accepts the arguments given to it in the wrapper. -However this may result in some false positives being picked up. - - - -```js -const foo = (x) => f(x); // If `f` only accepts one parameter then this is violation of the rule. -const bar = foo(1, 2, 3); // But if `f` accepts more than one parameter then it isn't. -``` - -Note: Enabling this option is the only way to get this rule to report violations in an environment without TypeScript's typing engine available (e.g. In Vanilla JS). - -### `ignorePattern` - -See the [ignorePattern](./options/ignore-pattern.md) docs. diff --git a/docs/rules/settings/immutability.md b/docs/rules/settings/immutability.md index c2ec9a416..35de20ea8 100644 --- a/docs/rules/settings/immutability.md +++ b/docs/rules/settings/immutability.md @@ -27,7 +27,10 @@ readonly, then no override will be applied. "immutability": { "overrides": [ { - "name": "ReadonlyArray", + "type": { + "from": "lib", + "name": "ReadonlyArray", + }, "to": "Immutable", "from": "ReadonlyDeep" } diff --git a/docs/rules/type-declaration-immutability.md b/docs/rules/type-declaration-immutability.md index ce555b244..b88cbd919 100644 --- a/docs/rules/type-declaration-immutability.md +++ b/docs/rules/type-declaration-immutability.md @@ -20,7 +20,7 @@ section](https://github.com/RebeccaStevens/is-immutable-type#immutability) of ### ❌ Incorrect - + ```ts /* eslint functional/type-declaration-immutability: "error" */ @@ -43,7 +43,7 @@ type MutableElement = Readonly<{ ### ✅ Correct - + ```ts /* eslint functional/type-declaration-immutability: "error" */ @@ -86,7 +86,7 @@ type Options = { | false; }>; ignoreInterfaces: boolean; - ignorePattern: string[] | string; + ignoreIdentifierPattern: string[] | string; }; ``` @@ -189,6 +189,7 @@ If not set, or set to `false`, the fixer will be disabled. A boolean to specify whether interfaces should be exempt from these rules. `false` by default. -### `ignorePattern` +### `ignoreIdentifierPattern` -See the [ignorePattern](./options/ignore-pattern.md) docs. +This option takes a RegExp string or an array of RegExp strings. +It allows for the ability to ignore violations based on a type's name. diff --git a/knip.jsonc b/knip.jsonc index 8eed7c1cc..db7add940 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -1,5 +1,10 @@ { "$schema": "https://unpkg.com/knip@next/schema.json", "entry": ["src/index.ts!", "tests/**/*.test.ts", "cz-adapter/index.ts"], - "project": ["src/**/*.ts!", "tests/**/*.ts", "cz-adapter/**/*.ts"] + "project": ["src/**/*.ts!", "tests/**/*.ts", "cz-adapter/**/*.ts"], + "ignoreDependencies": [ + "@typescript-eslint/eslint-plugin-disable-type-checked", + "@vitest/coverage-c8" + ], + "ignore": ["tests/fixture/file.ts"] } diff --git a/package.json b/package.json index 97f45f6c5..700936170 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ ], "scripts": { "build": "pnpm run build:node && pnpm run build:docs", - "build-tests": "rimraf build && ts-node -P scripts/tsconfig.json scripts/compile-tests.mts", + "build-tests": "rimraf tests-compiled && tsc -p tsconfig.tests-compiled.json && tsc-alias -p tsconfig.tests-compiled.json", "build:docs": "eslint-doc-generator", "build:node": "rimraf lib && rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript", "cz": "git-cz", @@ -64,33 +64,27 @@ "prepare": "husky install", "release": "semantic-release", "test": "pnpm run test:js", - "test-compiled": "USE_COMPILED_TESTS=1 nyc ava", - "test-work": "ONLY_TEST_WORK_FILE=1 ava", - "test:js": "nyc ava", + "test-compiled": "USE_COMPILED_TESTS=1 vitest run --coverage", + "test-work": "vitest", + "test:js": "vitest --coverage", "type-check": "tsc --noEmit --skipLibCheck", "verify": "pnpm run lint && pnpm run type-check && pnpm run build-tests && pnpm run test-compiled && rimraf build" }, "dependencies": { - "@typescript-eslint/type-utils": "^5.50.0", - "@typescript-eslint/utils": "^5.50.0", - "deepmerge-ts": "^5.0.0", + "@typescript-eslint/utils": "^6.2.0", + "deepmerge-ts": "^5.1.0", "escape-string-regexp": "^4.0.0", - "is-immutable-type": "^1.2.5", - "semver": "^7.3.8" + "is-immutable-type": "^2.0.1", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "devDependencies": { - "@ava/typescript": "4.1.0", "@babel/core": "7.22.9", "@babel/eslint-parser": "7.22.9", "@commitlint/cli": "17.6.7", "@commitlint/config-conventional": "17.6.7", "@cspell/dict-cryptocurrencies": "3.0.1", - "@google/semantic-release-replace-plugin": "1.2.7", - "@istanbuljs/nyc-config-typescript": "1.0.2", - "@rebeccastevens/eslint-config": "1.6.7", - "@rollup/plugin-commonjs": "25.0.3", - "@rollup/plugin-json": "6.0.0", - "@rollup/plugin-node-resolve": "15.1.0", + "@rebeccastevens/eslint-config": "2.0.2", "@rollup/plugin-typescript": "11.1.2", "@semantic-release/changelog": "6.0.3", "@semantic-release/commit-analyzer": "10.0.1", @@ -99,67 +93,65 @@ "@semantic-release/npm": "10.0.4", "@semantic-release/release-notes-generator": "11.0.4", "@types/dedent": "0.7.0", - "@types/eslint": "8.44.0", - "@types/json-schema": "7.0.12", + "@types/eslint": "8.44.1", "@types/node": "16.18.39", "@types/rollup-plugin-auto-external": "2.0.2", "@types/semver": "7.5.0", - "@typescript-eslint/eslint-plugin": "5.62.0", - "@typescript-eslint/parser": "5.62.0", - "ava": "5.3.1", + "@typescript-eslint/eslint-plugin": "6.2.0", + "@typescript-eslint/parser": "6.2.0", + "@typescript-eslint/rule-tester": "6.2.0", + "@vitest/coverage-c8": "0.33.0", "chalk": "4.1.2", "commitizen": "4.3.0", "conventional-commit-types": "3.0.0", "cspell": "6.31.2", - "dedent": "1.2.0", - "eslint": "8.45.0", - "eslint-ava-rule-tester": "4.0.0", - "eslint-config-prettier": "8.8.0", + "dedent": "1.3.0", + "eslint": "8.46.0", + "eslint-config-prettier": "8.9.0", "eslint-doc-generator": "1.4.3", "eslint-import-resolver-typescript": "3.5.5", - "eslint-plugin-ava": "14.0.0", "eslint-plugin-eslint-comments": "3.2.0", "eslint-plugin-eslint-plugin": "5.1.1", - "eslint-plugin-import": "2.27.5", - "eslint-plugin-jsdoc": "41.1.2", - "eslint-plugin-markdown": "3.0.0", - "eslint-plugin-node": "11.1.0", + "eslint-plugin-import": "2.28.0", + "eslint-plugin-jsdoc": "46.4.5", + "eslint-plugin-markdown": "3.0.1", + "eslint-plugin-n": "16.0.1", "eslint-plugin-optimize-regex": "1.2.1", - "eslint-plugin-prettier": "4.2.1", + "eslint-plugin-prettier": "5.0.0", "eslint-plugin-promise": "6.1.1", "eslint-plugin-sonarjs": "0.19.0", - "eslint-plugin-unicorn": "48.0.0", + "eslint-plugin-unicorn": "48.0.1", "espree": "9.6.1", "husky": "8.0.3", - "json-schema": "0.4.0", - "jsonc-parser": "3.2.0", - "knip": "2.16.1", + "knip": "2.17.1", "lint-staged": "13.2.3", "markdownlint-cli": "0.35.0", - "nyc": "15.1.0", - "prettier": "2.8.8", + "prettier": "3.0.0", "prettier-plugin-packagejson": "2.4.5", "rimraf": "5.0.1", - "rollup": "3.26.3", + "rollup": "3.27.0", "rollup-plugin-auto-external": "2.0.0", "semantic-release": "21.0.7", + "semantic-release-replace-plugin": "1.2.7", "ts-node": "10.9.1", - "tsc-prog": "2.2.1", + "tsc-alias": "1.8.7", "tsconfig-paths": "4.2.0", - "tslib": "2.6.0", + "tslib": "2.6.1", "typescript": "5.1.6", + "vite-tsconfig-paths": "4.2.0", + "vitest": "0.33.0", "word-wrap": "1.2.5" }, "peerDependencies": { "eslint": "^8.0.0", - "typescript": ">=4.0.2" + "typescript": ">=4.3.5" }, "peerDependenciesMeta": { "typescript": { "optional": true } }, - "packageManager": "pnpm@7.33.5", + "packageManager": "pnpm@8.6.10", "engines": { "node": ">=16.10.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4aca9c047..989cf77aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,170 +1,224 @@ -lockfileVersion: 5.4 - -specifiers: - '@ava/typescript': 4.1.0 - '@babel/core': 7.22.9 - '@babel/eslint-parser': 7.22.9 - '@commitlint/cli': 17.6.7 - '@commitlint/config-conventional': 17.6.7 - '@cspell/dict-cryptocurrencies': 3.0.1 - '@google/semantic-release-replace-plugin': 1.2.7 - '@istanbuljs/nyc-config-typescript': 1.0.2 - '@rebeccastevens/eslint-config': 1.6.7 - '@rollup/plugin-commonjs': 25.0.3 - '@rollup/plugin-json': 6.0.0 - '@rollup/plugin-node-resolve': 15.1.0 - '@rollup/plugin-typescript': 11.1.2 - '@semantic-release/changelog': 6.0.3 - '@semantic-release/commit-analyzer': 10.0.1 - '@semantic-release/git': 10.0.1 - '@semantic-release/github': 9.0.4 - '@semantic-release/npm': 10.0.4 - '@semantic-release/release-notes-generator': 11.0.4 - '@types/dedent': 0.7.0 - '@types/eslint': 8.44.0 - '@types/json-schema': 7.0.12 - '@types/node': 16.18.39 - '@types/rollup-plugin-auto-external': 2.0.2 - '@types/semver': 7.5.0 - '@typescript-eslint/eslint-plugin': 5.62.0 - '@typescript-eslint/parser': 5.62.0 - '@typescript-eslint/type-utils': ^5.50.0 - '@typescript-eslint/utils': ^5.50.0 - ava: 5.3.1 - chalk: 4.1.2 - commitizen: 4.3.0 - conventional-commit-types: 3.0.0 - cspell: 6.31.2 - dedent: 1.2.0 - deepmerge-ts: ^5.0.0 - escape-string-regexp: ^4.0.0 - eslint: 8.45.0 - eslint-ava-rule-tester: 4.0.0 - eslint-config-prettier: 8.8.0 - eslint-doc-generator: 1.4.3 - eslint-import-resolver-typescript: 3.5.5 - eslint-plugin-ava: 14.0.0 - eslint-plugin-eslint-comments: 3.2.0 - eslint-plugin-eslint-plugin: 5.1.1 - eslint-plugin-import: 2.27.5 - eslint-plugin-jsdoc: 41.1.2 - eslint-plugin-markdown: 3.0.0 - eslint-plugin-node: 11.1.0 - eslint-plugin-optimize-regex: 1.2.1 - eslint-plugin-prettier: 4.2.1 - eslint-plugin-promise: 6.1.1 - eslint-plugin-sonarjs: 0.19.0 - eslint-plugin-unicorn: 48.0.0 - espree: 9.6.1 - husky: 8.0.3 - is-immutable-type: ^1.2.5 - json-schema: 0.4.0 - jsonc-parser: 3.2.0 - knip: 2.16.1 - lint-staged: 13.2.3 - markdownlint-cli: 0.35.0 - nyc: 15.1.0 - prettier: 2.8.8 - prettier-plugin-packagejson: 2.4.5 - rimraf: 5.0.1 - rollup: 3.26.3 - rollup-plugin-auto-external: 2.0.0 - semantic-release: 21.0.7 - semver: ^7.3.8 - ts-node: 10.9.1 - tsc-prog: 2.2.1 - tsconfig-paths: 4.2.0 - tslib: 2.6.0 - typescript: 5.1.6 - word-wrap: 1.2.5 +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false dependencies: - '@typescript-eslint/type-utils': 5.62.0_ko3fmmbeyij36muomfgt2u76xu - '@typescript-eslint/utils': 5.62.0_ko3fmmbeyij36muomfgt2u76xu - deepmerge-ts: 5.0.0 - escape-string-regexp: 4.0.0 - is-immutable-type: 1.2.5_kfc54qcd2qvnqhc4ipdxkc5nfy - semver: 7.5.4 + '@typescript-eslint/utils': + specifier: ^6.2.0 + version: 6.2.0(eslint@8.46.0)(typescript@5.1.6) + deepmerge-ts: + specifier: ^5.1.0 + version: 5.1.0 + escape-string-regexp: + specifier: ^4.0.0 + version: 4.0.0 + is-immutable-type: + specifier: ^2.0.1 + version: 2.0.1(eslint@8.46.0)(typescript@5.1.6) + semver: + specifier: ^7.5.4 + version: 7.5.4 + ts-api-utils: + specifier: ^1.0.1 + version: 1.0.1(typescript@5.1.6) devDependencies: - '@ava/typescript': 4.1.0 - '@babel/core': 7.22.9 - '@babel/eslint-parser': 7.22.9_mxva3tvsh22zo7fr2tqrirzrru - '@commitlint/cli': 17.6.7 - '@commitlint/config-conventional': 17.6.7 - '@cspell/dict-cryptocurrencies': 3.0.1 - '@google/semantic-release-replace-plugin': 1.2.7_semantic-release@21.0.7 - '@istanbuljs/nyc-config-typescript': 1.0.2_nyc@15.1.0 - '@rebeccastevens/eslint-config': 1.6.7_yadurfq5d7qy2ppb63phpnhzpi - '@rollup/plugin-commonjs': 25.0.3_rollup@3.26.3 - '@rollup/plugin-json': 6.0.0_rollup@3.26.3 - '@rollup/plugin-node-resolve': 15.1.0_rollup@3.26.3 - '@rollup/plugin-typescript': 11.1.2_cm73bj2zrd7reol56vzmclf6b4 - '@semantic-release/changelog': 6.0.3_semantic-release@21.0.7 - '@semantic-release/commit-analyzer': 10.0.1_semantic-release@21.0.7 - '@semantic-release/git': 10.0.1_semantic-release@21.0.7 - '@semantic-release/github': 9.0.4_semantic-release@21.0.7 - '@semantic-release/npm': 10.0.4_semantic-release@21.0.7 - '@semantic-release/release-notes-generator': 11.0.4_semantic-release@21.0.7 - '@types/dedent': 0.7.0 - '@types/eslint': 8.44.0 - '@types/json-schema': 7.0.12 - '@types/node': 16.18.39 - '@types/rollup-plugin-auto-external': 2.0.2 - '@types/semver': 7.5.0 - '@typescript-eslint/eslint-plugin': 5.62.0_tbbci4he2x65aggpp4j2oxxdvm - '@typescript-eslint/parser': 5.62.0_ko3fmmbeyij36muomfgt2u76xu - ava: 5.3.1_@ava+typescript@4.1.0 - chalk: 4.1.2 - commitizen: 4.3.0 - conventional-commit-types: 3.0.0 - cspell: 6.31.2 - dedent: 1.2.0 - eslint: 8.45.0 - eslint-ava-rule-tester: 4.0.0_eslint@8.45.0 - eslint-config-prettier: 8.8.0_eslint@8.45.0 - eslint-doc-generator: 1.4.3_ko3fmmbeyij36muomfgt2u76xu - eslint-import-resolver-typescript: 3.5.5_ghbswvk3c6mlonlxyojs7rvnca - eslint-plugin-ava: 14.0.0_eslint@8.45.0 - eslint-plugin-eslint-comments: 3.2.0_eslint@8.45.0 - eslint-plugin-eslint-plugin: 5.1.1_eslint@8.45.0 - eslint-plugin-import: 2.27.5_e5imconihjuiegtkjrayaxwwxe - eslint-plugin-jsdoc: 41.1.2_eslint@8.45.0 - eslint-plugin-markdown: 3.0.0_eslint@8.45.0 - eslint-plugin-node: 11.1.0_eslint@8.45.0 - eslint-plugin-optimize-regex: 1.2.1 - eslint-plugin-prettier: 4.2.1_6nuyjbnyo6rwr4pwddenxlklsi - eslint-plugin-promise: 6.1.1_eslint@8.45.0 - eslint-plugin-sonarjs: 0.19.0_eslint@8.45.0 - eslint-plugin-unicorn: 48.0.0_eslint@8.45.0 - espree: 9.6.1 - husky: 8.0.3 - json-schema: 0.4.0 - jsonc-parser: 3.2.0 - knip: 2.16.1 - lint-staged: 13.2.3 - markdownlint-cli: 0.35.0 - nyc: 15.1.0 - prettier: 2.8.8 - prettier-plugin-packagejson: 2.4.5_prettier@2.8.8 - rimraf: 5.0.1 - rollup: 3.26.3 - rollup-plugin-auto-external: 2.0.0_rollup@3.26.3 - semantic-release: 21.0.7 - ts-node: 10.9.1_x3tncvpokjah2hm6bxjmp3ih6a - tsc-prog: 2.2.1_typescript@5.1.6 - tsconfig-paths: 4.2.0 - tslib: 2.6.0 - typescript: 5.1.6 - word-wrap: 1.2.5 + '@babel/core': + specifier: 7.22.9 + version: 7.22.9 + '@babel/eslint-parser': + specifier: 7.22.9 + version: 7.22.9(@babel/core@7.22.9)(eslint@8.46.0) + '@commitlint/cli': + specifier: 17.6.7 + version: 17.6.7 + '@commitlint/config-conventional': + specifier: 17.6.7 + version: 17.6.7 + '@cspell/dict-cryptocurrencies': + specifier: 3.0.1 + version: 3.0.1 + '@rebeccastevens/eslint-config': + specifier: 2.0.2 + version: 2.0.2(@typescript-eslint/eslint-plugin@6.2.0)(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-typescript@3.5.5)(eslint-plugin-eslint-comments@3.2.0)(eslint-plugin-functional@5.0.8)(eslint-plugin-import@2.28.0)(eslint-plugin-jsdoc@46.4.5)(eslint-plugin-markdown@3.0.1)(eslint-plugin-n@16.0.1)(eslint-plugin-optimize-regex@1.2.1)(eslint-plugin-promise@6.1.1)(eslint-plugin-sonarjs@0.19.0)(eslint-plugin-unicorn@48.0.1)(eslint@8.46.0) + '@rollup/plugin-typescript': + specifier: 11.1.2 + version: 11.1.2(rollup@3.27.0)(tslib@2.6.1)(typescript@5.1.6) + '@semantic-release/changelog': + specifier: 6.0.3 + version: 6.0.3(semantic-release@21.0.7) + '@semantic-release/commit-analyzer': + specifier: 10.0.1 + version: 10.0.1(semantic-release@21.0.7) + '@semantic-release/git': + specifier: 10.0.1 + version: 10.0.1(semantic-release@21.0.7) + '@semantic-release/github': + specifier: 9.0.4 + version: 9.0.4(semantic-release@21.0.7) + '@semantic-release/npm': + specifier: 10.0.4 + version: 10.0.4(semantic-release@21.0.7) + '@semantic-release/release-notes-generator': + specifier: 11.0.4 + version: 11.0.4(semantic-release@21.0.7) + '@types/dedent': + specifier: 0.7.0 + version: 0.7.0 + '@types/eslint': + specifier: 8.44.1 + version: 8.44.1 + '@types/node': + specifier: 16.18.39 + version: 16.18.39 + '@types/rollup-plugin-auto-external': + specifier: 2.0.2 + version: 2.0.2 + '@types/semver': + specifier: 7.5.0 + version: 7.5.0 + '@typescript-eslint/eslint-plugin': + specifier: 6.2.0 + version: 6.2.0(@typescript-eslint/parser@6.2.0)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/parser': + specifier: 6.2.0 + version: 6.2.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/rule-tester': + specifier: 6.2.0 + version: 6.2.0(@eslint/eslintrc@2.1.1)(eslint@8.46.0)(typescript@5.1.6) + '@vitest/coverage-c8': + specifier: 0.33.0 + version: 0.33.0(vitest@0.33.0) + chalk: + specifier: 4.1.2 + version: 4.1.2 + commitizen: + specifier: 4.3.0 + version: 4.3.0 + conventional-commit-types: + specifier: 3.0.0 + version: 3.0.0 + cspell: + specifier: 6.31.2 + version: 6.31.2 + dedent: + specifier: 1.3.0 + version: 1.3.0 + eslint: + specifier: 8.46.0 + version: 8.46.0 + eslint-config-prettier: + specifier: 8.9.0 + version: 8.9.0(eslint@8.46.0) + eslint-doc-generator: + specifier: 1.4.3 + version: 1.4.3(eslint@8.46.0)(typescript@5.1.6) + eslint-import-resolver-typescript: + specifier: 3.5.5 + version: 3.5.5(@typescript-eslint/parser@6.2.0)(eslint-plugin-import@2.28.0)(eslint@8.46.0) + eslint-plugin-eslint-comments: + specifier: 3.2.0 + version: 3.2.0(eslint@8.46.0) + eslint-plugin-eslint-plugin: + specifier: 5.1.1 + version: 5.1.1(eslint@8.46.0) + eslint-plugin-import: + specifier: 2.28.0 + version: 2.28.0(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) + eslint-plugin-jsdoc: + specifier: 46.4.5 + version: 46.4.5(eslint@8.46.0) + eslint-plugin-markdown: + specifier: 3.0.1 + version: 3.0.1(eslint@8.46.0) + eslint-plugin-n: + specifier: 16.0.1 + version: 16.0.1(eslint@8.46.0) + eslint-plugin-optimize-regex: + specifier: 1.2.1 + version: 1.2.1 + eslint-plugin-prettier: + specifier: 5.0.0 + version: 5.0.0(@types/eslint@8.44.1)(eslint-config-prettier@8.9.0)(eslint@8.46.0)(prettier@3.0.0) + eslint-plugin-promise: + specifier: 6.1.1 + version: 6.1.1(eslint@8.46.0) + eslint-plugin-sonarjs: + specifier: 0.19.0 + version: 0.19.0(eslint@8.46.0) + eslint-plugin-unicorn: + specifier: 48.0.1 + version: 48.0.1(eslint@8.46.0) + espree: + specifier: 9.6.1 + version: 9.6.1 + husky: + specifier: 8.0.3 + version: 8.0.3 + knip: + specifier: 2.17.1 + version: 2.17.1 + lint-staged: + specifier: 13.2.3 + version: 13.2.3 + markdownlint-cli: + specifier: 0.35.0 + version: 0.35.0 + prettier: + specifier: 3.0.0 + version: 3.0.0 + prettier-plugin-packagejson: + specifier: 2.4.5 + version: 2.4.5(prettier@3.0.0) + rimraf: + specifier: 5.0.1 + version: 5.0.1 + rollup: + specifier: 3.27.0 + version: 3.27.0 + rollup-plugin-auto-external: + specifier: 2.0.0 + version: 2.0.0(rollup@3.27.0) + semantic-release: + specifier: 21.0.7 + version: 21.0.7 + semantic-release-replace-plugin: + specifier: 1.2.7 + version: 1.2.7(semantic-release@21.0.7) + ts-node: + specifier: 10.9.1 + version: 10.9.1(@types/node@16.18.39)(typescript@5.1.6) + tsc-alias: + specifier: 1.8.7 + version: 1.8.7 + tsconfig-paths: + specifier: 4.2.0 + version: 4.2.0 + tslib: + specifier: 2.6.1 + version: 2.6.1 + typescript: + specifier: 5.1.6 + version: 5.1.6 + vite-tsconfig-paths: + specifier: 4.2.0 + version: 4.2.0(typescript@5.1.6) + vitest: + specifier: 0.33.0 + version: 0.33.0 + word-wrap: + specifier: 1.2.5 + version: 1.2.5 packages: - /@aashutoshrathi/word-wrap/1.2.6: + /@aashutoshrathi/word-wrap@1.2.6: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} - /@ampproject/remapping/2.2.0: + /@ampproject/remapping@2.2.0: resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} engines: {node: '>=6.0.0'} dependencies: @@ -172,35 +226,42 @@ packages: '@jridgewell/trace-mapping': 0.3.17 dev: true - /@ava/typescript/4.1.0: - resolution: {integrity: sha512-1iWZQ/nr9iflhLK9VN8H+1oDZqe93qxNnyYUz+jTzkYPAHc5fdZXBrqmNIgIfFhWYXK5OaQ5YtC7OmLeTNhVEg==} - engines: {node: ^14.19 || ^16.15 || ^18 || ^20} + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + engines: {node: '>=6.0.0'} dependencies: - escape-string-regexp: 5.0.0 - execa: 7.1.1 + '@jridgewell/gen-mapping': 0.3.2 + '@jridgewell/trace-mapping': 0.3.17 + dev: true + + /@babel/code-frame@7.21.4: + resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.18.6 dev: true - /@babel/code-frame/7.22.5: + /@babel/code-frame@7.22.5: resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.22.5 dev: true - /@babel/compat-data/7.22.9: + /@babel/compat-data@7.22.9: resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} engines: {node: '>=6.9.0'} dev: true - /@babel/core/7.22.9: + /@babel/core@7.22.9: resolution: {integrity: sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.0 '@babel/code-frame': 7.22.5 '@babel/generator': 7.22.9 - '@babel/helper-compilation-targets': 7.22.9_@babel+core@7.22.9 - '@babel/helper-module-transforms': 7.22.9_@babel+core@7.22.9 + '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) '@babel/helpers': 7.22.6 '@babel/parser': 7.22.7 '@babel/template': 7.22.5 @@ -215,7 +276,7 @@ packages: - supports-color dev: true - /@babel/eslint-parser/7.22.9_mxva3tvsh22zo7fr2tqrirzrru: + /@babel/eslint-parser@7.22.9(@babel/core@7.22.9)(eslint@8.46.0): resolution: {integrity: sha512-xdMkt39/nviO/4vpVdrEYPwXCsYIXSSAr6mC7WQsNIlGnuxKyKE7GZjalcnbSWiC4OXGNNN3UQPeHfjSC6sTDA==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} peerDependencies: @@ -224,12 +285,12 @@ packages: dependencies: '@babel/core': 7.22.9 '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 - eslint: 8.45.0 + eslint: 8.46.0 eslint-visitor-keys: 2.1.0 semver: 6.3.1 dev: true - /@babel/generator/7.22.9: + /@babel/generator@7.22.9: resolution: {integrity: sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==} engines: {node: '>=6.9.0'} dependencies: @@ -239,7 +300,7 @@ packages: jsesc: 2.5.2 dev: true - /@babel/helper-compilation-targets/7.22.9_@babel+core@7.22.9: + /@babel/helper-compilation-targets@7.22.9(@babel/core@7.22.9): resolution: {integrity: sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==} engines: {node: '>=6.9.0'} peerDependencies: @@ -253,12 +314,12 @@ packages: semver: 6.3.1 dev: true - /@babel/helper-environment-visitor/7.22.5: + /@babel/helper-environment-visitor@7.22.5: resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} engines: {node: '>=6.9.0'} dev: true - /@babel/helper-function-name/7.22.5: + /@babel/helper-function-name@7.22.5: resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} engines: {node: '>=6.9.0'} dependencies: @@ -266,21 +327,21 @@ packages: '@babel/types': 7.22.5 dev: true - /@babel/helper-hoist-variables/7.22.5: + /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 dev: true - /@babel/helper-module-imports/7.22.5: + /@babel/helper-module-imports@7.22.5: resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 dev: true - /@babel/helper-module-transforms/7.22.9_@babel+core@7.22.9: + /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.9): resolution: {integrity: sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==} engines: {node: '>=6.9.0'} peerDependencies: @@ -294,36 +355,36 @@ packages: '@babel/helper-validator-identifier': 7.22.5 dev: true - /@babel/helper-simple-access/7.22.5: + /@babel/helper-simple-access@7.22.5: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 dev: true - /@babel/helper-split-export-declaration/7.22.6: + /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 dev: true - /@babel/helper-string-parser/7.22.5: + /@babel/helper-string-parser@7.22.5: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-identifier/7.22.5: + /@babel/helper-validator-identifier@7.22.5: resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-option/7.22.5: + /@babel/helper-validator-option@7.22.5: resolution: {integrity: sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==} engines: {node: '>=6.9.0'} dev: true - /@babel/helpers/7.22.6: + /@babel/helpers@7.22.6: resolution: {integrity: sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==} engines: {node: '>=6.9.0'} dependencies: @@ -334,7 +395,16 @@ packages: - supports-color dev: true - /@babel/highlight/7.22.5: + /@babel/highlight@7.18.6: + resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.5 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + + /@babel/highlight@7.22.5: resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} engines: {node: '>=6.9.0'} dependencies: @@ -343,7 +413,7 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser/7.22.7: + /@babel/parser@7.22.7: resolution: {integrity: sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==} engines: {node: '>=6.0.0'} hasBin: true @@ -351,7 +421,7 @@ packages: '@babel/types': 7.22.5 dev: true - /@babel/template/7.22.5: + /@babel/template@7.22.5: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} dependencies: @@ -360,7 +430,7 @@ packages: '@babel/types': 7.22.5 dev: true - /@babel/traverse/7.22.8: + /@babel/traverse@7.22.8: resolution: {integrity: sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==} engines: {node: '>=6.9.0'} dependencies: @@ -378,7 +448,7 @@ packages: - supports-color dev: true - /@babel/types/7.22.5: + /@babel/types@7.22.5: resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} engines: {node: '>=6.9.0'} dependencies: @@ -387,14 +457,18 @@ packages: to-fast-properties: 2.0.0 dev: true - /@colors/colors/1.5.0: + /@bcoe/v8-coverage@0.2.3: + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + dev: true + + /@colors/colors@1.5.0: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} requiresBuild: true dev: true optional: true - /@commitlint/cli/17.6.7: + /@commitlint/cli@17.6.7: resolution: {integrity: sha512-nzZmfO5KIOupYppn1MsnYX/80I+KDlxiwkks3CJT0XT+t34UgqGi3eSyEuzgcIjPlORk5/GMaAEiys78iLfGMg==} engines: {node: '>=v14'} hasBin: true @@ -414,14 +488,14 @@ packages: - '@swc/wasm' dev: true - /@commitlint/config-conventional/17.6.7: + /@commitlint/config-conventional@17.6.7: resolution: {integrity: sha512-4oTpEUC0HRM54QRHBPMOJW1pETp7usxXn9RuNYNWHcmu8wi1mpws95hvS20u2n6HtIkTn0jfn7vHioCm4AGUTw==} engines: {node: '>=v14'} dependencies: conventional-changelog-conventionalcommits: 5.0.0 dev: true - /@commitlint/config-validator/17.6.7: + /@commitlint/config-validator@17.6.7: resolution: {integrity: sha512-vJSncmnzwMvpr3lIcm0I8YVVDJTzyjy7NZAeXbTXy+MPUdAr9pKyyg7Tx/ebOQ9kqzE6O9WT6jg2164br5UdsQ==} engines: {node: '>=v14'} dependencies: @@ -429,7 +503,7 @@ packages: ajv: 8.12.0 dev: true - /@commitlint/ensure/17.6.7: + /@commitlint/ensure@17.6.7: resolution: {integrity: sha512-mfDJOd1/O/eIb/h4qwXzUxkmskXDL9vNPnZ4AKYKiZALz4vHzwMxBSYtyL2mUIDeU9DRSpEUins8SeKtFkYHSw==} engines: {node: '>=v14'} dependencies: @@ -441,12 +515,12 @@ packages: lodash.upperfirst: 4.3.1 dev: true - /@commitlint/execute-rule/17.4.0: + /@commitlint/execute-rule@17.4.0: resolution: {integrity: sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA==} engines: {node: '>=v14'} dev: true - /@commitlint/format/17.4.4: + /@commitlint/format@17.4.4: resolution: {integrity: sha512-+IS7vpC4Gd/x+uyQPTAt3hXs5NxnkqAZ3aqrHd5Bx/R9skyCAWusNlNbw3InDbAK6j166D9asQM8fnmYIa+CXQ==} engines: {node: '>=v14'} dependencies: @@ -454,7 +528,7 @@ packages: chalk: 4.1.2 dev: true - /@commitlint/is-ignored/17.6.7: + /@commitlint/is-ignored@17.6.7: resolution: {integrity: sha512-vqyNRqtbq72P2JadaoWiuoLtXIs9SaAWDqdtef6G2zsoXqKFc7vqj1f+thzVgosXG3X/5K9jNp+iYijmvOfc/g==} engines: {node: '>=v14'} dependencies: @@ -462,7 +536,7 @@ packages: semver: 7.5.2 dev: true - /@commitlint/lint/17.6.7: + /@commitlint/lint@17.6.7: resolution: {integrity: sha512-TW+AozfuOFMrHn+jdwtz0IWu8REKFp0eryOvoBp2r8IXNc4KihKB1spAiUB6SFyHD6hVVeolz12aHnJ3Mb+xVQ==} engines: {node: '>=v14'} dependencies: @@ -472,7 +546,7 @@ packages: '@commitlint/types': 17.4.4 dev: true - /@commitlint/load/17.6.7: + /@commitlint/load@17.6.7: resolution: {integrity: sha512-QZ2rJTbX55BQdYrCm/p6+hh/pFBgC9nTJxfsrK6xRPe2thiQzHN0AQDBqBwAirn6gIkHrjIbCbtAE6kiDYLjrw==} engines: {node: '>=v14'} dependencies: @@ -483,24 +557,24 @@ packages: '@types/node': 16.18.39 chalk: 4.1.2 cosmiconfig: 8.1.0 - cosmiconfig-typescript-loader: 4.3.0_jxrmwnl3fior5yfgqczttwkywq + cosmiconfig-typescript-loader: 4.3.0(@types/node@16.18.39)(cosmiconfig@8.1.0)(ts-node@10.9.1)(typescript@5.1.6) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 resolve-from: 5.0.0 - ts-node: 10.9.1_x3tncvpokjah2hm6bxjmp3ih6a + ts-node: 10.9.1(@types/node@16.18.39)(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' dev: true - /@commitlint/message/17.4.2: + /@commitlint/message@17.4.2: resolution: {integrity: sha512-3XMNbzB+3bhKA1hSAWPCQA3lNxR4zaeQAQcHj0Hx5sVdO6ryXtgUBGGv+1ZCLMgAPRixuc6en+iNAzZ4NzAa8Q==} engines: {node: '>=v14'} dev: true - /@commitlint/parse/17.6.7: + /@commitlint/parse@17.6.7: resolution: {integrity: sha512-ibO03BgEns+JJpohpBZYD49mCdSNMg6fTv7vA5yqzEFWkBQk5NWhEBw2yG+Z1UClStIRkMkAYyI2HzoQG9tCQQ==} engines: {node: '>=v14'} dependencies: @@ -509,7 +583,7 @@ packages: conventional-commits-parser: 3.2.4 dev: true - /@commitlint/read/17.5.1: + /@commitlint/read@17.5.1: resolution: {integrity: sha512-7IhfvEvB//p9aYW09YVclHbdf1u7g7QhxeYW9ZHSO8Huzp8Rz7m05aCO1mFG7G8M+7yfFnXB5xOmG18brqQIBg==} engines: {node: '>=v14'} dependencies: @@ -520,7 +594,7 @@ packages: minimist: 1.2.8 dev: true - /@commitlint/resolve-extends/17.6.7: + /@commitlint/resolve-extends@17.6.7: resolution: {integrity: sha512-PfeoAwLHtbOaC9bGn/FADN156CqkFz6ZKiVDMjuC2N5N0740Ke56rKU7Wxdwya8R8xzLK9vZzHgNbuGhaOVKIg==} engines: {node: '>=v14'} dependencies: @@ -532,7 +606,7 @@ packages: resolve-global: 1.0.0 dev: true - /@commitlint/rules/17.6.7: + /@commitlint/rules@17.6.7: resolution: {integrity: sha512-x/SDwDTN3w3Gr5xkhrIORu96rlKCc8ZLYEMXRqi9+MB33st2mKcGvKa5uJuigHlbl3xm75bAAubATrodVrjguQ==} engines: {node: '>=v14'} dependencies: @@ -543,26 +617,26 @@ packages: execa: 5.1.1 dev: true - /@commitlint/to-lines/17.4.0: + /@commitlint/to-lines@17.4.0: resolution: {integrity: sha512-LcIy/6ZZolsfwDUWfN1mJ+co09soSuNASfKEU5sCmgFCvX5iHwRYLiIuoqXzOVDYOy7E7IcHilr/KS0e5T+0Hg==} engines: {node: '>=v14'} dev: true - /@commitlint/top-level/17.4.0: + /@commitlint/top-level@17.4.0: resolution: {integrity: sha512-/1loE/g+dTTQgHnjoCy0AexKAEFyHsR2zRB4NWrZ6lZSMIxAhBJnmCqwao7b4H8888PsfoTBCLBYIw8vGnej8g==} engines: {node: '>=v14'} dependencies: find-up: 5.0.0 dev: true - /@commitlint/types/17.4.4: + /@commitlint/types@17.4.4: resolution: {integrity: sha512-amRN8tRLYOsxRr6mTnGGGvB5EmW/4DDjLMgiwK3CCVEmN6Sr/6xePGEpWaspKkckILuUORCwe6VfDBw6uj4axQ==} engines: {node: '>=v14'} dependencies: chalk: 4.1.2 dev: true - /@cspell/cspell-bundled-dicts/6.31.2: + /@cspell/cspell-bundled-dicts@6.31.2: resolution: {integrity: sha512-rQ5y/U1Ah5AaduIh3NU2z371hRrOr1cmNdhhP8oiuz2E4VqmcoVHflXIct9DgY8uIJpwsSCdR6ypOQWZYXYnwA==} engines: {node: '>=14'} dependencies: @@ -614,225 +688,225 @@ packages: '@cspell/dict-vue': 3.0.0 dev: true - /@cspell/cspell-pipe/6.31.1: + /@cspell/cspell-pipe@6.31.1: resolution: {integrity: sha512-zk1olZi4dr6GLm5PAjvsiZ01HURNSruUYFl1qSicGnTwYN8GaN4RhAwannAytcJ7zJPIcyXlid0YsB58nJf3wQ==} engines: {node: '>=14'} dev: true - /@cspell/cspell-service-bus/6.31.1: + /@cspell/cspell-service-bus@6.31.1: resolution: {integrity: sha512-YyBicmJyZ1uwKVxujXw7sgs9x+Eps43OkWmCtDZmZlnq489HdTSuhF1kTbVi2yeFSeaXIS87+uHo12z97KkQpg==} engines: {node: '>=14'} dev: true - /@cspell/cspell-types/6.31.1: + /@cspell/cspell-types@6.31.1: resolution: {integrity: sha512-1KeTQFiHMssW1eRoF2NZIEg4gPVIfXLsL2+VSD/AV6YN7lBcuf6gRRgV5KWYarhxtEfjxhDdDTmu26l/iJEUtw==} engines: {node: '>=14'} dev: true - /@cspell/dict-ada/4.0.1: + /@cspell/dict-ada@4.0.1: resolution: {integrity: sha512-/E9o3nHrXOhYmQE43deKbxZcR3MIJAsa+66IzP9TXGHheKEx8b9dVMVVqydDDH8oom1H0U20NRPtu6KRVbT9xw==} dev: true - /@cspell/dict-aws/3.0.0: + /@cspell/dict-aws@3.0.0: resolution: {integrity: sha512-O1W6nd5y3Z00AMXQMzfiYrIJ1sTd9fB1oLr+xf/UD7b3xeHeMeYE2OtcWbt9uyeHim4tk+vkSTcmYEBKJgS5bQ==} dev: true - /@cspell/dict-bash/4.1.1: + /@cspell/dict-bash@4.1.1: resolution: {integrity: sha512-8czAa/Mh96wu2xr0RXQEGMTBUGkTvYn/Pb0o+gqOO1YW+poXGQc3gx0YPqILDryP/KCERrNvkWUJz3iGbvwC2A==} dev: true - /@cspell/dict-companies/3.0.9: + /@cspell/dict-companies@3.0.9: resolution: {integrity: sha512-wSkVIJjk33Sm3LhieNv9TsSvUSeP0R/h8xx06NqbMYF43w9J8hZiMHlbB3FzaSOHRpXT5eBIJBVTeFbceZdiqg==} dev: true - /@cspell/dict-cpp/5.0.2: + /@cspell/dict-cpp@5.0.2: resolution: {integrity: sha512-Q0ZjfhrHHfm0Y1/7LMCq3Fne/bhiBeBogUw4TV1wX/1tg3m+5BtaW/7GiOzRk+rFsblVj3RFam59VJKMT3vSoQ==} dev: true - /@cspell/dict-cryptocurrencies/3.0.1: + /@cspell/dict-cryptocurrencies@3.0.1: resolution: {integrity: sha512-Tdlr0Ahpp5yxtwM0ukC13V6+uYCI0p9fCRGMGZt36rWv8JQZHIuHfehNl7FB/Qc09NCF7p5ep0GXbL+sVTd/+w==} dev: true - /@cspell/dict-csharp/4.0.2: + /@cspell/dict-csharp@4.0.2: resolution: {integrity: sha512-1JMofhLK+4p4KairF75D3A924m5ERMgd1GvzhwK2geuYgd2ZKuGW72gvXpIV7aGf52E3Uu1kDXxxGAiZ5uVG7g==} dev: true - /@cspell/dict-css/4.0.5: + /@cspell/dict-css@4.0.5: resolution: {integrity: sha512-z5vw8nJSyKd6d3i5UmMNoVcAp0wxvs9OHWOmAeJKT9fO3tok02gK24VZhcJ0NJtiKdHQ2zRuzdfWl51wdAiY6A==} dev: true - /@cspell/dict-dart/2.0.2: + /@cspell/dict-dart@2.0.2: resolution: {integrity: sha512-jigcODm7Z4IFZ4vParwwP3IT0fIgRq/9VoxkXfrxBMsLBGGM2QltHBj7pl+joX+c4cOHxfyZktGJK1B1wFtR4Q==} dev: true - /@cspell/dict-django/4.0.2: + /@cspell/dict-django@4.0.2: resolution: {integrity: sha512-L0Yw6+Yh2bE9/FAMG4gy9m752G4V8HEBjEAGeRIQ9qvxDLR9yD6dPOtgEFTjv7SWlKSrLb9wA/W3Q2GKCOusSg==} dev: true - /@cspell/dict-docker/1.1.6: + /@cspell/dict-docker@1.1.6: resolution: {integrity: sha512-zCCiRTZ6EOQpBnSOm0/3rnKW1kCcAUDUA7SxJG3SuH6iZvKi3I8FEg8+O83WQUeXg0SyPNerD9F40JLnnJjJig==} dev: true - /@cspell/dict-dotnet/5.0.0: + /@cspell/dict-dotnet@5.0.0: resolution: {integrity: sha512-EOwGd533v47aP5QYV8GlSSKkmM9Eq8P3G/eBzSpH3Nl2+IneDOYOBLEUraHuiCtnOkNsz0xtZHArYhAB2bHWAw==} dev: true - /@cspell/dict-elixir/4.0.2: + /@cspell/dict-elixir@4.0.2: resolution: {integrity: sha512-/YeHlpZ1pE9VAyxp3V0xyUPapNyC61WwFuw2RByeoMqqYaIfS3Hw+JxtimOsAKVhUvgUH58zyKl5K5Q6FqgCpw==} dev: true - /@cspell/dict-en-common-misspellings/1.0.2: + /@cspell/dict-en-common-misspellings@1.0.2: resolution: {integrity: sha512-jg7ZQZpZH7+aAxNBlcAG4tGhYF6Ksy+QS5Df73Oo+XyckBjC9QS+PrRwLTeYoFIgXy5j3ICParK5r3MSSoL4gw==} dev: true - /@cspell/dict-en-gb/1.1.33: + /@cspell/dict-en-gb@1.1.33: resolution: {integrity: sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==} dev: true - /@cspell/dict-en_us/4.3.2: + /@cspell/dict-en_us@4.3.2: resolution: {integrity: sha512-o8xtHDLPNzW6hK5b1TaDTWt25vVi9lWlL6/dZ9YoS+ZMj+Dy/yuXatqfOgeGyU3a9+2gxC0kbr4oufMUQXI2mQ==} dev: true - /@cspell/dict-filetypes/3.0.0: + /@cspell/dict-filetypes@3.0.0: resolution: {integrity: sha512-Fiyp0z5uWaK0d2TfR9GMUGDKmUMAsOhGD5A0kHoqnNGswL2iw0KB0mFBONEquxU65fEnQv4R+jdM2d9oucujuA==} dev: true - /@cspell/dict-fonts/3.0.2: + /@cspell/dict-fonts@3.0.2: resolution: {integrity: sha512-Z5QdbgEI7DV+KPXrAeDA6dDm/vTzyaW53SGlKqz6PI5VhkOjgkBXv3YtZjnxMZ4dY2ZIqq+RUK6qa9Pi8rQdGQ==} dev: true - /@cspell/dict-fullstack/3.1.5: + /@cspell/dict-fullstack@3.1.5: resolution: {integrity: sha512-6ppvo1dkXUZ3fbYn/wwzERxCa76RtDDl5Afzv2lijLoijGGUw5yYdLBKJnx8PJBGNLh829X352ftE7BElG4leA==} dev: true - /@cspell/dict-gaming-terms/1.0.4: + /@cspell/dict-gaming-terms@1.0.4: resolution: {integrity: sha512-hbDduNXlk4AOY0wFxcDMWBPpm34rpqJBeqaySeoUH70eKxpxm+dvjpoRLJgyu0TmymEICCQSl6lAHTHSDiWKZg==} dev: true - /@cspell/dict-git/2.0.0: + /@cspell/dict-git@2.0.0: resolution: {integrity: sha512-n1AxyX5Kgxij/sZFkxFJlzn3K9y/sCcgVPg/vz4WNJ4K9YeTsUmyGLA2OQI7d10GJeiuAo2AP1iZf2A8j9aj2w==} dev: true - /@cspell/dict-golang/6.0.1: + /@cspell/dict-golang@6.0.1: resolution: {integrity: sha512-Z19FN6wgg2M/A+3i1O8qhrGaxUUGOW8S2ySN0g7vp4HTHeFmockEPwYx7gArfssNIruw60JorZv+iLJ6ilTeow==} dev: true - /@cspell/dict-haskell/4.0.1: + /@cspell/dict-haskell@4.0.1: resolution: {integrity: sha512-uRrl65mGrOmwT7NxspB4xKXFUenNC7IikmpRZW8Uzqbqcu7ZRCUfstuVH7T1rmjRgRkjcIjE4PC11luDou4wEQ==} dev: true - /@cspell/dict-html-symbol-entities/4.0.0: + /@cspell/dict-html-symbol-entities@4.0.0: resolution: {integrity: sha512-HGRu+48ErJjoweR5IbcixxETRewrBb0uxQBd6xFGcxbEYCX8CnQFTAmKI5xNaIt2PKaZiJH3ijodGSqbKdsxhw==} dev: true - /@cspell/dict-html/4.0.3: + /@cspell/dict-html@4.0.3: resolution: {integrity: sha512-Gae8i8rrArT0UyG1I6DHDK62b7Be6QEcBSIeWOm4VIIW1CASkN9B0qFgSVnkmfvnu1Y3H7SSaaEynKjdj3cs8w==} dev: true - /@cspell/dict-java/5.0.5: + /@cspell/dict-java@5.0.5: resolution: {integrity: sha512-X19AoJgWIBwJBSWGFqSgHaBR/FEykBHTMjL6EqOnhIGEyE9nvuo32tsSHjXNJ230fQxQptEvRZoaldNLtKxsRg==} dev: true - /@cspell/dict-k8s/1.0.1: + /@cspell/dict-k8s@1.0.1: resolution: {integrity: sha512-gc5y4Nm3hVdMZNBZfU2M1AsAmObZsRWjCUk01NFPfGhFBXyVne41T7E62rpnzu5330FV/6b/TnFcPgRmak9lLw==} dev: true - /@cspell/dict-latex/4.0.0: + /@cspell/dict-latex@4.0.0: resolution: {integrity: sha512-LPY4y6D5oI7D3d+5JMJHK/wxYTQa2lJMSNxps2JtuF8hbAnBQb3igoWEjEbIbRRH1XBM0X8dQqemnjQNCiAtxQ==} dev: true - /@cspell/dict-lorem-ipsum/3.0.0: + /@cspell/dict-lorem-ipsum@3.0.0: resolution: {integrity: sha512-msEV24qEpzWZs2kcEicqYlhyBpR0amfDkJOs+iffC07si9ftqtQ+yP3lf1VFLpgqw3SQh1M1vtU7RD4sPrNlcQ==} dev: true - /@cspell/dict-lua/4.0.1: + /@cspell/dict-lua@4.0.1: resolution: {integrity: sha512-j0MFmeCouSoC6EdZTbvGe1sJ9V+ruwKSeF+zRkNNNload7R72Co5kX1haW2xLHGdlq0kqSy1ODRZKdVl0e+7hg==} dev: true - /@cspell/dict-node/4.0.2: + /@cspell/dict-node@4.0.2: resolution: {integrity: sha512-FEQJ4TnMcXEFslqBQkXa5HposMoCGsiBv2ux4IZuIXgadXeHKHUHk60iarWpjhzNzQLyN2GD7NoRMd12bK3Llw==} dev: true - /@cspell/dict-npm/5.0.5: + /@cspell/dict-npm@5.0.5: resolution: {integrity: sha512-eirZm4XpJNEcbmLGIwI2qXdRRlCKwEsH9mT3qCUytmbj6S6yn63F+8bShMW/yQBedV7+GXq9Td+cJdqiVutOiA==} dev: true - /@cspell/dict-php/4.0.1: + /@cspell/dict-php@4.0.1: resolution: {integrity: sha512-XaQ/JkSyq2c07MfRG54DjLi2CV+HHwS99DDCAao9Fq2JfkWroTQsUeek7wYZXJATrJVOULoV3HKih12x905AtQ==} dev: true - /@cspell/dict-powershell/5.0.1: + /@cspell/dict-powershell@5.0.1: resolution: {integrity: sha512-lLl+syWFgfv2xdsoxHfPIB2FGkn//XahCIKcRaf52AOlm1/aXeaJN579B9HCpvM7wawHzMqJ33VJuL/vb6Lc4g==} dev: true - /@cspell/dict-public-licenses/2.0.2: + /@cspell/dict-public-licenses@2.0.2: resolution: {integrity: sha512-baKkbs/WGEV2lCWZoL0KBPh3uiPcul5GSDwmXEBAsR5McEW52LF94/b7xWM0EmSAc/y8ODc5LnPYC7RDRLi6LQ==} dev: true - /@cspell/dict-python/4.0.2: + /@cspell/dict-python@4.0.2: resolution: {integrity: sha512-w1jSWDR1CkO23cZFbSYgnD/ZqknDZSVCI1AOE6sSszOJR8shmBkV3lMBYd+vpLsWhmkLLBcZTXDkiqFLXDGowQ==} dev: true - /@cspell/dict-r/2.0.1: + /@cspell/dict-r@2.0.1: resolution: {integrity: sha512-KCmKaeYMLm2Ip79mlYPc8p+B2uzwBp4KMkzeLd5E6jUlCL93Y5Nvq68wV5fRLDRTf7N1LvofkVFWfDcednFOgA==} dev: true - /@cspell/dict-ruby/5.0.0: + /@cspell/dict-ruby@5.0.0: resolution: {integrity: sha512-ssb96QxLZ76yPqFrikWxItnCbUKhYXJ2owkoIYzUGNFl2CHSoHCb5a6Zetum9mQ/oUA3gNeUhd28ZUlXs0la2A==} dev: true - /@cspell/dict-rust/4.0.1: + /@cspell/dict-rust@4.0.1: resolution: {integrity: sha512-xJSSzHDK2z6lSVaOmMxl3PTOtfoffaxMo7fTcbZUF+SCJzfKbO6vnN9TCGX2sx1RHFDz66Js6goz6SAZQdOwaw==} dev: true - /@cspell/dict-scala/5.0.0: + /@cspell/dict-scala@5.0.0: resolution: {integrity: sha512-ph0twaRoV+ylui022clEO1dZ35QbeEQaKTaV2sPOsdwIokABPIiK09oWwGK9qg7jRGQwVaRPEq0Vp+IG1GpqSQ==} dev: true - /@cspell/dict-software-terms/3.1.6: + /@cspell/dict-software-terms@3.1.6: resolution: {integrity: sha512-w46+pIMRVtrDuTZXK/YxDP5NL5yVoX0ImEPO0s9WbxdyyfhzAF3sGYHBGN/50OGLHExcqe6Idb9feoRC9mCLxw==} dev: true - /@cspell/dict-sql/2.1.0: + /@cspell/dict-sql@2.1.0: resolution: {integrity: sha512-Bb+TNWUrTNNABO0bmfcYXiTlSt0RD6sB2MIY+rNlaMyIwug43jUjeYmkLz2tPkn3+2uvySeFEOMVYhMVfcuDKg==} dev: true - /@cspell/dict-svelte/1.0.2: + /@cspell/dict-svelte@1.0.2: resolution: {integrity: sha512-rPJmnn/GsDs0btNvrRBciOhngKV98yZ9SHmg8qI6HLS8hZKvcXc0LMsf9LLuMK1TmS2+WQFAan6qeqg6bBxL2Q==} dev: true - /@cspell/dict-swift/2.0.1: + /@cspell/dict-swift@2.0.1: resolution: {integrity: sha512-gxrCMUOndOk7xZFmXNtkCEeroZRnS2VbeaIPiymGRHj5H+qfTAzAKxtv7jJbVA3YYvEzWcVE2oKDP4wcbhIERw==} dev: true - /@cspell/dict-typescript/3.1.1: + /@cspell/dict-typescript@3.1.1: resolution: {integrity: sha512-N9vNJZoOXmmrFPR4ir3rGvnqqwmQGgOYoL1+y6D4oIhyr7FhaYiyF/d7QT61RmjZQcATMa6PSL+ZisCeRLx9+A==} dev: true - /@cspell/dict-vue/3.0.0: + /@cspell/dict-vue@3.0.0: resolution: {integrity: sha512-niiEMPWPV9IeRBRzZ0TBZmNnkK3olkOPYxC1Ny2AX4TGlYRajcW0WUtoSHmvvjZNfWLSg2L6ruiBeuPSbjnG6A==} dev: true - /@cspell/dynamic-import/6.31.1: + /@cspell/dynamic-import@6.31.1: resolution: {integrity: sha512-uliIUv9uZlnyYmjUlcw/Dm3p0xJOEnWJNczHAfqAl4Ytg6QZktw0GtUA9b1umbRXLv0KRTPtSC6nMq3cR7rRmQ==} engines: {node: '>=14'} dependencies: import-meta-resolve: 2.2.2 dev: true - /@cspell/strong-weak-map/6.31.1: + /@cspell/strong-weak-map@6.31.1: resolution: {integrity: sha512-z8AuWvUuSnugFKJOA9Ke0aiFuehcqLFqia9bk8XaQNEWr44ahPVn3sEWnAncTxPbpWuUw5UajoJa0egRAE1CCg==} engines: {node: '>=14.6'} dev: true - /@cspotcode/source-map-support/0.8.1: + /@cspotcode/source-map-support@0.8.1: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} dependencies: '@jridgewell/trace-mapping': 0.3.9 dev: true - /@ericcornelissen/bash-parser/0.5.2: + /@ericcornelissen/bash-parser@0.5.2: resolution: {integrity: sha512-4pIMTa1nEFfMXitv7oaNEWOdM+zpOZavesa5GaiWTgda6Zk32CFGxjUp/iIaN0PwgUW1yTq/fztSjbpE8SLGZQ==} engines: {node: '>=4'} dependencies: @@ -857,30 +931,233 @@ packages: unescape-js: 1.1.4 dev: true - /@es-joy/jsdoccomment/0.37.0: - resolution: {integrity: sha512-hjK0wnsPCYLlF+HHB4R/RbUjOWeLW2SlarB67+Do5WsKILOkmIZvvPJFbtWSmbypxcjpoECLAMzoao0D4Bg5ZQ==} - engines: {node: ^14 || ^16 || ^17 || ^18 || ^19} + /@es-joy/jsdoccomment@0.39.4: + resolution: {integrity: sha512-Jvw915fjqQct445+yron7Dufix9A+m9j1fCJYlCo1FWlRvTxa3pjJelxdSTdaLWcTwRU6vbL+NYjO4YuNIS5Qg==} + engines: {node: '>=16'} dependencies: comment-parser: 1.3.1 esquery: 1.5.0 jsdoc-type-pratt-parser: 4.0.0 dev: true - /@eslint-community/eslint-utils/4.4.0_eslint@8.45.0: + /@esbuild/android-arm64@0.18.16: + resolution: {integrity: sha512-wsCqSPqLz+6Ov+OM4EthU43DyYVVyfn15S4j1bJzylDpc1r1jZFFfJQNfDuT8SlgwuqpmpJXK4uPlHGw6ve7eA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.18.16: + resolution: {integrity: sha512-gCHjjQmA8L0soklKbLKA6pgsLk1byULuHe94lkZDzcO3/Ta+bbeewJioEn1Fr7kgy9NWNFy/C+MrBwC6I/WCug==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.18.16: + resolution: {integrity: sha512-ldsTXolyA3eTQ1//4DS+E15xl0H/3DTRJaRL0/0PgkqDsI0fV/FlOtD+h0u/AUJr+eOTlZv4aC9gvfppo3C4sw==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.18.16: + resolution: {integrity: sha512-aBxruWCII+OtluORR/KvisEw0ALuw/qDQWvkoosA+c/ngC/Kwk0lLaZ+B++LLS481/VdydB2u6tYpWxUfnLAIw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.18.16: + resolution: {integrity: sha512-6w4Dbue280+rp3LnkgmriS1icOUZDyPuZo/9VsuMUTns7SYEiOaJ7Ca1cbhu9KVObAWfmdjUl4gwy9TIgiO5eA==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.18.16: + resolution: {integrity: sha512-x35fCebhe9s979DGKbVAwXUOcTmCIE32AIqB9CB1GralMIvxdnMLAw5CnID17ipEw9/3MvDsusj/cspYt2ZLNQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.18.16: + resolution: {integrity: sha512-YM98f+PeNXF3GbxIJlUsj+McUWG1irguBHkszCIwfr3BXtXZsXo0vqybjUDFfu9a8Wr7uUD/YSmHib+EeGAFlg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.18.16: + resolution: {integrity: sha512-XIqhNUxJiuy+zsR77+H5Z2f7s4YRlriSJKtvx99nJuG5ATuJPjmZ9n0ANgnGlPCpXGSReFpgcJ7O3SMtzIFeiQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.18.16: + resolution: {integrity: sha512-b5ABb+5Ha2C9JkeZXV+b+OruR1tJ33ePmv9ZwMeETSEKlmu/WJ45XTTG+l6a2KDsQtJJ66qo/hbSGBtk0XVLHw==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.18.16: + resolution: {integrity: sha512-no+pfEpwnRvIyH+txbBAWtjxPU9grslmTBfsmDndj7bnBmr55rOo/PfQmRfz7Qg9isswt1FP5hBbWb23fRWnow==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.18.16: + resolution: {integrity: sha512-Zbnczs9ZXjmo0oZSS0zbNlJbcwKXa/fcNhYQjahDs4Xg18UumpXG/lwM2lcSvHS3mTrRyCYZvJbmzYc4laRI1g==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.18.16: + resolution: {integrity: sha512-YMF7hih1HVR/hQVa/ot4UVffc5ZlrzEb3k2ip0nZr1w6fnYypll9td2qcoMLvd3o8j3y6EbJM3MyIcXIVzXvQQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.18.16: + resolution: {integrity: sha512-Wkz++LZ29lDwUyTSEnzDaaP5OveOgTU69q9IyIw9WqLRxM4BjTBjz9un4G6TOvehWpf/J3gYVFN96TjGHrbcNQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.18.16: + resolution: {integrity: sha512-LFMKZ30tk78/mUv1ygvIP+568bwf4oN6reG/uczXnz6SvFn4e2QUFpUpZY9iSJT6Qpgstrhef/nMykIXZtZWGQ==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.18.16: + resolution: {integrity: sha512-3ZC0BgyYHYKfZo3AV2/66TD/I9tlSBaW7eWTEIkrQQKfJIifKMMttXl9FrAg+UT0SGYsCRLI35Gwdmm96vlOjg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.18.16: + resolution: {integrity: sha512-xu86B3647DihHJHv/wx3NCz2Dg1gjQ8bbf9cVYZzWKY+gsvxYmn/lnVlqDRazObc3UMwoHpUhNYaZset4X8IPA==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.18.16: + resolution: {integrity: sha512-uVAgpimx9Ffw3xowtg/7qQPwHFx94yCje+DoBx+LNm2ePDpQXHrzE+Sb0Si2VBObYz+LcRps15cq+95YM7gkUw==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.18.16: + resolution: {integrity: sha512-6OjCQM9wf7z8/MBi6BOWaTL2AS/SZudsZtBziXMtNI8r/U41AxS9x7jn0ATOwVy08OotwkPqGRMkpPR2wcTJXA==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.18.16: + resolution: {integrity: sha512-ZoNkruFYJp9d1LbUYCh8awgQDvB9uOMZqlQ+gGEZR7v6C+N6u7vPr86c+Chih8niBR81Q/bHOSKGBK3brJyvkQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.18.16: + resolution: {integrity: sha512-+j4anzQ9hrs+iqO+/wa8UE6TVkKua1pXUb0XWFOx0FiAj6R9INJ+WE//1/Xo6FG1vB5EpH3ko+XcgwiDXTxcdw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.18.16: + resolution: {integrity: sha512-5PFPmq3sSKTp9cT9dzvI67WNfRZGvEVctcZa1KGjDDu4n3H8k59Inbk0du1fz0KrAbKKNpJbdFXQMDUz7BG4rQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.18.16: + resolution: {integrity: sha512-sCIVrrtcWN5Ua7jYXNG1xD199IalrbfV2+0k/2Zf2OyV2FtnQnMgdzgpRAbi4AWlKJj1jkX+M+fEGPQj6BQB4w==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@eslint-community/eslint-utils@4.4.0(eslint@8.46.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.45.0 + eslint: 8.46.0 eslint-visitor-keys: 3.4.1 - /@eslint-community/regexpp/4.4.0: - resolution: {integrity: sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==} + /@eslint-community/regexpp@4.5.1: + resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + + /@eslint-community/regexpp@4.6.2: + resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - /@eslint/eslintrc/2.1.0: - resolution: {integrity: sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==} + /@eslint/eslintrc@2.1.1: + resolution: {integrity: sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -895,24 +1172,11 @@ packages: transitivePeerDependencies: - supports-color - /@eslint/js/8.44.0: - resolution: {integrity: sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==} + /@eslint/js@8.46.0: + resolution: {integrity: sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - /@google/semantic-release-replace-plugin/1.2.7_semantic-release@21.0.7: - resolution: {integrity: sha512-zE+ep9d221O6Rrjw6wA2ffEJfVqrheaTltfFlNO4oQqPTicjTusxG/vxLRoVWjLsyrJzQKyJsbPfGKQ/r9rl+w==} - engines: {node: '>=18'} - deprecated: This package has been renamed to semantic-release-replace-plugin. - peerDependencies: - semantic-release: '>=20.1.0' - dependencies: - jest-diff: 29.6.1 - lodash-es: 4.17.21 - replace-in-file: 7.0.1 - semantic-release: 21.0.7 - dev: true - - /@humanwhocodes/config-array/0.11.10: + /@humanwhocodes/config-array@0.11.10: resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} engines: {node: '>=10.10.0'} dependencies: @@ -922,128 +1186,111 @@ packages: transitivePeerDependencies: - supports-color - /@humanwhocodes/module-importer/1.0.1: + /@humanwhocodes/module-importer@1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - /@humanwhocodes/object-schema/1.2.1: + /@humanwhocodes/object-schema@1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} - /@isaacs/cliui/8.0.2: + /@isaacs/cliui@8.0.2: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} dependencies: string-width: 5.1.2 - string-width-cjs: /string-width/4.2.3 + string-width-cjs: /string-width@4.2.3 strip-ansi: 7.0.1 - strip-ansi-cjs: /strip-ansi/6.0.1 + strip-ansi-cjs: /strip-ansi@6.0.1 wrap-ansi: 8.1.0 - wrap-ansi-cjs: /wrap-ansi/7.0.0 - dev: true - - /@istanbuljs/load-nyc-config/1.1.0: - resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} - engines: {node: '>=8'} - dependencies: - camelcase: 5.3.1 - find-up: 4.1.0 - get-package-type: 0.1.0 - js-yaml: 3.14.1 - resolve-from: 5.0.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 dev: true - /@istanbuljs/nyc-config-typescript/1.0.2_nyc@15.1.0: - resolution: {integrity: sha512-iKGIyMoyJuFnJRSVTZ78POIRvNnwZaWIf8vG4ZS3rQq58MMDrqEX2nnzx0R28V2X8JvmKYiqY9FP2hlJsm8A0w==} - engines: {node: '>=8'} - peerDependencies: - nyc: '>=15' - dependencies: - '@istanbuljs/schema': 0.1.3 - nyc: 15.1.0 - dev: true - - /@istanbuljs/schema/0.1.3: + /@istanbuljs/schema@0.1.3: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} dev: true - /@jest/schemas/29.6.0: + /@jest/schemas@29.6.0: resolution: {integrity: sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@sinclair/typebox': 0.27.8 dev: true - /@jridgewell/gen-mapping/0.1.1: + /@jridgewell/gen-mapping@0.1.1: resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==} engines: {node: '>=6.0.0'} dependencies: '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /@jridgewell/gen-mapping/0.3.2: + /@jridgewell/gen-mapping@0.3.2: resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} engines: {node: '>=6.0.0'} dependencies: '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/sourcemap-codec': 1.4.15 '@jridgewell/trace-mapping': 0.3.17 dev: true - /@jridgewell/resolve-uri/3.1.0: + /@jridgewell/resolve-uri@3.1.0: resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} dev: true - /@jridgewell/set-array/1.1.2: + /@jridgewell/set-array@1.1.2: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} dev: true - /@jridgewell/sourcemap-codec/1.4.14: + /@jridgewell/sourcemap-codec@1.4.14: resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} dev: true - /@jridgewell/trace-mapping/0.3.17: + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@jridgewell/trace-mapping@0.3.17: resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} dependencies: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 dev: true - /@jridgewell/trace-mapping/0.3.9: + /@jridgewell/trace-mapping@0.3.9: resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} dependencies: '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /@nicolo-ribaudo/eslint-scope-5-internals/5.1.1-v1: + /@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1: resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==} dependencies: eslint-scope: 5.1.1 dev: true - /@nodelib/fs.scandir/2.1.5: + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} dependencies: '@nodelib/fs.stat': 2.0.5 run-parallel: 1.2.0 - /@nodelib/fs.stat/2.0.5: + /@nodelib/fs.stat@2.0.5: resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} engines: {node: '>= 8'} - /@nodelib/fs.walk/1.2.8: + /@nodelib/fs.walk@1.2.8: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - /@npmcli/map-workspaces/3.0.4: + /@npmcli/map-workspaces@3.0.4: resolution: {integrity: sha512-Z0TbvXkRbacjFFLpVpV0e2mheCh+WzQpcqL+4xp49uNJOxOnIAPZyXtUxZ5Qn3QBTGKA11Exjd9a5411rBrhDg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: @@ -1053,17 +1300,17 @@ packages: read-package-json-fast: 3.0.2 dev: true - /@npmcli/name-from-folder/2.0.0: + /@npmcli/name-from-folder@2.0.0: resolution: {integrity: sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true - /@octokit/auth-token/4.0.0: + /@octokit/auth-token@4.0.0: resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==} engines: {node: '>= 18'} dev: true - /@octokit/core/5.0.0: + /@octokit/core@5.0.0: resolution: {integrity: sha512-YbAtMWIrbZ9FCXbLwT9wWB8TyLjq9mxpKdgB3dUNxQcIVTf9hJ70gRPwAcqGZdY6WdJPZ0I7jLaaNDCiloGN2A==} engines: {node: '>= 18'} dependencies: @@ -1076,7 +1323,7 @@ packages: universal-user-agent: 6.0.0 dev: true - /@octokit/endpoint/9.0.0: + /@octokit/endpoint@9.0.0: resolution: {integrity: sha512-szrQhiqJ88gghWY2Htt8MqUDO6++E/EIXqJ2ZEp5ma3uGS46o7LZAzSLt49myB7rT+Hfw5Y6gO3LmOxGzHijAQ==} engines: {node: '>= 18'} dependencies: @@ -1085,7 +1332,7 @@ packages: universal-user-agent: 6.0.0 dev: true - /@octokit/graphql/7.0.1: + /@octokit/graphql@7.0.1: resolution: {integrity: sha512-T5S3oZ1JOE58gom6MIcrgwZXzTaxRnxBso58xhozxHpOqSTgDS6YNeEUvZ/kRvXgPrRz/KHnZhtb7jUMRi9E6w==} engines: {node: '>= 18'} dependencies: @@ -1094,11 +1341,11 @@ packages: universal-user-agent: 6.0.0 dev: true - /@octokit/openapi-types/18.0.0: + /@octokit/openapi-types@18.0.0: resolution: {integrity: sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==} dev: true - /@octokit/plugin-paginate-rest/8.0.0_@octokit+core@5.0.0: + /@octokit/plugin-paginate-rest@8.0.0(@octokit/core@5.0.0): resolution: {integrity: sha512-2xZ+baZWUg+qudVXnnvXz7qfrTmDeYPCzangBVq/1gXxii/OiS//4shJp9dnCCvj1x+JAm9ji1Egwm1BA47lPQ==} engines: {node: '>= 18'} peerDependencies: @@ -1108,7 +1355,7 @@ packages: '@octokit/types': 11.1.0 dev: true - /@octokit/plugin-retry/6.0.0_@octokit+core@5.0.0: + /@octokit/plugin-retry@6.0.0(@octokit/core@5.0.0): resolution: {integrity: sha512-a1/A4A+PB1QoAHQfLJxGHhLfSAT03bR1jJz3GgQJZvty2ozawFWs93MiBQXO7SL2YbO7CIq0Goj4qLOBj8JeMQ==} engines: {node: '>= 18'} peerDependencies: @@ -1120,7 +1367,7 @@ packages: bottleneck: 2.19.5 dev: true - /@octokit/plugin-throttling/7.0.0_@octokit+core@5.0.0: + /@octokit/plugin-throttling@7.0.0(@octokit/core@5.0.0): resolution: {integrity: sha512-KL2k/d0uANc8XqP5S64YcNFCudR3F5AaKO39XWdUtlJIjT9Ni79ekWJ6Kj5xvAw87udkOMEPcVf9xEge2+ahew==} engines: {node: '>= 18'} peerDependencies: @@ -1131,7 +1378,7 @@ packages: bottleneck: 2.19.5 dev: true - /@octokit/request-error/5.0.0: + /@octokit/request-error@5.0.0: resolution: {integrity: sha512-1ue0DH0Lif5iEqT52+Rf/hf0RmGO9NWFjrzmrkArpG9trFfDM/efx00BJHdLGuro4BR/gECxCU2Twf5OKrRFsQ==} engines: {node: '>= 18'} dependencies: @@ -1140,7 +1387,7 @@ packages: once: 1.4.0 dev: true - /@octokit/request/8.1.1: + /@octokit/request@8.1.1: resolution: {integrity: sha512-8N+tdUz4aCqQmXl8FpHYfKG9GelDFd7XGVzyN8rc6WxVlYcfpHECnuRkgquzz+WzvHTK62co5di8gSXnzASZPQ==} engines: {node: '>= 18'} dependencies: @@ -1151,20 +1398,20 @@ packages: universal-user-agent: 6.0.0 dev: true - /@octokit/types/11.1.0: + /@octokit/types@11.1.0: resolution: {integrity: sha512-Fz0+7GyLm/bHt8fwEqgvRBWwIV1S6wRRyq+V6exRKLVWaKGsuy6H9QFYeBVDV7rK6fO3XwHgQOPxv+cLj2zpXQ==} dependencies: '@octokit/openapi-types': 18.0.0 dev: true - /@pkgjs/parseargs/0.11.0: + /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} requiresBuild: true dev: true optional: true - /@pkgr/utils/2.3.1: + /@pkgr/utils@2.3.1: resolution: {integrity: sha512-wfzX8kc1PMyUILA+1Z/EqoE4UCXGy0iRGMhPwdfae1+f0OXlLqCk+By+aMzgJBzR9AzS4CDizioG6Ss1gvAFJw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dependencies: @@ -1173,22 +1420,22 @@ packages: open: 8.4.2 picocolors: 1.0.0 tiny-glob: 0.2.9 - tslib: 2.6.0 + tslib: 2.6.1 dev: true - /@pnpm/config.env-replace/1.0.0: + /@pnpm/config.env-replace@1.0.0: resolution: {integrity: sha512-ZVPVDi1E8oeXlYqkGRtX0CkzLTwE2zt62bjWaWKaAvI8NZqHzlMvGeSNDpW+JB3+aKanYb4UETJOF1/CxGPemA==} engines: {node: '>=12.22.0'} dev: true - /@pnpm/network.ca-file/1.0.2: + /@pnpm/network.ca-file@1.0.2: resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} engines: {node: '>=12.22.0'} dependencies: graceful-fs: 4.2.10 dev: true - /@pnpm/npm-conf/2.1.0: + /@pnpm/npm-conf@2.1.0: resolution: {integrity: sha512-Oe6ntvgsMTE3hDIqy6sajqHF+MnzJrOF06qC2QSiUEybLL7cp6tjoKUa32gpd9+KPVl4QyMs3E3nsXrx/Vdnlw==} engines: {node: '>=12'} dependencies: @@ -1197,12 +1444,12 @@ packages: config-chain: 1.1.13 dev: true - /@rebeccastevens/eslint-config/1.6.7_yadurfq5d7qy2ppb63phpnhzpi: - resolution: {integrity: sha512-n8ypIFJpJzw9h9ogL23Ezr8pHm1mpXtxekcqY3djiPh9FR7YTgU5uphqjrQtHzvnaW6RfFjdFUaeH1XK91kVdg==} + /@rebeccastevens/eslint-config@2.0.2(@typescript-eslint/eslint-plugin@6.2.0)(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-typescript@3.5.5)(eslint-plugin-eslint-comments@3.2.0)(eslint-plugin-functional@5.0.8)(eslint-plugin-import@2.28.0)(eslint-plugin-jsdoc@46.4.5)(eslint-plugin-markdown@3.0.1)(eslint-plugin-n@16.0.1)(eslint-plugin-optimize-regex@1.2.1)(eslint-plugin-promise@6.1.1)(eslint-plugin-sonarjs@0.19.0)(eslint-plugin-unicorn@48.0.1)(eslint@8.46.0): + resolution: {integrity: sha512-ddBQU8sklFnHmA9ybsubaMaoBC+rBmQnBoU7G7yU3lrfJ07Mm+YAcsFuM3rCrDW+vDg4t5t0yDMX3lyPIHURuw==} engines: {node: '>=18.12.1'} peerDependencies: - '@typescript-eslint/eslint-plugin': '*' - '@typescript-eslint/parser': '*' + '@typescript-eslint/eslint-plugin': '>=6.0.0' + '@typescript-eslint/parser': '>=6.0.0' eslint: '>=8.24.0' eslint-import-resolver-typescript: '*' eslint-plugin-eslint-comments: '*' @@ -1210,78 +1457,30 @@ packages: eslint-plugin-import: '*' eslint-plugin-jsdoc: '*' eslint-plugin-markdown: '*' - eslint-plugin-node: '*' + eslint-plugin-n: '*' eslint-plugin-optimize-regex: '*' eslint-plugin-promise: '*' eslint-plugin-sonarjs: '*' eslint-plugin-unicorn: '*' dependencies: - '@typescript-eslint/eslint-plugin': 5.62.0_tbbci4he2x65aggpp4j2oxxdvm - '@typescript-eslint/parser': 5.62.0_ko3fmmbeyij36muomfgt2u76xu - deepmerge-ts: 5.0.0 - eslint: 8.45.0 - eslint-import-resolver-typescript: 3.5.5_ghbswvk3c6mlonlxyojs7rvnca - eslint-plugin-eslint-comments: 3.2.0_eslint@8.45.0 - eslint-plugin-import: 2.27.5_e5imconihjuiegtkjrayaxwwxe - eslint-plugin-jsdoc: 41.1.2_eslint@8.45.0 - eslint-plugin-markdown: 3.0.0_eslint@8.45.0 - eslint-plugin-node: 11.1.0_eslint@8.45.0 + '@typescript-eslint/eslint-plugin': 6.2.0(@typescript-eslint/parser@6.2.0)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.2.0(eslint@8.46.0)(typescript@5.1.6) + deepmerge-ts: 5.1.0 + eslint: 8.46.0 + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@6.2.0)(eslint-plugin-import@2.28.0)(eslint@8.46.0) + eslint-plugin-eslint-comments: 3.2.0(eslint@8.46.0) + eslint-plugin-functional: 5.0.8(eslint@8.46.0)(typescript@5.1.6) + eslint-plugin-import: 2.28.0(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) + eslint-plugin-jsdoc: 46.4.5(eslint@8.46.0) + eslint-plugin-markdown: 3.0.1(eslint@8.46.0) + eslint-plugin-n: 16.0.1(eslint@8.46.0) eslint-plugin-optimize-regex: 1.2.1 - eslint-plugin-promise: 6.1.1_eslint@8.45.0 - eslint-plugin-sonarjs: 0.19.0_eslint@8.45.0 - eslint-plugin-unicorn: 48.0.0_eslint@8.45.0 - dev: true - - /@rollup/plugin-commonjs/25.0.3_rollup@3.26.3: - resolution: {integrity: sha512-uBdtWr/H3BVcgm97MUdq2oJmqBR23ny1hOrWe2PKo9FTbjsGqg32jfasJUKYAI5ouqacjRnj65mBB/S79F+GQA==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.68.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.26.3 - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 8.1.0 - is-reference: 1.2.1 - magic-string: 0.27.0 - rollup: 3.26.3 - dev: true - - /@rollup/plugin-json/6.0.0_rollup@3.26.3: - resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.26.3 - rollup: 3.26.3 - dev: true - - /@rollup/plugin-node-resolve/15.1.0_rollup@3.26.3: - resolution: {integrity: sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.78.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.26.3 - '@types/resolve': 1.20.2 - deepmerge: 4.3.0 - is-builtin-module: 3.2.1 - is-module: 1.0.0 - resolve: 1.22.1 - rollup: 3.26.3 + eslint-plugin-promise: 6.1.1(eslint@8.46.0) + eslint-plugin-sonarjs: 0.19.0(eslint@8.46.0) + eslint-plugin-unicorn: 48.0.1(eslint@8.46.0) dev: true - /@rollup/plugin-typescript/11.1.2_cm73bj2zrd7reol56vzmclf6b4: + /@rollup/plugin-typescript@11.1.2(rollup@3.27.0)(tslib@2.6.1)(typescript@5.1.6): resolution: {integrity: sha512-0ghSOCMcA7fl1JM+0gYRf+Q/HWyg+zg7/gDSc+fRLmlJWcW5K1I+CLRzaRhXf4Y3DRyPnnDo4M2ktw+a6JcDEg==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1294,14 +1493,14 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.26.3 + '@rollup/pluginutils': 5.0.2(rollup@3.27.0) resolve: 1.22.1 - rollup: 3.26.3 - tslib: 2.6.0 + rollup: 3.27.0 + tslib: 2.6.1 typescript: 5.1.6 dev: true - /@rollup/pluginutils/5.0.2_rollup@3.26.3: + /@rollup/pluginutils@5.0.2(rollup@3.27.0): resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1313,10 +1512,10 @@ packages: '@types/estree': 1.0.0 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.26.3 + rollup: 3.27.0 dev: true - /@semantic-release/changelog/6.0.3_semantic-release@21.0.7: + /@semantic-release/changelog@6.0.3(semantic-release@21.0.7): resolution: {integrity: sha512-dZuR5qByyfe3Y03TpmCvAxCyTnp7r5XwtHRf/8vD9EAn4ZWbavUX8adMtXYzE86EVh0gyLA7lm5yW4IV30XUag==} engines: {node: '>=14.17'} peerDependencies: @@ -1329,7 +1528,7 @@ packages: semantic-release: 21.0.7 dev: true - /@semantic-release/commit-analyzer/10.0.1_semantic-release@21.0.7: + /@semantic-release/commit-analyzer@10.0.1(semantic-release@21.0.7): resolution: {integrity: sha512-9ejHzTAijYs9z246sY/dKBatmOPcd0GQ7lH4MgLCkv1q4GCiDZRkjHJkaQZXZVaK7mJybS+sH3Ng6G8i3pYMGQ==} engines: {node: '>=18'} peerDependencies: @@ -1347,17 +1546,17 @@ packages: - supports-color dev: true - /@semantic-release/error/3.0.0: + /@semantic-release/error@3.0.0: resolution: {integrity: sha512-5hiM4Un+tpl4cKw3lV4UgzJj+SmfNIDCLLw0TepzQxz9ZGV5ixnqkzIVF+3tp0ZHgcMKE+VNGHJjEeyFG2dcSw==} engines: {node: '>=14.17'} dev: true - /@semantic-release/error/4.0.0: + /@semantic-release/error@4.0.0: resolution: {integrity: sha512-mgdxrHTLOjOddRVYIYDo0fR3/v61GNN1YGkfbrjuIKg/uMgCd+Qzo3UAXJ+woLQQpos4pl5Esuw5A7AoNlzjUQ==} engines: {node: '>=18'} dev: true - /@semantic-release/git/10.0.1_semantic-release@21.0.7: + /@semantic-release/git@10.0.1(semantic-release@21.0.7): resolution: {integrity: sha512-eWrx5KguUcU2wUPaO6sfvZI0wPafUKAMNC18aXY4EnNcrZL86dEmpNVnC9uMpGZkmZJ9EfCVJBQx4pV4EMGT1w==} engines: {node: '>=14.17'} peerDependencies: @@ -1376,16 +1575,16 @@ packages: - supports-color dev: true - /@semantic-release/github/9.0.4_semantic-release@21.0.7: + /@semantic-release/github@9.0.4(semantic-release@21.0.7): resolution: {integrity: sha512-kQCGFAsBErvCR6hzNuzu63cj4erQN2krm9zQlg8vl4j5X0mL0d/Ras0wmL5Gkr1TuSS2lweME7M4J5zvtDDDSA==} engines: {node: '>=18'} peerDependencies: semantic-release: '>=20.1.0' dependencies: '@octokit/core': 5.0.0 - '@octokit/plugin-paginate-rest': 8.0.0_@octokit+core@5.0.0 - '@octokit/plugin-retry': 6.0.0_@octokit+core@5.0.0 - '@octokit/plugin-throttling': 7.0.0_@octokit+core@5.0.0 + '@octokit/plugin-paginate-rest': 8.0.0(@octokit/core@5.0.0) + '@octokit/plugin-retry': 6.0.0(@octokit/core@5.0.0) + '@octokit/plugin-throttling': 7.0.0(@octokit/core@5.0.0) '@semantic-release/error': 4.0.0 aggregate-error: 4.0.1 debug: 4.3.4 @@ -1403,7 +1602,7 @@ packages: - supports-color dev: true - /@semantic-release/npm/10.0.4_semantic-release@21.0.7: + /@semantic-release/npm@10.0.4(semantic-release@21.0.7): resolution: {integrity: sha512-6R3timIQ7VoL2QWRkc9DG8v74RQtRp7UOe/2KbNaqwJ815qOibAv65bH3RtTEhs4axEaHoZf7HDgFs5opaZ9Jw==} engines: {node: '>=18'} peerDependencies: @@ -1425,7 +1624,7 @@ packages: tempy: 3.0.0 dev: true - /@semantic-release/release-notes-generator/11.0.4_semantic-release@21.0.7: + /@semantic-release/release-notes-generator@11.0.4(semantic-release@21.0.7): resolution: {integrity: sha512-j0Znnwq9IdWTCGzqSlkLv4MpALTsVDZxcVESzJCNN8pK2BYQlYaKsdZ1Ea/+7RlppI3vjhEi33ZKmjSGY1FLKw==} engines: {node: '>=18'} peerDependencies: @@ -1446,11 +1645,11 @@ packages: - supports-color dev: true - /@sinclair/typebox/0.27.8: + /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@snyk/github-codeowners/1.1.0: + /@snyk/github-codeowners@1.1.0: resolution: {integrity: sha512-lGFf08pbkEac0NYgVf4hdANpAgApRjNByLXB+WBip3qj1iendOIyAwP2GKkKbQMNVy2r1xxDf0ssfWscoiC+Vw==} engines: {node: '>=8.10'} hasBin: true @@ -1460,135 +1659,183 @@ packages: p-map: 4.0.0 dev: true - /@tsconfig/node10/1.0.9: + /@tsconfig/node10@1.0.9: resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} dev: true - /@tsconfig/node12/1.0.11: + /@tsconfig/node12@1.0.11: resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} dev: true - /@tsconfig/node14/1.0.3: + /@tsconfig/node14@1.0.3: resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} dev: true - /@tsconfig/node16/1.0.3: + /@tsconfig/node16@1.0.3: resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} dev: true - /@types/dedent/0.7.0: + /@types/chai-subset@1.3.3: + resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} + dependencies: + '@types/chai': 4.3.5 + dev: true + + /@types/chai@4.3.5: + resolution: {integrity: sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==} + dev: true + + /@types/dedent@0.7.0: resolution: {integrity: sha512-EGlKlgMhnLt/cM4DbUSafFdrkeJoC9Mvnj0PUCU7tFmTjMjNRT957kXCx0wYm3JuEq4o4ZsS5vG+NlkM2DMd2A==} dev: true - /@types/eslint/8.44.0: - resolution: {integrity: sha512-gsF+c/0XOguWgaOgvFs+xnnRqt9GwgTvIks36WpE6ueeI4KCEHHd8K/CKHqhOqrJKsYH8m27kRzQEvWXAwXUTw==} + /@types/eslint@8.44.1: + resolution: {integrity: sha512-XpNDc4Z5Tb4x+SW1MriMVeIsMoONHCkWFMkR/aPJbzEsxqHy+4Glu/BqTdPrApfDeMaXbtNh6bseNgl5KaWrSg==} dependencies: '@types/estree': 1.0.0 '@types/json-schema': 7.0.12 dev: true - /@types/estree/1.0.0: + /@types/estree@1.0.0: resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} dev: true - /@types/json-schema/7.0.12: + /@types/istanbul-lib-coverage@2.0.4: + resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} + dev: true + + /@types/json-schema@7.0.12: resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} - /@types/json5/0.0.29: + /@types/json5@0.0.29: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true - /@types/mdast/3.0.10: + /@types/mdast@3.0.10: resolution: {integrity: sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==} dependencies: '@types/unist': 2.0.6 dev: true - /@types/minimist/1.2.2: + /@types/minimist@1.2.2: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true - /@types/node/16.18.39: + /@types/node@16.18.39: resolution: {integrity: sha512-8q9ZexmdYYyc5/cfujaXb4YOucpQxAV4RMG0himLyDUOEr8Mr79VrqsFI+cQ2M2h89YIuy95lbxuYjxT4Hk4kQ==} dev: true - /@types/normalize-package-data/2.4.1: + /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true - /@types/resolve/1.20.2: - resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} - dev: true - - /@types/rollup-plugin-auto-external/2.0.2: + /@types/rollup-plugin-auto-external@2.0.2: resolution: {integrity: sha512-1Xtl9S4yQapD+A4mX1sqYVXm3UmVA9oIEf2YKEhRTCUNxlAM3DoKK1HPxrGMemDJNfhe6Yl3w0JsAGvIN5j/ow==} dependencies: - rollup: 3.26.3 + rollup: 3.27.0 dev: true - /@types/semver/7.5.0: + /@types/semver@7.5.0: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} - /@types/unist/2.0.6: + /@types/unist@2.0.6: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} dev: true - /@typescript-eslint/eslint-plugin/5.62.0_tbbci4he2x65aggpp4j2oxxdvm: - resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/eslint-plugin@6.2.0(@typescript-eslint/parser@6.2.0)(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-rClGrMuyS/3j0ETa1Ui7s6GkLhfZGKZL3ZrChLeAiACBE/tRc1wq8SNZESUuluxhLj9FkUefRs2l6bCIArWBiQ==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.4.0 - '@typescript-eslint/parser': 5.62.0_ko3fmmbeyij36muomfgt2u76xu - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0_ko3fmmbeyij36muomfgt2u76xu - '@typescript-eslint/utils': 5.62.0_ko3fmmbeyij36muomfgt2u76xu + '@eslint-community/regexpp': 4.5.1 + '@typescript-eslint/parser': 6.2.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/scope-manager': 6.2.0 + '@typescript-eslint/type-utils': 6.2.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/utils': 6.2.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.2.0 debug: 4.3.4 - eslint: 8.45.0 + eslint: 8.46.0 graphemer: 1.4.0 ignore: 5.2.4 + natural-compare: 1.4.0 natural-compare-lite: 1.4.0 semver: 7.5.4 - tsutils: 3.21.0_typescript@5.1.6 + ts-api-utils: 1.0.1(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.62.0_ko3fmmbeyij36muomfgt2u76xu: - resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/parser@6.2.0(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-igVYOqtiK/UsvKAmmloQAruAdUHihsOCvplJpplPZ+3h4aDkC/UKZZNKgB6h93ayuYLuEymU3h8nF1xMRbh37g==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0_typescript@5.1.6 + '@typescript-eslint/scope-manager': 6.2.0 + '@typescript-eslint/types': 6.2.0 + '@typescript-eslint/typescript-estree': 6.2.0(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.2.0 debug: 4.3.4 - eslint: 8.45.0 + eslint: 8.46.0 typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.62.0: + /@typescript-eslint/rule-tester@6.2.0(@eslint/eslintrc@2.1.1)(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-jSwHgX2eqjVPK1jdDuo2LEhIAi9gMvKAUaAaYLSguNct6Zu0ajt8gvAU469I78Aeb+p7zLkUjuIlsHr6i+sRNw==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@eslint/eslintrc': '>=2' + eslint: '>=8' + dependencies: + '@eslint/eslintrc': 2.1.1 + '@typescript-eslint/typescript-estree': 6.2.0(typescript@5.1.6) + '@typescript-eslint/utils': 6.2.0(eslint@8.46.0)(typescript@5.1.6) + ajv: 6.12.6 + eslint: 8.46.0 + lodash.merge: 4.6.2 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/scope-manager@5.62.0: resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 + dev: true - /@typescript-eslint/type-utils/5.62.0_ko3fmmbeyij36muomfgt2u76xu: + /@typescript-eslint/scope-manager@6.0.0: + resolution: {integrity: sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/visitor-keys': 6.0.0 + dev: false + + /@typescript-eslint/scope-manager@6.2.0: + resolution: {integrity: sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.2.0 + '@typescript-eslint/visitor-keys': 6.2.0 + + /@typescript-eslint/type-utils@5.62.0(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1598,66 +1845,265 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.62.0_typescript@5.1.6 - '@typescript-eslint/utils': 5.62.0_ko3fmmbeyij36muomfgt2u76xu + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6) + '@typescript-eslint/utils': 5.62.0(eslint@8.46.0)(typescript@5.1.6) debug: 4.3.4 - eslint: 8.45.0 - tsutils: 3.21.0_typescript@5.1.6 + eslint: 8.46.0 + tsutils: 3.21.0(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color + dev: true - /@typescript-eslint/types/5.62.0: - resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - /@typescript-eslint/typescript-estree/5.62.0_typescript@5.1.6: - resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/type-utils@6.0.0(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6) + '@typescript-eslint/utils': 6.0.0(eslint@8.46.0)(typescript@5.1.6) debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.4 - tsutils: 3.21.0_typescript@5.1.6 + eslint: 8.46.0 + ts-api-utils: 1.0.1(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color + dev: false - /@typescript-eslint/utils/5.62.0_ko3fmmbeyij36muomfgt2u76xu: - resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/type-utils@6.2.0(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-DnGZuNU2JN3AYwddYIqrVkYW0uUQdv0AY+kz2M25euVNlujcN2u+rJgfJsBFlUEzBB6OQkUqSZPyuTLf2bP5mw==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.45.0 - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0_typescript@5.1.6 - eslint: 8.45.0 - eslint-scope: 5.1.1 - semver: 7.5.4 + '@typescript-eslint/typescript-estree': 6.2.0(typescript@5.1.6) + '@typescript-eslint/utils': 6.2.0(eslint@8.46.0)(typescript@5.1.6) + debug: 4.3.4 + eslint: 8.46.0 + ts-api-utils: 1.0.1(typescript@5.1.6) + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types@5.62.0: + resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@typescript-eslint/types@6.0.0: + resolution: {integrity: sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: false + + /@typescript-eslint/types@6.2.0: + resolution: {integrity: sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==} + engines: {node: ^16.0.0 || >=18.0.0} + + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.1.6): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.1.6) + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/typescript-estree@6.0.0(typescript@5.1.6): + resolution: {integrity: sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/visitor-keys': 6.0.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.1(typescript@5.1.6) + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + dev: false + + /@typescript-eslint/typescript-estree@6.2.0(typescript@5.1.6): + resolution: {integrity: sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.2.0 + '@typescript-eslint/visitor-keys': 6.2.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.1(typescript@5.1.6) + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + + /@typescript-eslint/utils@5.62.0(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.0 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6) + eslint: 8.46.0 + eslint-scope: 5.1.1 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/utils@6.0.0(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.0 + '@typescript-eslint/scope-manager': 6.0.0 + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6) + eslint: 8.46.0 + eslint-scope: 5.1.1 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: false + + /@typescript-eslint/utils@6.2.0(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-RCFrC1lXiX1qEZN8LmLrxYRhOkElEsPKTVSNout8DMzf8PeWoQG7Rxz2SadpJa3VSh5oYKGwt7j7X/VRg+Y3OQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.0 + '@typescript-eslint/scope-manager': 6.2.0 + '@typescript-eslint/types': 6.2.0 + '@typescript-eslint/typescript-estree': 6.2.0(typescript@5.1.6) + eslint: 8.46.0 + semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript - /@typescript-eslint/visitor-keys/5.62.0: + /@typescript-eslint/visitor-keys@5.62.0: resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.62.0 eslint-visitor-keys: 3.4.1 + dev: true + + /@typescript-eslint/visitor-keys@6.0.0: + resolution: {integrity: sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.0.0 + eslint-visitor-keys: 3.4.1 + dev: false + + /@typescript-eslint/visitor-keys@6.2.0: + resolution: {integrity: sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.2.0 + eslint-visitor-keys: 3.4.1 + + /@vitest/coverage-c8@0.33.0(vitest@0.33.0): + resolution: {integrity: sha512-DaF1zJz4dcOZS4k/neiQJokmOWqsGXwhthfmUdPGorXIQHjdPvV6JQSYhQDI41MyI8c+IieQUdIDs5XAMHtDDw==} + peerDependencies: + vitest: '>=0.30.0 <1' + dependencies: + '@ampproject/remapping': 2.2.1 + c8: 7.14.0 + magic-string: 0.30.1 + picocolors: 1.0.0 + std-env: 3.3.3 + vitest: 0.33.0 + dev: true + + /@vitest/expect@0.33.0: + resolution: {integrity: sha512-sVNf+Gla3mhTCxNJx+wJLDPp/WcstOe0Ksqz4Vec51MmgMth/ia0MGFEkIZmVGeTL5HtjYR4Wl/ZxBxBXZJTzQ==} + dependencies: + '@vitest/spy': 0.33.0 + '@vitest/utils': 0.33.0 + chai: 4.3.7 + dev: true + + /@vitest/runner@0.33.0: + resolution: {integrity: sha512-UPfACnmCB6HKRHTlcgCoBh6ppl6fDn+J/xR8dTufWiKt/74Y9bHci5CKB8tESSV82zKYtkBJo9whU3mNvfaisg==} + dependencies: + '@vitest/utils': 0.33.0 + p-limit: 4.0.0 + pathe: 1.1.1 + dev: true + + /@vitest/snapshot@0.33.0: + resolution: {integrity: sha512-tJjrl//qAHbyHajpFvr8Wsk8DIOODEebTu7pgBrP07iOepR5jYkLFiqLq2Ltxv+r0uptUb4izv1J8XBOwKkVYA==} + dependencies: + magic-string: 0.30.1 + pathe: 1.1.1 + pretty-format: 29.6.1 + dev: true + + /@vitest/spy@0.33.0: + resolution: {integrity: sha512-Kv+yZ4hnH1WdiAkPUQTpRxW8kGtH8VRTnus7ZTGovFYM1ZezJpvGtb9nPIjPnptHbsyIAxYZsEpVPYgtpjGnrg==} + dependencies: + tinyspy: 2.1.1 + dev: true - /JSONStream/1.3.5: + /@vitest/utils@0.33.0: + resolution: {integrity: sha512-pF1w22ic965sv+EN6uoePkAOTkAPWM03Ri/jXNyMIKBb/XHLDPfhLvf/Fa9g0YECevAIz56oVYXhodLvLQ/awA==} + dependencies: + diff-sequences: 29.4.3 + loupe: 2.3.6 + pretty-format: 29.6.1 + dev: true + + /JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true dependencies: @@ -1665,24 +2111,24 @@ packages: through: 2.3.8 dev: true - /acorn-jsx/5.3.2_acorn@8.10.0: + /acorn-jsx@5.3.2(acorn@8.10.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: acorn: 8.10.0 - /acorn-walk/8.2.0: + /acorn-walk@8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} dev: true - /acorn/8.10.0: + /acorn@8.10.0: resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} hasBin: true - /agent-base/7.1.0: + /agent-base@7.1.0: resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} engines: {node: '>= 14'} dependencies: @@ -1691,7 +2137,7 @@ packages: - supports-color dev: true - /aggregate-error/3.1.0: + /aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} dependencies: @@ -1699,7 +2145,7 @@ packages: indent-string: 4.0.0 dev: true - /aggregate-error/4.0.1: + /aggregate-error@4.0.1: resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} engines: {node: '>=12'} dependencies: @@ -1707,7 +2153,7 @@ packages: indent-string: 5.0.0 dev: true - /ajv/6.12.6: + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: fast-deep-equal: 3.1.3 @@ -1715,7 +2161,7 @@ packages: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - /ajv/8.12.0: + /ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} dependencies: fast-deep-equal: 3.1.3 @@ -1724,57 +2170,57 @@ packages: uri-js: 4.4.1 dev: true - /ansi-escapes/4.3.2: + /ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} dependencies: type-fest: 0.21.3 dev: true - /ansi-escapes/5.0.0: + /ansi-escapes@5.0.0: resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} engines: {node: '>=12'} dependencies: type-fest: 1.4.0 dev: true - /ansi-regex/5.0.1: + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - /ansi-regex/6.0.1: + /ansi-regex@6.0.1: resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} engines: {node: '>=12'} dev: true - /ansi-styles/3.2.1: + /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} dependencies: color-convert: 1.9.3 dev: true - /ansi-styles/4.3.0: + /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} dependencies: color-convert: 2.0.1 - /ansi-styles/5.2.0: + /ansi-styles@5.2.0: resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} engines: {node: '>=10'} dev: true - /ansi-styles/6.2.1: + /ansi-styles@6.2.1: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} dev: true - /ansicolors/0.3.2: + /ansicolors@0.3.2: resolution: {integrity: sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==} dev: true - /anymatch/3.1.3: + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} dependencies: @@ -1782,53 +2228,38 @@ packages: picomatch: 2.3.1 dev: true - /append-transform/2.0.0: - resolution: {integrity: sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==} - engines: {node: '>=8'} - dependencies: - default-require-extensions: 3.0.1 - dev: true - - /archy/1.0.0: - resolution: {integrity: sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==} - dev: true - - /are-docs-informative/0.0.2: + /are-docs-informative@0.0.2: resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} engines: {node: '>=14'} dev: true - /arg/4.1.3: + /arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} dev: true - /argparse/1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - dependencies: - sprintf-js: 1.0.3 - dev: true - - /argparse/2.0.1: + /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - /argv-formatter/1.0.0: + /argv-formatter@1.0.0: resolution: {integrity: sha512-F2+Hkm9xFaRg+GkaNnbwXNDV5O6pnCFEmqyhvfC/Ic5LbgOWjJh3L+mN/s91rxVL3znE7DYVpW0GJFT+4YBgWw==} dev: true - /arity-n/1.0.4: + /arity-n@1.0.4: resolution: {integrity: sha512-fExL2kFDC1Q2DUOx3whE/9KoN66IzkY4b4zUHUBFM1ojEYjZZYDcUW3bek/ufGionX9giIKDC5redH2IlGqcQQ==} dev: true - /array-find-index/1.0.2: - resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==} - engines: {node: '>=0.10.0'} + /array-buffer-byte-length@1.0.0: + resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + dependencies: + call-bind: 1.0.2 + is-array-buffer: 3.0.2 dev: true - /array-ify/1.0.0: + /array-ify@1.0.0: resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} dev: true - /array-includes/3.1.6: + /array-includes@3.1.6: resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} engines: {node: '>= 0.4'} dependencies: @@ -1839,22 +2270,33 @@ packages: is-string: 1.0.7 dev: true - /array-last/1.3.0: + /array-last@1.3.0: resolution: {integrity: sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==} engines: {node: '>=0.10.0'} dependencies: is-number: 4.0.0 dev: true - /array-timsort/1.0.3: + /array-timsort@1.0.3: resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==} dev: true - /array-union/2.1.0: + /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - /array.prototype.flat/1.3.1: + /array.prototype.findlastindex@1.2.2: + resolution: {integrity: sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.1 + es-shim-unscopables: 1.0.0 + get-intrinsic: 1.2.0 + dev: true + + /array.prototype.flat@1.3.1: resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} engines: {node: '>= 0.4'} dependencies: @@ -1864,7 +2306,7 @@ packages: es-shim-unscopables: 1.0.0 dev: true - /array.prototype.flatmap/1.3.1: + /array.prototype.flatmap@1.3.1: resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} engines: {node: '>= 0.4'} dependencies: @@ -1874,116 +2316,64 @@ packages: es-shim-unscopables: 1.0.0 dev: true - /arrgv/1.0.2: - resolution: {integrity: sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==} - engines: {node: '>=8.0.0'} + /arraybuffer.prototype.slice@1.0.1: + resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.0 + get-intrinsic: 1.2.1 + is-array-buffer: 3.0.2 + is-shared-array-buffer: 1.0.2 dev: true - /arrify/1.0.1: + /arrify@1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} dev: true - /arrify/3.0.0: - resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} - engines: {node: '>=12'} + /assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true - /astral-regex/2.0.0: + /astral-regex@2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} dev: true - /at-least-node/1.0.0: + /at-least-node@1.0.0: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} engines: {node: '>= 4.0.0'} dev: true - /ava/5.3.1_@ava+typescript@4.1.0: - resolution: {integrity: sha512-Scv9a4gMOXB6+ni4toLuhAm9KYWEjsgBglJl+kMGI5+IVDt120CCDZyB5HNU9DjmLI2t4I0GbnxGLmmRfGTJGg==} - engines: {node: '>=14.19 <15 || >=16.15 <17 || >=18'} - hasBin: true - peerDependencies: - '@ava/typescript': '*' - peerDependenciesMeta: - '@ava/typescript': - optional: true - dependencies: - '@ava/typescript': 4.1.0 - acorn: 8.10.0 - acorn-walk: 8.2.0 - ansi-styles: 6.2.1 - arrgv: 1.0.2 - arrify: 3.0.0 - callsites: 4.0.0 - cbor: 8.1.0 - chalk: 5.2.0 - chokidar: 3.5.3 - chunkd: 2.0.1 - ci-info: 3.8.0 - ci-parallel-vars: 1.0.1 - clean-yaml-object: 0.1.0 - cli-truncate: 3.1.0 - code-excerpt: 4.0.0 - common-path-prefix: 3.0.0 - concordance: 5.0.4 - currently-unhandled: 0.4.1 - debug: 4.3.4 - emittery: 1.0.1 - figures: 5.0.0 - globby: 13.2.2 - ignore-by-default: 2.1.0 - indent-string: 5.0.0 - is-error: 2.2.2 - is-plain-object: 5.0.0 - is-promise: 4.0.0 - matcher: 5.0.0 - mem: 9.0.2 - ms: 2.1.3 - p-event: 5.0.1 - p-map: 5.5.0 - picomatch: 2.3.1 - pkg-conf: 4.0.0 - plur: 5.1.0 - pretty-ms: 8.0.0 - resolve-cwd: 3.0.0 - stack-utils: 2.0.6 - strip-ansi: 7.0.1 - supertap: 3.0.1 - temp-dir: 3.0.0 - write-file-atomic: 5.0.1 - yargs: 17.7.2 - transitivePeerDependencies: - - supports-color - dev: true - - /available-typed-arrays/1.0.5: + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} dev: true - /babylon/6.18.0: + /babylon@6.18.0: resolution: {integrity: sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==} hasBin: true dev: true - /balanced-match/1.0.2: + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - /base64-js/1.5.1: + /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: true - /before-after-hook/2.2.3: + /before-after-hook@2.2.3: resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} dev: true - /binary-extensions/2.2.0: + /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} dev: true - /bl/4.1.0: + /bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} dependencies: buffer: 5.7.1 @@ -1991,97 +2381,108 @@ packages: readable-stream: 3.6.1 dev: true - /blueimp-md5/2.19.0: - resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} - dev: true - - /boolean/3.2.0: + /boolean@3.2.0: resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} dev: true - /bottleneck/2.19.5: + /bottleneck@2.19.5: resolution: {integrity: sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==} dev: true - /brace-expansion/1.1.11: + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 - /brace-expansion/2.0.1: + /brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} dependencies: balanced-match: 1.0.2 dev: true - /braces/3.0.2: + /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} dependencies: fill-range: 7.0.1 - /browserslist/4.21.9: + /browserslist@4.21.9: resolution: {integrity: sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001517 - electron-to-chromium: 1.4.467 + caniuse-lite: 1.0.30001515 + electron-to-chromium: 1.4.460 node-releases: 2.0.13 - update-browserslist-db: 1.0.11_browserslist@4.21.9 + update-browserslist-db: 1.0.11(browserslist@4.21.9) dev: true - /buffer/5.7.1: + /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: base64-js: 1.5.1 ieee754: 1.2.1 dev: true - /builtin-modules/3.3.0: + /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} dev: true - /builtins/2.0.1: + /builtins@2.0.1: resolution: {integrity: sha512-XkkVe5QAb6guWPXTzpSrYpSlN3nqEmrrE2TkAr/tp7idSF6+MONh9WvKrAuR3HiKLvoSgmbs8l1U9IPmMrIoLw==} dependencies: semver: 6.3.1 dev: true - /cachedir/2.3.0: - resolution: {integrity: sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==} - engines: {node: '>=6'} + /builtins@5.0.1: + resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} + dependencies: + semver: 7.5.4 dev: true - /caching-transform/4.0.0: - resolution: {integrity: sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==} - engines: {node: '>=8'} + /c8@7.14.0: + resolution: {integrity: sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw==} + engines: {node: '>=10.12.0'} + hasBin: true dependencies: - hasha: 5.2.2 - make-dir: 3.1.0 - package-hash: 4.0.0 - write-file-atomic: 3.0.3 + '@bcoe/v8-coverage': 0.2.3 + '@istanbuljs/schema': 0.1.3 + find-up: 5.0.0 + foreground-child: 2.0.0 + istanbul-lib-coverage: 3.2.0 + istanbul-lib-report: 3.0.1 + istanbul-reports: 3.1.6 + rimraf: 3.0.2 + test-exclude: 6.0.0 + v8-to-istanbul: 9.1.0 + yargs: 16.2.0 + yargs-parser: 20.2.9 dev: true - /call-bind/1.0.2: + /cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + + /cachedir@2.3.0: + resolution: {integrity: sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==} + engines: {node: '>=6'} + dev: true + + /call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 get-intrinsic: 1.2.0 dev: true - /callsites/3.1.0: + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - /callsites/4.0.0: - resolution: {integrity: sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==} - engines: {node: '>=12.20'} - dev: true - - /camelcase-keys/6.2.2: + /camelcase-keys@6.2.2: resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} engines: {node: '>=8'} dependencies: @@ -2090,16 +2491,16 @@ packages: quick-lru: 4.0.1 dev: true - /camelcase/5.3.1: + /camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} dev: true - /caniuse-lite/1.0.30001517: - resolution: {integrity: sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==} + /caniuse-lite@1.0.30001515: + resolution: {integrity: sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA==} dev: true - /cardinal/2.1.1: + /cardinal@2.1.1: resolution: {integrity: sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==} hasBin: true dependencies: @@ -2107,14 +2508,20 @@ packages: redeyed: 2.1.1 dev: true - /cbor/8.1.0: - resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==} - engines: {node: '>=12.19'} + /chai@4.3.7: + resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} + engines: {node: '>=4'} dependencies: - nofilter: 3.1.0 + assertion-error: 1.1.0 + check-error: 1.0.2 + deep-eql: 4.1.3 + get-func-name: 2.0.0 + loupe: 2.3.6 + pathval: 1.1.1 + type-detect: 4.0.8 dev: true - /chalk/2.4.2: + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} dependencies: @@ -2123,35 +2530,39 @@ packages: supports-color: 5.5.0 dev: true - /chalk/4.1.2: + /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - /chalk/5.2.0: + /chalk@5.2.0: resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} dev: true - /character-entities-legacy/1.1.4: + /character-entities-legacy@1.1.4: resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} dev: true - /character-entities/1.2.4: + /character-entities@1.2.4: resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} dev: true - /character-reference-invalid/1.1.4: + /character-reference-invalid@1.1.4: resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} dev: true - /chardet/0.7.0: + /chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true - /chokidar/3.5.3: + /check-error@1.0.2: + resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} + dev: true + + /chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} dependencies: @@ -2166,44 +2577,31 @@ packages: fsevents: 2.3.2 dev: true - /chunkd/2.0.1: - resolution: {integrity: sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==} - dev: true - - /ci-info/3.8.0: + /ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} dev: true - /ci-parallel-vars/1.0.1: - resolution: {integrity: sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==} - dev: true - - /clean-regexp/1.0.0: + /clean-regexp@1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} dependencies: escape-string-regexp: 1.0.5 dev: true - /clean-stack/2.2.0: + /clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} dev: true - /clean-stack/4.2.0: + /clean-stack@4.2.0: resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} engines: {node: '>=12'} dependencies: escape-string-regexp: 5.0.0 dev: true - /clean-yaml-object/0.1.0: - resolution: {integrity: sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==} - engines: {node: '>=0.10.0'} - dev: true - - /clear-module/4.1.2: + /clear-module@4.1.2: resolution: {integrity: sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==} engines: {node: '>=8'} dependencies: @@ -2211,19 +2609,19 @@ packages: resolve-from: 5.0.0 dev: true - /cli-cursor/3.1.0: + /cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} dependencies: restore-cursor: 3.1.0 dev: true - /cli-spinners/2.7.0: + /cli-spinners@2.7.0: resolution: {integrity: sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==} engines: {node: '>=6'} dev: true - /cli-table3/0.6.3: + /cli-table3@0.6.3: resolution: {integrity: sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==} engines: {node: 10.* || >= 12.*} dependencies: @@ -2232,7 +2630,7 @@ packages: '@colors/colors': 1.5.0 dev: true - /cli-truncate/2.1.0: + /cli-truncate@2.1.0: resolution: {integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==} engines: {node: '>=8'} dependencies: @@ -2240,7 +2638,7 @@ packages: string-width: 4.2.3 dev: true - /cli-truncate/3.1.0: + /cli-truncate@3.1.0: resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: @@ -2248,20 +2646,20 @@ packages: string-width: 5.1.2 dev: true - /cli-width/3.0.0: + /cli-width@3.0.0: resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} engines: {node: '>= 10'} dev: true - /cliui/6.0.0: - resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + /cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 - wrap-ansi: 6.2.0 + wrap-ansi: 7.0.0 dev: true - /cliui/8.0.1: + /cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} dependencies: @@ -2270,57 +2668,55 @@ packages: wrap-ansi: 7.0.0 dev: true - /clone/1.0.4: + /clone@1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} dev: true - /code-excerpt/4.0.0: - resolution: {integrity: sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - convert-to-spaces: 2.0.1 - dev: true - - /color-convert/1.9.3: + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 dev: true - /color-convert/2.0.1: + /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 - /color-name/1.1.3: + /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} dev: true - /color-name/1.1.4: + /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - /colorette/2.0.19: + /colorette@2.0.19: resolution: {integrity: sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==} dev: true - /commander/10.0.0: + /commander@10.0.0: resolution: {integrity: sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==} engines: {node: '>=14'} dev: true - /commander/11.0.0: + /commander@11.0.0: resolution: {integrity: sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==} engines: {node: '>=16'} dev: true - /commander/4.1.1: + /commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} dev: true - /comment-json/4.2.3: + /commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + dev: true + + /comment-json@4.2.3: resolution: {integrity: sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw==} engines: {node: '>= 6'} dependencies: @@ -2331,12 +2727,12 @@ packages: repeat-string: 1.6.1 dev: true - /comment-parser/1.3.1: + /comment-parser@1.3.1: resolution: {integrity: sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==} engines: {node: '>= 12.0.0'} dev: true - /commitizen/4.3.0: + /commitizen@4.3.0: resolution: {integrity: sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==} engines: {node: '>= 12'} hasBin: true @@ -2360,52 +2756,30 @@ packages: - '@swc/wasm' dev: true - /common-path-prefix/3.0.0: - resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} - dev: true - - /commondir/1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - dev: true - - /compare-func/2.0.0: + /compare-func@2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} dependencies: array-ify: 1.0.0 dot-prop: 5.3.0 dev: true - /compose-function/3.0.3: + /compose-function@3.0.3: resolution: {integrity: sha512-xzhzTJ5eC+gmIzvZq+C3kCJHsp9os6tJkrigDRZclyGtOKINbZtE8n1Tzmeh32jW+BUDPbvZpibwvJHBLGMVwg==} dependencies: arity-n: 1.0.4 dev: true - /concat-map/0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - - /concordance/5.0.4: - resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} - engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} - dependencies: - date-time: 3.1.0 - esutils: 2.0.3 - fast-diff: 1.2.0 - js-string-escape: 1.0.1 - lodash: 4.17.21 - md5-hex: 3.0.1 - semver: 7.5.4 - well-known-symbols: 2.0.0 - dev: true + /concat-map@0.0.1: + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - /config-chain/1.1.13: + /config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} dependencies: ini: 1.3.8 proto-list: 1.2.4 dev: true - /configstore/5.0.1: + /configstore@5.0.1: resolution: {integrity: sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==} engines: {node: '>=8'} dependencies: @@ -2417,7 +2791,7 @@ packages: xdg-basedir: 4.0.0 dev: true - /conventional-changelog-angular/5.0.13: + /conventional-changelog-angular@5.0.13: resolution: {integrity: sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==} engines: {node: '>=10'} dependencies: @@ -2425,14 +2799,14 @@ packages: q: 1.5.1 dev: true - /conventional-changelog-angular/6.0.0: + /conventional-changelog-angular@6.0.0: resolution: {integrity: sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg==} engines: {node: '>=14'} dependencies: compare-func: 2.0.0 dev: true - /conventional-changelog-conventionalcommits/5.0.0: + /conventional-changelog-conventionalcommits@5.0.0: resolution: {integrity: sha512-lCDbA+ZqVFQGUj7h9QBKoIpLhl8iihkO0nCTyRNzuXtcd7ubODpYB04IFy31JloiJgG0Uovu8ot8oxRzn7Nwtw==} engines: {node: '>=10'} dependencies: @@ -2441,7 +2815,7 @@ packages: q: 1.5.1 dev: true - /conventional-changelog-writer/6.0.1: + /conventional-changelog-writer@6.0.1: resolution: {integrity: sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ==} engines: {node: '>=14'} hasBin: true @@ -2455,11 +2829,11 @@ packages: split: 1.0.1 dev: true - /conventional-commit-types/3.0.0: + /conventional-commit-types@3.0.0: resolution: {integrity: sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==} dev: true - /conventional-commits-filter/3.0.0: + /conventional-commits-filter@3.0.0: resolution: {integrity: sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q==} engines: {node: '>=14'} dependencies: @@ -2467,7 +2841,7 @@ packages: modify-values: 1.0.1 dev: true - /conventional-commits-parser/3.2.4: + /conventional-commits-parser@3.2.4: resolution: {integrity: sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==} engines: {node: '>=10'} hasBin: true @@ -2480,7 +2854,7 @@ packages: through2: 4.0.2 dev: true - /conventional-commits-parser/4.0.0: + /conventional-commits-parser@4.0.0: resolution: {integrity: sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==} engines: {node: '>=14'} hasBin: true @@ -2491,20 +2865,15 @@ packages: split2: 3.2.2 dev: true - /convert-source-map/1.9.0: + /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: true - /convert-to-spaces/2.0.1: - resolution: {integrity: sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - - /core-util-is/1.0.3: + /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true - /cosmiconfig-typescript-loader/4.3.0_jxrmwnl3fior5yfgqczttwkywq: + /cosmiconfig-typescript-loader@4.3.0(@types/node@16.18.39)(cosmiconfig@8.1.0)(ts-node@10.9.1)(typescript@5.1.6): resolution: {integrity: sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==} engines: {node: '>=12', npm: '>=6'} peerDependencies: @@ -2515,11 +2884,11 @@ packages: dependencies: '@types/node': 16.18.39 cosmiconfig: 8.1.0 - ts-node: 10.9.1_x3tncvpokjah2hm6bxjmp3ih6a + ts-node: 10.9.1(@types/node@16.18.39)(typescript@5.1.6) typescript: 5.1.6 dev: true - /cosmiconfig/8.0.0: + /cosmiconfig@8.0.0: resolution: {integrity: sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==} engines: {node: '>=14'} dependencies: @@ -2529,7 +2898,7 @@ packages: path-type: 4.0.0 dev: true - /cosmiconfig/8.1.0: + /cosmiconfig@8.1.0: resolution: {integrity: sha512-0tLZ9URlPGU7JsKq0DQOQ3FoRsYX8xDZ7xMiATQfaiGMz7EHowNkbU9u1coAOmnh9p/1ySpm0RB3JNWRXM5GCg==} engines: {node: '>=14'} dependencies: @@ -2539,11 +2908,11 @@ packages: path-type: 4.0.0 dev: true - /create-require/1.1.1: + /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true - /cross-spawn/7.0.3: + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} dependencies: @@ -2551,19 +2920,19 @@ packages: shebang-command: 2.0.0 which: 2.0.2 - /crypto-random-string/2.0.0: + /crypto-random-string@2.0.0: resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==} engines: {node: '>=8'} dev: true - /crypto-random-string/4.0.0: + /crypto-random-string@4.0.0: resolution: {integrity: sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==} engines: {node: '>=12'} dependencies: type-fest: 1.4.0 dev: true - /cspell-dictionary/6.31.1: + /cspell-dictionary@6.31.1: resolution: {integrity: sha512-7+K7aQGarqbpucky26wled7QSCJeg6VkLUWS+hLjyf0Cqc9Zew5xsLa4QjReExWUJx+a97jbiflITZNuWxgMrg==} engines: {node: '>=14'} dependencies: @@ -2574,7 +2943,7 @@ packages: gensequence: 5.0.2 dev: true - /cspell-gitignore/6.31.2: + /cspell-gitignore@6.31.2: resolution: {integrity: sha512-B1i8aiXCIbb/08u0K3xnDyXtg0qD+lb5B2itOOXi7KXlPkKvIuN4hWyXxhVDweWyYWEzyXD5wBpPrqICVrStHQ==} engines: {node: '>=14'} hasBin: true @@ -2583,14 +2952,14 @@ packages: find-up: 5.0.0 dev: true - /cspell-glob/6.31.2: + /cspell-glob@6.31.2: resolution: {integrity: sha512-ceTjHM4HaBgvG5S3oiB+PTPYq58EQYG6MmYpycDHzpR5I2H1NurK9lxWHfANmLbi0DsHn58tIZNDMUnnQj19Jw==} engines: {node: '>=14'} dependencies: micromatch: 4.0.5 dev: true - /cspell-grammar/6.31.1: + /cspell-grammar@6.31.1: resolution: {integrity: sha512-AsRVP0idcNFVSb9+p9XjMumFj3BUV67WIPWApaAzJl/dYyiIygQObRE+si0/QtFWGNw873b7hNhWZiKjqIdoaQ==} engines: {node: '>=14'} hasBin: true @@ -2599,7 +2968,7 @@ packages: '@cspell/cspell-types': 6.31.1 dev: true - /cspell-io/6.31.2: + /cspell-io@6.31.2: resolution: {integrity: sha512-Lp7LsF/f35LaOneROb/9mWiprShz2ONxjYFAt3bYP7gIxq41lWi8QhO+SN6spoqPp/wQXjSqJ7MuTZsemxPRnA==} engines: {node: '>=14'} dependencies: @@ -2609,7 +2978,7 @@ packages: - encoding dev: true - /cspell-lib/6.31.2: + /cspell-lib@6.31.2: resolution: {integrity: sha512-LqaB2ZfVfQHKL5aZzYoKU6/UxxAtWeXAYwpC9l+satXmajYyXtAh4kWmuW+y7kKRH2jA79rJQS3QE6ToeSqgQQ==} engines: {node: '>=14.6'} dependencies: @@ -2638,7 +3007,7 @@ packages: - encoding dev: true - /cspell-trie-lib/6.31.1: + /cspell-trie-lib@6.31.1: resolution: {integrity: sha512-MtYh7s4Sbr1rKT31P2BK6KY+YfOy3dWsuusq9HnqCXmq6aZ1HyFgjH/9p9uvqGi/TboMqn1KOV8nifhXK3l3jg==} engines: {node: '>=14'} dependencies: @@ -2647,7 +3016,7 @@ packages: gensequence: 5.0.2 dev: true - /cspell/6.31.2: + /cspell@6.31.2: resolution: {integrity: sha512-HJcQ8jqL/1N3Mj5dufFnIZCX3ACuRoFTSVY6h3Bo5wBqd2iiJTyeQ1SY9Zymlxtb2KyJ6jQRiFmkWeFx2HVs7w==} engines: {node: '>=14'} hasBin: true @@ -2673,14 +3042,7 @@ packages: - encoding dev: true - /currently-unhandled/0.4.1: - resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==} - engines: {node: '>=0.10.0'} - dependencies: - array-find-index: 1.0.2 - dev: true - - /cz-conventional-changelog/3.3.0: + /cz-conventional-changelog@3.3.0: resolution: {integrity: sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==} engines: {node: '>= 10'} dependencies: @@ -2697,23 +3059,16 @@ packages: - '@swc/wasm' dev: true - /dargs/7.0.0: + /dargs@7.0.0: resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==} engines: {node: '>=8'} dev: true - /date-time/3.1.0: - resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} - engines: {node: '>=6'} - dependencies: - time-zone: 1.0.0 - dev: true - - /dateformat/3.0.3: + /dateformat@3.0.3: resolution: {integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==} dev: true - /debug/3.2.7: + /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: supports-color: '*' @@ -2724,7 +3079,7 @@ packages: ms: 2.1.3 dev: true - /debug/4.3.4: + /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: @@ -2735,7 +3090,7 @@ packages: dependencies: ms: 2.1.2 - /decamelize-keys/1.1.1: + /decamelize-keys@1.1.1: resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} engines: {node: '>=0.10.0'} dependencies: @@ -2743,17 +3098,17 @@ packages: map-obj: 1.0.1 dev: true - /decamelize/1.2.0: + /decamelize@1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} dev: true - /dedent/0.7.0: + /dedent@0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} dev: true - /dedent/1.2.0: - resolution: {integrity: sha512-i4tcg0ClgvMUSxwHpt+NHQ01ZJmAkl6eBvDNrSZG9e+oLRTCSHv0wpr/Bzjpf6CwKeIHGevE1M34Y1Axdms5VQ==} + /dedent@1.3.0: + resolution: {integrity: sha512-7glNLfvdsMzZm3FpRY1CHuI2lbYDR+71YmrhmTZjYFD5pfT0ACgnGRdrrC9Mk2uICnzkcdelCx5at787UDGOvg==} peerDependencies: babel-plugin-macros: ^3.1.0 peerDependenciesMeta: @@ -2761,46 +3116,46 @@ packages: optional: true dev: true - /deep-extend/0.6.0: + /deep-eql@4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + dependencies: + type-detect: 4.0.8 + dev: true + + /deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} dev: true - /deep-freeze/0.0.1: + /deep-freeze@0.0.1: resolution: {integrity: sha512-Z+z8HiAvsGwmjqlphnHW5oz6yWlOwu6EQfFTjmeTWlDeda3FS2yv3jhq35TX/ewmsnqB+RX2IdsIOyjJCQN5tg==} dev: true - /deep-is/0.1.4: + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - /deepmerge-ts/5.0.0: - resolution: {integrity: sha512-esq9xUO8+CQCG63IlpkoOBNlpm1m4WBm0NRLFrGL/dcgzqWi1tmTLfG7QTvffqYt6T+dS+xaxrHxdexqGWkV1g==} + /deepmerge-ts@5.1.0: + resolution: {integrity: sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==} engines: {node: '>=16.0.0'} - /deepmerge/4.3.0: + /deepmerge@4.3.0: resolution: {integrity: sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==} engines: {node: '>=0.10.0'} dev: true - /default-require-extensions/3.0.1: - resolution: {integrity: sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==} - engines: {node: '>=8'} - dependencies: - strip-bom: 4.0.0 - dev: true - - /defaults/1.0.4: + /defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} dependencies: clone: 1.0.4 dev: true - /define-lazy-prop/2.0.0: + /define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} dev: true - /define-properties/1.2.0: + /define-properties@1.2.0: resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} engines: {node: '>= 0.4'} dependencies: @@ -2808,84 +3163,84 @@ packages: object-keys: 1.1.1 dev: true - /deprecation/2.3.1: + /deprecation@2.3.1: resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} dev: true - /detect-file/1.0.0: + /detect-file@1.0.0: resolution: {integrity: sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==} engines: {node: '>=0.10.0'} dev: true - /detect-indent/6.1.0: + /detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} dev: true - /detect-indent/7.0.1: + /detect-indent@7.0.1: resolution: {integrity: sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==} engines: {node: '>=12.20'} dev: true - /detect-newline/4.0.0: + /detect-newline@4.0.0: resolution: {integrity: sha512-1aXUEPdfGdzVPFpzGJJNgq9o81bGg1s09uxTWsqBlo9PI332uyJRQq13+LK/UN4JfxJbFdCXonUFQ9R/p7yCtw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /diff-sequences/29.4.3: + /diff-sequences@29.4.3: resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /diff/4.0.2: + /diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} dev: true - /dir-glob/3.0.1: + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} dependencies: path-type: 4.0.0 - /doctrine/2.1.0: + /doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} dependencies: esutils: 2.0.3 dev: true - /doctrine/3.0.0: + /doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} dependencies: esutils: 2.0.3 - /dot-prop/5.3.0: + /dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} dependencies: is-obj: 2.0.0 dev: true - /dot-prop/7.2.0: + /dot-prop@7.2.0: resolution: {integrity: sha512-Ol/IPXUARn9CSbkrdV4VJo7uCy1I3VuSiWCaFSg+8BdUOzF9n3jefIpcgAydvUZbTdEBZs2vEiTiS9m61ssiDA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: type-fest: 2.19.0 dev: true - /duplexer2/0.1.4: + /duplexer2@0.1.4: resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} dependencies: readable-stream: 2.3.8 dev: true - /eastasianwidth/0.2.0: + /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true - /easy-table/1.2.0: + /easy-table@1.2.0: resolution: {integrity: sha512-OFzVOv03YpvtcWGe5AayU5G2hgybsg3iqA6drU8UaoZyB9jLGMTrz9+asnLp/E+6qPh88yEI1gvyZFZ41dmgww==} dependencies: ansi-regex: 5.0.1 @@ -2893,31 +3248,19 @@ packages: wcwidth: 1.0.1 dev: true - /electron-to-chromium/1.4.467: - resolution: {integrity: sha512-2qI70O+rR4poYeF2grcuS/bCps5KJh6y1jtZMDDEteyKJQrzLOEhFyXCLcHW6DTBjKjWkk26JhWoAi+Ux9A0fg==} - dev: true - - /emittery/1.0.1: - resolution: {integrity: sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==} - engines: {node: '>=14.16'} + /electron-to-chromium@1.4.460: + resolution: {integrity: sha512-kKiHnbrHME7z8E6AYaw0ehyxY5+hdaRmeUbjBO22LZMdqTYCO29EvF0T1cQ3pJ1RN5fyMcHl1Lmcsdt9WWJpJQ==} dev: true - /emoji-regex/8.0.0: + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true - /emoji-regex/9.2.2: + /emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true - /enhance-visitors/1.0.0: - resolution: {integrity: sha512-+29eJLiUixTEDRaZ35Vu8jP3gPLNcQQkQkOQjLp2X+6cZGGPDD/uasbFzvLsJKnGZnvmyZ0srxudwOtskHeIDA==} - engines: {node: '>=4.0.0'} - dependencies: - lodash: 4.17.21 - dev: true - - /enhanced-resolve/5.12.0: + /enhanced-resolve@5.12.0: resolution: {integrity: sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==} engines: {node: '>=10.13.0'} dependencies: @@ -2925,12 +3268,12 @@ packages: tapable: 2.2.1 dev: true - /entities/3.0.1: + /entities@3.0.1: resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==} engines: {node: '>=0.12'} dev: true - /env-ci/9.0.0: + /env-ci@9.0.0: resolution: {integrity: sha512-Q3cjr1tX9xwigprw4G8M3o7PIOO/1LYji6TyGsbD1WfMmD23etZvhgmPXJqkP788yH4dgSSK7oaIMuaayUJIfg==} engines: {node: ^16.14 || >=18} dependencies: @@ -2938,13 +3281,13 @@ packages: java-properties: 1.0.2 dev: true - /error-ex/1.3.2: + /error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: is-arrayish: 0.2.1 dev: true - /es-abstract/1.21.1: + /es-abstract@1.21.1: resolution: {integrity: sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==} engines: {node: '>= 0.4'} dependencies: @@ -2983,22 +3326,67 @@ packages: which-typed-array: 1.1.9 dev: true - /es-set-tostringtag/2.0.1: + /es-abstract@1.22.1: + resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + arraybuffer.prototype.slice: 1.0.1 + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + es-set-tostringtag: 2.0.1 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.5 + get-intrinsic: 1.2.1 + get-symbol-description: 1.0.0 + globalthis: 1.0.3 + gopd: 1.0.1 + has: 1.0.3 + has-property-descriptors: 1.0.0 + has-proto: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.5 + is-array-buffer: 3.0.2 + is-callable: 1.2.7 + is-negative-zero: 2.0.2 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.2 + is-string: 1.0.7 + is-typed-array: 1.1.10 + is-weakref: 1.0.2 + object-inspect: 1.12.3 + object-keys: 1.1.1 + object.assign: 4.1.4 + regexp.prototype.flags: 1.5.0 + safe-array-concat: 1.0.0 + safe-regex-test: 1.0.0 + string.prototype.trim: 1.2.7 + string.prototype.trimend: 1.0.6 + string.prototype.trimstart: 1.0.6 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 + typed-array-length: 1.0.4 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.11 + dev: true + + /es-set-tostringtag@2.0.1: resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 has: 1.0.3 has-tostringtag: 1.0.0 dev: true - /es-shim-unscopables/1.0.0: + /es-shim-unscopables@1.0.0: resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} dependencies: has: 1.0.3 dev: true - /es-to-primitive/1.2.1: + /es-to-primitive@1.2.1: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} dependencies: @@ -3007,88 +3395,100 @@ packages: is-symbol: 1.0.4 dev: true - /es6-error/4.1.1: - resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} - dev: true - - /escalade/3.1.1: + /esbuild@0.18.16: + resolution: {integrity: sha512-1xLsOXrDqwdHxyXb/x/SOyg59jpf/SH7YMvU5RNSU7z3TInaASNJWNFJ6iRvLvLETZMasF3d1DdZLg7sgRimRQ==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.16 + '@esbuild/android-arm64': 0.18.16 + '@esbuild/android-x64': 0.18.16 + '@esbuild/darwin-arm64': 0.18.16 + '@esbuild/darwin-x64': 0.18.16 + '@esbuild/freebsd-arm64': 0.18.16 + '@esbuild/freebsd-x64': 0.18.16 + '@esbuild/linux-arm': 0.18.16 + '@esbuild/linux-arm64': 0.18.16 + '@esbuild/linux-ia32': 0.18.16 + '@esbuild/linux-loong64': 0.18.16 + '@esbuild/linux-mips64el': 0.18.16 + '@esbuild/linux-ppc64': 0.18.16 + '@esbuild/linux-riscv64': 0.18.16 + '@esbuild/linux-s390x': 0.18.16 + '@esbuild/linux-x64': 0.18.16 + '@esbuild/netbsd-x64': 0.18.16 + '@esbuild/openbsd-x64': 0.18.16 + '@esbuild/sunos-x64': 0.18.16 + '@esbuild/win32-arm64': 0.18.16 + '@esbuild/win32-ia32': 0.18.16 + '@esbuild/win32-x64': 0.18.16 + dev: true + + /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} dev: true - /escape-string-regexp/1.0.5: + /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} dev: true - /escape-string-regexp/2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - dev: true - - /escape-string-regexp/4.0.0: + /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /escape-string-regexp/5.0.0: + /escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} dev: true - /eslint-ava-rule-tester/4.0.0_eslint@8.45.0: - resolution: {integrity: sha512-bR0ogk+1Orb/+rj17MyuRObhcepqAXnwQJUpPO0pdTLwwdzjOqzqyWl4o/kHQTnwCOwcGvkBPS59KVbbCFCVRg==} - engines: {node: '>=8'} - peerDependencies: - eslint: '>=5.5.0' - dependencies: - eslint: 8.45.0 - dev: true - - /eslint-config-prettier/8.8.0_eslint@8.45.0: - resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} + /eslint-config-prettier@8.9.0(eslint@8.46.0): + resolution: {integrity: sha512-+sbni7NfVXnOpnRadUA8S28AUlsZt9GjgFvABIRL9Hkn8KqNzOp+7Lw4QWtrwn20KzU3wqu1QoOj2m+7rKRqkA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.45.0 + eslint: 8.46.0 dev: true - /eslint-doc-generator/1.4.3_ko3fmmbeyij36muomfgt2u76xu: + /eslint-doc-generator@1.4.3(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-cn9KXE7xuKlxKi/9VbirR3cbz7W1geRObwWzZjJAnpTeNBoqA8Rj+lD8/HHHJ7PnOdaTrRyhhoYdCtxqq3U7Bw==} engines: {node: ^14.18.0 || ^16.0.0 || >=18.0.0} hasBin: true peerDependencies: eslint: '>= 7' dependencies: - '@typescript-eslint/utils': 5.62.0_ko3fmmbeyij36muomfgt2u76xu + '@typescript-eslint/utils': 5.62.0(eslint@8.46.0)(typescript@5.1.6) ajv: 8.12.0 boolean: 3.2.0 commander: 10.0.0 cosmiconfig: 8.1.0 deepmerge: 4.3.0 dot-prop: 7.2.0 - eslint: 8.45.0 - jest-diff: 29.6.1 + eslint: 8.46.0 + jest-diff: 29.5.0 json-schema-traverse: 1.0.0 markdown-table: 3.0.3 no-case: 3.0.4 - type-fest: 3.13.1 + type-fest: 3.8.0 transitivePeerDependencies: - supports-color - typescript dev: true - /eslint-import-resolver-node/0.3.7: + /eslint-import-resolver-node@0.3.7: resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} dependencies: debug: 3.2.7 - is-core-module: 2.11.0 - resolve: 1.22.1 + is-core-module: 2.12.1 + resolve: 1.22.2 transitivePeerDependencies: - supports-color dev: true - /eslint-import-resolver-typescript/3.5.5_ghbswvk3c6mlonlxyojs7rvnca: + /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@6.2.0)(eslint-plugin-import@2.28.0)(eslint@8.46.0): resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -3097,11 +3497,11 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.12.0 - eslint: 8.45.0 - eslint-module-utils: 2.7.4_e5imconihjuiegtkjrayaxwwxe - eslint-plugin-import: 2.27.5_e5imconihjuiegtkjrayaxwwxe + eslint: 8.46.0 + eslint-module-utils: 2.7.4(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) + eslint-plugin-import: 2.28.0(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) get-tsconfig: 4.5.0 - globby: 13.2.2 + globby: 13.1.3 is-core-module: 2.11.0 is-glob: 4.0.3 synckit: 0.8.5 @@ -3112,7 +3512,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_7iazily2npofyqvhfberdgmshe: + /eslint-module-utils@2.7.4(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0): resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -3133,17 +3533,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.62.0_ko3fmmbeyij36muomfgt2u76xu + '@typescript-eslint/parser': 6.2.0(eslint@8.46.0)(typescript@5.1.6) debug: 3.2.7 - eslint: 8.45.0 - eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.5_ghbswvk3c6mlonlxyojs7rvnca + eslint: 8.46.0 + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@6.2.0)(eslint-plugin-import@2.28.0)(eslint@8.46.0) transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils/2.7.4_e5imconihjuiegtkjrayaxwwxe: - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0): + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -3163,66 +3562,72 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.62.0_ko3fmmbeyij36muomfgt2u76xu + '@typescript-eslint/parser': 6.2.0(eslint@8.46.0)(typescript@5.1.6) debug: 3.2.7 - eslint: 8.45.0 - eslint-import-resolver-typescript: 3.5.5_ghbswvk3c6mlonlxyojs7rvnca + eslint: 8.46.0 + eslint-import-resolver-node: 0.3.7 + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@6.2.0)(eslint-plugin-import@2.28.0)(eslint@8.46.0) transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-ava/14.0.0_eslint@8.45.0: - resolution: {integrity: sha512-XmKT6hppaipwwnLVwwvQliSU6AF1QMHiNoLD5JQfzhUhf0jY7CO0O624fQrE+Y/fTb9vbW8r77nKf7M/oHulxw==} - engines: {node: '>=14.17 <15 || >=16.4'} - peerDependencies: - eslint: '>=8.26.0' - dependencies: - enhance-visitors: 1.0.0 - eslint: 8.45.0 - eslint-utils: 3.0.0_eslint@8.45.0 - espree: 9.6.1 - espurify: 2.1.1 - import-modules: 2.1.0 - micro-spelling-correcter: 1.1.1 - pkg-dir: 5.0.0 - resolve-from: 5.0.0 - dev: true - - /eslint-plugin-es/3.0.1_eslint@8.45.0: - resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} - engines: {node: '>=8.10.0'} + /eslint-plugin-es-x@7.1.0(eslint@8.46.0): + resolution: {integrity: sha512-AhiaF31syh4CCQ+C5ccJA0VG6+kJK8+5mXKKE7Qs1xcPRg02CDPOj3mWlQxuWS/AYtg7kxrDNgW9YW3vc0Q+Mw==} + engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - eslint: '>=4.19.1' + eslint: '>=8' dependencies: - eslint: 8.45.0 - eslint-utils: 2.1.0 - regexpp: 3.2.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + '@eslint-community/regexpp': 4.5.1 + eslint: 8.46.0 dev: true - /eslint-plugin-eslint-comments/3.2.0_eslint@8.45.0: + /eslint-plugin-eslint-comments@3.2.0(eslint@8.46.0): resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} engines: {node: '>=6.5.0'} peerDependencies: eslint: '>=4.19.1' dependencies: escape-string-regexp: 1.0.5 - eslint: 8.45.0 + eslint: 8.46.0 ignore: 5.2.4 dev: true - /eslint-plugin-eslint-plugin/5.1.1_eslint@8.45.0: + /eslint-plugin-eslint-plugin@5.1.1(eslint@8.46.0): resolution: {integrity: sha512-4MGDsG505Ot2TSDSYxFL0cpDo4Y+t6hKB8cfZw9Jx484VjXWDfiYC/A6cccWFtWoOOC0j+wGgQIIb11cdIAMBg==} engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.45.0 - eslint-utils: 3.0.0_eslint@8.45.0 + eslint: 8.46.0 + eslint-utils: 3.0.0(eslint@8.46.0) estraverse: 5.3.0 dev: true - /eslint-plugin-import/2.27.5_e5imconihjuiegtkjrayaxwwxe: - resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} + /eslint-plugin-functional@5.0.8(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-rXC5THzqqSXUrbTBG+dLLYn10Af0C9Df+N4TT3onPrOz+kgInshLJdRAvEcV+8HHNsZyDrNLcgWh5jzVaAnleQ==} + engines: {node: '>=16.10.0'} + peerDependencies: + eslint: ^8.0.0 + typescript: '>=4.0.2' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/type-utils': 5.62.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/utils': 5.62.0(eslint@8.46.0)(typescript@5.1.6) + deepmerge-ts: 5.1.0 + escape-string-regexp: 4.0.0 + eslint: 8.46.0 + is-immutable-type: 1.2.9(eslint@8.46.0)(typescript@5.1.6) + semver: 7.5.4 + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-import@2.28.0(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0): + resolution: {integrity: sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -3231,21 +3636,24 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.62.0_ko3fmmbeyij36muomfgt2u76xu + '@typescript-eslint/parser': 6.2.0(eslint@8.46.0)(typescript@5.1.6) array-includes: 3.1.6 + array.prototype.findlastindex: 1.2.2 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.45.0 + eslint: 8.46.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4_7iazily2npofyqvhfberdgmshe + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) has: 1.0.3 - is-core-module: 2.11.0 + is-core-module: 2.12.1 is-glob: 4.0.3 minimatch: 3.1.2 + object.fromentries: 2.0.6 + object.groupby: 1.0.0 object.values: 1.1.6 - resolve: 1.22.1 + resolve: 1.22.3 semver: 6.3.1 tsconfig-paths: 3.14.2 transitivePeerDependencies: @@ -3254,105 +3662,113 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc/41.1.2_eslint@8.45.0: - resolution: {integrity: sha512-MePJXdGiPW7AG06CU5GbKzYtKpoHwTq1lKijjq+RwL/cQkZtBZ59Zbv5Ep0RVxSMnq6242249/n+w4XrTZ1Afg==} - engines: {node: ^14 || ^16 || ^17 || ^18 || ^19} + /eslint-plugin-jsdoc@46.4.5(eslint@8.46.0): + resolution: {integrity: sha512-HjTuxqDYplAQFu29F3MHFCDDBgeqOxPXI6TyBhL0u2rr4XntJ0z3C9PmJvpjFscKdHwkZDN/0l1QCG0QwyRi4g==} + engines: {node: '>=16'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@es-joy/jsdoccomment': 0.37.0 + '@es-joy/jsdoccomment': 0.39.4 are-docs-informative: 0.0.2 comment-parser: 1.3.1 debug: 4.3.4 escape-string-regexp: 4.0.0 - eslint: 8.45.0 + eslint: 8.46.0 esquery: 1.5.0 + is-builtin-module: 3.2.1 semver: 7.5.4 spdx-expression-parse: 3.0.1 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-markdown/3.0.0_eslint@8.45.0: - resolution: {integrity: sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg==} + /eslint-plugin-markdown@3.0.1(eslint@8.46.0): + resolution: {integrity: sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.45.0 + eslint: 8.46.0 mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-node/11.1.0_eslint@8.45.0: - resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} - engines: {node: '>=8.10.0'} + /eslint-plugin-n@16.0.1(eslint@8.46.0): + resolution: {integrity: sha512-CDmHegJN0OF3L5cz5tATH84RPQm9kG+Yx39wIqIwPR2C0uhBGMWfbbOtetR83PQjjidA5aXMu+LEFw1jaSwvTA==} + engines: {node: '>=16.0.0'} peerDependencies: - eslint: '>=5.16.0' + eslint: '>=7.0.0' dependencies: - eslint: 8.45.0 - eslint-plugin-es: 3.0.1_eslint@8.45.0 - eslint-utils: 2.1.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + builtins: 5.0.1 + eslint: 8.46.0 + eslint-plugin-es-x: 7.1.0(eslint@8.46.0) ignore: 5.2.4 + is-core-module: 2.12.1 minimatch: 3.1.2 - resolve: 1.22.1 - semver: 6.3.1 + resolve: 1.22.2 + semver: 7.5.4 dev: true - /eslint-plugin-optimize-regex/1.2.1: + /eslint-plugin-optimize-regex@1.2.1: resolution: {integrity: sha512-fUaU7Tj1G/KSTDTABJw4Wp427Rl7RPl9ViYTu1Jrv36fJw4DFhd4elPdXiuYtdPsNsvzn9GcVlKEssGIVjw0UQ==} engines: {node: '>=10'} dependencies: - regexp-tree: 0.1.27 + regexp-tree: 0.1.24 dev: true - /eslint-plugin-prettier/4.2.1_6nuyjbnyo6rwr4pwddenxlklsi: - resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} - engines: {node: '>=12.0.0'} + /eslint-plugin-prettier@5.0.0(@types/eslint@8.44.1)(eslint-config-prettier@8.9.0)(eslint@8.46.0)(prettier@3.0.0): + resolution: {integrity: sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==} + engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - eslint: '>=7.28.0' + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' eslint-config-prettier: '*' - prettier: '>=2.0.0' + prettier: '>=3.0.0' peerDependenciesMeta: + '@types/eslint': + optional: true eslint-config-prettier: optional: true dependencies: - eslint: 8.45.0 - eslint-config-prettier: 8.8.0_eslint@8.45.0 - prettier: 2.8.8 + '@types/eslint': 8.44.1 + eslint: 8.46.0 + eslint-config-prettier: 8.9.0(eslint@8.46.0) + prettier: 3.0.0 prettier-linter-helpers: 1.0.0 + synckit: 0.8.5 dev: true - /eslint-plugin-promise/6.1.1_eslint@8.45.0: + /eslint-plugin-promise@6.1.1(eslint@8.46.0): resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.45.0 + eslint: 8.46.0 dev: true - /eslint-plugin-sonarjs/0.19.0_eslint@8.45.0: + /eslint-plugin-sonarjs@0.19.0(eslint@8.46.0): resolution: {integrity: sha512-6+s5oNk5TFtVlbRxqZN7FIGmjdPCYQKaTzFPmqieCmsU1kBYDzndTeQav0xtQNwZJWu5awWfTGe8Srq9xFOGnw==} engines: {node: '>=14'} peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.45.0 + eslint: 8.46.0 dev: true - /eslint-plugin-unicorn/48.0.0_eslint@8.45.0: - resolution: {integrity: sha512-8fk/v3p1ro34JSVDBEmtOq6EEQRpMR0iTir79q69KnXFZ6DJyPkT3RAi+ZoTqhQMdDSpGh8BGR68ne1sP5cnAA==} + /eslint-plugin-unicorn@48.0.1(eslint@8.46.0): + resolution: {integrity: sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==} engines: {node: '>=16'} peerDependencies: eslint: '>=8.44.0' dependencies: '@babel/helper-validator-identifier': 7.22.5 - '@eslint-community/eslint-utils': 4.4.0_eslint@8.45.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) ci-info: 3.8.0 clean-regexp: 1.0.0 - eslint: 8.45.0 + eslint: 8.46.0 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -3366,60 +3782,52 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-scope/5.1.1: + /eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - /eslint-scope/7.2.1: - resolution: {integrity: sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==} + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - /eslint-utils/2.1.0: - resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} - engines: {node: '>=6'} - dependencies: - eslint-visitor-keys: 1.3.0 - dev: true - - /eslint-utils/3.0.0_eslint@8.45.0: + /eslint-utils@3.0.0(eslint@8.46.0): resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.45.0 + eslint: 8.46.0 eslint-visitor-keys: 2.1.0 dev: true - /eslint-visitor-keys/1.3.0: - resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} - engines: {node: '>=4'} - dev: true - - /eslint-visitor-keys/2.1.0: + /eslint-visitor-keys@2.1.0: resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} engines: {node: '>=10'} dev: true - /eslint-visitor-keys/3.4.1: + /eslint-visitor-keys@3.4.1: resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - /eslint/8.45.0: - resolution: {integrity: sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==} + /eslint-visitor-keys@3.4.2: + resolution: {integrity: sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + /eslint@8.46.0: + resolution: {integrity: sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.45.0 - '@eslint-community/regexpp': 4.4.0 - '@eslint/eslintrc': 2.1.0 - '@eslint/js': 8.44.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + '@eslint-community/regexpp': 4.6.2 + '@eslint/eslintrc': 2.1.1 + '@eslint/js': 8.46.0 '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -3429,8 +3837,8 @@ packages: debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.1 - eslint-visitor-keys: 3.4.1 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.2 espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 @@ -3456,53 +3864,49 @@ packages: transitivePeerDependencies: - supports-color - /espree/9.6.1: + /espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.10.0 - acorn-jsx: 5.3.2_acorn@8.10.0 + acorn-jsx: 5.3.2(acorn@8.10.0) eslint-visitor-keys: 3.4.1 - /esprima/4.0.1: + /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true dev: true - /espurify/2.1.1: - resolution: {integrity: sha512-zttWvnkhcDyGOhSH4vO2qCBILpdCMv/MX8lp4cqgRkQoDRGK2oZxi2GfWhlP2dIXmk7BaKeOTuzbHhyC68o8XQ==} - dev: true - - /esquery/1.5.0: + /esquery@1.5.0: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} dependencies: estraverse: 5.3.0 - /esrecurse/4.3.0: + /esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} dependencies: estraverse: 5.3.0 - /estraverse/4.3.0: + /estraverse@4.3.0: resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} engines: {node: '>=4.0'} - /estraverse/5.3.0: + /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} - /estree-walker/2.0.2: + /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} dev: true - /esutils/2.0.3: + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - /execa/5.1.1: + /execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} dependencies: @@ -3517,7 +3921,7 @@ packages: strip-final-newline: 2.0.0 dev: true - /execa/7.1.1: + /execa@7.1.1: resolution: {integrity: sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==} engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} dependencies: @@ -3532,14 +3936,14 @@ packages: strip-final-newline: 3.0.0 dev: true - /expand-tilde/2.0.2: + /expand-tilde@2.0.2: resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==} engines: {node: '>=0.10.0'} dependencies: homedir-polyfill: 1.0.3 dev: true - /external-editor/3.1.0: + /external-editor@3.1.0: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} dependencies: @@ -3548,18 +3952,18 @@ packages: tmp: 0.0.33 dev: true - /fast-deep-equal/3.1.3: + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - /fast-diff/1.2.0: + /fast-diff@1.2.0: resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} dev: true - /fast-equals/4.0.3: + /fast-equals@4.0.3: resolution: {integrity: sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg==} dev: true - /fast-glob/3.3.0: + /fast-glob@3.3.0: resolution: {integrity: sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==} engines: {node: '>=8.6.0'} dependencies: @@ -3569,32 +3973,32 @@ packages: merge2: 1.4.1 micromatch: 4.0.5 - /fast-json-stable-stringify/2.1.0: + /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - /fast-levenshtein/2.0.6: + /fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - /fastq/1.15.0: + /fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: reusify: 1.0.4 - /figures/2.0.0: + /figures@2.0.0: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} dependencies: escape-string-regexp: 1.0.5 dev: true - /figures/3.2.0: + /figures@3.2.0: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} dependencies: escape-string-regexp: 1.0.5 dev: true - /figures/5.0.0: + /figures@5.0.0: resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==} engines: {node: '>=14'} dependencies: @@ -3602,55 +4006,46 @@ packages: is-unicode-supported: 1.3.0 dev: true - /file-entry-cache/6.0.1: + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: flat-cache: 3.0.4 - /fill-range/7.0.1: + /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 - /filter-iterator/0.0.1: + /filter-iterator@0.0.1: resolution: {integrity: sha512-v4lhL7Qa8XpbW3LN46CEnmhGk3eHZwxfNl5at20aEkreesht4YKb/Ba3BUIbnPhAC/r3dmu7ABaGk6MAvh2alA==} dev: true - /filter-obj/1.1.0: + /filter-obj@1.1.0: resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==} engines: {node: '>=0.10.0'} dev: true - /find-cache-dir/3.3.2: - resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} - engines: {node: '>=8'} - dependencies: - commondir: 1.0.1 - make-dir: 3.1.0 - pkg-dir: 4.2.0 - dev: true - - /find-node-modules/2.1.3: + /find-node-modules@2.1.3: resolution: {integrity: sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==} dependencies: findup-sync: 4.0.0 merge: 2.1.1 dev: true - /find-root/1.1.0: + /find-root@1.1.0: resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} dev: true - /find-up/2.1.0: + /find-up@2.1.0: resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} engines: {node: '>=4'} dependencies: locate-path: 2.0.0 dev: true - /find-up/4.1.0: + /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} dependencies: @@ -3658,14 +4053,14 @@ packages: path-exists: 4.0.0 dev: true - /find-up/5.0.0: + /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - /find-up/6.3.0: + /find-up@6.3.0: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: @@ -3673,14 +4068,14 @@ packages: path-exists: 5.0.0 dev: true - /find-versions/5.1.0: + /find-versions@5.1.0: resolution: {integrity: sha512-+iwzCJ7C5v5KgcBuueqVoNiHVoQpwiUK5XFLjf0affFTep+Wcw93tPvmb8tqujDNmzhBDPddnWV/qgWSXgq+Hg==} engines: {node: '>=12'} dependencies: semver-regex: 4.0.5 dev: true - /findup-sync/4.0.0: + /findup-sync@4.0.0: resolution: {integrity: sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==} engines: {node: '>= 8'} dependencies: @@ -3690,23 +4085,23 @@ packages: resolve-dir: 1.0.1 dev: true - /flat-cache/3.0.4: + /flat-cache@3.0.4: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: flatted: 3.2.7 rimraf: 3.0.2 - /flatted/3.2.7: + /flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} - /for-each/0.3.3: + /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 dev: true - /foreground-child/2.0.0: + /foreground-child@2.0.0: resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} engines: {node: '>=8.0.0'} dependencies: @@ -3714,7 +4109,7 @@ packages: signal-exit: 3.0.7 dev: true - /foreground-child/3.1.1: + /foreground-child@3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} dependencies: @@ -3722,18 +4117,14 @@ packages: signal-exit: 4.0.2 dev: true - /from2/2.3.0: + /from2@2.3.0: resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} dependencies: inherits: 2.0.4 readable-stream: 2.3.8 dev: true - /fromentries/1.3.2: - resolution: {integrity: sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==} - dev: true - - /fs-extra/11.1.0: + /fs-extra@11.1.0: resolution: {integrity: sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==} engines: {node: '>=14.14'} dependencies: @@ -3742,7 +4133,7 @@ packages: universalify: 2.0.0 dev: true - /fs-extra/9.1.0: + /fs-extra@9.1.0: resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} engines: {node: '>=10'} dependencies: @@ -3752,10 +4143,10 @@ packages: universalify: 2.0.0 dev: true - /fs.realpath/1.0.0: + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - /fsevents/2.3.2: + /fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] @@ -3763,89 +4154,97 @@ packages: dev: true optional: true - /function-bind/1.1.1: + /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true - /function.prototype.name/1.1.5: + /function.prototype.name@1.1.5: resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.1 + es-abstract: 1.22.1 functions-have-names: 1.2.3 dev: true - /functions-have-names/1.2.3: + /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true - /gensequence/5.0.2: + /gensequence@5.0.2: resolution: {integrity: sha512-JlKEZnFc6neaeSVlkzBGGgkIoIaSxMgvdamRoPN8r3ozm2r9dusqxeKqYQ7lhzmj2UhFQP8nkyfCaiLQxiLrDA==} engines: {node: '>=14'} dev: true - /gensync/1.0.0-beta.2: + /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} dev: true - /get-caller-file/2.0.5: + /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} dev: true - /get-intrinsic/1.2.0: - resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} + /get-func-name@2.0.0: + resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} + dev: true + + /get-intrinsic@1.2.0: + resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} + dependencies: + function-bind: 1.1.1 + has: 1.0.3 + has-symbols: 1.0.3 + dev: true + + /get-intrinsic@1.2.1: + resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: function-bind: 1.1.1 has: 1.0.3 + has-proto: 1.0.1 has-symbols: 1.0.3 dev: true - /get-package-type/0.1.0: - resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} - engines: {node: '>=8.0.0'} - dev: true - - /get-stdin/8.0.0: + /get-stdin@8.0.0: resolution: {integrity: sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==} engines: {node: '>=10'} dev: true - /get-stdin/9.0.0: + /get-stdin@9.0.0: resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==} engines: {node: '>=12'} dev: true - /get-stream/6.0.1: + /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} dev: true - /get-stream/7.0.1: + /get-stream@7.0.1: resolution: {integrity: sha512-3M8C1EOFN6r8AMUhwUAACIoXZJEOufDU5+0gFFN5uNs6XYOralD2Pqkl7m046va6x77FwposWXbAhPPIOus7mQ==} engines: {node: '>=16'} dev: true - /get-symbol-description/1.0.0: + /get-symbol-description@1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 dev: true - /get-tsconfig/4.5.0: + /get-tsconfig@4.5.0: resolution: {integrity: sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==} dev: true - /git-hooks-list/3.1.0: + /git-hooks-list@3.1.0: resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==} dev: true - /git-log-parser/1.2.0: + /git-log-parser@1.2.0: resolution: {integrity: sha512-rnCVNfkTL8tdNryFuaY0fYiBWEBcgF748O6ZI61rslBvr2o7U65c2/6npCRqH40vuAhtgtDiqLTJjBVdrejCzA==} dependencies: argv-formatter: 1.0.0 @@ -3856,7 +4255,7 @@ packages: traverse: 0.6.7 dev: true - /git-raw-commits/2.0.11: + /git-raw-commits@2.0.11: resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} engines: {node: '>=10'} hasBin: true @@ -3868,19 +4267,19 @@ packages: through2: 4.0.2 dev: true - /glob-parent/5.1.2: + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} dependencies: is-glob: 4.0.3 - /glob-parent/6.0.2: + /glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 - /glob/10.2.7: + /glob@10.2.7: resolution: {integrity: sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==} engines: {node: '>=16 || 14 >=14.17'} hasBin: true @@ -3892,7 +4291,7 @@ packages: path-scurry: 1.10.1 dev: true - /glob/10.3.3: + /glob@10.3.3: resolution: {integrity: sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==} engines: {node: '>=16 || 14 >=14.17'} hasBin: true @@ -3904,7 +4303,7 @@ packages: path-scurry: 1.10.1 dev: true - /glob/7.2.3: + /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: fs.realpath: 1.0.0 @@ -3914,7 +4313,7 @@ packages: once: 1.4.0 path-is-absolute: 1.0.1 - /glob/8.1.0: + /glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} dependencies: @@ -3925,14 +4324,14 @@ packages: once: 1.4.0 dev: true - /global-dirs/0.1.1: + /global-dirs@0.1.1: resolution: {integrity: sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==} engines: {node: '>=4'} dependencies: ini: 1.3.8 dev: true - /global-modules/1.0.0: + /global-modules@1.0.0: resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==} engines: {node: '>=0.10.0'} dependencies: @@ -3941,7 +4340,7 @@ packages: resolve-dir: 1.0.1 dev: true - /global-prefix/1.0.2: + /global-prefix@1.0.2: resolution: {integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==} engines: {node: '>=0.10.0'} dependencies: @@ -3952,29 +4351,29 @@ packages: which: 1.3.1 dev: true - /globals/11.12.0: + /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} dev: true - /globals/13.20.0: + /globals@13.20.0: resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 - /globalthis/1.0.3: + /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} dependencies: define-properties: 1.2.0 dev: true - /globalyzer/0.1.0: + /globalyzer@0.1.0: resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} dev: true - /globby/11.1.0: + /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} dependencies: @@ -3985,7 +4384,18 @@ packages: merge2: 1.4.1 slash: 3.0.0 - /globby/13.2.2: + /globby@13.1.3: + resolution: {integrity: sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + dir-glob: 3.0.1 + fast-glob: 3.3.0 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 4.0.0 + dev: true + + /globby@13.2.2: resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: @@ -3996,24 +4406,24 @@ packages: slash: 4.0.0 dev: true - /globrex/0.1.2: + /globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} dev: true - /gopd/1.0.1: + /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 dev: true - /graceful-fs/4.2.10: + /graceful-fs@4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true - /graphemer/1.4.0: + /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - /handlebars/4.7.7: + /handlebars@4.7.7: resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==} engines: {node: '>=0.4.7'} hasBin: true @@ -4026,106 +4436,98 @@ packages: uglify-js: 3.17.4 dev: true - /hard-rejection/2.1.0: + /hard-rejection@2.1.0: resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} engines: {node: '>=6'} dev: true - /has-bigints/1.0.2: + /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true - /has-flag/3.0.0: + /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} dev: true - /has-flag/4.0.0: + /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - /has-own-prop/2.0.0: + /has-own-prop@2.0.0: resolution: {integrity: sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==} engines: {node: '>=8'} dev: true - /has-own-property/0.1.0: + /has-own-property@0.1.0: resolution: {integrity: sha512-14qdBKoonU99XDhWcFKZTShK+QV47qU97u8zzoVo9cL5TZ3BmBHXogItSt9qJjR0KUMFRhcCW8uGIGl8nkl7Aw==} dev: true - /has-property-descriptors/1.0.0: + /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 dev: true - /has-proto/1.0.1: + /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} dev: true - /has-symbols/1.0.3: + /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} dev: true - /has-tostringtag/1.0.0: + /has-tostringtag@1.0.0: resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true - /has/1.0.3: + /has@1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} dependencies: function-bind: 1.1.1 dev: true - /hasha/5.2.2: - resolution: {integrity: sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==} - engines: {node: '>=8'} - dependencies: - is-stream: 2.0.1 - type-fest: 0.8.1 - dev: true - - /homedir-polyfill/1.0.3: + /homedir-polyfill@1.0.3: resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} engines: {node: '>=0.10.0'} dependencies: parse-passwd: 1.0.0 dev: true - /hook-std/3.0.0: + /hook-std@3.0.0: resolution: {integrity: sha512-jHRQzjSDzMtFy34AGj1DN+vq54WVuhSvKgrHf0OMiFQTwDD4L/qqofVEWjLOBMTn5+lCD3fPg32W9yOfnEJTTw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /hosted-git-info/2.8.9: + /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true - /hosted-git-info/4.1.0: + /hosted-git-info@4.1.0: resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} engines: {node: '>=10'} dependencies: lru-cache: 6.0.0 dev: true - /hosted-git-info/6.1.1: + /hosted-git-info@6.1.1: resolution: {integrity: sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: lru-cache: 7.18.3 dev: true - /html-escaper/2.0.2: + /html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true - /http-proxy-agent/7.0.0: + /http-proxy-agent@7.0.0: resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==} engines: {node: '>= 14'} dependencies: @@ -4135,7 +4537,7 @@ packages: - supports-color dev: true - /https-proxy-agent/7.0.1: + /https-proxy-agent@7.0.1: resolution: {integrity: sha512-Eun8zV0kcYS1g19r78osiQLEFIRspRUDd9tIfBCTBPBeMieF/EsJNL8VI3xOIdYRDEkjQnqOYPsZ2DsWsVsFwQ==} engines: {node: '>= 14'} dependencies: @@ -4145,100 +4547,90 @@ packages: - supports-color dev: true - /human-signals/2.1.0: + /human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} dev: true - /human-signals/4.3.0: + /human-signals@4.3.0: resolution: {integrity: sha512-zyzVyMjpGBX2+6cDVZeFPCdtOtdsxOeseRhB9tkQ6xXmGUNrcnBzdEKPy3VPNYz+4gy1oukVOXcrJCunSyc6QQ==} engines: {node: '>=14.18.0'} dev: true - /husky/8.0.3: + /husky@8.0.3: resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==} engines: {node: '>=14'} hasBin: true dev: true - /iconv-lite/0.4.24: + /iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 dev: true - /identity-function/1.0.0: + /identity-function@1.0.0: resolution: {integrity: sha512-kNrgUK0qI+9qLTBidsH85HjDLpZfrrS0ElquKKe/fJFdB3D7VeKdXXEvOPDUHSHOzdZKCAAaQIWWyp0l2yq6pw==} dev: true - /ieee754/1.2.1: + /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true - /ignore-by-default/2.1.0: - resolution: {integrity: sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==} - engines: {node: '>=10 <11 || >=12 <13 || >=14'} - dev: true - - /ignore/5.2.4: + /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} - /import-fresh/3.3.0: + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 - /import-from/4.0.0: + /import-from@4.0.0: resolution: {integrity: sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==} engines: {node: '>=12.2'} dev: true - /import-meta-resolve/2.2.2: + /import-meta-resolve@2.2.2: resolution: {integrity: sha512-f8KcQ1D80V7RnqVm+/lirO9zkOxjGxhaTC1IPrBGd3MEfNgmNG67tSUO9gTi2F3Blr2Az6g1vocaxzkVnWl9MA==} dev: true - /import-modules/2.1.0: - resolution: {integrity: sha512-8HEWcnkbGpovH9yInoisxaSoIg9Brbul+Ju3Kqe2UsYDUBJD/iQjSgEj0zPcTDPKfPp2fs5xlv1i+JSye/m1/A==} - engines: {node: '>=8'} - dev: true - - /imurmurhash/0.1.4: + /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - /indent-string/4.0.0: + /indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} dev: true - /indent-string/5.0.0: + /indent-string@5.0.0: resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} engines: {node: '>=12'} dev: true - /inflight/1.0.6: + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: once: 1.4.0 wrappy: 1.0.2 - /inherits/2.0.4: + /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - /ini/1.3.8: + /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} dev: true - /ini/3.0.1: + /ini@3.0.1: resolution: {integrity: sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} dev: true - /inquirer/8.2.5: + /inquirer@8.2.5: resolution: {integrity: sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==} engines: {node: '>=12.0.0'} dependencies: @@ -4259,16 +4651,16 @@ packages: wrap-ansi: 7.0.0 dev: true - /internal-slot/1.0.5: + /internal-slot@1.0.5: resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 has: 1.0.3 side-channel: 1.0.4 dev: true - /into-stream/7.0.0: + /into-stream@7.0.0: resolution: {integrity: sha512-2dYz766i9HprMBasCMvHMuazJ7u4WzhJwo5kb3iPSiW/iRYV6uPari3zHoqZlnuaR7V1bEiNMxikhp37rdBXbw==} engines: {node: '>=12'} dependencies: @@ -4276,48 +4668,43 @@ packages: p-is-promise: 3.0.0 dev: true - /irregular-plurals/3.4.1: - resolution: {integrity: sha512-JR7VL+1Kd9z79bE+2uSgifpzrTwLWmTvyeUewhxZCHVtpPImAsLk4adfRxg86uvdsJ8etYYrpzN7vRT30gGnOA==} - engines: {node: '>=8'} - dev: true - - /is-alphabetical/1.0.4: + /is-alphabetical@1.0.4: resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} dev: true - /is-alphanumerical/1.0.4: + /is-alphanumerical@1.0.4: resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} dependencies: is-alphabetical: 1.0.4 is-decimal: 1.0.4 dev: true - /is-array-buffer/3.0.2: + /is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 is-typed-array: 1.1.10 dev: true - /is-arrayish/0.2.1: + /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true - /is-bigint/1.0.4: + /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: has-bigints: 1.0.2 dev: true - /is-binary-path/2.1.0: + /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} dependencies: binary-extensions: 2.2.0 dev: true - /is-boolean-object/1.1.2: + /is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} dependencies: @@ -4325,151 +4712,154 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-builtin-module/3.2.1: + /is-builtin-module@3.2.1: resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} engines: {node: '>=6'} dependencies: builtin-modules: 3.3.0 dev: true - /is-callable/1.2.7: + /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} dev: true - /is-core-module/2.11.0: + /is-core-module@2.11.0: resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} dependencies: has: 1.0.3 dev: true - /is-date-object/1.0.5: + /is-core-module@2.12.1: + resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} + dependencies: + has: 1.0.3 + dev: true + + /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 dev: true - /is-decimal/1.0.4: + /is-decimal@1.0.4: resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} dev: true - /is-docker/2.2.1: + /is-docker@2.2.1: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} hasBin: true dev: true - /is-error/2.2.2: - resolution: {integrity: sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==} - dev: true - - /is-extglob/2.1.1: + /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - /is-fullwidth-code-point/3.0.0: + /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} dev: true - /is-fullwidth-code-point/4.0.0: + /is-fullwidth-code-point@4.0.0: resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} engines: {node: '>=12'} dev: true - /is-glob/4.0.3: + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 - /is-hexadecimal/1.0.4: + /is-hexadecimal@1.0.4: resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} dev: true - /is-immutable-type/1.2.5_kfc54qcd2qvnqhc4ipdxkc5nfy: - resolution: {integrity: sha512-g4jIDuO6GniCVCQy+ypA9BD9L7SplQJtGjr4QjF1DfxnMn9S5vBj9xuMjfhBkTCKuctw2ErM/ZRJn+NBRMLQHQ==} + /is-immutable-type@1.2.9(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-DDx04RjLpGNT4vtF49vGW5CECP6lAx8SL2keq99ogIxwLvJPBvgThdhb43ED5uYO4nq0kZ51tMj7VdCCQgdZ5Q==} + peerDependencies: + eslint: '*' + typescript: '>=4.7.4' + dependencies: + '@typescript-eslint/type-utils': 5.62.0(eslint@8.46.0)(typescript@5.1.6) + eslint: 8.46.0 + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + dev: true + + /is-immutable-type@2.0.1(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-SNO0yWLzSN+oYb8adM4AvsPYSCqElmjcXUNemryDLo0r5M54oMs/6R4cvKLc9QtIs/nRuc3ahlgJoMdGfcHLwQ==} peerDependencies: - '@typescript-eslint/type-utils': '>=5.30.5' - '@typescript-eslint/utils': '>=5.30.5' + eslint: '*' typescript: '>=4.7.4' dependencies: - '@typescript-eslint/type-utils': 5.62.0_ko3fmmbeyij36muomfgt2u76xu - '@typescript-eslint/utils': 5.62.0_ko3fmmbeyij36muomfgt2u76xu + '@typescript-eslint/type-utils': 6.0.0(eslint@8.46.0)(typescript@5.1.6) + eslint: 8.46.0 + ts-api-utils: 1.0.1(typescript@5.1.6) typescript: 5.1.6 + transitivePeerDependencies: + - supports-color dev: false - /is-interactive/1.0.0: + /is-interactive@1.0.0: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} dev: true - /is-iterable/1.1.1: + /is-iterable@1.1.1: resolution: {integrity: sha512-EdOZCr0NsGE00Pot+x1ZFx9MJK3C6wy91geZpXwvwexDLJvA4nzYyZf7r+EIwSeVsOLDdBz7ATg9NqKTzuNYuQ==} engines: {node: '>= 4'} dev: true - /is-module/1.0.0: - resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - dev: true - - /is-negative-zero/2.0.2: + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} dev: true - /is-number-object/1.0.7: + /is-number-object@1.0.7: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 dev: true - /is-number/4.0.0: + /is-number@4.0.0: resolution: {integrity: sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==} engines: {node: '>=0.10.0'} dev: true - /is-number/7.0.0: + /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - /is-obj/2.0.0: + /is-obj@2.0.0: resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} engines: {node: '>=8'} dev: true - /is-path-inside/3.0.3: + /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} - /is-plain-obj/1.1.0: + /is-plain-obj@1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} dev: true - /is-plain-obj/4.1.0: + /is-plain-obj@4.1.0: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} dev: true - /is-plain-object/5.0.0: + /is-plain-object@5.0.0: resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} engines: {node: '>=0.10.0'} dev: true - /is-promise/4.0.0: - resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} - dev: true - - /is-reference/1.2.1: - resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} - dependencies: - '@types/estree': 1.0.0 - dev: true - - /is-regex/1.1.4: + /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} dependencies: @@ -4477,44 +4867,44 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-shared-array-buffer/1.0.2: + /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: call-bind: 1.0.2 dev: true - /is-stream/2.0.1: + /is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} dev: true - /is-stream/3.0.0: + /is-stream@3.0.0: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /is-string/1.0.7: + /is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 dev: true - /is-symbol/1.0.4: + /is-symbol@1.0.4: resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true - /is-text-path/1.0.1: + /is-text-path@1.0.1: resolution: {integrity: sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==} engines: {node: '>=0.10.0'} dependencies: text-extensions: 1.9.0 dev: true - /is-typed-array/1.1.10: + /is-typed-array@1.1.10: resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} engines: {node: '>= 0.4'} dependencies: @@ -4525,50 +4915,54 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-typedarray/1.0.0: + /is-typedarray@1.0.0: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: true - /is-unicode-supported/0.1.0: + /is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} dev: true - /is-unicode-supported/1.3.0: + /is-unicode-supported@1.3.0: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} dev: true - /is-utf8/0.2.1: + /is-utf8@0.2.1: resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} dev: true - /is-weakref/1.0.2: + /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.2 dev: true - /is-windows/1.0.2: + /is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} dev: true - /is-wsl/2.2.0: + /is-wsl@2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} dependencies: is-docker: 2.2.1 dev: true - /isarray/1.0.0: + /isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} dev: true - /isexe/2.0.0: + /isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: true + + /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - /issue-parser/6.0.0: + /issue-parser@6.0.0: resolution: {integrity: sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA==} engines: {node: '>=10.13'} dependencies: @@ -4579,76 +4973,34 @@ packages: lodash.uniqby: 4.7.0 dev: true - /istanbul-lib-coverage/3.2.0: + /istanbul-lib-coverage@3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} engines: {node: '>=8'} dev: true - /istanbul-lib-hook/3.0.0: - resolution: {integrity: sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==} - engines: {node: '>=8'} - dependencies: - append-transform: 2.0.0 - dev: true - - /istanbul-lib-instrument/4.0.3: - resolution: {integrity: sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==} - engines: {node: '>=8'} - dependencies: - '@babel/core': 7.22.9 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.0 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - - /istanbul-lib-processinfo/2.0.3: - resolution: {integrity: sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==} - engines: {node: '>=8'} - dependencies: - archy: 1.0.0 - cross-spawn: 7.0.3 - istanbul-lib-coverage: 3.2.0 - p-map: 3.0.0 - rimraf: 3.0.2 - uuid: 8.3.2 - dev: true - - /istanbul-lib-report/3.0.0: - resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==} - engines: {node: '>=8'} - dependencies: - istanbul-lib-coverage: 3.2.0 - make-dir: 3.1.0 - supports-color: 7.2.0 - dev: true - - /istanbul-lib-source-maps/4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + /istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} engines: {node: '>=10'} dependencies: - debug: 4.3.4 istanbul-lib-coverage: 3.2.0 - source-map: 0.6.1 - transitivePeerDependencies: - - supports-color + make-dir: 4.0.0 + supports-color: 7.2.0 dev: true - /istanbul-reports/3.1.5: - resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} + /istanbul-reports@3.1.6: + resolution: {integrity: sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==} engines: {node: '>=8'} dependencies: html-escaper: 2.0.2 - istanbul-lib-report: 3.0.0 + istanbul-lib-report: 3.0.1 dev: true - /iterable-lookahead/1.0.0: + /iterable-lookahead@1.0.0: resolution: {integrity: sha512-hJnEP2Xk4+44DDwJqUQGdXal5VbyeWLaPyDl2AQc242Zr7iqz4DgpQOrEzglWVMGHMDCkguLHEKxd1+rOsmgSQ==} engines: {node: '>=4'} dev: true - /jackspeak/2.2.1: + /jackspeak@2.2.1: resolution: {integrity: sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==} engines: {node: '>=14'} dependencies: @@ -4657,12 +5009,22 @@ packages: '@pkgjs/parseargs': 0.11.0 dev: true - /java-properties/1.0.2: + /java-properties@1.0.2: resolution: {integrity: sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ==} engines: {node: '>= 0.6.0'} dev: true - /jest-diff/29.6.1: + /jest-diff@29.5.0: + resolution: {integrity: sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + chalk: 4.1.2 + diff-sequences: 29.4.3 + jest-get-type: 29.4.3 + pretty-format: 29.5.0 + dev: true + + /jest-diff@29.6.1: resolution: {integrity: sha512-FsNCvinvl8oVxpNLttNQX7FAq7vR+gMDGj90tiP7siWw1UdakWUGqrylpsYrpvj908IYckm5Y0Q7azNAozU1Kg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: @@ -4672,110 +5034,93 @@ packages: pretty-format: 29.6.1 dev: true - /jest-get-type/29.4.3: + /jest-get-type@29.4.3: resolution: {integrity: sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /jiti/1.19.1: + /jiti@1.19.1: resolution: {integrity: sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==} hasBin: true dev: true - /js-string-escape/1.0.1: - resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} - engines: {node: '>= 0.8'} - dev: true - - /js-tokens/4.0.0: + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true - /js-yaml/3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - dev: true - - /js-yaml/4.1.0: + /js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true dependencies: argparse: 2.0.1 - /jsdoc-type-pratt-parser/4.0.0: + /jsdoc-type-pratt-parser@4.0.0: resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} engines: {node: '>=12.0.0'} dev: true - /jsesc/0.5.0: + /jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true dev: true - /jsesc/2.5.2: + /jsesc@2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} hasBin: true dev: true - /jsesc/3.0.2: + /jsesc@3.0.2: resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} engines: {node: '>=6'} hasBin: true dev: true - /json-parse-better-errors/1.0.2: + /json-parse-better-errors@1.0.2: resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} dev: true - /json-parse-even-better-errors/2.3.1: + /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true - /json-parse-even-better-errors/3.0.0: + /json-parse-even-better-errors@3.0.0: resolution: {integrity: sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true - /json-schema-traverse/0.4.1: + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - /json-schema-traverse/1.0.0: + /json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} dev: true - /json-schema/0.4.0: - resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - dev: true - - /json-stable-stringify-without-jsonify/1.0.1: + /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - /json-stringify-safe/5.0.1: + /json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} dev: true - /json5/1.0.2: + /json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true dependencies: minimist: 1.2.8 dev: true - /json5/2.2.3: + /json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true dev: true - /jsonc-parser/3.2.0: + /jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true - /jsonfile/6.1.0: + /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: universalify: 2.0.0 @@ -4783,18 +5128,18 @@ packages: graceful-fs: 4.2.10 dev: true - /jsonparse/1.3.1: + /jsonparse@1.3.1: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} engines: {'0': node >= 0.2.0} dev: true - /kind-of/6.0.3: + /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} dev: true - /knip/2.16.1: - resolution: {integrity: sha512-c09jhMEDOXm5i985QoDpcWqbDQ6c50IOPvWCUQe8rU1jXn+AUo92l9cJNe72eR3tUZ11ldXv7UPboaWMrpOWfA==} + /knip@2.17.1: + resolution: {integrity: sha512-+pW9RT91f0mM8/iNCy5VOYaLiponmDW2nIOBKPX1JLOvdvfolrsEKLPiNUB9Rza2tOqQYoR25yK86Ty6W7QCiQ==} engines: {node: '>=16.17.0 <17 || >=18.6.0'} hasBin: true dependencies: @@ -4814,37 +5159,37 @@ packages: summary: 2.1.0 typescript: 5.1.6 zod: 3.21.4 - zod-validation-error: 1.3.1_zod@3.21.4 + zod-validation-error: 1.3.1(zod@3.21.4) dev: true - /levn/0.4.1: + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 - /lilconfig/2.1.0: + /lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} dev: true - /lines-and-columns/1.2.4: + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true - /lines-and-columns/2.0.3: + /lines-and-columns@2.0.3: resolution: {integrity: sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /linkify-it/4.0.1: + /linkify-it@4.0.1: resolution: {integrity: sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==} dependencies: uc.micro: 1.0.6 dev: true - /lint-staged/13.2.3: + /lint-staged@13.2.3: resolution: {integrity: sha512-zVVEXLuQIhr1Y7R7YAWx4TZLdvuzk7DnmrsTNL0fax6Z3jrpFcas+vKbzxhhvp6TA55m1SQuWkpzI1qbfDZbAg==} engines: {node: ^14.13.1 || >=16.0.0} hasBin: true @@ -4867,7 +5212,7 @@ packages: - supports-color dev: true - /listr2/5.0.7: + /listr2@5.0.7: resolution: {integrity: sha512-MD+qXHPmtivrHIDRwPYdfNkrzqDiuaKU/rfBcec3WMyMF3xylQj3jMq344OtvQxz7zaCFViRAeqlr2AFhPvXHw==} engines: {node: ^14.13.1 || >=16.0.0} peerDependencies: @@ -4886,7 +5231,7 @@ packages: wrap-ansi: 7.0.0 dev: true - /load-json-file/4.0.0: + /load-json-file@4.0.0: resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} engines: {node: '>=4'} dependencies: @@ -4896,12 +5241,12 @@ packages: strip-bom: 3.0.0 dev: true - /load-json-file/7.0.1: - resolution: {integrity: sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + /local-pkg@0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} + engines: {node: '>=14'} dev: true - /locate-path/2.0.0: + /locate-path@2.0.0: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} engines: {node: '>=4'} dependencies: @@ -4909,106 +5254,102 @@ packages: path-exists: 3.0.0 dev: true - /locate-path/5.0.0: + /locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} dependencies: p-locate: 4.1.0 dev: true - /locate-path/6.0.0: + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} dependencies: p-locate: 5.0.0 - /locate-path/7.2.0: + /locate-path@7.2.0: resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: p-locate: 6.0.0 dev: true - /lodash-es/4.17.21: + /lodash-es@4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} dev: true - /lodash.camelcase/4.3.0: + /lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} dev: true - /lodash.capitalize/4.2.1: + /lodash.capitalize@4.2.1: resolution: {integrity: sha512-kZzYOKspf8XVX5AvmQF94gQW0lejFVgb80G85bU4ZWzoJ6C03PQg3coYAUpSTpQWelrZELd3XWgHzw4Ck5kaIw==} dev: true - /lodash.curry/4.1.1: + /lodash.curry@4.1.1: resolution: {integrity: sha512-/u14pXGviLaweY5JI0IUzgzF2J6Ne8INyzAZjImcryjgkZ+ebruBxy2/JaOOkTqScddcYtakjhSaeemV8lR0tA==} dev: true - /lodash.escaperegexp/4.1.2: + /lodash.escaperegexp@4.1.2: resolution: {integrity: sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==} dev: true - /lodash.flattendeep/4.4.0: - resolution: {integrity: sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==} - dev: true - - /lodash.isfunction/3.0.9: + /lodash.isfunction@3.0.9: resolution: {integrity: sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==} dev: true - /lodash.ismatch/4.4.0: + /lodash.ismatch@4.4.0: resolution: {integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==} dev: true - /lodash.isplainobject/4.0.6: + /lodash.isplainobject@4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} dev: true - /lodash.isstring/4.0.1: + /lodash.isstring@4.0.1: resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} dev: true - /lodash.kebabcase/4.1.1: + /lodash.kebabcase@4.1.1: resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} dev: true - /lodash.map/4.6.0: + /lodash.map@4.6.0: resolution: {integrity: sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q==} dev: true - /lodash.merge/4.6.2: + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - /lodash.mergewith/4.6.2: + /lodash.mergewith@4.6.2: resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==} dev: true - /lodash.snakecase/4.1.1: + /lodash.snakecase@4.1.1: resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} dev: true - /lodash.startcase/4.4.0: + /lodash.startcase@4.4.0: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} dev: true - /lodash.uniq/4.5.0: + /lodash.uniq@4.5.0: resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} dev: true - /lodash.uniqby/4.7.0: + /lodash.uniqby@4.7.0: resolution: {integrity: sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==} dev: true - /lodash.upperfirst/4.3.1: + /lodash.upperfirst@4.3.1: resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} dev: true - /lodash/4.17.21: + /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true - /log-symbols/4.1.0: + /log-symbols@4.1.0: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} engines: {node: '>=10'} dependencies: @@ -5016,7 +5357,7 @@ packages: is-unicode-supported: 0.1.0 dev: true - /log-update/4.0.0: + /log-update@4.0.0: resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==} engines: {node: '>=10'} dependencies: @@ -5026,86 +5367,92 @@ packages: wrap-ansi: 6.2.0 dev: true - /longest/2.0.1: + /longest@2.0.1: resolution: {integrity: sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q==} engines: {node: '>=0.10.0'} dev: true - /lower-case/2.0.2: + /loupe@2.3.6: + resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} + dependencies: + get-func-name: 2.0.0 + dev: true + + /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.6.0 + tslib: 2.6.1 dev: true - /lru-cache/10.0.0: + /lru-cache@10.0.0: resolution: {integrity: sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==} engines: {node: 14 || >=16.14} dev: true - /lru-cache/5.1.1: + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: yallist: 3.1.1 dev: true - /lru-cache/6.0.0: + /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} dependencies: yallist: 4.0.0 - /lru-cache/7.18.3: + /lru-cache@7.18.3: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} dev: true - /magic-string/0.16.0: + /magic-string@0.16.0: resolution: {integrity: sha512-c4BEos3y6G2qO0B9X7K0FVLOPT9uGrjYwYRLFmDqyl5YMboUviyecnXWp94fJTSMwPw2/sf+CEYt5AGpmklkkQ==} dependencies: vlq: 0.2.3 dev: true - /magic-string/0.27.0: - resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} + /magic-string@0.30.1: + resolution: {integrity: sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==} engines: {node: '>=12'} dependencies: - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /make-dir/3.1.0: + /make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} dependencies: semver: 6.3.1 dev: true - /make-error/1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + /make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + dependencies: + semver: 7.5.4 dev: true - /map-age-cleaner/0.1.3: - resolution: {integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==} - engines: {node: '>=6'} - dependencies: - p-defer: 1.0.0 + /make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: true - /map-obj/1.0.1: + /map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} engines: {node: '>=0.10.0'} dev: true - /map-obj/2.0.0: + /map-obj@2.0.0: resolution: {integrity: sha512-TzQSV2DiMYgoF5RycneKVUzIa9bQsj/B3tTgsE3dOGqlzHnGIDaC7XBE7grnA+8kZPnfqSGFe95VHc2oc0VFUQ==} engines: {node: '>=4'} dev: true - /map-obj/4.3.0: + /map-obj@4.3.0: resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} engines: {node: '>=8'} dev: true - /markdown-it/13.0.1: + /markdown-it@13.0.1: resolution: {integrity: sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==} hasBin: true dependencies: @@ -5116,11 +5463,11 @@ packages: uc.micro: 1.0.6 dev: true - /markdown-table/3.0.3: + /markdown-table@3.0.3: resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} dev: true - /markdownlint-cli/0.35.0: + /markdownlint-cli@0.35.0: resolution: {integrity: sha512-lVIIIV1MrUtjoocgDqXLxUCxlRbn7Ve8rsWppfwciUNwLlNS28AhNiyQ3PU7jjj4Qvj+rWTTvwkqg7AcdG988g==} engines: {node: '>=16'} hasBin: true @@ -5136,12 +5483,12 @@ packages: run-con: 1.2.11 dev: true - /markdownlint-micromark/0.1.5: + /markdownlint-micromark@0.1.5: resolution: {integrity: sha512-HvofNU4QCvfUCWnocQP1IAWaqop5wpWrB0mKB6SSh0fcpV0PdmQNS6tdUuFew1utpYlUvYYzz84oDkrD76GB9A==} engines: {node: '>=16'} dev: true - /markdownlint/0.29.0: + /markdownlint@0.29.0: resolution: {integrity: sha512-ASAzqpODstu/Qsk0xW5BPgWnK/qjpBQ4e7IpsSvvFXcfYIjanLTdwFRJK1SIEEh0fGSMKXcJf/qhaZYHyME0wA==} engines: {node: '>=16'} dependencies: @@ -5149,7 +5496,7 @@ packages: markdownlint-micromark: 0.1.5 dev: true - /marked-terminal/5.1.1_marked@5.1.1: + /marked-terminal@5.1.1(marked@5.1.1): resolution: {integrity: sha512-+cKTOx9P4l7HwINYhzbrBSyzgxO2HaHKGZGuB1orZsMIgXYaJyfidT81VXRdpelW/PcHEWxywscePVgI/oUF6g==} engines: {node: '>=14.13.1 || >=16.0.0'} peerDependencies: @@ -5164,27 +5511,13 @@ packages: supports-hyperlinks: 2.3.0 dev: true - /marked/5.1.1: + /marked@5.1.1: resolution: {integrity: sha512-bTmmGdEINWmOMDjnPWDxGPQ4qkDLeYorpYbEtFOXzOruTwUE671q4Guiuchn4N8h/v6NGd7916kXsm3Iz4iUSg==} engines: {node: '>= 18'} hasBin: true dev: true - /matcher/5.0.0: - resolution: {integrity: sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - escape-string-regexp: 5.0.0 - dev: true - - /md5-hex/3.0.1: - resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} - engines: {node: '>=8'} - dependencies: - blueimp-md5: 2.19.0 - dev: true - - /mdast-util-from-markdown/0.8.5: + /mdast-util-from-markdown@0.8.5: resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} dependencies: '@types/mdast': 3.0.10 @@ -5196,23 +5529,15 @@ packages: - supports-color dev: true - /mdast-util-to-string/2.0.0: + /mdast-util-to-string@2.0.0: resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} dev: true - /mdurl/1.0.1: + /mdurl@1.0.1: resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} dev: true - /mem/9.0.2: - resolution: {integrity: sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==} - engines: {node: '>=12.20'} - dependencies: - map-age-cleaner: 0.1.3 - mimic-fn: 4.0.0 - dev: true - - /meow/8.1.2: + /meow@8.1.2: resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} engines: {node: '>=10'} dependencies: @@ -5229,23 +5554,19 @@ packages: yargs-parser: 20.2.9 dev: true - /merge-stream/2.0.0: + /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true - /merge/2.1.1: - resolution: {integrity: sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==} - dev: true - - /merge2/1.4.1: + /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - /micro-spelling-correcter/1.1.1: - resolution: {integrity: sha512-lkJ3Rj/mtjlRcHk6YyCbvZhyWTOzdBvTHsxMmZSk5jxN1YyVSQ+JETAom55mdzfcyDrY/49Z7UCW760BK30crg==} + /merge@2.1.1: + resolution: {integrity: sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==} dev: true - /micromark/2.11.4: + /micromark@2.11.4: resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} dependencies: debug: 4.3.4 @@ -5254,54 +5575,54 @@ packages: - supports-color dev: true - /micromatch/4.0.5: + /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} dependencies: braces: 3.0.2 picomatch: 2.3.1 - /mime/3.0.0: + /mime@3.0.0: resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} engines: {node: '>=10.0.0'} hasBin: true dev: true - /mimic-fn/2.1.0: + /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} dev: true - /mimic-fn/4.0.0: + /mimic-fn@4.0.0: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} dev: true - /min-indent/1.0.1: + /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} dev: true - /minimatch/3.1.2: + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 - /minimatch/5.1.6: + /minimatch@5.1.6: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 dev: true - /minimatch/9.0.3: + /minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} dependencies: brace-expansion: 2.0.1 dev: true - /minimist-options/4.1.0: + /minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} dependencies: @@ -5310,64 +5631,84 @@ packages: kind-of: 6.0.3 dev: true - /minimist/1.2.7: + /minimist@1.2.7: resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} dev: true - /minimist/1.2.8: + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true - /minipass/5.0.0: + /minipass@5.0.0: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} engines: {node: '>=8'} dev: true - /modify-values/1.0.1: + /mlly@1.4.0: + resolution: {integrity: sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg==} + dependencies: + acorn: 8.10.0 + pathe: 1.1.1 + pkg-types: 1.0.3 + ufo: 1.1.2 + dev: true + + /modify-values@1.0.1: resolution: {integrity: sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==} engines: {node: '>=0.10.0'} dev: true - /ms/2.1.2: + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - /ms/2.1.3: + /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true - /mute-stream/0.0.8: + /mute-stream@0.0.8: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} dev: true - /natural-compare-lite/1.4.0: + /mylas@2.1.13: + resolution: {integrity: sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg==} + engines: {node: '>=12.0.0'} + dev: true + + /nanoid@3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} dev: true - /natural-compare/1.4.0: + /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - /neo-async/2.6.2: + /neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true - /nerf-dart/1.0.0: + /nerf-dart@1.0.0: resolution: {integrity: sha512-EZSPZB70jiVsivaBLYDCyntd5eH8NTSMOn3rB+HxwdmKThGELLdYv8qVIMWvZEFy9w8ZZpW9h9OB32l1rGtj7g==} dev: true - /no-case/3.0.4: + /no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.6.0 + tslib: 2.6.1 dev: true - /node-emoji/1.11.0: + /node-emoji@1.11.0: resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==} dependencies: lodash: 4.17.21 dev: true - /node-fetch/2.6.9: + /node-fetch@2.6.9: resolution: {integrity: sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==} engines: {node: 4.x || >=6.0.0} peerDependencies: @@ -5379,81 +5720,69 @@ packages: whatwg-url: 5.0.0 dev: true - /node-preload/0.2.1: - resolution: {integrity: sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==} - engines: {node: '>=8'} - dependencies: - process-on-spawn: 1.0.0 - dev: true - - /node-releases/2.0.13: + /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} dev: true - /nofilter/3.1.0: - resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} - engines: {node: '>=12.19'} - dev: true - - /normalize-package-data/2.5.0: + /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.1 + resolve: 1.22.2 semver: 5.7.1 validate-npm-package-license: 3.0.4 dev: true - /normalize-package-data/3.0.3: + /normalize-package-data@3.0.3: resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} engines: {node: '>=10'} dependencies: hosted-git-info: 4.1.0 - is-core-module: 2.11.0 + is-core-module: 2.12.1 semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true - /normalize-package-data/5.0.0: + /normalize-package-data@5.0.0: resolution: {integrity: sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: hosted-git-info: 6.1.1 - is-core-module: 2.11.0 + is-core-module: 2.12.1 semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true - /normalize-path/3.0.0: + /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} dev: true - /normalize-url/8.0.0: + /normalize-url@8.0.0: resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==} engines: {node: '>=14.16'} dev: true - /npm-normalize-package-bin/3.0.0: + /npm-normalize-package-bin@3.0.0: resolution: {integrity: sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true - /npm-run-path/4.0.1: + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} dependencies: path-key: 3.1.1 dev: true - /npm-run-path/5.1.0: + /npm-run-path@5.1.0: resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: path-key: 4.0.0 dev: true - /npm/9.6.2: + /npm@9.6.2: resolution: {integrity: sha512-TnXoXhlFkH/9wI4+aXSq0aPLwKG7Ge17t1ME4/rQt+0DZWQCRk9PwhBuX/shqdUiHeKicSLSkzWx+QZgTRE+/A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true @@ -5526,61 +5855,25 @@ packages: - which - write-file-atomic - /nyc/15.1.0: - resolution: {integrity: sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==} - engines: {node: '>=8.9'} - hasBin: true - dependencies: - '@istanbuljs/load-nyc-config': 1.1.0 - '@istanbuljs/schema': 0.1.3 - caching-transform: 4.0.0 - convert-source-map: 1.9.0 - decamelize: 1.2.0 - find-cache-dir: 3.3.2 - find-up: 4.1.0 - foreground-child: 2.0.0 - get-package-type: 0.1.0 - glob: 7.2.3 - istanbul-lib-coverage: 3.2.0 - istanbul-lib-hook: 3.0.0 - istanbul-lib-instrument: 4.0.3 - istanbul-lib-processinfo: 2.0.3 - istanbul-lib-report: 3.0.0 - istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.5 - make-dir: 3.1.0 - node-preload: 0.2.1 - p-map: 3.0.0 - process-on-spawn: 1.0.0 - resolve-from: 5.0.0 - rimraf: 3.0.2 - signal-exit: 3.0.7 - spawn-wrap: 2.0.0 - test-exclude: 6.0.0 - yargs: 15.4.1 - transitivePeerDependencies: - - supports-color - dev: true - - /object-inspect/1.12.3: + /object-inspect@1.12.3: resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} dev: true - /object-keys/1.1.1: + /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} dev: true - /object-pairs/0.1.0: + /object-pairs@0.1.0: resolution: {integrity: sha512-3ECr6K831I4xX/Mduxr9UC+HPOz/d6WKKYj9p4cmC8Lg8p7g8gitzsxNX5IWlSIgFWN/a4JgrJaoAMKn20oKwA==} dev: true - /object-values/1.0.0: + /object-values@1.0.0: resolution: {integrity: sha512-+8hwcz/JnQ9EpLIXzN0Rs7DLsBpJNT/xYehtB/jU93tHYr5BFEO8E+JGQNOSqE7opVzz5cGksKFHt7uUJVLSjQ==} engines: {node: '>=0.10.0'} dev: true - /object.assign/4.1.4: + /object.assign@4.1.4: resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} engines: {node: '>= 0.4'} dependencies: @@ -5590,7 +5883,25 @@ packages: object-keys: 1.1.1 dev: true - /object.values/1.1.6: + /object.fromentries@2.0.6: + resolution: {integrity: sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.1 + dev: true + + /object.groupby@1.0.0: + resolution: {integrity: sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + get-intrinsic: 1.2.1 + dev: true + + /object.values@1.1.6: resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} engines: {node: '>= 0.4'} dependencies: @@ -5599,26 +5910,26 @@ packages: es-abstract: 1.21.1 dev: true - /once/1.4.0: + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 - /onetime/5.1.2: + /onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} dependencies: mimic-fn: 2.1.0 dev: true - /onetime/6.0.0: + /onetime@6.0.0: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} dependencies: mimic-fn: 4.0.0 dev: true - /open/8.4.2: + /open@8.4.2: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} dependencies: @@ -5627,7 +5938,7 @@ packages: is-wsl: 2.2.0 dev: true - /optionator/0.9.3: + /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} dependencies: @@ -5638,7 +5949,7 @@ packages: prelude-ls: 1.2.1 type-check: 0.4.0 - /ora/5.4.1: + /ora@5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} dependencies: @@ -5653,164 +5964,130 @@ packages: wcwidth: 1.0.1 dev: true - /os-tmpdir/1.0.2: + /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} dev: true - /p-defer/1.0.0: - resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} - engines: {node: '>=4'} - dev: true - - /p-each-series/3.0.0: + /p-each-series@3.0.0: resolution: {integrity: sha512-lastgtAdoH9YaLyDa5i5z64q+kzOcQHsQ5SsZJD3q0VEyI8mq872S3geuNbRUQLVAE9siMfgKrpj7MloKFHruw==} engines: {node: '>=12'} dev: true - /p-event/5.0.1: - resolution: {integrity: sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - p-timeout: 5.1.0 - dev: true - - /p-filter/3.0.0: + /p-filter@3.0.0: resolution: {integrity: sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: p-map: 5.5.0 dev: true - /p-is-promise/3.0.0: + /p-is-promise@3.0.0: resolution: {integrity: sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==} engines: {node: '>=8'} dev: true - /p-limit/1.3.0: + /p-limit@1.3.0: resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} engines: {node: '>=4'} dependencies: p-try: 1.0.0 dev: true - /p-limit/2.3.0: + /p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} dependencies: p-try: 2.2.0 dev: true - /p-limit/3.1.0: + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 - /p-limit/4.0.0: + /p-limit@4.0.0: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: yocto-queue: 1.0.0 dev: true - /p-locate/2.0.0: + /p-locate@2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} engines: {node: '>=4'} dependencies: p-limit: 1.3.0 dev: true - /p-locate/4.1.0: + /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} dependencies: p-limit: 2.3.0 dev: true - /p-locate/5.0.0: + /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} dependencies: p-limit: 3.1.0 - /p-locate/6.0.0: + /p-locate@6.0.0: resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: p-limit: 4.0.0 dev: true - /p-map/3.0.0: - resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} - engines: {node: '>=8'} - dependencies: - aggregate-error: 3.1.0 - dev: true - - /p-map/4.0.0: + /p-map@4.0.0: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} dependencies: aggregate-error: 3.1.0 dev: true - /p-map/5.5.0: + /p-map@5.5.0: resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} engines: {node: '>=12'} dependencies: aggregate-error: 4.0.1 dev: true - /p-reduce/2.1.0: + /p-reduce@2.1.0: resolution: {integrity: sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==} engines: {node: '>=8'} dev: true - /p-reduce/3.0.0: + /p-reduce@3.0.0: resolution: {integrity: sha512-xsrIUgI0Kn6iyDYm9StOpOeK29XM1aboGji26+QEortiFST1hGZaUQOLhtEbqHErPpGW/aSz6allwK2qcptp0Q==} engines: {node: '>=12'} dev: true - /p-timeout/5.1.0: - resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==} - engines: {node: '>=12'} - dev: true - - /p-try/1.0.0: + /p-try@1.0.0: resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} engines: {node: '>=4'} dev: true - /p-try/2.2.0: + /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} dev: true - /package-hash/4.0.0: - resolution: {integrity: sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==} - engines: {node: '>=8'} - dependencies: - graceful-fs: 4.2.10 - hasha: 5.2.2 - lodash.flattendeep: 4.4.0 - release-zalgo: 1.0.0 - dev: true - - /parent-module/1.0.1: + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} dependencies: callsites: 3.1.0 - /parent-module/2.0.0: + /parent-module@2.0.0: resolution: {integrity: sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==} engines: {node: '>=8'} dependencies: callsites: 3.1.0 dev: true - /parse-entities/2.0.0: + /parse-entities@2.0.0: resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} dependencies: character-entities: 1.2.4 @@ -5821,7 +6098,7 @@ packages: is-hexadecimal: 1.0.4 dev: true - /parse-json/4.0.0: + /parse-json@4.0.0: resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} engines: {node: '>=4'} dependencies: @@ -5829,7 +6106,7 @@ packages: json-parse-better-errors: 1.0.2 dev: true - /parse-json/5.2.0: + /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: @@ -5839,59 +6116,59 @@ packages: lines-and-columns: 1.2.4 dev: true - /parse-json/7.0.0: + /parse-json@7.0.0: resolution: {integrity: sha512-kP+TQYAzAiVnzOlWOe0diD6L35s9bJh0SCn95PIbZFKrOYuIRQsQkeWEYxzVDuHTt9V9YqvYCJ2Qo4z9wdfZPw==} engines: {node: '>=16'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.21.4 error-ex: 1.3.2 json-parse-even-better-errors: 3.0.0 lines-and-columns: 2.0.3 - type-fest: 3.13.1 + type-fest: 3.13.0 dev: true - /parse-ms/3.0.0: + /parse-ms@3.0.0: resolution: {integrity: sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==} engines: {node: '>=12'} dev: true - /parse-passwd/1.0.0: + /parse-passwd@1.0.0: resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} engines: {node: '>=0.10.0'} dev: true - /path-exists/3.0.0: + /path-exists@3.0.0: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} dev: true - /path-exists/4.0.0: + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - /path-exists/5.0.0: + /path-exists@5.0.0: resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /path-is-absolute/1.0.1: + /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} - /path-key/3.1.1: + /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - /path-key/4.0.0: + /path-key@4.0.0: resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} engines: {node: '>=12'} dev: true - /path-parse/1.0.7: + /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true - /path-scurry/1.10.1: + /path-scurry@1.10.1: resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} dependencies: @@ -5899,37 +6176,45 @@ packages: minipass: 5.0.0 dev: true - /path-type/3.0.0: + /path-type@3.0.0: resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} engines: {node: '>=4'} dependencies: pify: 3.0.0 dev: true - /path-type/4.0.0: + /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - /picocolors/1.0.0: + /pathe@1.1.1: + resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} + dev: true + + /pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: true + + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true - /picomatch/2.3.1: + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - /pidtree/0.6.0: + /pidtree@0.6.0: resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} engines: {node: '>=0.10'} hasBin: true dev: true - /pify/3.0.0: + /pify@3.0.0: resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} engines: {node: '>=4'} dev: true - /pkg-conf/2.1.0: + /pkg-conf@2.1.0: resolution: {integrity: sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g==} engines: {node: '>=4'} dependencies: @@ -5937,52 +6222,46 @@ packages: load-json-file: 4.0.0 dev: true - /pkg-conf/4.0.0: - resolution: {integrity: sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + /pkg-types@1.0.3: + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} dependencies: - find-up: 6.3.0 - load-json-file: 7.0.1 + jsonc-parser: 3.2.0 + mlly: 1.4.0 + pathe: 1.1.1 dev: true - /pkg-dir/4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} + /plimit-lit@1.5.0: + resolution: {integrity: sha512-Eb/MqCb1Iv/ok4m1FqIXqvUKPISufcjZ605hl3KM/n8GaX8zfhtgdLwZU3vKjuHGh2O9Rjog/bHTq8ofIShdng==} dependencies: - find-up: 4.1.0 + queue-lit: 1.5.0 dev: true - /pkg-dir/5.0.0: - resolution: {integrity: sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==} - engines: {node: '>=10'} - dependencies: - find-up: 5.0.0 + /pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} dev: true - /plur/5.1.0: - resolution: {integrity: sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + /postcss@8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} dependencies: - irregular-plurals: 3.4.1 - dev: true - - /pluralize/8.0.0: - resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} - engines: {node: '>=4'} + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 dev: true - /prelude-ls/1.2.1: + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - /prettier-linter-helpers/1.0.0: + /prettier-linter-helpers@1.0.0: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} dependencies: fast-diff: 1.2.0 dev: true - /prettier-plugin-packagejson/2.4.5_prettier@2.8.8: + /prettier-plugin-packagejson@2.4.5(prettier@3.0.0): resolution: {integrity: sha512-glG71jE1gO3y5+JNAhC8X+4yrlN28rub6Aj461SKbaPie9RgMiHKcInH2Moi2VGOfkTXaEHBhg4uVMBqa+kBUA==} peerDependencies: prettier: '>= 1.16.0' @@ -5990,18 +6269,27 @@ packages: prettier: optional: true dependencies: - prettier: 2.8.8 + prettier: 3.0.0 sort-package-json: 2.5.1 synckit: 0.8.5 dev: true - /prettier/2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} + /prettier@3.0.0: + resolution: {integrity: sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==} + engines: {node: '>=14'} hasBin: true dev: true - /pretty-format/29.6.1: + /pretty-format@29.5.0: + resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.6.0 + ansi-styles: 5.2.0 + react-is: 18.2.0 + dev: true + + /pretty-format@29.6.1: resolution: {integrity: sha512-7jRj+yXO0W7e4/tSJKoR7HRIHLPPjtNaUGG2xxKQnGvPNRkgWcQ0AZX6P4KBRJN4FcTBWb3sa7DVUJmocYuoog==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: @@ -6010,46 +6298,43 @@ packages: react-is: 18.2.0 dev: true - /pretty-ms/8.0.0: + /pretty-ms@8.0.0: resolution: {integrity: sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==} engines: {node: '>=14.16'} dependencies: parse-ms: 3.0.0 dev: true - /process-nextick-args/2.0.1: + /process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true - /process-on-spawn/1.0.0: - resolution: {integrity: sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==} - engines: {node: '>=8'} - dependencies: - fromentries: 1.3.2 - dev: true - - /proto-list/1.2.4: + /proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} dev: true - /punycode/2.3.0: + /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} - /q/1.5.1: + /q@1.5.1: resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} engines: {node: '>=0.6.0', teleport: '>=0.2.0'} dev: true - /queue-microtask/1.2.3: + /queue-lit@1.5.0: + resolution: {integrity: sha512-IslToJ4eiCEE9xwMzq3viOO5nH8sUWUCwoElrhNMozzr9IIt2qqvB4I+uHu/zJTQVqc9R5DFwok4ijNK1pU3fA==} + dev: true + + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - /quick-lru/4.0.1: + /quick-lru@4.0.1: resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} engines: {node: '>=8'} dev: true - /rc/1.2.8: + /rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true dependencies: @@ -6059,11 +6344,11 @@ packages: strip-json-comments: 2.0.1 dev: true - /react-is/18.2.0: + /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true - /read-package-json-fast/3.0.2: + /read-package-json-fast@3.0.2: resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: @@ -6071,16 +6356,16 @@ packages: npm-normalize-package-bin: 3.0.0 dev: true - /read-pkg-up/10.0.0: + /read-pkg-up@10.0.0: resolution: {integrity: sha512-jgmKiS//w2Zs+YbX039CorlkOp8FIVbSAN8r8GJHDsGlmNPXo+VeHkqAwCiQVTTx5/LwLZTcEw59z3DvcLbr0g==} engines: {node: '>=16'} dependencies: find-up: 6.3.0 read-pkg: 8.0.0 - type-fest: 3.13.1 + type-fest: 3.13.0 dev: true - /read-pkg-up/7.0.1: + /read-pkg-up@7.0.1: resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} engines: {node: '>=8'} dependencies: @@ -6089,7 +6374,7 @@ packages: type-fest: 0.8.1 dev: true - /read-pkg/3.0.0: + /read-pkg@3.0.0: resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} engines: {node: '>=4'} dependencies: @@ -6098,7 +6383,7 @@ packages: path-type: 3.0.0 dev: true - /read-pkg/5.2.0: + /read-pkg@5.2.0: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} dependencies: @@ -6108,17 +6393,17 @@ packages: type-fest: 0.6.0 dev: true - /read-pkg/8.0.0: + /read-pkg@8.0.0: resolution: {integrity: sha512-Ajb9oSjxXBw0YyOiwtQ2dKbAA/vMnUPnY63XcCk+mXo0BwIdQEMgZLZiMWGttQHcUhUgbK0mH85ethMPKXxziw==} engines: {node: '>=16'} dependencies: '@types/normalize-package-data': 2.4.1 normalize-package-data: 5.0.0 parse-json: 7.0.0 - type-fest: 3.13.1 + type-fest: 3.8.0 dev: true - /readable-stream/2.3.8: + /readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} dependencies: core-util-is: 1.0.3 @@ -6130,7 +6415,7 @@ packages: util-deprecate: 1.0.2 dev: true - /readable-stream/3.6.1: + /readable-stream@3.6.1: resolution: {integrity: sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==} engines: {node: '>= 6'} dependencies: @@ -6139,14 +6424,14 @@ packages: util-deprecate: 1.0.2 dev: true - /readdirp/3.6.0: + /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 dev: true - /redent/3.0.0: + /redent@3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} dependencies: @@ -6154,18 +6439,23 @@ packages: strip-indent: 3.0.0 dev: true - /redeyed/2.1.1: + /redeyed@2.1.1: resolution: {integrity: sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==} dependencies: esprima: 4.0.1 dev: true - /regexp-tree/0.1.27: + /regexp-tree@0.1.24: + resolution: {integrity: sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==} + hasBin: true + dev: true + + /regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true dev: true - /regexp.prototype.flags/1.4.3: + /regexp.prototype.flags@1.4.3: resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} engines: {node: '>= 0.4'} dependencies: @@ -6174,38 +6464,35 @@ packages: functions-have-names: 1.2.3 dev: true - /regexpp/3.2.0: - resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} - engines: {node: '>=8'} + /regexp.prototype.flags@1.5.0: + resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + functions-have-names: 1.2.3 dev: true - /registry-auth-token/5.0.2: + /registry-auth-token@5.0.2: resolution: {integrity: sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==} engines: {node: '>=14'} dependencies: '@pnpm/npm-conf': 2.1.0 dev: true - /regjsparser/0.10.0: + /regjsparser@0.10.0: resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} hasBin: true dependencies: jsesc: 0.5.0 dev: true - /release-zalgo/1.0.0: - resolution: {integrity: sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==} - engines: {node: '>=4'} - dependencies: - es6-error: 4.1.1 - dev: true - - /repeat-string/1.6.1: + /repeat-string@1.6.1: resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} engines: {node: '>=0.10'} dev: true - /replace-in-file/7.0.1: + /replace-in-file@7.0.1: resolution: {integrity: sha512-KbhgPq04eA+TxXuUxpgWIH9k/TjF+28ofon2PXP7vq6izAILhxOtksCVcLuuQLtyjouBaPdlH6RJYYcSPVxCOA==} engines: {node: '>=10'} hasBin: true @@ -6215,28 +6502,17 @@ packages: yargs: 17.7.2 dev: true - /require-directory/2.1.1: + /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} dev: true - /require-from-string/2.0.2: + /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} dev: true - /require-main-filename/2.0.0: - resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - dev: true - - /resolve-cwd/3.0.0: - resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} - engines: {node: '>=8'} - dependencies: - resolve-from: 5.0.0 - dev: true - - /resolve-dir/1.0.1: + /resolve-dir@1.0.1: resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==} engines: {node: '>=0.10.0'} dependencies: @@ -6244,32 +6520,50 @@ packages: global-modules: 1.0.0 dev: true - /resolve-from/4.0.0: + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} - /resolve-from/5.0.0: + /resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} dev: true - /resolve-global/1.0.0: + /resolve-global@1.0.0: resolution: {integrity: sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==} engines: {node: '>=8'} dependencies: global-dirs: 0.1.1 dev: true - /resolve/1.22.1: + /resolve@1.22.1: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true dependencies: - is-core-module: 2.11.0 + is-core-module: 2.12.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /resolve@1.22.2: + resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} + hasBin: true + dependencies: + is-core-module: 2.12.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /resolve@1.22.3: + resolution: {integrity: sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==} + hasBin: true + dependencies: + is-core-module: 2.12.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true - /restore-cursor/3.1.0: + /restore-cursor@3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} dependencies: @@ -6277,25 +6571,25 @@ packages: signal-exit: 3.0.7 dev: true - /reusify/1.0.4: + /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - /reverse-arguments/1.0.0: + /reverse-arguments@1.0.0: resolution: {integrity: sha512-/x8uIPdTafBqakK0TmPNJzgkLP+3H+yxpUJhCQHsLBg1rYEVNR2D8BRYNWQhVBjyOd7oo1dZRVzIkwMY2oqfYQ==} dev: true - /rfdc/1.3.0: + /rfdc@1.3.0: resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} dev: true - /rimraf/3.0.2: + /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true dependencies: glob: 7.2.3 - /rimraf/5.0.1: + /rimraf@5.0.1: resolution: {integrity: sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==} engines: {node: '>=14'} hasBin: true @@ -6303,7 +6597,7 @@ packages: glob: 10.3.3 dev: true - /rollup-plugin-auto-external/2.0.0_rollup@3.26.3: + /rollup-plugin-auto-external@2.0.0(rollup@3.27.0): resolution: {integrity: sha512-HQM3ZkZYfSam1uoZtAB9sK26EiAsfs1phrkf91c/YX+S07wugyRXSigBxrIwiLr5EPPilKYmoMxsrnlGBsXnuQ==} engines: {node: '>=6'} peerDependencies: @@ -6311,25 +6605,25 @@ packages: dependencies: builtins: 2.0.1 read-pkg: 3.0.0 - rollup: 3.26.3 + rollup: 3.27.0 safe-resolve: 1.0.0 semver: 5.7.1 dev: true - /rollup/3.26.3: - resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==} + /rollup@3.27.0: + resolution: {integrity: sha512-aOltLCrYZ0FhJDm7fCqwTjIUEVjWjcydKBV/Zeid6Mn8BWgDCUBBWT5beM5ieForYNo/1ZHuGJdka26kvQ3Gzg==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: fsevents: 2.3.2 dev: true - /run-async/2.4.1: + /run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} dev: true - /run-con/1.2.11: + /run-con@1.2.11: resolution: {integrity: sha512-NEMGsUT+cglWkzEr4IFK21P4Jca45HqiAbIIZIBdX5+UZTB24Mb/21iNGgz9xZa8tL6vbW7CXmq7MFN42+VjNQ==} hasBin: true dependencies: @@ -6339,51 +6633,73 @@ packages: strip-json-comments: 3.1.1 dev: true - /run-parallel/1.2.0: + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 - /rxjs/7.8.0: + /rxjs@7.8.0: resolution: {integrity: sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==} dependencies: - tslib: 2.6.0 + tslib: 2.6.1 + dev: true + + /safe-array-concat@1.0.0: + resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + isarray: 2.0.5 dev: true - /safe-buffer/5.1.2: + /safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} dev: true - /safe-buffer/5.2.1: + /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true - /safe-regex-test/1.0.0: + /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 is-regex: 1.1.4 dev: true - /safe-resolve/1.0.0: + /safe-resolve@1.0.0: resolution: {integrity: sha512-aQpRvfxoi1y0UxKEU0tNO327kb0/LMo8Xrk64M2u172UqOOLCCM0khxN2OTClDiTqTJz5864GMD1X92j4YiHTg==} dev: true - /safer-buffer/2.1.2: + /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true - /semantic-release/21.0.7: + /semantic-release-replace-plugin@1.2.7(semantic-release@21.0.7): + resolution: {integrity: sha512-BfFQVnfC8O7+NpyfjWZuQQEkXwxf1ABbGEQuXqMsrBi7ItCnkSlO3mwuqUllxxuh1WgKx5oYKMVhmZJ0aMaqVQ==} + engines: {node: '>=18'} + peerDependencies: + semantic-release: '>=20.1.0' + dependencies: + jest-diff: 29.6.1 + lodash-es: 4.17.21 + replace-in-file: 7.0.1 + semantic-release: 21.0.7 + dev: true + + /semantic-release@21.0.7: resolution: {integrity: sha512-peRDSXN+hF8EFSKzze90ff/EnAmgITHQ/a3SZpRV3479ny0BIZWEJ33uX6/GlOSKdaSxo9hVRDyv2/u2MuF+Bw==} engines: {node: '>=18'} hasBin: true dependencies: - '@semantic-release/commit-analyzer': 10.0.1_semantic-release@21.0.7 + '@semantic-release/commit-analyzer': 10.0.1(semantic-release@21.0.7) '@semantic-release/error': 4.0.0 - '@semantic-release/github': 9.0.4_semantic-release@21.0.7 - '@semantic-release/npm': 10.0.4_semantic-release@21.0.7 - '@semantic-release/release-notes-generator': 11.0.4_semantic-release@21.0.7 + '@semantic-release/github': 9.0.4(semantic-release@21.0.7) + '@semantic-release/npm': 10.0.4(semantic-release@21.0.7) + '@semantic-release/release-notes-generator': 11.0.4(semantic-release@21.0.7) aggregate-error: 4.0.1 cosmiconfig: 8.1.0 debug: 4.3.4 @@ -6397,7 +6713,7 @@ packages: hosted-git-info: 6.1.1 lodash-es: 4.17.21 marked: 5.1.1 - marked-terminal: 5.1.1_marked@5.1.1 + marked-terminal: 5.1.1(marked@5.1.1) micromatch: 4.0.5 p-each-series: 3.0.0 p-reduce: 3.0.0 @@ -6411,29 +6727,29 @@ packages: - supports-color dev: true - /semver-diff/4.0.0: + /semver-diff@4.0.0: resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} engines: {node: '>=12'} dependencies: semver: 7.5.4 dev: true - /semver-regex/4.0.5: + /semver-regex@4.0.5: resolution: {integrity: sha512-hunMQrEy1T6Jr2uEVjrAIqjwWcQTgOAcIM52C8MY1EZSD3DDNft04XzvYKPqjED65bNVVko0YI38nYeEHCX3yw==} engines: {node: '>=12'} dev: true - /semver/5.7.1: + /semver@5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true dev: true - /semver/6.3.1: + /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true dev: true - /semver/7.5.2: + /semver@7.5.2: resolution: {integrity: sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==} engines: {node: '>=10'} hasBin: true @@ -6441,56 +6757,49 @@ packages: lru-cache: 6.0.0 dev: true - /semver/7.5.4: + /semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} hasBin: true dependencies: lru-cache: 6.0.0 - /serialize-error/7.0.1: - resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} - engines: {node: '>=10'} - dependencies: - type-fest: 0.13.1 - dev: true - - /set-blocking/2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - dev: true - - /shebang-command/2.0.0: + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} dependencies: shebang-regex: 3.0.0 - /shebang-regex/3.0.0: + /shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - /shell-quote-word/1.0.1: + /shell-quote-word@1.0.1: resolution: {integrity: sha512-lT297f1WLAdq0A4O+AknIFRP6kkiI3s8C913eJ0XqBxJbZPGWUNkRQk2u8zk4bEAjUJ5i+fSLwB6z1HzeT+DEg==} dev: true - /side-channel/1.0.4: + /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.1 object-inspect: 1.12.3 dev: true - /signal-exit/3.0.7: + /siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + dev: true + + /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true - /signal-exit/4.0.2: + /signal-exit@4.0.2: resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==} engines: {node: '>=14'} dev: true - /signale/1.4.0: + /signale@1.4.0: resolution: {integrity: sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==} engines: {node: '>=6'} dependencies: @@ -6499,16 +6808,16 @@ packages: pkg-conf: 2.1.0 dev: true - /slash/3.0.0: + /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} - /slash/4.0.0: + /slash@4.0.0: resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} engines: {node: '>=12'} dev: true - /slice-ansi/3.0.0: + /slice-ansi@3.0.0: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} engines: {node: '>=8'} dependencies: @@ -6517,7 +6826,7 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true - /slice-ansi/4.0.0: + /slice-ansi@4.0.0: resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} engines: {node: '>=10'} dependencies: @@ -6526,7 +6835,7 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true - /slice-ansi/5.0.0: + /slice-ansi@5.0.0: resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} engines: {node: '>=12'} dependencies: @@ -6534,11 +6843,11 @@ packages: is-fullwidth-code-point: 4.0.0 dev: true - /sort-object-keys/1.1.3: + /sort-object-keys@1.1.3: resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} dev: true - /sort-package-json/2.5.1: + /sort-package-json@2.5.1: resolution: {integrity: sha512-vx/KoZxm8YNMUqdlw7SGTfqR5pqZ/sUfgOuRtDILiOy/3AvzhAibyUe2cY3OpLs3oRSow9up4yLVtQaM24rbDQ==} hasBin: true dependencies: @@ -6551,91 +6860,81 @@ packages: sort-object-keys: 1.1.3 dev: true - /source-map/0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} dev: true - /spawn-error-forwarder/1.0.0: - resolution: {integrity: sha512-gRjMgK5uFjbCvdibeGJuy3I5OYz6VLoVdsOJdA6wV0WlfQVLFueoqMxwwYD9RODdgb6oUIvlRlsyFSiQkMKu0g==} + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} dev: true - /spawn-wrap/2.0.0: - resolution: {integrity: sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==} - engines: {node: '>=8'} - dependencies: - foreground-child: 2.0.0 - is-windows: 1.0.2 - make-dir: 3.1.0 - rimraf: 3.0.2 - signal-exit: 3.0.7 - which: 2.0.2 + /spawn-error-forwarder@1.0.0: + resolution: {integrity: sha512-gRjMgK5uFjbCvdibeGJuy3I5OYz6VLoVdsOJdA6wV0WlfQVLFueoqMxwwYD9RODdgb6oUIvlRlsyFSiQkMKu0g==} dev: true - /spdx-correct/3.2.0: + /spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: spdx-expression-parse: 3.0.1 spdx-license-ids: 3.0.12 dev: true - /spdx-exceptions/2.3.0: + /spdx-exceptions@2.3.0: resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} dev: true - /spdx-expression-parse/3.0.1: + /spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 spdx-license-ids: 3.0.12 dev: true - /spdx-license-ids/3.0.12: + /spdx-license-ids@3.0.12: resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} dev: true - /split/1.0.1: - resolution: {integrity: sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==} - dependencies: - through: 2.3.8 - dev: true - - /split2/1.0.0: + /split2@1.0.0: resolution: {integrity: sha512-NKywug4u4pX/AZBB1FCPzZ6/7O+Xhz1qMVbzTvvKvikjO99oPN87SkK08mEY9P63/5lWjK+wgOOgApnTg5r6qg==} dependencies: through2: 2.0.5 dev: true - /split2/3.2.2: + /split2@3.2.2: resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} dependencies: readable-stream: 3.6.1 dev: true - /sprintf-js/1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + /split@1.0.1: + resolution: {integrity: sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==} + dependencies: + through: 2.3.8 + dev: true + + /stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true - /stack-utils/2.0.6: - resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} - engines: {node: '>=10'} - dependencies: - escape-string-regexp: 2.0.0 + /std-env@3.3.3: + resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==} dev: true - /stream-combiner2/1.1.1: + /stream-combiner2@1.1.1: resolution: {integrity: sha512-3PnJbYgS56AeWgtKF5jtJRT6uFJe56Z0Hc5Ngg/6sI6rIt8iiMBTa9cvdyFfpMQjaVHr8dusbNeFGIIonxOvKw==} dependencies: duplexer2: 0.1.4 readable-stream: 2.3.8 dev: true - /string-argv/0.3.1: + /string-argv@0.3.1: resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==} engines: {node: '>=0.6.19'} dev: true - /string-width/4.2.3: + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} dependencies: @@ -6644,7 +6943,7 @@ packages: strip-ansi: 6.0.1 dev: true - /string-width/5.1.2: + /string-width@5.1.2: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} dependencies: @@ -6653,120 +6952,125 @@ packages: strip-ansi: 7.0.1 dev: true - /string.fromcodepoint/0.2.1: + /string.fromcodepoint@0.2.1: resolution: {integrity: sha512-n69H31OnxSGSZyZbgBlvYIXlrMhJQ0dQAX1js1QDhpaUH6zmU3QYlj07bCwCNlPOu3oRXIubGPl2gDGnHsiCqg==} dev: true - /string.prototype.trimend/1.0.6: + /string.prototype.trim@1.2.7: + resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + dev: true + + /string.prototype.trimend@1.0.6: resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.1 + es-abstract: 1.22.1 dev: true - /string.prototype.trimstart/1.0.6: + /string.prototype.trimstart@1.0.6: resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.1 + es-abstract: 1.22.1 dev: true - /string_decoder/1.1.1: + /string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 dev: true - /string_decoder/1.3.0: + /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 dev: true - /strip-ansi/6.0.1: + /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 - /strip-ansi/7.0.1: + /strip-ansi@7.0.1: resolution: {integrity: sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==} engines: {node: '>=12'} dependencies: ansi-regex: 6.0.1 dev: true - /strip-bom/3.0.0: + /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} dev: true - /strip-bom/4.0.0: + /strip-bom@4.0.0: resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} engines: {node: '>=8'} dev: true - /strip-final-newline/2.0.0: + /strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} dev: true - /strip-final-newline/3.0.0: + /strip-final-newline@3.0.0: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} dev: true - /strip-indent/3.0.0: + /strip-indent@3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} dependencies: min-indent: 1.0.1 dev: true - /strip-json-comments/2.0.1: + /strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} dev: true - /strip-json-comments/3.1.1: + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - /strip-json-comments/5.0.0: + /strip-json-comments@5.0.0: resolution: {integrity: sha512-V1LGY4UUo0jgwC+ELQ2BNWfPa17TIuwBLg+j1AA/9RPzKINl1lhxVEu2r+ZTTO8aetIsUzE5Qj6LMSBkoGYKKw==} engines: {node: '>=14.16'} dev: true - /summary/2.1.0: - resolution: {integrity: sha512-nMIjMrd5Z2nuB2RZCKJfFMjgS3fygbeyGk9PxPPaJR1RIcyN9yn4A63Isovzm3ZtQuEkLBVgMdPup8UeLH7aQw==} + /strip-literal@1.0.1: + resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} + dependencies: + acorn: 8.10.0 dev: true - /supertap/3.0.1: - resolution: {integrity: sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - indent-string: 5.0.0 - js-yaml: 3.14.1 - serialize-error: 7.0.1 - strip-ansi: 7.0.1 + /summary@2.1.0: + resolution: {integrity: sha512-nMIjMrd5Z2nuB2RZCKJfFMjgS3fygbeyGk9PxPPaJR1RIcyN9yn4A63Isovzm3ZtQuEkLBVgMdPup8UeLH7aQw==} dev: true - /supports-color/5.5.0: + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} dependencies: has-flag: 3.0.0 dev: true - /supports-color/7.2.0: + /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} dependencies: has-flag: 4.0.0 - /supports-hyperlinks/2.3.0: + /supports-hyperlinks@2.3.0: resolution: {integrity: sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==} engines: {node: '>=8'} dependencies: @@ -6774,35 +7078,30 @@ packages: supports-color: 7.2.0 dev: true - /supports-preserve-symlinks-flag/1.0.0: + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} dev: true - /synckit/0.8.5: + /synckit@0.8.5: resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} engines: {node: ^14.18.0 || >=16.0.0} dependencies: '@pkgr/utils': 2.3.1 - tslib: 2.6.0 + tslib: 2.6.1 dev: true - /tapable/2.2.1: + /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} dev: true - /temp-dir/2.0.0: + /temp-dir@2.0.0: resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==} engines: {node: '>=8'} dev: true - /temp-dir/3.0.0: - resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} - engines: {node: '>=14.16'} - dev: true - - /tempy/3.0.0: + /tempy@3.0.0: resolution: {integrity: sha512-B2I9X7+o2wOaW4r/CWMkpOO9mdiTRCxXNgob6iGvPmfPWgH/KyUD6Uy5crtWBxIBe3YrNZKR2lSzv1JJKWD4vA==} engines: {node: '>=14.16'} dependencies: @@ -6812,7 +7111,7 @@ packages: unique-string: 3.0.0 dev: true - /test-exclude/6.0.0: + /test-exclude@6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} dependencies: @@ -6821,91 +7120,108 @@ packages: minimatch: 3.1.2 dev: true - /text-extensions/1.9.0: + /text-extensions@1.9.0: resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==} engines: {node: '>=0.10'} dev: true - /text-table/0.2.0: + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - /through/2.3.8: - resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - dev: true - - /through2/2.0.5: + /through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} dependencies: readable-stream: 2.3.8 xtend: 4.0.2 dev: true - /through2/4.0.2: + /through2@4.0.2: resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} dependencies: readable-stream: 3.6.1 dev: true - /time-zone/1.0.0: - resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} - engines: {node: '>=4'} + /through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true - /tiny-glob/0.2.9: + /tiny-glob@0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} dependencies: globalyzer: 0.1.0 globrex: 0.1.2 dev: true - /tmp/0.0.33: + /tinybench@2.5.0: + resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} + dev: true + + /tinypool@0.6.0: + resolution: {integrity: sha512-FdswUUo5SxRizcBc6b1GSuLpLjisa8N8qMyYoP3rl+bym+QauhtJP5bvZY1ytt8krKGmMLYIRl36HBZfeAoqhQ==} + engines: {node: '>=14.0.0'} + dev: true + + /tinyspy@2.1.1: + resolution: {integrity: sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w==} + engines: {node: '>=14.0.0'} + dev: true + + /tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} dependencies: os-tmpdir: 1.0.2 dev: true - /to-fast-properties/2.0.0: + /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} dev: true - /to-no-case/1.0.2: + /to-no-case@1.0.2: resolution: {integrity: sha512-Z3g735FxuZY8rodxV4gH7LxClE4H0hTIyHNIHdk+vpQxjLm0cwnKXq/OFVZ76SOQmto7txVcwSCwkU5kqp+FKg==} dev: true - /to-pascal-case/1.0.0: + /to-pascal-case@1.0.0: resolution: {integrity: sha512-QGMWHqM6xPrcQW57S23c5/3BbYb0Tbe9p+ur98ckRnGDwD4wbbtDiYI38CfmMKNB5Iv0REjs5SNDntTwvDxzZA==} dependencies: to-space-case: 1.0.0 dev: true - /to-regex-range/5.0.1: + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 - /to-space-case/1.0.0: + /to-space-case@1.0.0: resolution: {integrity: sha512-rLdvwXZ39VOn1IxGL3V6ZstoTbwLRckQmn/U8ZDLuWwIXNpuZDhQ3AiRUlhTbOXFVE9C+dR51wM0CBDhk31VcA==} dependencies: to-no-case: 1.0.2 dev: true - /tr46/0.0.3: + /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true - /traverse/0.6.7: + /traverse@0.6.7: resolution: {integrity: sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==} dev: true - /trim-newlines/3.0.1: + /trim-newlines@3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} dev: true - /ts-node/10.9.1_x3tncvpokjah2hm6bxjmp3ih6a: + /ts-api-utils@1.0.1(typescript@5.1.6): + resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.1.6 + + /ts-node@10.9.1(@types/node@16.18.39)(typescript@5.1.6): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -6936,16 +7252,32 @@ packages: yn: 3.1.1 dev: true - /tsc-prog/2.2.1_typescript@5.1.6: - resolution: {integrity: sha512-whYQUQjB+wm9c2FoikigaBVnXesgAjIYXgHrbzlK+Etg9L657a92MSUcbi5hrD/YBaRmjuDcTIQVZmo/f74OZQ==} - engines: {node: '>=8.10'} + /tsc-alias@1.8.7: + resolution: {integrity: sha512-59Q/zUQa3miTf99mLbSqaW0hi1jt4WoG8Uhe5hSZJHQpSoFW9eEwvW7jlKMHXWvT+zrzy3SN9PE/YBhQ+WVydA==} + hasBin: true + dependencies: + chokidar: 3.5.3 + commander: 9.5.0 + globby: 11.1.0 + mylas: 2.1.13 + normalize-path: 3.0.0 + plimit-lit: 1.5.0 + dev: true + + /tsconfck@2.1.2(typescript@5.1.6): + resolution: {integrity: sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==} + engines: {node: ^14.13.1 || ^16 || >=18} + hasBin: true peerDependencies: - typescript: '>=3' + typescript: ^4.3.5 || ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true dependencies: typescript: 5.1.6 dev: true - /tsconfig-paths/3.14.2: + /tsconfig-paths@3.14.2: resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: '@types/json5': 0.0.29 @@ -6954,7 +7286,7 @@ packages: strip-bom: 3.0.0 dev: true - /tsconfig-paths/4.2.0: + /tsconfig-paths@4.2.0: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} dependencies: @@ -6963,14 +7295,15 @@ packages: strip-bom: 3.0.0 dev: true - /tslib/1.14.1: + /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: true - /tslib/2.6.0: - resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} + /tslib@2.6.1: + resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} dev: true - /tsutils/3.21.0_typescript@5.1.6: + /tsutils@3.21.0(typescript@5.1.6): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: @@ -6978,58 +7311,94 @@ packages: dependencies: tslib: 1.14.1 typescript: 5.1.6 + dev: true - /type-check/0.4.0: + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 - /type-fest/0.13.1: - resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} - engines: {node: '>=10'} + /type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} dev: true - /type-fest/0.18.1: + /type-fest@0.18.1: resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} engines: {node: '>=10'} dev: true - /type-fest/0.20.2: + /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} - /type-fest/0.21.3: + /type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} dev: true - /type-fest/0.6.0: + /type-fest@0.6.0: resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} engines: {node: '>=8'} dev: true - /type-fest/0.8.1: + /type-fest@0.8.1: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} engines: {node: '>=8'} dev: true - /type-fest/1.4.0: + /type-fest@1.4.0: resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} engines: {node: '>=10'} dev: true - /type-fest/2.19.0: + /type-fest@2.19.0: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} dev: true - /type-fest/3.13.1: - resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} + /type-fest@3.13.0: + resolution: {integrity: sha512-Gur3yQGM9qiLNs0KPP7LPgeRbio2QTt4xXouobMCarR0/wyW3F+F/+OWwshg3NG0Adon7uQfSZBpB46NfhoF1A==} + engines: {node: '>=14.16'} + dev: true + + /type-fest@3.8.0: + resolution: {integrity: sha512-FVNSzGQz9Th+/9R6Lvv7WIAkstylfHN2/JYxkyhhmKFYh9At2DST8t6L6Lref9eYO8PXFTfG9Sg1Agg0K3vq3Q==} engines: {node: '>=14.16'} dev: true - /typed-array-length/1.0.4: + /typed-array-buffer@1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.10 + dev: true + + /typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.10 + dev: true + + /typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.10 + dev: true + + /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: call-bind: 1.0.2 @@ -7037,22 +7406,26 @@ packages: is-typed-array: 1.1.10 dev: true - /typedarray-to-buffer/3.1.5: + /typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} dependencies: is-typedarray: 1.0.0 dev: true - /typescript/5.1.6: + /typescript@5.1.6: resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} engines: {node: '>=14.17'} hasBin: true - /uc.micro/1.0.6: + /uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: true - /uglify-js/3.17.4: + /ufo@1.1.2: + resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} + dev: true + + /uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} hasBin: true @@ -7060,7 +7433,7 @@ packages: dev: true optional: true - /unbox-primitive/1.0.2: + /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: call-bind: 1.0.2 @@ -7069,42 +7442,42 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /unescape-js/1.1.4: + /unescape-js@1.1.4: resolution: {integrity: sha512-42SD8NOQEhdYntEiUQdYq/1V/YHwr1HLwlHuTJB5InVVdOSbgI6xu8jK5q65yIzuFCfczzyDF/7hbGzVbyCw0g==} dependencies: string.fromcodepoint: 0.2.1 dev: true - /unique-string/2.0.0: + /unique-string@2.0.0: resolution: {integrity: sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==} engines: {node: '>=8'} dependencies: crypto-random-string: 2.0.0 dev: true - /unique-string/3.0.0: + /unique-string@3.0.0: resolution: {integrity: sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==} engines: {node: '>=12'} dependencies: crypto-random-string: 4.0.0 dev: true - /unist-util-stringify-position/2.0.3: + /unist-util-stringify-position@2.0.3: resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} dependencies: '@types/unist': 2.0.6 dev: true - /universal-user-agent/6.0.0: + /universal-user-agent@6.0.0: resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} dev: true - /universalify/2.0.0: + /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} dev: true - /update-browserslist-db/1.0.11_browserslist@4.21.9: + /update-browserslist-db@1.0.11(browserslist@4.21.9): resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} hasBin: true peerDependencies: @@ -7115,71 +7488,209 @@ packages: picocolors: 1.0.0 dev: true - /uri-js/4.4.1: + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.3.0 - /url-join/5.0.0: + /url-join@5.0.0: resolution: {integrity: sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /util-deprecate/1.0.2: + /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true - /uuid/8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true + /v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true - /v8-compile-cache-lib/3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + /v8-to-istanbul@9.1.0: + resolution: {integrity: sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==} + engines: {node: '>=10.12.0'} + dependencies: + '@jridgewell/trace-mapping': 0.3.17 + '@types/istanbul-lib-coverage': 2.0.4 + convert-source-map: 1.9.0 dev: true - /validate-npm-package-license/3.0.4: + /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 dev: true - /vlq/0.2.3: + /vite-node@0.33.0(@types/node@16.18.39): + resolution: {integrity: sha512-19FpHYbwWWxDr73ruNahC+vtEdza52kA90Qb3La98yZ0xULqV8A5JLNPUff0f5zID4984tW7l3DH2przTJUZSw==} + engines: {node: '>=v14.18.0'} + hasBin: true + dependencies: + cac: 6.7.14 + debug: 4.3.4 + mlly: 1.4.0 + pathe: 1.1.1 + picocolors: 1.0.0 + vite: 4.4.6(@types/node@16.18.39) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /vite-tsconfig-paths@4.2.0(typescript@5.1.6): + resolution: {integrity: sha512-jGpus0eUy5qbbMVGiTxCL1iB9ZGN6Bd37VGLJU39kTDD6ZfULTTb1bcc5IeTWqWJKiWV5YihCaibeASPiGi8kw==} + peerDependencies: + vite: '*' + peerDependenciesMeta: + vite: + optional: true + dependencies: + debug: 4.3.4 + globrex: 0.1.2 + tsconfck: 2.1.2(typescript@5.1.6) + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /vite@4.4.6(@types/node@16.18.39): + resolution: {integrity: sha512-EY6Mm8vJ++S3D4tNAckaZfw3JwG3wa794Vt70M6cNJ6NxT87yhq7EC8Rcap3ahyHdo8AhCmV9PTk+vG1HiYn1A==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 16.18.39 + esbuild: 0.18.16 + postcss: 8.4.27 + rollup: 3.27.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /vitest@0.33.0: + resolution: {integrity: sha512-1CxaugJ50xskkQ0e969R/hW47za4YXDUfWJDxip1hwbnhUjYolpfUn2AMOulqG/Dtd9WYAtkHmM/m3yKVrEejQ==} + engines: {node: '>=v14.18.0'} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@vitest/browser': '*' + '@vitest/ui': '*' + happy-dom: '*' + jsdom: '*' + playwright: '*' + safaridriver: '*' + webdriverio: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + dependencies: + '@types/chai': 4.3.5 + '@types/chai-subset': 1.3.3 + '@types/node': 16.18.39 + '@vitest/expect': 0.33.0 + '@vitest/runner': 0.33.0 + '@vitest/snapshot': 0.33.0 + '@vitest/spy': 0.33.0 + '@vitest/utils': 0.33.0 + acorn: 8.10.0 + acorn-walk: 8.2.0 + cac: 6.7.14 + chai: 4.3.7 + debug: 4.3.4 + local-pkg: 0.4.3 + magic-string: 0.30.1 + pathe: 1.1.1 + picocolors: 1.0.0 + std-env: 3.3.3 + strip-literal: 1.0.1 + tinybench: 2.5.0 + tinypool: 0.6.0 + vite: 4.4.6(@types/node@16.18.39) + vite-node: 0.33.0(@types/node@16.18.39) + why-is-node-running: 2.2.2 + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /vlq@0.2.3: resolution: {integrity: sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==} dev: true - /vscode-languageserver-textdocument/1.0.8: + /vscode-languageserver-textdocument@1.0.8: resolution: {integrity: sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==} dev: true - /vscode-uri/3.0.7: + /vscode-uri@3.0.7: resolution: {integrity: sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA==} dev: true - /wcwidth/1.0.1: + /wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: defaults: 1.0.4 dev: true - /webidl-conversions/3.0.1: + /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: true - /well-known-symbols/2.0.0: - resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} - engines: {node: '>=6'} - dev: true - - /whatwg-url/5.0.0: + /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 dev: true - /which-boxed-primitive/1.0.2: + /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: is-bigint: 1.0.4 @@ -7189,11 +7700,18 @@ packages: is-symbol: 1.0.4 dev: true - /which-module/2.0.0: - resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==} + /which-typed-array@1.1.11: + resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 dev: true - /which-typed-array/1.1.9: + /which-typed-array@1.1.9: resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} engines: {node: '>= 0.4'} dependencies: @@ -7205,30 +7723,39 @@ packages: is-typed-array: 1.1.10 dev: true - /which/1.3.1: + /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true dependencies: isexe: 2.0.0 dev: true - /which/2.0.2: + /which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true dependencies: isexe: 2.0.0 - /word-wrap/1.2.5: + /why-is-node-running@2.2.2: + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} + hasBin: true + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + dev: true + + /word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} dev: true - /wordwrap/1.0.0: + /wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: true - /wrap-ansi/6.2.0: + /wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} dependencies: @@ -7237,7 +7764,7 @@ packages: strip-ansi: 6.0.1 dev: true - /wrap-ansi/7.0.0: + /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} dependencies: @@ -7246,7 +7773,7 @@ packages: strip-ansi: 6.0.1 dev: true - /wrap-ansi/8.1.0: + /wrap-ansi@8.1.0: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} dependencies: @@ -7255,10 +7782,10 @@ packages: strip-ansi: 7.0.1 dev: true - /wrappy/1.0.2: + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - /write-file-atomic/3.0.3: + /write-file-atomic@3.0.3: resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==} dependencies: imurmurhash: 0.1.4 @@ -7267,81 +7794,57 @@ packages: typedarray-to-buffer: 3.1.5 dev: true - /write-file-atomic/5.0.1: - resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dependencies: - imurmurhash: 0.1.4 - signal-exit: 4.0.2 - dev: true - - /xdg-basedir/4.0.0: + /xdg-basedir@4.0.0: resolution: {integrity: sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==} engines: {node: '>=8'} dev: true - /xtend/4.0.2: + /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} dev: true - /y18n/4.0.3: - resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} - dev: true - - /y18n/5.0.8: + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} dev: true - /yallist/3.1.1: + /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: true - /yallist/4.0.0: + /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - /yaml/2.3.1: + /yaml@2.3.1: resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} engines: {node: '>= 14'} dev: true - /yargs-parser/18.1.3: - resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} - engines: {node: '>=6'} - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 - dev: true - - /yargs-parser/20.2.9: + /yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} dev: true - /yargs-parser/21.1.1: + /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} dev: true - /yargs/15.4.1: - resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} - engines: {node: '>=8'} + /yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} dependencies: - cliui: 6.0.0 - decamelize: 1.2.0 - find-up: 4.1.0 + cliui: 7.0.4 + escalade: 3.1.1 get-caller-file: 2.0.5 require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 string-width: 4.2.3 - which-module: 2.0.0 - y18n: 4.0.3 - yargs-parser: 18.1.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 dev: true - /yargs/17.7.2: + /yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} dependencies: @@ -7354,21 +7857,21 @@ packages: yargs-parser: 21.1.1 dev: true - /yn/3.1.1: + /yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} dev: true - /yocto-queue/0.1.0: + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - /yocto-queue/1.0.0: + /yocto-queue@1.0.0: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} dev: true - /zod-validation-error/1.3.1_zod@3.21.4: + /zod-validation-error@1.3.1(zod@3.21.4): resolution: {integrity: sha512-cNEXpla+tREtNdAnNKY4xKY1SGOn2yzyuZMu4O0RQylX9apRpUjNcPkEc3uHIAr5Ct7LenjZt6RzjEH6+JsqVQ==} engines: {node: '>=16.0.0'} peerDependencies: @@ -7377,6 +7880,6 @@ packages: zod: 3.21.4 dev: true - /zod/3.21.4: + /zod@3.21.4: resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==} dev: true diff --git a/rollup.config.ts b/rollup.config.ts index 68e72c1bc..57f77d7e8 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -1,6 +1,3 @@ -import rollupPluginCommonjs from "@rollup/plugin-commonjs"; -import rollupPluginJSON from "@rollup/plugin-json"; -import rollupPluginNodeResolve from "@rollup/plugin-node-resolve"; import rollupPluginTypescript from "@rollup/plugin-typescript"; import { defineConfig } from "rollup"; import rollupPluginAutoExternal from "rollup-plugin-auto-external"; @@ -12,28 +9,18 @@ export default defineConfig({ output: [ { - sourcemap: false, file: pkg.exports.import, format: "esm", + sourcemap: false, }, { - sourcemap: false, file: pkg.exports.require, format: "cjs", + sourcemap: false, }, ], - plugins: [ - rollupPluginAutoExternal(), - rollupPluginNodeResolve(), - rollupPluginCommonjs(), - rollupPluginTypescript({ - tsconfig: "tsconfig.build.json", - }), - rollupPluginJSON({ - preferConst: true, - }), - ], + plugins: [rollupPluginAutoExternal(), rollupPluginTypescript()], external: [], diff --git a/scripts/.eslintrc.json b/scripts/.eslintrc.json deleted file mode 100644 index 42f498850..000000000 --- a/scripts/.eslintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "rules": { - "functional/no-return-void": "off", - "node/no-unsupported-features/node-builtins": "off" - } -} diff --git a/scripts/compile-tests.mts b/scripts/compile-tests.mts deleted file mode 100644 index acbda0441..000000000 --- a/scripts/compile-tests.mts +++ /dev/null @@ -1,64 +0,0 @@ -import { promises as fs } from "node:fs"; - -import * as JSONC from "jsonc-parser"; -import * as tsc from "tsc-prog"; - -transpileTests(); -await Promise.all( - /* eslint-disable unicorn/prefer-top-level-await -- See https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1919 */ [ - createTestsTsConfig(), - createTestsHelpersTsConfig(), - ] - /* eslint-enable unicorn/prefer-top-level-await */ -); - -/** - * Transpile the tests. - */ -function transpileTests() { - const program = tsc.createProgramFromConfig({ - basePath: `${process.cwd()}/tests`, - configFilePath: "tsconfig.json", - compilerOptions: { - sourceMap: true, - }, - }); - - tsc.emit(program, { - clean: { outDir: true }, - }); -} - -/** - * Create a suitable "build/tests/tsconfig.json" file. - */ -async function createTestsTsConfig() { - const testsTsConfig = JSONC.parse( - await fs.readFile("tests/tsconfig.json", { encoding: "utf8" }) - ); - - const updatedTestsTsConfig = { - ...testsTsConfig, - extends: `../${testsTsConfig.extends}`, - compilerOptions: { - ...testsTsConfig.compilerOptions, - baseUrl: "..", - }, - }; - - return fs.writeFile( - "build/tests/tsconfig.json", - JSON.stringify(updatedTestsTsConfig, null, 2), - { encoding: "utf8" } - ); -} - -/** - * Create a suitable "build/tests/helpers/tsconfig.json" file. - */ -async function createTestsHelpersTsConfig() { - return fs.copyFile( - "tests/helpers/test-tsconfig.json", - "build/tests/helpers/test-tsconfig.json" - ); -} diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json deleted file mode 100644 index 34688238a..000000000 --- a/scripts/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "ESNext", - "lib": ["esnext"], - "alwaysStrict": true, - "strict": true, - "esModuleInterop": true, - "moduleResolution": "node", - "noImplicitAny": false, - "noImplicitReturns": true, - "noImplicitThis": true, - "allowSyntheticDefaultImports": true, - "resolveJsonModule": true, - "forceConsistentCasingInFileNames": true, - "importHelpers": false, - "newLine": "LF", - "noEmitOnError": true, - "removeComments": true - }, - "ts-node": { - "esm": true - } -} diff --git a/src/configs/all.ts b/src/configs/all.ts index 6bf356e8d..5506641dd 100644 --- a/src/configs/all.ts +++ b/src/configs/all.ts @@ -1,23 +1,23 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import * as functionalParameters from "~/rules/functional-parameters"; -import * as immutableData from "~/rules/immutable-data"; -import * as noClasses from "~/rules/no-classes"; -import * as noConditionalStatements from "~/rules/no-conditional-statements"; -import * as noExpressionStatements from "~/rules/no-expression-statements"; -import * as noLet from "~/rules/no-let"; -import * as noLoopStatements from "~/rules/no-loop-statements"; -import * as noMixedTypes from "~/rules/no-mixed-types"; -import * as noPromiseReject from "~/rules/no-promise-reject"; -import * as noReturnVoid from "~/rules/no-return-void"; -import * as noThisExpressions from "~/rules/no-this-expressions"; -import * as noThrowStatements from "~/rules/no-throw-statements"; -import * as noTryStatements from "~/rules/no-try-statements"; -import * as preferImmutableTypes from "~/rules/prefer-immutable-types"; -import * as preferPropertySignatures from "~/rules/prefer-property-signatures"; -import * as preferTacit from "~/rules/prefer-tacit"; -import * as readonlyType from "~/rules/readonly-type"; -import * as typeDeclarationImmutability from "~/rules/type-declaration-immutability"; +import * as functionalParameters from "#eslint-plugin-functional/rules/functional-parameters"; +import * as immutableData from "#eslint-plugin-functional/rules/immutable-data"; +import * as noClasses from "#eslint-plugin-functional/rules/no-classes"; +import * as noConditionalStatements from "#eslint-plugin-functional/rules/no-conditional-statements"; +import * as noExpressionStatements from "#eslint-plugin-functional/rules/no-expression-statements"; +import * as noLet from "#eslint-plugin-functional/rules/no-let"; +import * as noLoopStatements from "#eslint-plugin-functional/rules/no-loop-statements"; +import * as noMixedTypes from "#eslint-plugin-functional/rules/no-mixed-types"; +import * as noPromiseReject from "#eslint-plugin-functional/rules/no-promise-reject"; +import * as noReturnVoid from "#eslint-plugin-functional/rules/no-return-void"; +import * as noThisExpressions from "#eslint-plugin-functional/rules/no-this-expressions"; +import * as noThrowStatements from "#eslint-plugin-functional/rules/no-throw-statements"; +import * as noTryStatements from "#eslint-plugin-functional/rules/no-try-statements"; +import * as preferImmutableTypes from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import * as preferPropertySignatures from "#eslint-plugin-functional/rules/prefer-property-signatures"; +import * as preferTacit from "#eslint-plugin-functional/rules/prefer-tacit"; +import * as readonlyType from "#eslint-plugin-functional/rules/readonly-type"; +import * as typeDeclarationImmutability from "#eslint-plugin-functional/rules/type-declaration-immutability"; const config: Linter.Config = { rules: { @@ -36,7 +36,7 @@ const config: Linter.Config = { [`functional/${noTryStatements.name}`]: "error", [`functional/${preferImmutableTypes.name}`]: "error", [`functional/${preferPropertySignatures.name}`]: "error", - [`functional/${preferTacit.name}`]: ["warn", { assumeTypes: true }], + [`functional/${preferTacit.name}`]: "warn", [`functional/${readonlyType.name}`]: "error", [`functional/${typeDeclarationImmutability.name}`]: "error", }, diff --git a/src/configs/currying.ts b/src/configs/currying.ts index 154860c58..8c94ea0e2 100644 --- a/src/configs/currying.ts +++ b/src/configs/currying.ts @@ -1,6 +1,6 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import * as functionalParameters from "~/rules/functional-parameters"; +import * as functionalParameters from "#eslint-plugin-functional/rules/functional-parameters"; const config: Linter.Config = { rules: { diff --git a/src/configs/deprecated.ts b/src/configs/deprecated.ts index 97be073eb..f5c67e310 100644 --- a/src/configs/deprecated.ts +++ b/src/configs/deprecated.ts @@ -1,6 +1,6 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import * as preferReadonlyType from "~/rules/prefer-readonly-type"; +import * as preferReadonlyType from "#eslint-plugin-functional/rules/prefer-readonly-type"; const config: Linter.Config = { rules: { diff --git a/src/configs/external-typescript-recommended.ts b/src/configs/external-typescript-recommended.ts index de2d6188b..c32cbc6c2 100644 --- a/src/configs/external-typescript-recommended.ts +++ b/src/configs/external-typescript-recommended.ts @@ -1,7 +1,7 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import externalVanillaRecommended from "~/configs/external-vanilla-recommended"; -import { mergeConfigs } from "~/utils/merge-configs"; +import externalVanillaRecommended from "#eslint-plugin-functional/configs/external-vanilla-recommended"; +import { mergeConfigs } from "#eslint-plugin-functional/utils/merge-configs"; const tsConfig: Linter.Config = { rules: { @@ -12,7 +12,7 @@ const tsConfig: Linter.Config = { const fullConfig: Linter.Config = mergeConfigs( externalVanillaRecommended, - tsConfig + tsConfig, ); export default fullConfig; diff --git a/src/configs/external-vanilla-recommended.ts b/src/configs/external-vanilla-recommended.ts index d960b48c4..1009e3517 100644 --- a/src/configs/external-vanilla-recommended.ts +++ b/src/configs/external-vanilla-recommended.ts @@ -1,4 +1,4 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; const config: Linter.Config = { rules: { diff --git a/src/configs/lite.ts b/src/configs/lite.ts index 643db9c14..4f1c03b04 100644 --- a/src/configs/lite.ts +++ b/src/configs/lite.ts @@ -1,11 +1,11 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import * as functionalParameters from "~/rules/functional-parameters"; -import * as immutableData from "~/rules/immutable-data"; -import * as noConditionalStatements from "~/rules/no-conditional-statements"; -import * as noExpressionStatements from "~/rules/no-expression-statements"; -import * as preferImmutableTypes from "~/rules/prefer-immutable-types"; -import { mergeConfigs } from "~/utils/merge-configs"; +import * as functionalParameters from "#eslint-plugin-functional/rules/functional-parameters"; +import * as immutableData from "#eslint-plugin-functional/rules/immutable-data"; +import * as noConditionalStatements from "#eslint-plugin-functional/rules/no-conditional-statements"; +import * as noExpressionStatements from "#eslint-plugin-functional/rules/no-expression-statements"; +import * as preferImmutableTypes from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import { mergeConfigs } from "#eslint-plugin-functional/utils/merge-configs"; import recommended from "./recommended"; diff --git a/src/configs/no-exceptions.ts b/src/configs/no-exceptions.ts index 8fec821b0..f654db375 100644 --- a/src/configs/no-exceptions.ts +++ b/src/configs/no-exceptions.ts @@ -1,7 +1,7 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import * as noThrowStatements from "~/rules/no-throw-statements"; -import * as noTryStatements from "~/rules/no-try-statements"; +import * as noThrowStatements from "#eslint-plugin-functional/rules/no-throw-statements"; +import * as noTryStatements from "#eslint-plugin-functional/rules/no-try-statements"; const config: Linter.Config = { rules: { diff --git a/src/configs/no-mutations.ts b/src/configs/no-mutations.ts index ec0ebf2eb..6c77c580b 100644 --- a/src/configs/no-mutations.ts +++ b/src/configs/no-mutations.ts @@ -1,9 +1,9 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import * as immutableData from "~/rules/immutable-data"; -import * as noLet from "~/rules/no-let"; -import * as preferImmutableTypes from "~/rules/prefer-immutable-types"; -import * as typeDeclarationImmutability from "~/rules/type-declaration-immutability"; +import * as immutableData from "#eslint-plugin-functional/rules/immutable-data"; +import * as noLet from "#eslint-plugin-functional/rules/no-let"; +import * as preferImmutableTypes from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import * as typeDeclarationImmutability from "#eslint-plugin-functional/rules/type-declaration-immutability"; const config: Linter.Config = { rules: { diff --git a/src/configs/no-other-paradigms.ts b/src/configs/no-other-paradigms.ts index 5d7f114a6..72a15c5d2 100644 --- a/src/configs/no-other-paradigms.ts +++ b/src/configs/no-other-paradigms.ts @@ -1,8 +1,8 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import * as noClasses from "~/rules/no-classes"; -import * as noMixedTypes from "~/rules/no-mixed-types"; -import * as noThisExpressions from "~/rules/no-this-expressions"; +import * as noClasses from "#eslint-plugin-functional/rules/no-classes"; +import * as noMixedTypes from "#eslint-plugin-functional/rules/no-mixed-types"; +import * as noThisExpressions from "#eslint-plugin-functional/rules/no-this-expressions"; const config: Linter.Config = { rules: { diff --git a/src/configs/no-statements.ts b/src/configs/no-statements.ts index d394c99b3..c8e5a02d8 100644 --- a/src/configs/no-statements.ts +++ b/src/configs/no-statements.ts @@ -1,9 +1,9 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import * as noConditionalStatements from "~/rules/no-conditional-statements"; -import * as noExpressionStatements from "~/rules/no-expression-statements"; -import * as noLoopStatements from "~/rules/no-loop-statements"; -import * as noReturnVoid from "~/rules/no-return-void"; +import * as noConditionalStatements from "#eslint-plugin-functional/rules/no-conditional-statements"; +import * as noExpressionStatements from "#eslint-plugin-functional/rules/no-expression-statements"; +import * as noLoopStatements from "#eslint-plugin-functional/rules/no-loop-statements"; +import * as noReturnVoid from "#eslint-plugin-functional/rules/no-return-void"; const config: Linter.Config = { rules: { diff --git a/src/configs/off.ts b/src/configs/off.ts index a9865030c..5703b3705 100644 --- a/src/configs/off.ts +++ b/src/configs/off.ts @@ -1,4 +1,4 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; import all from "./all"; import deprecated from "./deprecated"; @@ -6,10 +6,8 @@ import deprecated from "./deprecated"; /** * Turn the given rules off. */ -function turnRulesOff(rules: string[] | undefined): Linter.Config["rules"] { - return rules === undefined - ? undefined - : Object.fromEntries(rules.map((name) => [name, "off"])); +function turnRulesOff(rules: string[]): NonNullable { + return Object.fromEntries(rules.map((name) => [name, "off"])); } const allRulesNames = new Set([ diff --git a/src/configs/recommended.ts b/src/configs/recommended.ts index cc28de6c0..7704be1ee 100644 --- a/src/configs/recommended.ts +++ b/src/configs/recommended.ts @@ -1,16 +1,16 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; import { Immutability } from "is-immutable-type"; -import * as functionalParameters from "~/rules/functional-parameters"; -import * as noConditionalStatements from "~/rules/no-conditional-statements"; -import * as noLet from "~/rules/no-let"; -import * as noThisExpressions from "~/rules/no-this-expressions"; -import * as noThrowStatements from "~/rules/no-throw-statements"; -import * as noTryStatements from "~/rules/no-try-statements"; -import * as preferImmutableTypes from "~/rules/prefer-immutable-types"; -import * as typeDeclarationImmutability from "~/rules/type-declaration-immutability"; -import { RuleEnforcementComparator } from "~/rules/type-declaration-immutability"; -import { mergeConfigs } from "~/utils/merge-configs"; +import * as functionalParameters from "#eslint-plugin-functional/rules/functional-parameters"; +import * as noConditionalStatements from "#eslint-plugin-functional/rules/no-conditional-statements"; +import * as noLet from "#eslint-plugin-functional/rules/no-let"; +import * as noThisExpressions from "#eslint-plugin-functional/rules/no-this-expressions"; +import * as noThrowStatements from "#eslint-plugin-functional/rules/no-throw-statements"; +import * as noTryStatements from "#eslint-plugin-functional/rules/no-try-statements"; +import * as preferImmutableTypes from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import * as typeDeclarationImmutability from "#eslint-plugin-functional/rules/type-declaration-immutability"; +import { RuleEnforcementComparator } from "#eslint-plugin-functional/rules/type-declaration-immutability"; +import { mergeConfigs } from "#eslint-plugin-functional/utils/merge-configs"; import strict from "./strict"; @@ -22,6 +22,7 @@ const overrides: Linter.Config = { enforceParameterCount: { ignoreLambdaExpression: true, ignoreIIFE: true, + ignoreGettersAndSetters: true, }, }, ], diff --git a/src/configs/strict.ts b/src/configs/strict.ts index 883bb4015..5521f1e66 100644 --- a/src/configs/strict.ts +++ b/src/configs/strict.ts @@ -1,18 +1,18 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import currying from "~/configs/currying"; -import noExceptions from "~/configs/no-exceptions"; -import noMutations from "~/configs/no-mutations"; -import noOtherParadigms from "~/configs/no-other-paradigms"; -import noStatements from "~/configs/no-statements"; -import { mergeConfigs } from "~/utils/merge-configs"; +import currying from "#eslint-plugin-functional/configs/currying"; +import noExceptions from "#eslint-plugin-functional/configs/no-exceptions"; +import noMutations from "#eslint-plugin-functional/configs/no-mutations"; +import noOtherParadigms from "#eslint-plugin-functional/configs/no-other-paradigms"; +import noStatements from "#eslint-plugin-functional/configs/no-statements"; +import { mergeConfigs } from "#eslint-plugin-functional/utils/merge-configs"; const config: Linter.Config = mergeConfigs( currying, noMutations, noExceptions, noOtherParadigms, - noStatements + noStatements, ); export default config; diff --git a/src/configs/stylistic.ts b/src/configs/stylistic.ts index 5a2a7389d..1240f118b 100644 --- a/src/configs/stylistic.ts +++ b/src/configs/stylistic.ts @@ -1,13 +1,13 @@ -import type { Linter } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import * as preferPropertySignatures from "~/rules/prefer-property-signatures"; -import * as preferTacit from "~/rules/prefer-tacit"; -import * as readonlyType from "~/rules/readonly-type"; +import * as preferPropertySignatures from "#eslint-plugin-functional/rules/prefer-property-signatures"; +import * as preferTacit from "#eslint-plugin-functional/rules/prefer-tacit"; +import * as readonlyType from "#eslint-plugin-functional/rules/readonly-type"; const config: Linter.Config = { rules: { [`functional/${preferPropertySignatures.name}`]: "error", - [`functional/${preferTacit.name}`]: ["warn", { assumeTypes: true }], + [`functional/${preferTacit.name}`]: "warn", [`functional/${readonlyType.name}`]: "error", }, }; diff --git a/src/index.ts b/src/index.ts index f76e76626..5879885be 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,29 +1,21 @@ -import type { Linter, Rule } from "eslint"; +import { type Linter } from "@typescript-eslint/utils/ts-eslint"; -import all from "~/configs/all"; -import currying from "~/configs/currying"; -import externalTypeScriptRecommended from "~/configs/external-typescript-recommended"; -import externalVanillaRecommended from "~/configs/external-vanilla-recommended"; -import lite from "~/configs/lite"; -import noExceptions from "~/configs/no-exceptions"; -import noMutations from "~/configs/no-mutations"; -import noOtherParadigms from "~/configs/no-other-paradigms"; -import noStatements from "~/configs/no-statements"; -import off from "~/configs/off"; -import recommended from "~/configs/recommended"; -import strict from "~/configs/strict"; -import stylistic from "~/configs/stylistic"; -import { rules } from "~/rules"; +import all from "#eslint-plugin-functional/configs/all"; +import currying from "#eslint-plugin-functional/configs/currying"; +import externalTypeScriptRecommended from "#eslint-plugin-functional/configs/external-typescript-recommended"; +import externalVanillaRecommended from "#eslint-plugin-functional/configs/external-vanilla-recommended"; +import lite from "#eslint-plugin-functional/configs/lite"; +import noExceptions from "#eslint-plugin-functional/configs/no-exceptions"; +import noMutations from "#eslint-plugin-functional/configs/no-mutations"; +import noOtherParadigms from "#eslint-plugin-functional/configs/no-other-paradigms"; +import noStatements from "#eslint-plugin-functional/configs/no-statements"; +import off from "#eslint-plugin-functional/configs/off"; +import recommended from "#eslint-plugin-functional/configs/recommended"; +import strict from "#eslint-plugin-functional/configs/strict"; +import stylistic from "#eslint-plugin-functional/configs/stylistic"; +import { rules } from "#eslint-plugin-functional/rules"; -/** - * The config type object ESLint is expecting. - */ -type EslintPluginConfig = { - rules: Record; - configs: Record; -}; - -const config: EslintPluginConfig = { +const config: Linter.Plugin = { rules, configs: { all, diff --git a/src/options/ignore.ts b/src/options/ignore.ts index a6586b6b0..93ce3b1c7 100644 --- a/src/options/ignore.ts +++ b/src/options/ignore.ts @@ -1,55 +1,84 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { type JSONSchema4ObjectSchema } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; import escapeRegExp from "escape-string-regexp"; -import type { JSONSchema4 } from "json-schema"; -import { getNodeIdentifierTexts } from "~/utils/misc"; -import type { BaseOptions } from "~/utils/rule"; -import { isInClass, isInFunctionBody } from "~/utils/tree"; +import { + getNodeCode, + getNodeIdentifierTexts, +} from "#eslint-plugin-functional/utils/misc"; +import { type BaseOptions } from "#eslint-plugin-functional/utils/rule"; +import { + isInClass, + isInFunctionBody, +} from "#eslint-plugin-functional/utils/tree"; import { isAssignmentExpression, isClassLike, isPropertyDefinition, isMemberExpression, isThisExpression, -} from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/type-guards"; /** * The option to ignore patterns. */ -export type IgnorePatternOption = Readonly<{ - ignorePattern?: string[] | string; +export type IgnoreIdentifierPatternOption = Readonly<{ + ignoreIdentifierPattern?: ReadonlyArray | string; }>; /** * The schema for the option to ignore patterns. */ -export const ignorePatternOptionSchema: JSONSchema4["properties"] = { - ignorePattern: { - type: ["string", "array"], - items: { - type: "string", +export const ignoreIdentifierPatternOptionSchema: JSONSchema4ObjectSchema["properties"] = + { + ignoreIdentifierPattern: { + type: ["string", "array"], + items: { + type: "string", + }, }, - }, -}; + }; + +/** + * The option to ignore patterns. + */ +export type IgnoreCodePatternOption = Readonly<{ + ignoreCodePattern?: ReadonlyArray | string; +}>; + +/** + * The schema for the option to ignore patterns. + */ +export const ignoreCodePatternOptionSchema: JSONSchema4ObjectSchema["properties"] = + { + ignoreCodePattern: { + type: ["string", "array"], + items: { + type: "string", + }, + }, + }; /** * The option to ignore accessor patterns. */ export type IgnoreAccessorPatternOption = Readonly<{ - ignoreAccessorPattern?: string[] | string; + ignoreAccessorPattern?: ReadonlyArray | string; }>; /** * The schema for the option to ignore accessor patterns. */ -export const ignoreAccessorPatternOptionSchema: JSONSchema4["properties"] = { - ignoreAccessorPattern: { - type: ["string", "array"], - items: { - type: "string", +export const ignoreAccessorPatternOptionSchema: JSONSchema4ObjectSchema["properties"] = + { + ignoreAccessorPattern: { + type: ["string", "array"], + items: { + type: "string", + }, }, - }, -}; + }; /** * The option to ignore classes. @@ -61,38 +90,40 @@ export type IgnoreClassesOption = Readonly<{ /** * The schema for the option to ignore classes. */ -export const ignoreClassesOptionSchema: JSONSchema4["properties"] = { - ignoreClasses: { - oneOf: [ - { - type: "boolean", - }, - { - type: "string", - enum: ["fieldsOnly"], - }, - ], - }, -}; +export const ignoreClassesOptionSchema: JSONSchema4ObjectSchema["properties"] = + { + ignoreClasses: { + oneOf: [ + { + type: "boolean", + }, + { + type: "string", + enum: ["fieldsOnly"], + }, + ], + }, + }; /** * The option to ignore prefix selector. */ export type IgnorePrefixSelectorOption = Readonly<{ - ignorePrefixSelector?: string[] | string; + ignorePrefixSelector?: ReadonlyArray | string; }>; /** * The schema for the option to ignore prefix selector. */ -export const ignorePrefixSelectorOptionSchema: JSONSchema4["properties"] = { - ignorePrefixSelector: { - type: ["string", "array"], - items: { - type: "string", +export const ignorePrefixSelectorOptionSchema: JSONSchema4ObjectSchema["properties"] = + { + ignorePrefixSelector: { + type: ["string", "array"], + items: { + type: "string", + }, }, - }, -}; + }; /** * Should the given text be allowed? @@ -101,14 +132,12 @@ export const ignorePrefixSelectorOptionSchema: JSONSchema4["properties"] = { */ function shouldIgnoreViaPattern( text: string, - ignorePattern: string[] | string + pattern: ReadonlyArray | string, ): boolean { - const patterns = Array.isArray(ignorePattern) - ? ignorePattern - : [ignorePattern]; + const patterns = Array.isArray(pattern) ? pattern : [pattern]; // One or more patterns match? - return patterns.some((pattern) => new RegExp(pattern, "u").test(text)); + return patterns.some((p) => new RegExp(p, "u").test(text)); } /** @@ -119,9 +148,9 @@ function shouldIgnoreViaPattern( * Does the given text match the given pattern. */ function accessorPatternMatch( - [pattern, ...remainingPatternParts]: string[], - textParts: string[], - allowExtra = false + [pattern, ...remainingPatternParts]: ReadonlyArray, + textParts: ReadonlyArray, + allowExtra = false, ): boolean { return pattern === undefined ? allowExtra || textParts.length === 0 @@ -135,8 +164,8 @@ function accessorPatternMatch( accessorPatternMatch( remainingPatternParts, textParts.slice(offset), - true - ) + true, + ), ) : // Match anything? pattern === "*" @@ -144,17 +173,17 @@ function accessorPatternMatch( accessorPatternMatch( remainingPatternParts, textParts.slice(1), - allowExtra + allowExtra, ) : // Text matches pattern? new RegExp( `^${escapeRegExp(pattern).replaceAll("\\*", ".*")}$`, - "u" + "u", ).test(textParts[0]!) && accessorPatternMatch( remainingPatternParts, textParts.slice(1), - allowExtra + allowExtra, ); } @@ -165,15 +194,13 @@ function accessorPatternMatch( */ function shouldIgnoreViaAccessorPattern( text: string, - ignorePattern: string[] | string + pattern: ReadonlyArray | string, ): boolean { - const patterns = Array.isArray(ignorePattern) - ? ignorePattern - : [ignorePattern]; + const patterns = Array.isArray(pattern) ? pattern : [pattern]; // One or more patterns match? - return patterns.some((pattern) => - accessorPatternMatch(pattern.split("."), text.split(".")) + return patterns.some((p) => + accessorPatternMatch(p.split("."), text.split(".")), ); } @@ -184,8 +211,8 @@ function shouldIgnoreViaAccessorPattern( */ export function shouldIgnoreInFunction( node: TSESTree.Node, - context: TSESLint.RuleContext, - allowInFunction: boolean | undefined + context: Readonly>, + allowInFunction: boolean | undefined, ): boolean { return allowInFunction === true && isInFunctionBody(node); } @@ -197,8 +224,8 @@ export function shouldIgnoreInFunction( */ export function shouldIgnoreClasses( node: TSESTree.Node, - context: TSESLint.RuleContext, - ignoreClasses: Partial["ignoreClasses"] + context: Readonly>, + ignoreClasses: Readonly["ignoreClasses"]>, ): boolean { return ( (ignoreClasses === true && (isClassLike(node) || isInClass(node))) || @@ -215,28 +242,43 @@ export function shouldIgnoreClasses( * Should the given node be allowed base off the following rule options? * * - IgnoreAccessorPatternOption. - * - IgnorePatternOption. + * - IgnoreIdentifierPatternOption. */ export function shouldIgnorePattern( node: TSESTree.Node, - context: TSESLint.RuleContext, - ignorePattern: Partial["ignorePattern"], - ignoreAccessorPattern?: Partial["ignoreAccessorPattern"] + context: Readonly>, + ignoreIdentifierPattern: Readonly< + Partial["ignoreIdentifierPattern"] + >, + ignoreAccessorPattern?: Readonly< + Partial["ignoreAccessorPattern"] + >, + ignoreCodePattern?: Readonly< + Partial["ignoreCodePattern"] + >, ): boolean { const texts = getNodeIdentifierTexts(node, context); if (texts.length === 0) { - return false; + return ( + ignoreCodePattern !== undefined && + shouldIgnoreViaPattern(getNodeCode(node, context), ignoreCodePattern) + ); } return ( - // Ignore if ignorePattern is set and a pattern matches. - (ignorePattern !== undefined && - texts.every((text) => shouldIgnoreViaPattern(text, ignorePattern))) || + // Ignore if ignoreIdentifierPattern is set and a pattern matches. + (ignoreIdentifierPattern !== undefined && + texts.every((text) => + shouldIgnoreViaPattern(text, ignoreIdentifierPattern), + )) || // Ignore if ignoreAccessorPattern is set and an accessor pattern matches. (ignoreAccessorPattern !== undefined && texts.every((text) => - shouldIgnoreViaAccessorPattern(text, ignoreAccessorPattern) - )) + shouldIgnoreViaAccessorPattern(text, ignoreAccessorPattern), + )) || + // Ignore if ignoreCodePattern is set and a code pattern matches. + (ignoreCodePattern !== undefined && + shouldIgnoreViaPattern(getNodeCode(node, context), ignoreCodePattern)) ); } diff --git a/src/rules/functional-parameters.ts b/src/rules/functional-parameters.ts index b2e84edb5..e43133d84 100644 --- a/src/rules/functional-parameters.ts +++ b/src/rules/functional-parameters.ts @@ -1,26 +1,33 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { + type JSONSchema4, + type JSONSchema4ObjectSchema, +} from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; import { deepmerge } from "deepmerge-ts"; -import type { JSONSchema4 } from "json-schema"; -import type { - IgnorePatternOption, - IgnorePrefixSelectorOption, -} from "~/options"; import { + type IgnoreIdentifierPatternOption, + type IgnorePrefixSelectorOption, shouldIgnorePattern, - ignorePatternOptionSchema, + ignoreIdentifierPatternOptionSchema, ignorePrefixSelectorOptionSchema, -} from "~/options"; -import type { ESFunction } from "~/utils/node-types"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRuleUsingFunction } from "~/utils/rule"; +} from "#eslint-plugin-functional/options"; +import { type ESFunction } from "#eslint-plugin-functional/utils/node-types"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRuleUsingFunction, +} from "#eslint-plugin-functional/utils/rule"; import { isArgument, + isGetter, + isSetter, isIIFE, isPropertyAccess, isPropertyName, -} from "~/utils/tree"; -import { isRestElement } from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/tree"; +import { isRestElement } from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -36,7 +43,7 @@ type ParameterCountOptions = "atLeastOne" | "exactlyOne"; * The options this rule can take. */ type Options = [ - IgnorePatternOption & + IgnoreIdentifierPatternOption & IgnorePrefixSelectorOption & { allowRestParameter: boolean; allowArgumentsKeyword: boolean; @@ -47,18 +54,19 @@ type Options = [ count: ParameterCountOptions; ignoreLambdaExpression: boolean; ignoreIIFE: boolean; + ignoreGettersAndSetters: boolean; }; - } + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", properties: deepmerge( - ignorePatternOptionSchema, + ignoreIdentifierPatternOptionSchema, ignorePrefixSelectorOptionSchema, { allowRestParameter: { @@ -84,6 +92,9 @@ const schema: JSONSchema4 = [ type: "string", enum: ["atLeastOne", "exactlyOne"], }, + ignoreGettersAndSetters: { + type: "boolean", + }, ignoreLambdaExpression: { type: "boolean", }, @@ -95,7 +106,7 @@ const schema: JSONSchema4 = [ }, ], }, - } + } satisfies JSONSchema4ObjectSchema["properties"], ), additionalProperties: false, }, @@ -112,6 +123,7 @@ const defaultOptions: Options = [ count: "atLeastOne", ignoreLambdaExpression: false, ignoreIIFE: true, + ignoreGettersAndSetters: true, }, }, ]; @@ -136,7 +148,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "Currying", description: "Enforce functional parameters.", - recommended: "error", }, messages: errorMessages, schema, @@ -146,8 +157,8 @@ const meta: NamedCreateRuleMetaWithCategory = { * Get the rest parameter violations. */ function getRestParamViolations( - [{ allowRestParameter }]: Options, - node: ESFunction + [{ allowRestParameter }]: Readonly, + node: ESFunction, ): RuleResult["descriptors"] { return !allowRestParameter && node.params.length > 0 && @@ -165,15 +176,17 @@ function getRestParamViolations( * Get the parameter count violations. */ function getParamCountViolations( - [{ enforceParameterCount }]: Options, - node: ESFunction + [{ enforceParameterCount }]: Readonly, + node: ESFunction, ): RuleResult["descriptors"] { if ( enforceParameterCount === false || (node.params.length === 0 && typeof enforceParameterCount === "object" && ((enforceParameterCount.ignoreIIFE && isIIFE(node)) || - (enforceParameterCount.ignoreLambdaExpression && isArgument(node)))) + (enforceParameterCount.ignoreLambdaExpression && isArgument(node)) || + (enforceParameterCount.ignoreGettersAndSetters && + (isGetter(node) || isSetter(node))))) ) { return []; } @@ -211,13 +224,13 @@ function getParamCountViolations( */ function checkFunction( node: ESFunction, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; - const { ignorePattern } = optionsObject; + const { ignoreIdentifierPattern } = optionsObject; - if (shouldIgnorePattern(node, context, ignorePattern)) { + if (shouldIgnorePattern(node, context, ignoreIdentifierPattern)) { return { context, descriptors: [], @@ -238,13 +251,13 @@ function checkFunction( */ function checkIdentifier( node: TSESTree.Identifier, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; - const { ignorePattern } = optionsObject; + const { ignoreIdentifierPattern } = optionsObject; - if (shouldIgnorePattern(node, context, ignorePattern)) { + if (shouldIgnorePattern(node, context, ignoreIdentifierPattern)) { return { context, descriptors: [], @@ -294,12 +307,12 @@ export const rule = createRuleUsingFunction< const fullFunctionSelectors = baseFunctionSelectors.flatMap((baseSelector) => ignoreSelectors === undefined ? [baseSelector] - : `:not(:matches(${ignoreSelectors.join(",")})) > ${baseSelector}` + : `:not(:matches(${ignoreSelectors.join(",")})) > ${baseSelector}`, ); return { ...Object.fromEntries( - fullFunctionSelectors.map((selector) => [selector, checkFunction]) + fullFunctionSelectors.map((selector) => [selector, checkFunction]), ), Identifier: checkIdentifier, }; diff --git a/src/rules/immutable-data.ts b/src/rules/immutable-data.ts index dd842bc5f..02bb7f754 100644 --- a/src/rules/immutable-data.ts +++ b/src/rules/immutable-data.ts @@ -1,23 +1,33 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { + type JSONSchema4, + type JSONSchema4ObjectSchema, +} from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; import { deepmerge } from "deepmerge-ts"; -import type { JSONSchema4 } from "json-schema"; -import type { - IgnoreAccessorPatternOption, - IgnorePatternOption, - IgnoreClassesOption, -} from "~/options"; import { + type IgnoreAccessorPatternOption, + type IgnoreIdentifierPatternOption, + type IgnoreClassesOption, shouldIgnorePattern, shouldIgnoreClasses, ignoreAccessorPatternOptionSchema, ignoreClassesOptionSchema, - ignorePatternOptionSchema, -} from "~/options"; -import { isExpected } from "~/utils/misc"; -import { createRule, getTypeOfNode } from "~/utils/rule"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { isInConstructor } from "~/utils/tree"; + ignoreIdentifierPatternOptionSchema, +} from "#eslint-plugin-functional/options"; +import { isExpected } from "#eslint-plugin-functional/utils/misc"; +import { + createRule, + getTypeOfNode, + type RuleResult, + type NamedCreateRuleMetaWithCategory, +} from "#eslint-plugin-functional/utils/rule"; +import { + findRootIdentifier, + isDefinedByMutableVaraible, + isInConstructor, +} from "#eslint-plugin-functional/utils/tree"; import { isArrayConstructorType, isArrayExpression, @@ -27,7 +37,7 @@ import { isMemberExpression, isNewExpression, isObjectConstructorType, -} from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -40,51 +50,30 @@ export const name = "immutable-data" as const; type Options = [ IgnoreAccessorPatternOption & IgnoreClassesOption & - IgnorePatternOption & { + IgnoreIdentifierPatternOption & { ignoreImmediateMutation: boolean; - assumeTypes: - | boolean - | { - forArrays: boolean; - forObjects: boolean; - }; - } + ignoreNonConstDeclarations: boolean; + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", properties: deepmerge( - ignorePatternOptionSchema, + ignoreIdentifierPatternOptionSchema, ignoreAccessorPatternOptionSchema, ignoreClassesOptionSchema, { ignoreImmediateMutation: { type: "boolean", }, - assumeTypes: { - oneOf: [ - { - type: "boolean", - }, - { - type: "object", - properties: { - forArrays: { - type: "boolean", - }, - forObjects: { - type: "boolean", - }, - }, - additionalProperties: false, - }, - ], + ignoreNonConstDeclarations: { + type: "boolean", }, - } + } satisfies JSONSchema4ObjectSchema["properties"], ), additionalProperties: false, }, @@ -97,10 +86,7 @@ const defaultOptions: Options = [ { ignoreClasses: false, ignoreImmediateMutation: true, - assumeTypes: { - forArrays: true, - forObjects: true, - }, + ignoreNonConstDeclarations: false, }, ]; @@ -121,7 +107,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Mutations", description: "Enforce treating data as immutable.", - recommended: "error", }, messages: errorMessages, schema, @@ -183,16 +168,26 @@ const objectConstructorMutatorFunctions = new Set([ */ function checkAssignmentExpression( node: TSESTree.AssignmentExpression, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; - const { ignorePattern, ignoreAccessorPattern, ignoreClasses } = optionsObject; + const { + ignoreIdentifierPattern, + ignoreAccessorPattern, + ignoreNonConstDeclarations, + ignoreClasses, + } = optionsObject; if ( !isMemberExpression(node.left) || shouldIgnoreClasses(node, context, ignoreClasses) || - shouldIgnorePattern(node, context, ignorePattern, ignoreAccessorPattern) + shouldIgnorePattern( + node, + context, + ignoreIdentifierPattern, + ignoreAccessorPattern, + ) ) { return { context, @@ -200,6 +195,19 @@ function checkAssignmentExpression( }; } + if (ignoreNonConstDeclarations) { + const rootIdentifier = findRootIdentifier(node.left.object); + if ( + rootIdentifier !== undefined && + isDefinedByMutableVaraible(rootIdentifier, context) + ) { + return { + context, + descriptors: [], + }; + } + } + return { context, descriptors: @@ -213,16 +221,26 @@ function checkAssignmentExpression( */ function checkUnaryExpression( node: TSESTree.UnaryExpression, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; - const { ignorePattern, ignoreAccessorPattern, ignoreClasses } = optionsObject; + const { + ignoreIdentifierPattern, + ignoreAccessorPattern, + ignoreNonConstDeclarations, + ignoreClasses, + } = optionsObject; if ( !isMemberExpression(node.argument) || shouldIgnoreClasses(node, context, ignoreClasses) || - shouldIgnorePattern(node, context, ignorePattern, ignoreAccessorPattern) + shouldIgnorePattern( + node, + context, + ignoreIdentifierPattern, + ignoreAccessorPattern, + ) ) { return { context, @@ -230,6 +248,19 @@ function checkUnaryExpression( }; } + if (ignoreNonConstDeclarations) { + const rootIdentifier = findRootIdentifier(node.argument.object); + if ( + rootIdentifier !== undefined && + isDefinedByMutableVaraible(rootIdentifier, context) + ) { + return { + context, + descriptors: [], + }; + } + } + return { context, descriptors: @@ -242,11 +273,16 @@ function checkUnaryExpression( */ function checkUpdateExpression( node: TSESTree.UpdateExpression, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; - const { ignorePattern, ignoreAccessorPattern, ignoreClasses } = optionsObject; + const { + ignoreIdentifierPattern, + ignoreAccessorPattern, + ignoreNonConstDeclarations, + ignoreClasses, + } = optionsObject; if ( !isMemberExpression(node.argument) || @@ -254,8 +290,8 @@ function checkUpdateExpression( shouldIgnorePattern( node.argument, context, - ignorePattern, - ignoreAccessorPattern + ignoreIdentifierPattern, + ignoreAccessorPattern, ) ) { return { @@ -264,6 +300,19 @@ function checkUpdateExpression( }; } + if (ignoreNonConstDeclarations) { + const rootIdentifier = findRootIdentifier(node.argument.object); + if ( + rootIdentifier !== undefined && + isDefinedByMutableVaraible(rootIdentifier, context) + ) { + return { + context, + descriptors: [], + }; + } + } + return { context, descriptors: [{ node, messageId: "generic" }], @@ -279,34 +328,27 @@ function checkUpdateExpression( */ function isInChainCallAndFollowsNew( node: TSESTree.MemberExpression, - context: TSESLint.RuleContext, - assumeArrayTypes: boolean + context: Readonly>, ): boolean { return ( // Check for: [0, 1, 2] isArrayExpression(node.object) || // Check for: new Array() (isNewExpression(node.object) && - isArrayConstructorType( - getTypeOfNode(node.object.callee, context), - assumeArrayTypes, - node.object.callee - )) || + isArrayConstructorType(getTypeOfNode(node.object.callee, context))) || (isCallExpression(node.object) && isMemberExpression(node.object.callee) && isIdentifier(node.object.callee.property) && // Check for: Array.from(iterable) ((arrayConstructorFunctions.some( - isExpected(node.object.callee.property.name) + isExpected(node.object.callee.property.name), ) && isArrayConstructorType( getTypeOfNode(node.object.callee.object, context), - assumeArrayTypes, - node.object.callee.object )) || // Check for: array.slice(0) arrayNewObjectReturningMethods.some( - isExpected(node.object.callee.property.name) + isExpected(node.object.callee.property.name), ))) ); } @@ -316,11 +358,16 @@ function isInChainCallAndFollowsNew( */ function checkCallExpression( node: TSESTree.CallExpression, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; - const { ignorePattern, ignoreAccessorPattern, ignoreClasses } = optionsObject; + const { + ignoreIdentifierPattern, + ignoreAccessorPattern, + ignoreNonConstDeclarations, + ignoreClasses, + } = optionsObject; // Not potential object mutation? if ( @@ -330,8 +377,8 @@ function checkCallExpression( shouldIgnorePattern( node.callee.object, context, - ignorePattern, - ignoreAccessorPattern + ignoreIdentifierPattern, + ignoreAccessorPattern, ) ) { return { @@ -340,37 +387,34 @@ function checkCallExpression( }; } - const { assumeTypes, ignoreImmediateMutation } = optionsObject; - - const assumeTypesForArrays = - assumeTypes === true || - (assumeTypes !== false && assumeTypes.forArrays === true); + const { ignoreImmediateMutation } = optionsObject; // Array mutation? if ( arrayMutatorMethods.has(node.callee.property.name) && (!ignoreImmediateMutation || - !isInChainCallAndFollowsNew( - node.callee, - context, - assumeTypesForArrays - )) && - isArrayType( - getTypeOfNode(node.callee.object, context), - assumeTypesForArrays, - node.callee.object - ) + !isInChainCallAndFollowsNew(node.callee, context)) && + isArrayType(getTypeOfNode(node.callee.object, context)) ) { - return { - context, - descriptors: [{ node, messageId: "array" }], - }; + if (ignoreNonConstDeclarations) { + const rootIdentifier = findRootIdentifier(node.callee.object); + if ( + rootIdentifier === undefined || + !isDefinedByMutableVaraible(rootIdentifier, context) + ) { + return { + context, + descriptors: [{ node, messageId: "array" }], + }; + } + } else { + return { + context, + descriptors: [{ node, messageId: "array" }], + }; + } } - const assumeTypesForObjects = - assumeTypes === true || - (assumeTypes !== false && assumeTypes.forObjects === true); - // Non-array object mutation (ex. Object.assign on identifier)? if ( objectConstructorMutatorFunctions.has(node.callee.property.name) && @@ -381,19 +425,28 @@ function checkCallExpression( !shouldIgnorePattern( node.arguments[0], context, - ignorePattern, - ignoreAccessorPattern + ignoreIdentifierPattern, + ignoreAccessorPattern, ) && - isObjectConstructorType( - getTypeOfNode(node.callee.object, context), - assumeTypesForObjects, - node.callee.object - ) + isObjectConstructorType(getTypeOfNode(node.callee.object, context)) ) { - return { - context, - descriptors: [{ node, messageId: "object" }], - }; + if (ignoreNonConstDeclarations) { + const rootIdentifier = findRootIdentifier(node.callee.object); + if ( + rootIdentifier === undefined || + !isDefinedByMutableVaraible(rootIdentifier, context) + ) { + return { + context, + descriptors: [{ node, messageId: "object" }], + }; + } + } else { + return { + context, + descriptors: [{ node, messageId: "object" }], + }; + } } return { @@ -412,5 +465,5 @@ export const rule = createRule( UnaryExpression: checkUnaryExpression, UpdateExpression: checkUpdateExpression, CallExpression: checkCallExpression, - } + }, ); diff --git a/src/rules/no-classes.ts b/src/rules/no-classes.ts index 4f5b03030..2e3f8beb6 100644 --- a/src/rules/no-classes.ts +++ b/src/rules/no-classes.ts @@ -1,9 +1,12 @@ -import type { TSESLint } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { ESClass } from "~/utils/node-types"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule } from "~/utils/rule"; +import { type ESClass } from "#eslint-plugin-functional/utils/node-types"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, +} from "#eslint-plugin-functional/utils/rule"; /** * The name of this rule. @@ -18,7 +21,7 @@ type Options = [{}]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = []; +const schema: JSONSchema4[] = []; /** * The default options for the rule. @@ -40,7 +43,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Other Paradigms", description: "Disallow classes.", - recommended: "error", }, messages: errorMessages, schema, @@ -51,7 +53,7 @@ const meta: NamedCreateRuleMetaWithCategory = { */ function checkClass( node: ESClass, - context: TSESLint.RuleContext + context: Readonly>, ): RuleResult { // All class nodes violate this rule. return { context, descriptors: [{ node, messageId: "generic" }] }; @@ -62,5 +64,5 @@ export const rule = createRule( name, meta, defaultOptions, - { ClassDeclaration: checkClass, ClassExpression: checkClass } + { ClassDeclaration: checkClass, ClassExpression: checkClass }, ); diff --git a/src/rules/no-conditional-statements.ts b/src/rules/no-conditional-statements.ts index b54c5e20a..41a516928 100644 --- a/src/rules/no-conditional-statements.ts +++ b/src/rules/no-conditional-statements.ts @@ -1,20 +1,25 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; -import type { Type } from "typescript"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; +import { type Type } from "typescript"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule, getTypeOfNode } from "~/utils/rule"; +import tsApiUtils from "#eslint-plugin-functional/conditional-imports/ts-api-utils"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, + getTypeOfNode, +} from "#eslint-plugin-functional/utils/rule"; import { isBlockStatement, isBreakStatement, isContinueStatement, isExpressionStatement, isIfStatement, - isNeverType, isReturnStatement, isSwitchStatement, isThrowStatement, -} from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -27,13 +32,13 @@ export const name = "no-conditional-statements" as const; type Options = [ { allowReturningBranches: boolean | "ifExhaustive"; - } + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", properties: { @@ -82,7 +87,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Statements", description: "Disallow conditional statements.", - recommended: "error", }, messages: errorMessages, schema, @@ -95,7 +99,7 @@ const meta: NamedCreateRuleMetaWithCategory = { * @returns A violation rule result. */ function incompleteBranchViolation( - node: TSESTree.Node + node: TSESTree.Node, ): RuleResult["descriptors"] { return [{ node, messageId: "incompleteBranch" }]; } @@ -104,16 +108,17 @@ function incompleteBranchViolation( * Get a function that tests if the given statement is never returning. */ function getIsNeverExpressions( - context: TSESLint.RuleContext + context: Readonly>, ) { return (statement: TSESTree.Statement) => { if (isExpressionStatement(statement)) { const expressionStatementType = getTypeOfNode( statement.expression, - context + context, ); return ( - expressionStatementType !== null && isNeverType(expressionStatementType) + expressionStatementType !== null && + tsApiUtils?.isIntrinsicNeverType(expressionStatementType) === true ); } return false; @@ -140,7 +145,7 @@ function isIfReturningBranch(statement: TSESTree.Statement) { */ function getIfBranchViolations( node: TSESTree.IfStatement, - context: TSESLint.RuleContext + context: Readonly>, ): RuleResult["descriptors"] { const branches = [node.consequent, node.alternate]; const violations = branches.filter>( @@ -152,12 +157,12 @@ function getIfBranchViolations( if (isExpressionStatement(branch)) { const expressionStatementType = getTypeOfNode( branch.expression, - context + context, ); if ( expressionStatementType !== null && - isNeverType(expressionStatementType) + tsApiUtils?.isIntrinsicNeverType(expressionStatementType) === true ) { return false; } @@ -175,7 +180,7 @@ function getIfBranchViolations( } return true; - } + }, ); return violations.flatMap(incompleteBranchViolation); @@ -199,7 +204,7 @@ function isSwitchReturningBranch(statement: TSESTree.Statement) { */ function getSwitchViolations( node: TSESTree.SwitchStatement, - context: TSESLint.RuleContext + context: Readonly>, ): RuleResult["descriptors"] { const isNeverExpressions = getIsNeverExpressions(context); @@ -241,7 +246,7 @@ function isExhaustiveIfViolation(node: TSESTree.IfStatement): boolean { */ function isExhaustiveTypeSwitchViolation( node: TSESTree.SwitchStatement, - context: TSESLint.RuleContext + context: Readonly>, ): boolean { const discriminantType = getTypeOfNode(node.discriminant, context); if (discriminantType === null || !discriminantType.isUnion()) { @@ -250,7 +255,7 @@ function isExhaustiveTypeSwitchViolation( const caseTypes = node.cases.reduce>( (types, c) => new Set([...types, getTypeOfNode(c.test!, context)!]), - new Set() + new Set(), ); return discriminantType.types.some((unionType) => !caseTypes.has(unionType)); @@ -261,7 +266,7 @@ function isExhaustiveTypeSwitchViolation( */ function isExhaustiveSwitchViolation( node: TSESTree.SwitchStatement, - context: TSESLint.RuleContext + context: Readonly>, ): boolean { return ( // No cases defined. @@ -276,8 +281,8 @@ function isExhaustiveSwitchViolation( */ function checkIfStatement( node: TSESTree.IfStatement, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [{ allowReturningBranches }] = options; @@ -299,8 +304,8 @@ function checkIfStatement( */ function checkSwitchStatement( node: TSESTree.SwitchStatement, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [{ allowReturningBranches }] = options; @@ -325,5 +330,5 @@ export const rule = createRule( { IfStatement: checkIfStatement, SwitchStatement: checkSwitchStatement, - } + }, ); diff --git a/src/rules/no-expression-statements.ts b/src/rules/no-expression-statements.ts index 2cbf04987..60b8fc74b 100644 --- a/src/rules/no-expression-statements.ts +++ b/src/rules/no-expression-statements.ts @@ -1,13 +1,30 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { + type JSONSchema4, + type JSONSchema4ObjectSchema, +} from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; import { deepmerge } from "deepmerge-ts"; -import type { JSONSchema4 } from "json-schema"; +import { isThisKeyword } from "ts-api-utils"; -import type { IgnorePatternOption } from "~/options"; -import { shouldIgnorePattern, ignorePatternOptionSchema } from "~/options"; -import { isDirectivePrologue } from "~/utils/misc"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule, getTypeOfNode } from "~/utils/rule"; -import { isVoidType, isYieldExpression } from "~/utils/type-guards"; +import tsApiUtils from "#eslint-plugin-functional/conditional-imports/ts-api-utils"; +import typescript from "#eslint-plugin-functional/conditional-imports/typescript"; +import { + type IgnoreCodePatternOption, + shouldIgnorePattern, + ignoreCodePatternOptionSchema, +} from "#eslint-plugin-functional/options"; +import { isDirectivePrologue } from "#eslint-plugin-functional/utils/misc"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, + getTypeOfNode, +} from "#eslint-plugin-functional/utils/rule"; +import { + isCallExpression, + isYieldExpression, +} from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -18,22 +35,26 @@ export const name = "no-expression-statements" as const; * The options this rule can take. */ type Options = [ - IgnorePatternOption & { + IgnoreCodePatternOption & { ignoreVoid: boolean; - } + ignoreSelfReturning: boolean; + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", - properties: deepmerge(ignorePatternOptionSchema, { + properties: deepmerge(ignoreCodePatternOptionSchema, { ignoreVoid: { type: "boolean", }, - }), + ignoreSelfReturning: { + type: "boolean", + }, + } satisfies JSONSchema4ObjectSchema["properties"]), additionalProperties: false, }, ]; @@ -44,6 +65,7 @@ const schema: JSONSchema4 = [ const defaultOptions: Options = [ { ignoreVoid: false, + ignoreSelfReturning: false, }, ]; @@ -62,7 +84,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Statements", description: "Disallow expression statements.", - recommended: "strict", }, messages: errorMessages, schema, @@ -73,13 +94,15 @@ const meta: NamedCreateRuleMetaWithCategory = { */ function checkExpressionStatement( node: TSESTree.ExpressionStatement, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; - const { ignorePattern } = optionsObject; + const { ignoreCodePattern } = optionsObject; - if (shouldIgnorePattern(node, context, ignorePattern)) { + if ( + shouldIgnorePattern(node, context, undefined, undefined, ignoreCodePattern) + ) { return { context, descriptors: [], @@ -94,18 +117,58 @@ function checkExpressionStatement( }; } - const { ignoreVoid } = optionsObject; + const { ignoreVoid, ignoreSelfReturning } = optionsObject; - if (ignoreVoid === true) { - const type = getTypeOfNode(node.expression, context); + if ( + (ignoreVoid || ignoreSelfReturning) && + isCallExpression(node.expression) + ) { + const returnType = getTypeOfNode(node.expression, context); + if (returnType === null) { + return { + context, + descriptors: [{ node, messageId: "generic" }], + }; + } - return { - context, - descriptors: - type !== null && isVoidType(type) - ? [] - : [{ node, messageId: "generic" }], - }; + if (ignoreVoid && tsApiUtils?.isIntrinsicVoidType(returnType) === true) { + return { + context, + descriptors: [], + }; + } + + if (ignoreSelfReturning) { + const type = getTypeOfNode(node.expression.callee, context); + if (type !== null) { + const declaration = type.getSymbol()?.valueDeclaration; + if ( + typescript !== undefined && + declaration !== undefined && + typescript.isFunctionLike(declaration) && + "body" in declaration && + declaration.body !== undefined && + typescript.isBlock(declaration.body) + ) { + const returnStatements = declaration.body.statements.filter( + typescript.isReturnStatement, + ); + + if ( + returnStatements.every( + (statement) => + statement.expression !== undefined && + isThisKeyword(statement.expression), + ) + ) { + return { + context, + descriptors: [], + }; + } + } + } + } } return { @@ -121,5 +184,5 @@ export const rule = createRule( defaultOptions, { ExpressionStatement: checkExpressionStatement, - } + }, ); diff --git a/src/rules/no-let.ts b/src/rules/no-let.ts index a0d494537..679255f7d 100644 --- a/src/rules/no-let.ts +++ b/src/rules/no-let.ts @@ -1,16 +1,23 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { + type JSONSchema4, + type JSONSchema4ObjectSchema, +} from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; import { deepmerge } from "deepmerge-ts"; -import type { JSONSchema4 } from "json-schema"; -import type { IgnorePatternOption } from "~/options"; import { + type IgnoreIdentifierPatternOption, shouldIgnorePattern, shouldIgnoreInFunction, - ignorePatternOptionSchema, -} from "~/options"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule } from "~/utils/rule"; -import { isInForLoopInitializer } from "~/utils/tree"; + ignoreIdentifierPatternOptionSchema, +} from "#eslint-plugin-functional/options"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, +} from "#eslint-plugin-functional/utils/rule"; +import { isInForLoopInitializer } from "#eslint-plugin-functional/utils/tree"; /** * The name of this rule. @@ -21,26 +28,26 @@ export const name = "no-let" as const; * The options this rule can take. */ type Options = [ - IgnorePatternOption & { + IgnoreIdentifierPatternOption & { allowInForLoopInit: boolean; allowInFunctions: boolean; - } + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", - properties: deepmerge(ignorePatternOptionSchema, { + properties: deepmerge(ignoreIdentifierPatternOptionSchema, { allowInForLoopInit: { type: "boolean", }, allowInFunctions: { type: "boolean", }, - }), + } satisfies JSONSchema4ObjectSchema["properties"]), additionalProperties: false, }, ]; @@ -70,7 +77,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Mutations", description: "Disallow mutable variables.", - recommended: "error", }, messages: errorMessages, schema, @@ -81,16 +87,17 @@ const meta: NamedCreateRuleMetaWithCategory = { */ function checkVariableDeclaration( node: TSESTree.VariableDeclaration, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; - const { allowInForLoopInit, ignorePattern, allowInFunctions } = optionsObject; + const { allowInForLoopInit, ignoreIdentifierPattern, allowInFunctions } = + optionsObject; if ( node.kind !== "let" || shouldIgnoreInFunction(node, context, allowInFunctions) || - shouldIgnorePattern(node, context, ignorePattern) || + shouldIgnorePattern(node, context, ignoreIdentifierPattern) || (allowInForLoopInit && isInForLoopInitializer(node)) ) { return { @@ -112,5 +119,5 @@ export const rule = createRule( defaultOptions, { VariableDeclaration: checkVariableDeclaration, - } + }, ); diff --git a/src/rules/no-loop-statements.ts b/src/rules/no-loop-statements.ts index dfc5be40c..885cdf88c 100644 --- a/src/rules/no-loop-statements.ts +++ b/src/rules/no-loop-statements.ts @@ -1,9 +1,12 @@ -import type { TSESLint } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { ESLoop } from "~/utils/node-types"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule } from "~/utils/rule"; +import { type ESLoop } from "#eslint-plugin-functional/utils/node-types"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, +} from "#eslint-plugin-functional/utils/rule"; /** * The name of this rule. @@ -18,7 +21,7 @@ type Options = [{}]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = []; +const schema: JSONSchema4[] = []; /** * The default options for the rule. @@ -40,7 +43,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Statements", description: "Disallow imperative loops.", - recommended: "error", }, messages: errorMessages, schema, @@ -51,7 +53,7 @@ const meta: NamedCreateRuleMetaWithCategory = { */ function checkLoop( node: ESLoop, - context: TSESLint.RuleContext + context: Readonly>, ): RuleResult { // All loops violate this rule. return { context, descriptors: [{ node, messageId: "generic" }] }; @@ -68,5 +70,5 @@ export const rule = createRule( ForOfStatement: checkLoop, WhileStatement: checkLoop, DoWhileStatement: checkLoop, - } + }, ); diff --git a/src/rules/no-mixed-types.ts b/src/rules/no-mixed-types.ts index 1ca27a717..6b987b605 100644 --- a/src/rules/no-mixed-types.ts +++ b/src/rules/no-mixed-types.ts @@ -1,15 +1,18 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import { AST_NODE_TYPES } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type TSESTree, AST_NODE_TYPES } from "@typescript-eslint/utils"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRuleUsingFunction } from "~/utils/rule"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRuleUsingFunction, +} from "#eslint-plugin-functional/utils/rule"; import { isIdentifier, isTSPropertySignature, isTSTypeLiteral, isTSTypeReference, -} from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -23,13 +26,13 @@ type Options = [ { checkInterfaces: boolean; checkTypeLiterals: boolean; - } + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", properties: { @@ -70,7 +73,6 @@ const meta: NamedCreateRuleMetaWithCategory = { category: "No Other Paradigms", description: "Restrict types so that only members of the same kind are allowed in them.", - recommended: "error", }, messages: errorMessages, schema, @@ -80,7 +82,7 @@ const meta: NamedCreateRuleMetaWithCategory = { * Does the given type elements violate the rule. */ function hasTypeElementViolations( - typeElements: TSESTree.TypeElement[] + typeElements: TSESTree.TypeElement[], ): boolean { type CarryType = { readonly prevMemberType: AST_NODE_TYPES | undefined; @@ -115,7 +117,7 @@ function hasTypeElementViolations( prevMemberType: undefined, prevMemberTypeAnnotation: undefined, violations: false, - } + }, ).violations; } @@ -124,8 +126,8 @@ function hasTypeElementViolations( */ function checkTSInterfaceDeclaration( node: TSESTree.TSInterfaceDeclaration, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { return { context, @@ -140,8 +142,8 @@ function checkTSInterfaceDeclaration( */ function checkTSTypeAliasDeclaration( node: TSESTree.TSTypeAliasDeclaration, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { return { context, @@ -156,7 +158,7 @@ function checkTSTypeAliasDeclaration( node.typeAnnotation.typeParameters.params.length === 1 && isTSTypeLiteral(node.typeAnnotation.typeParameters.params[0]!) && hasTypeElementViolations( - node.typeAnnotation.typeParameters.params[0].members + node.typeAnnotation.typeParameters.params[0].members, )) ? [{ node, messageId: "generic" }] : [], @@ -170,8 +172,7 @@ export const rule = createRuleUsingFunction< >(name, meta, defaultOptions, (context, options) => { const [{ checkInterfaces, checkTypeLiterals }] = options; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return Object.fromEntries( + return Object.fromEntries( ( [ [ @@ -183,6 +184,6 @@ export const rule = createRuleUsingFunction< checkTypeLiterals ? checkTSTypeAliasDeclaration : undefined, ], ] as const - ).filter(([sel, fn]) => fn !== undefined) - ); + ).filter(([sel, fn]) => fn !== undefined), + ) as Record; }); diff --git a/src/rules/no-promise-reject.ts b/src/rules/no-promise-reject.ts index ee3f1d546..e4b6d4bd3 100644 --- a/src/rules/no-promise-reject.ts +++ b/src/rules/no-promise-reject.ts @@ -1,9 +1,16 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule } from "~/utils/rule"; -import { isIdentifier, isMemberExpression } from "~/utils/type-guards"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, +} from "#eslint-plugin-functional/utils/rule"; +import { + isIdentifier, + isMemberExpression, +} from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -18,7 +25,7 @@ type Options = [{}]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = []; +const schema: JSONSchema4[] = []; /** * The default options for the rule. @@ -40,7 +47,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Exceptions", description: "Disallow try-catch[-finally] and try-finally patterns.", - recommended: false, }, messages: errorMessages, schema, @@ -51,7 +57,7 @@ const meta: NamedCreateRuleMetaWithCategory = { */ function checkCallExpression( node: TSESTree.CallExpression, - context: TSESLint.RuleContext + context: Readonly>, ): RuleResult { return { context, @@ -73,5 +79,5 @@ export const rule = createRule( defaultOptions, { CallExpression: checkCallExpression, - } + }, ); diff --git a/src/rules/no-return-void.ts b/src/rules/no-return-void.ts index f810ab731..64fc3278f 100644 --- a/src/rules/no-return-void.ts +++ b/src/rules/no-return-void.ts @@ -1,18 +1,20 @@ -import type { TSESLint } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { ESFunctionType } from "~/utils/node-types"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule, getTypeOfNode } from "~/utils/rule"; +import tsApiUtils from "#eslint-plugin-functional/conditional-imports/ts-api-utils"; +import { type ESFunctionType } from "#eslint-plugin-functional/utils/node-types"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, + getTypeOfNode, +} from "#eslint-plugin-functional/utils/rule"; import { isFunctionLike, - isNullType, isTSNullKeyword, isTSUndefinedKeyword, isTSVoidKeyword, - isUndefinedType, - isVoidType, -} from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -27,13 +29,13 @@ type Options = [ allowNull: boolean; allowUndefined: boolean; ignoreInferredTypes: boolean; - } + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", properties: { @@ -77,7 +79,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Statements", description: "Disallow functions that don't return anything.", - recommended: "error", }, messages: errorMessages, schema, @@ -88,8 +89,8 @@ const meta: NamedCreateRuleMetaWithCategory = { */ function checkFunction( node: ESFunctionType, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [{ ignoreInferredTypes, allowNull, allowUndefined }] = options; @@ -102,9 +103,10 @@ function checkFunction( if ( returnType !== undefined && - (isVoidType(returnType) || - (!allowNull && isNullType(returnType)) || - (!allowUndefined && isUndefinedType(returnType))) + tsApiUtils !== undefined && + (tsApiUtils.isIntrinsicVoidType(returnType) || + (!allowNull && tsApiUtils.isIntrinsicNullType(returnType)) || + (!allowUndefined && tsApiUtils.isIntrinsicUndefinedType(returnType))) ) { return { context, @@ -144,5 +146,5 @@ export const rule = createRule( TSEmptyBodyFunctionExpression: checkFunction, TSFunctionType: checkFunction, TSMethodSignature: checkFunction, - } + }, ); diff --git a/src/rules/no-this-expressions.ts b/src/rules/no-this-expressions.ts index a93271402..4c6117506 100644 --- a/src/rules/no-this-expressions.ts +++ b/src/rules/no-this-expressions.ts @@ -1,8 +1,12 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule } from "~/utils/rule"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, +} from "#eslint-plugin-functional/utils/rule"; /** * The name of this rule. @@ -17,7 +21,7 @@ type Options = [{}]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = []; +const schema: JSONSchema4[] = []; /** * The default options for the rule. @@ -39,7 +43,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Other Paradigms", description: "Disallow this access.", - recommended: "strict", }, messages: errorMessages, schema, @@ -50,7 +53,7 @@ const meta: NamedCreateRuleMetaWithCategory = { */ function checkThisExpression( node: TSESTree.ThisExpression, - context: TSESLint.RuleContext + context: Readonly>, ): RuleResult { // All throw statements violate this rule. return { context, descriptors: [{ node, messageId: "generic" }] }; @@ -63,5 +66,5 @@ export const rule = createRule( defaultOptions, { ThisExpression: checkThisExpression, - } + }, ); diff --git a/src/rules/no-throw-statements.ts b/src/rules/no-throw-statements.ts index 7adf2acb9..76399410b 100644 --- a/src/rules/no-throw-statements.ts +++ b/src/rules/no-throw-statements.ts @@ -1,9 +1,13 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule } from "~/utils/rule"; -import { isInFunctionBody } from "~/utils/tree"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, +} from "#eslint-plugin-functional/utils/rule"; +import { isInFunctionBody } from "#eslint-plugin-functional/utils/tree"; /** * The name of this rule. @@ -16,13 +20,13 @@ export const name = "no-throw-statements" as const; type Options = [ { allowInAsyncFunctions: boolean; - } + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", properties: { @@ -58,7 +62,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Exceptions", description: "Disallow throwing exceptions.", - recommended: "error", }, messages: errorMessages, schema, @@ -69,8 +72,8 @@ const meta: NamedCreateRuleMetaWithCategory = { */ function checkThrowStatement( node: TSESTree.ThrowStatement, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [{ allowInAsyncFunctions }] = options; @@ -91,5 +94,5 @@ export const rule = createRule( defaultOptions, { ThrowStatement: checkThrowStatement, - } + }, ); diff --git a/src/rules/no-try-statements.ts b/src/rules/no-try-statements.ts index 9548eda15..b9d827154 100644 --- a/src/rules/no-try-statements.ts +++ b/src/rules/no-try-statements.ts @@ -1,8 +1,12 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule } from "~/utils/rule"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, +} from "#eslint-plugin-functional/utils/rule"; /** * The name of this rule. @@ -16,13 +20,13 @@ type Options = [ { allowCatch: boolean; allowFinally: boolean; - } + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", properties: { @@ -63,7 +67,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Exceptions", description: "Disallow try-catch[-finally] and try-finally patterns.", - recommended: "strict", }, messages: errorMessages, schema, @@ -74,8 +77,8 @@ const meta: NamedCreateRuleMetaWithCategory = { */ function checkTryStatement( node: TSESTree.TryStatement, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [{ allowCatch, allowFinally }] = options; @@ -97,5 +100,5 @@ export const rule = createRule( defaultOptions, { TryStatement: checkTryStatement, - } + }, ); diff --git a/src/rules/prefer-immutable-types.ts b/src/rules/prefer-immutable-types.ts index d2427e20d..c4b162c49 100644 --- a/src/rules/prefer-immutable-types.ts +++ b/src/rules/prefer-immutable-types.ts @@ -1,24 +1,32 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { + type JSONSchema4, + type JSONSchema4ObjectSchema, +} from "@typescript-eslint/utils/json-schema"; +import { + type ReportFixFunction, + type RuleContext, +} from "@typescript-eslint/utils/ts-eslint"; import { deepmerge } from "deepmerge-ts"; import { Immutability } from "is-immutable-type"; -import type { JSONSchema4 } from "json-schema"; -import type { IgnoreClassesOption } from "~/options"; import { + type IgnoreClassesOption, ignoreClassesOptionSchema, shouldIgnoreClasses, shouldIgnoreInFunction, shouldIgnorePattern, -} from "~/options"; -import type { ESFunctionType } from "~/utils/node-types"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; +} from "#eslint-plugin-functional/options"; +import { type ESFunctionType } from "#eslint-plugin-functional/utils/node-types"; import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, createRule, getReturnTypesOfFunction, getTypeImmutabilityOfNode, getTypeImmutabilityOfType, isImplementationOfOverload, -} from "~/utils/rule"; +} from "#eslint-plugin-functional/utils/rule"; import { hasID, isArrayPattern, @@ -31,7 +39,7 @@ import { isPropertyDefinition, isTSParameterProperty, isTSTypePredicate, -} from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -55,11 +63,27 @@ type FixerConfigRaw = { replace: string; }; +type FixerConfigRawMap = Partial< + Record< + "ReadonlyShallow" | "ReadonlyDeep" | "Immutable", + FixerConfigRaw | FixerConfigRaw[] | undefined + > +>; + +type SuggestionConfigRawMap = Partial< + Record< + "ReadonlyShallow" | "ReadonlyDeep" | "Immutable", + FixerConfigRaw[][] | undefined + > +>; + type FixerConfig = { pattern: RegExp; replace: string; }; +type SuggestionsConfig = FixerConfig[]; + /** * The options this rule can take. */ @@ -74,13 +98,9 @@ type Options = [ } > | RawEnforcement; - fixer: - | Record< - "ReadonlyShallow" | "ReadonlyDeep" | "Immutable", - FixerConfigRaw | FixerConfigRaw[] | false | undefined - > - | false; - } + fixer?: FixerConfigRawMap; + suggestions?: SuggestionConfigRawMap; + }, ]; /** @@ -92,7 +112,7 @@ const enforcementEnumOptions = [ i !== Immutability.Unknown && i !== Immutability[Immutability.Unknown] && i !== Immutability.Mutable && - i !== Immutability[Immutability.Mutable] + i !== Immutability[Immutability.Mutable], ), "None", false, @@ -101,27 +121,30 @@ const enforcementEnumOptions = [ /** * The non-shorthand schema for each option. */ -const optionExpandedSchema: JSONSchema4 = deepmerge(ignoreClassesOptionSchema, { - enforcement: { - type: ["string", "number", "boolean"], - enum: enforcementEnumOptions, - }, - ignoreInferredTypes: { - type: "boolean", - }, - ignoreNamePattern: { - type: ["string", "array"], - items: { - type: "string", +const optionExpandedSchema: JSONSchema4ObjectSchema["properties"] = deepmerge( + ignoreClassesOptionSchema, + { + enforcement: { + type: ["string", "number", "boolean"], + enum: enforcementEnumOptions, }, - }, - ignoreTypePattern: { - type: ["string", "array"], - items: { - type: "string", + ignoreInferredTypes: { + type: "boolean", }, - }, -}); + ignoreNamePattern: { + type: ["string", "array"], + items: { + type: "string", + }, + }, + ignoreTypePattern: { + type: ["string", "array"], + items: { + type: "string", + }, + }, + } satisfies JSONSchema4ObjectSchema["properties"], +); /** * The schema for each option. @@ -145,10 +168,6 @@ const optionSchema: JSONSchema4 = { */ const fixerSchema: JSONSchema4 = { oneOf: [ - { - type: "boolean", - enum: [false], - }, { type: "object", properties: { @@ -171,10 +190,25 @@ const fixerSchema: JSONSchema4 = { ], }; +const suggestionsSchema: JSONSchema4 = { + type: "array", + items: { + type: "array", + items: { + type: "object", + properties: { + pattern: { type: "string" }, + replace: { type: "string" }, + }, + additionalProperties: false, + }, + }, +}; + /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", properties: deepmerge(optionExpandedSchema, { @@ -198,21 +232,22 @@ const schema: JSONSchema4 = [ ], }, fixer: { - oneOf: [ - { - type: "boolean", - enum: [false], - }, - { - type: "object", - properties: { - ReadonlyShallow: fixerSchema, - ReadonlyDeep: fixerSchema, - Immutable: fixerSchema, - }, - additionalProperties: false, - }, - ], + type: "object", + properties: { + ReadonlyShallow: fixerSchema, + ReadonlyDeep: fixerSchema, + Immutable: fixerSchema, + }, + additionalProperties: false, + }, + suggestions: { + type: "object", + properties: { + ReadonlyShallow: suggestionsSchema, + ReadonlyDeep: suggestionsSchema, + Immutable: suggestionsSchema, + }, + additionalProperties: false, }, }), additionalProperties: false, @@ -227,24 +262,24 @@ const defaultOptions: Options = [ enforcement: Immutability.Immutable, ignoreInferredTypes: false, ignoreClasses: false, - fixer: { + suggestions: { ReadonlyShallow: [ - { - pattern: - "^([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*\\[\\])$", - replace: "readonly $1", - }, - { - pattern: "^(Array|Map|Set)<(.+)>$", - replace: "Readonly$1<$2>", - }, - { - pattern: "^(.+)$", - replace: "Readonly<$1>", - }, + [ + { + pattern: + "^([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*\\[\\])$", + replace: "readonly $1", + }, + { + pattern: "^(Array|Map|Set)<(.+)>$", + replace: "Readonly$1<$2>", + }, + { + pattern: "^(.+)$", + replace: "Readonly<$1>", + }, + ], ], - ReadonlyDeep: false, - Immutable: false, }, }, ]; @@ -273,9 +308,9 @@ const meta: NamedCreateRuleMetaWithCategory = { category: "No Mutations", description: "Require function parameters to be typed as certain immutability", - recommended: "error", }, fixable: "code", + hasSuggestions: true, messages: errorMessages, schema, }; @@ -285,15 +320,46 @@ type Descriptor = RuleResult< Options >["descriptors"][number]; +type AllFixers = { + fix: ReportFixFunction | null; + suggestionFixers: ReportFixFunction[] | null; +}; + +/** + * Get the fixer and the suggestions' fixers. + */ +function getAllFixers( + node: TSESTree.Node, + context: Readonly>, + fixerConfigs: FixerConfig[] | false, + suggestionsConfigs: SuggestionsConfig[] | false, +): AllFixers { + const nodeText = context + .getSourceCode() + .getText(node) + .replaceAll(/\s+/gmu, " "); + + const fix = + fixerConfigs === false + ? null + : getConfiuredFixer(node, nodeText, fixerConfigs); + + const suggestionFixers = + suggestionsConfigs === false + ? null + : getConfiuredSuggestionFixers(node, nodeText, suggestionsConfigs); + + return { fix, suggestionFixers }; +} + /** * Get a fixer that uses the user config. */ -function getConfiuredFixer( - node: T, - context: TSESLint.RuleContext, - configs: FixerConfig[] +function getConfiuredFixer( + node: TSESTree.Node, + text: string, + configs: FixerConfig[], ): NonNullable | null { - const text = context.getSourceCode().getText(node).replaceAll(/\s+/gmu, " "); const config = configs.find((c) => c.pattern.test(text)); if (config === undefined) { return null; @@ -302,6 +368,26 @@ function getConfiuredFixer( fixer.replaceText(node, text.replace(config.pattern, config.replace)); } +/** + * Get a fixer that uses the user config. + */ +function getConfiuredSuggestionFixers( + node: TSESTree.Node, + text: string, + suggestionsConfigs: SuggestionsConfig[], +) { + return suggestionsConfigs + .map((configs): NonNullable | null => { + const config = configs.find((c) => c.pattern.test(text)); + if (config === undefined) { + return null; + } + return (fixer) => + fixer.replaceText(node, text.replace(config.pattern, config.replace)); + }) + .filter(isDefined); +} + /** * Get the level of enforcement from the raw value given. */ @@ -318,16 +404,13 @@ function parseEnforcement(rawEnforcement: RawEnforcement) { */ function parseFixerConfigs( allRawConfigs: Options[0]["fixer"], - enforcement: Immutability + enforcement: Immutability, ): FixerConfig[] | false { - if (allRawConfigs === false) { - return false; - } - const key = Immutability[enforcement] as keyof typeof allRawConfigs; - const rawConfigs = - allRawConfigs[key] ?? - (defaultOptions[0].fixer === false ? false : defaultOptions[0].fixer[key]); - if (rawConfigs === undefined || rawConfigs === false) { + const key = Immutability[enforcement] as keyof NonNullable< + typeof allRawConfigs + >; + const rawConfigs = allRawConfigs?.[key]; + if (rawConfigs === undefined) { return false; } const raws = Array.isArray(rawConfigs) ? rawConfigs : [rawConfigs]; @@ -337,16 +420,42 @@ function parseFixerConfigs( })); } +/** + * Get the suggestions config for the the given enforcement level from the raw config given. + */ +function parseSuggestionsConfigs( + rawSuggestions: Options[0]["suggestions"], + enforcement: Immutability, +): SuggestionsConfig[] | false { + const key = Immutability[enforcement] as keyof NonNullable< + typeof rawSuggestions + >; + const rawConfigsSet = rawSuggestions?.[key]; + if (rawConfigsSet === undefined) { + return false; + } + return rawConfigsSet.map((rawConfigs) => + rawConfigs.map((rawConfig) => ({ + ...rawConfig, + pattern: new RegExp(rawConfig.pattern, "u"), + })), + ); +} + /** * Get the parameter type violations. */ function getParameterTypeViolations( node: ESFunctionType, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): Descriptor[] { const [optionsObject] = options; - const { parameters: rawOption, fixer: rawFixerConfig } = optionsObject; + const { + parameters: rawOption, + fixer: rawFixerConfig, + suggestions: rawSuggestionsConfigs, + } = optionsObject; const { enforcement: rawEnforcement, ignoreInferredTypes, @@ -366,7 +475,7 @@ function getParameterTypeViolations( }; const enforcement = parseEnforcement( - rawEnforcement ?? optionsObject.enforcement + rawEnforcement ?? optionsObject.enforcement, ); if ( enforcement === false || @@ -376,6 +485,10 @@ function getParameterTypeViolations( } const fixerConfigs = parseFixerConfigs(rawFixerConfig, enforcement); + const suggestionsConfigs = parseSuggestionsConfigs( + rawSuggestionsConfigs, + enforcement, + ); return node.params .map((param): Descriptor | undefined => { @@ -384,14 +497,21 @@ function getParameterTypeViolations( } const parameterProperty = isTSParameterProperty(param); - if (parameterProperty && param.readonly !== true) { + if (parameterProperty && !param.readonly) { + const messageId = "propertyModifier"; + const fix: NonNullable | null = (fixer) => + fixer.insertTextBefore(param.parameter, "readonly "); + return { node: param, - messageId: "propertyModifier", - fix: - rawFixerConfig === false - ? null - : (fixer) => fixer.insertTextBefore(param.parameter, "readonly "), + messageId, + fix: fixerConfigs === false ? null : fix, + suggest: [ + { + messageId, + fix, + }, + ], }; } @@ -405,7 +525,7 @@ function getParameterTypeViolations( shouldIgnorePattern( actualParam.typeAnnotation, context, - ignoreTypePattern + ignoreTypePattern, )) || // type guard (node.returnType !== undefined && @@ -421,30 +541,40 @@ function getParameterTypeViolations( const immutability = getTypeImmutabilityOfNode( actualParam, context, - enforcement + enforcement, ); if (immutability >= enforcement) { return undefined; } - const fix = - fixerConfigs === false || actualParam.typeAnnotation === undefined - ? null - : getConfiuredFixer( + const { fix, suggestionFixers } = + actualParam.typeAnnotation === undefined + ? ({} as AllFixers) + : getAllFixers( actualParam.typeAnnotation.typeAnnotation, context, - fixerConfigs + fixerConfigs, + suggestionsConfigs, ); + const messageId = "parameter"; + const data = { + actual: Immutability[immutability], + expected: Immutability[enforcement], + }; + return { node: actualParam, - messageId: "parameter", - data: { - actual: Immutability[immutability], - expected: Immutability[enforcement], - }, + messageId, + data, fix, + suggest: + suggestionFixers?.map((fix) => ({ + messageId, + data, + fix, + })) ?? null, }; }) .filter(isDefined); @@ -455,11 +585,15 @@ function getParameterTypeViolations( */ function getReturnTypeViolations( node: ESFunctionType, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): Descriptor[] { const [optionsObject] = options; - const { returnTypes: rawOption, fixer: rawFixerConfig } = optionsObject; + const { + returnTypes: rawOption, + fixer: rawFixerConfig, + suggestions: rawSuggestionsConfigs, + } = optionsObject; const { enforcement: rawEnforcement, ignoreInferredTypes, @@ -475,7 +609,7 @@ function getReturnTypeViolations( }; const enforcement = parseEnforcement( - rawEnforcement ?? optionsObject.enforcement + rawEnforcement ?? optionsObject.enforcement, ); if ( @@ -488,6 +622,10 @@ function getReturnTypeViolations( } const fixerConfigs = parseFixerConfigs(rawFixerConfig, enforcement); + const suggestionsConfigs = parseSuggestionsConfigs( + rawSuggestionsConfigs, + enforcement, + ); if ( node.returnType?.typeAnnotation !== undefined && @@ -500,31 +638,38 @@ function getReturnTypeViolations( const immutability = getTypeImmutabilityOfNode( node.returnType.typeAnnotation, context, - enforcement + enforcement, ); if (immutability >= enforcement) { return []; } - const fix = - fixerConfigs === false - ? null - : getConfiuredFixer( - node.returnType.typeAnnotation, - context, - fixerConfigs - ); + const { fix, suggestionFixers } = getAllFixers( + node.returnType.typeAnnotation, + context, + fixerConfigs, + suggestionsConfigs, + ); + + const messageId = "returnType"; + const data = { + actual: Immutability[immutability], + expected: Immutability[enforcement], + }; return [ { node: node.returnType, - messageId: "returnType", - data: { - actual: Immutability[immutability], - expected: Immutability[enforcement], - }, + messageId, + data, fix, + suggest: + suggestionFixers?.map((fix) => ({ + messageId, + data, + fix, + })) ?? null, }, ]; } @@ -545,31 +690,41 @@ function getReturnTypeViolations( const immutability = getTypeImmutabilityOfType( returnTypes[0]!, context, - enforcement + enforcement, ); if (immutability >= enforcement) { return []; } - const fix = - fixerConfigs === false || node.returnType?.typeAnnotation === undefined - ? null - : getConfiuredFixer( + const { fix, suggestionFixers } = + node.returnType?.typeAnnotation === undefined + ? ({} as AllFixers) + : getAllFixers( node.returnType.typeAnnotation, context, - fixerConfigs + fixerConfigs, + suggestionsConfigs, ); + const messageId = "returnType"; + const data = { + actual: Immutability[immutability], + expected: Immutability[enforcement], + }; + return [ { node: hasID(node) && node.id !== null ? node.id : node, - messageId: "returnType", - data: { - actual: Immutability[immutability], - expected: Immutability[enforcement], - }, + messageId, + data, fix, + suggest: + suggestionFixers?.map((fix) => ({ + messageId, + data, + fix, + })) ?? null, }, ]; } @@ -579,8 +734,8 @@ function getReturnTypeViolations( */ function checkFunction( node: ESFunctionType, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const descriptors = [ ...getParameterTypeViolations(node, context, options), @@ -598,12 +753,16 @@ function checkFunction( */ function checkVarible( node: TSESTree.VariableDeclarator | TSESTree.PropertyDefinition, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; - const { variables: rawOption, fixer: rawFixerConfig } = optionsObject; + const { + variables: rawOption, + fixer: rawFixerConfig, + suggestions: rawSuggestionsConfigs, + } = optionsObject; const { enforcement: rawEnforcement, ignoreInferredTypes, @@ -621,7 +780,7 @@ function checkVarible( }; const enforcement = parseEnforcement( - rawEnforcement ?? optionsObject.enforcement + rawEnforcement ?? optionsObject.enforcement, ); if ( @@ -638,17 +797,24 @@ function checkVarible( const propertyDefinition = isPropertyDefinition(node); - if (propertyDefinition && node.readonly !== true) { + if (propertyDefinition && !node.readonly) { + const fix: NonNullable | null = (fixer) => + fixer.insertTextBefore(node.key, "readonly "); + + const messageId = "propertyModifier"; return { context, descriptors: [ { node, - messageId: "propertyModifier", - fix: - rawFixerConfig === false - ? null - : (fixer) => fixer.insertTextBefore(node.key, "readonly "), + messageId, + fix: rawFixerConfig === undefined ? null : fix, + suggest: [ + { + messageId, + fix, + }, + ], }, ], }; @@ -671,7 +837,7 @@ function checkVarible( shouldIgnorePattern( nodeWithTypeAnnotation.typeAnnotation, context, - ignoreTypePattern + ignoreTypePattern, ) ) { return { @@ -694,7 +860,7 @@ function checkVarible( const immutability = getTypeImmutabilityOfNode( element, context, - enforcement + enforcement, ); if (immutability >= enforcement) { @@ -702,34 +868,51 @@ function checkVarible( } const fixerConfigs = parseFixerConfigs(rawFixerConfig, enforcement); - const fix = - fixerConfigs === false || + const suggestionsConfigs = parseSuggestionsConfigs( + rawSuggestionsConfigs, + enforcement, + ); + + const { fix, suggestionFixers } = isMemberExpression(element) || isProperty(element) || element.typeAnnotation === undefined - ? null - : getConfiuredFixer( + ? ({} as AllFixers) + : getAllFixers( element.typeAnnotation.typeAnnotation, context, - fixerConfigs + fixerConfigs, + suggestionsConfigs, ); - return { element, immutability, fix }; + return { element, immutability, fix, suggestionFixers }; }); + const messageId = propertyDefinition ? "propertyImmutability" : "variable"; + return { context, descriptors: elementResults .filter(isDefined) - .map(({ element, immutability, fix }) => ({ - node: element, - messageId: propertyDefinition ? "propertyImmutability" : "variable", - data: { + .map(({ element, immutability, fix, suggestionFixers }) => { + const data = { actual: Immutability[immutability], expected: Immutability[enforcement], - }, - fix, - })), + }; + + return { + node: element, + messageId, + data, + fix, + suggest: + suggestionFixers?.map((fix) => ({ + messageId, + data, + fix, + })) ?? null, + }; + }), }; } @@ -750,5 +933,5 @@ export const rule = createRule( TSMethodSignature: checkFunction, PropertyDefinition: checkVarible, VariableDeclarator: checkVarible, - } + }, ); diff --git a/src/rules/prefer-property-signatures.ts b/src/rules/prefer-property-signatures.ts index dc8af542a..9531f37cd 100644 --- a/src/rules/prefer-property-signatures.ts +++ b/src/rules/prefer-property-signatures.ts @@ -1,9 +1,13 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule } from "~/utils/rule"; -import { isInReadonly } from "~/utils/tree"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, +} from "#eslint-plugin-functional/utils/rule"; +import { isInReadonly } from "#eslint-plugin-functional/utils/tree"; /** * The name of this rule. @@ -16,13 +20,13 @@ export const name = "prefer-property-signatures" as const; type Options = [ { ignoreIfReadonlyWrapped: boolean; - } + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", properties: { @@ -59,7 +63,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "Stylistic", description: "Prefer property signatures over method signatures.", - recommended: false, }, messages: errorMessages, schema, @@ -70,8 +73,8 @@ const meta: NamedCreateRuleMetaWithCategory = { */ function checkTSMethodSignature( node: TSESTree.TSMethodSignature, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [{ ignoreIfReadonlyWrapped }] = options; @@ -90,5 +93,5 @@ export const rule = createRule( defaultOptions, { TSMethodSignature: checkTSMethodSignature, - } + }, ); diff --git a/src/rules/prefer-readonly-type.ts b/src/rules/prefer-readonly-type.ts index 893af5d14..4d0c87bba 100644 --- a/src/rules/prefer-readonly-type.ts +++ b/src/rules/prefer-readonly-type.ts @@ -1,23 +1,26 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { - IgnorePatternOption, - IgnoreAccessorPatternOption, -} from "~/options"; import { + type IgnoreCodePatternOption, + type IgnoreAccessorPatternOption, shouldIgnoreInFunction, shouldIgnoreClasses, shouldIgnorePattern, -} from "~/options"; -import type { ESArrayTupleType } from "~/utils/node-types"; -import type { - BaseOptions, - RuleResult, - NamedCreateRuleMetaWithCategory, -} from "~/utils/rule"; -import { createRule, getTypeOfNode } from "~/utils/rule"; -import { isInInterface, isInReturnType } from "~/utils/tree"; +} from "#eslint-plugin-functional/options"; +import { type ESArrayTupleType } from "#eslint-plugin-functional/utils/node-types"; +import { + type BaseOptions, + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, + getTypeOfNode, +} from "#eslint-plugin-functional/utils/rule"; +import { + isInInterface, + isInReturnType, +} from "#eslint-plugin-functional/utils/tree"; import { isArrayType, isAssignmentPattern, @@ -32,7 +35,7 @@ import { isTSTypeLiteral, isTSTypeOperator, isTSTypeReference, -} from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -51,13 +54,13 @@ type Options = [ ignoreClass: boolean | "fieldsOnly"; ignoreInterface: boolean; ignorePattern?: string[] | string; - } + }, ]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", properties: { @@ -136,7 +139,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Mutations", description: "Prefer readonly types over mutable types.", - recommended: "error", }, messages: errorMessages, fixable: "code", @@ -150,14 +152,17 @@ const mutableToImmutableTypes = new Map([ ]); const mutableTypeRegex = new RegExp( `^${[...mutableToImmutableTypes.keys()].join("|")}$`, - "u" + "u", ); +/** + * For backwards compatibility. + */ function shouldIgnorePattern2( node: TSESTree.Node, - context: TSESLint.RuleContext, - ignorePattern: Partial["ignorePattern"], - ignoreAccessorPattern?: Partial["ignoreAccessorPattern"] + context: Readonly>, + ignorePattern: Partial["ignoreCodePattern"], + ignoreAccessorPattern?: Partial["ignoreAccessorPattern"], ): boolean { const isTypeNode = isTSArrayType(node) || @@ -169,10 +174,10 @@ function shouldIgnorePattern2( if (isTypeNode) { return shouldIgnorePattern2( - node.parent!, + node.parent, context, ignorePattern, - ignoreAccessorPattern + ignoreAccessorPattern, ); } @@ -180,7 +185,7 @@ function shouldIgnorePattern2( node, context, ignorePattern, - ignoreAccessorPattern + ignoreAccessorPattern, ); } @@ -189,8 +194,8 @@ function shouldIgnorePattern2( */ function checkArrayOrTupleType( node: ESArrayTupleType, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; const { @@ -204,7 +209,7 @@ function checkArrayOrTupleType( if ( shouldIgnoreClasses(node, context, ignoreClass) || - (ignoreInterface === true && isInInterface(node)) || + (ignoreInterface && isInInterface(node)) || shouldIgnoreInFunction(node, context, allowLocalMutation) || shouldIgnorePattern2(node, context, ignorePattern) || ignoreCollections @@ -231,14 +236,14 @@ function checkArrayOrTupleType( ? (fixer) => [ fixer.insertTextBefore( node as TSESTree.Node, - "(readonly " + "(readonly ", ), fixer.insertTextAfter(node as TSESTree.Node, ")"), ] : (fixer) => fixer.insertTextBefore( node as TSESTree.Node, - "readonly " + "readonly ", ), }, ] @@ -251,8 +256,8 @@ function checkArrayOrTupleType( */ function checkMappedType( node: TSESTree.TSMappedType, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; const { allowLocalMutation, ignoreClass, ignoreInterface, ignorePattern } = @@ -260,7 +265,7 @@ function checkMappedType( if ( shouldIgnoreClasses(node, context, ignoreClass) || - (ignoreInterface === true && isInInterface(node)) || + (ignoreInterface && isInInterface(node)) || shouldIgnoreInFunction(node, context, allowLocalMutation) || shouldIgnorePattern2(node, context, ignorePattern) ) { @@ -282,7 +287,7 @@ function checkMappedType( fix: (fixer) => fixer.insertTextBeforeRange( [node.range[0] + 1, node.range[1]], - " readonly" + " readonly", ), }, ], @@ -294,8 +299,8 @@ function checkMappedType( */ function checkTypeReference( node: TSESTree.TSTypeReference, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; const { @@ -309,7 +314,7 @@ function checkTypeReference( if ( shouldIgnoreClasses(node, context, ignoreClass) || - (ignoreInterface === true && isInInterface(node)) || + (ignoreInterface && isInInterface(node)) || shouldIgnoreInFunction(node, context, allowLocalMutation) || shouldIgnorePattern2(node, context, ignorePattern) ) { @@ -340,7 +345,7 @@ function checkTypeReference( fix: (fixer) => fixer.replaceText( node.typeName as TSESTree.Node, - immutableType + immutableType, ), }, ] @@ -362,8 +367,8 @@ function checkProperty( | TSESTree.TSIndexSignature | TSESTree.TSParameterProperty | TSESTree.TSPropertySignature, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; const { @@ -376,7 +381,7 @@ function checkProperty( if ( shouldIgnoreClasses(node, context, ignoreClass) || - (ignoreInterface === true && isInInterface(node)) || + (ignoreInterface && isInInterface(node)) || shouldIgnoreInFunction(node, context, allowLocalMutation) || shouldIgnorePattern2(node, context, ignorePattern) ) { @@ -389,8 +394,7 @@ function checkProperty( return { context, descriptors: - node.readonly !== true && - (!allowMutableReturnType || !isInReturnType(node)) + !node.readonly && (!allowMutableReturnType || !isInReturnType(node)) ? [ { node, @@ -403,12 +407,12 @@ function checkProperty( ? (fixer) => fixer.insertTextBefore( node.parameter as TSESTree.Node, - "readonly " + "readonly ", ) : (fixer) => fixer.insertTextBefore( node.key as TSESTree.Node, - "readonly " + "readonly ", ), }, ] @@ -425,8 +429,8 @@ function checkImplicitType( | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.VariableDeclaration, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; const { @@ -441,7 +445,7 @@ function checkImplicitType( if ( !checkImplicit || shouldIgnoreClasses(node, context, ignoreClass) || - (ignoreInterface === true && isInInterface(node)) || + (ignoreInterface && isInInterface(node)) || shouldIgnoreInFunction(node, context, allowLocalMutation) || shouldIgnorePattern2(node, context, ignorePattern) ) { @@ -466,7 +470,7 @@ function checkImplicitType( init: param.right, node: param, } as Declarator) - : undefined + : undefined, ) .filter((param): param is Declarator => param !== undefined) : node.declarations.map( @@ -475,7 +479,7 @@ function checkImplicitType( id: declaration.id, init: declaration.init, node: declaration, - } as Declarator) + }) as Declarator, ); return { @@ -494,7 +498,7 @@ function checkImplicitType( fixer.insertTextAfter(declarator.id, ": readonly unknown[]"), }, ] - : [] + : [], ), }; } @@ -517,5 +521,5 @@ export const rule = createRule( TSMappedType: checkMappedType, TSTypeReference: checkTypeReference, VariableDeclaration: checkImplicitType, - } + }, ); diff --git a/src/rules/prefer-tacit.ts b/src/rules/prefer-tacit.ts index 07bbf91ee..a3051c0c4 100644 --- a/src/rules/prefer-tacit.ts +++ b/src/rules/prefer-tacit.ts @@ -1,16 +1,25 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import { deepmerge } from "deepmerge-ts"; -import type { JSONSchema4 } from "json-schema"; +import { TSESTree } from "@typescript-eslint/utils"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { + type RuleFix, + type RuleFixer, + type RuleContext, + type ReportDescriptor, + type ReportSuggestionArray, +} from "@typescript-eslint/utils/ts-eslint"; import * as semver from "semver"; -import type { Type } from "typescript"; +import { type Type } from "typescript"; -import ts from "~/conditional-imports/typescript"; -import type { IgnorePatternOption } from "~/options"; -import { ignorePatternOptionSchema } from "~/options"; -import type { ESFunction } from "~/utils/node-types"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { createRule, getESTreeNode, getTypeOfNode } from "~/utils/rule"; -import { isNested } from "~/utils/tree"; +import ts from "#eslint-plugin-functional/conditional-imports/typescript"; +import { type ESFunction } from "#eslint-plugin-functional/utils/node-types"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + createRule, + getESTreeNode, + getTypeOfNode, +} from "#eslint-plugin-functional/utils/rule"; +import { isNested } from "#eslint-plugin-functional/utils/tree"; import { isBlockStatement, isCallExpression, @@ -19,7 +28,7 @@ import { isIdentifier, isReturnStatement, isTSFunctionType, -} from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -29,35 +38,17 @@ export const name = "prefer-tacit" as const; /** * The options this rule can take. */ -type Options = [ - IgnorePatternOption & { - assumeTypes: boolean; - } -]; +type Options = []; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ - { - type: "object", - properties: deepmerge(ignorePatternOptionSchema, { - assumeTypes: { - type: "boolean", - }, - }), - additionalProperties: false, - }, -]; +const schema: JSONSchema4[] = []; /** * The default options for the rule. */ -const defaultOptions: Options = [ - { - assumeTypes: false, - }, -]; +const defaultOptions: Options = []; /** * The possible error messages. @@ -74,7 +65,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "Stylistic", description: "Replaces `x => f(x)` with just `f`.", - recommended: false, }, messages: errorMessages, hasSuggestions: true, @@ -96,7 +86,7 @@ const isTS4dot7 = function isCallerViolation( caller: TSESTree.CallExpression, calleeType: Type, - context: TSESLint.RuleContext + context: Readonly>, ): boolean { if ((calleeType.symbol as unknown) === undefined) { return false; @@ -116,12 +106,15 @@ function isCallerViolation( ); } +/** + * Get the fixes for a call to a reference violation. + */ function fixFunctionCallToReference( - context: TSESLint.RuleContext, - fixer: TSESLint.RuleFixer, + context: Readonly>, + fixer: RuleFixer, node: ESFunction, - caller: TSESTree.CallExpression -): TSESLint.RuleFix[] | null { + caller: TSESTree.CallExpression, +): RuleFix[] | null { // Fix to Instantiation Expression. if ( caller.typeParameters !== undefined && @@ -138,7 +131,7 @@ function fixFunctionCallToReference( return [ fixer.replaceText( node as TSESTree.Node, - context.getSourceCode().getText(caller.callee as TSESTree.Node) + context.getSourceCode().getText(caller.callee as TSESTree.Node), ), ]; } @@ -147,10 +140,10 @@ function fixFunctionCallToReference( * Creates the suggestions. */ function buildSuggestions( - context: TSESLint.RuleContext, + context: Readonly>, node: ESFunction, - caller: TSESTree.CallExpression -): TSESLint.ReportSuggestionArray { + caller: TSESTree.CallExpression, +): ReportSuggestionArray { return [ { messageId: "generic", @@ -159,13 +152,16 @@ function buildSuggestions( context, fixer, node, - caller + caller, ); if (functionCallToReference === null) { return null; } - if (node.type === "FunctionDeclaration" && !isNested(node)) { + if ( + node.type === TSESTree.AST_NODE_TYPES.FunctionDeclaration && + !isNested(node) + ) { if (node.id === null) { return null; } @@ -173,7 +169,7 @@ function buildSuggestions( return [ fixer.insertTextBefore( node as TSESTree.Node, - `const ${node.id.name} = ` + `const ${node.id.name} = `, ), fixer.insertTextAfter(node as TSESTree.Node, `;`), ...functionCallToReference, @@ -191,12 +187,10 @@ function buildSuggestions( */ function getCallDescriptors( node: ESFunction, - context: TSESLint.RuleContext, + context: Readonly>, options: Options, - caller: TSESTree.CallExpression -): Array> { - const [{ assumeTypes }] = options; - + caller: TSESTree.CallExpression, +): Array> { if ( node.params.length === caller.arguments.length && node.params.every((param, index) => { @@ -209,14 +203,8 @@ function getCallDescriptors( }) ) { const calleeType = getTypeOfNode(caller.callee, context); - const assumingTypes = - (calleeType === null || (calleeType.symbol as unknown) === undefined) && - assumeTypes; - if ( - assumingTypes || - (calleeType !== null && isCallerViolation(caller, calleeType, context)) - ) { + if (calleeType !== null && isCallerViolation(caller, calleeType, context)) { return [ { node, @@ -235,9 +223,9 @@ function getCallDescriptors( */ function getDirectCallDescriptors( node: ESFunction, - context: TSESLint.RuleContext, - options: Options -): Array> { + context: Readonly>, + options: Options, +): Array> { if (isCallExpression(node.body)) { return getCallDescriptors(node, context, options, node.body); } @@ -249,9 +237,9 @@ function getDirectCallDescriptors( */ function getNestedCallDescriptors( node: ESFunction, - context: TSESLint.RuleContext, - options: Options -): Array> { + context: Readonly>, + options: Options, +): Array> { if ( isBlockStatement(node.body) && node.body.body.length === 1 && @@ -263,7 +251,7 @@ function getNestedCallDescriptors( node, context, options, - node.body.body[0].argument + node.body.body[0].argument, ); } return []; @@ -274,8 +262,8 @@ function getNestedCallDescriptors( */ function checkFunction( node: ESFunction, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Options, ): RuleResult { return { context, @@ -295,5 +283,5 @@ export const rule = createRule( FunctionDeclaration: checkFunction, FunctionExpression: checkFunction, ArrowFunctionExpression: checkFunction, - } + }, ); diff --git a/src/rules/readonly-type.ts b/src/rules/readonly-type.ts index 67222b0ca..16b504e38 100644 --- a/src/rules/readonly-type.ts +++ b/src/rules/readonly-type.ts @@ -1,9 +1,16 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import type { JSONSchema4 } from "json-schema"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { type JSONSchema4 } from "@typescript-eslint/utils/json-schema"; +import { + type ReportDescriptor, + type RuleContext, +} from "@typescript-eslint/utils/ts-eslint"; -import { createRule } from "~/utils/rule"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { getReadonly } from "~/utils/tree"; +import { + createRule, + type RuleResult, + type NamedCreateRuleMetaWithCategory, +} from "#eslint-plugin-functional/utils/rule"; +import { getReadonly } from "#eslint-plugin-functional/utils/tree"; import { isDefined, isTSIndexSignature, @@ -11,7 +18,7 @@ import { isTSPropertySignature, isPropertyDefinition, isTSTypeReference, -} from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -26,11 +33,10 @@ type Options = ["generic" | "keyword"]; /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "string", enum: ["generic", "keyword"], - additionalProperties: false, }, ]; @@ -58,17 +64,19 @@ const meta: NamedCreateRuleMetaWithCategory = { category: "Stylistic", description: "Require consistently using either `readonly` keywords or `Readonly`", - recommended: "error", }, fixable: "code", messages: errorMessages, schema, }; +/** + * Check for violations with a type literal. + */ function checkTypeLiteral( node: TSESTree.TSTypeLiteral, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Options, ): RuleResult { const [mode] = options; const readonlyWrapper = getReadonly(node); @@ -81,15 +89,13 @@ function checkTypeLiteral( descriptors: node.members .map( ( - member - ): - | TSESLint.ReportDescriptor - | undefined => { + member, + ): ReportDescriptor | undefined => { if ( (isPropertyDefinition(member) || isTSParameterProperty(member) || isTSPropertySignature(member)) && - member.readonly === true + member.readonly ) { return { node: member.key, @@ -97,13 +103,13 @@ function checkTypeLiteral( fix: (fixer) => fixer.replaceText( member, - sourceCode.getText(member).replace(/readonly /u, "") + sourceCode.getText(member).replace(/readonly /u, ""), ), }; } return undefined; - } + }, ) .filter(isDefined), }; @@ -123,7 +129,8 @@ function checkTypeLiteral( const wrapperStartPattern = /^Readonly\s*$/gu; - const start = wrapperStartPattern.exec(text); + // eslint-disable-next-line functional/no-expression-statements -- Sets `wrapperStartPattern.lastIndex`. + wrapperStartPattern.exec(text); const end = wrapperEndPattern.exec(text); const startCutPoint = wrapperStartPattern.lastIndex; @@ -147,7 +154,7 @@ function checkTypeLiteral( isTSParameterProperty(member) || isTSPropertySignature(member) ) || - member.readonly === true + member.readonly ) { return undefined; } @@ -168,7 +175,7 @@ function checkTypeLiteral( isTSIndexSignature(member) || isTSParameterProperty(member) || isTSPropertySignature(member)) && - member.readonly === true + member.readonly, ); if (needsWrapping) { @@ -184,8 +191,8 @@ function checkTypeLiteral( ...node.members.map((member) => fixer.replaceText( member, - sourceCode.getText(member).replace(/readonly /u, "") - ) + sourceCode.getText(member).replace(/readonly /u, ""), + ), ), ], }, @@ -207,5 +214,5 @@ export const rule = createRule( defaultOptions, { TSTypeLiteral: checkTypeLiteral, - } + }, ); diff --git a/src/rules/type-declaration-immutability.ts b/src/rules/type-declaration-immutability.ts index d7568fd1c..b7795c5f5 100644 --- a/src/rules/type-declaration-immutability.ts +++ b/src/rules/type-declaration-immutability.ts @@ -1,15 +1,26 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { + type JSONSchema4, + type JSONSchema4ObjectSchema, +} from "@typescript-eslint/utils/json-schema"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; import { deepmerge } from "deepmerge-ts"; import { Immutability } from "is-immutable-type"; -import type { JSONSchema4 } from "json-schema"; -import type { IgnorePatternOption } from "~/options"; -import { shouldIgnorePattern, ignorePatternOptionSchema } from "~/options"; -import { getNodeIdentifierTexts } from "~/utils/misc"; -import type { ESTypeDeclaration } from "~/utils/node-types"; -import type { RuleResult, NamedCreateRuleMetaWithCategory } from "~/utils/rule"; -import { getTypeImmutabilityOfNode, createRule } from "~/utils/rule"; -import { isTSInterfaceDeclaration } from "~/utils/type-guards"; +import { + type IgnoreIdentifierPatternOption, + shouldIgnorePattern, + ignoreIdentifierPatternOptionSchema, +} from "#eslint-plugin-functional/options"; +import { getNodeIdentifierTexts } from "#eslint-plugin-functional/utils/misc"; +import { type ESTypeDeclaration } from "#eslint-plugin-functional/utils/node-types"; +import { + type RuleResult, + type NamedCreateRuleMetaWithCategory, + getTypeImmutabilityOfNode, + createRule, +} from "#eslint-plugin-functional/utils/rule"; +import { isTSInterfaceDeclaration } from "#eslint-plugin-functional/utils/type-guards"; /** * The name of this rule. @@ -41,7 +52,7 @@ type FixerConfig = { * The options this rule can take. */ type Options = [ - IgnorePatternOption & { + IgnoreIdentifierPatternOption & { rules: Array<{ identifiers: string | string[]; immutability: Exclude< @@ -54,7 +65,7 @@ type Options = [ fixer?: FixerConfigRaw | FixerConfigRaw[] | false; }>; ignoreInterfaces: boolean; - } + }, ]; /** @@ -91,10 +102,10 @@ const fixerSchema: JSONSchema4 = { /** * The schema for the rule options. */ -const schema: JSONSchema4 = [ +const schema: JSONSchema4[] = [ { type: "object", - properties: deepmerge(ignorePatternOptionSchema, { + properties: deepmerge(ignoreIdentifierPatternOptionSchema, { rules: { type: "array", items: { @@ -111,7 +122,7 @@ const schema: JSONSchema4 = [ enum: Object.values(Immutability).filter( (i) => i !== Immutability.Unknown && - i !== Immutability[Immutability.Unknown] + i !== Immutability[Immutability.Unknown], ), }, comparator: { @@ -127,7 +138,7 @@ const schema: JSONSchema4 = [ ignoreInterfaces: { type: "boolean", }, - }), + } satisfies JSONSchema4ObjectSchema["properties"]), additionalProperties: false, }, ]; @@ -170,7 +181,6 @@ const meta: NamedCreateRuleMetaWithCategory = { docs: { category: "No Mutations", description: "Enforce the immutability of types based on patterns.", - recommended: "error", }, messages: errorMessages, fixable: "code", @@ -195,7 +205,7 @@ type Descriptor = RuleResult< /** * Get all the rules that were given and upgrade them. */ -function getRules(options: Options): ImmutabilityRule[] { +function getRules(options: Readonly): ImmutabilityRule[] { const [optionsObject] = options; const { rules: rulesOptions } = optionsObject; @@ -238,8 +248,8 @@ function getRules(options: Options): ImmutabilityRule[] { */ function getRuleToApply( node: TSESTree.Node, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): ImmutabilityRule | undefined { const rules = getRules(options); if (rules.length === 0) { @@ -253,7 +263,9 @@ function getRuleToApply( } return rules.find((rule) => - rule.identifiers.some((pattern) => texts.some((text) => pattern.test(text))) + rule.identifiers.some((pattern) => + texts.some((text) => pattern.test(text)), + ), ); } @@ -262,8 +274,8 @@ function getRuleToApply( */ function getConfiuredFixer( node: T, - context: TSESLint.RuleContext, - configs: FixerConfig[] + context: Readonly>, + configs: FixerConfig[], ): NonNullable | null { const text = context.getSourceCode().getText(node); const config = configs.find((c) => c.pattern.test(text)); @@ -302,9 +314,9 @@ function compareImmutability(rule: ImmutabilityRule, actual: Immutability) { */ function getResults( node: ESTypeDeclaration, - context: TSESLint.RuleContext, + context: Readonly>, rule: ImmutabilityRule, - immutability: Immutability + immutability: Immutability, ): RuleResult { const valid = compareImmutability(rule, immutability); if (valid) { @@ -342,13 +354,13 @@ function getResults( */ function checkTypeDeclaration( node: ESTypeDeclaration, - context: TSESLint.RuleContext, - options: Options + context: Readonly>, + options: Readonly, ): RuleResult { const [optionsObject] = options; - const { ignoreInterfaces, ignorePattern } = optionsObject; + const { ignoreInterfaces, ignoreIdentifierPattern } = optionsObject; if ( - shouldIgnorePattern(node, context, ignorePattern) || + shouldIgnorePattern(node, context, ignoreIdentifierPattern) || (ignoreInterfaces && isTSInterfaceDeclaration(node)) ) { return { @@ -369,14 +381,13 @@ function checkTypeDeclaration( rule.comparator === RuleEnforcementComparator.AtLeast ? rule.immutability : rule.comparator === RuleEnforcementComparator.More - ? // eslint-disable-next-line @typescript-eslint/restrict-plus-operands -- immutability is a number - rule.immutability + 1 + ? rule.immutability + 1 : undefined; const immutability = getTypeImmutabilityOfNode( node, context, - maxImmutability + maxImmutability, ); return getResults(node, context, rule, immutability); @@ -390,5 +401,5 @@ export const rule = createRule( { TSTypeAliasDeclaration: checkTypeDeclaration, TSInterfaceDeclaration: checkTypeDeclaration, - } + }, ); diff --git a/src/settings/immutability.ts b/src/settings/immutability.ts index 8c788a400..ed53b509c 100644 --- a/src/settings/immutability.ts +++ b/src/settings/immutability.ts @@ -1,15 +1,14 @@ -import type { SharedConfigurationSettings } from "@typescript-eslint/utils"; -import type { ImmutabilityOverrides } from "is-immutable-type"; +import { type SharedConfigurationSettings } from "@typescript-eslint/utils"; import { + type ImmutabilityOverrides, + type TypeSpecifier, Immutability, getDefaultOverrides as getDefaultImmutabilityOverrides, } from "is-immutable-type"; -import type { JSONSchema4 } from "json-schema"; declare module "@typescript-eslint/utils" { type OverridesSetting = { - name?: string; - pattern?: string; + type: TypeSpecifier; to: Immutability | keyof typeof Immutability; from?: Immutability | keyof typeof Immutability; }; @@ -30,10 +29,10 @@ declare module "@typescript-eslint/utils" { /** * The settings that have been loaded - so we don't have to reload them. */ -const cachedSettings: WeakMap< +const cachedSettings = new WeakMap< NonNullable, ImmutabilityOverrides | undefined -> = new WeakMap(); +>(); /** * Get the immutability overrides defined in the settings. @@ -58,7 +57,7 @@ export function getImmutabilityOverrides({ * Get all the overrides and upgrade them. */ function loadImmutabilityOverrides( - immutabilitySettings: SharedConfigurationSettings["immutability"] + immutabilitySettings: SharedConfigurationSettings["immutability"], ): ImmutabilityOverrides | undefined { const overridesSetting = immutabilitySettings?.overrides; @@ -70,20 +69,49 @@ function loadImmutabilityOverrides( ? overridesSetting : overridesSetting.values ?? []; - const upgraded = raw.map( - ({ name, pattern, to, from }) => - ({ - name, - pattern: pattern === undefined ? pattern : new RegExp(pattern, "u"), - to: typeof to === "string" ? Immutability[to] : to, - from: - from === undefined - ? undefined - : typeof from === "string" - ? Immutability[from] - : from, - } as ImmutabilityOverrides[number]) - ); + const upgraded = raw.map((rawValue) => { + const { type, to, from, ...rest } = rawValue; + const value = { + type, + to: typeof to === "string" ? Immutability[to] : to, + from: + from === undefined + ? undefined + : typeof from === "string" + ? Immutability[from] + : from, + } as ImmutabilityOverrides[number]; + + /* c8 ignore start */ + if (value.type === undefined) { + // eslint-disable-next-line functional/no-throw-statements + throw new Error( + `Override is missing required "type" property. Value: "${JSON.stringify( + rawValue, + )}"`, + ); + } + if (value.to === undefined) { + // eslint-disable-next-line functional/no-throw-statements + throw new Error( + `Override is missing required "to" property. Value: "${JSON.stringify( + rawValue, + )}"`, + ); + } + const restKeys = Object.keys(rest); + if (restKeys.length > 0) { + // eslint-disable-next-line functional/no-throw-statements + throw new Error( + `Override is contains unknown property(s) "${restKeys.join( + ", ", + )}". Value: "${JSON.stringify(rawValue)}"`, + ); + } + /* c8 ignore stop */ + + return value; + }); const keepDefault = Array.isArray(overridesSetting) || overridesSetting.keepDefault !== false; @@ -92,120 +120,3 @@ function loadImmutabilityOverrides( ? [...getDefaultImmutabilityOverrides(), ...upgraded] : upgraded; } - -/** - * The schema for the immutability configuration settings. - */ -export const sharedConfigurationSettingsSchema: JSONSchema4 = [ - { - type: "object", - properties: { - type: "object", - immutability: { - properties: { - overrides: { - oneOf: [ - { - type: "object", - properties: { - keepDefault: { - type: "boolean", - }, - values: { - type: "array", - items: { - oneOf: [ - { - type: "object", - properties: { - name: { - type: "string", - }, - to: { - type: ["string", "number"], - enum: Object.values(Immutability), - }, - from: { - type: ["string", "number"], - enum: Object.values(Immutability), - }, - }, - required: ["name", "to"], - additionalProperties: false, - }, - { - type: "object", - properties: { - pattern: { - type: "string", - }, - to: { - type: ["string", "number"], - enum: Object.values(Immutability), - }, - from: { - type: ["string", "number"], - enum: Object.values(Immutability), - }, - }, - required: ["pattern", "to"], - additionalProperties: false, - }, - ], - }, - }, - }, - additionalProperties: false, - }, - { - type: "array", - items: { - oneOf: [ - { - type: "object", - properties: { - name: { - type: "string", - }, - to: { - type: ["string", "number"], - enum: Object.values(Immutability), - }, - from: { - type: ["string", "number"], - enum: Object.values(Immutability), - }, - }, - required: ["name", "to"], - additionalProperties: false, - }, - { - type: "object", - properties: { - pattern: { - type: "string", - }, - to: { - type: ["string", "number"], - enum: Object.values(Immutability), - }, - from: { - type: ["string", "number"], - enum: Object.values(Immutability), - }, - }, - required: ["pattern", "to"], - additionalProperties: false, - }, - ], - }, - }, - ], - }, - }, - }, - additionalProperties: false, - }, - additionalProperties: true, - }, -]; diff --git a/src/utils/conditional-imports/ts-api-utils.ts b/src/utils/conditional-imports/ts-api-utils.ts new file mode 100644 index 000000000..a45047cda --- /dev/null +++ b/src/utils/conditional-imports/ts-api-utils.ts @@ -0,0 +1,10 @@ +import type tsApiUtils from "ts-api-utils"; + +import ts from "#eslint-plugin-functional/conditional-imports/typescript"; + +export default (() => { + if (ts !== undefined) { + return require("ts-api-utils") as typeof tsApiUtils; + } + return undefined; +})(); diff --git a/src/utils/conditional-imports/typescript.ts b/src/utils/conditional-imports/typescript.ts index 0efc6354e..afcfe2905 100644 --- a/src/utils/conditional-imports/typescript.ts +++ b/src/utils/conditional-imports/typescript.ts @@ -1,7 +1,5 @@ -// Note: This import will be stripped out by rollup. import type ts from "typescript"; -// Conditionally loaded TypeScript but only if it is available. export default (() => { try { return require("typescript") as typeof ts; diff --git a/src/utils/misc.ts b/src/utils/misc.ts index 07ff35c21..ea37b3841 100644 --- a/src/utils/misc.ts +++ b/src/utils/misc.ts @@ -1,14 +1,13 @@ -import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; -import { AST_NODE_TYPES } from "@typescript-eslint/utils"; +import { type TSESTree, AST_NODE_TYPES } from "@typescript-eslint/utils"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; -import type { BaseOptions } from "~/utils/rule"; -import { getKeyOfValueInObjectExpression } from "~/utils/tree"; +import { type BaseOptions } from "#eslint-plugin-functional/utils/rule"; +import { getKeyOfValueInObjectExpression } from "#eslint-plugin-functional/utils/tree"; import { hasID, hasKey, isAssignmentExpression, isDefined, - isExpressionStatement, isIdentifier, isMemberExpression, isPrivateIdentifier, @@ -16,7 +15,7 @@ import { isTSTypeAnnotation, isUnaryExpression, isVariableDeclaration, -} from "~/utils/type-guards"; +} from "#eslint-plugin-functional/utils/type-guards"; /** * Higher order function to check if the two given values are the same. @@ -29,7 +28,7 @@ export function isExpected(expected: T): (actual: T) => boolean { * Does the given ExpressionStatement specify directive prologues. */ export function isDirectivePrologue( - node: TSESTree.ExpressionStatement + node: TSESTree.ExpressionStatement, ): boolean { return ( node.expression.type === AST_NODE_TYPES.Literal && @@ -43,7 +42,7 @@ export function isDirectivePrologue( */ function getNodeIdentifierText( node: TSESTree.Node | null | undefined, - context: TSESLint.RuleContext + context: Readonly>, ): string | undefined { if (!isDefined(node)) { return undefined; @@ -61,14 +60,12 @@ function getNodeIdentifierText( : isMemberExpression(node) ? `${getNodeIdentifierText(node.object, context)}.${getNodeIdentifierText( node.property, - context + context, )}` : isThisExpression(node) ? "this" : isUnaryExpression(node) ? getNodeIdentifierText(node.argument, context) - : isExpressionStatement(node) - ? context.getSourceCode().getText(node as TSESTree.Node) : isTSTypeAnnotation(node) ? context .getSourceCode() @@ -88,17 +85,27 @@ function getNodeIdentifierText( return undefined; } +/** + * Get the code of the given node. + */ +export function getNodeCode( + node: TSESTree.Node, + context: Readonly>, +): string { + return context.getSourceCode().getText(node); +} + /** * Get all the identifier texts of the given node. */ export function getNodeIdentifierTexts( node: TSESTree.Node, - context: TSESLint.RuleContext + context: Readonly>, ): string[] { return ( isVariableDeclaration(node) ? node.declarations.flatMap((declarator) => - getNodeIdentifierText(declarator, context) + getNodeIdentifierText(declarator, context), ) : [getNodeIdentifierText(node, context)] ).filter((text): text is string => text !== undefined); diff --git a/src/utils/node-types.ts b/src/utils/node-types.ts index 51cbf4eba..d5cbbb582 100644 --- a/src/utils/node-types.ts +++ b/src/utils/node-types.ts @@ -1,4 +1,4 @@ -import type { TSESTree } from "@typescript-eslint/utils"; +import { type TSESTree } from "@typescript-eslint/utils"; export type ESFunction = | TSESTree.ArrowFunctionExpression diff --git a/src/utils/rule.ts b/src/utils/rule.ts index 432a9652b..d28e43c69 100644 --- a/src/utils/rule.ts +++ b/src/utils/rule.ts @@ -1,18 +1,25 @@ -import type { - ParserServices, - TSESLint, - TSESTree, -} from "@typescript-eslint/utils"; -import { ESLintUtils } from "@typescript-eslint/utils"; -import type { Rule } from "eslint"; -import type { ImmutabilityOverrides } from "is-immutable-type"; -import { getTypeImmutability, Immutability } from "is-immutable-type"; -import type { Node as TSNode, Type, TypeNode } from "typescript"; -import { isIdentifier } from "typescript"; - -import ts from "~/conditional-imports/typescript"; -import { getImmutabilityOverrides } from "~/settings"; -import type { ESFunction } from "~/utils/node-types"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { + getParserServices, + type NamedCreateRuleMeta, + RuleCreator, +} from "@typescript-eslint/utils/eslint-utils"; +import { + type RuleContext, + type RuleModule, + type ReportDescriptor, + type RuleListener, +} from "@typescript-eslint/utils/ts-eslint"; +import { + type ImmutabilityOverrides, + getTypeImmutability, + Immutability, +} from "is-immutable-type"; +import { type Node as TSNode, type Type, type TypeNode } from "typescript"; + +import ts from "#eslint-plugin-functional/conditional-imports/typescript"; +import { getImmutabilityOverrides } from "#eslint-plugin-functional/settings"; +import { type ESFunction } from "#eslint-plugin-functional/utils/node-types"; // eslint-disable-next-line @typescript-eslint/naming-convention -- This is a special var. const __VERSION__ = "0.0.0-development"; @@ -21,7 +28,7 @@ const __VERSION__ = "0.0.0-development"; * Any custom rule meta properties. */ export type NamedCreateRuleMetaWithCategory = - ESLintUtils.NamedCreateRuleMeta & { + NamedCreateRuleMeta & { docs: { /** Used for splitting the README rules list into sub-lists. */ category: string; @@ -38,24 +45,24 @@ export type BaseOptions = unknown[]; */ export type RuleResult< MessageIds extends string, - Options extends BaseOptions + Options extends BaseOptions, > = Readonly<{ - context: TSESLint.RuleContext; - descriptors: Array>; + context: Readonly>; + descriptors: ReadonlyArray>; }>; /** * A map of nodes to functions that a rule operate on. */ -type RuleFunctionsMap< +export type RuleFunctionsMap< Node extends TSESTree.Node, MessageIds extends string, - Options extends BaseOptions + Options extends BaseOptions, > = Readonly<{ - [K in keyof TSESLint.RuleListener]: ( + [K in keyof RuleListener]: ( node: Node, - context: TSESLint.RuleContext, - options: Options + context: RuleContext, + options: Options, ) => RuleResult; }>; @@ -68,17 +75,17 @@ type RuleFunctionsMap< */ function checkNode< MessageIds extends string, - Context extends TSESLint.RuleContext, + Context extends RuleContext, Node extends TSESTree.Node, - Options extends BaseOptions + Options extends BaseOptions, >( check: ( node: Node, context: Context, - options: Options + options: Options, ) => RuleResult, context: Context, - options: Options + options: Options, ): (node: Node) => void { return (node: Node) => { const result = check(node, context, options); @@ -96,18 +103,18 @@ function checkNode< */ export function createRule< MessageIds extends string, - Options extends BaseOptions + Options extends BaseOptions, >( name: string, meta: NamedCreateRuleMetaWithCategory, defaultOptions: Options, - ruleFunctionsMap: RuleFunctionsMap -): Rule.RuleModule { + ruleFunctionsMap: RuleFunctionsMap, +): RuleModule { return createRuleUsingFunction( name, meta, defaultOptions, - () => ruleFunctionsMap + () => ruleFunctionsMap, ); } @@ -116,70 +123,55 @@ export function createRule< */ export function createRuleUsingFunction< MessageIds extends string, - Options extends BaseOptions + Options extends BaseOptions, >( name: string, meta: NamedCreateRuleMetaWithCategory, defaultOptions: Options, createFunction: ( - context: TSESLint.RuleContext, - options: Options - ) => RuleFunctionsMap -): Rule.RuleModule { - return ESLintUtils.RuleCreator( + context: Readonly>, + options: Readonly, + ) => RuleFunctionsMap, +): RuleModule { + const ruleCreator = RuleCreator( (ruleName) => - `https://github.com/eslint-functional/eslint-plugin-functional/blob/v${__VERSION__}/docs/rules/${ruleName}.md` - )({ + `https://github.com/eslint-functional/eslint-plugin-functional/blob/v${__VERSION__}/docs/rules/${ruleName}.md`, + ); + + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- false positive + return ruleCreator({ name, meta, defaultOptions, create: (context, options) => { - const ruleFunctionsMap = createFunction( - context as unknown as TSESLint.RuleContext, - options as unknown as Options - ); + const ruleFunctionsMap = createFunction(context, options); return Object.fromEntries( Object.entries(ruleFunctionsMap).map(([nodeSelector, ruleFunction]) => [ nodeSelector, - checkNode( - ruleFunction, - context as unknown as TSESLint.RuleContext, - options as unknown as Options - ), - ]) + checkNode< + MessageIds, + Readonly>, + TSESTree.Node, + Options + >(ruleFunction, context, options), + ]), ); }, - }) as unknown as Rule.RuleModule; + }) as RuleModule; } /** * Get the type of the the given node. */ -export function getTypeOfNode< - Context extends TSESLint.RuleContext ->(node: TSESTree.Node, context: Context): Type | null; -export function getTypeOfNode( - node: TSESTree.Node, - parserServices: ParserServices -): Type; -export function getTypeOfNode< - Context extends TSESLint.RuleContext ->( +export function getTypeOfNode>( node: TSESTree.Node, - contextOrServices: Context | ParserServices -): Type | null { - const parserServices = isParserServices(contextOrServices) - ? contextOrServices - : getParserServices(contextOrServices); - - if (parserServices === null) { - return null; - } + context: Context, +): Type { + const parserServices = getParserServices(context); const checker = parserServices.program.getTypeChecker(); const { esTreeNodeToTSNodeMap } = parserServices; - // checker.getReturnTypeOfSignature const nodeType = checker.getTypeAtLocation(esTreeNodeToTSNodeMap.get(node)); const constrained = checker.getBaseConstraintOfType(nodeType); return constrained ?? nodeType; @@ -189,23 +181,19 @@ export function getTypeOfNode< * Get the return type of the the given function node. */ export function getReturnTypesOfFunction< - Context extends TSESLint.RuleContext + Context extends RuleContext, >(node: TSESTree.Node, context: Context) { if (ts === undefined) { return null; } const parserServices = getParserServices(context); - if (parserServices === null) { - return null; - } - const checker = parserServices.program.getTypeChecker(); - const type = getTypeOfNode(node, parserServices); + const type = getTypeOfNode(node, context); const signatures = checker.getSignaturesOfType(type, ts.SignatureKind.Call); return signatures.map((signature) => - checker.getReturnTypeOfSignature(signature) + checker.getReturnTypeOfSignature(signature), ); } @@ -213,87 +201,50 @@ export function getReturnTypesOfFunction< * Does the given function have overloads? */ export function isImplementationOfOverload< - Context extends TSESLint.RuleContext + Context extends RuleContext, >(func: ESFunction, context: Context) { if (ts === undefined) { return false; } const parserServices = getParserServices(context); - if (parserServices === null) { - return false; - } - const checker = parserServices.program.getTypeChecker(); const signature = parserServices.esTreeNodeToTSNodeMap.get(func); return checker.isImplementationOfOverload(signature) === true; } -/** - * Get the type immutability of the the given node. - */ -export function getTypeImmutabilityOfNode< - Context extends TSESLint.RuleContext ->( - node: TSESTree.Node, - context: Context, - maxImmutability?: Immutability -): Immutability; - -/** - * Get the type immutability of the the given node. - */ -export function getTypeImmutabilityOfNode( - node: TSESTree.Node, - parserServices: ParserServices, - maxImmutability?: Immutability, - overrides?: ImmutabilityOverrides -): Immutability; - /** * Get the type immutability of the the given node or type. */ export function getTypeImmutabilityOfNode< - Context extends TSESLint.RuleContext + Context extends RuleContext, >( node: TSESTree.Node, - contextOrServices: Context | ParserServices, + context: Context, maxImmutability?: Immutability, - explicitOverrides?: ImmutabilityOverrides + explicitOverrides?: ImmutabilityOverrides, ): Immutability { - const givenParserServices = isParserServices(contextOrServices); - - const parserServices = givenParserServices - ? contextOrServices - : getParserServices(contextOrServices); - - const overrides = givenParserServices - ? explicitOverrides - : getImmutabilityOverrides(contextOrServices.settings); - - if (parserServices === null) { + if (ts === undefined) { return Immutability.Unknown; } - const checker = parserServices.program.getTypeChecker(); - + const parserServices = getParserServices(context); + const overrides = + explicitOverrides ?? getImmutabilityOverrides(context.settings); const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node); - const typedNode = isIdentifier(tsNode) ? tsNode.parent : tsNode; + const typedNode = ts.isIdentifier(tsNode) ? tsNode.parent : tsNode; const typeLike = - ((typedNode as any).type as TypeNode | undefined) ?? - getTypeOfNode( - parserServices.tsNodeToESTreeNodeMap.get(typedNode), - parserServices - ); + (typedNode as { type?: TypeNode }).type ?? + getTypeOfNode(parserServices.tsNodeToESTreeNodeMap.get(typedNode), context); return getTypeImmutability( - checker, + parserServices.program, typeLike, overrides, // Don't use the global cache in testing environments as it may cause errors when switching between different config options. process.env["NODE_ENV"] !== "test", - maxImmutability + maxImmutability, ); } @@ -301,54 +252,24 @@ export function getTypeImmutabilityOfNode< * Get the type immutability of the the given type. */ export function getTypeImmutabilityOfType< - Context extends TSESLint.RuleContext + Context extends RuleContext, >( typeOrTypeNode: Type | TypeNode, context: Context, - maxImmutability?: Immutability -): Immutability; - -/** - * Get the type immutability of the the given type. - */ -export function getTypeImmutabilityOfType( - typeOrTypeNode: Type | TypeNode, - parserServices: ParserServices, - maxImmutability?: Immutability, - overrides?: ImmutabilityOverrides -): Immutability; - -export function getTypeImmutabilityOfType< - Context extends TSESLint.RuleContext ->( - typeOrTypeNode: Type | TypeNode, - contextOrServices: Context | ParserServices, maxImmutability?: Immutability, - explicitOverrides?: ImmutabilityOverrides + explicitOverrides?: ImmutabilityOverrides, ): Immutability { - const givenParserServices = isParserServices(contextOrServices); - - const parserServices = givenParserServices - ? contextOrServices - : getParserServices(contextOrServices); - - const overrides = givenParserServices - ? explicitOverrides - : getImmutabilityOverrides(contextOrServices.settings); - - if (parserServices === null) { - return Immutability.Unknown; - } - - const checker = parserServices.program.getTypeChecker(); + const parserServices = getParserServices(context); + const overrides = + explicitOverrides ?? getImmutabilityOverrides(context.settings); return getTypeImmutability( - checker, + parserServices.program, typeOrTypeNode, overrides, // Don't use the global cache in testing environments as it may cause errors when switching between different config options. process.env["NODE_ENV"] !== "test", - maxImmutability + maxImmutability, ); } @@ -356,52 +277,8 @@ export function getTypeImmutabilityOfType< * Get the es tree node from the given ts node. */ export function getESTreeNode< - Context extends TSESLint.RuleContext ->(node: TSNode, context: Context): TSESTree.Node | null; -export function getESTreeNode( - node: TSNode, - parserServices: ParserServices -): TSESTree.Node; -export function getESTreeNode< - Context extends TSESLint.RuleContext ->( - node: TSNode, - contextOrServices: Context | ParserServices -): TSESTree.Node | null { - const parserServices = isParserServices(contextOrServices) - ? contextOrServices - : getParserServices(contextOrServices); - - if (parserServices === null) { - return null; - } - - return parserServices.tsNodeToESTreeNodeMap.get(node); -} - -/** - * Get the parser services from the given context. - */ -function getParserServices< - Context extends TSESLint.RuleContext ->(context: Context) { - const { parserServices } = context; - - if (parserServices === undefined || !parserServices.hasFullTypeInformation) { - return null; - } - - return parserServices; -} - -/** - * Is the given value the parser services or just the context. - */ -function isParserServices< - Context extends TSESLint.RuleContext ->( - contextOrServices: Context | ParserServices -): contextOrServices is ParserServices { - // Only context has an id property and it will always have one. - return !Object.hasOwn(contextOrServices, "id"); + Context extends Readonly>, +>(node: TSNode, context: Context): TSESTree.Node | null { + const parserServices = getParserServices(context); + return parserServices.tsNodeToESTreeNodeMap.get(node) ?? null; } diff --git a/src/utils/tree.ts b/src/utils/tree.ts index 6f22ba531..c72c4160e 100644 --- a/src/utils/tree.ts +++ b/src/utils/tree.ts @@ -1,5 +1,10 @@ -import type { TSESTree } from "@typescript-eslint/utils"; +import { type TSESTree } from "@typescript-eslint/utils"; +import { getParserServices } from "@typescript-eslint/utils/eslint-utils"; +import { type RuleContext } from "@typescript-eslint/utils/ts-eslint"; +import typescript from "#eslint-plugin-functional/conditional-imports/typescript"; + +import { type BaseOptions } from "./rule"; import { isBlockStatement, isCallExpression, @@ -19,6 +24,7 @@ import { isTSTypeAnnotation, isTSTypeLiteral, isTSTypeReference, + isVariableDeclaration, } from "./type-guards"; /** @@ -27,7 +33,7 @@ import { function getAncestorOfType( checker: (node: TSESTree.Node, child: TSESTree.Node | null) => node is T, node: TSESTree.Node, - child: TSESTree.Node | null = null + child: TSESTree.Node | null = null, ): T | null { return checker(node, child) ? node @@ -44,17 +50,17 @@ function getAncestorOfType( */ export function isInFunctionBody( node: TSESTree.Node, - async?: boolean + async?: boolean, ): boolean { const functionNode = getAncestorOfType( ( n, - c + c, ): n is | TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression => isFunctionLike(n) && n.body === c, - node + node, ); return ( @@ -77,7 +83,7 @@ export function isInForLoopInitializer(node: TSESTree.Node): boolean { return ( getAncestorOfType( (n, c): n is TSESTree.ForStatement => isForStatement(n) && n.init === c, - node + node, ) !== null ); } @@ -93,7 +99,7 @@ export function isInReadonly(node: TSESTree.Node): boolean { * Test if the given node is shallowly inside a `Readonly<{...}>`. */ export function getReadonly( - node: TSESTree.Node + node: TSESTree.Node, ): TSESTree.TSTypeReference | TSESTree.TSInterfaceHeritage | null { // For nested cases, we shouldn't look for any parent, but the immediate parent. if ( @@ -146,7 +152,7 @@ export function isInReturnType(node: TSESTree.Node): boolean { isDefined(n.parent) && isFunctionLike(n.parent) && n.parent.returnType === n, - node + node, ) !== null ); } @@ -202,16 +208,38 @@ export function isArgument(node: TSESTree.Node): boolean { return ( node.parent !== undefined && isCallExpression(node.parent) && - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument node.parent.arguments.includes(node as any) ); } +/** + * Is the given node a getter function? + */ +export function isGetter(node: TSESTree.Node): boolean { + return ( + node.parent !== undefined && + isProperty(node.parent) && + node.parent.kind === "get" + ); +} + +/** + * Is the given node a setter function? + */ +export function isSetter(node: TSESTree.Node): boolean { + return ( + node.parent !== undefined && + isProperty(node.parent) && + node.parent.kind === "set" + ); +} + /** * Get the key the given node is assigned to in its parent ObjectExpression. */ export function getKeyOfValueInObjectExpression( - node: TSESTree.Node + node: TSESTree.Node, ): string | null { if (!isDefined(node.parent)) { return null; @@ -223,7 +251,7 @@ export function getKeyOfValueInObjectExpression( } const objectExpressionProps = objectExpression.properties.filter( - (prop) => isProperty(prop) && prop.value === node + (prop) => isProperty(prop) && prop.value === node, ); if (objectExpressionProps.length !== 1) { return null; @@ -239,3 +267,44 @@ export function getKeyOfValueInObjectExpression( return objectExpressionProp.key.name; } + +/** + * Is the given identifier defined by a mutable variable (let or var)? + */ +export function isDefinedByMutableVaraible< + Context extends RuleContext, +>(node: TSESTree.Identifier, context: Context) { + const services = getParserServices(context); + const symbol = services.getSymbolAtLocation(node); + const variableDeclaration = symbol?.valueDeclaration; + if ( + variableDeclaration === undefined || + !typescript!.isVariableDeclaration(variableDeclaration) + ) { + return true; + } + + const variableDeclarator = + context.parserServices?.tsNodeToESTreeNodeMap.get(variableDeclaration); + if ( + variableDeclarator?.parent === undefined || + !isVariableDeclaration(variableDeclarator.parent) + ) { + return true; + } + + return variableDeclarator.parent.kind !== "const"; +} + +/** + * Get the root identifier of an expression. + */ +export function findRootIdentifier(node: TSESTree.Expression) { + if (isIdentifier(node)) { + return node; + } + if (isMemberExpression(node)) { + return findRootIdentifier(node.object); + } + return undefined; +} diff --git a/src/utils/type-guards.ts b/src/utils/type-guards.ts index cb5906eae..3bc1deeaa 100644 --- a/src/utils/type-guards.ts +++ b/src/utils/type-guards.ts @@ -2,11 +2,10 @@ * @file Functions that type guard the given node/type. */ -import type { TSESTree } from "@typescript-eslint/utils"; -import { AST_NODE_TYPES } from "@typescript-eslint/utils"; -import type { Type, UnionType } from "typescript"; +import { type TSESTree, AST_NODE_TYPES } from "@typescript-eslint/utils"; +import { type Type, type UnionType } from "typescript"; -import ts from "~/conditional-imports/typescript"; +import ts from "#eslint-plugin-functional/conditional-imports/typescript"; /* * TS Types. @@ -35,49 +34,49 @@ export type ObjectConstructorType = Type & { */ export function isArrayExpression( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ArrayExpression { return node.type === AST_NODE_TYPES.ArrayExpression; } export function isArrayPattern( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ArrayPattern { return node.type === AST_NODE_TYPES.ArrayPattern; } export function isAssignmentExpression( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.AssignmentExpression { return node.type === AST_NODE_TYPES.AssignmentExpression; } export function isAssignmentPattern( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.AssignmentPattern { return node.type === AST_NODE_TYPES.AssignmentPattern; } export function isBlockStatement( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.BlockStatement { return node.type === AST_NODE_TYPES.BlockStatement; } export function isBreakStatement( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.BreakStatement { return node.type === AST_NODE_TYPES.BreakStatement; } export function isCallExpression( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.CallExpression { return node.type === AST_NODE_TYPES.CallExpression; } export function isPropertyDefinition( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.PropertyDefinition { return node.type === AST_NODE_TYPES.PropertyDefinition; } @@ -88,7 +87,7 @@ export function isPropertyDefinition( * It doesn't matter what type of class. */ export function isClassLike( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ClassDeclaration | TSESTree.ClassExpression { return ( node.type === AST_NODE_TYPES.ClassDeclaration || @@ -97,25 +96,25 @@ export function isClassLike( } export function isContinueStatement( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ContinueStatement { return node.type === AST_NODE_TYPES.ContinueStatement; } export function isExpressionStatement( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ExpressionStatement { return node.type === AST_NODE_TYPES.ExpressionStatement; } export function isForStatement( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ForStatement { return node.type === AST_NODE_TYPES.ForStatement; } export function isFunctionDeclaration( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.FunctionDeclaration { return node.type === AST_NODE_TYPES.FunctionDeclaration; } @@ -126,7 +125,7 @@ export function isFunctionDeclaration( * It doesn't matter what type of function expression. */ export function isFunctionExpressionLike( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression { return ( node.type === AST_NODE_TYPES.FunctionExpression || @@ -140,7 +139,7 @@ export function isFunctionExpressionLike( * It doesn't matter what type of function. */ export function isFunctionLike( - node: TSESTree.Node + node: TSESTree.Node, ): node is | TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration @@ -153,43 +152,43 @@ export function isIdentifier(node: TSESTree.Node): node is TSESTree.Identifier { } export function isIfStatement( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.IfStatement { return node.type === AST_NODE_TYPES.IfStatement; } export function isMemberExpression( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.MemberExpression { return node.type === AST_NODE_TYPES.MemberExpression; } export function isMethodDefinition( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.MethodDefinition { return node.type === AST_NODE_TYPES.MethodDefinition; } export function isNewExpression( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.NewExpression { return node.type === AST_NODE_TYPES.NewExpression; } export function isObjectExpression( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ObjectExpression { return node.type === AST_NODE_TYPES.ObjectExpression; } export function isObjectPattern( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ObjectPattern { return node.type === AST_NODE_TYPES.ObjectPattern; } export function isPrivateIdentifier( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.PrivateIdentifier { return node.type === AST_NODE_TYPES.PrivateIdentifier; } @@ -203,169 +202,169 @@ export function isProperty(node: TSESTree.Node): node is TSESTree.Property { } export function isRestElement( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.RestElement { return node.type === AST_NODE_TYPES.RestElement; } export function isReturnStatement( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ReturnStatement { return node.type === AST_NODE_TYPES.ReturnStatement; } export function isSwitchStatement( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.SwitchStatement { return node.type === AST_NODE_TYPES.SwitchStatement; } export function isThisExpression( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ThisExpression { return node.type === AST_NODE_TYPES.ThisExpression; } export function isThrowStatement( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.ThrowStatement { return node.type === AST_NODE_TYPES.ThrowStatement; } export function isTSArrayType( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSArrayType { return node.type === AST_NODE_TYPES.TSArrayType; } export function isTSFunctionType( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSFunctionType { return node.type === AST_NODE_TYPES.TSFunctionType; } export function isTSIndexSignature( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSIndexSignature { return node.type === AST_NODE_TYPES.TSIndexSignature; } export function isTSInterfaceBody( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSInterfaceBody { return node.type === AST_NODE_TYPES.TSInterfaceBody; } export function isTSInterfaceDeclaration( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSInterfaceDeclaration { return node.type === AST_NODE_TYPES.TSInterfaceDeclaration; } export function isTSInterfaceHeritage( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSInterfaceHeritage { return node.type === AST_NODE_TYPES.TSInterfaceHeritage; } export function isTSNullKeyword( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSNullKeyword { return node.type === AST_NODE_TYPES.TSNullKeyword; } export function isTSParameterProperty( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSParameterProperty { return node.type === AST_NODE_TYPES.TSParameterProperty; } export function isTSPropertySignature( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSPropertySignature { return node.type === AST_NODE_TYPES.TSPropertySignature; } export function isTSTupleType( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSTupleType { return node.type === AST_NODE_TYPES.TSTupleType; } export function isTSTypeAnnotation( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSTypeAnnotation { return node.type === AST_NODE_TYPES.TSTypeAnnotation; } export function isTSTypeLiteral( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSTypeLiteral { return node.type === AST_NODE_TYPES.TSTypeLiteral; } export function isTSTypeOperator( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSTypeOperator { return node.type === AST_NODE_TYPES.TSTypeOperator; } export function isTSTypePredicate( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSTypePredicate { return node.type === AST_NODE_TYPES.TSTypePredicate; } export function isTSTypeReference( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSTypeReference { return node.type === AST_NODE_TYPES.TSTypeReference; } export function isTSUndefinedKeyword( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSUndefinedKeyword { return node.type === AST_NODE_TYPES.TSUndefinedKeyword; } export function isTSVoidKeyword( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.TSVoidKeyword { return node.type === AST_NODE_TYPES.TSVoidKeyword; } export function isUnaryExpression( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.UnaryExpression { return node.type === AST_NODE_TYPES.UnaryExpression; } export function isVariableDeclaration( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.VariableDeclaration { return node.type === AST_NODE_TYPES.VariableDeclaration; } export function isVariableDeclarator( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.VariableDeclarator { return node.type === AST_NODE_TYPES.VariableDeclarator; } export function isYieldExpression( - node: TSESTree.Node + node: TSESTree.Node, ): node is TSESTree.YieldExpression { return node.type === AST_NODE_TYPES.YieldExpression; } export function hasID( - node: TSESTree.Node + node: TSESTree.Node, ): node is Extract { return Object.hasOwn(node, "id"); } export function hasKey( - node: TSESTree.Node + node: TSESTree.Node, ): node is Extract { return Object.hasOwn(node, "key"); } @@ -382,112 +381,28 @@ export function isUnionType(type: Type): type is UnionType { return ts !== undefined && type.flags === ts.TypeFlags.Union; } -export function isArrayType(type: Type | null): type is ArrayType; -export function isArrayType( - type: Type, - assumeType: false, - node: null -): type is ArrayType; -export function isArrayType( - type: Type | null, - assumeType: boolean, - node: TSESTree.Node | null -): type is ArrayType; -export function isArrayType( - type: null, - assumeType: true, - node: TSESTree.Node -): boolean; -export function isArrayType( - type: Type | null, - assumeType = false, - node: TSESTree.Node | null = null -): boolean { - return assumeType === true && type === null - ? node !== null - : type !== null && - (((type.symbol as unknown) !== undefined && - type.symbol.name === "Array") || - (isUnionType(type) && - type.types.some((t) => isArrayType(t, false, null)))); -} - -export function isArrayConstructorType( - type: Type | null -): type is ArrayConstructorType; -export function isArrayConstructorType( - type: Type, - assumeType: false, - node: null -): type is ArrayConstructorType; -export function isArrayConstructorType( - type: Type | null, - assumeType: boolean, - node: TSESTree.Node | null -): type is ArrayConstructorType; -export function isArrayConstructorType( - type: null, - assumeType: true, - node: TSESTree.Node -): boolean; -export function isArrayConstructorType( - type: Type | null, - assumeType = false, - node: TSESTree.Node | null = null -): boolean { - return assumeType === true && type === null - ? node !== null && isIdentifier(node) && node.name === "Array" - : type !== null && - (((type.symbol as unknown) !== undefined && - type.symbol.name === "ArrayConstructor") || - (isUnionType(type) && - type.types.some((t) => isArrayConstructorType(t, false, null)))); -} - -export function isObjectConstructorType( - type: Type | null -): type is ObjectConstructorType; -export function isObjectConstructorType( - type: Type, - assumeType: false, - node: null -): type is ObjectConstructorType; -export function isObjectConstructorType( - type: Type | null, - assumeType: boolean, - node: TSESTree.Node | null -): type is ObjectConstructorType; -export function isObjectConstructorType( - type: null, - assumeType: true, - node: TSESTree.Node -): boolean; -export function isObjectConstructorType( - type: Type | null, - assumeType = false, - node: TSESTree.Node | null = null -): boolean { - return assumeType === true && type === null - ? node !== null && isIdentifier(node) && node.name === "Object" - : type !== null && - (((type.symbol as unknown) !== undefined && - type.symbol.name === "ObjectConstructor") || - (isUnionType(type) && - type.types.some((t) => isObjectConstructorType(t, false, null)))); -} - -export function isNeverType(type: Type): boolean { - return ts !== undefined && type.flags === ts.TypeFlags.Never; -} - -export function isVoidType(type: Type): boolean { - return ts !== undefined && type.flags === ts.TypeFlags.Void; -} - -export function isNullType(type: Type): boolean { - return ts !== undefined && type.flags === ts.TypeFlags.Null; -} - -export function isUndefinedType(type: Type): boolean { - return ts !== undefined && type.flags === ts.TypeFlags.Undefined; +export function isArrayType(type: Type | null): boolean { + return ( + type !== null && + (((type.symbol as unknown) !== undefined && type.symbol.name === "Array") || + (isUnionType(type) && type.types.some(isArrayType))) + ); +} + +export function isArrayConstructorType(type: Type | null): boolean { + return ( + type !== null && + (((type.symbol as unknown) !== undefined && + type.symbol.name === "ArrayConstructor") || + (isUnionType(type) && type.types.some(isArrayConstructorType))) + ); +} + +export function isObjectConstructorType(type: Type | null): boolean { + return ( + type !== null && + (((type.symbol as unknown) !== undefined && + type.symbol.name === "ObjectConstructor") || + (isUnionType(type) && type.types.some(isObjectConstructorType))) + ); } diff --git a/tests/.eslintrc.json b/tests/.eslintrc.json deleted file mode 100644 index ac3d4d7a1..000000000 --- a/tests/.eslintrc.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "plugins": ["ava"], - "extends": ["plugin:ava/recommended"], - "rules": { - "@typescript-eslint/no-unused-vars-experimental": "off", - "@typescript-eslint/strict-boolean-expressions": "off", - "ava/no-import-test-files": ["error", { "files": ["tests/**/*.test.ts"] }], - "eslint-comments/disable-enable-pair": "off", - "eslint-comments/no-unlimited-disable": "off", - "functional/functional-parameters": "off", - "functional/no-conditional-statements": "off", - "functional/no-expression-statements": "off", - "functional/no-loop-statements": "off", - "functional/no-return-void": "off", - "import/no-named-as-default-member": "off", - "sonarjs/no-duplicate-string": "off", - "sonarjs/no-identical-functions": "off", - "unicorn/prefer-module": "off" - } -} diff --git a/tests/common/ignore-options.test.ts b/tests/common/ignore-options.test.ts index 5804c8cc5..2d67837b9 100644 --- a/tests/common/ignore-options.test.ts +++ b/tests/common/ignore-options.test.ts @@ -1,180 +1,207 @@ -import assert from "node:assert"; - -import type { TSESLint } from "@typescript-eslint/utils"; -import test from "ava"; +import { + type InvalidTestCase, + type ValidTestCase, +} from "@typescript-eslint/rule-tester"; import dedent from "dedent"; -import RuleTester from "eslint-ava-rule-tester"; -import type { - IgnoreAccessorPatternOption, - IgnorePatternOption, -} from "~/options"; -import { shouldIgnorePattern } from "~/options"; -import { filename, configs } from "~/tests/helpers/configs"; -import { testWrapper } from "~/tests/helpers/testers"; -import { addFilename, createDummyRule } from "~/tests/helpers/util"; +import { + type IgnoreIdentifierPatternOption, + type IgnoreAccessorPatternOption, + type IgnoreCodePatternOption, + shouldIgnorePattern, +} from "#eslint-plugin-functional/options"; +import { getRuleTester } from "#eslint-plugin-functional/tests/helpers/RuleTester"; +import { + filename, + configs, +} from "#eslint-plugin-functional/tests/helpers/configs"; +import { + addFilename, + createDummyRule, +} from "#eslint-plugin-functional/tests/helpers/util"; /** * Create a dummy rule that operates on AssignmentExpression nodes. */ -function createDummyAssignmentExpressionRule() { +function createDummyRuleFor(nodeType: string) { return createDummyRule((context) => { const [allowed, options] = context.options; return { - AssignmentExpression: (node) => { - assert( - shouldIgnorePattern( - node, - context, - options.ignorePattern, - options.ignoreAccessorPattern - ) === allowed - ); + [nodeType]: (node) => { + return { + context, + descriptors: + shouldIgnorePattern( + node, + context, + options.ignoreIdentifierPattern, + options.ignoreAccessorPattern, + options.ignoreCodePattern, + ) === allowed + ? [] + : [{ node, messageId: "generic" }], + }; }, }; }); } -const tests: Array< - TSESLint.ValidTestCase<[boolean, IgnoreAccessorPatternOption]> +const validTests: Array> = + [ + // Exact match. + { + code: dedent` + mutable = 0; + `, + options: [true, { ignoreAccessorPattern: "mutable" }], + }, + { + code: dedent` + mutable.foo = 0; + `, + options: [true, { ignoreAccessorPattern: "mutable.foo" }], + }, + { + code: dedent` + x = 0; + xxx_mutable_xxx = 0; + mutable.foo.bar = 0; + mutable.foo[0] = 0; + mutable.foo["foo-bar"] = 0; + `, + options: [false, { ignoreAccessorPattern: "mutable" }], + }, + // Prefix match. + { + code: dedent` + mutable_ = 0; + mutable_xxx = 0; + `, + options: [true, { ignoreAccessorPattern: "mutable_*" }], + }, + { + code: dedent` + x = 0; + xxx_mutable_xxx = 0; + mutable_xxx.foo = 0; + mutable_xxx[0] = 0; + mutable_xxx["foo-bar"] = 0; + `, + options: [false, { ignoreAccessorPattern: "mutable_*" }], + }, + // Suffix match. + { + code: dedent` + _mutable = 0; + xxx_mutable = 0; + `, + options: [true, { ignoreAccessorPattern: "*_mutable" }], + }, + { + code: dedent` + x = 0; + xxx_mutable_xxx = 0; + xxx_mutable.foo = 0; + xxx_mutable[0] = 0; + xxx_mutable["foo-bar"] = 0; + `, + options: [false, { ignoreAccessorPattern: "*_mutable" }], + }, + // Middle match. + { + code: dedent` + xxx_mutable_xxx = 0; + `, + options: [true, { ignoreAccessorPattern: "*_mutable_*" }], + }, + { + code: dedent` + x = 0; + xxx_mutable_xxx.foo = 0; + xxx_mutable_xxx[0] = 0; + xxx_mutable_xxx["foo-bar"] = 0; + `, + options: [false, { ignoreAccessorPattern: "*_mutable_*" }], + }, + // Mutable properties. + { + code: dedent` + mutable_xxx.foo = 0; + mutable_xxx[0] = 0; + mutable_xxx["foo-bar"] = 0; + `, + options: [true, { ignoreAccessorPattern: "mutable_*.*" }], + }, + { + code: dedent` + mutable_xxx = 0; + mutable_xxx.foo.bar = 0; + mutable_xxx.foo[0] = 0; + mutable_xxx.foo["foo-bar"] = 0; + `, + options: [false, { ignoreAccessorPattern: "mutable_*.*" }], + }, + // Mutable deep properties. + { + code: dedent` + mutable_xxx.foo.bar[0] = 0; + mutable_xxx.foo.bar["foo-bar"] = 0; + mutable_xxx.foo.bar = [0, 1, 2]; + mutable_xxx.foo = 0; + mutable_xxx[0] = 0; + mutable_xxx["foo-bar"] = 0; + `, + options: [true, { ignoreAccessorPattern: "mutable_*.*.**" }], + }, + { + code: dedent` + mutable_xxx = 0; + `, + options: [false, { ignoreAccessorPattern: "mutable_*.*.**" }], + }, + // Mutable deep properties and container. + { + code: dedent` + mutable_xxx.foo.bar[0] = 0; + mutable_xxx.foo.bar["foo-bar"] = 0; + mutable_xxx.foo.bar = [0, 1, 2]; + mutable_xxx.foo = 0; + mutable_xxx[0] = 0; + mutable_xxx["foo-bar"] = 0; + mutable_xxx = 0; + `, + options: [true, { ignoreAccessorPattern: "mutable_*.**" }], + }, + ]; + +const invalidTests: Array< + InvalidTestCase<"generic", [boolean, IgnoreAccessorPatternOption]> > = [ // Exact match. { code: dedent` - mutable = 0; + immutable = 0; `, options: [true, { ignoreAccessorPattern: "mutable" }], - }, - { - code: dedent` - mutable.foo = 0; - `, - options: [true, { ignoreAccessorPattern: "mutable.foo" }], - }, - { - code: dedent` - x = 0; - xxx_mutable_xxx = 0; - mutable.foo.bar = 0; - mutable.foo[0] = 0; - mutable.foo["foo-bar"] = 0; - `, - options: [false, { ignoreAccessorPattern: "mutable" }], - }, - // Prefix match. - { - code: dedent` - mutable_ = 0; - mutable_xxx = 0; - `, - options: [true, { ignoreAccessorPattern: "mutable_*" }], - }, - { - code: dedent` - x = 0; - xxx_mutable_xxx = 0; - mutable_xxx.foo = 0; - mutable_xxx[0] = 0; - mutable_xxx["foo-bar"] = 0; - `, - options: [false, { ignoreAccessorPattern: "mutable_*" }], - }, - // Suffix match. - { - code: dedent` - _mutable = 0; - xxx_mutable = 0; - `, - options: [true, { ignoreAccessorPattern: "*_mutable" }], - }, - { - code: dedent` - x = 0; - xxx_mutable_xxx = 0; - xxx_mutable.foo = 0; - xxx_mutable[0] = 0; - xxx_mutable["foo-bar"] = 0; - `, - options: [false, { ignoreAccessorPattern: "*_mutable" }], - }, - // Middle match. - { - code: dedent` - xxx_mutable_xxx = 0; - `, - options: [true, { ignoreAccessorPattern: "*_mutable_*" }], - }, - { - code: dedent` - x = 0; - xxx_mutable_xxx.foo = 0; - xxx_mutable_xxx[0] = 0; - xxx_mutable_xxx["foo-bar"] = 0; - `, - options: [false, { ignoreAccessorPattern: "*_mutable_*" }], - }, - // Mutable properties. - { - code: dedent` - mutable_xxx.foo = 0; - mutable_xxx[0] = 0; - mutable_xxx["foo-bar"] = 0; - `, - options: [true, { ignoreAccessorPattern: "mutable_*.*" }], - }, - { - code: dedent` - mutable_xxx = 0; - mutable_xxx.foo.bar = 0; - mutable_xxx.foo[0] = 0; - mutable_xxx.foo["foo-bar"] = 0; - `, - options: [false, { ignoreAccessorPattern: "mutable_*.*" }], - }, - // Mutable deep properties. - { - code: dedent` - mutable_xxx.foo.bar[0] = 0; - mutable_xxx.foo.bar["foo-bar"] = 0; - mutable_xxx.foo.bar = [0, 1, 2]; - mutable_xxx.foo = 0; - mutable_xxx[0] = 0; - mutable_xxx["foo-bar"] = 0; - `, - options: [true, { ignoreAccessorPattern: "mutable_*.*.**" }], - }, - { - code: dedent` - mutable_xxx = 0; - `, - options: [false, { ignoreAccessorPattern: "mutable_*.*.**" }], - }, - // Mutable deep properties and container. - { - code: dedent` - mutable_xxx.foo.bar[0] = 0; - mutable_xxx.foo.bar["foo-bar"] = 0; - mutable_xxx.foo.bar = [0, 1, 2]; - mutable_xxx.foo = 0; - mutable_xxx[0] = 0; - mutable_xxx["foo-bar"] = 0; - mutable_xxx = 0; - `, - options: [true, { ignoreAccessorPattern: "mutable_*.**" }], + errors: [ + { + messageId: "generic", + }, + ], }, ]; -new RuleTester(testWrapper(test), configs.es10).run( - "AssignmentExpression", - createDummyAssignmentExpressionRule(), +getRuleTester(configs.esLatest).run( + "ignoreAccessorPattern", + createDummyRuleFor("AssignmentExpression"), addFilename(filename, { - valid: [...(tests as RuleTester.ValidTestCase[])], - invalid: [], - }) + valid: validTests, + invalid: invalidTests, + }), ); -const assignmentExpressionTests: Array< - TSESLint.ValidTestCase<[boolean, IgnorePatternOption]> +const assignmentExpressionValidTests: Array< + ValidTestCase<[boolean, IgnoreIdentifierPatternOption]> > = [ // Prefix match. { @@ -184,7 +211,7 @@ const assignmentExpressionTests: Array< mutable_xxx.foo = 0; mutable_xxx[0] = 0; `, - options: [true, { ignorePattern: "^mutable_" }], + options: [true, { ignoreIdentifierPattern: "^mutable_" }], }, // Suffix match. { @@ -193,70 +220,94 @@ const assignmentExpressionTests: Array< xxx_mutable = 0; foo.xxx_mutable = 0; `, - options: [true, { ignorePattern: "_mutable$" }], + options: [true, { ignoreIdentifierPattern: "_mutable$" }], }, // Middle match. { code: dedent` mutable = 0; `, - options: [true, { ignorePattern: "^mutable$" }], + options: [true, { ignoreIdentifierPattern: "^mutable$" }], }, { code: dedent` mutable.foo.bar = 0; mutable.bar[0] = 0; `, - options: [false, { ignorePattern: "^mutable$" }], + options: [false, { ignoreIdentifierPattern: "^mutable$" }], + }, +]; + +const assignmentExpressionInvalidTests: Array< + InvalidTestCase<"generic", [boolean, IgnoreIdentifierPatternOption]> +> = [ + // Exact match. + { + code: dedent` + immutable_xxx = 0; + `, + options: [true, { ignoreIdentifierPattern: "^mutable_" }], + errors: [ + { + messageId: "generic", + }, + ], }, ]; -new RuleTester(testWrapper(test), configs.es10).run( - "AssignmentExpression", - createDummyAssignmentExpressionRule(), +getRuleTester(configs.esLatest).run( + "ignoreIdentifierPattern", + createDummyRuleFor("AssignmentExpression"), addFilename(filename, { - valid: [...(assignmentExpressionTests as RuleTester.ValidTestCase[])], - invalid: [], - }) + valid: assignmentExpressionValidTests, + invalid: assignmentExpressionInvalidTests, + }), ); -const expressionStatementTests: Array< - TSESLint.ValidTestCase<[boolean, IgnorePatternOption]> +const expressionStatementValidTests: Array< + ValidTestCase<[boolean, IgnoreCodePatternOption]> > = [ { code: dedent` const x = 0; `, - options: [true, { ignorePattern: "^const x" }], + options: [true, { ignoreCodePattern: "^const x" }], }, { code: dedent` const x = 0; `, - options: [true, { ignorePattern: "= 0;$" }], + options: [true, { ignoreCodePattern: "= 0;$" }], }, { code: dedent` const x = 0; `, - options: [true, { ignorePattern: "^const x = 0;$" }], + options: [true, { ignoreCodePattern: "^const x = 0;$" }], }, ]; -new RuleTester(testWrapper(test), configs.es10).run( - "ExpressionStatement", - createDummyRule((context) => { - const [allowed, options] = context.options; - return { - ExpressionStatement: (node) => { - assert( - shouldIgnorePattern(node, context, options.ignorePattern) === allowed - ); +const expressionStatementInvalidTests: Array< + InvalidTestCase<"generic", [boolean, IgnoreCodePatternOption]> +> = [ + { + code: dedent` + const x = 0; + `, + options: [true, { ignoreCodePattern: "^const y" }], + errors: [ + { + messageId: "generic", }, - }; - }), + ], + }, +]; + +getRuleTester(configs.esLatest).run( + "ignoreCodePattern", + createDummyRuleFor("VariableDeclaration"), addFilename(filename, { - valid: [...(expressionStatementTests as RuleTester.ValidTestCase[])], - invalid: [], - }) + valid: expressionStatementValidTests, + invalid: expressionStatementInvalidTests, + }), ); diff --git a/tests/configs.test.ts b/tests/configs.test.ts index f3c22c469..56b1045a4 100644 --- a/tests/configs.test.ts +++ b/tests/configs.test.ts @@ -1,110 +1,120 @@ -import test from "ava"; +import { describe, it } from "vitest"; -import all from "~/configs/all"; -import currying from "~/configs/currying"; -import deprecated from "~/configs/deprecated"; -import lite from "~/configs/lite"; -import noExceptions from "~/configs/no-exceptions"; -import noMutations from "~/configs/no-mutations"; -import noOtherParadigms from "~/configs/no-other-paradigms"; -import noStatements from "~/configs/no-statements"; -import off from "~/configs/off"; -import recommended from "~/configs/recommended"; -import strict from "~/configs/strict"; -import stylistic from "~/configs/stylistic"; -import { rules } from "~/rules"; +import all from "#eslint-plugin-functional/configs/all"; +import currying from "#eslint-plugin-functional/configs/currying"; +import deprecated from "#eslint-plugin-functional/configs/deprecated"; +import lite from "#eslint-plugin-functional/configs/lite"; +import noExceptions from "#eslint-plugin-functional/configs/no-exceptions"; +import noMutations from "#eslint-plugin-functional/configs/no-mutations"; +import noOtherParadigms from "#eslint-plugin-functional/configs/no-other-paradigms"; +import noStatements from "#eslint-plugin-functional/configs/no-statements"; +import off from "#eslint-plugin-functional/configs/off"; +import recommended from "#eslint-plugin-functional/configs/recommended"; +import strict from "#eslint-plugin-functional/configs/strict"; +import stylistic from "#eslint-plugin-functional/configs/stylistic"; +import { rules } from "#eslint-plugin-functional/rules"; -const allRules = Object.values(rules); -const allNonDeprecatedRules = allRules.filter( - (rule) => rule.meta === undefined || rule.meta.deprecated !== true -); -const allDeprecatedRules = allRules.filter( - (rule) => rule.meta?.deprecated === true -); - -test('Config "All" - should have all the non-deprecated rules', (t) => { - const configRules = Object.keys(all.rules ?? {}); - - t.is(all.overrides, undefined, "should not have any overrides"); - t.is( - configRules.length, - allNonDeprecatedRules.length, - "should have every non-deprecated rule" +describe("Configs", () => { + const allRules = Object.values(rules); + const allNonDeprecatedRules = allRules.filter( + (rule) => rule.meta === undefined || rule.meta.deprecated !== true, ); + const allDeprecatedRules = allRules.filter( + (rule) => rule.meta.deprecated === true, + ); + + it('"All" - should have all the non-deprecated rules', (t) => { + const configRules = Object.keys(all.rules ?? {}); - for (const name of configRules) { - t.is( - Boolean(rules[name.slice("functional/".length)].meta.deprecated), - false, - `Rule "${name}" should not be deprecated.` + t.expect(all.overrides).to.equal( + undefined, + "should not have any overrides", + ); + t.expect(configRules.length).to.equal( + allNonDeprecatedRules.length, + "should have every non-deprecated rule", ); - } -}); -test('Config "Deprecated" - should only have deprecated rules', (t) => { - const configRules = Object.keys(deprecated.rules ?? {}); + for (const name of configRules) { + t.expect( + Boolean( + rules[name.slice("functional/".length) as keyof typeof rules].meta + .deprecated, + ), + ).to.equal(false, `Rule "${name}" should not be deprecated.`); + } + }); - t.is(deprecated.overrides, undefined, "should not have any overrides"); - t.is( - configRules.length, - allDeprecatedRules.length, - "should have every deprecated rule" - ); + it('"Deprecated" - should only have deprecated rules', (t) => { + const configRules = Object.keys(deprecated.rules ?? {}); - for (const name of configRules) { - t.is( - rules[name.slice("functional/".length)].meta.deprecated, - true, - `Rule "${name}" should be deprecated.` + t.expect(deprecated.overrides).to.equal( + undefined, + "should not have any overrides", + ); + t.expect(configRules.length).to.equal( + allDeprecatedRules.length, + "should have every deprecated rule", ); - } -}); -test('Config "Off" - should have all the rules but turned off', (t) => { - t.is(off.overrides, undefined, "should not have any overrides"); + for (const name of configRules) { + t.expect( + rules[name.slice("functional/".length) as keyof typeof rules].meta + .deprecated, + ).to.equal(true, `Rule "${name}" should be deprecated.`); + } + }); - const configRules = Object.entries(off.rules ?? {}); - t.is(configRules.length, allRules.length, "should have every rule"); + it('"Off" - should have all the rules but turned off', (t) => { + t.expect(off.overrides).to.equal( + undefined, + "should not have any overrides", + ); - for (const [name, value] of configRules) { - const severity = Array.isArray(value) ? value[0] : value; - t.is( - severity, - "off", - `Rule "${name}" should be turned off in the off config.` + const configRules = Object.entries(off.rules ?? {}); + t.expect(configRules.length).to.equal( + allRules.length, + "should have every rule", ); - } -}); -/** - * A map of each config (except the special ones) to it's name. - */ -const configs = new Map([ - [currying, "Currying"], - [recommended, "Recommended"], - [lite, "Lite"], - [strict, "Functional Strict"], - [noExceptions, "No Exceptions"], - [noMutations, "No Mutations"], - [noOtherParadigms, "No Other Paradigms"], - [noStatements, "No Statements"], - [stylistic, "Stylistic"], -]); + for (const [name, value] of configRules) { + const severity = Array.isArray(value) ? value[0] : value; + t.expect(severity).to.equal( + "off", + `Rule "${name}" should be turned off in the off config.`, + ); + } + }); -for (const [config, name] of configs.entries()) { - test(`Config "${name}"`, (t) => { - t.is(config.overrides, undefined, "should not have any overrides"); + /** + * A map of each config (except the special ones) to it's name. + */ + const configs = new Map([ + [currying, "Currying"], + [recommended, "Recommended"], + [lite, "Lite"], + [strict, "Functional Strict"], + [noExceptions, "No Exceptions"], + [noMutations, "No Mutations"], + [noOtherParadigms, "No Other Paradigms"], + [noStatements, "No Statements"], + [stylistic, "Stylistic"], + ]); - const rulesNames = Object.keys(config.rules ?? {}); - if (rulesNames.length === 0) { - t.fail("no rules"); - } - for (const rule of rulesNames) { - t.not( - all.rules?.[rule], + for (const [config, name] of configs.entries()) { + it(`Config "${name}"`, (t) => { + t.expect(config.overrides).to.equal( undefined, - "should not have any rules that the `all` config does not have" + "should not have any overrides", ); - } - }); -} + + const rulesNames = Object.keys(config.rules ?? {}); + if (rulesNames.length === 0) { + t.expect.fail("no rules"); + } + for (const rule of rulesNames) { + t.expect(all.rules?.[rule]).toBeDefined(); + } + }); + } +}); diff --git a/tests/fixture/file.ts b/tests/fixture/file.ts new file mode 100644 index 000000000..e69de29bb diff --git a/tests/fixture/tsconfig.json b/tests/fixture/tsconfig.json new file mode 100644 index 000000000..2ce472f6b --- /dev/null +++ b/tests/fixture/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "strict": true + }, + "include": ["file.ts"] +} diff --git a/tests/helpers/RuleTester.ts b/tests/helpers/RuleTester.ts new file mode 100644 index 000000000..c938c6100 --- /dev/null +++ b/tests/helpers/RuleTester.ts @@ -0,0 +1,22 @@ +import { + RuleTester, + type RuleTesterConfig, +} from "@typescript-eslint/rule-tester"; +import { afterAll, beforeAll, it, describe } from "vitest"; + +/* eslint-disable @typescript-eslint/naming-convention */ +class VitestRuleTester extends RuleTester { + public static afterAll = afterAll; + public static beforeAll = beforeAll; + public static it = it; + public static itOnly = it.only; + public static itSkip = it.skip; + public static describe = describe; + public static describeOnly = describe.only; + public static describeSkip = describe.skip; +} +/* eslint-enable @typescript-eslint/naming-convention */ + +export function getRuleTester(config: RuleTesterConfig) { + return new VitestRuleTester(config); +} diff --git a/tests/helpers/configs.ts b/tests/helpers/configs.ts index 17caac579..6c91b4b6d 100644 --- a/tests/helpers/configs.ts +++ b/tests/helpers/configs.ts @@ -1,105 +1,148 @@ import path from "node:path"; -import type { Linter } from "eslint"; +import { type RuleTesterConfig } from "@typescript-eslint/rule-tester"; -export const filename = path.join(__dirname, "file.ts"); +const fixturePath = path.join(process.cwd(), "tests/fixture"); +export const filename = path.join(fixturePath, "file.ts"); +/* eslint-disable unicorn/prefer-module */ const typescriptParser = require.resolve("@typescript-eslint/parser"); const babelParser = require.resolve("@babel/eslint-parser"); const espreeParser = require.resolve("espree"); +/* eslint-enable unicorn/prefer-module */ export const configs = { typescript: { parser: typescriptParser, parserOptions: { sourceType: "module", - project: path.join(__dirname, "./test-tsconfig.json"), + tsconfigRootDir: fixturePath, + project: "tsconfig.json", }, - } as Linter.Config, + dependencyConstraints: { + typescript: "4.3.5", + }, + } satisfies RuleTesterConfig, + + esLatest: { + parser: babelParser, + parserOptions: { + ecmaVersion: "latest", + requireConfigFile: false, + babelOptions: { + babelrc: false, + configFile: false, + }, + }, + } satisfies RuleTesterConfig, + + es2022: { + parser: babelParser, + parserOptions: { + ecmaVersion: 2022, + requireConfigFile: false, + babelOptions: { + babelrc: false, + configFile: false, + }, + }, + } satisfies RuleTesterConfig, + + es2021: { + parser: babelParser, + parserOptions: { + ecmaVersion: 2021, + requireConfigFile: false, + babelOptions: { + babelrc: false, + configFile: false, + }, + }, + } satisfies RuleTesterConfig, - es11: { + es2020: { parser: babelParser, parserOptions: { - ecmaVersion: 11, + ecmaVersion: 2020, requireConfigFile: false, babelOptions: { babelrc: false, configFile: false, }, }, - } as Linter.Config, + } satisfies RuleTesterConfig, - es10: { + es2019: { parser: babelParser, parserOptions: { - ecmaVersion: 10, + ecmaVersion: 2019, requireConfigFile: false, babelOptions: { babelrc: false, configFile: false, }, }, - } as Linter.Config, + } satisfies RuleTesterConfig, - es9: { + es2018: { parser: babelParser, parserOptions: { - ecmaVersion: 9, + ecmaVersion: 2018, requireConfigFile: false, babelOptions: { babelrc: false, configFile: false, }, }, - } as Linter.Config, + } satisfies RuleTesterConfig, - es8: { + es2017: { parser: babelParser, parserOptions: { - ecmaVersion: 8, + ecmaVersion: 2017, requireConfigFile: false, babelOptions: { babelrc: false, configFile: false, }, }, - } as Linter.Config, + } satisfies RuleTesterConfig, - es7: { + es2016: { parser: babelParser, parserOptions: { - ecmaVersion: 7, + ecmaVersion: 2016, requireConfigFile: false, babelOptions: { babelrc: false, configFile: false, }, }, - } as Linter.Config, + } satisfies RuleTesterConfig, - es6: { + es2015: { parser: babelParser, parserOptions: { - ecmaVersion: 6, + ecmaVersion: 2015, requireConfigFile: false, babelOptions: { babelrc: false, configFile: false, }, }, - } as Linter.Config, + } satisfies RuleTesterConfig, es5: { parser: espreeParser, parserOptions: { ecmaVersion: 5, }, - } as Linter.Config, + } satisfies RuleTesterConfig, es3: { parser: espreeParser, parserOptions: { ecmaVersion: 3, }, - } as Linter.Config, + } satisfies RuleTesterConfig, }; diff --git a/tests/helpers/test-tsconfig.json b/tests/helpers/test-tsconfig.json deleted file mode 100644 index c0f1603e5..000000000 --- a/tests/helpers/test-tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compilerOptions": { - "lib": ["es2017"], - "module": "commonjs", - "moduleResolution": "node", - "skipLibCheck": true, - "target": "es2017" - }, - "files": ["file.ts"] -} diff --git a/tests/helpers/testers.ts b/tests/helpers/testers.ts index b573d9908..d8ac07662 100644 --- a/tests/helpers/testers.ts +++ b/tests/helpers/testers.ts @@ -1,59 +1,42 @@ -import test from "ava"; -import type { Implementation } from "ava"; -import type { Rule } from "eslint"; -import RuleTester from "eslint-ava-rule-tester"; +import { type RuleModule } from "@typescript-eslint/utils/ts-eslint"; +import { getRuleTester } from "./RuleTester"; import { configs } from "./configs"; import { processInvalidTestCase, processValidTestCase, - isTsInstalled, + type ValidTestCaseSet, + type InvalidTestCaseSet, } from "./util"; -import type { ValidTestCase, InvalidTestCase } from "./util"; -type TestFunction = ( - ruleName: string, - rule: Rule.RuleModule, - tests: { - valid: ValidTestCase[]; - invalid: InvalidTestCase[]; - } -) => void; +type TestFunction< + TMessageIds extends string, + TOptions extends Readonly, +> = (tests: { + valid: Array>; + invalid: Array>; +}) => void; -const testNames = new Map(); - -/** - * A wrapper function to wrap a given ava test function and issue a unique title - * is given to each rule. - */ -export function testWrapper( - avaTest: (title: string, callback: Implementation) => void -) { - return (title: string, callback: Implementation) => { - const count = (testNames.get(title) ?? 0) + 1; - testNames.set(title, count); - avaTest(`v${count} - ${title}`, callback); - }; -} - -export const testUsing = Object.fromEntries( - [...Object.entries(configs)].map( - ([configName, config]) => - [ - configName, - ((ruleName, rule, { valid, invalid }) => { - const ruleTester = new RuleTester( - testWrapper( - configName === "typescript" && !isTsInstalled() ? test.skip : test - ), - config - ); +export function testRule< + TMessageIds extends string, + TOptions extends Readonly, +>(ruleName: string, rule: RuleModule) { + return Object.fromEntries( + [...Object.entries(configs)].map( + ([configName, config]): [ + keyof typeof configs, + TestFunction, + ] => [ + configName as keyof typeof configs, + ({ valid, invalid }) => { + const ruleTester = getRuleTester(config); ruleTester.run(ruleName, rule, { valid: processValidTestCase(valid), invalid: processInvalidTestCase(invalid), }); - }) as TestFunction, - ] as const - ) -) as Record; + }, + ], + ), + ) as Record>; +} diff --git a/tests/helpers/util.ts b/tests/helpers/util.ts index 894d0215f..3ba6b7793 100644 --- a/tests/helpers/util.ts +++ b/tests/helpers/util.ts @@ -1,10 +1,19 @@ -import type { - SharedConfigurationSettings, - TSESLint, +import { + type InvalidTestCase, + type RunTests, + type ValidTestCase, +} from "@typescript-eslint/rule-tester"; +import { + type SharedConfigurationSettings, + type TSESLint, } from "@typescript-eslint/utils"; -import type { Rule, RuleTester as ESLintRuleTester } from "eslint"; +import { type RuleModule } from "@typescript-eslint/utils/ts-eslint"; -import ts from "~/conditional-imports/typescript"; +import { + type RuleFunctionsMap, + type NamedCreateRuleMetaWithCategory, + createRuleUsingFunction, +} from "#eslint-plugin-functional/utils/rule"; import { filename as dummyFilename } from "./configs"; @@ -12,7 +21,6 @@ type OptionsSets = { /** * The set of options this test case should pass for. */ - /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ optionsSet: any[]; /** @@ -22,49 +30,53 @@ type OptionsSets = { settingsSet?: SharedConfigurationSettings[]; }; -export type ValidTestCase = Omit< - ESLintRuleTester.ValidTestCase, +export type ValidTestCaseSet> = Omit< + ValidTestCase, "options" | "settings" > & OptionsSets; -export type InvalidTestCase = Omit< - ESLintRuleTester.InvalidTestCase, - "options" | "settings" -> & +export type InvalidTestCaseSet< + TMessageIds extends string, + TOptions extends Readonly, +> = Omit, "options" | "settings"> & OptionsSets; /** * Convert our test cases into ones eslint test runner is expecting. */ -export function processInvalidTestCase( - testCases: InvalidTestCase[] -): ESLintRuleTester.InvalidTestCase[] { +export function processInvalidTestCase< + TMessageIds extends string, + TOptions extends Readonly, +>( + testCases: Array>, +): Array> { return testCases.flatMap((testCase) => testCase.optionsSet.flatMap((options) => { const { optionsSet, settingsSet, ...eslintTestCase } = testCase; - return (settingsSet ?? [undefined]).map((settings) => { - return { + return (settingsSet ?? [undefined]).map( + (settings): InvalidTestCase => ({ filename: dummyFilename, ...eslintTestCase, options, + // @ts-expect-error -- upstream typing. settings, - } as ESLintRuleTester.InvalidTestCase; - }); - }) + }), + ); + }), ); } /** * Convert our test cases into ones eslint test runner is expecting. */ -export function processValidTestCase( - testCases: ValidTestCase[] -): ESLintRuleTester.ValidTestCase[] { +export function processValidTestCase>( + testCases: Array>, +): Array> { // Ideally these two functions should be merged into 1 but I haven't been able // to get the typing information right - so for now they are two functions. - /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ + return processInvalidTestCase(testCases as any); } @@ -73,59 +85,63 @@ export function processValidTestCase( */ export function createDummyRule( create: ( - /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ - context: TSESLint.RuleContext<"generic", any> - ) => TSESLint.RuleListener -): Rule.RuleModule { - const meta: TSESLint.RuleMetaData<"generic"> = { + context: Readonly>, + ) => RuleFunctionsMap, +): RuleModule { + const meta: NamedCreateRuleMetaWithCategory<"generic"> = { type: "suggestion", docs: { - description: "Disallow mutable variables.", - recommended: "error", - url: "", + category: "testing", + description: "rule used in testing", }, messages: { generic: "Error.", }, - fixable: "code", - schema: {}, + schema: { + oneOf: [ + { + type: "object", + }, + { + type: "array", + }, + ], + }, }; - return { - meta, - create, - } as unknown as Rule.RuleModule; + return createRuleUsingFunction("dummy-rule", meta, [true, {}], create); } -export type RuleTesterTests = { - valid?: Array; - invalid?: ESLintRuleTester.InvalidTestCase[]; -}; - /** * Adds filenames to the tests (needed for typescript to work when parserOptions.project has been set). */ -export function addFilename( +export function addFilename< + TMessageIds extends string, + TOptions extends Readonly, +>( filename: string, - tests: RuleTesterTests -): RuleTesterTests { + tests: RunTests, +): RunTests { const { valid, invalid } = tests; return { - invalid: invalid?.map((test) => ({ - ...test, - filename, - })), - valid: valid?.map((test) => - typeof test === "string" - ? { code: test, filename } - : { ...test, filename } - ), + invalid: + invalid.map((test) => ({ + ...test, + filename, + })) ?? [], + valid: + valid.map((test) => + typeof test === "string" + ? { code: test, filename } + : { ...test, filename }, + ) ?? [], }; } -/** - * Returns whether or not TypeScript is installed locally. - */ -export function isTsInstalled(): boolean { - return ts !== undefined; -} +export type MessagesOf>> = + T extends RuleModule> + ? Messages + : never; + +export type OptionsOf>> = + T extends RuleModule ? Options : never; diff --git a/tests/index.test.ts b/tests/index.test.ts index b5c953158..74715479c 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -4,34 +4,35 @@ import { readdirSync } from "node:fs"; -import test from "ava"; +import { describe, it } from "vitest"; -import plugin from "~/index"; +import plugin from "#eslint-plugin-functional"; -const ruleFiles: string[] = readdirSync("./src/rules").filter( - (file) => file !== "index.ts" && file.endsWith(".ts") -); +describe("index.ts", () => { + it("should have all the rules", (t) => { + const ruleFiles: string[] = readdirSync("./src/rules").filter( + (file) => file !== "index.ts" && file.endsWith(".ts"), + ); -const configFiles: string[] = readdirSync("./src/configs").filter( - (file) => file !== "index.ts" && file.endsWith(".ts") -); + t.expect( + Object.hasOwn(plugin, "rules"), + 'The plugin\'s config object should have a "rules" property.', + ); + t.expect(ruleFiles.length).to.equal(Object.keys(plugin.rules ?? {}).length); + }); -test("should have all the rules", (t) => { - t.true( - Object.hasOwn(plugin, "rules"), - 'The plugin\'s config object should have a "rules" property.' - ); - t.is(ruleFiles.length, Object.keys(plugin.rules).length); -}); + it("should have all the configs", (t) => { + const configFiles: string[] = readdirSync("./src/configs").filter( + (file) => file !== "index.ts" && file.endsWith(".ts"), + ); -test("should have all the configs", (t) => { - t.true( - Object.hasOwn(plugin, "configs"), - 'The plugin\'s config object should have a "configs" property.' - ); - t.is( - configFiles.length - 1, - Object.keys(plugin.configs).length, - "should have all the configs except deprecated" - ); + t.expect( + Object.hasOwn(plugin, "configs"), + 'The plugin\'s config object should have a "configs" property.', + ); + t.expect(configFiles.length - 1).to.equal( + Object.keys(plugin.configs ?? {}).length, + "should have all the configs except deprecated", + ); + }); }); diff --git a/tests/mergers/configs.test.ts b/tests/mergers/configs.test.ts index f76bcefc9..f4fffe024 100644 --- a/tests/mergers/configs.test.ts +++ b/tests/mergers/configs.test.ts @@ -1,31 +1,32 @@ -import test from "ava"; +import { describe, it } from "vitest"; -import { mergeConfigs } from "~/utils/merge-configs"; +import { mergeConfigs } from "#eslint-plugin-functional/utils/merge-configs"; -test("should replace rule config", (t) => { - const a = { - rules: { - "plugin/rule": ["error", { foo: "bar" }], - }, - }; - const b = { - rules: { - "plugin/rule": ["error", { baz: "qux" }], - }, - }; +describe("merge eslint configs", () => { + it("should replace rule config", (t) => { + const a = { + rules: { + "plugin/rule": ["error", { foo: "bar" }], + }, + }; + const b = { + rules: { + "plugin/rule": ["error", { baz: "qux" }], + }, + }; - const expected = { - rules: { - "plugin/rule": b.rules["plugin/rule"], - }, - }; + const expected = { + rules: { + "plugin/rule": b.rules["plugin/rule"], + }, + }; - const result = mergeConfigs(a, b); + const result = mergeConfigs(a, b); - t.deepEqual(result, expected, "result is not merged correctly"); - t.is( - result.rules["plugin/rule"], - expected.rules["plugin/rule"], - "rule value was not replaced" - ); + t.expect(result).to.deep.equal(expected, "result is not merged correctly"); + t.expect(result.rules["plugin/rule"]).to.equal( + expected.rules["plugin/rule"], + "rule value was not replaced", + ); + }); }); diff --git a/tests/rules/functional-parameters/es2015/index.test.ts b/tests/rules/functional-parameters/es2015/index.test.ts new file mode 100644 index 000000000..c9b7dfb95 --- /dev/null +++ b/tests/rules/functional-parameters/es2015/index.test.ts @@ -0,0 +1,22 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/functional-parameters"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import es3Invalid from "../es3/invalid"; +import es3Valid from "../es3/valid"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid: [...es3Valid, ...valid], + invalid: [...es3Invalid, ...invalid], +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); +tester.esLatest(tests); +tester.es2015(tests); diff --git a/tests/rules/functional-parameters/es6/invalid.ts b/tests/rules/functional-parameters/es2015/invalid.ts similarity index 63% rename from tests/rules/functional-parameters/es6/invalid.ts rename to tests/rules/functional-parameters/es2015/invalid.ts index ff77bbad7..775a9948d 100644 --- a/tests/rules/functional-parameters/es6/invalid.ts +++ b/tests/rules/functional-parameters/es2015/invalid.ts @@ -1,8 +1,16 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/functional-parameters"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: dedent` (() => { @@ -13,7 +21,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "paramCountAtLeastOne", - type: "ArrowFunctionExpression", + type: AST_NODE_TYPES.ArrowFunctionExpression, line: 1, column: 2, }, @@ -29,7 +37,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "restParam", - type: "RestElement", + type: AST_NODE_TYPES.RestElement, line: 1, column: 14, }, @@ -46,11 +54,11 @@ const tests: InvalidTestCase[] = [ }, } `, - optionsSet: [[{ ignorePattern: "^foo" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^foo" }]], errors: [ { messageId: "restParam", - type: "RestElement", + type: AST_NODE_TYPES.RestElement, line: 5, column: 7, }, @@ -65,7 +73,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "paramCountAtLeastOne", - type: "ArrowFunctionExpression", + type: AST_NODE_TYPES.ArrowFunctionExpression, line: 2, column: 5, }, diff --git a/tests/rules/functional-parameters/es6/valid.ts b/tests/rules/functional-parameters/es2015/valid.ts similarity index 76% rename from tests/rules/functional-parameters/es6/valid.ts rename to tests/rules/functional-parameters/es2015/valid.ts index f9348c806..d8b5adc88 100644 --- a/tests/rules/functional-parameters/es6/valid.ts +++ b/tests/rules/functional-parameters/es2015/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/functional-parameters"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ { code: dedent` (() => { @@ -25,7 +29,7 @@ const tests: ValidTestCase[] = [ console.log(bar); } `, - optionsSet: [[{ ignorePattern: "^foo" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^foo" }]], }, { code: dedent` @@ -35,7 +39,7 @@ const tests: ValidTestCase[] = [ } } `, - optionsSet: [[{ ignorePattern: "^foo" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^foo" }]], }, { code: dedent` @@ -98,6 +102,16 @@ const tests: ValidTestCase[] = [ `, optionsSet: [[{ enforceParameterCount: { ignoreLambdaExpression: true } }]], }, + { + code: dedent` + const foo = { + get bar() { + return "baz"; + } + } + `, + optionsSet: [[{ enforceParameterCount: {} }]], + }, ]; export default tests; diff --git a/tests/rules/functional-parameters/es3/index.test.ts b/tests/rules/functional-parameters/es3/index.test.ts new file mode 100644 index 000000000..fc6fba014 --- /dev/null +++ b/tests/rules/functional-parameters/es3/index.test.ts @@ -0,0 +1,19 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/functional-parameters"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); +tester.esLatest(tests); +tester.es3(tests); diff --git a/tests/rules/functional-parameters/es3/index.ts b/tests/rules/functional-parameters/es3/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/functional-parameters/es3/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/functional-parameters/es3/invalid.ts b/tests/rules/functional-parameters/es3/invalid.ts index 8c14ebfb5..9da681428 100644 --- a/tests/rules/functional-parameters/es3/invalid.ts +++ b/tests/rules/functional-parameters/es3/invalid.ts @@ -1,8 +1,16 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/functional-parameters"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: dedent` function foo() { @@ -13,7 +21,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "paramCountAtLeastOne", - type: "FunctionDeclaration", + type: AST_NODE_TYPES.FunctionDeclaration, line: 1, column: 1, }, @@ -29,7 +37,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "paramCountAtLeastOne", - type: "FunctionExpression", + type: AST_NODE_TYPES.FunctionExpression, line: 1, column: 2, }, @@ -45,7 +53,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "arguments", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 2, column: 15, }, @@ -61,7 +69,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "paramCountAtLeastOne", - type: "FunctionDeclaration", + type: AST_NODE_TYPES.FunctionDeclaration, line: 1, column: 1, }, @@ -77,7 +85,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "paramCountExactlyOne", - type: "FunctionDeclaration", + type: AST_NODE_TYPES.FunctionDeclaration, line: 1, column: 1, }, @@ -93,7 +101,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "paramCountExactlyOne", - type: "FunctionDeclaration", + type: AST_NODE_TYPES.FunctionDeclaration, line: 1, column: 1, }, @@ -118,13 +126,13 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "paramCountExactlyOne", - type: "FunctionExpression", + type: AST_NODE_TYPES.FunctionExpression, line: 3, column: 5, }, { messageId: "paramCountExactlyOne", - type: "FunctionExpression", + type: AST_NODE_TYPES.FunctionExpression, line: 8, column: 5, }, @@ -139,7 +147,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "paramCountAtLeastOne", - type: "FunctionExpression", + type: AST_NODE_TYPES.FunctionExpression, line: 2, column: 5, }, diff --git a/tests/rules/functional-parameters/es3/valid.ts b/tests/rules/functional-parameters/es3/valid.ts index 6f9b5f43e..9ef10c505 100644 --- a/tests/rules/functional-parameters/es3/valid.ts +++ b/tests/rules/functional-parameters/es3/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/functional-parameters"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ { code: dedent` var foo = { @@ -39,7 +43,12 @@ const tests: ValidTestCase[] = [ `, optionsSet: [ [{ enforceParameterCount: "atLeastOne" }], - [{ ignorePattern: "^foo", enforceParameterCount: "exactlyOne" }], + [ + { + ignoreIdentifierPattern: "^foo", + enforceParameterCount: "exactlyOne", + }, + ], ], }, { diff --git a/tests/rules/functional-parameters/es6/index.ts b/tests/rules/functional-parameters/es6/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/functional-parameters/es6/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/functional-parameters/index.test.ts b/tests/rules/functional-parameters/index.test.ts deleted file mode 100644 index 3e2c72b0e..000000000 --- a/tests/rules/functional-parameters/index.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { name, rule } from "~/rules/functional-parameters"; -import { testUsing } from "~/tests/helpers/testers"; - -import es3Tests from "./es3"; -import es6Tests from "./es6"; - -testUsing.typescript(name, rule, es6Tests); -testUsing.typescript(name, rule, es3Tests); - -testUsing.es6(name, rule, es6Tests); -testUsing.es3(name, rule, es3Tests); diff --git a/tests/rules/immutable-data/es3/array/index.ts b/tests/rules/immutable-data/es3/array/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/immutable-data/es3/array/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/immutable-data/es3/array/invalid.ts b/tests/rules/immutable-data/es3/array/invalid.ts deleted file mode 100644 index d08295e76..000000000 --- a/tests/rules/immutable-data/es3/array/invalid.ts +++ /dev/null @@ -1,469 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - x[0] = 4; - y[0].z[0] = 4; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - x[0] += 1; - y[0].z[0] += 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - x[0] -= 1; - y[0].z[0] -= 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - delete x[0]; - delete y[0].z[0]; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "UnaryExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "UnaryExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - x[0]++; - y[0].z[0]++; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "UpdateExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "UpdateExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - x[0]--; - y[0].z[0]--; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "UpdateExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "UpdateExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - ++x[0]; - ++y[0].z[0]; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "UpdateExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "UpdateExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - --x[0]; - --y[0].z[0]; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "UpdateExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "UpdateExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - if (x[0] = 2) {} - if (y[0].z[0] = 2) {} - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 5, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 5, - }, - ], - }, - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - if (x[0]++) {} - if (y[0].z[0]++) {} - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "UpdateExpression", - line: 3, - column: 5, - }, - { - messageId: "generic", - type: "UpdateExpression", - line: 4, - column: 5, - }, - ], - }, - { - code: dedent` - var x = [5, 6]; - var y = [{ z: [3, 7] }]; - x.length = 5; - y[0].z.length = 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - // Disallowed array mutation methods. - { - code: dedent` - var x = [5, 6]; - x.copyWithin(0, 1, 2); - x.fill(3); - x.pop(); - x.push(3); - x.reverse(); - x.shift(); - x.sort(); - x.splice(0, 1, 9); - x.unshift(6); - var y = [{ z: [3, 7] }]; - y[0].z.copyWithin(0, 1, 2); - y[0].z.fill(3); - y[0].z.pop(); - y[0].z.push(3); - y[0].z.reverse(); - y[0].z.shift(); - y[0].z.sort(); - y[0].z.splice(0, 1, 9); - y[0].z.unshift(6); - `, - optionsSet: [[{ assumeTypes: true }]], - errors: [ - { - messageId: "array", - type: "CallExpression", - line: 2, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 3, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 4, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 5, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 6, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 7, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 8, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 9, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 10, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 12, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 13, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 14, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 15, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 16, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 17, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 18, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 19, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 20, - column: 1, - }, - ], - }, - // Disallowed array mutation methods to be chained to the creation of an array - // if `ignoreImmediateMutation` is false. - { - code: dedent` - [0, 1, 2].copyWithin(0, 1, 2); - [0, 1, 2].fill(3); - [0, 1, 2].pop(); - [0, 1, 2].push(3); - [0, 1, 2].reverse(); - [0, 1, 2].shift(); - [0, 1, 2].sort(); - [0, 1, 2].splice(0, 1, 9); - [0, 1, 2].unshift(6) - `, - optionsSet: [[{ ignoreImmediateMutation: false }]], - errors: [ - { - messageId: "array", - type: "CallExpression", - line: 1, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 2, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 3, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 4, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 5, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 6, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 7, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 8, - column: 1, - }, - { - messageId: "array", - type: "CallExpression", - line: 9, - column: 1, - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/immutable-data/es3/index.ts b/tests/rules/immutable-data/es3/index.ts deleted file mode 100644 index 4cf7f63ee..000000000 --- a/tests/rules/immutable-data/es3/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import array from "./array"; -import object from "./object"; - -export default { - valid: [...array.valid, ...object.valid], - invalid: [...array.invalid, ...object.invalid], -}; diff --git a/tests/rules/immutable-data/es3/object/index.ts b/tests/rules/immutable-data/es3/object/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/immutable-data/es3/object/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/immutable-data/es3/object/invalid.ts b/tests/rules/immutable-data/es3/object/invalid.ts deleted file mode 100644 index a5be95440..000000000 --- a/tests/rules/immutable-data/es3/object/invalid.ts +++ /dev/null @@ -1,218 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - // Disallowed object mutation patterns. - { - code: dedent` - var x = {a: 1}; - x.foo = "bar"; - x["foo"] = "bar"; - x.a += 1; - x.a -= 1; - x.a *= 1; - x.a /= 1; - x.a %= 1; - x.a <<= 1; - x.a >>= 1; - x.a >>>= 1; - x.a &= 1; - x.a |= 1; - x.a ^= 1; - delete x.a; - delete x["a"]; - x.a++; - x.a--; - ++x.a; - --x.a; - if (x.a = 2) {} - if (x.a++) {} - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 2, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 5, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 6, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 7, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 8, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 9, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 10, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 11, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 12, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 13, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 14, - column: 1, - }, - { - messageId: "generic", - type: "UnaryExpression", - line: 15, - column: 1, - }, - { - messageId: "generic", - type: "UnaryExpression", - line: 16, - column: 1, - }, - { - messageId: "generic", - type: "UpdateExpression", - line: 17, - column: 1, - }, - { - messageId: "generic", - type: "UpdateExpression", - line: 18, - column: 1, - }, - { - messageId: "generic", - type: "UpdateExpression", - line: 19, - column: 1, - }, - { - messageId: "generic", - type: "UpdateExpression", - line: 20, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 21, - column: 5, - }, - { - messageId: "generic", - type: "UpdateExpression", - line: 22, - column: 5, - }, - ], - }, - // Disallow Object.assign on identifiers. - { - code: dedent` - var x = { msg1: "hello", obj: { a: 1, b: 2} }; - - var a = Object.assign(x, { msg2: "world" }); - var b = Object.assign(x.obj, { msg2: "world" }); - `, - optionsSet: [[]], - errors: [ - { - messageId: "object", - type: "CallExpression", - line: 3, - column: 9, - }, - { - messageId: "object", - type: "CallExpression", - line: 4, - column: 9, - }, - ], - }, - // Disallow other object mutation methods. - { - code: dedent` - var foo = { a: 1 }; - Object.defineProperties(foo, { b: { value: 2, writable: false }}); - Object.defineProperty(foo, "c", { value: 3, writable: false }); - Object.setPrototypeOf(foo, null); - `, - optionsSet: [[{ assumeTypes: true }]], - errors: [ - { - messageId: "object", - type: "CallExpression", - line: 2, - column: 1, - }, - { - messageId: "object", - type: "CallExpression", - line: 3, - column: 1, - }, - { - messageId: "object", - type: "CallExpression", - line: 4, - column: 1, - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/immutable-data/es3/object/valid.ts b/tests/rules/immutable-data/es3/object/valid.ts deleted file mode 100644 index d9047404e..000000000 --- a/tests/rules/immutable-data/es3/object/valid.ts +++ /dev/null @@ -1,60 +0,0 @@ -import dedent from "dedent"; - -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = [ - // Allowed non-object mutation patterns. - { - code: dedent` - var y = x.a; - var z = x["a"]; - if (x.a && y.a) {} - var w = ~x.a; - if (!x.a) {} - `, - optionsSet: [[]], - }, - // Allow Object.assign() on non identifiers. - { - code: dedent` - var x = { msg1: "hello", obj: { a: 1, b: 2}, func: function() {} }; - var bar = function(a, b, c) { return { a: a, b: b, c: c }; }; - - var a = Object.assign({}, { msg: "hello world" }); - var b = Object.assign(bar(1, 2, 3), { d: 4 }); - var c = Object.assign(x.func(), { d: 4 }); - `, - optionsSet: [[]], - }, - // IgnorePattern - objects. - { - code: dedent` - var mutableVar = { a: 1 }; - delete mutableVar.a; - `, - optionsSet: [[{ ignorePattern: ["^mutable"] }]], - }, - { - code: dedent` - var mutableVar = { a: 1 }; - Object.assign(mutableVar, { b: 2 }); - `, - optionsSet: [[{ ignorePattern: ["^mutable"] }]], - }, - // IgnoreAccessorPattern - objects. - { - code: dedent` - var mutableVar = { a: 1 }; - mutableVar.a = 0; - mutableVar.a++; - `, - optionsSet: [ - [{ ignoreAccessorPattern: ["**.mutable*.a"] }], - [{ ignoreAccessorPattern: ["**.mutable*.*"] }], - [{ ignoreAccessorPattern: ["**.mutable*.*.**"] }], - [{ ignoreAccessorPattern: ["**.mutable*.**"] }], - ], - }, -]; - -export default tests; diff --git a/tests/rules/immutable-data/es6/array/index.ts b/tests/rules/immutable-data/es6/array/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/immutable-data/es6/array/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/immutable-data/es6/array/invalid.ts b/tests/rules/immutable-data/es6/array/invalid.ts deleted file mode 100644 index 893235ed1..000000000 --- a/tests/rules/immutable-data/es6/array/invalid.ts +++ /dev/null @@ -1,238 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - { - code: dedent` - const x = [5, 6]; - const y = [{ z: [3, 7] }]; - x[0] *= 2; - y[0].z[0] *= 2; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - const x = [5, 6]; - const y = [{ z: [3, 7] }]; - x[0] **= 2; - y[0].z[0] **= 2; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - const x = [5, 6]; - const y = [{ z: [3, 7] }]; - x[0] /= 1; - y[0].z[0] /= 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - const x = [5, 6]; - const y = [{ z: [3, 7] }]; - x[0] %= 1; - y[0].z[0] %= 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - const x = [5, 6]; - const y = [{ z: [3, 7] }]; - x[0] <<= 1; - y[0].z[0] <<= 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - const x = [5, 6]; - const y = [{ z: [3, 7] }]; - x[0] >>= 1; - y[0].z[0] >>= 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - const x = [5, 6]; - const y = [{ z: [3, 7] }]; - x[0] >>>= 1; - y[0].z[0] >>>= 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - const x = [5, 6]; - const y = [{ z: [3, 7] }]; - x[0] &= 1; - y[0].z[0] &= 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - const x = [5, 6]; - const y = [{ z: [3, 7] }]; - x[0] |= 1; - y[0].z[0] |= 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, - { - code: dedent` - const x = [5, 6]; - const y = [{ z: [3, 7] }]; - x[0] ^= 1; - y[0].z[0] ^= 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 3, - column: 1, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 1, - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/immutable-data/es6/array/valid.ts b/tests/rules/immutable-data/es6/array/valid.ts deleted file mode 100644 index db3628eee..000000000 --- a/tests/rules/immutable-data/es6/array/valid.ts +++ /dev/null @@ -1,24 +0,0 @@ -import dedent from "dedent"; - -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = [ - { - code: dedent` - const x = 0; - x *= 1; - x **= 1; - x /= 1; - x %= 1; - x <<= 1; - x >>= 1; - x >>>= 1; - x &= 1; - x |= 1; - x ^= 1; - `, - optionsSet: [[]], - }, -]; - -export default tests; diff --git a/tests/rules/immutable-data/es6/index.ts b/tests/rules/immutable-data/es6/index.ts deleted file mode 100644 index 4cf7f63ee..000000000 --- a/tests/rules/immutable-data/es6/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import array from "./array"; -import object from "./object"; - -export default { - valid: [...array.valid, ...object.valid], - invalid: [...array.invalid, ...object.invalid], -}; diff --git a/tests/rules/immutable-data/es6/object/index.ts b/tests/rules/immutable-data/es6/object/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/immutable-data/es6/object/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/immutable-data/es6/object/invalid.ts b/tests/rules/immutable-data/es6/object/invalid.ts deleted file mode 100644 index c5c510851..000000000 --- a/tests/rules/immutable-data/es6/object/invalid.ts +++ /dev/null @@ -1,75 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - { - code: dedent` - const x = {a: 1}; - x.a **= 1; - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 2, - column: 1, - }, - ], - }, - // No mutation in class methods. - { - code: dedent` - class Klass { - bar = 1; - - constructor() { - this.baz = "hello"; - } - - zoo() { - this.bar = 2; - this.baz = 3; - } - } - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 9, - column: 5, - }, - { - messageId: "generic", - type: "AssignmentExpression", - line: 10, - column: 5, - }, - ], - }, - // Catch non-field mutation in classes. - { - code: dedent` - class Klass { - mutate() { - let data = { prop: 0 }; - data.prop = 1; - } - } - `, - optionsSet: [[{ ignoreClasses: "fieldsOnly" }]], - errors: [ - { - messageId: "generic", - type: "AssignmentExpression", - line: 4, - column: 5, - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/immutable-data/es6/object/valid.ts b/tests/rules/immutable-data/es6/object/valid.ts deleted file mode 100644 index 50d6511fa..000000000 --- a/tests/rules/immutable-data/es6/object/valid.ts +++ /dev/null @@ -1,46 +0,0 @@ -import dedent from "dedent"; - -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = [ - // Allow initialization of class members in constructor - { - code: dedent` - class Klass { - bar = 1; - constructor() { - this.baz = "hello"; - } - } - `, - optionsSet: [[]], - }, - // IgnoreAccessorPattern - classes. - { - code: dedent` - class Klass { - mutate() { - this.mutableField = 0; - } - } - `, - optionsSet: [ - [{ ignoreAccessorPattern: ["this.*.**"] }], - [{ ignoreAccessorPattern: ["**.mutable*"] }], - [{ ignoreAccessorPattern: ["**.mutable*.**"] }], - ], - }, - // Ignore class - { - code: dedent` - class Klass { - mutate() { - this.baz = "hello"; - } - } - `, - optionsSet: [[{ ignoreClasses: true }], [{ ignoreClasses: "fieldsOnly" }]], - }, -]; - -export default tests; diff --git a/tests/rules/immutable-data/index.test.ts b/tests/rules/immutable-data/index.test.ts deleted file mode 100644 index d923f5320..000000000 --- a/tests/rules/immutable-data/index.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { name, rule } from "~/rules/immutable-data"; -import { testUsing } from "~/tests/helpers/testers"; - -import es3Tests from "./es3"; -import es6Tests from "./es6"; -import tsTests from "./ts"; - -testUsing.typescript(name, rule, tsTests); -testUsing.typescript(name, rule, es6Tests); -testUsing.typescript(name, rule, es3Tests); - -testUsing.es6(name, rule, es6Tests); -testUsing.es3(name, rule, es3Tests); diff --git a/tests/rules/immutable-data/ts/array/index.test.ts b/tests/rules/immutable-data/ts/array/index.test.ts new file mode 100644 index 000000000..1aa99db9c --- /dev/null +++ b/tests/rules/immutable-data/ts/array/index.test.ts @@ -0,0 +1,14 @@ +import { name, rule } from "#eslint-plugin-functional/rules/immutable-data"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/immutable-data/ts/array/invalid.ts b/tests/rules/immutable-data/ts/array/invalid.ts new file mode 100644 index 000000000..01053ee07 --- /dev/null +++ b/tests/rules/immutable-data/ts/array/invalid.ts @@ -0,0 +1,800 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; +import dedent from "dedent"; + +import { type rule } from "#eslint-plugin-functional/rules/immutable-data"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + x[0] = 4; + y[0].z[0] = 4; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + x[0] += 1; + y[0].z[0] += 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + x[0] -= 1; + y[0].z[0] -= 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + delete x[0]; + delete y[0].z[0]; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.UnaryExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UnaryExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + x[0]++; + y[0].z[0]++; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + x[0]--; + y[0].z[0]--; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + ++x[0]; + ++y[0].z[0]; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + --x[0]; + --y[0].z[0]; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + if (x[0] = 2) {} + if (y[0].z[0] = 2) {} + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 5, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 5, + }, + ], + }, + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + if (x[0]++) {} + if (y[0].z[0]++) {} + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 3, + column: 5, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 4, + column: 5, + }, + ], + }, + { + code: dedent` + var x = [5, 6]; + var y = [{ z: [3, 7] }]; + x.length = 5; + y[0].z.length = 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + // Disallowed array mutation methods. + { + code: dedent` + var x = [5, 6]; + x.copyWithin(0, 1, 2); + x.fill(3); + x.pop(); + x.push(3); + x.reverse(); + x.shift(); + x.sort(); + x.splice(0, 1, 9); + x.unshift(6); + var y = [{ z: [3, 7] }]; + y[0].z.copyWithin(0, 1, 2); + y[0].z.fill(3); + y[0].z.pop(); + y[0].z.push(3); + y[0].z.reverse(); + y[0].z.shift(); + y[0].z.sort(); + y[0].z.splice(0, 1, 9); + y[0].z.unshift(6); + `, + optionsSet: [[]], + errors: [ + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 2, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 3, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 4, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 5, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 6, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 7, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 8, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 9, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 10, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 12, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 13, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 14, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 15, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 16, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 17, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 18, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 19, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 20, + column: 1, + }, + ], + }, + // Disallowed array mutation methods to be chained to the creation of an array + // if `ignoreImmediateMutation` is false. + { + code: dedent` + [0, 1, 2].copyWithin(0, 1, 2); + [0, 1, 2].fill(3); + [0, 1, 2].pop(); + [0, 1, 2].push(3); + [0, 1, 2].reverse(); + [0, 1, 2].shift(); + [0, 1, 2].sort(); + [0, 1, 2].splice(0, 1, 9); + [0, 1, 2].unshift(6) + `, + optionsSet: [[{ ignoreImmediateMutation: false }]], + errors: [ + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 1, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 2, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 3, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 4, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 5, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 6, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 7, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 8, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 9, + column: 1, + }, + ], + }, + { + code: dedent` + const x = [5, 6]; + const y = [{ z: [3, 7] }]; + x[0] *= 2; + y[0].z[0] *= 2; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + const x = [5, 6]; + const y = [{ z: [3, 7] }]; + x[0] **= 2; + y[0].z[0] **= 2; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + const x = [5, 6]; + const y = [{ z: [3, 7] }]; + x[0] /= 1; + y[0].z[0] /= 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + const x = [5, 6]; + const y = [{ z: [3, 7] }]; + x[0] %= 1; + y[0].z[0] %= 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + const x = [5, 6]; + const y = [{ z: [3, 7] }]; + x[0] <<= 1; + y[0].z[0] <<= 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + const x = [5, 6]; + const y = [{ z: [3, 7] }]; + x[0] >>= 1; + y[0].z[0] >>= 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + const x = [5, 6]; + const y = [{ z: [3, 7] }]; + x[0] >>>= 1; + y[0].z[0] >>>= 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + const x = [5, 6]; + const y = [{ z: [3, 7] }]; + x[0] &= 1; + y[0].z[0] &= 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + const x = [5, 6]; + const y = [{ z: [3, 7] }]; + x[0] |= 1; + y[0].z[0] |= 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + { + code: dedent` + const x = [5, 6]; + const y = [{ z: [3, 7] }]; + x[0] ^= 1; + y[0].z[0] ^= 1; + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + ], + }, + // ignoreNonConstDeclarations. + { + code: dedent` + const arr = [0, 1]; + arr[0] += 1; + arr[1]++; + delete arr[0]; + arr.copyWithin(0, 1, 2); + arr.fill(3); + arr.pop(); + arr.push(3); + arr.reverse(); + arr.shift(); + arr.sort(); + arr.splice(0, 1, 9); + arr.unshift(6); + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 2, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UnaryExpression, + line: 4, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 5, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 6, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 7, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 8, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 9, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 10, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 11, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 12, + column: 1, + }, + { + messageId: "array", + type: AST_NODE_TYPES.CallExpression, + line: 13, + column: 1, + }, + ], + }, +]; + +export default tests; diff --git a/tests/rules/immutable-data/es3/array/valid.ts b/tests/rules/immutable-data/ts/array/valid.ts similarity index 74% rename from tests/rules/immutable-data/es3/array/valid.ts rename to tests/rules/immutable-data/ts/array/valid.ts index 538b8919d..cc41a19fd 100644 --- a/tests/rules/immutable-data/es3/array/valid.ts +++ b/tests/rules/immutable-data/ts/array/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/immutable-data"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ // Allowed non-array mutation patterns. { code: dedent` @@ -190,7 +194,7 @@ const tests: ValidTestCase[] = [ z.splice(); z.unshift(); `, - optionsSet: [[{ assumeTypes: false }]], + optionsSet: [[]], }, { code: dedent` @@ -206,10 +210,104 @@ const tests: ValidTestCase[] = [ mutableX.unshift(6); `, optionsSet: [ - [{ ignorePattern: "^mutable" }], + [{ ignoreIdentifierPattern: "^mutable" }], [{ ignoreAccessorPattern: "mutable*" }], ], }, + { + code: dedent` + const x = 0; + x *= 1; + x **= 1; + x /= 1; + x %= 1; + x <<= 1; + x >>= 1; + x >>>= 1; + x &= 1; + x |= 1; + x ^= 1; + `, + optionsSet: [[]], + }, + // ignoreNonConstDeclarations. + { + code: dedent` + var arr = [0, 1]; + arr[0] += 1; + arr[1]++; + delete arr[0]; + arr.copyWithin(0, 1, 2); + arr.fill(3); + arr.pop(); + arr.push(3); + arr.reverse(); + arr.shift(); + arr.sort(); + arr.splice(0, 1, 9); + arr.unshift(6); + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + }, + { + code: dedent` + let arr = [0, 1]; + arr[0] += 1; + arr[1]++; + delete arr[0]; + arr.copyWithin(0, 1, 2); + arr.fill(3); + arr.pop(); + arr.push(3); + arr.reverse(); + arr.shift(); + arr.sort(); + arr.splice(0, 1, 9); + arr.unshift(6); + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + }, + { + code: dedent` + let arr = [0]; + for (const x of [1, 2]) { + for (const y of [3, 4]) { + arr[x][y] += 1; + arr[x][y]++; + delete arr[x][y]; + arr[x].copyWithin(x, 1, 2); + arr[x].fill(x); + arr[x].pop(); + arr[x].push(x); + arr[x].reverse(); + arr[x].shift(); + arr[x].sort(); + arr[x].splice(x, 1, 9); + arr[x].unshift(x); + } + } + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + }, + { + code: dedent` + const constArr = [[0, 1], [2, 3]]; + let arr = constArr[0]; + arr[0] += 1; + arr[1]++; + delete arr[0]; + arr.copyWithin(0, 1, 2); + arr.fill(3); + arr.pop(); + arr.push(3); + arr.reverse(); + arr.shift(); + arr.sort(); + arr.splice(0, 1, 9); + arr.unshift(6); + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + }, ]; export default tests; diff --git a/tests/rules/immutable-data/ts/index.ts b/tests/rules/immutable-data/ts/index.ts deleted file mode 100644 index a6c10d432..000000000 --- a/tests/rules/immutable-data/ts/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import object from "./object"; - -export default { - valid: [...object.valid], - invalid: [...object.invalid], -}; diff --git a/tests/rules/immutable-data/ts/object/index.test.ts b/tests/rules/immutable-data/ts/object/index.test.ts new file mode 100644 index 000000000..1aa99db9c --- /dev/null +++ b/tests/rules/immutable-data/ts/object/index.test.ts @@ -0,0 +1,14 @@ +import { name, rule } from "#eslint-plugin-functional/rules/immutable-data"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/immutable-data/ts/object/index.ts b/tests/rules/immutable-data/ts/object/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/immutable-data/ts/object/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/immutable-data/ts/object/invalid.ts b/tests/rules/immutable-data/ts/object/invalid.ts index 08d9981e1..465facd57 100644 --- a/tests/rules/immutable-data/ts/object/invalid.ts +++ b/tests/rules/immutable-data/ts/object/invalid.ts @@ -1,8 +1,285 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/immutable-data"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ + // Disallowed object mutation patterns. + { + code: dedent` + var x = {a: 1}; + x.foo = "bar"; + x["foo"] = "bar"; + x.a += 1; + x.a -= 1; + x.a *= 1; + x.a /= 1; + x.a %= 1; + x.a <<= 1; + x.a >>= 1; + x.a >>>= 1; + x.a &= 1; + x.a |= 1; + x.a ^= 1; + x.a **= 1; + delete x.a; + delete x["a"]; + x.a++; + x.a--; + ++x.a; + --x.a; + if (x.a = 2) {} + if (x.a++) {} + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 2, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 5, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 6, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 7, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 8, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 9, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 10, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 11, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 12, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 13, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 14, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 15, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UnaryExpression, + line: 16, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UnaryExpression, + line: 17, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 18, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 19, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 20, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 21, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 22, + column: 5, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 23, + column: 5, + }, + ], + }, + // Disallow Object.assign on identifiers. + { + code: dedent` + var x = { msg1: "hello", obj: { a: 1, b: 2} }; + + var a = Object.assign(x, { msg2: "world" }); + var b = Object.assign(x.obj, { msg2: "world" }); + `, + optionsSet: [[]], + errors: [ + { + messageId: "object", + type: AST_NODE_TYPES.CallExpression, + line: 3, + column: 9, + }, + { + messageId: "object", + type: AST_NODE_TYPES.CallExpression, + line: 4, + column: 9, + }, + ], + }, + // Disallow other object mutation methods. + { + code: dedent` + var foo = { a: 1 }; + Object.defineProperties(foo, { b: { value: 2, writable: false }}); + Object.defineProperty(foo, "c", { value: 3, writable: false }); + Object.setPrototypeOf(foo, null); + `, + optionsSet: [[]], + errors: [ + { + messageId: "object", + type: AST_NODE_TYPES.CallExpression, + line: 2, + column: 1, + }, + { + messageId: "object", + type: AST_NODE_TYPES.CallExpression, + line: 3, + column: 1, + }, + { + messageId: "object", + type: AST_NODE_TYPES.CallExpression, + line: 4, + column: 1, + }, + ], + }, + // No mutation in class methods. + { + code: dedent` + class Klass { + bar = 1; + + constructor() { + this.baz = "hello"; + } + + zoo() { + this.bar = 2; + this.baz = 3; + } + } + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 9, + column: 5, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 10, + column: 5, + }, + ], + }, + // Catch non-field mutation in classes. + { + code: dedent` + class Klass { + mutate() { + let data = { prop: 0 }; + data.prop = 1; + } + } + `, + optionsSet: [[{ ignoreClasses: "fieldsOnly" }]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 5, + }, + ], + }, { code: dedent` class Klass { @@ -23,14 +300,213 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "AssignmentExpression", + type: AST_NODE_TYPES.AssignmentExpression, line: 10, column: 5, }, { messageId: "generic", - type: "AssignmentExpression", + type: AST_NODE_TYPES.AssignmentExpression, + line: 11, + column: 5, + }, + ], + }, + // ignoreNonConstDeclarations. + { + code: dedent` + const mutableVar = { a: 1 }; + mutableVar.a++; + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 2, + column: 1, + }, + ], + }, + { + code: dedent` + const mutableVar = { a: 1 }; + mutableVar.a = 0; + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 2, + column: 1, + }, + ], + }, + // ignoreNonConstDeclarations. + { + code: dedent` + const x = {a: 1, b:{}}; + x.foo = "bar"; + x["foo"] = "bar"; + x.a += 1; + x.a -= 1; + x.a *= 1; + x.a /= 1; + x.a %= 1; + x.a <<= 1; + x.a >>= 1; + x.a >>>= 1; + x.a &= 1; + x.a |= 1; + x.a ^= 1; + x.a **= 1; + delete x.a; + delete x["a"]; + x.a++; + x.a--; + ++x.a; + --x.a; + if (x.a = 2) {} + if (x.a++) {} + Object.assign(x, { c: "world" }); + Object.assign(x.b, { c: "world" }); + Object.defineProperties(x, { d: { value: 2, writable: false }}); + Object.defineProperty(x, "e", { value: 3, writable: false }); + Object.setPrototypeOf(x, null); + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 2, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 3, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 4, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 5, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 6, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 7, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 8, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 9, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 10, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, line: 11, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 12, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 13, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 14, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 15, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UnaryExpression, + line: 16, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UnaryExpression, + line: 17, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 18, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 19, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 20, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 21, + column: 1, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.AssignmentExpression, + line: 22, + column: 5, + }, + { + messageId: "generic", + type: AST_NODE_TYPES.UpdateExpression, + line: 23, column: 5, }, ], diff --git a/tests/rules/immutable-data/ts/object/valid.ts b/tests/rules/immutable-data/ts/object/valid.ts index c869be007..8b54c44b3 100644 --- a/tests/rules/immutable-data/ts/object/valid.ts +++ b/tests/rules/immutable-data/ts/object/valid.ts @@ -1,8 +1,119 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/immutable-data"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ + // Allowed non-object mutation patterns. + { + code: dedent` + var y = x.a; + var z = x["a"]; + if (x.a && y.a) {} + var w = ~x.a; + if (!x.a) {} + `, + optionsSet: [[]], + }, + // Allow Object.assign() on non identifiers. + { + code: dedent` + var x = { msg1: "hello", obj: { a: 1, b: 2}, func: function() {} }; + var bar = function(a, b, c) { return { a: a, b: b, c: c }; }; + + var a = Object.assign({}, { msg: "hello world" }); + var b = Object.assign(bar(1, 2, 3), { d: 4 }); + var c = Object.assign(x.func(), { d: 4 }); + `, + optionsSet: [[]], + }, + // ignoreIdentifierPattern - objects. + { + code: dedent` + var mutableVar = { a: 1 }; + delete mutableVar.a; + `, + optionsSet: [[{ ignoreIdentifierPattern: ["^mutable"] }]], + }, + { + code: dedent` + var mutableVar = { a: 1 }; + Object.assign(mutableVar, { b: 2 }); + `, + optionsSet: [[{ ignoreIdentifierPattern: ["^mutable"] }]], + }, + // IgnoreAccessorPattern - objects. + { + code: dedent` + var mutableVar = { a: 1 }; + mutableVar.a = 0; + mutableVar.a++; + `, + optionsSet: [ + [{ ignoreAccessorPattern: ["**.mutable*.a"] }], + [{ ignoreAccessorPattern: ["**.mutable*.*"] }], + [{ ignoreAccessorPattern: ["**.mutable*.*.**"] }], + [{ ignoreAccessorPattern: ["**.mutable*.**"] }], + ], + }, + // ignoreNonConstDeclarations. + { + code: dedent` + var mutableVar = { a: 1 }; + mutableVar.a = 0; + mutableVar.a++; + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + }, + { + code: dedent` + let mutableVar = { a: 1 }; + mutableVar.a = 0; + mutableVar.a++; + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + }, + // Allow initialization of class members in constructor + { + code: dedent` + class Klass { + bar = 1; + constructor() { + this.baz = "hello"; + } + } + `, + optionsSet: [[]], + }, + // IgnoreAccessorPattern - classes. + { + code: dedent` + class Klass { + mutate() { + this.mutableField = 0; + } + } + `, + optionsSet: [ + [{ ignoreAccessorPattern: ["this.*.**"] }], + [{ ignoreAccessorPattern: ["**.mutable*"] }], + [{ ignoreAccessorPattern: ["**.mutable*.**"] }], + ], + }, + // Ignore class + { + code: dedent` + class Klass { + mutate() { + this.baz = "hello"; + } + } + `, + optionsSet: [[{ ignoreClasses: true }], [{ ignoreClasses: "fieldsOnly" }]], + }, // Allow initialization of class members in constructor { code: dedent` @@ -16,6 +127,74 @@ const tests: ValidTestCase[] = [ `, optionsSet: [[]], }, + // ignoreNonConstDeclarations. + { + code: dedent` + let x = {a: 1, b:{}}; + x.foo = "bar"; + x["foo"] = "bar"; + x.a += 1; + x.a -= 1; + x.a *= 1; + x.a /= 1; + x.a %= 1; + x.a <<= 1; + x.a >>= 1; + x.a >>>= 1; + x.a &= 1; + x.a |= 1; + x.a ^= 1; + x.a **= 1; + delete x.a; + delete x["a"]; + x.a++; + x.a--; + ++x.a; + --x.a; + if (x.a = 2) {} + if (x.a++) {} + Object.assign(x, { c: "world" }); + Object.assign(x.b, { c: "world" }); + Object.defineProperties(x, { d: { value: 2, writable: false }}); + Object.defineProperty(x, "e", { value: 3, writable: false }); + Object.setPrototypeOf(x, null); + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + }, + { + code: dedent` + const y = {x: {a: 1, b:{}}}; + let x = y.x; + x.foo = "bar"; + x["foo"] = "bar"; + x.a += 1; + x.a -= 1; + x.a *= 1; + x.a /= 1; + x.a %= 1; + x.a <<= 1; + x.a >>= 1; + x.a >>>= 1; + x.a &= 1; + x.a |= 1; + x.a ^= 1; + x.a **= 1; + delete x.a; + delete x["a"]; + x.a++; + x.a--; + ++x.a; + --x.a; + if (x.a = 2) {} + if (x.a++) {} + Object.assign(x, { c: "world" }); + Object.assign(x.b, { c: "world" }); + Object.defineProperties(x, { d: { value: 2, writable: false }}); + Object.defineProperty(x, "e", { value: 3, writable: false }); + Object.setPrototypeOf(x, null); + `, + optionsSet: [[{ ignoreNonConstDeclarations: true }]], + }, ]; export default tests; diff --git a/tests/rules/index.test.ts b/tests/rules/index.test.ts index c2e0ec8a9..89b7d873f 100644 --- a/tests/rules/index.test.ts +++ b/tests/rules/index.test.ts @@ -1,14 +1,16 @@ import * as fs from "node:fs"; -import test from "ava"; +import { describe, it } from "vitest"; -import { rules } from "~/rules"; +import { rules } from "#eslint-plugin-functional/rules"; -const rulesNames: string[] = Object.keys(rules); -const files: string[] = fs - .readdirSync("./src/rules") - .filter((file) => file !== "index.ts" && file.endsWith(".ts")); +describe("rules index", () => { + it("to import all rule files", (t) => { + const rulesNames: string[] = Object.keys(rules); + const files: string[] = fs + .readdirSync("./src/rules") + .filter((file) => file !== "index.ts" && file.endsWith(".ts")); -test("all rule files are imported", (t) => { - t.is(rulesNames.length, files.length); + t.expect(rulesNames.length).to.equal(files.length); + }); }); diff --git a/tests/rules/no-class.test/es6/index.ts b/tests/rules/no-class.test/es6/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-class.test/es6/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-class.test/es6/invalid.ts b/tests/rules/no-class.test/es6/invalid.ts deleted file mode 100644 index 679609dc1..000000000 --- a/tests/rules/no-class.test/es6/invalid.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - { - code: "class Foo {}", - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "ClassDeclaration", - line: 1, - column: 1, - }, - ], - }, - { - code: "const klass = class {}", - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "ClassExpression", - line: 1, - column: 15, - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/no-class.test/es6/valid.ts b/tests/rules/no-class.test/es6/valid.ts deleted file mode 100644 index bdbbe9292..000000000 --- a/tests/rules/no-class.test/es6/valid.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = []; - -export default tests; diff --git a/tests/rules/no-class.test/index.test.ts b/tests/rules/no-class.test/index.test.ts deleted file mode 100644 index 997ad3e55..000000000 --- a/tests/rules/no-class.test/index.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { name, rule } from "~/rules/no-classes"; -import { testUsing } from "~/tests/helpers/testers"; - -import es6Tests from "./es6"; - -testUsing.typescript(name, rule, es6Tests); - -testUsing.es6(name, rule, es6Tests); diff --git a/tests/rules/no-class/es2015/index.test.ts b/tests/rules/no-class/es2015/index.test.ts new file mode 100644 index 000000000..5e59f99e3 --- /dev/null +++ b/tests/rules/no-class/es2015/index.test.ts @@ -0,0 +1,16 @@ +import { name, rule } from "#eslint-plugin-functional/rules/no-classes"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); +tester.esLatest(tests); +tester.es2015(tests); diff --git a/tests/rules/no-class/es2015/invalid.ts b/tests/rules/no-class/es2015/invalid.ts new file mode 100644 index 000000000..363fd8e4b --- /dev/null +++ b/tests/rules/no-class/es2015/invalid.ts @@ -0,0 +1,39 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; + +import { type rule } from "#eslint-plugin-functional/rules/no-classes"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ + { + code: "class Foo {}", + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.ClassDeclaration, + line: 1, + column: 1, + }, + ], + }, + { + code: "const klass = class {}", + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.ClassExpression, + line: 1, + column: 15, + }, + ], + }, +]; + +export default tests; diff --git a/tests/rules/no-class/es2015/valid.ts b/tests/rules/no-class/es2015/valid.ts new file mode 100644 index 000000000..b9c4462e9 --- /dev/null +++ b/tests/rules/no-class/es2015/valid.ts @@ -0,0 +1,14 @@ +import { type rule } from "#eslint-plugin-functional/rules/no-classes"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array>> = [ + { + code: "function Foo() {}", + optionsSet: [[]], + }, +]; + +export default tests; diff --git a/tests/rules/no-conditional-statement/es3/index.ts b/tests/rules/no-conditional-statement/es3/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-conditional-statement/es3/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-conditional-statement/es3/invalid.ts b/tests/rules/no-conditional-statement/es3/invalid.ts deleted file mode 100644 index a4198a335..000000000 --- a/tests/rules/no-conditional-statement/es3/invalid.ts +++ /dev/null @@ -1,246 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - { - code: dedent` - if (i === 1) { - x = 2; - } - `, - optionsSet: [[]], - errors: [ - { - messageId: "unexpectedIf", - type: "IfStatement", - line: 1, - column: 1, - }, - ], - }, - { - code: dedent` - var x = "c"; - var y = ""; - switch(x) { - case "a": - y = 1; - break; - case "b": - y = 2; - break; - default: - y = 3; - break; - } - `, - optionsSet: [[]], - errors: [ - { - messageId: "unexpectedSwitch", - type: "SwitchStatement", - line: 3, - column: 1, - }, - ], - }, - { - code: dedent` - function foo(i) { - if (i === 1) { - return 1; - } - return 0; - } - `, - optionsSet: [[]], - errors: [ - { - messageId: "unexpectedIf", - type: "IfStatement", - line: 2, - column: 3, - }, - ], - }, - { - code: dedent` - function foo(i) { - switch(i) { - case "a": - return 1; - case "b": - return 2; - default: - return 3; - } - } - `, - optionsSet: [[]], - errors: [ - { - messageId: "unexpectedSwitch", - type: "SwitchStatement", - line: 2, - column: 3, - }, - ], - }, - { - code: dedent` - function foo(i) { - if (i === 1) { - console.log("bar"); - } - if (i === 2) console.log("baz"); - else return 3; - return 0; - } - `, - optionsSet: [[{ allowReturningBranches: true }]], - errors: [ - { - messageId: "incompleteBranch", - type: "BlockStatement", - line: 2, - column: 16, - }, - { - messageId: "incompleteBranch", - type: "ExpressionStatement", - line: 5, - column: 16, - }, - ], - }, - { - code: dedent` - function foo(i) { - switch(i) { - case "a": - return 1; - case "b": - return 2; - default: - break; - } - } - `, - optionsSet: [[{ allowReturningBranches: true }]], - errors: [ - { - messageId: "incompleteBranch", - type: "SwitchCase", - line: 7, - column: 5, - }, - ], - }, - { - code: dedent` - function foo(x, y) { - if (x > 0) { - if (y < 100) { - return 1; - } else { - console.log("bar"); - } - } - } - `, - optionsSet: [[{ allowReturningBranches: true }]], - errors: [ - { - messageId: "incompleteBranch", - type: "BlockStatement", - line: 5, - column: 12, - }, - ], - }, - { - code: dedent` - function foo(i) { - if (i === 1) { - return 1; - } - } - `, - optionsSet: [[{ allowReturningBranches: "ifExhaustive" }]], - errors: [ - { - messageId: "incompleteIf", - type: "IfStatement", - line: 2, - column: 3, - }, - ], - }, - { - code: dedent` - function foo(i) { - if (i === 1) { - return 1; - } else { - console.log(1); - } - } - `, - optionsSet: [[{ allowReturningBranches: "ifExhaustive" }]], - errors: [ - { - messageId: "incompleteBranch", - type: "BlockStatement", - line: 4, - column: 10, - }, - ], - }, - { - code: dedent` - function foo(i) { - switch(i) { - case "a": - return 1; - case "b": - return 2; - } - } - `, - optionsSet: [[{ allowReturningBranches: "ifExhaustive" }]], - errors: [ - { - messageId: "incompleteSwitch", - type: "SwitchStatement", - line: 2, - column: 3, - }, - ], - }, - { - code: dedent` - function foo(i) { - switch(i) { - case "a": - return 1; - case "b": - return 2; - default: - break; - } - } - `, - optionsSet: [[{ allowReturningBranches: "ifExhaustive" }]], - errors: [ - { - messageId: "incompleteBranch", - type: "SwitchCase", - line: 7, - column: 5, - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/no-conditional-statement/es3/valid.ts b/tests/rules/no-conditional-statement/es3/valid.ts deleted file mode 100644 index 1f19ccc68..000000000 --- a/tests/rules/no-conditional-statement/es3/valid.ts +++ /dev/null @@ -1,91 +0,0 @@ -import dedent from "dedent"; - -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = [ - { - code: dedent` - function foo(i) { - if (i === 1) { - return 1; - } - } - `, - optionsSet: [[{ allowReturningBranches: true }]], - }, - { - code: dedent` - function foo(i) { - if (i === 1) { - return 1; - } else { - return 0; - } - } - `, - optionsSet: [ - [{ allowReturningBranches: true }], - [{ allowReturningBranches: "ifExhaustive" }], - ], - }, - { - code: dedent` - function foo(i) { - switch(i) { - case "a": - return 1; - case "b": - case "c": - return 2; - } - } - `, - optionsSet: [[{ allowReturningBranches: true }]], - }, - { - code: dedent` - function foo(i) { - switch(i) { - case "a": - return 1; - case "b": - return 2; - default: - return 3; - } - } - `, - optionsSet: [ - [{ allowReturningBranches: true }], - [{ allowReturningBranches: "ifExhaustive" }], - ], - }, - // Check Break and Continue - { - code: dedent` - for(var i = 0; i < j; i++) { - if (e === 1) { - break; - } - } - `, - optionsSet: [[{ allowReturningBranches: true }]], - }, - { - code: dedent` - for(var i = 0; i < j; i++) { - if (e === 1) { - break; - } else { - continue; - } - } - `, - optionsSet: [ - [{ allowReturningBranches: true }], - [{ allowReturningBranches: "ifExhaustive" }], - ], - }, -]; - -export default tests; diff --git a/tests/rules/no-conditional-statement/index.test.ts b/tests/rules/no-conditional-statement/index.test.ts deleted file mode 100644 index d7ab033fc..000000000 --- a/tests/rules/no-conditional-statement/index.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { name, rule } from "~/rules/no-conditional-statements"; -import { testUsing } from "~/tests/helpers/testers"; - -import es3Tests from "./es3"; -import tsTests from "./ts"; - -testUsing.typescript(name, rule, tsTests); -testUsing.typescript(name, rule, es3Tests); - -testUsing.es3(name, rule, es3Tests); diff --git a/tests/rules/no-conditional-statement/ts/index.test.ts b/tests/rules/no-conditional-statement/ts/index.test.ts new file mode 100644 index 000000000..476c9f1e5 --- /dev/null +++ b/tests/rules/no-conditional-statement/ts/index.test.ts @@ -0,0 +1,17 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/no-conditional-statements"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/no-conditional-statement/ts/index.ts b/tests/rules/no-conditional-statement/ts/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-conditional-statement/ts/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-conditional-statement/ts/invalid.ts b/tests/rules/no-conditional-statement/ts/invalid.ts index 6f6e3ef3c..4a1e44578 100644 --- a/tests/rules/no-conditional-statement/ts/invalid.ts +++ b/tests/rules/no-conditional-statement/ts/invalid.ts @@ -1,5 +1,254 @@ -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; +import dedent from "dedent"; -const tests: InvalidTestCase[] = []; +import { type rule } from "#eslint-plugin-functional/rules/no-conditional-statements"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ + { + code: dedent` + if (i === 1) { + x = 2; + } + `, + optionsSet: [[]], + errors: [ + { + messageId: "unexpectedIf", + type: AST_NODE_TYPES.IfStatement, + line: 1, + column: 1, + }, + ], + }, + { + code: dedent` + var x = "c"; + var y = ""; + switch(x) { + case "a": + y = 1; + break; + case "b": + y = 2; + break; + default: + y = 3; + break; + } + `, + optionsSet: [[]], + errors: [ + { + messageId: "unexpectedSwitch", + type: AST_NODE_TYPES.SwitchStatement, + line: 3, + column: 1, + }, + ], + }, + { + code: dedent` + function foo(i) { + if (i === 1) { + return 1; + } + return 0; + } + `, + optionsSet: [[]], + errors: [ + { + messageId: "unexpectedIf", + type: AST_NODE_TYPES.IfStatement, + line: 2, + column: 3, + }, + ], + }, + { + code: dedent` + function foo(i) { + switch(i) { + case "a": + return 1; + case "b": + return 2; + default: + return 3; + } + } + `, + optionsSet: [[]], + errors: [ + { + messageId: "unexpectedSwitch", + type: AST_NODE_TYPES.SwitchStatement, + line: 2, + column: 3, + }, + ], + }, + { + code: dedent` + function foo(i) { + if (i === 1) { + console.log("bar"); + } + if (i === 2) console.log("baz"); + else return 3; + return 0; + } + `, + optionsSet: [[{ allowReturningBranches: true }]], + errors: [ + { + messageId: "incompleteBranch", + type: AST_NODE_TYPES.BlockStatement, + line: 2, + column: 16, + }, + { + messageId: "incompleteBranch", + type: AST_NODE_TYPES.ExpressionStatement, + line: 5, + column: 16, + }, + ], + }, + { + code: dedent` + function foo(i) { + switch(i) { + case "a": + return 1; + case "b": + return 2; + default: + break; + } + } + `, + optionsSet: [[{ allowReturningBranches: true }]], + errors: [ + { + messageId: "incompleteBranch", + type: AST_NODE_TYPES.SwitchCase, + line: 7, + column: 5, + }, + ], + }, + { + code: dedent` + function foo(x, y) { + if (x > 0) { + if (y < 100) { + return 1; + } else { + console.log("bar"); + } + } + } + `, + optionsSet: [[{ allowReturningBranches: true }]], + errors: [ + { + messageId: "incompleteBranch", + type: AST_NODE_TYPES.BlockStatement, + line: 5, + column: 12, + }, + ], + }, + { + code: dedent` + function foo(i) { + if (i === 1) { + return 1; + } + } + `, + optionsSet: [[{ allowReturningBranches: "ifExhaustive" }]], + errors: [ + { + messageId: "incompleteIf", + type: AST_NODE_TYPES.IfStatement, + line: 2, + column: 3, + }, + ], + }, + { + code: dedent` + function foo(i) { + if (i === 1) { + return 1; + } else { + console.log(1); + } + } + `, + optionsSet: [[{ allowReturningBranches: "ifExhaustive" }]], + errors: [ + { + messageId: "incompleteBranch", + type: AST_NODE_TYPES.BlockStatement, + line: 4, + column: 10, + }, + ], + }, + { + code: dedent` + function foo(i) { + switch(i) { + case "a": + return 1; + case "b": + return 2; + } + } + `, + optionsSet: [[{ allowReturningBranches: "ifExhaustive" }]], + errors: [ + { + messageId: "incompleteSwitch", + type: AST_NODE_TYPES.SwitchStatement, + line: 2, + column: 3, + }, + ], + }, + { + code: dedent` + function foo(i) { + switch(i) { + case "a": + return 1; + case "b": + return 2; + default: + break; + } + } + `, + optionsSet: [[{ allowReturningBranches: "ifExhaustive" }]], + errors: [ + { + messageId: "incompleteBranch", + type: AST_NODE_TYPES.SwitchCase, + line: 7, + column: 5, + }, + ], + }, +]; export default tests; diff --git a/tests/rules/no-conditional-statement/ts/valid.ts b/tests/rules/no-conditional-statement/ts/valid.ts index d4e62817e..d18dca2e4 100644 --- a/tests/rules/no-conditional-statement/ts/valid.ts +++ b/tests/rules/no-conditional-statement/ts/valid.ts @@ -1,8 +1,95 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-conditional-statements"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ + { + code: dedent` + function foo(i) { + if (i === 1) { + return 1; + } + } + `, + optionsSet: [[{ allowReturningBranches: true }]], + }, + { + code: dedent` + function foo(i) { + if (i === 1) { + return 1; + } else { + return 0; + } + } + `, + optionsSet: [ + [{ allowReturningBranches: true }], + [{ allowReturningBranches: "ifExhaustive" }], + ], + }, + { + code: dedent` + function foo(i) { + switch(i) { + case "a": + return 1; + case "b": + case "c": + return 2; + } + } + `, + optionsSet: [[{ allowReturningBranches: true }]], + }, + { + code: dedent` + function foo(i) { + switch(i) { + case "a": + return 1; + case "b": + return 2; + default: + return 3; + } + } + `, + optionsSet: [ + [{ allowReturningBranches: true }], + [{ allowReturningBranches: "ifExhaustive" }], + ], + }, + // Check Break and Continue + { + code: dedent` + for(var i = 0; i < j; i++) { + if (e === 1) { + break; + } + } + `, + optionsSet: [[{ allowReturningBranches: true }]], + }, + { + code: dedent` + for(var i = 0; i < j; i++) { + if (e === 1) { + break; + } else { + continue; + } + } + `, + optionsSet: [ + [{ allowReturningBranches: true }], + [{ allowReturningBranches: "ifExhaustive" }], + ], + }, // Exhaustive type test. { code: dedent` diff --git a/tests/rules/no-expression-statement/es3/index.ts b/tests/rules/no-expression-statement/es3/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-expression-statement/es3/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-expression-statement/es3/invalid.ts b/tests/rules/no-expression-statement/es3/invalid.ts deleted file mode 100644 index 7a4392a71..000000000 --- a/tests/rules/no-expression-statement/es3/invalid.ts +++ /dev/null @@ -1,36 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - { - code: dedent` - var x = []; - x.push(1); - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "ExpressionStatement", - line: 2, - column: 1, - }, - ], - }, - // Non-allowed expressions should cause failures. - { - code: `console.trace();`, - optionsSet: [[{ ignorePattern: "^console\\.log" }]], - errors: [ - { - messageId: "generic", - type: "ExpressionStatement", - line: 1, - column: 1, - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/no-expression-statement/es3/valid.ts b/tests/rules/no-expression-statement/es3/valid.ts deleted file mode 100644 index 1881b765b..000000000 --- a/tests/rules/no-expression-statement/es3/valid.ts +++ /dev/null @@ -1,26 +0,0 @@ -import dedent from "dedent"; - -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = [ - // Defining variable should still be allowed. - { - code: `var x = [];`, - optionsSet: [[]], - }, - // Allowed expressions should not cause failures. - { - code: dedent` - console.log("yo"); - console.error("yo"); - `, - optionsSet: [[{ ignorePattern: "^console\\." }]], - }, - // Allow specifying directive prologues. - { - code: `"use strict"`, - optionsSet: [[]], - }, -]; - -export default tests; diff --git a/tests/rules/no-expression-statement/es6/index.ts b/tests/rules/no-expression-statement/es6/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-expression-statement/es6/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-expression-statement/es6/invalid.ts b/tests/rules/no-expression-statement/es6/invalid.ts deleted file mode 100644 index a780f905b..000000000 --- a/tests/rules/no-expression-statement/es6/invalid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = []; - -export default tests; diff --git a/tests/rules/no-expression-statement/es6/valid.ts b/tests/rules/no-expression-statement/es6/valid.ts deleted file mode 100644 index 8f2472b8f..000000000 --- a/tests/rules/no-expression-statement/es6/valid.ts +++ /dev/null @@ -1,18 +0,0 @@ -import dedent from "dedent"; - -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = [ - // Allow yield. - { - code: dedent` - export function* foo() { - yield "hello"; - return "world"; - } - `, - optionsSet: [[]], - }, -]; - -export default tests; diff --git a/tests/rules/no-expression-statement/index.test.ts b/tests/rules/no-expression-statement/index.test.ts deleted file mode 100644 index 1361f64b5..000000000 --- a/tests/rules/no-expression-statement/index.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { name, rule } from "~/rules/no-expression-statements"; -import { testUsing } from "~/tests/helpers/testers"; - -import es3Tests from "./es3"; -import es6Tests from "./es6"; -import tsTests from "./ts"; - -testUsing.typescript(name, rule, tsTests); -testUsing.typescript(name, rule, es6Tests); -testUsing.typescript(name, rule, es3Tests); - -testUsing.es3(name, rule, es3Tests); -testUsing.es6(name, rule, es6Tests); diff --git a/tests/rules/no-expression-statement/ts/index.test.ts b/tests/rules/no-expression-statement/ts/index.test.ts new file mode 100644 index 000000000..a936a7782 --- /dev/null +++ b/tests/rules/no-expression-statement/ts/index.test.ts @@ -0,0 +1,17 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/no-expression-statements"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/no-expression-statement/ts/index.ts b/tests/rules/no-expression-statement/ts/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-expression-statement/ts/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-expression-statement/ts/invalid.ts b/tests/rules/no-expression-statement/ts/invalid.ts index 6f6e3ef3c..5aca5617e 100644 --- a/tests/rules/no-expression-statement/ts/invalid.ts +++ b/tests/rules/no-expression-statement/ts/invalid.ts @@ -1,5 +1,44 @@ -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; +import dedent from "dedent"; -const tests: InvalidTestCase[] = []; +import { type rule } from "#eslint-plugin-functional/rules/no-expression-statements"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ + { + code: dedent` + var x = []; + x.push(1); + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.ExpressionStatement, + line: 2, + column: 1, + }, + ], + }, + // Non-allowed expressions should cause failures. + { + code: `console.trace();`, + optionsSet: [[{ ignoreCodePattern: "^console\\.log" }]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.ExpressionStatement, + line: 1, + column: 1, + }, + ], + }, +]; export default tests; diff --git a/tests/rules/no-expression-statement/ts/valid.ts b/tests/rules/no-expression-statement/ts/valid.ts index 58ded9edc..894765e4f 100644 --- a/tests/rules/no-expression-statement/ts/valid.ts +++ b/tests/rules/no-expression-statement/ts/valid.ts @@ -1,8 +1,46 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-expression-statements"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ + // Defining variable should still be allowed. + { + code: `var x = [];`, + optionsSet: [[]], + }, + // Allowed expressions should not cause failures. + { + code: dedent` + console.log("yo"); + console.error("yo"); + `, + optionsSet: [[{ ignoreCodePattern: "^console\\." }]], + }, + { + code: dedent` + assert(1 !== 2); + `, + optionsSet: [[{ ignoreCodePattern: "^assert" }]], + }, + // Allow specifying directive prologues. + { + code: `"use strict"`, + optionsSet: [[]], + }, + // Allow yield. + { + code: dedent` + export function* foo() { + yield "hello"; + return "world"; + } + `, + optionsSet: [[]], + }, // Allowed ignoring void expressions. { code: dedent` @@ -11,6 +49,29 @@ const tests: ValidTestCase[] = [ `, optionsSet: [[{ ignoreVoid: true }]], }, + // Allowed ignoring self returning expressions. + { + code: dedent` + function foo() { return this; } + foo(); + `, + optionsSet: [[{ ignoreSelfReturning: true }]], + }, + { + code: dedent` + const foo = { bar() { return this; }}; + foo.bar(); + `, + optionsSet: [[{ ignoreSelfReturning: true }]], + }, + { + code: dedent` + class Foo { bar() { return this; }}; + const foo = new Foo(); + foo.bar(); + `, + optionsSet: [[{ ignoreSelfReturning: true }]], + }, ]; export default tests; diff --git a/tests/rules/no-let/es2015/index.test.ts b/tests/rules/no-let/es2015/index.test.ts new file mode 100644 index 000000000..928694356 --- /dev/null +++ b/tests/rules/no-let/es2015/index.test.ts @@ -0,0 +1,16 @@ +import { name, rule } from "#eslint-plugin-functional/rules/no-let"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); +tester.esLatest(tests); +tester.es2015(tests); diff --git a/tests/rules/no-let/es6/invalid.ts b/tests/rules/no-let/es2015/invalid.ts similarity index 60% rename from tests/rules/no-let/es6/invalid.ts rename to tests/rules/no-let/es2015/invalid.ts index 1d2c2d566..3c15852c2 100644 --- a/tests/rules/no-let/es6/invalid.ts +++ b/tests/rules/no-let/es2015/invalid.ts @@ -1,19 +1,27 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-let"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: `let x;`, optionsSet: [ [], [{ allowInFunctions: true }], - [{ ignorePattern: "^mutable" }], + [{ ignoreIdentifierPattern: "^mutable" }], ], errors: [ { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 1, column: 1, }, @@ -24,12 +32,12 @@ const tests: InvalidTestCase[] = [ optionsSet: [ [], [{ allowInFunctions: true }], - [{ ignorePattern: "^mutable" }], + [{ ignoreIdentifierPattern: "^mutable" }], ], errors: [ { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 1, column: 1, }, @@ -40,12 +48,12 @@ const tests: InvalidTestCase[] = [ optionsSet: [ [], [{ allowInFunctions: true }], - [{ ignorePattern: "^mutable" }], + [{ ignoreIdentifierPattern: "^mutable" }], ], errors: [ { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 1, column: 6, }, @@ -56,12 +64,12 @@ const tests: InvalidTestCase[] = [ optionsSet: [ [], [{ allowInFunctions: true }], - [{ ignorePattern: "^mutable" }], + [{ ignoreIdentifierPattern: "^mutable" }], ], errors: [ { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 1, column: 6, }, @@ -72,12 +80,12 @@ const tests: InvalidTestCase[] = [ optionsSet: [ [], [{ allowInFunctions: true }], - [{ ignorePattern: "^mutable" }], + [{ ignoreIdentifierPattern: "^mutable" }], ], errors: [ { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 1, column: 6, }, @@ -88,12 +96,12 @@ const tests: InvalidTestCase[] = [ optionsSet: [ [], [{ allowInFunctions: true }], - [{ ignorePattern: "^mutable" }], + [{ ignoreIdentifierPattern: "^mutable" }], ], errors: [ { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 1, column: 6, }, @@ -106,17 +114,17 @@ const tests: InvalidTestCase[] = [ let y = 0; } `, - optionsSet: [[], [{ ignorePattern: "^mutable" }]], + optionsSet: [[], [{ ignoreIdentifierPattern: "^mutable" }]], errors: [ { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 2, column: 3, }, { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 3, column: 3, }, @@ -129,17 +137,17 @@ const tests: InvalidTestCase[] = [ let y = 0; } `, - optionsSet: [[], [{ ignorePattern: "^mutable" }]], + optionsSet: [[], [{ ignoreIdentifierPattern: "^mutable" }]], errors: [ { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 2, column: 3, }, { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 3, column: 3, }, @@ -154,17 +162,17 @@ const tests: InvalidTestCase[] = [ } } `, - optionsSet: [[], [{ ignorePattern: "^mutable" }]], + optionsSet: [[], [{ ignoreIdentifierPattern: "^mutable" }]], errors: [ { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 3, column: 5, }, { messageId: "generic", - type: "VariableDeclaration", + type: AST_NODE_TYPES.VariableDeclaration, line: 4, column: 5, }, diff --git a/tests/rules/no-let/es6/valid.ts b/tests/rules/no-let/es2015/valid.ts similarity index 61% rename from tests/rules/no-let/es6/valid.ts rename to tests/rules/no-let/es2015/valid.ts index 9339380fe..4e8382b5b 100644 --- a/tests/rules/no-let/es6/valid.ts +++ b/tests/rules/no-let/es2015/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-let"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ { code: dedent` function foo() { @@ -37,26 +41,26 @@ const tests: ValidTestCase[] = [ let mutable; let mutableX `, - optionsSet: [[{ ignorePattern: "^mutable" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^mutable" }]], }, { code: dedent` let mutable = 0; let mutableX = 0 `, - optionsSet: [[{ ignorePattern: "^mutable" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^mutable" }]], }, { code: `for (let mutableX = 0; x < 1; x++);`, - optionsSet: [[{ ignorePattern: "^mutable" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^mutable" }]], }, { code: `for (let mutableX in {});`, - optionsSet: [[{ ignorePattern: "^mutable" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^mutable" }]], }, { code: `for (let mutableX of []);`, - optionsSet: [[{ ignorePattern: "^mutable" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^mutable" }]], }, { code: dedent` @@ -65,7 +69,7 @@ const tests: ValidTestCase[] = [ let mutableY = 0; } `, - optionsSet: [[{ ignorePattern: "^mutable" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^mutable" }]], }, { code: dedent` @@ -74,7 +78,7 @@ const tests: ValidTestCase[] = [ let mutableY = 0; } `, - optionsSet: [[{ ignorePattern: "^mutable" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^mutable" }]], }, { code: dedent` @@ -85,33 +89,33 @@ const tests: ValidTestCase[] = [ } } `, - optionsSet: [[{ ignorePattern: "^mutable" }]], + optionsSet: [[{ ignoreIdentifierPattern: "^mutable" }]], }, { code: dedent` let Mutable; let xMutable `, - optionsSet: [[{ ignorePattern: "Mutable$" }]], + optionsSet: [[{ ignoreIdentifierPattern: "Mutable$" }]], }, { code: dedent` let Mutable = 0; let xMutable = 0 `, - optionsSet: [[{ ignorePattern: "Mutable$" }]], + optionsSet: [[{ ignoreIdentifierPattern: "Mutable$" }]], }, { code: `for (let xMutable = 0; x < 1; x++);`, - optionsSet: [[{ ignorePattern: "Mutable$" }]], + optionsSet: [[{ ignoreIdentifierPattern: "Mutable$" }]], }, { code: `for (let xMutable in {});`, - optionsSet: [[{ ignorePattern: "Mutable$" }]], + optionsSet: [[{ ignoreIdentifierPattern: "Mutable$" }]], }, { code: `for (let xMutable of []);`, - optionsSet: [[{ ignorePattern: "Mutable$" }]], + optionsSet: [[{ ignoreIdentifierPattern: "Mutable$" }]], }, { code: dedent` @@ -120,7 +124,7 @@ const tests: ValidTestCase[] = [ let yMutable = 0; } `, - optionsSet: [[{ ignorePattern: "Mutable$" }]], + optionsSet: [[{ ignoreIdentifierPattern: "Mutable$" }]], }, { code: dedent` @@ -129,7 +133,7 @@ const tests: ValidTestCase[] = [ let yMutable = 0; } `, - optionsSet: [[{ ignorePattern: "Mutable$" }]], + optionsSet: [[{ ignoreIdentifierPattern: "Mutable$" }]], }, { code: dedent` @@ -140,7 +144,7 @@ const tests: ValidTestCase[] = [ } } `, - optionsSet: [[{ ignorePattern: "Mutable$" }]], + optionsSet: [[{ ignoreIdentifierPattern: "Mutable$" }]], }, { code: `for (let x = 0; x < 1; x++);`, diff --git a/tests/rules/no-let/es6/index.ts b/tests/rules/no-let/es6/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-let/es6/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-let/index.test.ts b/tests/rules/no-let/index.test.ts deleted file mode 100644 index 7e42cec37..000000000 --- a/tests/rules/no-let/index.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { name, rule } from "~/rules/no-let"; -import { testUsing } from "~/tests/helpers/testers"; - -import es6Tests from "./es6"; - -testUsing.typescript(name, rule, es6Tests); - -testUsing.es6(name, rule, es6Tests); diff --git a/tests/rules/no-loop-statement/es2015/index.test.ts b/tests/rules/no-loop-statement/es2015/index.test.ts new file mode 100644 index 000000000..721d26a35 --- /dev/null +++ b/tests/rules/no-loop-statement/es2015/index.test.ts @@ -0,0 +1,19 @@ +import { name, rule } from "#eslint-plugin-functional/rules/no-loop-statements"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import es3Invalid from "../es3/invalid"; +import es3Valid from "../es3/valid"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid: [...es3Valid, ...valid], + invalid: [...es3Invalid, ...invalid], +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); +tester.esLatest(tests); +tester.es2015(tests); diff --git a/tests/rules/no-loop-statement/es6/invalid.ts b/tests/rules/no-loop-statement/es2015/invalid.ts similarity index 62% rename from tests/rules/no-loop-statement/es6/invalid.ts rename to tests/rules/no-loop-statement/es2015/invalid.ts index bbd9b3f72..061fdfbfc 100644 --- a/tests/rules/no-loop-statement/es6/invalid.ts +++ b/tests/rules/no-loop-statement/es2015/invalid.ts @@ -1,13 +1,22 @@ -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; -const tests: InvalidTestCase[] = [ +import { type rule } from "#eslint-plugin-functional/rules/no-loop-statements"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: `for (const x = 0; x < 10; x++) { console.log(x); }`, optionsSet: [[]], errors: [ { messageId: "generic", - type: "ForStatement", + type: AST_NODE_TYPES.ForStatement, line: 1, column: 1, }, @@ -19,7 +28,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "ForInStatement", + type: AST_NODE_TYPES.ForInStatement, line: 1, column: 1, }, @@ -31,7 +40,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "ForOfStatement", + type: AST_NODE_TYPES.ForOfStatement, line: 1, column: 1, }, @@ -43,7 +52,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "WhileStatement", + type: AST_NODE_TYPES.WhileStatement, line: 1, column: 1, }, @@ -55,7 +64,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "DoWhileStatement", + type: AST_NODE_TYPES.DoWhileStatement, line: 1, column: 1, }, diff --git a/tests/rules/no-loop-statement/es2015/valid.ts b/tests/rules/no-loop-statement/es2015/valid.ts new file mode 100644 index 000000000..fd8adc04c --- /dev/null +++ b/tests/rules/no-loop-statement/es2015/valid.ts @@ -0,0 +1,9 @@ +import { type rule } from "#eslint-plugin-functional/rules/no-loop-statements"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array>> = []; + +export default tests; diff --git a/tests/rules/no-loop-statement/es3/index.test.ts b/tests/rules/no-loop-statement/es3/index.test.ts new file mode 100644 index 000000000..b8dc2c34f --- /dev/null +++ b/tests/rules/no-loop-statement/es3/index.test.ts @@ -0,0 +1,16 @@ +import { name, rule } from "#eslint-plugin-functional/rules/no-loop-statements"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); +tester.esLatest(tests); +tester.es2015(tests); diff --git a/tests/rules/no-loop-statement/es3/index.ts b/tests/rules/no-loop-statement/es3/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-loop-statement/es3/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-loop-statement/es3/invalid.ts b/tests/rules/no-loop-statement/es3/invalid.ts index c2f0e3186..697017950 100644 --- a/tests/rules/no-loop-statement/es3/invalid.ts +++ b/tests/rules/no-loop-statement/es3/invalid.ts @@ -1,13 +1,22 @@ -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; -const tests: InvalidTestCase[] = [ +import { type rule } from "#eslint-plugin-functional/rules/no-loop-statements"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: `for (var x = 0; x < 10; x++) { console.log(x); }`, optionsSet: [[]], errors: [ { messageId: "generic", - type: "ForStatement", + type: AST_NODE_TYPES.ForStatement, line: 1, column: 1, }, @@ -19,7 +28,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "ForInStatement", + type: AST_NODE_TYPES.ForInStatement, line: 1, column: 1, }, @@ -31,7 +40,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "WhileStatement", + type: AST_NODE_TYPES.WhileStatement, line: 1, column: 1, }, @@ -43,7 +52,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "DoWhileStatement", + type: AST_NODE_TYPES.DoWhileStatement, line: 1, column: 1, }, diff --git a/tests/rules/no-loop-statement/es3/valid.ts b/tests/rules/no-loop-statement/es3/valid.ts index bdbbe9292..2a7ca781a 100644 --- a/tests/rules/no-loop-statement/es3/valid.ts +++ b/tests/rules/no-loop-statement/es3/valid.ts @@ -1,5 +1,14 @@ -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-loop-statements"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = []; +const tests: Array>> = [ + { + code: `if (true) { console.log(); }`, + optionsSet: [[]], + }, +]; export default tests; diff --git a/tests/rules/no-loop-statement/es6/index.ts b/tests/rules/no-loop-statement/es6/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-loop-statement/es6/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-loop-statement/es6/valid.ts b/tests/rules/no-loop-statement/es6/valid.ts deleted file mode 100644 index bdbbe9292..000000000 --- a/tests/rules/no-loop-statement/es6/valid.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = []; - -export default tests; diff --git a/tests/rules/no-loop-statement/index.test.ts b/tests/rules/no-loop-statement/index.test.ts deleted file mode 100644 index ec3003995..000000000 --- a/tests/rules/no-loop-statement/index.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { name, rule } from "~/rules/no-loop-statements"; -import { testUsing } from "~/tests/helpers/testers"; - -import es3Tests from "./es3"; -import es6Tests from "./es6"; - -testUsing.typescript(name, rule, es6Tests); -testUsing.typescript(name, rule, es3Tests); - -testUsing.es6(name, rule, es6Tests); -testUsing.es3(name, rule, es3Tests); diff --git a/tests/rules/no-mixed-type/index.test.ts b/tests/rules/no-mixed-type/index.test.ts deleted file mode 100644 index facaa82b5..000000000 --- a/tests/rules/no-mixed-type/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { name, rule } from "~/rules/no-mixed-types"; -import { testUsing } from "~/tests/helpers/testers"; - -import tsTests from "./ts"; - -testUsing.typescript(name, rule, tsTests); diff --git a/tests/rules/no-mixed-type/ts/index.test.ts b/tests/rules/no-mixed-type/ts/index.test.ts new file mode 100644 index 000000000..6f79d7823 --- /dev/null +++ b/tests/rules/no-mixed-type/ts/index.test.ts @@ -0,0 +1,14 @@ +import { name, rule } from "#eslint-plugin-functional/rules/no-mixed-types"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/no-mixed-type/ts/index.ts b/tests/rules/no-mixed-type/ts/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-mixed-type/ts/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-mixed-type/ts/invalid.ts b/tests/rules/no-mixed-type/ts/invalid.ts index 2267d2a6c..8fdbf521b 100644 --- a/tests/rules/no-mixed-type/ts/invalid.ts +++ b/tests/rules/no-mixed-type/ts/invalid.ts @@ -1,8 +1,16 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-mixed-types"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ // Mixing properties and methods (MethodSignature) should produce failures. { code: dedent` @@ -15,7 +23,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSTypeAliasDeclaration", + type: AST_NODE_TYPES.TSTypeAliasDeclaration, line: 1, column: 1, }, @@ -32,7 +40,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSTypeAliasDeclaration", + type: AST_NODE_TYPES.TSTypeAliasDeclaration, line: 1, column: 1, }, @@ -49,7 +57,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSInterfaceDeclaration", + type: AST_NODE_TYPES.TSInterfaceDeclaration, line: 1, column: 1, }, @@ -67,7 +75,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSTypeAliasDeclaration", + type: AST_NODE_TYPES.TSTypeAliasDeclaration, line: 1, column: 1, }, @@ -84,7 +92,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSTypeAliasDeclaration", + type: AST_NODE_TYPES.TSTypeAliasDeclaration, line: 1, column: 1, }, @@ -101,7 +109,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSInterfaceDeclaration", + type: AST_NODE_TYPES.TSInterfaceDeclaration, line: 1, column: 1, }, diff --git a/tests/rules/no-mixed-type/ts/valid.ts b/tests/rules/no-mixed-type/ts/valid.ts index 9f29df0a9..20d6b8922 100644 --- a/tests/rules/no-mixed-type/ts/valid.ts +++ b/tests/rules/no-mixed-type/ts/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-mixed-types"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ // Only properties should not produce failures. { code: dedent` diff --git a/tests/rules/no-promise-reject/es2015/index.test.ts b/tests/rules/no-promise-reject/es2015/index.test.ts new file mode 100644 index 000000000..0847b2d90 --- /dev/null +++ b/tests/rules/no-promise-reject/es2015/index.test.ts @@ -0,0 +1,16 @@ +import { name, rule } from "#eslint-plugin-functional/rules/no-promise-reject"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); +tester.esLatest(tests); +tester.es2015(tests); diff --git a/tests/rules/no-promise-reject/es2015/invalid.ts b/tests/rules/no-promise-reject/es2015/invalid.ts new file mode 100644 index 000000000..caeecc2cb --- /dev/null +++ b/tests/rules/no-promise-reject/es2015/invalid.ts @@ -0,0 +1,35 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; +import dedent from "dedent"; + +import { type rule } from "#eslint-plugin-functional/rules/no-promise-reject"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ + { + code: dedent` + function foo() { + if (Math.random() > 0.5) { + return Promise.reject(new Error("bar")) + } + return Promise.resolve(10) + } + `, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.CallExpression, + line: 3, + column: 14, + }, + ], + }, +]; + +export default tests; diff --git a/tests/rules/no-promise-reject/es6/valid.ts b/tests/rules/no-promise-reject/es2015/valid.ts similarity index 52% rename from tests/rules/no-promise-reject/es6/valid.ts rename to tests/rules/no-promise-reject/es2015/valid.ts index 04edffc39..7be96a1be 100644 --- a/tests/rules/no-promise-reject/es6/valid.ts +++ b/tests/rules/no-promise-reject/es2015/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-promise-reject"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ { code: dedent` function bar() { diff --git a/tests/rules/no-promise-reject/es6/index.ts b/tests/rules/no-promise-reject/es6/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-promise-reject/es6/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-promise-reject/es6/invalid.ts b/tests/rules/no-promise-reject/es6/invalid.ts deleted file mode 100644 index 72bc699ad..000000000 --- a/tests/rules/no-promise-reject/es6/invalid.ts +++ /dev/null @@ -1,27 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - { - code: dedent` - function foo() { - if (Math.random() > 0.5) { - return Promise.reject(new Error("bar")) - } - return Promise.resolve(10) - } - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "CallExpression", - line: 3, - column: 14, - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/no-promise-reject/index.test.ts b/tests/rules/no-promise-reject/index.test.ts deleted file mode 100644 index fdb76e9a1..000000000 --- a/tests/rules/no-promise-reject/index.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { name, rule } from "~/rules/no-promise-reject"; -import { testUsing } from "~/tests/helpers/testers"; - -import es6Tests from "./es6"; - -testUsing.typescript(name, rule, es6Tests); - -testUsing.es6(name, rule, es6Tests); diff --git a/tests/rules/no-return-void/index.test.ts b/tests/rules/no-return-void/index.test.ts deleted file mode 100644 index 93243b4d8..000000000 --- a/tests/rules/no-return-void/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { name, rule } from "~/rules/no-return-void"; -import { testUsing } from "~/tests/helpers/testers"; - -import tsTests from "./ts"; - -testUsing.typescript(name, rule, tsTests); diff --git a/tests/rules/no-return-void/ts/index.test.ts b/tests/rules/no-return-void/ts/index.test.ts new file mode 100644 index 000000000..4700660e7 --- /dev/null +++ b/tests/rules/no-return-void/ts/index.test.ts @@ -0,0 +1,14 @@ +import { name, rule } from "#eslint-plugin-functional/rules/no-return-void"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/no-return-void/ts/index.ts b/tests/rules/no-return-void/ts/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-return-void/ts/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-return-void/ts/invalid.ts b/tests/rules/no-return-void/ts/invalid.ts index 62b955411..460fea55e 100644 --- a/tests/rules/no-return-void/ts/invalid.ts +++ b/tests/rules/no-return-void/ts/invalid.ts @@ -1,8 +1,16 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-return-void"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ // Disallow void. { code: dedent` @@ -14,7 +22,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 1, column: 26, }, @@ -32,7 +40,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 1, column: 26, }, @@ -50,7 +58,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 1, column: 26, }, @@ -67,7 +75,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 1, column: 42, }, @@ -88,7 +96,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "FunctionDeclaration", + type: AST_NODE_TYPES.FunctionDeclaration, line: 1, column: 1, }, diff --git a/tests/rules/no-return-void/ts/valid.ts b/tests/rules/no-return-void/ts/valid.ts index fddff5977..07f156858 100644 --- a/tests/rules/no-return-void/ts/valid.ts +++ b/tests/rules/no-return-void/ts/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-return-void"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ { code: dedent` function foo(bar) { diff --git a/tests/rules/no-this-expression/es3/index.test.ts b/tests/rules/no-this-expression/es3/index.test.ts new file mode 100644 index 000000000..ba5d49f64 --- /dev/null +++ b/tests/rules/no-this-expression/es3/index.test.ts @@ -0,0 +1,17 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/no-this-expressions"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/no-this-expression/es3/index.ts b/tests/rules/no-this-expression/es3/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-this-expression/es3/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-this-expression/es3/invalid.ts b/tests/rules/no-this-expression/es3/invalid.ts index a32e8b8db..88ad6e9bc 100644 --- a/tests/rules/no-this-expression/es3/invalid.ts +++ b/tests/rules/no-this-expression/es3/invalid.ts @@ -1,13 +1,22 @@ -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; -const tests: InvalidTestCase[] = [ +import { type rule } from "#eslint-plugin-functional/rules/no-this-expressions"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: `this.x = 0;`, optionsSet: [[]], errors: [ { messageId: "generic", - type: "ThisExpression", + type: AST_NODE_TYPES.ThisExpression, line: 1, column: 1, }, diff --git a/tests/rules/no-this-expression/es3/valid.ts b/tests/rules/no-this-expression/es3/valid.ts index 342c20af8..6445dd992 100644 --- a/tests/rules/no-this-expression/es3/valid.ts +++ b/tests/rules/no-this-expression/es3/valid.ts @@ -1,6 +1,10 @@ -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-this-expressions"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ { code: `var x = 0;`, optionsSet: [[]], diff --git a/tests/rules/no-this-expression/index.test.ts b/tests/rules/no-this-expression/index.test.ts deleted file mode 100644 index 8666d942f..000000000 --- a/tests/rules/no-this-expression/index.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { name, rule } from "~/rules/no-this-expressions"; -import { testUsing } from "~/tests/helpers/testers"; - -import es3Tests from "./es3"; - -testUsing.typescript(name, rule, es3Tests); - -testUsing.es3(name, rule, es3Tests); diff --git a/tests/rules/no-throw-statement/es2016/index.test.ts b/tests/rules/no-throw-statement/es2016/index.test.ts new file mode 100644 index 000000000..631181739 --- /dev/null +++ b/tests/rules/no-throw-statement/es2016/index.test.ts @@ -0,0 +1,22 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/no-throw-statements"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import es3Invalid from "../es3/invalid"; +import es3Valid from "../es3/valid"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid: [...es3Valid, ...valid], + invalid: [...es3Invalid, ...invalid], +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); +tester.esLatest(tests); +tester.es2016(tests); diff --git a/tests/rules/no-throw-statement/es7/invalid.ts b/tests/rules/no-throw-statement/es2016/invalid.ts similarity index 57% rename from tests/rules/no-throw-statement/es7/invalid.ts rename to tests/rules/no-throw-statement/es2016/invalid.ts index 2eb74875c..8c7b342d4 100644 --- a/tests/rules/no-throw-statement/es7/invalid.ts +++ b/tests/rules/no-throw-statement/es2016/invalid.ts @@ -1,8 +1,16 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-throw-statements"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: dedent` async function foo() { @@ -19,7 +27,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "ThrowStatement", + type: AST_NODE_TYPES.ThrowStatement, line: 2, column: 3, }, @@ -37,7 +45,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "ThrowStatement", + type: AST_NODE_TYPES.ThrowStatement, line: 3, column: 5, }, diff --git a/tests/rules/no-throw-statement/es7/valid.ts b/tests/rules/no-throw-statement/es2016/valid.ts similarity index 50% rename from tests/rules/no-throw-statement/es7/valid.ts rename to tests/rules/no-throw-statement/es2016/valid.ts index 12e907027..2e81df1ec 100644 --- a/tests/rules/no-throw-statement/es7/valid.ts +++ b/tests/rules/no-throw-statement/es2016/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-throw-statements"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ { code: dedent` async function foo() { diff --git a/tests/rules/no-throw-statement/es3/index.test.ts b/tests/rules/no-throw-statement/es3/index.test.ts new file mode 100644 index 000000000..e214dea6a --- /dev/null +++ b/tests/rules/no-throw-statement/es3/index.test.ts @@ -0,0 +1,19 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/no-throw-statements"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); +tester.esLatest(tests); +tester.es3(tests); diff --git a/tests/rules/no-throw-statement/es3/index.ts b/tests/rules/no-throw-statement/es3/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-throw-statement/es3/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-throw-statement/es3/invalid.ts b/tests/rules/no-throw-statement/es3/invalid.ts index 232935123..f8501e49c 100644 --- a/tests/rules/no-throw-statement/es3/invalid.ts +++ b/tests/rules/no-throw-statement/es3/invalid.ts @@ -1,15 +1,23 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-throw-statements"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: `throw 'error';`, optionsSet: [[]], errors: [ { messageId: "generic", - type: "ThrowStatement", + type: AST_NODE_TYPES.ThrowStatement, line: 1, column: 1, }, diff --git a/tests/rules/no-throw-statement/es3/valid.ts b/tests/rules/no-throw-statement/es3/valid.ts index bdbbe9292..8cc4d46bc 100644 --- a/tests/rules/no-throw-statement/es3/valid.ts +++ b/tests/rules/no-throw-statement/es3/valid.ts @@ -1,5 +1,20 @@ -import type { ValidTestCase } from "~/tests/helpers/util"; +import dedent from "dedent"; -const tests: ValidTestCase[] = []; +import { type rule } from "#eslint-plugin-functional/rules/no-throw-statements"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array>> = [ + { + code: dedent` + function foo() { + console.error("boop"); + } + `, + optionsSet: [[]], + }, +]; export default tests; diff --git a/tests/rules/no-throw-statement/es7/index.ts b/tests/rules/no-throw-statement/es7/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-throw-statement/es7/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-throw-statement/index.test.ts b/tests/rules/no-throw-statement/index.test.ts deleted file mode 100644 index 3107a795f..000000000 --- a/tests/rules/no-throw-statement/index.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { name, rule } from "~/rules/no-throw-statements"; -import { testUsing } from "~/tests/helpers/testers"; - -import es3Tests from "./es3"; -import es7Tests from "./es7"; - -testUsing.typescript(name, rule, es7Tests); -testUsing.typescript(name, rule, es3Tests); - -testUsing.es7(name, rule, es7Tests); -testUsing.es3(name, rule, es3Tests); diff --git a/tests/rules/no-try-statement/es3/index.test.ts b/tests/rules/no-try-statement/es3/index.test.ts new file mode 100644 index 000000000..b9ab7dded --- /dev/null +++ b/tests/rules/no-try-statement/es3/index.test.ts @@ -0,0 +1,16 @@ +import { name, rule } from "#eslint-plugin-functional/rules/no-try-statements"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); +tester.esLatest(tests); +tester.es3(tests); diff --git a/tests/rules/no-try-statement/es3/index.ts b/tests/rules/no-try-statement/es3/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/no-try-statement/es3/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/no-try-statement/es3/invalid.ts b/tests/rules/no-try-statement/es3/invalid.ts index f31e5b420..27523e86d 100644 --- a/tests/rules/no-try-statement/es3/invalid.ts +++ b/tests/rules/no-try-statement/es3/invalid.ts @@ -1,13 +1,22 @@ -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; -const tests: InvalidTestCase[] = [ +import { type rule } from "#eslint-plugin-functional/rules/no-try-statements"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; + +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: `try {} catch (e) {}`, optionsSet: [[]], errors: [ { messageId: "catch", - type: "TryStatement", + type: AST_NODE_TYPES.TryStatement, line: 1, column: 1, }, @@ -19,7 +28,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "catch", - type: "TryStatement", + type: AST_NODE_TYPES.TryStatement, line: 1, column: 1, }, @@ -31,7 +40,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "finally", - type: "TryStatement", + type: AST_NODE_TYPES.TryStatement, line: 1, column: 1, }, @@ -43,7 +52,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "catch", - type: "TryStatement", + type: AST_NODE_TYPES.TryStatement, line: 1, column: 1, }, @@ -55,7 +64,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "finally", - type: "TryStatement", + type: AST_NODE_TYPES.TryStatement, line: 1, column: 1, }, diff --git a/tests/rules/no-try-statement/es3/valid.ts b/tests/rules/no-try-statement/es3/valid.ts index 7ccfad04a..9b75e00a0 100644 --- a/tests/rules/no-try-statement/es3/valid.ts +++ b/tests/rules/no-try-statement/es3/valid.ts @@ -1,6 +1,10 @@ -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/no-try-statements"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ { code: `var x = 0;`, optionsSet: [[]], diff --git a/tests/rules/no-try-statement/index.test.ts b/tests/rules/no-try-statement/index.test.ts deleted file mode 100644 index bc3e7b397..000000000 --- a/tests/rules/no-try-statement/index.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { name, rule } from "~/rules/no-try-statements"; -import { testUsing } from "~/tests/helpers/testers"; - -import es3Tests from "./es3"; - -testUsing.typescript(name, rule, es3Tests); - -testUsing.es3(name, rule, es3Tests); diff --git a/tests/rules/prefer-immutable-types/index.test.ts b/tests/rules/prefer-immutable-types/index.test.ts deleted file mode 100644 index c33c04961..000000000 --- a/tests/rules/prefer-immutable-types/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { name, rule } from "~/rules/prefer-immutable-types"; -import { testUsing } from "~/tests/helpers/testers"; - -import tsTests from "./ts"; - -testUsing.typescript(name, rule, tsTests); diff --git a/tests/rules/prefer-immutable-types/ts/index.ts b/tests/rules/prefer-immutable-types/ts/index.ts deleted file mode 100644 index 8f2d2eed8..000000000 --- a/tests/rules/prefer-immutable-types/ts/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -import parameters from "./parameters"; -import returnTypes from "./return-types"; -import variables from "./variables"; - -export default { - valid: [...parameters.valid, ...returnTypes.valid, ...variables.valid], - invalid: [ - ...parameters.invalid, - ...returnTypes.invalid, - ...variables.invalid, - ], -}; diff --git a/tests/rules/prefer-immutable-types/ts/parameters/index.test.ts b/tests/rules/prefer-immutable-types/ts/parameters/index.test.ts new file mode 100644 index 000000000..da3ffba70 --- /dev/null +++ b/tests/rules/prefer-immutable-types/ts/parameters/index.test.ts @@ -0,0 +1,17 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/prefer-immutable-types/ts/parameters/index.ts b/tests/rules/prefer-immutable-types/ts/parameters/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/prefer-immutable-types/ts/parameters/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/prefer-immutable-types/ts/parameters/invalid.ts b/tests/rules/prefer-immutable-types/ts/parameters/invalid.ts index 535857821..cc2a297e3 100644 --- a/tests/rules/prefer-immutable-types/ts/parameters/invalid.ts +++ b/tests/rules/prefer-immutable-types/ts/parameters/invalid.ts @@ -1,15 +1,23 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ReadonlyArray = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: "function foo(arg: ReadonlySet) {}", optionsSet: [[{ parameters: "Immutable" }]], errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 14, }, @@ -21,7 +29,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 14, }, @@ -30,20 +38,32 @@ const tests: ReadonlyArray = [ { code: "function foo(arg1: { foo: string }, arg2: { foo: number }) {}", optionsSet: [[{ parameters: "ReadonlyShallow" }]], - output: - "function foo(arg1: Readonly<{ foo: string }>, arg2: Readonly<{ foo: number }>) {}", errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 14, + suggestions: [ + { + messageId: "parameter", + output: + "function foo(arg1: Readonly<{ foo: string }>, arg2: { foo: number }) {}", + }, + ], }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 37, + suggestions: [ + { + messageId: "parameter", + output: + "function foo(arg1: { foo: string }, arg2: Readonly<{ foo: number }>) {}", + }, + ], }, ], }, @@ -56,13 +76,13 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 37, }, @@ -83,25 +103,25 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 3, column: 22, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 4, column: 21, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 5, column: 24, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 6, column: 14, }, @@ -117,7 +137,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 2, column: 4, }, @@ -133,7 +153,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 2, column: 8, }, @@ -151,47 +171,85 @@ const tests: ReadonlyArray = [ } `, optionsSet: [[]], - output: dedent` - class Klass { - constructor ( - public readonly publicProp: string, - protected readonly protectedProp: string, - private readonly privateProp: string, - ) { } - } - `, errors: [ { messageId: "propertyModifier", - type: "TSParameterProperty", + type: AST_NODE_TYPES.TSParameterProperty, line: 3, column: 5, + suggestions: [ + { + messageId: "propertyModifier", + output: dedent` + class Klass { + constructor ( + public readonly publicProp: string, + protected protectedProp: string, + private privateProp: string, + ) { } + } + `, + }, + ], }, { messageId: "propertyModifier", - type: "TSParameterProperty", + type: AST_NODE_TYPES.TSParameterProperty, line: 4, column: 5, + suggestions: [ + { + messageId: "propertyModifier", + output: dedent` + class Klass { + constructor ( + public publicProp: string, + protected readonly protectedProp: string, + private privateProp: string, + ) { } + } + `, + }, + ], }, { messageId: "propertyModifier", - type: "TSParameterProperty", + type: AST_NODE_TYPES.TSParameterProperty, line: 5, column: 5, + suggestions: [ + { + messageId: "propertyModifier", + output: dedent` + class Klass { + constructor ( + public publicProp: string, + protected protectedProp: string, + private readonly privateProp: string, + ) { } + } + `, + }, + ], }, ], }, { code: "function foo(arg0: { foo: string | number }, arg1: { foo: string | number }): arg0 is { foo: number } {}", optionsSet: [[{ parameters: "ReadonlyShallow" }]], - output: - "function foo(arg0: { foo: string | number }, arg1: Readonly<{ foo: string | number }>): arg0 is { foo: number } {}", errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 46, + suggestions: [ + { + messageId: "parameter", + output: + "function foo(arg0: { foo: string | number }, arg1: Readonly<{ foo: string | number }>): arg0 is { foo: number } {}", + }, + ], }, ], }, @@ -204,59 +262,43 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 46, }, ], }, - { - code: "function foo(arg1: { foo: string }) {}", - optionsSet: [ - [ - { - parameters: "ReadonlyShallow", - fixer: { - ReadonlyDeep: { - pattern: "^(.+)$", - replace: "ReadonlyDeep<$1>", - }, - }, - }, - ], - ], - output: "function foo(arg1: Readonly<{ foo: string }>) {}", - errors: [ - { - messageId: "parameter", - type: "Identifier", - line: 1, - column: 14, - }, - ], - }, { code: "function foo(arg1: { foo: string }) {}", optionsSet: [ [ { parameters: "ReadonlyDeep", - fixer: { - ReadonlyDeep: { - pattern: "^(.+)$", - replace: "ReadonlyDeep<$1>", - }, + suggestions: { + ReadonlyDeep: [ + [ + { + pattern: "^(.+)$", + replace: "ReadonlyDeep<$1>", + }, + ], + ], }, }, ], ], - output: "function foo(arg1: ReadonlyDeep<{ foo: string }>) {}", errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 14, + suggestions: [ + { + messageId: "parameter", + output: "function foo(arg1: ReadonlyDeep<{ foo: string }>) {}", + }, + ], }, ], }, @@ -266,22 +308,32 @@ const tests: ReadonlyArray = [ [ { parameters: "ReadonlyDeep", - fixer: { - ReadonlyDeep: { - pattern: "^Readonly<(.+)>|(.+)$", - replace: "ReadonlyDeep<$1$2>", - }, + suggestions: { + ReadonlyDeep: [ + [ + { + pattern: "^Readonly<(.+)>|(.+)$", + replace: "ReadonlyDeep<$1$2>", + }, + ], + ], }, }, ], ], - output: "function foo(arg1: ReadonlyDeep<{ foo: { bar: string } }>) {}", errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 14, + suggestions: [ + { + messageId: "parameter", + output: + "function foo(arg1: ReadonlyDeep<{ foo: { bar: string } }>) {}", + }, + ], }, ], }, @@ -297,40 +349,90 @@ const tests: ReadonlyArray = [ function foo(arg: ReadonlyMap) {} `, optionsSet: [[{ parameters: "ReadonlyShallow" }]], - output: dedent` - function foo(arg: ReadonlyArray) {} - function foo(arg: readonly string[]) {} - function foo(arg: ReadonlySet) {} - function foo(arg: ReadonlyMap) {} - function foo(arg: ReadonlyArray) {} - function foo(arg: readonly string[]) {} - function foo(arg: ReadonlySet) {} - function foo(arg: ReadonlyMap) {} - `, errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 14, + suggestions: [ + { + messageId: "parameter", + output: dedent` + function foo(arg: ReadonlyArray) {} + function foo(arg: string[]) {} + function foo(arg: Set) {} + function foo(arg: Map) {} + function foo(arg: ReadonlyArray) {} + function foo(arg: readonly string[]) {} + function foo(arg: ReadonlySet) {} + function foo(arg: ReadonlyMap) {} + `, + }, + ], }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 2, column: 14, + suggestions: [ + { + messageId: "parameter", + output: dedent` + function foo(arg: Array) {} + function foo(arg: readonly string[]) {} + function foo(arg: Set) {} + function foo(arg: Map) {} + function foo(arg: ReadonlyArray) {} + function foo(arg: readonly string[]) {} + function foo(arg: ReadonlySet) {} + function foo(arg: ReadonlyMap) {} + `, + }, + ], }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 3, column: 14, + suggestions: [ + { + messageId: "parameter", + output: dedent` + function foo(arg: Array) {} + function foo(arg: string[]) {} + function foo(arg: ReadonlySet) {} + function foo(arg: Map) {} + function foo(arg: ReadonlyArray) {} + function foo(arg: readonly string[]) {} + function foo(arg: ReadonlySet) {} + function foo(arg: ReadonlyMap) {} + `, + }, + ], }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 4, column: 14, + suggestions: [ + { + messageId: "parameter", + output: dedent` + function foo(arg: Array) {} + function foo(arg: string[]) {} + function foo(arg: Set) {} + function foo(arg: ReadonlyMap) {} + function foo(arg: ReadonlyArray) {} + function foo(arg: readonly string[]) {} + function foo(arg: ReadonlySet) {} + function foo(arg: ReadonlyMap) {} + `, + }, + ], }, ], }, @@ -344,6 +446,7 @@ const tests: ReadonlyArray = [ function foo(arg: ReadonlyMap<{foo: string}, {foo: string}>) {} function foo(arg: {foo: string}[]) {} function foo(arg: readonly {foo: string}[]) {} + type ReadonlyDeep = T; `, optionsSet: [ [ @@ -369,53 +472,54 @@ const tests: ReadonlyArray = [ function foo(arg: ReadonlyDeep>) {} function foo(arg: ReadonlyDeep<{foo: string}[]>) {} function foo(arg: ReadonlyDeep) {} + type ReadonlyDeep = T; `, errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 2, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 3, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 4, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 5, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 6, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 7, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 8, column: 14, }, @@ -460,49 +564,49 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 2, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 3, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 4, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 5, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 6, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 7, column: 14, }, { messageId: "parameter", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 8, column: 14, }, diff --git a/tests/rules/prefer-immutable-types/ts/parameters/valid.ts b/tests/rules/prefer-immutable-types/ts/parameters/valid.ts index 1baf9061c..a82be234c 100644 --- a/tests/rules/prefer-immutable-types/ts/parameters/valid.ts +++ b/tests/rules/prefer-immutable-types/ts/parameters/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ReadonlyArray = [ +const tests: Array>> = [ { code: "function foo(arg: boolean) {}", optionsSet: [ @@ -55,7 +59,7 @@ const tests: ReadonlyArray = [ immutability: { overrides: [ { - name: "ReadonlyArray", + type: { from: "lib", name: "ReadonlyArray" }, to: "Immutable", }, ], diff --git a/tests/rules/prefer-immutable-types/ts/return-types/index.test.ts b/tests/rules/prefer-immutable-types/ts/return-types/index.test.ts new file mode 100644 index 000000000..da3ffba70 --- /dev/null +++ b/tests/rules/prefer-immutable-types/ts/return-types/index.test.ts @@ -0,0 +1,17 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/prefer-immutable-types/ts/return-types/index.ts b/tests/rules/prefer-immutable-types/ts/return-types/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/prefer-immutable-types/ts/return-types/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/prefer-immutable-types/ts/return-types/invalid.ts b/tests/rules/prefer-immutable-types/ts/return-types/invalid.ts index 8b6289b36..6cc042458 100644 --- a/tests/rules/prefer-immutable-types/ts/return-types/invalid.ts +++ b/tests/rules/prefer-immutable-types/ts/return-types/invalid.ts @@ -1,15 +1,23 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ReadonlyArray = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: "function foo(): ReadonlySet {}", optionsSet: [[{ returnTypes: "Immutable" }]], errors: [ { messageId: "returnType", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 1, column: 15, }, @@ -21,7 +29,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "returnType", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 1, column: 15, }, @@ -37,7 +45,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "returnType", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 10, }, @@ -51,24 +59,41 @@ const tests: ReadonlyArray = [ function foo(arg: unknown) {} `, optionsSet: [[{ returnTypes: "ReadonlyShallow" }]], - output: dedent` - function foo(arg: number): Readonly<{ foo: string }>; - function foo(arg: string): Readonly<{ foo: number }>; - function foo(arg: unknown): Readonly<{ foo: number }>; - function foo(arg: unknown) {} - `, + errors: [ { messageId: "returnType", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 1, column: 26, + suggestions: [ + { + messageId: "returnType", + output: dedent` + function foo(arg: number): Readonly<{ foo: string }>; + function foo(arg: string): Readonly<{ foo: number }>; + function foo(arg: unknown): { foo: number }; + function foo(arg: unknown) {} + `, + }, + ], }, { messageId: "returnType", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 3, column: 27, + suggestions: [ + { + messageId: "returnType", + output: dedent` + function foo(arg: number): { foo: string }; + function foo(arg: string): Readonly<{ foo: number }>; + function foo(arg: unknown): Readonly<{ foo: number }>; + function foo(arg: unknown) {} + `, + }, + ], }, ], }, @@ -86,13 +111,13 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "returnType", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 1, column: 26, }, { messageId: "returnType", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 3, column: 27, }, @@ -114,7 +139,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "returnType", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 1, column: 26, }, @@ -130,7 +155,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "returnType", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 2, column: 16, }, @@ -146,7 +171,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "returnType", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 2, column: 20, }, diff --git a/tests/rules/prefer-immutable-types/ts/return-types/valid.ts b/tests/rules/prefer-immutable-types/ts/return-types/valid.ts index 979278ab3..68f743f12 100644 --- a/tests/rules/prefer-immutable-types/ts/return-types/valid.ts +++ b/tests/rules/prefer-immutable-types/ts/return-types/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ReadonlyArray = [ +const tests: Array>> = [ { code: "function foo(): boolean {}", optionsSet: [ @@ -55,7 +59,7 @@ const tests: ReadonlyArray = [ immutability: { overrides: [ { - name: "ReadonlyArray", + type: { from: "lib", name: "ReadonlyArray" }, to: "Immutable", }, ], diff --git a/tests/rules/prefer-immutable-types/ts/variables/index.test.ts b/tests/rules/prefer-immutable-types/ts/variables/index.test.ts new file mode 100644 index 000000000..da3ffba70 --- /dev/null +++ b/tests/rules/prefer-immutable-types/ts/variables/index.test.ts @@ -0,0 +1,17 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/prefer-immutable-types/ts/variables/index.ts b/tests/rules/prefer-immutable-types/ts/variables/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/prefer-immutable-types/ts/variables/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/prefer-immutable-types/ts/variables/invalid.ts b/tests/rules/prefer-immutable-types/ts/variables/invalid.ts index 3604d4095..a4a28f42f 100644 --- a/tests/rules/prefer-immutable-types/ts/variables/invalid.ts +++ b/tests/rules/prefer-immutable-types/ts/variables/invalid.ts @@ -1,15 +1,23 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ReadonlyArray = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: "const foo: ReadonlySet = {} as any", optionsSet: [[{ variables: "Immutable" }]], errors: [ { messageId: "variable", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 7, }, @@ -21,7 +29,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "variable", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 7, }, @@ -37,7 +45,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "variable", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 7, }, @@ -49,16 +57,21 @@ const tests: ReadonlyArray = [ bar: { foo: number } = {} as any; `, optionsSet: [[{ variables: "ReadonlyShallow" }]], - output: dedent` - const foo: Readonly<{ foo: string }> = {} as any, - bar: Readonly<{ foo: number }> = {} as any; - `, errors: [ { messageId: "variable", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 2, column: 7, + suggestions: [ + { + messageId: "variable", + output: dedent` + const foo: Readonly<{ foo: string }> = {} as any, + bar: Readonly<{ foo: number }> = {} as any; + `, + }, + ], }, ], }, @@ -71,7 +84,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "variable", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 2, column: 7, }, @@ -86,7 +99,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "variable", - type: "RestElement", + type: AST_NODE_TYPES.RestElement, line: 1, column: 11, }, @@ -101,7 +114,7 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "variable", - type: "RestElement", + type: AST_NODE_TYPES.RestElement, line: 1, column: 12, }, @@ -124,13 +137,13 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "variable", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 2, column: 7, }, { messageId: "returnType", - type: "TSTypeAnnotation", + type: AST_NODE_TYPES.TSTypeAnnotation, line: 5, column: 11, }, @@ -147,38 +160,82 @@ const tests: ReadonlyArray = [ } `, optionsSet: [[]], - output: dedent` - class Klass { - readonly foo: number; - private readonly bar: number; - static readonly baz: number; - private static readonly qux: number; - } - `, errors: [ { messageId: "propertyModifier", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 2, column: 3, + suggestions: [ + { + messageId: "propertyModifier", + output: dedent` + class Klass { + readonly foo: number; + private bar: number; + static baz: number; + private static qux: number; + } + `, + }, + ], }, { messageId: "propertyModifier", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 3, column: 3, + suggestions: [ + { + messageId: "propertyModifier", + output: dedent` + class Klass { + foo: number; + private readonly bar: number; + static baz: number; + private static qux: number; + } + `, + }, + ], }, { messageId: "propertyModifier", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 4, column: 3, + suggestions: [ + { + messageId: "propertyModifier", + output: dedent` + class Klass { + foo: number; + private bar: number; + static readonly baz: number; + private static qux: number; + } + `, + }, + ], }, { messageId: "propertyModifier", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 5, column: 3, + suggestions: [ + { + messageId: "propertyModifier", + output: dedent` + class Klass { + foo: number; + private bar: number; + static baz: number; + private static readonly qux: number; + } + `, + }, + ], }, ], }, @@ -195,25 +252,25 @@ const tests: ReadonlyArray = [ errors: [ { messageId: "propertyImmutability", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 2, column: 3, }, { messageId: "propertyImmutability", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 3, column: 3, }, { messageId: "propertyImmutability", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 4, column: 3, }, { messageId: "propertyImmutability", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 5, column: 3, }, diff --git a/tests/rules/prefer-immutable-types/ts/variables/valid.ts b/tests/rules/prefer-immutable-types/ts/variables/valid.ts index 4248ff452..fc59551b1 100644 --- a/tests/rules/prefer-immutable-types/ts/variables/valid.ts +++ b/tests/rules/prefer-immutable-types/ts/variables/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-immutable-types"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ReadonlyArray = [ +const tests: Array>> = [ { code: "const foo: boolean = {} as any", optionsSet: [ @@ -55,7 +59,7 @@ const tests: ReadonlyArray = [ immutability: { overrides: [ { - name: "ReadonlyArray", + type: { from: "lib", name: "ReadonlyArray" }, to: "Immutable", }, ], diff --git a/tests/rules/prefer-property-signatures/index.test.ts b/tests/rules/prefer-property-signatures/index.test.ts deleted file mode 100644 index eaabc3795..000000000 --- a/tests/rules/prefer-property-signatures/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { name, rule } from "~/rules/prefer-property-signatures"; -import { testUsing } from "~/tests/helpers/testers"; - -import tsTests from "./ts"; - -testUsing.typescript(name, rule, tsTests); diff --git a/tests/rules/prefer-property-signatures/ts/index.test.ts b/tests/rules/prefer-property-signatures/ts/index.test.ts new file mode 100644 index 000000000..67f189a75 --- /dev/null +++ b/tests/rules/prefer-property-signatures/ts/index.test.ts @@ -0,0 +1,17 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/prefer-property-signatures"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/prefer-property-signatures/ts/index.ts b/tests/rules/prefer-property-signatures/ts/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/prefer-property-signatures/ts/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/prefer-property-signatures/ts/invalid.ts b/tests/rules/prefer-property-signatures/ts/invalid.ts index ca96a00d2..73896549e 100644 --- a/tests/rules/prefer-property-signatures/ts/invalid.ts +++ b/tests/rules/prefer-property-signatures/ts/invalid.ts @@ -1,8 +1,16 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-property-signatures"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: dedent` interface Foo { @@ -13,7 +21,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSMethodSignature", + type: AST_NODE_TYPES.TSMethodSignature, line: 2, column: 3, }, @@ -29,7 +37,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSMethodSignature", + type: AST_NODE_TYPES.TSMethodSignature, line: 2, column: 3, }, @@ -45,7 +53,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSMethodSignature", + type: AST_NODE_TYPES.TSMethodSignature, line: 2, column: 3, }, @@ -63,7 +71,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSMethodSignature", + type: AST_NODE_TYPES.TSMethodSignature, line: 3, column: 5, }, @@ -83,7 +91,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSMethodSignature", + type: AST_NODE_TYPES.TSMethodSignature, line: 4, column: 7, }, @@ -103,7 +111,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSMethodSignature", + type: AST_NODE_TYPES.TSMethodSignature, line: 4, column: 7, }, diff --git a/tests/rules/prefer-property-signatures/ts/valid.ts b/tests/rules/prefer-property-signatures/ts/valid.ts index 82ec4bacd..8c5810756 100644 --- a/tests/rules/prefer-property-signatures/ts/valid.ts +++ b/tests/rules/prefer-property-signatures/ts/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-property-signatures"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ { code: dedent` interface Foo { diff --git a/tests/rules/prefer-readonly-type/index.test.ts b/tests/rules/prefer-readonly-type/index.test.ts deleted file mode 100644 index 57fd248d0..000000000 --- a/tests/rules/prefer-readonly-type/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { name, rule } from "~/rules/prefer-readonly-type"; -import { testUsing } from "~/tests/helpers/testers"; - -import tsTests from "./ts"; - -testUsing.typescript(name, rule, tsTests); diff --git a/tests/rules/prefer-readonly-type/ts/index.test.ts b/tests/rules/prefer-readonly-type/ts/index.test.ts new file mode 100644 index 000000000..cf130cf56 --- /dev/null +++ b/tests/rules/prefer-readonly-type/ts/index.test.ts @@ -0,0 +1,17 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/prefer-readonly-type"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/prefer-readonly-type/ts/index.ts b/tests/rules/prefer-readonly-type/ts/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/prefer-readonly-type/ts/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/prefer-readonly-type/ts/invalid.ts b/tests/rules/prefer-readonly-type/ts/invalid.ts index 48b9ac76e..f2441543e 100644 --- a/tests/rules/prefer-readonly-type/ts/invalid.ts +++ b/tests/rules/prefer-readonly-type/ts/invalid.ts @@ -1,8 +1,16 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-readonly-type"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: dedent` function foo(...numbers: number[]) { @@ -16,7 +24,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "array", - type: "TSArrayType", + type: AST_NODE_TYPES.TSArrayType, line: 1, column: 26, }, @@ -35,7 +43,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 1, column: 26, }, @@ -54,7 +62,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 1, column: 23, }, @@ -73,7 +81,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 1, column: 23, }, @@ -95,7 +103,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 2, column: 17, }, @@ -121,7 +129,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 3, column: 22, }, @@ -147,13 +155,13 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 1, column: 17, }, { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 3, column: 19, }, @@ -179,13 +187,13 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 1, column: 17, }, { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 3, column: 19, }, @@ -205,7 +213,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "array", - type: "TSArrayType", + type: AST_NODE_TYPES.TSArrayType, line: 1, column: 17, }, @@ -219,7 +227,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "array", - type: "TSArrayType", + type: AST_NODE_TYPES.TSArrayType, line: 1, column: 17, }, @@ -241,7 +249,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 2, column: 12, }, @@ -261,7 +269,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "tuple", - type: "TSTupleType", + type: AST_NODE_TYPES.TSTupleType, line: 1, column: 21, }, @@ -280,13 +288,13 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "tuple", - type: "TSTupleType", + type: AST_NODE_TYPES.TSTupleType, line: 1, column: 21, }, { messageId: "tuple", - type: "TSTupleType", + type: AST_NODE_TYPES.TSTupleType, line: 1, column: 38, }, @@ -305,7 +313,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "tuple", - type: "TSTupleType", + type: AST_NODE_TYPES.TSTupleType, line: 1, column: 47, }, @@ -324,7 +332,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "tuple", - type: "TSTupleType", + type: AST_NODE_TYPES.TSTupleType, line: 1, column: 21, }, @@ -376,19 +384,19 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 3, column: 19, }, { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 7, column: 17, }, { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 11, column: 19, }, @@ -402,7 +410,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 1, column: 12, }, @@ -428,7 +436,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 3, column: 19, }, @@ -450,7 +458,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 2, column: 14, }, @@ -476,7 +484,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 3, column: 19, }, @@ -490,7 +498,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 1, column: 12, }, @@ -504,7 +512,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "array", - type: "TSArrayType", + type: AST_NODE_TYPES.TSArrayType, line: 1, column: 12, }, @@ -518,7 +526,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "type", - type: "TSTypeReference", + type: AST_NODE_TYPES.TSTypeReference, line: 1, column: 12, }, @@ -532,7 +540,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "array", - type: "TSArrayType", + type: AST_NODE_TYPES.TSArrayType, line: 1, column: 17, }, @@ -552,13 +560,13 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "implicit", - type: "VariableDeclarator", + type: AST_NODE_TYPES.VariableDeclarator, line: 1, column: 7, }, { messageId: "implicit", - type: "AssignmentPattern", + type: AST_NODE_TYPES.AssignmentPattern, line: 2, column: 14, }, @@ -586,25 +594,25 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 2, column: 3, }, { messageId: "property", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 3, column: 3, }, { messageId: "property", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 4, column: 3, }, { messageId: "property", - type: "PropertyDefinition", + type: AST_NODE_TYPES.PropertyDefinition, line: 5, column: 3, }, @@ -634,19 +642,19 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "TSParameterProperty", + type: AST_NODE_TYPES.TSParameterProperty, line: 3, column: 5, }, { messageId: "property", - type: "TSParameterProperty", + type: AST_NODE_TYPES.TSParameterProperty, line: 4, column: 5, }, { messageId: "property", - type: "TSParameterProperty", + type: AST_NODE_TYPES.TSParameterProperty, line: 5, column: 5, }, @@ -674,19 +682,19 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "TSIndexSignature", + type: AST_NODE_TYPES.TSIndexSignature, line: 2, column: 3, }, { messageId: "property", - type: "TSIndexSignature", + type: AST_NODE_TYPES.TSIndexSignature, line: 5, column: 3, }, { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 5, column: 20, }, @@ -714,13 +722,13 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "TSIndexSignature", + type: AST_NODE_TYPES.TSIndexSignature, line: 1, column: 19, }, { messageId: "property", - type: "TSIndexSignature", + type: AST_NODE_TYPES.TSIndexSignature, line: 4, column: 23, }, @@ -734,7 +742,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "TSIndexSignature", + type: AST_NODE_TYPES.TSIndexSignature, line: 1, column: 12, }, @@ -758,13 +766,13 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 2, column: 3, }, { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 3, column: 3, }, @@ -809,61 +817,61 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 2, column: 3, }, { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 3, column: 3, }, { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 4, column: 3, }, { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 5, column: 3, }, { messageId: "property", - type: "TSIndexSignature", + type: AST_NODE_TYPES.TSIndexSignature, line: 6, column: 3, }, { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 8, column: 5, }, { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 9, column: 5, }, { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 10, column: 5, }, { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 11, column: 5, }, { messageId: "property", - type: "TSIndexSignature", + type: AST_NODE_TYPES.TSIndexSignature, line: 12, column: 5, }, @@ -882,7 +890,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 1, column: 21, }, @@ -900,7 +908,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "TSMappedType", + type: AST_NODE_TYPES.TSMappedType, line: 1, column: 18, }, @@ -930,7 +938,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 4, column: 7, }, @@ -954,7 +962,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "property", - type: "TSPropertySignature", + type: AST_NODE_TYPES.TSPropertySignature, line: 3, column: 3, }, diff --git a/tests/rules/prefer-readonly-type/ts/valid.ts b/tests/rules/prefer-readonly-type/ts/valid.ts index 4d50ad4cb..f0397bd61 100644 --- a/tests/rules/prefer-readonly-type/ts/valid.ts +++ b/tests/rules/prefer-readonly-type/ts/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-readonly-type"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ // Should not fail on explicit ReadonlyArray parameter. { code: dedent` diff --git a/tests/rules/prefer-tacit/es3/index.ts b/tests/rules/prefer-tacit/es3/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/prefer-tacit/es3/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/prefer-tacit/es3/invalid.ts b/tests/rules/prefer-tacit/es3/invalid.ts deleted file mode 100644 index 19e25641d..000000000 --- a/tests/rules/prefer-tacit/es3/invalid.ts +++ /dev/null @@ -1,27 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - // { - // code: "var foo = function(x) { f(x); }", - // optionsSet: [[{ assumeTypes: true }]], - // errors: [ - // { - // messageId: "generic", - // type: "ArrowFunctionExpression", - // line: 1, - // column: 13, - // suggestions: [ - // { - // output: dedent` - // var foo = f; - // `, - // }, - // ], - // }, - // ], - // }, -]; - -export default tests; diff --git a/tests/rules/prefer-tacit/es3/valid.ts b/tests/rules/prefer-tacit/es3/valid.ts deleted file mode 100644 index 2d66400c0..000000000 --- a/tests/rules/prefer-tacit/es3/valid.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = [ - { - // No typedef for `f` therefore no error (when not assuming types). - code: "function foo(x) { f(x); }", - optionsSet: [[]], - }, - { - // No typedef for `f` therefore no error (when not assuming types). - code: "var foo = function(x) { f(x); }", - optionsSet: [[]], - }, -]; - -export default tests; diff --git a/tests/rules/prefer-tacit/es6/index.ts b/tests/rules/prefer-tacit/es6/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/prefer-tacit/es6/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/prefer-tacit/es6/invalid.ts b/tests/rules/prefer-tacit/es6/invalid.ts deleted file mode 100644 index 1a3954582..000000000 --- a/tests/rules/prefer-tacit/es6/invalid.ts +++ /dev/null @@ -1,27 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - { - code: `const foo = x => f(x);`, - optionsSet: [[{ assumeTypes: true }]], - errors: [ - { - messageId: "generic", - type: "ArrowFunctionExpression", - line: 1, - column: 13, - suggestions: [ - { - output: dedent` - const foo = f; - `, - }, - ], - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/prefer-tacit/es6/valid.ts b/tests/rules/prefer-tacit/es6/valid.ts deleted file mode 100644 index 98b6b4dc4..000000000 --- a/tests/rules/prefer-tacit/es6/valid.ts +++ /dev/null @@ -1,21 +0,0 @@ -import dedent from "dedent"; - -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = [ - { - // No typedef for `f` therefore no error (when not assuming types). - code: `const foo = x => f(x);`, - optionsSet: [[]], - }, - // Default parameters. - { - code: dedent` - function f(x, y = 10) {} - const foo = x => f(x); - `, - optionsSet: [[]], - }, -]; - -export default tests; diff --git a/tests/rules/prefer-tacit/index.test.ts b/tests/rules/prefer-tacit/index.test.ts deleted file mode 100644 index e39b01688..000000000 --- a/tests/rules/prefer-tacit/index.test.ts +++ /dev/null @@ -1,30 +0,0 @@ -import * as semver from "semver"; - -import ts from "~/conditional-imports/typescript"; -import { name, rule } from "~/rules/prefer-tacit"; -import { testUsing } from "~/tests/helpers/testers"; - -import es3Tests from "./es3"; -import es6Tests from "./es6"; -import tsTests from "./ts"; -import tsAtLeast4Dot7Tests from "./ts-at-least-4.7"; -import tsLessThan4Dot7Tests from "./ts-less-than-4.7"; - -const isTS4dot7 = - ts !== undefined && - semver.satisfies(ts.version, `>= 4.7.0 || >= 4.7.1-rc || >= 4.7.0-beta`, { - includePrerelease: true, - }); - -if (isTS4dot7) { - testUsing.typescript(name, rule, tsAtLeast4Dot7Tests); -} else { - testUsing.typescript(name, rule, tsLessThan4Dot7Tests); -} - -testUsing.typescript(name, rule, tsTests); -testUsing.typescript(name, rule, es6Tests); -testUsing.typescript(name, rule, es3Tests); - -testUsing.es6(name, rule, es6Tests); -testUsing.es3(name, rule, es3Tests); diff --git a/tests/rules/prefer-tacit/ts-at-least-4.7/index.ts b/tests/rules/prefer-tacit/ts-at-least-4.7/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/prefer-tacit/ts-at-least-4.7/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/prefer-tacit/ts-at-least-4.7/invalid.ts b/tests/rules/prefer-tacit/ts-at-least-4.7/invalid.ts deleted file mode 100644 index 06b1d0735..000000000 --- a/tests/rules/prefer-tacit/ts-at-least-4.7/invalid.ts +++ /dev/null @@ -1,78 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - // Instantiation Expression - { - code: dedent` - function f(x: T): T {} - const foo = x => f(x); - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "ArrowFunctionExpression", - line: 2, - column: 13, - suggestions: [ - { - output: dedent` - function f(x: T): T {} - const foo = f; - `, - }, - ], - }, - ], - }, - { - code: dedent` - function f(x: T): T {} - function foo(x) { return f(x); } - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "FunctionDeclaration", - line: 2, - column: 1, - suggestions: [ - { - output: dedent` - function f(x: T): T {} - const foo = f; - `, - }, - ], - }, - ], - }, - { - code: dedent` - function f(x: T): T {} - export default function (x) { return f(x); } - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "FunctionDeclaration", - line: 2, - column: 16, - suggestions: [ - { - output: dedent` - function f(x: T): T {} - export default f - `, - }, - ], - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/prefer-tacit/ts-at-least-4.7/valid.ts b/tests/rules/prefer-tacit/ts-at-least-4.7/valid.ts deleted file mode 100644 index c02ab1d60..000000000 --- a/tests/rules/prefer-tacit/ts-at-least-4.7/valid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import dedent from "dedent"; - -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = [ - // Instantiation Expression - { - code: dedent` - const foo = f; - `, - optionsSet: [[]], - }, -]; - -export default tests; diff --git a/tests/rules/prefer-tacit/ts-less-than-4.7/index.ts b/tests/rules/prefer-tacit/ts-less-than-4.7/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/prefer-tacit/ts-less-than-4.7/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/prefer-tacit/ts-less-than-4.7/invalid.ts b/tests/rules/prefer-tacit/ts-less-than-4.7/invalid.ts deleted file mode 100644 index dff7c99ef..000000000 --- a/tests/rules/prefer-tacit/ts-less-than-4.7/invalid.ts +++ /dev/null @@ -1,39 +0,0 @@ -import dedent from "dedent"; - -import type { InvalidTestCase } from "~/tests/helpers/util"; - -const tests: InvalidTestCase[] = [ - // Instantiation Expression not supported. - { - code: dedent` - function f(x: T): T {} - function foo(x) { return f(x); } - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "FunctionDeclaration", - line: 2, - column: 1, - }, - ], - }, - { - code: dedent` - function f(x: T): T {} - export default function (x) { return f(x); } - `, - optionsSet: [[]], - errors: [ - { - messageId: "generic", - type: "FunctionDeclaration", - line: 2, - column: 16, - }, - ], - }, -]; - -export default tests; diff --git a/tests/rules/prefer-tacit/ts-less-than-4.7/valid.ts b/tests/rules/prefer-tacit/ts-less-than-4.7/valid.ts deleted file mode 100644 index d8584f90f..000000000 --- a/tests/rules/prefer-tacit/ts-less-than-4.7/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import dedent from "dedent"; - -import type { ValidTestCase } from "~/tests/helpers/util"; - -const tests: ValidTestCase[] = []; - -export default tests; diff --git a/tests/rules/prefer-tacit/ts/index.test.ts b/tests/rules/prefer-tacit/ts/index.test.ts new file mode 100644 index 000000000..62d9f935f --- /dev/null +++ b/tests/rules/prefer-tacit/ts/index.test.ts @@ -0,0 +1,14 @@ +import { name, rule } from "#eslint-plugin-functional/rules/prefer-tacit"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/prefer-tacit/ts/index.ts b/tests/rules/prefer-tacit/ts/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/prefer-tacit/ts/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/prefer-tacit/ts/invalid.ts b/tests/rules/prefer-tacit/ts/invalid.ts index 25eea0120..37ca542c2 100644 --- a/tests/rules/prefer-tacit/ts/invalid.ts +++ b/tests/rules/prefer-tacit/ts/invalid.ts @@ -1,8 +1,16 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-tacit"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ // FunctionDeclaration. { code: dedent` @@ -13,11 +21,12 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "ArrowFunctionExpression", + type: AST_NODE_TYPES.ArrowFunctionExpression, line: 2, column: 13, suggestions: [ { + messageId: "generic", output: dedent` function f(x) {} const foo = f; @@ -36,11 +45,12 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "FunctionDeclaration", + type: AST_NODE_TYPES.FunctionDeclaration, line: 2, column: 1, suggestions: [ { + messageId: "generic", output: dedent` function f(x) {} const foo = f; @@ -59,11 +69,12 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "FunctionDeclaration", + type: AST_NODE_TYPES.FunctionDeclaration, line: 2, column: 16, suggestions: [ { + messageId: "generic", output: dedent` function f(x) {} export default f @@ -83,11 +94,12 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "ArrowFunctionExpression", + type: AST_NODE_TYPES.ArrowFunctionExpression, line: 2, column: 13, suggestions: [ { + messageId: "generic", output: dedent` const f = function(x) {} const foo = f; @@ -107,11 +119,12 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "ArrowFunctionExpression", + type: AST_NODE_TYPES.ArrowFunctionExpression, line: 2, column: 13, suggestions: [ { + messageId: "generic", output: dedent` const f = x => {} const foo = f; @@ -132,11 +145,12 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "ArrowFunctionExpression", + type: AST_NODE_TYPES.ArrowFunctionExpression, line: 3, column: 13, suggestions: [ { + messageId: "generic", output: dedent` type F = (x) => {}; const f = undefined as unknown as F; @@ -147,6 +161,115 @@ const tests: InvalidTestCase[] = [ }, ], }, + // Instantiation Expression + { + code: dedent` + function f(x: T): T {} + const foo = x => f(x); + `, + dependencyConstraints: { typescript: "4.7.0" }, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.ArrowFunctionExpression, + line: 2, + column: 13, + suggestions: [ + { + messageId: "generic", + output: dedent` + function f(x: T): T {} + const foo = f; + `, + }, + ], + }, + ], + }, + { + code: dedent` + function f(x: T): T {} + function foo(x) { return f(x); } + `, + dependencyConstraints: { typescript: "4.7.0" }, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.FunctionDeclaration, + line: 2, + column: 1, + suggestions: [ + { + messageId: "generic", + output: dedent` + function f(x: T): T {} + const foo = f; + `, + }, + ], + }, + ], + }, + { + code: dedent` + function f(x: T): T {} + export default function (x) { return f(x); } + `, + dependencyConstraints: { typescript: "4.7.0" }, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.FunctionDeclaration, + line: 2, + column: 16, + suggestions: [ + { + messageId: "generic", + output: dedent` + function f(x: T): T {} + export default f + `, + }, + ], + }, + ], + }, + // Instantiation Expression not supported. + { + code: dedent` + function f(x: T): T {} + function foo(x) { return f(x); } + `, + dependencyConstraints: { typescript: { range: "<4.7.0" } }, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.FunctionDeclaration, + line: 2, + column: 1, + }, + ], + }, + { + code: dedent` + function f(x: T): T {} + export default function (x) { return f(x); } + `, + dependencyConstraints: { typescript: { range: "<4.7.0" } }, + optionsSet: [[]], + errors: [ + { + messageId: "generic", + type: AST_NODE_TYPES.FunctionDeclaration, + line: 2, + column: 16, + }, + ], + }, ]; export default tests; diff --git a/tests/rules/prefer-tacit/ts/valid.ts b/tests/rules/prefer-tacit/ts/valid.ts index 860403b47..8d6411a5a 100644 --- a/tests/rules/prefer-tacit/ts/valid.ts +++ b/tests/rules/prefer-tacit/ts/valid.ts @@ -1,8 +1,35 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/prefer-tacit"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ + { + // No typedef for `f` therefore no error (when not assuming types). + code: "function foo(x) { f(x); }", + optionsSet: [[]], + }, + { + // No typedef for `f` therefore no error (when not assuming types). + code: "var foo = function(x) { f(x); }", + optionsSet: [[]], + }, + { + // No typedef for `f` therefore no error (when not assuming types). + code: `const foo = x => f(x);`, + optionsSet: [[]], + }, + // Default parameters. + { + code: dedent` + function f(x, y = 10) {} + const foo = x => f(x); + `, + optionsSet: [[]], + }, // FunctionDeclaration. { code: dedent` @@ -51,6 +78,14 @@ const tests: ValidTestCase[] = [ `, optionsSet: [[]], }, + // Instantiation Expression + { + code: dedent` + const foo = f; + `, + dependencyConstraints: { typescript: "4.7.0" }, + optionsSet: [[]], + }, ]; export default tests; diff --git a/tests/rules/readonly-type/index.test.ts b/tests/rules/readonly-type/index.test.ts deleted file mode 100644 index 1afb5301a..000000000 --- a/tests/rules/readonly-type/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { name, rule } from "~/rules/readonly-type"; -import { testUsing } from "~/tests/helpers/testers"; - -import tsTests from "./ts"; - -testUsing.typescript(name, rule, tsTests); diff --git a/tests/rules/readonly-type/ts/index.test.ts b/tests/rules/readonly-type/ts/index.test.ts new file mode 100644 index 000000000..693e54406 --- /dev/null +++ b/tests/rules/readonly-type/ts/index.test.ts @@ -0,0 +1,14 @@ +import { name, rule } from "#eslint-plugin-functional/rules/readonly-type"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/readonly-type/ts/index.ts b/tests/rules/readonly-type/ts/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/readonly-type/ts/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/readonly-type/ts/invalid.ts b/tests/rules/readonly-type/ts/invalid.ts index fc6a982a6..c986bb24c 100644 --- a/tests/rules/readonly-type/ts/invalid.ts +++ b/tests/rules/readonly-type/ts/invalid.ts @@ -1,8 +1,16 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/readonly-type"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: dedent` type Foo = Readonly<{ @@ -18,7 +26,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "keyword", - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 12, }, @@ -39,7 +47,7 @@ const tests: InvalidTestCase[] = [ errors: [ { messageId: "generic", - type: "TSTypeLiteral", + type: AST_NODE_TYPES.TSTypeLiteral, line: 1, column: 12, }, diff --git a/tests/rules/readonly-type/ts/valid.ts b/tests/rules/readonly-type/ts/valid.ts index 261f8c9ed..c4740608a 100644 --- a/tests/rules/readonly-type/ts/valid.ts +++ b/tests/rules/readonly-type/ts/valid.ts @@ -1,8 +1,12 @@ import dedent from "dedent"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/readonly-type"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ // Not readonly { code: dedent` diff --git a/tests/rules/type-declaration-immutability/index.test.ts b/tests/rules/type-declaration-immutability/index.test.ts deleted file mode 100644 index 38c122481..000000000 --- a/tests/rules/type-declaration-immutability/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { name, rule } from "~/rules/type-declaration-immutability"; -import { testUsing } from "~/tests/helpers/testers"; - -import tsTests from "./ts"; - -testUsing.typescript(name, rule, tsTests); diff --git a/tests/rules/type-declaration-immutability/ts/index.test.ts b/tests/rules/type-declaration-immutability/ts/index.test.ts new file mode 100644 index 000000000..5e0347d73 --- /dev/null +++ b/tests/rules/type-declaration-immutability/ts/index.test.ts @@ -0,0 +1,17 @@ +import { + name, + rule, +} from "#eslint-plugin-functional/rules/type-declaration-immutability"; +import { testRule } from "#eslint-plugin-functional/tests/helpers/testers"; + +import invalid from "./invalid"; +import valid from "./valid"; + +const tests = { + valid, + invalid, +}; + +const tester = testRule(name, rule); + +tester.typescript(tests); diff --git a/tests/rules/type-declaration-immutability/ts/index.ts b/tests/rules/type-declaration-immutability/ts/index.ts deleted file mode 100644 index 40a005f71..000000000 --- a/tests/rules/type-declaration-immutability/ts/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import invalid from "./invalid"; -import valid from "./valid"; - -export default { - valid, - invalid, -}; diff --git a/tests/rules/type-declaration-immutability/ts/invalid.ts b/tests/rules/type-declaration-immutability/ts/invalid.ts index 1b100571e..7212b5407 100644 --- a/tests/rules/type-declaration-immutability/ts/invalid.ts +++ b/tests/rules/type-declaration-immutability/ts/invalid.ts @@ -1,7 +1,13 @@ +import { AST_NODE_TYPES } from "@typescript-eslint/utils"; import dedent from "dedent"; import { Immutability } from "is-immutable-type"; -import type { InvalidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/type-declaration-immutability"; +import { + type InvalidTestCaseSet, + type MessagesOf, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; const recommended = { rules: [ @@ -48,7 +54,9 @@ const recommended = { ], }; -const tests: InvalidTestCase[] = [ +const tests: Array< + InvalidTestCaseSet, OptionsOf> +> = [ { code: dedent` type ReadonlyFoo = { foo: number } @@ -64,7 +72,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.ReadonlyShallow], actual: Immutability[Immutability.Mutable], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -95,7 +103,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.ReadonlyShallow], actual: Immutability[Immutability.Mutable], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -116,7 +124,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.ReadonlyShallow], actual: Immutability[Immutability.Mutable], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -137,7 +145,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.ReadonlyShallow], actual: Immutability[Immutability.Mutable], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -158,7 +166,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.ReadonlyDeep], actual: Immutability[Immutability.ReadonlyShallow], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -176,7 +184,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.ReadonlyDeep], actual: Immutability[Immutability.ReadonlyShallow], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -194,7 +202,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.ReadonlyDeep], actual: Immutability[Immutability.ReadonlyShallow], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -215,7 +223,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.Immutable], actual: Immutability[Immutability.ReadonlyShallow], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -233,7 +241,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.Immutable], actual: Immutability[Immutability.ReadonlyDeep], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -251,7 +259,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.Immutable], actual: Immutability[Immutability.ReadonlyDeep], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -269,7 +277,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.Mutable], actual: Immutability[Immutability.Immutable], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -287,7 +295,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.Mutable], actual: Immutability[Immutability.Immutable], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -308,7 +316,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.Mutable], actual: Immutability[Immutability.Immutable], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -329,7 +337,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.Mutable], actual: Immutability[Immutability.ReadonlyShallow], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -358,7 +366,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.ReadonlyDeep], actual: Immutability[Immutability.Mutable], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -390,7 +398,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.ReadonlyDeep], actual: Immutability[Immutability.ReadonlyShallow], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -417,7 +425,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.Mutable], actual: Immutability[Immutability.ReadonlyDeep], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, @@ -435,7 +443,7 @@ const tests: InvalidTestCase[] = [ keepDefault: false, values: [ { - name: "Set", + type: { from: "lib", name: "Set" }, to: Immutability.Immutable, }, ], @@ -448,7 +456,7 @@ const tests: InvalidTestCase[] = [ keepDefault: false, values: [ { - name: "Set", + type: { from: "lib", name: "Set" }, to: "Immutable", }, ], @@ -463,7 +471,7 @@ const tests: InvalidTestCase[] = [ expected: Immutability[Immutability.Mutable], actual: Immutability[Immutability.Immutable], }, - type: "Identifier", + type: AST_NODE_TYPES.Identifier, line: 1, column: 6, }, diff --git a/tests/rules/type-declaration-immutability/ts/valid.ts b/tests/rules/type-declaration-immutability/ts/valid.ts index 32f41227f..0cd91d3c8 100644 --- a/tests/rules/type-declaration-immutability/ts/valid.ts +++ b/tests/rules/type-declaration-immutability/ts/valid.ts @@ -1,7 +1,11 @@ import dedent from "dedent"; import { Immutability } from "is-immutable-type"; -import type { ValidTestCase } from "~/tests/helpers/util"; +import { type rule } from "#eslint-plugin-functional/rules/type-declaration-immutability"; +import { + type ValidTestCaseSet, + type OptionsOf, +} from "#eslint-plugin-functional/tests/helpers/util"; const recommended = { rules: [ @@ -28,7 +32,7 @@ const recommended = { ], }; -const tests: ValidTestCase[] = [ +const tests: Array>> = [ { code: "type ReadonlyString = string;", optionsSet: [[recommended]], @@ -114,7 +118,7 @@ const tests: ValidTestCase[] = [ optionsSet: [ [ { - ignorePattern: "Foo", + ignoreIdentifierPattern: "Foo", }, ], ], @@ -124,7 +128,7 @@ const tests: ValidTestCase[] = [ optionsSet: [ [ { - ignorePattern: "Foo", + ignoreIdentifierPattern: "Foo", }, ], [ @@ -167,6 +171,7 @@ const tests: ValidTestCase[] = [ { code: dedent` type ReadonlyDeepFoo = ReadonlyDeep<{ foo: { bar: string; }; }>; + type ReadonlyDeep = T; `, optionsSet: [[recommended]], settingsSet: [ @@ -174,7 +179,7 @@ const tests: ValidTestCase[] = [ immutability: { overrides: [ { - name: "ReadonlyDeep", + type: "ReadonlyDeep", to: Immutability.ReadonlyDeep, }, ], diff --git a/tests/rules/work.test.ts b/tests/rules/work.test.ts deleted file mode 100644 index cf8fc160f..000000000 --- a/tests/rules/work.test.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* eslint-disable */ -/** - * @file Provided to help with local test debugging. - */ - -import dedent from "dedent"; -import type { ValidTestCase, InvalidTestCase } from "../helpers/util"; -import { testUsing } from "~/tests/helpers/testers"; - -/* - * Step 1. - * Import the rule to test. - */ -import { name, rule } from "~/rules/prefer-immutable-types"; - -/* - * Step 2a. - * Provide a valid test case. - */ -const valid: Array = [ - // { - // code: dedent` - // // Valid Code. - // `, - // optionsSet: [[]], - // settingsSet: [{}], - // } -]; - -/* - * Step 2b. - * Or provide an invalid test case. - */ -const invalid: Array = [ - // { - // code: dedent` - // // Invalid Code. - // `, - // optionsSet: [[]], - // settingsSet: [{}], - // errors: [ - // { - // messageId: "returnType", - // type: "TSTypeAnnotation", - // line: 1, - // column: 1, - // }, - // ], - // }, -]; - -/* - * Step 3. - * Run test with `pnpm run test-work` or to debug in vscode, press F5 (with this - * file open and focused). - */ -testUsing.typescript(name, rule, { valid, invalid }); diff --git a/tests/tsconfig.json b/tests/tsconfig.json deleted file mode 100644 index 9abbf8bf0..000000000 --- a/tests/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../tsconfig.base.json", - "compilerOptions": { - "module": "commonjs", - "moduleResolution": "node", - "outDir": "../build", - "skipLibCheck": true, - "declaration": false, - // Turn off strict checks to make debugging nicer. - "strict": false, - "strictNullChecks": true, - "exactOptionalPropertyTypes": false - } -} diff --git a/tsconfig.base.json b/tsconfig.base.json deleted file mode 100644 index b2704d7db..000000000 --- a/tsconfig.base.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "compilerOptions": { - "allowSyntheticDefaultImports": true, - "allowUnreachableCode": false, - "allowUnusedLabels": false, - "alwaysStrict": true, - "esModuleInterop": true, - "exactOptionalPropertyTypes": true, - "forceConsistentCasingInFileNames": true, - "importHelpers": false, - "lib": ["ESNext"], - "module": "ESNext", - "moduleResolution": "bundler", - "newLine": "LF", - "noEmitOnError": true, - "noImplicitReturns": true, - "noPropertyAccessFromIndexSignature": true, - "noUncheckedIndexedAccess": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "pretty": true, - "resolveJsonModule": true, - "sourceMap": false, - "strict": true, - "target": "ES2020", - "baseUrl": ".", - "paths": { - "~/index": ["./src"], - "~/configs/*": ["src/configs/*"], - "~/options": ["src/options"], - "~/rules": ["src/rules"], - "~/rules/*": ["src/rules/*"], - "~/settings": ["src/settings"], - "~/utils/*": ["src/utils/*"], - "~/conditional-imports/*": ["src/utils/conditional-imports/*"], - "~/tests/*": ["tests/*"] - } - } -} diff --git a/tsconfig.build.json b/tsconfig.build.json deleted file mode 100644 index 5062a4ee8..000000000 --- a/tsconfig.build.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "rootDir": "./src", - "skipLibCheck": true - }, - "include": ["src"] -} diff --git a/tsconfig.json b/tsconfig.json index 371e0acd3..b05a69a4a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,42 @@ { - "extends": "./tsconfig.base.json", "compilerOptions": { - "rootDir": ".", - "removeComments": true - }, - "exclude": ["tests"] + "allowSyntheticDefaultImports": true, + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "alwaysStrict": true, + "declaration": false, + "esModuleInterop": true, + "exactOptionalPropertyTypes": true, + "forceConsistentCasingInFileNames": true, + "importHelpers": false, + "lib": ["ESNext"], + "module": "ESNext", + "moduleResolution": "bundler", + "newLine": "LF", + "noEmitOnError": true, + "noImplicitReturns": true, + "noPropertyAccessFromIndexSignature": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "pretty": true, + "resolveJsonModule": true, + "sourceMap": false, + "strict": true, + "target": "ESNext", + "baseUrl": ".", + "paths": { + "#eslint-plugin-functional": ["src"], + "#eslint-plugin-functional/configs/*": ["src/configs/*"], + "#eslint-plugin-functional/options": ["src/options"], + "#eslint-plugin-functional/rules": ["src/rules"], + "#eslint-plugin-functional/rules/*": ["src/rules/*"], + "#eslint-plugin-functional/settings": ["src/settings"], + "#eslint-plugin-functional/utils/*": ["src/utils/*"], + "#eslint-plugin-functional/conditional-imports/*": [ + "src/utils/conditional-imports/*" + ], + "#eslint-plugin-functional/tests/*": ["tests/*"] + } + } } diff --git a/tsconfig.tests-compiled.json b/tsconfig.tests-compiled.json new file mode 100644 index 000000000..c5a9eb78f --- /dev/null +++ b/tsconfig.tests-compiled.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": true, + "outDir": "tests-compiled", + "skipLibCheck": true + }, + "include": ["src", "tests"] +} diff --git a/typings/es.d.ts b/typings/es.d.ts index 243e01071..658c1399a 100644 --- a/typings/es.d.ts +++ b/typings/es.d.ts @@ -2,7 +2,7 @@ declare global { interface ObjectConstructor { hasOwn( object: ObjectType, - key: Key + key: Key, ): object is ObjectType & Record; } diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 000000000..be259bb18 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,43 @@ +import tsconfigPaths from "vite-tsconfig-paths"; +import { defineConfig } from "vitest/config"; + +/** + * Get the intended boolean value from the given string. + */ +function getBoolean(value: string | undefined) { + if (value === undefined) { + return false; + } + const asNumber = Number(value); + return Number.isNaN(asNumber) + ? Boolean(String(value).toLowerCase().replace("false", "")) + : Boolean(asNumber); +} + +const useCompiledTests = getBoolean(process.env["USE_COMPILED_TESTS"]); + +const testFilePattern = `${ + useCompiledTests ? "tests-compiled" : "." +}/**/*.test.${useCompiledTests ? "js" : "ts"}`; + +export default defineConfig({ + plugins: [tsconfigPaths()], + + test: { + include: [testFilePattern], + coverage: { + provider: "c8", + include: ["src/**/*.ts"], + // @ts-expect-error -- Untyped option. + excludeAfterRemap: true, + clean: true, + reporter: ["lcov", "text"], + watermarks: { + lines: [80, 95], + functions: [80, 95], + branches: [80, 95], + statements: [80, 95], + }, + }, + }, +});