From c2e6b7813d4ffaa73d9e08940968e28fc3cd7c1f Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Fri, 12 Jan 2024 15:46:24 +0800 Subject: [PATCH] Add `biome` --- .eslintrc | 11 - README.md | 2 +- biome.json | 269 +++ docs/optimizations.md | 6 +- examples/preact/.eslintrc.cjs | 18 - examples/preact/package.json | 4 +- examples/preact/tsconfig.eslint.json | 22 - examples/react/.eslintrc.cjs | 18 - examples/react/package.json | 4 +- examples/react/tsconfig.eslint.json | 22 - package.json | 5 +- packages/forgetti/.eslintrc.cjs | 21 - packages/forgetti/README.md | 2 +- packages/forgetti/package.json | 2 - packages/forgetti/pridepack.json | 2 +- packages/forgetti/runtime/index.ts | 1 - packages/forgetti/src/core/checks.ts | 16 +- .../forgetti/src/core/expand-expressions.ts | 123 +- .../forgetti/src/core/get-foreign-bindings.ts | 52 +- .../forgetti/src/core/get-hook-call-type.ts | 99 +- .../src/core/get-import-identifier.ts | 7 +- .../forgetti/src/core/inline-expressions.ts | 75 +- packages/forgetti/src/core/is-constant.ts | 222 ++- packages/forgetti/src/core/optimize-jsx.ts | 311 ++-- packages/forgetti/src/core/optimizer-scope.ts | 150 +- packages/forgetti/src/core/optimizer.ts | 558 +++--- packages/forgetti/src/core/presets.ts | 6 +- .../forgetti/src/core/simplify-expressions.ts | 27 +- packages/forgetti/src/core/unwrap-node.ts | 7 +- packages/forgetti/src/core/unwrap-path.ts | 1 + packages/forgetti/src/index.ts | 87 +- packages/forgetti/test/expressions.test.ts | 9 +- packages/forgetti/test/forgetti-skip.test.ts | 9 +- packages/forgetti/test/hooks.test.ts | 17 +- packages/forgetti/test/statements.test.ts | 9 +- packages/forgetti/tsconfig.eslint.json | 24 - packages/rollup/.eslintrc.cjs | 13 - packages/rollup/README.md | 2 +- packages/rollup/package.json | 4 +- packages/rollup/tsconfig.eslint.json | 23 - packages/vite/.eslintrc.cjs | 13 - packages/vite/package.json | 4 +- packages/vite/tsconfig.eslint.json | 23 - pnpm-lock.yaml | 1606 +---------------- 44 files changed, 1304 insertions(+), 2602 deletions(-) delete mode 100644 .eslintrc create mode 100644 biome.json delete mode 100644 examples/preact/.eslintrc.cjs delete mode 100644 examples/preact/tsconfig.eslint.json delete mode 100644 examples/react/.eslintrc.cjs delete mode 100644 examples/react/tsconfig.eslint.json delete mode 100644 packages/forgetti/.eslintrc.cjs delete mode 100644 packages/forgetti/tsconfig.eslint.json delete mode 100644 packages/rollup/.eslintrc.cjs delete mode 100644 packages/rollup/tsconfig.eslint.json delete mode 100644 packages/vite/.eslintrc.cjs delete mode 100644 packages/vite/tsconfig.eslint.json diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index a8427f9..0000000 --- a/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - "parserOptions": { - "project": [ - "./packages/*/tsconfig.eslint.json" - ] - }, - "extends": [ - "lxsmnsyc/typescript" - ] -} \ No newline at end of file diff --git a/README.md b/README.md index 86a136f..0a39100 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Forgetti is an auto-memoization Babel plugin I made for a hook-based flow like R ## Why -> **Note** +> [!NOTE] > Please watch the video. Video explains about the problems it solves and benefits it delivers [![React without memo](https://img.youtube.com/vi/lGEMwh32soc/0.jpg)](https://www.youtube.com/watch?v=lGEMwh32soc "React without memo") diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..d8eb78f --- /dev/null +++ b/biome.json @@ -0,0 +1,269 @@ +{ + "$schema": "https://unpkg.com/@biomejs/biome/configuration_schema.json", + "files": { + "ignore": [ + "node_modules/**/*" + ] + }, + "vcs": { + "useIgnoreFile": true + }, + "linter": { + "enabled": true, + "ignore": [ + "node_modules/**/*" + ], + "rules": { + "a11y": { + "noAccessKey": "error", + "noAriaUnsupportedElements": "error", + "noAutofocus": "error", + "noBlankTarget": "error", + "noDistractingElements": "error", + "noHeaderScope": "error", + "noInteractiveElementToNoninteractiveRole": "error", + "noNoninteractiveElementToInteractiveRole": "error", + "noNoninteractiveTabindex": "error", + "noPositiveTabindex": "error", + "noRedundantAlt": "error", + "noRedundantRoles": "error", + "noSvgWithoutTitle": "error", + "useAltText": "error", + "useAnchorContent": "error", + "useAriaActivedescendantWithTabindex": "error", + "useAriaPropsForRole": "error", + "useButtonType": "error", + "useHeadingContent": "error", + "useHtmlLang": "error", + "useIframeTitle": "warn", + "useKeyWithClickEvents": "warn", + "useKeyWithMouseEvents": "warn", + "useMediaCaption": "error", + "useValidAnchor": "error", + "useValidAriaProps": "error", + "useValidAriaValues": "error", + "useValidLang": "error" + }, + "complexity": { + "noBannedTypes": "error", + "noExcessiveCognitiveComplexity": { + "level": "error", + "options": { + "maxAllowedComplexity": 15 + } + }, + "noExtraBooleanCast": "error", + "noForEach": "error", + "noMultipleSpacesInRegularExpressionLiterals": "warn", + "noStaticOnlyClass": "error", + "noThisInStatic": "error", + "noUselessCatch": "error", + "noUselessConstructor": "error", + "noUselessEmptyExport": "error", + "noUselessFragments": "error", + "noUselessLabel": "error", + "noUselessRename": "error", + "noUselessSwitchCase": "error", + "noUselessThisAlias": "error", + "noUselessTypeConstraint": "error", + "noVoid": "off", + "noWith": "error", + "useArrowFunction": "error", + "useFlatMap": "error", + "useLiteralKeys": "error", + "useOptionalChain": "warn", + "useSimpleNumberKeys": "error", + "useSimplifiedLogicExpression": "error" + }, + "correctness": { + "noChildrenProp": "error", + "noConstantCondition": "error", + "noConstAssign": "error", + "noConstructorReturn": "error", + "noEmptyCharacterClassInRegex": "error", + "noEmptyPattern": "error", + "noGlobalObjectCalls": "error", + "noInnerDeclarations": "error", + "noInvalidConstructorSuper": "error", + "noInvalidNewBuiltin": "error", + "noNewSymbol": "error", + "noNonoctalDecimalEscape": "error", + "noPrecisionLoss": "error", + "noRenderReturnValue": "error", + "noSelfAssign": "error", + "noSetterReturn": "error", + "noStringCaseMismatch": "error", + "noSwitchDeclarations": "error", + "noUndeclaredVariables": "error", + "noUnnecessaryContinue": "error", + "noUnreachable": "error", + "noUnreachableSuper": "error", + "noUnsafeFinally": "error", + "noUnsafeOptionalChaining": "error", + "noUnusedLabels": "error", + "noUnusedVariables": "error", + "noVoidElementsWithChildren": "error", + "noVoidTypeReturn": "error", + "useExhaustiveDependencies": "error", + "useHookAtTopLevel": "error", + "useIsNan": "error", + "useValidForDirection": "error", + "useYield": "error" + }, + "performance": { + "noAccumulatingSpread": "error", + "noDelete": "off" + }, + "security": { + "noDangerouslySetInnerHtml": "error", + "noDangerouslySetInnerHtmlWithChildren": "error" + }, + "style": { + "noArguments": "error", + "noCommaOperator": "off", + "noImplicitBoolean": "error", + "noInferrableTypes": "error", + "noNamespace": "error", + "noNegationElse": "error", + "noNonNullAssertion": "off", + "noParameterAssign": "off", + "noParameterProperties": "off", + "noRestrictedGlobals": "error", + "noShoutyConstants": "error", + "noUnusedTemplateLiteral": "error", + "noUselessElse": "error", + "noVar": "error", + "useAsConstAssertion": "error", + "useBlockStatements": "error", + "useCollapsedElseIf": "error", + "useConst": "error", + "useDefaultParameterLast": "error", + "useEnumInitializers": "error", + "useExponentiationOperator": "error", + "useFragmentSyntax": "error", + "useLiteralEnumMembers": "error", + "useNamingConvention": "off", + "useNumericLiterals": "error", + "useSelfClosingElements": "error", + "useShorthandArrayType": "error", + "useShorthandAssign": "error", + "useSingleCaseStatement": "error", + "useSingleVarDeclarator": "error", + "useTemplate": "off", + "useWhile": "error" + }, + "suspicious": { + "noApproximativeNumericConstant": "error", + "noArrayIndexKey": "error", + "noAssignInExpressions": "error", + "noAsyncPromiseExecutor": "error", + "noCatchAssign": "error", + "noClassAssign": "error", + "noCommentText": "error", + "noCompareNegZero": "error", + "noConfusingLabels": "error", + "noConfusingVoidType": "error", + "noConsoleLog": "warn", + "noConstEnum": "off", + "noControlCharactersInRegex": "error", + "noDebugger": "off", + "noDoubleEquals": "error", + "noDuplicateCase": "error", + "noDuplicateClassMembers": "error", + "noDuplicateJsxProps": "error", + "noDuplicateObjectKeys": "error", + "noDuplicateParameters": "error", + "noEmptyInterface": "error", + "noExplicitAny": "warn", + "noExtraNonNullAssertion": "error", + "noFallthroughSwitchClause": "error", + "noFunctionAssign": "error", + "noGlobalIsFinite": "error", + "noGlobalIsNan": "error", + "noImportAssign": "error", + "noLabelVar": "error", + "noMisleadingInstantiator": "error", + "noMisrefactoredShorthandAssign": "off", + "noPrototypeBuiltins": "error", + "noRedeclare": "error", + "noRedundantUseStrict": "error", + "noSelfCompare": "off", + "noShadowRestrictedNames": "error", + "noSparseArray": "off", + "noUnsafeDeclarationMerging": "error", + "noUnsafeNegation": "error", + "useDefaultSwitchClauseLast": "error", + "useGetterReturn": "error", + "useIsArray": "error", + "useNamespaceKeyword": "error", + "useValidTypeof": "error" + }, + "nursery": { + "noAriaHiddenOnFocusable": "off", + "noDefaultExport": "off", + "noDuplicateJsonKeys": "off", + "noEmptyBlockStatements": "error", + "noImplicitAnyLet": "off", + "noUnusedImports": "error", + "noUnusedPrivateClassMembers": "error", + "noUselessLoneBlockStatements": "error", + "useAwait": "error", + "useGroupedTypeImport": "error", + "useImportRestrictions": "off", + "useRegexLiterals": "error", + "useValidAriaRole": "error" + } + } + }, + "formatter": { + "enabled": true, + "ignore": [ + "node_modules/**/*" + ], + "formatWithErrors": false, + "indentWidth": 2, + "indentStyle": "space", + "lineEnding": "lf", + "lineWidth": 80 + }, + "organizeImports": { + "enabled": true, + "ignore": [ + "node_modules/**/*" + ] + }, + "javascript": { + "formatter": { + "enabled": true, + "arrowParentheses": "asNeeded", + "bracketSameLine": false, + "bracketSpacing": true, + "indentWidth": 2, + "indentStyle": "space", + "jsxQuoteStyle": "double", + "lineEnding": "lf", + "lineWidth": 80, + "quoteProperties": "asNeeded", + "quoteStyle": "single", + "semicolons": "always", + "trailingComma": "all" + }, + "globals": [], + "parser": { + "unsafeParameterDecoratorsEnabled": true + } + }, + "json": { + "formatter": { + "enabled": true, + "indentWidth": 2, + "indentStyle": "space", + "lineEnding": "lf", + "lineWidth": 80 + }, + "parser": { + "allowComments": false, + "allowTrailingCommas": false + } + } +} \ No newline at end of file diff --git a/docs/optimizations.md b/docs/optimizations.md index f08ff24..629b2e3 100644 --- a/docs/optimizations.md +++ b/docs/optimizations.md @@ -378,7 +378,7 @@ function Example(props) { } ``` -> **Note** +> [!NOTE] > Nested branches are also supported. List of supported branch statements: @@ -389,7 +389,7 @@ List of supported branch statements: - block statements - labeled statements -> **Note** +> [!NOTE] > Branched statements are usually illegal in a hook-based system (like React), but a `memo` or `callback` call inside the branches are allowed. #### Loops @@ -463,7 +463,7 @@ function Example(props) { } ``` -> **Note** +> [!NOTE] > You can use `/* @forgetti skip */` just before the JSX if you want to opt-out of this feature. ## `/* @forgetti skip */` diff --git a/examples/preact/.eslintrc.cjs b/examples/preact/.eslintrc.cjs deleted file mode 100644 index e98af6d..0000000 --- a/examples/preact/.eslintrc.cjs +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - "root": true, - "extends": [ - "lxsmnsyc/typescript/react" - ], - "parserOptions": { - "project": "./tsconfig.eslint.json", - "tsconfigRootDir": __dirname, - }, - "rules": { - "import/no-extraneous-dependencies": [ - "error", { - "devDependencies": ["**/*.test.ts"] - } - ], - "no-param-reassign": "off" - } -}; \ No newline at end of file diff --git a/examples/preact/package.json b/examples/preact/package.json index 66fdb2f..37ab623 100644 --- a/examples/preact/package.json +++ b/examples/preact/package.json @@ -8,8 +8,6 @@ }, "devDependencies": { "@preact/preset-vite": "^2.6.0", - "eslint": "^8.51.0", - "eslint-config-lxsmnsyc": "^0.6.5", "typescript": "^5.2.2", "vite": "^4.5.0", "vite-plugin-forgetti": "0.7.2" @@ -19,4 +17,4 @@ "preact": "^10.18.1" }, "version": "0.7.2" -} +} \ No newline at end of file diff --git a/examples/preact/tsconfig.eslint.json b/examples/preact/tsconfig.eslint.json deleted file mode 100644 index 7bfd0d9..0000000 --- a/examples/preact/tsconfig.eslint.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "exclude": ["node_modules"], - "include": ["src", "types", "test"], - "compilerOptions": { - "module": "ESNext", - "lib": ["ESNext", "DOM"], - "importHelpers": true, - "declaration": true, - "sourceMap": true, - "rootDir": "./", - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "node", - "jsx": "react-jsx", - "jsxImportSource": "preact", - "esModuleInterop": true, - "target": "ES2017" - } -} diff --git a/examples/react/.eslintrc.cjs b/examples/react/.eslintrc.cjs deleted file mode 100644 index e98af6d..0000000 --- a/examples/react/.eslintrc.cjs +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - "root": true, - "extends": [ - "lxsmnsyc/typescript/react" - ], - "parserOptions": { - "project": "./tsconfig.eslint.json", - "tsconfigRootDir": __dirname, - }, - "rules": { - "import/no-extraneous-dependencies": [ - "error", { - "devDependencies": ["**/*.test.ts"] - } - ], - "no-param-reassign": "off" - } -}; \ No newline at end of file diff --git a/examples/react/package.json b/examples/react/package.json index f8f925b..9d53dbf 100644 --- a/examples/react/package.json +++ b/examples/react/package.json @@ -10,8 +10,6 @@ "@types/react": "^18.2.29", "@types/react-dom": "^18.2.14", "@vitejs/plugin-react": "^4.1.0", - "eslint": "^8.51.0", - "eslint-config-lxsmnsyc": "^0.6.5", "typescript": "^5.2.2", "vite": "^4.5.0", "vite-plugin-forgetti": "0.7.2" @@ -22,4 +20,4 @@ "react-dom": "^18.2.0" }, "version": "0.7.2" -} +} \ No newline at end of file diff --git a/examples/react/tsconfig.eslint.json b/examples/react/tsconfig.eslint.json deleted file mode 100644 index 483b0cd..0000000 --- a/examples/react/tsconfig.eslint.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "exclude": ["node_modules"], - "include": ["src", "types", "test"], - "compilerOptions": { - "module": "ESNext", - "lib": ["ESNext", "DOM"], - "importHelpers": true, - "declaration": true, - "sourceMap": true, - "rootDir": "./", - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "node", - "jsx": "react-jsx", - "jsxImportSource": "react", - "esModuleInterop": true, - "target": "ES2017" - } -} diff --git a/package.json b/package.json index b5d6042..8dbd068 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,8 @@ "examples/*" ], "devDependencies": { - "eslint": "^8.51.0", - "eslint-config-lxsmnsyc": "^0.6.5", + "@biomejs/biome": "^1.4.1", "lerna": "^7.4.1", "typescript": "^5.2.2" } -} +} \ No newline at end of file diff --git a/packages/forgetti/.eslintrc.cjs b/packages/forgetti/.eslintrc.cjs deleted file mode 100644 index 6810fe4..0000000 --- a/packages/forgetti/.eslintrc.cjs +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - "root": true, - "extends": [ - 'lxsmnsyc/typescript', - ], - "parserOptions": { - "project": "./tsconfig.eslint.json", - "tsconfigRootDir": __dirname, - }, - "rules": { - "import/no-extraneous-dependencies": [ - "error", { - "devDependencies": ["**/*.test.ts"] - } - ], - "no-plusplus": "off", - "no-continue": "off", - "no-param-reassign": "off", - "no-restricted-syntax": "off" - } -}; \ No newline at end of file diff --git a/packages/forgetti/README.md b/packages/forgetti/README.md index 86a136f..0a39100 100644 --- a/packages/forgetti/README.md +++ b/packages/forgetti/README.md @@ -24,7 +24,7 @@ Forgetti is an auto-memoization Babel plugin I made for a hook-based flow like R ## Why -> **Note** +> [!NOTE] > Please watch the video. Video explains about the problems it solves and benefits it delivers [![React without memo](https://img.youtube.com/vi/lGEMwh32soc/0.jpg)](https://www.youtube.com/watch?v=lGEMwh32soc "React without memo") diff --git a/packages/forgetti/package.json b/packages/forgetti/package.json index ea3ab4c..175c69f 100644 --- a/packages/forgetti/package.json +++ b/packages/forgetti/package.json @@ -18,8 +18,6 @@ "@types/babel__core": "^7.20.3", "@types/babel__traverse": "^7.20.3", "@types/node": "^20.8.7", - "eslint": "^8.51.0", - "eslint-config-lxsmnsyc": "^0.6.5", "pridepack": "2.5.1", "tslib": "^2.6.2", "typescript": "^5.2.2", diff --git a/packages/forgetti/pridepack.json b/packages/forgetti/pridepack.json index 44539bb..fb5db5f 100644 --- a/packages/forgetti/pridepack.json +++ b/packages/forgetti/pridepack.json @@ -1,5 +1,5 @@ { - "target": "es2017", + "target": "es2018", "entrypoints": { ".": "src/index.ts", "./runtime": "runtime/index.ts" diff --git a/packages/forgetti/runtime/index.ts b/packages/forgetti/runtime/index.ts index bbb9d4f..c835da0 100644 --- a/packages/forgetti/runtime/index.ts +++ b/packages/forgetti/runtime/index.ts @@ -1,5 +1,4 @@ function isEqual(a: unknown, b: unknown): boolean { - // eslint-disable-next-line no-self-compare return a === b || (a !== a && b !== b); } diff --git a/packages/forgetti/src/core/checks.ts b/packages/forgetti/src/core/checks.ts index 930861c..7c654c1 100644 --- a/packages/forgetti/src/core/checks.ts +++ b/packages/forgetti/src/core/checks.ts @@ -24,7 +24,10 @@ export function isHookName(ctx: StateContext, id: t.Identifier): boolean { return !!ctx.filters.hook && ctx.filters.hook.test(id.name); } -export function isHookOrComponentName(ctx: StateContext, id: t.Identifier): boolean { +export function isHookOrComponentName( + ctx: StateContext, + id: t.Identifier, +): boolean { return ctx.filters.component.test(id.name) || isHookName(ctx, id); } @@ -61,11 +64,12 @@ export function isComponentValid( node: ComponentNode, checkName: boolean, ): boolean { - return !checkName || ( - node.type !== 'ArrowFunctionExpression' - && !!node.id - && isHookOrComponentName(ctx, node.id) - && !shouldSkipNode(node) + return ( + !checkName || + (node.type !== 'ArrowFunctionExpression' && + !!node.id && + isHookOrComponentName(ctx, node.id) && + !shouldSkipNode(node)) ); } diff --git a/packages/forgetti/src/core/expand-expressions.ts b/packages/forgetti/src/core/expand-expressions.ts index 794e670..78e3199 100644 --- a/packages/forgetti/src/core/expand-expressions.ts +++ b/packages/forgetti/src/core/expand-expressions.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ import * as t from '@babel/types'; import type * as babel from '@babel/core'; import type { ComponentNode, StateContext } from './types'; @@ -27,17 +26,15 @@ function isInValidExpression(path: babel.NodePath): boolean { let prev = path; while (current) { if ( - isPathValid(current, t.isConditionalExpression) - && ( - current.get('consequent').node === prev.node - || current.get('alternate').node === prev.node - ) + isPathValid(current, t.isConditionalExpression) && + (current.get('consequent').node === prev.node || + current.get('alternate').node === prev.node) ) { return false; } if ( - isPathValid(current, t.isLogicalExpression) - && current.get('right').node === prev.node + isPathValid(current, t.isLogicalExpression) && + current.get('right').node === prev.node ) { return false; } @@ -49,20 +46,15 @@ function isInValidExpression(path: babel.NodePath): boolean { const UNDEFINED_LITERAL = t.unaryExpression('void', t.numericLiteral(0)); -function transformOptionalCall(path: babel.NodePath): t.Expression { +function transformOptionalCall( + path: babel.NodePath, +): t.Expression { const unwrappedID = unwrapNode(path.node.callee, t.isIdentifier); if (unwrappedID) { return t.conditionalExpression( - t.binaryExpression( - '==', - unwrappedID, - t.nullLiteral(), - ), + t.binaryExpression('==', unwrappedID, t.nullLiteral()), UNDEFINED_LITERAL, - t.callExpression( - unwrappedID, - path.node.arguments, - ), + t.callExpression(unwrappedID, path.node.arguments), ); } const temp = path.scope.generateUidIdentifier('nullish'); @@ -70,8 +62,9 @@ function transformOptionalCall(path: babel.NodePath): kind: 'let', id: temp, }); - const unwrappedCallee = unwrapNode(path.node.callee, t.isMemberExpression) - || unwrapNode(path.node.callee, t.isOptionalMemberExpression); + const unwrappedCallee = + unwrapNode(path.node.callee, t.isMemberExpression) || + unwrapNode(path.node.callee, t.isOptionalMemberExpression); if (unwrappedCallee) { let unwrappedObject = unwrapNode(unwrappedCallee.object, t.isIdentifier); if (!unwrappedObject) { @@ -80,7 +73,11 @@ function transformOptionalCall(path: babel.NodePath): kind: 'let', id: unwrappedObject, }); - unwrappedCallee.object = t.assignmentExpression('=', unwrappedObject, unwrappedCallee.object); + unwrappedCallee.object = t.assignmentExpression( + '=', + unwrappedObject, + unwrappedCallee.object, + ); } return t.conditionalExpression( t.binaryExpression( @@ -89,10 +86,10 @@ function transformOptionalCall(path: babel.NodePath): t.nullLiteral(), ), UNDEFINED_LITERAL, - t.callExpression( - t.memberExpression(temp, t.identifier('call')), - [unwrappedObject, ...path.node.arguments], - ), + t.callExpression(t.memberExpression(temp, t.identifier('call')), [ + unwrappedObject, + ...path.node.arguments, + ]), ); } return t.conditionalExpression( @@ -102,28 +99,19 @@ function transformOptionalCall(path: babel.NodePath): t.nullLiteral(), ), UNDEFINED_LITERAL, - t.callExpression( - temp, - path.node.arguments, - ), + t.callExpression(temp, path.node.arguments), ); } -function transformOptionalMember(path: babel.NodePath): t.Expression { +function transformOptionalMember( + path: babel.NodePath, +): t.Expression { const unwrappedID = unwrapNode(path.node.object, t.isIdentifier); if (unwrappedID) { return t.conditionalExpression( - t.binaryExpression( - '==', - unwrappedID, - t.nullLiteral(), - ), + t.binaryExpression('==', unwrappedID, t.nullLiteral()), UNDEFINED_LITERAL, - t.memberExpression( - unwrappedID, - path.node.property, - path.node.computed, - ), + t.memberExpression(unwrappedID, path.node.property, path.node.computed), ); } const temp = path.scope.generateUidIdentifier('nullish'); @@ -138,11 +126,7 @@ function transformOptionalMember(path: babel.NodePath, ): void { - if (path.node.type === 'ArrowFunctionExpression' && path.node.body.type !== 'BlockStatement') { - path.node.body = t.blockStatement( - [t.returnStatement(path.node.body)], - ); + if ( + path.node.type === 'ArrowFunctionExpression' && + path.node.body.type !== 'BlockStatement' + ) { + path.node.body = t.blockStatement([t.returnStatement(path.node.body)]); } path.traverse({ OptionalCallExpression(p) { const parent = p.getFunctionParent(); const statement = p.getStatementParent(); - if ( - parent === path - && statement - ) { + if (parent === path && statement) { p.replaceWith(transformOptionalCall(p)); } }, @@ -171,10 +153,7 @@ export function expandExpressions( const parent = p.getFunctionParent(); const statement = p.getStatementParent(); - if ( - parent === path - && statement - ) { + if (parent === path && statement) { p.replaceWith(transformOptionalMember(p)); } }, @@ -183,19 +162,16 @@ export function expandExpressions( const statement = p.getStatementParent(); if ( - parent === path - && statement - && isStatementValid(statement) - && isInValidExpression(p) - && !isPathValid(p.parentPath, t.isStatement) - && !isPathValid(p.parentPath, t.isVariableDeclarator) + parent === path && + statement && + isStatementValid(statement) && + isInValidExpression(p) && + !isPathValid(p.parentPath, t.isStatement) && + !isPathValid(p.parentPath, t.isVariableDeclarator) ) { const id = p.scope.generateUidIdentifier('hoisted'); statement.insertBefore( - t.variableDeclaration( - 'let', - [t.variableDeclarator(id, p.node)], - ), + t.variableDeclaration('let', [t.variableDeclarator(id, p.node)]), ); p.replaceWith(id); } @@ -205,19 +181,16 @@ export function expandExpressions( const statement = p.getStatementParent(); if ( - parent === path - && statement - && !isPathValid(p.parentPath, t.isStatement) - && !isPathValid(p.parentPath, t.isVariableDeclarator) + parent === path && + statement && + !isPathValid(p.parentPath, t.isStatement) && + !isPathValid(p.parentPath, t.isVariableDeclarator) ) { const hookType = getHookCallType(ctx, p); if (hookType === 'custom' || hookType === 'effect') { const id = p.scope.generateUidIdentifier('hoisted'); statement.insertBefore( - t.variableDeclaration( - 'let', - [t.variableDeclarator(id, p.node)], - ), + t.variableDeclaration('let', [t.variableDeclarator(id, p.node)]), ); p.replaceWith(id); } diff --git a/packages/forgetti/src/core/get-foreign-bindings.ts b/packages/forgetti/src/core/get-foreign-bindings.ts index dfb480b..20fcb38 100644 --- a/packages/forgetti/src/core/get-foreign-bindings.ts +++ b/packages/forgetti/src/core/get-foreign-bindings.ts @@ -32,41 +32,27 @@ function isInTypescript(path: babel.NodePath): boolean { return false; } -export default function getForeignBindings(path: babel.NodePath): t.Identifier[] { +function getForeignBindingsFromExpression( + parentPath: babel.NodePath, + path: babel.NodePath, + identifiers: Set, +) { + // Check identifiers that aren't in a TS expression + if ( + !isInTypescript(path) && + isForeignBinding(parentPath, path, path.node.name) + ) { + identifiers.add(path.node.name); + } +} + +export default function getForeignBindings( + path: babel.NodePath, +): t.Identifier[] { const identifiers = new Set(); path.traverse({ - Expression(p) { - // Check identifiers that aren't in a TS expression - if ( - p.node.type === 'Identifier' - && !isInTypescript(p) - && isForeignBinding(path, p, p.node.name) - ) { - identifiers.add(p.node.name); - } - if (p.node.type === 'JSXElement') { - switch (p.node.openingElement.name.type) { - case 'JSXIdentifier': { - const literal = p.node.openingElement.name.name; - if (/^[A-Z_]/.test(literal) && isForeignBinding(path, p, literal)) { - identifiers.add(literal); - } - } - break; - case 'JSXMemberExpression': { - let base: t.JSXMemberExpression | t.JSXIdentifier = p.node.openingElement.name; - while (base.type === 'JSXMemberExpression') { - base = base.object; - } - if (isForeignBinding(path, p, base.name)) { - identifiers.add(base.name); - } - } - break; - default: - break; - } - } + ReferencedIdentifier(p) { + getForeignBindingsFromExpression(path, p, identifiers); }, }); diff --git a/packages/forgetti/src/core/get-hook-call-type.ts b/packages/forgetti/src/core/get-hook-call-type.ts index da0fb3d..81302d1 100644 --- a/packages/forgetti/src/core/get-hook-call-type.ts +++ b/packages/forgetti/src/core/get-hook-call-type.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ import type * as babel from '@babel/core'; import * as t from '@babel/types'; import { isHookName, isPathValid } from './checks'; @@ -6,10 +5,63 @@ import type { HookIdentity } from './presets'; import unwrapNode from './unwrap-node'; import type { StateContext } from './types'; -type HookCallType = - | HookIdentity - | 'custom' - | 'none'; +type HookCallType = HookIdentity | 'custom' | 'none'; + +function getHookCallTypeFromIdentifier( + ctx: StateContext, + path: babel.NodePath, + id: t.Identifier, +): HookCallType { + const binding = path.scope.getBindingIdentifier(id.name); + if (binding) { + const registration = ctx.registrations.hooks.identifiers.get(binding); + if (registration) { + return registration.type; + } + } + return isHookName(ctx, id) ? 'custom' : 'none'; +} + +function getHookCallTypeFromNamespace( + ctx: StateContext, + path: babel.NodePath, + object: t.Identifier, + property: t.Identifier, +): HookCallType { + const binding = path.scope.getBindingIdentifier(object.name); + if (!binding) { + return 'none'; + } + const registrations = ctx.registrations.hooks.namespaces.get(binding); + if (registrations) { + for (let i = 0, len = registrations.length; i < len; i += 1) { + const registration = registrations[i]; + if (registration.kind === 'default') { + if (property.name === 'default') { + return registration.type; + } + } else if (registration.name === property.name) { + return registration.type; + } + } + } + return 'none'; +} + +function getHookCallTypeFromMemberExpression( + ctx: StateContext, + path: babel.NodePath, + member: t.MemberExpression, +): HookCallType { + if (!member.computed && t.isIdentifier(member.property)) { + const obj = unwrapNode(member.object, t.isIdentifier); + if (obj) { + return getHookCallTypeFromNamespace(ctx, path, obj, member.property); + } + return isHookName(ctx, member.property) ? 'custom' : 'none'; + } + return 'none'; +} export function getHookCallType( ctx: StateContext, @@ -21,43 +73,12 @@ export function getHookCallType( } const trueID = unwrapNode(callee.node, t.isIdentifier); if (trueID) { - const binding = path.scope.getBindingIdentifier(trueID.name); - if (binding) { - const registration = ctx.registrations.hooks.identifiers.get(binding); - if (registration) { - return registration.type; - } - } - return isHookName(ctx, trueID) ? 'custom' : 'none'; + return getHookCallTypeFromIdentifier(ctx, path, trueID); } // Check if callee is potentially a namespace import const trueMember = unwrapNode(callee.node, t.isMemberExpression); - if ( - trueMember - && !trueMember.computed - && t.isIdentifier(trueMember.property) - ) { - const obj = unwrapNode(trueMember.object, t.isIdentifier); - if (obj) { - const binding = path.scope.getBindingIdentifier(obj.name); - if (binding) { - const registrations = ctx.registrations.hooks.namespaces.get(binding); - if (registrations) { - let registration: typeof registrations[0]; - for (let i = 0, len = registrations.length; i < len; i += 1) { - registration = registrations[i]; - if (registration.kind === 'default') { - if (trueMember.property.name === 'default') { - return registration.type; - } - } else if (registration.name === trueMember.property.name) { - return registration.type; - } - } - } - } - } - return isHookName(ctx, trueMember.property) ? 'custom' : 'none'; + if (trueMember) { + return getHookCallTypeFromMemberExpression(ctx, path, trueMember); } return 'none'; } diff --git a/packages/forgetti/src/core/get-import-identifier.ts b/packages/forgetti/src/core/get-import-identifier.ts index d684374..8635473 100644 --- a/packages/forgetti/src/core/get-import-identifier.ts +++ b/packages/forgetti/src/core/get-import-identifier.ts @@ -15,9 +15,10 @@ export default function getImportIdentifier( if (current) { return current; } - const newID = (definition.kind === 'named') - ? addNamed(path, definition.name, definition.source) - : addDefault(path, definition.source); + const newID = + definition.kind === 'named' + ? addNamed(path, definition.name, definition.source) + : addDefault(path, definition.source); ctx.imports.set(target, newID); return newID; } diff --git a/packages/forgetti/src/core/inline-expressions.ts b/packages/forgetti/src/core/inline-expressions.ts index 98ed683..91b4a7b 100644 --- a/packages/forgetti/src/core/inline-expressions.ts +++ b/packages/forgetti/src/core/inline-expressions.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ import type * as babel from '@babel/core'; import * as t from '@babel/types'; import type { ComponentNode } from './types'; @@ -9,17 +8,15 @@ function isInValidExpression(path: babel.NodePath): boolean { let prev = path; while (current) { if ( - isPathValid(current, t.isConditionalExpression) - && ( - current.get('consequent').node === prev.node - || current.get('alternate').node === prev.node - ) + isPathValid(current, t.isConditionalExpression) && + (current.get('consequent').node === prev.node || + current.get('alternate').node === prev.node) ) { return false; } if ( - isPathValid(current, t.isLogicalExpression) - && current.get('right').node === prev.node + isPathValid(current, t.isLogicalExpression) && + current.get('right').node === prev.node ) { return false; } @@ -29,37 +26,43 @@ function isInValidExpression(path: babel.NodePath): boolean { return true; } -export function inlineExpressions( - path: babel.NodePath, -): void { - path.traverse({ - Expression(p) { - if (p.getFunctionParent() === path && isPathValid(p, t.isIdentifier)) { - const binding = p.scope.getBinding(p.node.name); - if (binding && binding.referenced && binding.referencePaths.length === 1) { - switch (binding.kind) { - case 'const': - case 'let': - case 'var': { - // move the node to the reference - const ref = binding.referencePaths[0]; - if ( - isInValidExpression(ref) - && isPathValid(binding.path, t.isVariableDeclarator) - && binding.path.node.init - && isPathValid(binding.path.get('id'), t.isIdentifier) - && binding.path.scope.getBlockParent() === ref.scope.getBlockParent() - ) { - ref.replaceWith(binding.path.node.init); - binding.path.remove(); - } - } - break; - default: - break; +function inlineExpression( + parentPath: babel.NodePath, + path: babel.NodePath, +) { + if ( + path.getFunctionParent() === parentPath && + isPathValid(path, t.isIdentifier) + ) { + const binding = path.scope.getBinding(path.node.name); + if (binding?.referenced && binding.referencePaths.length === 1) { + switch (binding.kind) { + case 'const': + case 'let': + case 'var': { + // move the node to the reference + const ref = binding.referencePaths[0]; + if ( + isInValidExpression(ref) && + isPathValid(binding.path, t.isVariableDeclarator) && + binding.path.node.init && + isPathValid(binding.path.get('id'), t.isIdentifier) && + binding.path.scope.getBlockParent() === ref.scope.getBlockParent() + ) { + ref.replaceWith(binding.path.node.init); + binding.path.remove(); } + break; } } + } + } +} + +export function inlineExpressions(path: babel.NodePath): void { + path.traverse({ + Expression(p) { + inlineExpression(path, p); }, }); path.scope.crawl(); diff --git a/packages/forgetti/src/core/is-constant.ts b/packages/forgetti/src/core/is-constant.ts index f308e78..eba4b04 100644 --- a/packages/forgetti/src/core/is-constant.ts +++ b/packages/forgetti/src/core/is-constant.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ -/* eslint-disable @typescript-eslint/no-use-before-define */ import type * as babel from '@babel/core'; import * as t from '@babel/types'; import { isNestedExpression, shouldSkipNode, isPathValid } from './checks'; @@ -76,9 +74,11 @@ function isConditionalExpressionConstant( instance: OptimizerInstance, path: babel.NodePath, ): boolean { - return isConstant(instance, path.get('test')) - && isConstant(instance, path.get('consequent')) - && isConstant(instance, path.get('alternate')); + return ( + isConstant(instance, path.get('test')) && + isConstant(instance, path.get('consequent')) && + isConstant(instance, path.get('alternate')) + ); } function isBinaryExpressionConstant( @@ -87,17 +87,21 @@ function isBinaryExpressionConstant( ): boolean { const left = path.get('left'); const right = path.get('right'); - return isPathValid(left, t.isExpression) - && isConstant(instance, left) - && isConstant(instance, right); + return ( + isPathValid(left, t.isExpression) && + isConstant(instance, left) && + isConstant(instance, right) + ); } function isLogicalExpressionConstant( instance: OptimizerInstance, path: babel.NodePath, ): boolean { - return isConstant(instance, path.get('left')) - && isConstant(instance, path.get('right')); + return ( + isConstant(instance, path.get('left')) && + isConstant(instance, path.get('right')) + ); } function isUnaryExpressionConstant( @@ -120,10 +124,7 @@ function isCallExpressionConstant( const hookType = getHookCallType(instance.ctx, path); if (hookType === 'none') { const callee = path.get('callee'); - if ( - isPathValid(callee, t.isExpression) - && !isConstant(instance, callee) - ) { + if (isPathValid(callee, t.isExpression) && !isConstant(instance, callee)) { return false; } const args = path.get('arguments'); @@ -132,7 +133,10 @@ function isCallExpressionConstant( if (isPathValid(arg, t.isExpression) && !isConstant(instance, arg)) { return false; } - if (isPathValid(arg, t.isSpreadElement) && !isConstant(instance, arg.get('argument'))) { + if ( + isPathValid(arg, t.isSpreadElement) && + !isConstant(instance, arg.get('argument')) + ) { return false; } } @@ -176,6 +180,37 @@ function isArrayExpressionConstant( return true; } +function isObjectPropertyConstant( + instance: OptimizerInstance, + property: babel.NodePath, +): boolean { + if (property.node.computed) { + const key = property.get('key'); + if (isPathValid(key, t.isExpression) && !isConstant(instance, key)) { + return false; + } + } + const value = property.get('value'); + if (isPathValid(value, t.isExpression) && !isConstant(instance, value)) { + return false; + } + return true; +} + +function isObjectMethodConstant( + instance: OptimizerInstance, + property: babel.NodePath, +): boolean { + const bindings = getForeignBindings(property); + for (let k = 0, klen = bindings.length; k < klen; k++) { + const binding = bindings[k]; + if (!isIdentifierConstant(instance, property, binding)) { + return false; + } + } + return true; +} + function isObjectExpressionConstant( instance: OptimizerInstance, path: babel.NodePath, @@ -183,31 +218,23 @@ function isObjectExpressionConstant( const properties = path.get('properties'); for (let i = 0, len = properties.length; i < len; i++) { const property = properties[i]; - if (isPathValid(property, t.isSpreadElement)) { - if (!isConstant(instance, property.get('argument'))) { - return false; - } + if ( + isPathValid(property, t.isSpreadElement) && + !isConstant(instance, property.get('argument')) + ) { + return false; } - if (isPathValid(property, t.isObjectProperty)) { - if (property.node.computed) { - const key = property.get('key'); - if (isPathValid(key, t.isExpression) && !isConstant(instance, key)) { - return false; - } - } - const value = property.get('value'); - if (isPathValid(value, t.isExpression) && !isConstant(instance, value)) { - return false; - } + if ( + isPathValid(property, t.isObjectProperty) && + !isObjectPropertyConstant(instance, property) + ) { + return false; } - if (isPathValid(property, t.isObjectMethod)) { - const bindings = getForeignBindings(property); - for (let k = 0, klen = bindings.length; k < klen; k++) { - const binding = bindings[k]; - if (!isIdentifierConstant(instance, property, binding)) { - return false; - } - } + if ( + isPathValid(property, t.isObjectMethod) && + !isObjectMethodConstant(instance, property) + ) { + return false; } } return true; @@ -225,7 +252,10 @@ function isNewExpressionConstant( if (isPathValid(arg, t.isExpression) && !isConstant(instance, arg)) { return false; } - if (isPathValid(arg, t.isSpreadElement) && !isConstant(instance, arg.get('argument'))) { + if ( + isPathValid(arg, t.isSpreadElement) && + !isConstant(instance, arg.get('argument')) + ) { return false; } } @@ -251,8 +281,18 @@ function isTaggedTemplateExpressionConstant( instance: OptimizerInstance, path: babel.NodePath, ): boolean { - return isConstant(instance, path.get('tag')) - && isConstant(instance, path.get('quasi')); + return ( + isConstant(instance, path.get('tag')) && + isConstant(instance, path.get('quasi')) + ); +} + +function isJSXExpressionContainerConstant( + instance: OptimizerInstance, + child: babel.NodePath, +): boolean { + const expr = child.get('expression'); + return isPathValid(expr, t.isExpression) && isConstant(instance, expr); } function isJSXChildrenConstant( @@ -262,20 +302,29 @@ function isJSXChildrenConstant( const children = path.get('children'); for (let i = 0, len = children.length; i < len; i++) { const child = children[i]; - if (isPathValid(child, t.isJSXElement) && !isJSXElementConstant(instance, child)) { + if ( + isPathValid(child, t.isJSXElement) && + !isJSXElementConstant(instance, child) + ) { return false; } - if (isPathValid(child, t.isJSXFragment) && !isJSXChildrenConstant(instance, child)) { + if ( + isPathValid(child, t.isJSXFragment) && + !isJSXChildrenConstant(instance, child) + ) { return false; } - if (isPathValid(child, t.isJSXSpreadChild) && !isConstant(instance, child.get('expression'))) { + if ( + isPathValid(child, t.isJSXSpreadChild) && + !isConstant(instance, child.get('expression')) + ) { return false; } - if (isPathValid(child, t.isJSXExpressionContainer)) { - const expr = child.get('expression'); - if (isPathValid(expr, t.isExpression) && !isConstant(instance, expr)) { - return false; - } + if ( + isPathValid(child, t.isJSXExpressionContainer) && + !isJSXExpressionContainerConstant(instance, child) + ) { + return false; } } return true; @@ -283,7 +332,9 @@ function isJSXChildrenConstant( function isJSXNameConstant( instance: OptimizerInstance, - path: babel.NodePath, + path: babel.NodePath< + t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName + >, ): boolean { if (isPathValid(path, t.isJSXNamespacedName)) { return true; @@ -299,6 +350,32 @@ function isJSXNameConstant( return true; } +function isJSXAttributeConstant( + instance: OptimizerInstance, + attr: babel.NodePath, +): boolean { + const value = attr.get('value'); + if ( + isPathValid(value, t.isJSXElement) && + !isJSXElementConstant(instance, value) + ) { + return false; + } + if ( + isPathValid(value, t.isJSXFragment) && + !isJSXChildrenConstant(instance, value) + ) { + return false; + } + if (isPathValid(value, t.isJSXExpressionContainer)) { + const expr = value.get('expression'); + if (isPathValid(expr, t.isExpression) && !isConstant(instance, expr)) { + return false; + } + } + return true; +} + function isJSXOpeningElementConstant( instance: OptimizerInstance, path: babel.NodePath, @@ -307,22 +384,16 @@ function isJSXOpeningElementConstant( const attrs = path.get('attributes'); for (let i = 0, len = attrs.length; i < len; i++) { const attr = attrs[i]; - if (isPathValid(attr, t.isJSXAttribute)) { - const value = attr.get('value'); - if (isPathValid(value, t.isJSXElement) && !isJSXElementConstant(instance, value)) { - return false; - } - if (isPathValid(value, t.isJSXFragment) && !isJSXChildrenConstant(instance, value)) { - return false; - } - if (isPathValid(value, t.isJSXExpressionContainer)) { - const expr = value.get('expression'); - if (isPathValid(expr, t.isExpression) && !isConstant(instance, expr)) { - return false; - } - } + if ( + isPathValid(attr, t.isJSXAttribute) && + !isJSXAttributeConstant(instance, attr) + ) { + return false; } - if (isPathValid(attr, t.isJSXSpreadAttribute) && !isConstant(instance, attr.get('argument'))) { + if ( + isPathValid(attr, t.isJSXSpreadAttribute) && + !isConstant(instance, attr.get('argument')) + ) { return false; } } @@ -335,10 +406,13 @@ function isJSXElementConstant( instance: OptimizerInstance, path: babel.NodePath, ): boolean { - return isJSXOpeningElementConstant(instance, path.get('openingElement')) - && isJSXChildrenConstant(instance, path); + return ( + isJSXOpeningElementConstant(instance, path.get('openingElement')) && + isJSXChildrenConstant(instance, path) + ); } +// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: function uncachedIsConstant( instance: OptimizerInstance, path: babel.NodePath, @@ -377,15 +451,21 @@ function uncachedIsConstant( return isCallExpressionConstant(instance, path); } if ( - isPathValid(path, t.isFunctionExpression) - || isPathValid(path, t.isArrowFunctionExpression) + isPathValid(path, t.isFunctionExpression) || + isPathValid(path, t.isArrowFunctionExpression) ) { return isFunctionExpressionConstant(instance, path); } - if (isPathValid(path, t.isArrayExpression) || isPathValid(path, t.isTupleExpression)) { + if ( + isPathValid(path, t.isArrayExpression) || + isPathValid(path, t.isTupleExpression) + ) { return isArrayExpressionConstant(instance, path); } - if (isPathValid(path, t.isObjectExpression) || isPathValid(path, t.isRecordExpression)) { + if ( + isPathValid(path, t.isObjectExpression) || + isPathValid(path, t.isRecordExpression) + ) { return isObjectExpressionConstant(instance, path); } if (isPathValid(path, t.isNewExpression)) { diff --git a/packages/forgetti/src/core/optimize-jsx.ts b/packages/forgetti/src/core/optimize-jsx.ts index 26eb0e1..43eb651 100644 --- a/packages/forgetti/src/core/optimize-jsx.ts +++ b/packages/forgetti/src/core/optimize-jsx.ts @@ -23,7 +23,9 @@ interface State { } function getJSXIdentifier( - el: babel.NodePath, + el: babel.NodePath< + t.JSXIdentifier | t.JSXNamespacedName | t.JSXMemberExpression + >, ): babel.NodePath { if (isPathValid(el, t.isJSXMemberExpression)) { return getJSXIdentifier(el.get('object')); @@ -31,135 +33,173 @@ function getJSXIdentifier( return el as babel.NodePath; } -function extractJSXExpressions( - path: babel.NodePath, +function extractJSXExpressionFromNormalAttribute( state: State, - top: boolean, + attr: babel.NodePath, ): void { - // Iterate attributes - if (isPathValid(path, t.isJSXElement)) { - const openingElement = path.get('openingElement'); - const openingName = openingElement.get('name'); - const trueOpeningName = getJSXIdentifier(openingName); - const isJSXMember = isPathValid(openingName, t.isJSXMemberExpression); - if (isPathValid(trueOpeningName, t.isJSXIdentifier)) { - if (isJSXMember || /^[A-Z_]/.test(trueOpeningName.node.name)) { - const id = path.scope.generateUidIdentifier('Component'); - const index = state.expressions.length; - state.expressions.push(t.identifier(trueOpeningName.node.name)); - state.jsxs.push({ - id, - value: t.memberExpression( - state.source, - t.numericLiteral(index), - true, - ), - }); - const replacement = t.jsxIdentifier(id.name); - trueOpeningName.replaceWith(replacement); + const value = attr.get('value'); + if ( + isPathValid(value, t.isJSXElement) || + isPathValid(value, t.isJSXFragment) + ) { + extractJSXExpressions(value, state, false); + } + if (isPathValid(value, t.isJSXExpressionContainer)) { + const expr = value.get('expression'); + if ( + isPathValid(expr, t.isJSXElement) || + isPathValid(expr, t.isJSXFragment) + ) { + extractJSXExpressions(expr, state, false); + } else if (isPathValid(expr, t.isExpression)) { + const id = state.expressions.length; + state.expressions.push(expr.node); + expr.replaceWith( + t.memberExpression(state.source, t.numericLiteral(id), true), + ); + } + } +} - const closingElement = path.get('closingElement'); - if (isPathValid(closingElement, t.isJSXClosingElement)) { - const closingName = getJSXIdentifier(closingElement.get('name')); - closingName.replaceWith(replacement); - } +function extractJSXExpressionFromAttribute( + state: State, + top: boolean, + attr: babel.NodePath, +): void { + const key = attr.get('name'); + if (top && isPathValid(key, t.isJSXIdentifier) && key.node.name === 'key') { + const value = attr.get('value'); + if (isPathValid(value, t.isExpression)) { + state.key = value.node; + } else if (isPathValid(value, t.isJSXExpressionContainer)) { + const expr = value.get('expression'); + if (isPathValid(expr, t.isExpression)) { + state.key = expr.node; + attr.remove(); } } - const attrs = openingElement.get('attributes'); - for (let i = 0, len = attrs.length; i < len; i++) { - const attr = attrs[i]; + } else { + extractJSXExpressionFromNormalAttribute(state, attr); + } +} - if (isPathValid(attr, t.isJSXAttribute)) { - const key = attr.get('name'); - if (top && isPathValid(key, t.isJSXIdentifier) && key.node.name === 'key') { - const value = attr.get('value'); - if (isPathValid(value, t.isExpression)) { - state.key = value.node; - } else if (isPathValid(value, t.isJSXExpressionContainer)) { - const expr = value.get('expression'); - if (isPathValid(expr, t.isExpression)) { - state.key = expr.node; - attr.remove(); - } - } - } else { - const value = attr.get('value'); - if (isPathValid(value, t.isJSXElement) || isPathValid(value, t.isJSXFragment)) { - extractJSXExpressions(value, state, false); - } - if (isPathValid(value, t.isJSXExpressionContainer)) { - const expr = value.get('expression'); - if (isPathValid(expr, t.isJSXElement) || isPathValid(expr, t.isJSXFragment)) { - extractJSXExpressions(expr, state, false); - } else if (isPathValid(expr, t.isExpression)) { - const id = state.expressions.length; - state.expressions.push(expr.node); - expr.replaceWith( - t.memberExpression( - state.source, - t.numericLiteral(id), - true, - ), - ); - } - } - } +function extractJSXExpressionsFromAttributes( + path: babel.NodePath, + state: State, + top: boolean, +): void { + const openingElement = path.get('openingElement'); + const attrs = openingElement.get('attributes'); + for (let i = 0, len = attrs.length; i < len; i++) { + const attr = attrs[i]; + + if (isPathValid(attr, t.isJSXAttribute)) { + extractJSXExpressionFromAttribute(state, top, attr); + } + if (isPathValid(attr, t.isJSXSpreadAttribute)) { + const arg = attr.get('argument'); + if ( + isPathValid(arg, t.isJSXElement) || + isPathValid(arg, t.isJSXFragment) + ) { + extractJSXExpressions(arg, state, false); + } else { + const id = state.expressions.length; + state.expressions.push(arg.node); + arg.replaceWith( + t.memberExpression(state.source, t.numericLiteral(id), true), + ); } - if (isPathValid(attr, t.isJSXSpreadAttribute)) { - const arg = attr.get('argument'); - if (isPathValid(arg, t.isJSXElement) || isPathValid(arg, t.isJSXFragment)) { - extractJSXExpressions(arg, state, false); - } else { - const id = state.expressions.length; - state.expressions.push(arg.node); - arg.replaceWith( - t.memberExpression( - state.source, - t.numericLiteral(id), - true, - ), - ); - } + } + } +} + +function extractJSXExpressionsFromJSXElement( + path: babel.NodePath, + state: State, + top: boolean, +): void { + const openingElement = path.get('openingElement'); + const openingName = openingElement.get('name'); + const trueOpeningName = getJSXIdentifier(openingName); + const isJSXMember = isPathValid(openingName, t.isJSXMemberExpression); + if (isPathValid(trueOpeningName, t.isJSXIdentifier)) { + if (isJSXMember || /^[A-Z_]/.test(trueOpeningName.node.name)) { + const id = path.scope.generateUidIdentifier('Component'); + const index = state.expressions.length; + state.expressions.push(t.identifier(trueOpeningName.node.name)); + state.jsxs.push({ + id, + value: t.memberExpression(state.source, t.numericLiteral(index), true), + }); + const replacement = t.jsxIdentifier(id.name); + trueOpeningName.replaceWith(replacement); + + const closingElement = path.get('closingElement'); + if (isPathValid(closingElement, t.isJSXClosingElement)) { + const closingName = getJSXIdentifier(closingElement.get('name')); + closingName.replaceWith(replacement); } } } + extractJSXExpressionsFromAttributes(path, state, top); +} + +function extractJSXExpressionsFromJSXExpressionContainer( + state: State, + child: babel.NodePath, +): void { + const expr = child.get('expression'); + if (isPathValid(expr, t.isJSXElement) || isPathValid(expr, t.isJSXFragment)) { + extractJSXExpressions(expr, state, false); + } else if (isPathValid(expr, t.isExpression)) { + const id = state.expressions.length; + state.expressions.push(expr.node); + expr.replaceWith( + t.memberExpression(state.source, t.numericLiteral(id), true), + ); + } +} + +function extractJSXExpressionsFromJSXSpreadChild( + state: State, + child: babel.NodePath, +): void { + const arg = child.get('expression'); + if (isPathValid(arg, t.isJSXElement) || isPathValid(arg, t.isJSXFragment)) { + extractJSXExpressions(arg, state, false); + } else { + const id = state.expressions.length; + state.expressions.push(arg.node); + arg.replaceWith( + t.memberExpression(state.source, t.numericLiteral(id), true), + ); + } +} + +function extractJSXExpressions( + path: babel.NodePath, + state: State, + top: boolean, +): void { + // Iterate attributes + if (isPathValid(path, t.isJSXElement)) { + extractJSXExpressionsFromJSXElement(path, state, top); + } const children = path.get('children'); for (let i = 0, len = children.length; i < len; i++) { const child = children[i]; - if (isPathValid(child, t.isJSXElement) || isPathValid(child, t.isJSXFragment)) { + if ( + isPathValid(child, t.isJSXElement) || + isPathValid(child, t.isJSXFragment) + ) { extractJSXExpressions(child, state, false); } else if (isPathValid(child, t.isJSXExpressionContainer)) { - const expr = child.get('expression'); - if (isPathValid(expr, t.isJSXElement) || isPathValid(expr, t.isJSXFragment)) { - extractJSXExpressions(expr, state, false); - } else if (isPathValid(expr, t.isExpression)) { - const id = state.expressions.length; - state.expressions.push(expr.node); - expr.replaceWith( - t.memberExpression( - state.source, - t.numericLiteral(id), - true, - ), - ); - } + extractJSXExpressionsFromJSXExpressionContainer(state, child); } else if (isPathValid(child, t.isJSXSpreadChild)) { - const arg = child.get('expression'); - if (isPathValid(arg, t.isJSXElement) || isPathValid(arg, t.isJSXFragment)) { - extractJSXExpressions(arg, state, false); - } else { - const id = state.expressions.length; - state.expressions.push(arg.node); - arg.replaceWith( - t.memberExpression( - state.source, - t.numericLiteral(id), - true, - ), - ); - } + extractJSXExpressionsFromJSXSpreadChild(state, child); } } } @@ -185,10 +225,9 @@ function transformJSX( if (state.jsxs.length) { const declarations: t.VariableDeclarator[] = []; for (let i = 0, len = state.jsxs.length; i < len; i++) { - declarations.push(t.variableDeclarator( - state.jsxs[i].id, - state.jsxs[i].value, - )); + declarations.push( + t.variableDeclarator(state.jsxs[i].id, state.jsxs[i].value), + ); } body = t.blockStatement([ t.variableDeclaration('const', declarations), @@ -200,24 +239,10 @@ function transformJSX( path.scope.getProgramParent().push({ kind: 'const', id: memoComponent, - init: t.callExpression( - getImportIdentifier( - ctx, - path, - RUNTIME_MEMO, - ), - [ - getImportIdentifier( - ctx, - path, - memoDefinition, - ), - t.arrowFunctionExpression( - [state.source], - body, - ), - ], - ), + init: t.callExpression(getImportIdentifier(ctx, path, RUNTIME_MEMO), [ + getImportIdentifier(ctx, path, memoDefinition), + t.arrowFunctionExpression([state.source], body), + ]), }); const attrs = []; @@ -226,9 +251,7 @@ function transformJSX( attrs.push( t.jsxAttribute( t.jsxIdentifier('key'), - t.jsxExpressionContainer( - state.key, - ), + t.jsxExpressionContainer(state.key), ), ); } @@ -236,23 +259,15 @@ function transformJSX( attrs.push( t.jsxAttribute( t.jsxIdentifier('v'), - t.jsxExpressionContainer( - t.arrayExpression(state.expressions), - ), + t.jsxExpressionContainer(t.arrayExpression(state.expressions)), ), ); path.replaceWith( t.addComment( t.jsxElement( - t.jsxOpeningElement( - t.jsxIdentifier(memoComponent.name), - attrs, - true, - ), - t.jsxClosingElement( - t.jsxIdentifier(memoComponent.name), - ), + t.jsxOpeningElement(t.jsxIdentifier(memoComponent.name), attrs, true), + t.jsxClosingElement(t.jsxIdentifier(memoComponent.name)), [], true, ), diff --git a/packages/forgetti/src/core/optimizer-scope.ts b/packages/forgetti/src/core/optimizer-scope.ts index 2a8e50a..6d0c09a 100644 --- a/packages/forgetti/src/core/optimizer-scope.ts +++ b/packages/forgetti/src/core/optimizer-scope.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-this-alias */ +import * as babel from '@babel/core'; import * as t from '@babel/types'; import type { OptimizedExpression, StateContext } from './types'; import getImportIdentifier from './get-import-identifier'; @@ -80,86 +80,73 @@ export default class OptimizerScope { } getMemoDeclarations(): t.VariableDeclaration[] | undefined { - if (!this.memo && !this.ref) { - return undefined; - } - // This is for generating branched caching. - // Parent means that we want to create the cache - // from the parent (or root) - if (this.parent) { - const header = this.parent.createHeader(); - const index = this.parent.createIndex('memo'); - - return [ - t.variableDeclaration('let', [ - t.variableDeclarator( - this.createHeader(), - t.callExpression( - getImportIdentifier( - this.ctx, - this.path, - RUNTIME_BRANCH, + if (this.memo || this.ref) { + // This is for generating branched caching. + // Parent means that we want to create the cache + // from the parent (or root) + if (this.parent) { + const header = this.parent.createHeader(); + const index = this.parent.createIndex('memo'); + + return [ + t.variableDeclaration('let', [ + t.variableDeclarator( + this.createHeader(), + t.callExpression( + getImportIdentifier(this.ctx, this.path, RUNTIME_BRANCH), + [header, index, t.numericLiteral(this.indecesMemo)], ), - [header, index, t.numericLiteral(this.indecesMemo)], ), - ), - ]), - ]; - } - - const outputDeclarations = []; - - if (this.memo) { - outputDeclarations.push( + ]), + ]; + } - t.variableDeclaration('let', [ - t.variableDeclarator( - this.memo, - t.callExpression( - getImportIdentifier( - this.ctx, - this.path, - RUNTIME_CACHE, + const outputDeclarations = []; + + if (this.memo) { + outputDeclarations.push( + t.variableDeclaration('let', [ + t.variableDeclarator( + this.memo, + t.callExpression( + getImportIdentifier(this.ctx, this.path, RUNTIME_CACHE), + [ + getImportIdentifier( + this.ctx, + this.path, + this.ctx.preset.runtime.useMemo, + ), + t.numericLiteral(this.indecesMemo), + ], ), - [ - getImportIdentifier( - this.ctx, - this.path, - this.ctx.preset.runtime.useMemo, - ), - t.numericLiteral(this.indecesMemo), - ], ), - ), - ]), - ); - } - if (this.ref) { - outputDeclarations.push( - t.variableDeclaration('let', [ - t.variableDeclarator( - this.ref, - t.callExpression( - getImportIdentifier( - this.ctx, - this.path, - RUNTIME_REF, + ]), + ); + } + if (this.ref) { + outputDeclarations.push( + t.variableDeclaration('let', [ + t.variableDeclarator( + this.ref, + t.callExpression( + getImportIdentifier(this.ctx, this.path, RUNTIME_REF), + [ + getImportIdentifier( + this.ctx, + this.path, + this.ctx.preset.runtime.useRef, + ), + t.numericLiteral(this.indecesRef), + ], ), - [ - getImportIdentifier( - this.ctx, - this.path, - this.ctx.preset.runtime.useRef, - ), - t.numericLiteral(this.indecesRef), - ], ), - ), - ]), - ); - } + ]), + ); + } - return outputDeclarations; + return outputDeclarations; + } + return undefined; } loop: t.Identifier | undefined; @@ -192,11 +179,7 @@ export default class OptimizerScope { t.variableDeclarator( this.createHeader(), t.callExpression( - getImportIdentifier( - this.ctx, - this.path, - RUNTIME_BRANCH, - ), + getImportIdentifier(this.ctx, this.path, RUNTIME_BRANCH), // Looped branches cannot be statically analyzed [header, index, t.numericLiteral(0)], ), @@ -215,11 +198,7 @@ export default class OptimizerScope { t.variableDeclarator( this.createLoopHeader(), t.callExpression( - getImportIdentifier( - this.ctx, - this.path, - RUNTIME_BRANCH, - ), + getImportIdentifier(this.ctx, this.path, RUNTIME_BRANCH), [header, localIndex, t.numericLiteral(this.indecesMemo)], ), ), @@ -232,10 +211,7 @@ export default class OptimizerScope { ? [this.getLoopDeclaration()] : this.getMemoDeclarations(); if (header) { - return mergeVariableDeclaration([ - ...header, - ...result, - ]); + return mergeVariableDeclaration([...header, ...result]); } return mergeVariableDeclaration(result); } diff --git a/packages/forgetti/src/core/optimizer.ts b/packages/forgetti/src/core/optimizer.ts index cfa27cf..577f98d 100644 --- a/packages/forgetti/src/core/optimizer.ts +++ b/packages/forgetti/src/core/optimizer.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ import type * as babel from '@babel/core'; import * as t from '@babel/types'; import { isNestedExpression, shouldSkipNode, isPathValid } from './checks'; @@ -70,6 +69,7 @@ export default class Optimizer { * used as a dependency and so it must be compared to its memoized * version. */ + // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: createMemo( current: t.Expression, dependencies?: t.Expression | (t.Expression | undefined)[] | boolean, @@ -84,11 +84,9 @@ export default class Optimizer { } } // Creates the cache header - const header = ( - this.scope.isInLoop - ? this.scope.createLoopHeader() - : this.scope.createHeader(type) - ); + const header = this.scope.isInLoop + ? this.scope.createLoopHeader() + : this.scope.createHeader(type); // Get the memo index const index = this.scope.createIndex(type); // Generate the access expression @@ -158,10 +156,7 @@ export default class Optimizer { declaration.push(t.variableDeclarator(eqid, condition)); } - const optimized = optimizedExpr( - vid, - condition == null ? [] : eqid, - ); + const optimized = optimizedExpr(vid, condition == null ? [] : eqid); // Register as a constant if (condition == null) { this.scope.addConstant(vid); @@ -204,7 +199,10 @@ export default class Optimizer { // If the expression is an identifier // and potentially optimized as a constant // then just return it - if (optimized.expr.type === 'Identifier' && this.scope.hasConstant(optimized.expr)) { + if ( + optimized.expr.type === 'Identifier' && + this.scope.hasConstant(optimized.expr) + ) { return optimized; } // If the node itself is a "dependency" @@ -240,15 +238,14 @@ export default class Optimizer { return optimizedExpr(id, [], true); } - optimizeIdentifier( - path: babel.NodePath, - ): OptimizedExpression { + optimizeIdentifier(path: babel.NodePath): OptimizedExpression { return this.memoizeIdentifier(path, path.node); } - memoizeMemberExpression( - path: babel.NodePath, - ): { expr: t.MemberExpression; deps: t.Expression[] } { + memoizeMemberExpression(path: babel.NodePath): { + expr: t.MemberExpression; + deps: t.Expression[]; + } { if (isConstant(this, path)) { return { expr: path.node, @@ -319,10 +316,7 @@ export default class Optimizer { ), ); this.scope.push( - t.variableDeclaration( - 'let', - [t.variableDeclarator(id)], - ), + t.variableDeclaration('let', [t.variableDeclarator(id)]), t.ifStatement( optimizedTest.expr, t.blockStatement(consequent.getStatements()), @@ -372,31 +366,25 @@ export default class Optimizer { let test: t.Expression = id; switch (path.node.operator) { - case '??': + case '??': { test = t.binaryExpression('==', id, t.nullLiteral()); break; - case '||': + } + case '||': { test = t.unaryExpression('!', id); break; + } default: break; } rightScope.push( - t.expressionStatement( - t.assignmentExpression('=', id, right.expr), - ), + t.expressionStatement(t.assignmentExpression('=', id, right.expr)), ); this.scope.push( - t.variableDeclaration( - 'let', - [t.variableDeclarator(id, left.expr)], - ), - t.ifStatement( - test, - t.blockStatement(rightScope.getStatements()), - ), + t.variableDeclaration('let', [t.variableDeclarator(id, left.expr)]), + t.ifStatement(test, t.blockStatement(rightScope.getStatements())), ); return optimizedExpr(id); } @@ -412,9 +400,7 @@ export default class Optimizer { return optimizedExpr(path.node); } - optimizeEffect( - path: babel.NodePath, - ): OptimizedExpression { + optimizeEffect(path: babel.NodePath): OptimizedExpression { const [callback, dependencies] = path.get('arguments'); if (isPathValid(callback, t.isExpression)) { if (dependencies && isPathValid(dependencies, t.isExpression)) { @@ -446,37 +432,41 @@ export default class Optimizer { return optimizedExpr(path.node); } - optimizeMemo( - path: babel.NodePath, - ): OptimizedExpression { + optimizeMemo(path: babel.NodePath): OptimizedExpression { const [callback, dependencies] = path.get('arguments'); if (isPathValid(callback, t.isExpression)) { if (dependencies && isPathValid(dependencies, t.isExpression)) { const dependency = this.optimizeExpression(dependencies); - return this.createMemo(t.callExpression(callback.node, []), dependency.deps); + return this.createMemo( + t.callExpression(callback.node, []), + dependency.deps, + ); } const optimized = this.optimizeExpression(callback); - return this.createMemo(t.callExpression(optimized.expr, []), optimized.deps); + return this.createMemo( + t.callExpression(optimized.expr, []), + optimized.deps, + ); } return optimizedExpr(path.node); } - optimizeRef( - path: babel.NodePath, - ): OptimizedExpression { + optimizeRef(path: babel.NodePath): OptimizedExpression { const arg = path.node.arguments[0]; let init: t.Expression | undefined; if (arg) { switch (arg.type) { - case 'SpreadElement': + case 'SpreadElement': { init = t.memberExpression(arg.argument, t.numericLiteral(0), true); break; + } case 'ArgumentPlaceholder': case 'JSXNamespacedName': break; - default: + default: { init = arg; break; + } } } const expr = t.objectExpression([ @@ -488,6 +478,68 @@ export default class Optimizer { return this.createMemo(expr, true, 'ref'); } + optimizeHookCallee( + path: babel.NodePath, + condition: t.Expression[], + ): void { + const callee = path.get('callee'); + if (isPathValid(callee, t.isExpression)) { + const optimizedCallee = isPathValid(callee, t.isMemberExpression) + ? this.memoizeMemberExpression(callee) + : this.createDependency(callee); + if (optimizedCallee) { + path.node.callee = optimizedCallee.expr; + mergeDependencies(condition, optimizedCallee.deps); + } + } + } + + optimizeSpreadElement( + element: babel.NodePath, + condition: t.Expression[], + ): void { + const optimized = this.createDependency(element.get('argument')); + if (optimized) { + mergeDependencies(condition, optimized.deps); + element.node.argument = optimized.expr; + } + } + + optimizeHookArguments( + path: babel.NodePath, + condition: t.Expression[], + ): void { + const argumentsPath = path.get('arguments'); + for (let i = 0, len = argumentsPath.length; i < len; i++) { + const argument = argumentsPath[i]; + if (isPathValid(argument, t.isExpression)) { + const optimized = this.createDependency(argument); + if (optimized) { + mergeDependencies(condition, optimized.deps); + path.node.arguments[i] = optimized.expr; + } + } else if (isPathValid(argument, t.isSpreadElement)) { + this.optimizeSpreadElement(argument, condition); + } + } + } + + optimizeCustomHookCall( + path: babel.NodePath, + hookType: 'custom' | 'none', + ): OptimizedExpression { + // Build dependencies + const condition = createDependencies(); + if (hookType === 'none') { + this.optimizeHookCallee(path, condition); + } + this.optimizeHookArguments(path, condition); + if (hookType === 'custom') { + return optimizedExpr(path.node, condition); + } + return this.createMemo(path.node, condition); + } + optimizeCallExpression( path: babel.NodePath, ): OptimizedExpression { @@ -502,46 +554,8 @@ export default class Optimizer { case 'ref': return this.optimizeRef(path); case 'custom': - case 'none': { - // Build dependencies - const condition = createDependencies(); - if (hookType === 'none') { - const callee = path.get('callee'); - if (isPathValid(callee, t.isExpression)) { - const optimizedCallee = ( - (isPathValid(callee, t.isMemberExpression)) - ? this.memoizeMemberExpression(callee) - : this.createDependency(callee) - ); - if (optimizedCallee) { - path.node.callee = optimizedCallee.expr; - mergeDependencies(condition, optimizedCallee.deps); - } - } - } - const argumentsPath = path.get('arguments'); - let argument: typeof argumentsPath[0]; - for (let i = 0, len = argumentsPath.length; i < len; i++) { - argument = argumentsPath[i]; - if (isPathValid(argument, t.isExpression)) { - const optimized = this.createDependency(argument); - if (optimized) { - mergeDependencies(condition, optimized.deps); - path.node.arguments[i] = optimized.expr; - } - } else if (isPathValid(argument, t.isSpreadElement)) { - const optimized = this.createDependency(argument.get('argument')); - if (optimized) { - mergeDependencies(condition, optimized.deps); - argument.node.argument = optimized.expr; - } - } - } - if (hookType === 'custom') { - return optimizedExpr(path.node, condition); - } - return this.createMemo(path.node, condition); - } + case 'none': + return this.optimizeCustomHookCall(path, hookType); default: return optimizedExpr(path.node); } @@ -620,14 +634,36 @@ export default class Optimizer { path.node.elements[i] = optimized.expr; } } else if (isPathValid(element, t.isSpreadElement)) { - const optimized = this.createDependency(element.get('argument')); + this.optimizeSpreadElement(element, condition); + } + } + return this.createMemo(path.node, condition); + } + + optimizeObjectProperty( + element: babel.NodePath, + condition: t.Expression[], + ): void { + if (element.node.computed) { + const keyPath = element.get('key'); + + if (isPathValid(keyPath, t.isExpression)) { + const optimized = this.createDependency(keyPath); if (optimized) { mergeDependencies(condition, optimized.deps); - element.node.argument = optimized.expr; + element.node.key = optimized.expr; } } } - return this.createMemo(path.node, condition); + const valuePath = element.get('value'); + + if (isPathValid(valuePath, t.isExpression)) { + const optimized = this.createDependency(valuePath); + if (optimized) { + mergeDependencies(condition, optimized.deps); + element.node.value = optimized.expr; + } + } } optimizeObjectExpression( @@ -639,32 +675,9 @@ export default class Optimizer { for (let i = 0, len = elementsPath.length; i < len; i++) { const element = elementsPath[i]; if (isPathValid(element, t.isObjectProperty)) { - if (element.node.computed) { - const keyPath = element.get('key'); - - if (isPathValid(keyPath, t.isExpression)) { - const optimized = this.createDependency(keyPath); - if (optimized) { - mergeDependencies(condition, optimized.deps); - element.node.key = optimized.expr; - } - } - } - const valuePath = element.get('value'); - - if (isPathValid(valuePath, t.isExpression)) { - const optimized = this.createDependency(valuePath); - if (optimized) { - mergeDependencies(condition, optimized.deps); - element.node.value = optimized.expr; - } - } + this.optimizeObjectProperty(element, condition); } else if (isPathValid(element, t.isSpreadElement)) { - const optimized = this.createDependency(element.get('argument')); - if (optimized) { - mergeDependencies(condition, optimized.deps); - element.node.argument = optimized.expr; - } + this.optimizeSpreadElement(element, condition); } else if (isPathValid(element, t.isObjectMethod)) { const bindings = getForeignBindings(path); const dependencies = createDependencies(); @@ -694,7 +707,7 @@ export default class Optimizer { mergeDependencies(condition, callee.deps); } const argumentsPath = path.get('arguments'); - let argument: typeof argumentsPath[0]; + let argument: (typeof argumentsPath)[0]; for (let i = 0, len = argumentsPath.length; i < len; i++) { argument = argumentsPath[i]; if (isPathValid(argument, t.isExpression)) { @@ -704,11 +717,7 @@ export default class Optimizer { path.node.arguments[i] = optimized.expr; } } else if (isPathValid(argument, t.isSpreadElement)) { - const optimized = this.createDependency(argument.get('argument')); - if (optimized) { - mergeDependencies(condition, optimized.deps); - argument.node.argument = optimized.expr; - } + this.optimizeSpreadElement(argument, condition); } } return this.createMemo(path.node, condition); @@ -720,7 +729,7 @@ export default class Optimizer { path: babel.NodePath, ): OptimizedExpression { const expressions = path.get('expressions'); - let expr: typeof expressions[0]; + let expr: (typeof expressions)[0]; for (let i = 0, len = expressions.length; i < len; i++) { expr = expressions[i]; const result = this.optimizeExpression(expr); @@ -729,12 +738,13 @@ export default class Optimizer { return optimizedExpr(path.node); } - memoizeTemplateLiteral( - path: babel.NodePath, - ): { expr: t.TemplateLiteral; deps: t.Expression[] } { + memoizeTemplateLiteral(path: babel.NodePath): { + expr: t.TemplateLiteral; + deps: t.Expression[]; + } { const conditions = createDependencies(); const expressions = path.get('expressions'); - let expr: typeof expressions[0]; + let expr: (typeof expressions)[0]; for (let i = 0, len = expressions.length; i < len; i++) { expr = expressions[i]; if (isPathValid(expr, t.isExpression)) { @@ -774,14 +784,38 @@ export default class Optimizer { return this.createMemo(path.node, conditions); } + memoizeJSXExpressionContainer( + child: babel.NodePath, + conditions: t.Expression[], + ): void { + const expr = child.get('expression'); + if (isPathValid(expr, t.isExpression)) { + const optimized = this.createDependency(expr); + if (optimized) { + child.node.expression = optimized.expr; + mergeDependencies(conditions, optimized.deps); + } + } + } + + memoizeJSXSpreadChild( + child: babel.NodePath, + conditions: t.Expression[], + ): void { + const optimized = this.createDependency(child.get('expression')); + if (optimized) { + child.node.expression = optimized.expr; + mergeDependencies(conditions, optimized.deps); + } + } + memoizeJSXChildren( path: babel.NodePath, ): t.Expression[] { const conditions = createDependencies(); const children = path.get('children'); - let child: typeof children[0]; for (let i = 0, len = children.length; i < len; i++) { - child = children[i]; + const child = children[i]; if (isPathValid(child, t.isJSXFragment)) { const optimized = this.createDependency(child); if (optimized) { @@ -795,20 +829,9 @@ export default class Optimizer { mergeDependencies(conditions, optimized.deps); } } else if (isPathValid(child, t.isJSXExpressionContainer)) { - const expr = child.get('expression'); - if (isPathValid(expr, t.isExpression)) { - const optimized = this.createDependency(expr); - if (optimized) { - child.node.expression = optimized.expr; - mergeDependencies(conditions, optimized.deps); - } - } + this.memoizeJSXExpressionContainer(child, conditions); } else if (isPathValid(child, t.isJSXSpreadChild)) { - const optimized = this.createDependency(child.get('expression')); - if (optimized) { - child.node.expression = optimized.expr; - mergeDependencies(conditions, optimized.deps); - } + this.memoizeJSXSpreadChild(child, conditions); } } @@ -825,49 +848,55 @@ export default class Optimizer { return optimizedExpr(path.node); } - optimizeJSXElement( - path: babel.NodePath, - ): OptimizedExpression { - if (this.ctx.preset.runtime.memo) { - const dependencies = createDependencies(); - const attributes = path.get('openingElement').get('attributes'); - let attribute: typeof attributes[0]; - for (let i = 0, len = attributes.length; i < len; i++) { - attribute = attributes[i]; - if (isPathValid(attribute, t.isJSXAttribute)) { - const value = attribute.get('value'); - if (value) { - if (isPathValid(value, t.isJSXFragment)) { - const optimized = this.createDependency(value); - if (optimized) { - attribute.node.value = t.jsxExpressionContainer(optimized.expr); - mergeDependencies(dependencies, optimized.deps); - } - } else if (isPathValid(value, t.isJSXElement)) { - const optimized = this.createDependency(value); - if (optimized) { - attribute.node.value = t.jsxExpressionContainer(optimized.expr); - mergeDependencies(dependencies, optimized.deps); - } - } else if (isPathValid(value, t.isJSXExpressionContainer)) { - const expr = value.get('expression'); - if (isPathValid(expr, t.isExpression)) { - const optimized = this.createDependency(expr); - if (optimized) { - value.node.expression = optimized.expr; - mergeDependencies(dependencies, optimized.deps); - } - } - } - } - } else if (isPathValid(attribute, t.isJSXSpreadAttribute)) { - const optimized = this.createDependency(attribute.get('argument')); - if (optimized) { - attribute.node.argument = optimized.expr; - mergeDependencies(dependencies, optimized.deps); - } + optimizeJSXAttribute( + attribute: babel.NodePath, + dependencies: t.Expression[], + ): void { + const value = attribute.get('value'); + if (value) { + if (isPathValid(value, t.isJSXFragment)) { + const optimized = this.createDependency(value); + if (optimized) { + attribute.node.value = t.jsxExpressionContainer(optimized.expr); + mergeDependencies(dependencies, optimized.deps); + } + } else if (isPathValid(value, t.isJSXElement)) { + const optimized = this.createDependency(value); + if (optimized) { + attribute.node.value = t.jsxExpressionContainer(optimized.expr); + mergeDependencies(dependencies, optimized.deps); } + } else if (isPathValid(value, t.isJSXExpressionContainer)) { + this.memoizeJSXExpressionContainer(value, dependencies); } + } + } + + optimizeJSXAttributes( + attributes: babel.NodePath< + babel.types.JSXAttribute | babel.types.JSXSpreadAttribute + >[], + ): t.Expression[] { + const dependencies = createDependencies(); + for (let i = 0, len = attributes.length; i < len; i++) { + const attribute = attributes[i]; + if (isPathValid(attribute, t.isJSXAttribute)) { + this.optimizeJSXAttribute(attribute, dependencies); + } else if (isPathValid(attribute, t.isJSXSpreadAttribute)) { + const optimized = this.createDependency(attribute.get('argument')); + if (optimized) { + attribute.node.argument = optimized.expr; + mergeDependencies(dependencies, optimized.deps); + } + } + } + return dependencies; + } + + optimizeJSXElement(path: babel.NodePath): OptimizedExpression { + if (this.ctx.preset.runtime.memo) { + const attributes = path.get('openingElement').get('attributes'); + const dependencies = this.optimizeJSXAttributes(attributes); if (path.node.children.length) { mergeDependencies(dependencies, this.memoizeJSXChildren(path)); } @@ -876,9 +905,8 @@ export default class Optimizer { return optimizedExpr(path.node); } - optimizeExpression( - path: babel.NodePath, - ): OptimizedExpression { + // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: + optimizeExpression(path: babel.NodePath): OptimizedExpression { if (shouldSkipNode(path.node)) { return optimizedExpr(path.node, undefined, true); } @@ -915,18 +943,24 @@ export default class Optimizer { return this.optimizeCallExpression(path); } if ( - isPathValid(path, t.isFunctionExpression) - || isPathValid(path, t.isArrowFunctionExpression) + isPathValid(path, t.isFunctionExpression) || + isPathValid(path, t.isArrowFunctionExpression) ) { return this.optimizeFunctionExpression(path); } if (isPathValid(path, t.isAssignmentExpression)) { return this.optimizeAssignmentExpression(path); } - if (isPathValid(path, t.isArrayExpression) || isPathValid(path, t.isTupleExpression)) { + if ( + isPathValid(path, t.isArrayExpression) || + isPathValid(path, t.isTupleExpression) + ) { return this.optimizeArrayExpression(path); } - if (isPathValid(path, t.isObjectExpression) || isPathValid(path, t.isRecordExpression)) { + if ( + isPathValid(path, t.isObjectExpression) || + isPathValid(path, t.isRecordExpression) + ) { return this.optimizeObjectExpression(path); } if (isPathValid(path, t.isNewExpression)) { @@ -961,49 +995,39 @@ export default class Optimizer { path: babel.NodePath, ): void { const declarations = path.get('declarations'); - let declaration: typeof declarations[0]; + let declaration: (typeof declarations)[0]; for (let i = 0, len = declarations.length; i < len; i++) { declaration = declarations[i]; const init = declaration.node.init ? this.optimizeExpression( - declaration.get('init') as babel.NodePath, - ).expr + declaration.get('init') as babel.NodePath, + ).expr : undefined; this.scope.push( - t.variableDeclaration( - path.node.kind, - [ - t.variableDeclarator( - declaration.node.id, - init, - ), - ], - ), + t.variableDeclaration(path.node.kind, [ + t.variableDeclarator(declaration.node.id, init), + ]), ); } } - optimizeReturnStatement( - path: babel.NodePath, - ): void { + optimizeReturnStatement(path: babel.NodePath): void { if (path.node.argument) { - const optimized = this.optimizeExpression(path.get('argument') as babel.NodePath); + const optimized = this.optimizeExpression( + path.get('argument') as babel.NodePath, + ); path.node.argument = optimized.expr; } this.scope.push(path.node); } - optimizeThrowStatement( - path: babel.NodePath, - ): void { + optimizeThrowStatement(path: babel.NodePath): void { const optimized = this.optimizeExpression(path.get('argument')); path.node.argument = optimized.expr; this.scope.push(path.node); } - private optimizeBlock( - path: babel.NodePath, - ): void { + private optimizeBlock(path: babel.NodePath): void { if (shouldSkipNode(path.node)) { return; } @@ -1029,9 +1053,7 @@ export default class Optimizer { } } - optimizeIfStatement( - path: babel.NodePath, - ): void { + optimizeIfStatement(path: babel.NodePath): void { const optimized = this.optimizeExpression(path.get('test')); const parent = this.scope; const consequentPath = path.get('consequent'); @@ -1039,9 +1061,14 @@ export default class Optimizer { this.scope = consequent; this.optimizeStatement(consequentPath, true); this.scope = parent; - const newNode = t.ifStatement(optimized.expr, t.blockStatement(consequent.getStatements())); + const newNode = t.ifStatement( + optimized.expr, + t.blockStatement(consequent.getStatements()), + ); if (path.node.alternate) { - const alternatePath = path.get('alternate') as babel.NodePath; + const alternatePath = path.get( + 'alternate', + ) as babel.NodePath; const alternate = new OptimizerScope(this.ctx, alternatePath, parent); this.scope = alternate; this.optimizeStatement(alternatePath, true); @@ -1051,9 +1078,7 @@ export default class Optimizer { this.scope.push(newNode); } - optimizeLoopStatement( - path: babel.NodePath, - ): void { + optimizeLoopStatement(path: babel.NodePath): void { const parent = this.scope; const loop = new OptimizerScope(this.ctx, path, parent, true); this.scope = loop; @@ -1071,23 +1096,19 @@ export default class Optimizer { this.scope.push(path.node); } - optimizeForXStatement( - path: babel.NodePath, - ): void { + optimizeForXStatement(path: babel.NodePath): void { const optimized = this.optimizeExpression(path.get('right')); path.node.right = optimized.expr; this.optimizeLoopStatement(path); } - optimizeSwitchStatement( - path: babel.NodePath, - ): void { + optimizeSwitchStatement(path: babel.NodePath): void { const discriminant = this.optimizeExpression(path.get('discriminant')); path.node.discriminant = discriminant.expr; const parent = this.scope; const cases = path.get('cases'); - let current: typeof cases[0]; + let current: (typeof cases)[0]; for (let i = 0, len = cases.length; i < len; i++) { current = cases[i]; const scope = new OptimizerScope(parent.ctx, current, parent); @@ -1104,9 +1125,7 @@ export default class Optimizer { this.scope.push(path.node); } - optimizeTryStatement( - path: babel.NodePath, - ): void { + optimizeTryStatement(path: babel.NodePath): void { const parent = this.scope; const tryBlock = new OptimizerScope(this.ctx, path, parent); this.scope = tryBlock; @@ -1134,9 +1153,7 @@ export default class Optimizer { this.scope.push(path.node); } - optimizeLabeledStatement( - path: babel.NodePath, - ): void { + optimizeLabeledStatement(path: babel.NodePath): void { const parent = this.scope; const block = new OptimizerScope(this.ctx, path, parent); this.scope = block; @@ -1146,65 +1163,80 @@ export default class Optimizer { this.scope.push(path.node); } - optimizeStatement( - path: babel.NodePath, - topBlock = false, - ): void { + optimizeStatement(path: babel.NodePath, topBlock = false): void { if (shouldSkipNode(path.node)) { return; } switch (path.type) { - case 'ExpressionStatement': - this.optimizeExpressionStatement(path as babel.NodePath); + case 'ExpressionStatement': { + this.optimizeExpressionStatement( + path as babel.NodePath, + ); break; - case 'VariableDeclaration': - this.optimizeVariableDeclaration(path as babel.NodePath); + } + case 'VariableDeclaration': { + this.optimizeVariableDeclaration( + path as babel.NodePath, + ); break; - case 'ReturnStatement': + } + case 'ReturnStatement': { this.optimizeReturnStatement(path as babel.NodePath); break; - case 'ThrowStatement': + } + case 'ThrowStatement': { this.optimizeThrowStatement(path as babel.NodePath); break; - case 'BlockStatement': - this.optimizeBlockStatement(path as babel.NodePath, topBlock); + } + case 'BlockStatement': { + this.optimizeBlockStatement( + path as babel.NodePath, + topBlock, + ); break; - case 'IfStatement': + } + case 'IfStatement': { this.optimizeIfStatement(path as babel.NodePath); break; + } case 'ForInStatement': - case 'ForOfStatement': + case 'ForOfStatement': { this.optimizeForXStatement(path as babel.NodePath); break; + } case 'ForStatement': case 'WhileStatement': - case 'DoWhileStatement': + case 'DoWhileStatement': { this.optimizeLoopStatement(path as babel.NodePath); break; - case 'SwitchStatement': + } + case 'SwitchStatement': { this.optimizeSwitchStatement(path as babel.NodePath); break; - case 'TryStatement': + } + case 'TryStatement': { this.optimizeTryStatement(path as babel.NodePath); break; - case 'LabeledStatement': - this.optimizeLabeledStatement(path as babel.NodePath); + } + case 'LabeledStatement': { + this.optimizeLabeledStatement( + path as babel.NodePath, + ); break; - default: + } + default: { this.scope.push(path.node); break; + } } } - // eslint-disable-next-line class-methods-use-this optimizeArrowComponent( path: babel.NodePath, ): void { path.node.body = t.isStatement(path.node.body) ? path.node.body - : t.blockStatement([ - t.returnStatement(path.node.body), - ]); + : t.blockStatement([t.returnStatement(path.node.body)]); this.optimizeBlock(path.get('body') as babel.NodePath); path.node.body = t.blockStatement(this.scope.getStatements()); path.scope.crawl(); @@ -1220,15 +1252,21 @@ export default class Optimizer { optimize(): void { switch (this.path.type) { - case 'ArrowFunctionExpression': - this.optimizeArrowComponent(this.path as babel.NodePath); + case 'ArrowFunctionExpression': { + this.optimizeArrowComponent( + this.path as babel.NodePath, + ); break; + } case 'FunctionDeclaration': - case 'FunctionExpression': + case 'FunctionExpression': { this.optimizeFunctionComponent( - this.path as babel.NodePath, + this.path as babel.NodePath< + t.FunctionExpression | t.FunctionDeclaration + >, ); break; + } default: break; } diff --git a/packages/forgetti/src/core/presets.ts b/packages/forgetti/src/core/presets.ts index b7023bb..f959279 100644 --- a/packages/forgetti/src/core/presets.ts +++ b/packages/forgetti/src/core/presets.ts @@ -1,8 +1,4 @@ -export type HookIdentity = - | 'memo' - | 'callback' - | 'effect' - | 'ref'; +export type HookIdentity = 'memo' | 'callback' | 'effect' | 'ref'; export interface NamedImportDefinition { kind: 'named'; diff --git a/packages/forgetti/src/core/simplify-expressions.ts b/packages/forgetti/src/core/simplify-expressions.ts index 5616d2e..2957328 100644 --- a/packages/forgetti/src/core/simplify-expressions.ts +++ b/packages/forgetti/src/core/simplify-expressions.ts @@ -64,15 +64,24 @@ export function simplifyExpressions(path: babel.NodePath): void { LogicalExpression: { exit(p) { switch (getBooleanishState(p.node.left)) { - case 'nullish': - p.replaceWith(p.node.operator === '??' ? p.node.right : p.node.left); + case 'nullish': { + p.replaceWith( + p.node.operator === '??' ? p.node.right : p.node.left, + ); break; - case 'falsy': - p.replaceWith(p.node.operator === '||' ? p.node.right : p.node.left); + } + case 'falsy': { + p.replaceWith( + p.node.operator === '||' ? p.node.right : p.node.left, + ); break; - case 'truthy': - p.replaceWith(p.node.operator === '&&' ? p.node.right : p.node.left); + } + case 'truthy': { + p.replaceWith( + p.node.operator === '&&' ? p.node.right : p.node.left, + ); break; + } default: break; } @@ -82,18 +91,20 @@ export function simplifyExpressions(path: babel.NodePath): void { exit(p) { const state = getBooleanishState(p.node.argument); switch (p.node.operator) { - case 'void': + case 'void': { if (state !== 'indeterminate') { p.replaceWith(t.identifier('undefined')); } break; - case '!': + } + case '!': { if (state === 'truthy') { p.replaceWith(t.booleanLiteral(false)); } else if (state !== 'indeterminate') { p.replaceWith(t.booleanLiteral(true)); } break; + } default: break; } diff --git a/packages/forgetti/src/core/unwrap-node.ts b/packages/forgetti/src/core/unwrap-node.ts index bdfe91f..ee64d82 100644 --- a/packages/forgetti/src/core/unwrap-node.ts +++ b/packages/forgetti/src/core/unwrap-node.ts @@ -1,10 +1,9 @@ import type * as t from '@babel/types'; import { isNestedExpression } from './checks'; -type TypeCheck = - K extends (node: t.Node) => node is (infer U extends t.Node) - ? U - : never; +type TrueTypeFilter = (node: t.Node) => node is U; + +type TypeCheck = K extends TrueTypeFilter ? U : never; type TypeFilter = (node: t.Node) => boolean; diff --git a/packages/forgetti/src/core/unwrap-path.ts b/packages/forgetti/src/core/unwrap-path.ts index fc7b764..8607815 100644 --- a/packages/forgetti/src/core/unwrap-path.ts +++ b/packages/forgetti/src/core/unwrap-path.ts @@ -1,3 +1,4 @@ +import * as babel from '@babel/core'; import type * as t from '@babel/types'; import { isNestedExpression, isPathValid } from './checks'; diff --git a/packages/forgetti/src/index.ts b/packages/forgetti/src/index.ts index c0a02a3..8daeb1c 100644 --- a/packages/forgetti/src/index.ts +++ b/packages/forgetti/src/index.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ import type * as babel from '@babel/core'; import * as t from '@babel/types'; import { @@ -14,9 +13,7 @@ import type { ImportDefinition, Options, } from './core/presets'; -import { - PRESETS, -} from './core/presets'; +import { PRESETS } from './core/presets'; import type { StateContext, State } from './core/types'; import unwrapNode from './core/unwrap-node'; import unwrapPath from './core/unwrap-path'; @@ -32,15 +29,16 @@ function registerHookSpecifiers( path: babel.NodePath, hook: HookRegistration, ): void { - let specifier: typeof path.node.specifiers[0]; + let specifier: (typeof path.node.specifiers)[0]; for (let i = 0, len = path.node.specifiers.length; i < len; i++) { specifier = path.node.specifiers[i]; switch (specifier.type) { - case 'ImportDefaultSpecifier': + case 'ImportDefaultSpecifier': { if (hook.kind === 'default') { ctx.registrations.hooks.identifiers.set(specifier.local, hook); } break; + } case 'ImportNamespaceSpecifier': { let current = ctx.registrations.hooks.namespaces.get(specifier.local); if (!current) { @@ -48,24 +46,19 @@ function registerHookSpecifiers( } current.push(hook); ctx.registrations.hooks.namespaces.set(specifier.local, current); - } break; - case 'ImportSpecifier': + } + case 'ImportSpecifier': { if ( - ( - hook.kind === 'named' - && getImportSpecifierName(specifier) === hook.name - ) - || ( - hook.kind === 'default' - && getImportSpecifierName(specifier) === 'default' - ) + (hook.kind === 'named' && + getImportSpecifierName(specifier) === hook.name) || + (hook.kind === 'default' && + getImportSpecifierName(specifier) === 'default') ) { ctx.registrations.hooks.identifiers.set(specifier.local, hook); } break; - default: - break; + } } } } @@ -75,15 +68,16 @@ function registerHOCSpecifiers( path: babel.NodePath, hoc: ImportDefinition, ): void { - let specifier: typeof path.node.specifiers[0]; + let specifier: (typeof path.node.specifiers)[0]; for (let i = 0, len = path.node.specifiers.length; i < len; i++) { specifier = path.node.specifiers[i]; switch (specifier.type) { - case 'ImportDefaultSpecifier': + case 'ImportDefaultSpecifier': { if (hoc.kind === 'default') { ctx.registrations.hocs.identifiers.set(specifier.local, hoc); } break; + } case 'ImportNamespaceSpecifier': { let current = ctx.registrations.hocs.namespaces.get(specifier.local); if (!current) { @@ -91,24 +85,19 @@ function registerHOCSpecifiers( } current.push(hoc); ctx.registrations.hocs.namespaces.set(specifier.local, current); - } break; - case 'ImportSpecifier': + } + case 'ImportSpecifier': { if ( - ( - hoc.kind === 'named' - && getImportSpecifierName(specifier) === hoc.name - ) - || ( - hoc.kind === 'default' - && getImportSpecifierName(specifier) === 'default' - ) + (hoc.kind === 'named' && + getImportSpecifierName(specifier) === hoc.name) || + (hoc.kind === 'default' && + getImportSpecifierName(specifier) === 'default') ) { ctx.registrations.hocs.identifiers.set(specifier.local, hoc); } break; - default: - break; + } } } } @@ -188,13 +177,13 @@ function transformHOC( transformFunction(ctx, path.get('arguments')[0], false); } } - // Check if callee is potentially a namespace import + // Check if callee is potentially a namespace import } const trueMember = unwrapNode(path.node.callee, t.isMemberExpression); if ( - trueMember - && !trueMember.computed - && trueMember.property.type === 'Identifier' + trueMember && + !trueMember.computed && + trueMember.property.type === 'Identifier' ) { const obj = unwrapNode(trueMember.object, t.isIdentifier); if (obj) { @@ -203,7 +192,7 @@ function transformHOC( const registrations = ctx.registrations.hocs.namespaces.get(binding); if (registrations) { const propName = trueMember.property.name; - let registration: typeof registrations[0]; + let registration: (typeof registrations)[0]; for (let i = 0, len = registrations.length; i < len; i++) { registration = registrations[i]; if (registration.kind === 'default') { @@ -225,15 +214,13 @@ function transformVariableDeclarator( path: babel.NodePath, ): void { if ( - path.node.init - && path.node.id.type === 'Identifier' - && isHookOrComponentName(ctx, path.node.id) - && !shouldSkipNode(path.node) - && ( - path.parent.type === 'VariableDeclaration' - ? !shouldSkipNode(path.parent) - : true - ) + path.node.init && + path.node.id.type === 'Identifier' && + isHookOrComponentName(ctx, path.node.id) && + !shouldSkipNode(path.node) && + (path.parent.type === 'VariableDeclaration' + ? !shouldSkipNode(path.parent) + : true) ) { transformFunction(ctx, path.get('init') as babel.NodePath, false); } @@ -244,7 +231,8 @@ export default function forgettiPlugin(): babel.PluginObj { name: 'forgetti', visitor: { Program(programPath, { opts }): void { - const preset = typeof opts.preset === 'string' ? PRESETS[opts.preset] : opts.preset; + const preset = + typeof opts.preset === 'string' ? PRESETS[opts.preset] : opts.preset; const ctx: StateContext = { imports: new Map(), registrations: { @@ -264,7 +252,10 @@ export default function forgettiPlugin(): babel.PluginObj { preset.filters.component.flags, ), hook: preset.filters.hook - ? new RegExp(preset.filters.hook.source, preset.filters.hook.flags) + ? new RegExp( + preset.filters.hook.source, + preset.filters.hook.flags, + ) : undefined, }, }; diff --git a/packages/forgetti/test/expressions.test.ts b/packages/forgetti/test/expressions.test.ts index 6181962..47ccf61 100644 --- a/packages/forgetti/test/expressions.test.ts +++ b/packages/forgetti/test/expressions.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-template-curly-in-string */ import * as babel from '@babel/core'; import { describe, it } from 'vitest'; import type { Options } from '../src'; @@ -10,13 +9,9 @@ const options: Options = { async function compile(code: string): Promise { const result = await babel.transformAsync(code, { - plugins: [ - [plugin, options], - ], + plugins: [[plugin, options]], parserOpts: { - plugins: [ - 'jsx', - ], + plugins: ['jsx'], }, }); diff --git a/packages/forgetti/test/forgetti-skip.test.ts b/packages/forgetti/test/forgetti-skip.test.ts index 2dc529d..1c9b1e3 100644 --- a/packages/forgetti/test/forgetti-skip.test.ts +++ b/packages/forgetti/test/forgetti-skip.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-template-curly-in-string */ import * as babel from '@babel/core'; import { describe, it } from 'vitest'; import type { Options } from '../src'; @@ -10,13 +9,9 @@ const options: Options = { async function compile(code: string): Promise { const result = await babel.transformAsync(code, { - plugins: [ - [plugin, options], - ], + plugins: [[plugin, options]], parserOpts: { - plugins: [ - 'jsx', - ], + plugins: ['jsx'], }, }); diff --git a/packages/forgetti/test/hooks.test.ts b/packages/forgetti/test/hooks.test.ts index fa03640..4201c78 100644 --- a/packages/forgetti/test/hooks.test.ts +++ b/packages/forgetti/test/hooks.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-template-curly-in-string */ import * as babel from '@babel/core'; import { describe, it } from 'vitest'; import type { Options } from '../src'; @@ -10,13 +9,9 @@ const options: Options = { async function compile(code: string): Promise { const result = await babel.transformAsync(code, { - plugins: [ - [plugin, options], - ], + plugins: [[plugin, options]], parserOpts: { - plugins: [ - 'jsx', - ], + plugins: ['jsx'], }, }); @@ -88,7 +83,9 @@ function Example(props) { `; expect(await compile(code)).toMatchSnapshot(); }); - it('should optimize useCallback with auto dependencies', async ({ expect }) => { + it('should optimize useCallback with auto dependencies', async ({ + expect, + }) => { const code = ` import { useCallback } from 'react'; function Example(props) { @@ -124,7 +121,9 @@ function Example(props) { `; expect(await compile(code)).toMatchSnapshot(); }); - it('should correct transform nested hooks call (issue #14)', async ({ expect }) => { + it('should correct transform nested hooks call (issue #14)', async ({ + expect, + }) => { const code = ` import { useDeferredValue } from 'react'; import { useAtomValue } from 'jotai'; diff --git a/packages/forgetti/test/statements.test.ts b/packages/forgetti/test/statements.test.ts index 1dca1e8..d01f7ad 100644 --- a/packages/forgetti/test/statements.test.ts +++ b/packages/forgetti/test/statements.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-template-curly-in-string */ import * as babel from '@babel/core'; import { describe, it } from 'vitest'; import type { Options } from '../src'; @@ -10,13 +9,9 @@ const options: Options = { async function compile(code: string): Promise { const result = await babel.transformAsync(code, { - plugins: [ - [plugin, options], - ], + plugins: [[plugin, options]], parserOpts: { - plugins: [ - 'jsx', - ], + plugins: ['jsx'], }, }); diff --git a/packages/forgetti/tsconfig.eslint.json b/packages/forgetti/tsconfig.eslint.json deleted file mode 100644 index 55a7ea5..0000000 --- a/packages/forgetti/tsconfig.eslint.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "exclude": ["node_modules"], - "include": ["src", "types", "test", "runtime"], - "compilerOptions": { - "module": "ESNext", - "lib": ["ESNext"], - "importHelpers": true, - "declaration": true, - "sourceMap": true, - "rootDir": "./", - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "bundler", - "jsx": "react-jsx", - "jsxImportSource": "react", - "esModuleInterop": true, - "target": "ES2017", - "useDefineForClassFields": false, - "declarationMap": true - } -} diff --git a/packages/rollup/.eslintrc.cjs b/packages/rollup/.eslintrc.cjs deleted file mode 100644 index 9ffa8b7..0000000 --- a/packages/rollup/.eslintrc.cjs +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - "root": true, - "extends": [ - "lxsmnsyc/typescript" - ], - "parserOptions": { - "project": "./tsconfig.eslint.json", - "tsconfigRootDir": __dirname, - }, - "rules": { - "no-param-reassign": "off" - } -}; \ No newline at end of file diff --git a/packages/rollup/README.md b/packages/rollup/README.md index ecf72e5..55de388 100644 --- a/packages/rollup/README.md +++ b/packages/rollup/README.md @@ -36,7 +36,7 @@ forgetti({ }) ``` -> **Note** +> [!NOTE] > When you are using a React Rollup plugin, make sure that forgetti runs first. ## Sponsors diff --git a/packages/rollup/package.json b/packages/rollup/package.json index 2763107..1d5c515 100644 --- a/packages/rollup/package.json +++ b/packages/rollup/package.json @@ -30,8 +30,6 @@ "devDependencies": { "@types/babel__core": "^7.20.3", "@types/node": "^20.8.7", - "eslint": "^8.51.0", - "eslint-config-lxsmnsyc": "^0.6.5", "forgetti": "0.7.2", "pridepack": "2.5.1", "rollup": "^3.15.0", @@ -71,4 +69,4 @@ "typesVersions": { "*": {} } -} +} \ No newline at end of file diff --git a/packages/rollup/tsconfig.eslint.json b/packages/rollup/tsconfig.eslint.json deleted file mode 100644 index a72555c..0000000 --- a/packages/rollup/tsconfig.eslint.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "exclude": ["node_modules"], - "include": ["src", "types", "test"], - "compilerOptions": { - "module": "ESNext", - "lib": ["ESNext", "DOM"], - "importHelpers": true, - "declaration": true, - "sourceMap": true, - "rootDir": "./", - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "bundler", - "jsx": "react", - "esModuleInterop": true, - "target": "ES2017", - "useDefineForClassFields": false, - "declarationMap": true - } -} diff --git a/packages/vite/.eslintrc.cjs b/packages/vite/.eslintrc.cjs deleted file mode 100644 index 9ffa8b7..0000000 --- a/packages/vite/.eslintrc.cjs +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - "root": true, - "extends": [ - "lxsmnsyc/typescript" - ], - "parserOptions": { - "project": "./tsconfig.eslint.json", - "tsconfigRootDir": __dirname, - }, - "rules": { - "no-param-reassign": "off" - } -}; \ No newline at end of file diff --git a/packages/vite/package.json b/packages/vite/package.json index a167311..797c019 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -31,8 +31,6 @@ "devDependencies": { "@types/babel__core": "^7.20.3", "@types/node": "^20.8.7", - "eslint": "^8.51.0", - "eslint-config-lxsmnsyc": "^0.6.5", "forgetti": "0.7.2", "pridepack": "2.5.1", "tslib": "^2.6.2", @@ -72,4 +70,4 @@ "typesVersions": { "*": {} } -} +} \ No newline at end of file diff --git a/packages/vite/tsconfig.eslint.json b/packages/vite/tsconfig.eslint.json deleted file mode 100644 index a72555c..0000000 --- a/packages/vite/tsconfig.eslint.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "exclude": ["node_modules"], - "include": ["src", "types", "test"], - "compilerOptions": { - "module": "ESNext", - "lib": ["ESNext", "DOM"], - "importHelpers": true, - "declaration": true, - "sourceMap": true, - "rootDir": "./", - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "bundler", - "jsx": "react", - "esModuleInterop": true, - "target": "ES2017", - "useDefineForClassFields": false, - "declarationMap": true - } -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 477dcb0..1b1dada 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,12 +8,9 @@ importers: .: devDependencies: - eslint: - specifier: ^8.51.0 - version: 8.51.0 - eslint-config-lxsmnsyc: - specifier: ^0.6.5 - version: 0.6.5(eslint@8.51.0)(typescript@5.2.2) + '@biomejs/biome': + specifier: ^1.4.1 + version: 1.4.1 lerna: specifier: ^7.4.1 version: 7.4.1 @@ -24,7 +21,7 @@ importers: examples/preact: dependencies: forgetti: - specifier: 0.7.1 + specifier: 0.7.2 version: link:../../packages/forgetti preact: specifier: ^10.18.1 @@ -33,12 +30,6 @@ importers: '@preact/preset-vite': specifier: ^2.6.0 version: 2.6.0(@babel/core@7.23.2)(preact@10.18.1)(vite@4.5.0) - eslint: - specifier: ^8.51.0 - version: 8.51.0 - eslint-config-lxsmnsyc: - specifier: ^0.6.5 - version: 0.6.5(eslint@8.51.0)(typescript@5.2.2) typescript: specifier: ^5.2.2 version: 5.2.2 @@ -46,13 +37,13 @@ importers: specifier: ^4.5.0 version: 4.5.0(@types/node@20.8.7) vite-plugin-forgetti: - specifier: 0.7.1 + specifier: 0.7.2 version: link:../../packages/vite examples/react: dependencies: forgetti: - specifier: 0.7.1 + specifier: 0.7.2 version: link:../../packages/forgetti react: specifier: ^18.2.0 @@ -70,12 +61,6 @@ importers: '@vitejs/plugin-react': specifier: ^4.1.0 version: 4.1.0(vite@4.5.0) - eslint: - specifier: ^8.51.0 - version: 8.51.0 - eslint-config-lxsmnsyc: - specifier: ^0.6.5 - version: 0.6.5(eslint@8.51.0)(typescript@5.2.2) typescript: specifier: ^5.2.2 version: 5.2.2 @@ -83,7 +68,7 @@ importers: specifier: ^4.5.0 version: 4.5.0(@types/node@20.8.7) vite-plugin-forgetti: - specifier: 0.7.1 + specifier: 0.7.2 version: link:../../packages/vite packages/forgetti: @@ -110,12 +95,6 @@ importers: '@types/node': specifier: ^20.8.7 version: 20.8.7 - eslint: - specifier: ^8.51.0 - version: 8.51.0 - eslint-config-lxsmnsyc: - specifier: ^0.6.5 - version: 0.6.5(eslint@8.51.0)(typescript@5.2.2) pridepack: specifier: 2.5.1 version: 2.5.1(eslint@8.51.0)(tslib@2.6.2)(typescript@5.2.2) @@ -144,14 +123,8 @@ importers: '@types/node': specifier: ^20.8.7 version: 20.8.7 - eslint: - specifier: ^8.51.0 - version: 8.51.0 - eslint-config-lxsmnsyc: - specifier: ^0.6.5 - version: 0.6.5(eslint@8.51.0)(typescript@5.2.2) forgetti: - specifier: 0.7.1 + specifier: 0.7.2 version: link:../forgetti pridepack: specifier: 2.5.1 @@ -181,14 +154,8 @@ importers: '@types/node': specifier: ^20.8.7 version: 20.8.7 - eslint: - specifier: ^8.51.0 - version: 8.51.0 - eslint-config-lxsmnsyc: - specifier: ^0.6.5 - version: 0.6.5(eslint@8.51.0)(typescript@5.2.2) forgetti: - specifier: 0.7.1 + specifier: 0.7.2 version: link:../forgetti pridepack: specifier: 2.5.1 @@ -284,20 +251,6 @@ packages: transitivePeerDependencies: - supports-color - /@babel/eslint-parser@7.19.1(@babel/core@7.23.2)(eslint@8.51.0): - resolution: {integrity: sha512-AqNf2QWt1rtu2/1rLswy6CDP7H9Oh3mMhk177Y67Rg8d7RD9WfOLLv8CGn6tisFvS2htm86yIe1yLF6I1UDaGQ==} - engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} - peerDependencies: - '@babel/core': '>=7.11.0' - eslint: ^7.5.0 || ^8.0.0 - dependencies: - '@babel/core': 7.23.2 - '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 - eslint: 8.51.0 - eslint-visitor-keys: 2.1.0 - semver: 6.3.0 - dev: true - /@babel/generator@7.21.3: resolution: {integrity: sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==} engines: {node: '>=6.9.0'} @@ -405,11 +358,6 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-validator-identifier': 7.22.20 - /@babel/helper-plugin-utils@7.20.2: - resolution: {integrity: sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-plugin-utils@7.22.5: resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} @@ -513,35 +461,6 @@ packages: dependencies: '@babel/types': 7.23.0 - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.23.2): - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.23.2 - '@babel/helper-plugin-utils': 7.20.2 - dev: true - - /@babel/plugin-syntax-decorators@7.19.0(@babel/core@7.23.2): - resolution: {integrity: sha512-xaBZUEDntt4faL1yN8oIFlhfXeQAWJW7CLKYsHTUqriCUbj8xOra8bfxxKGi/UwExPFBuPdH4XfHc9rGQhrVkQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.23.2 - '@babel/helper-plugin-utils': 7.20.2 - dev: true - - /@babel/plugin-syntax-jsx@7.18.6(@babel/core@7.23.2): - resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.23.2 - '@babel/helper-plugin-utils': 7.20.2 - dev: true - /@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.23.2): resolution: {integrity: sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==} engines: {node: '>=6.9.0'} @@ -596,13 +515,6 @@ packages: '@babel/types': 7.23.0 dev: true - /@babel/runtime@7.20.13: - resolution: {integrity: sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.13.11 - dev: true - /@babel/template@7.20.7: resolution: {integrity: sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==} engines: {node: '>=6.9.0'} @@ -645,6 +557,74 @@ packages: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 + /@biomejs/biome@1.4.1: + resolution: {integrity: sha512-JccVAwPbhi37pdxbAGmaOBjUTKEwEjWAhl7rKkVVuXHo4MLASXJ5HR8BTgrImi4/7rTBsGz1tgVD1Kwv1CHGRg==} + engines: {node: '>=14.*'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.4.1 + '@biomejs/cli-darwin-x64': 1.4.1 + '@biomejs/cli-linux-arm64': 1.4.1 + '@biomejs/cli-linux-x64': 1.4.1 + '@biomejs/cli-win32-arm64': 1.4.1 + '@biomejs/cli-win32-x64': 1.4.1 + dev: true + + /@biomejs/cli-darwin-arm64@1.4.1: + resolution: {integrity: sha512-PZWy2Idndqux38p6AXSDQM2ldRAWi32bvb7bMbTN0ALzpWYMYnxd71ornatumSSJYoNhKmxzDLq+jct7nZJ79w==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-darwin-x64@1.4.1: + resolution: {integrity: sha512-soj3BWhnsM1M2JlzR09cibUzG1owJqetwj/Oo7yg0foijo9lNH9XWXZfJBYDKgW/6Fomn+CC2EcUS+hisQzt9g==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-arm64@1.4.1: + resolution: {integrity: sha512-YIZqfJUg4F+fPsBTXxgD7EU2E5OAYbmYSl/snf4PevwfQCWE/omOFZv+NnIQmjYj9I7ParDgcJvanoA3/kO0JQ==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-x64@1.4.1: + resolution: {integrity: sha512-9YOZw3qBd/KUj63A6Hn2zZgzGb2nbESM0qNmeMXgmqinVKM//uc4OgY5TuKITuGjMSvcVxxd4dX1IzYjV9qvNQ==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-win32-arm64@1.4.1: + resolution: {integrity: sha512-nWQbvkNKxYn/kCQ0yVF8kCaS3VzaGvtFSmItXiMknU4521LDjJ7tNWH12Gol+pIslrCbd4E1LhJa0a3ThRsBVg==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-win32-x64@1.4.1: + resolution: {integrity: sha512-88fR2CQxQ4YLs2BUDuywWYQpUKgU3A3sTezANFc/4LGKQFFLV2yX+F7QAdZVkMHfA+RD9Xg178HomM/6mnTNPA==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm64@0.18.20: resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} @@ -1051,11 +1031,6 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.4.0: - resolution: {integrity: sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: true - /@eslint-community/regexpp@4.9.1: resolution: {integrity: sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -1255,26 +1230,6 @@ packages: - typescript dev: true - /@mdn/browser-compat-data@3.3.14: - resolution: {integrity: sha512-n2RC9d6XatVbWFdHLimzzUJxJ1KY8LdjqrW6YvGPiRmsHkhOUx74/Ct10x5Yo7bC/Jvqx7cDEW8IMPv/+vwEzA==} - dev: true - - /@mdn/browser-compat-data@5.2.35: - resolution: {integrity: sha512-WMGl70X/upKye9Ix0xQtaKzNsFJE6I4ZEexypk1gyiB5REQZv9BI3Stw8Tby25YSGJ7OuYG0+5oCnkv1A+3kRA==} - dev: true - - /@next/eslint-plugin-next@13.3.1: - resolution: {integrity: sha512-Hpd74UrYGF+bq9bBSRDXRsRfaWkPpcwjhvachy3sr/R/5fY6feC0T0s047pUthyqcaeNsqKOY1nUGQQJNm4WyA==} - dependencies: - glob: 7.1.7 - dev: true - - /@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: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1657,18 +1612,6 @@ packages: dev: true optional: true - /@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: - cross-spawn: 7.0.3 - is-glob: 4.0.3 - open: 8.4.1 - picocolors: 1.0.0 - tiny-glob: 0.2.9 - tslib: 2.6.2 - dev: true - /@preact/preset-vite@2.6.0(@babel/core@7.23.2)(preact@10.18.1)(vite@4.5.0): resolution: {integrity: sha512-5nztNzXbCpqyVum/K94nB2YQ5PTnvWdz4u7/X0jc8+kLyskSSpkNUxLQJeI90zfGSFIX1Ibj2G2JIS/mySHWYQ==} peerDependencies: @@ -1858,14 +1801,6 @@ packages: resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} dev: false - /@types/json-schema@7.0.11: - resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} - dev: true - - /@types/json5@0.0.29: - resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - dev: true - /@types/minimatch@3.0.5: resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} dev: true @@ -1906,215 +1841,6 @@ packages: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} dev: true - /@types/semver@7.3.13: - resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} - dev: true - - /@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0)(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@eslint-community/regexpp': 4.4.0 - '@typescript-eslint/parser': 5.59.0(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 5.59.0 - '@typescript-eslint/type-utils': 5.59.0(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/utils': 5.59.0(eslint@8.51.0)(typescript@5.2.2) - debug: 4.3.4 - eslint: 8.51.0 - grapheme-splitter: 1.0.4 - ignore: 5.2.4 - natural-compare-lite: 1.4.0 - semver: 7.3.8 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/experimental-utils@5.51.0(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-8/3+ZyBENl2aog1/QB3S39ptkZ2oRhDB+sJt15UWXBE3skgwL1C8BN9RjpOyhTejwR2hVrvqEjcYcNY6qtZ7nw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@typescript-eslint/utils': 5.51.0(eslint@8.51.0)(typescript@5.2.2) - eslint: 8.51.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/parser@5.59.0(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 5.59.0 - '@typescript-eslint/types': 5.59.0 - '@typescript-eslint/typescript-estree': 5.59.0(typescript@5.2.2) - debug: 4.3.4 - eslint: 8.51.0 - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/scope-manager@5.51.0: - resolution: {integrity: sha512-gNpxRdlx5qw3yaHA0SFuTjW4rxeYhpHxt491PEcKF8Z6zpq0kMhe0Tolxt0qjlojS+/wArSDlj/LtE69xUJphQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.51.0 - '@typescript-eslint/visitor-keys': 5.51.0 - dev: true - - /@typescript-eslint/scope-manager@5.59.0: - resolution: {integrity: sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.59.0 - '@typescript-eslint/visitor-keys': 5.59.0 - dev: true - - /@typescript-eslint/type-utils@5.59.0(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '*' - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 5.59.0(typescript@5.2.2) - '@typescript-eslint/utils': 5.59.0(eslint@8.51.0)(typescript@5.2.2) - debug: 4.3.4 - eslint: 8.51.0 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/types@5.51.0: - resolution: {integrity: sha512-SqOn0ANn/v6hFn0kjvLwiDi4AzR++CBZz0NV5AnusT2/3y32jdc0G4woXPWHCumWtUXZKPAS27/9vziSsC9jnw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/types@5.59.0: - resolution: {integrity: sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/typescript-estree@5.51.0(typescript@5.2.2): - resolution: {integrity: sha512-TSkNupHvNRkoH9FMA3w7TazVFcBPveAAmb7Sz+kArY6sLT86PA5Vx80cKlYmd8m3Ha2SwofM1KwraF24lM9FvA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.51.0 - '@typescript-eslint/visitor-keys': 5.51.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.3.8 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/typescript-estree@5.59.0(typescript@5.2.2): - resolution: {integrity: sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.59.0 - '@typescript-eslint/visitor-keys': 5.59.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.3.8 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/utils@5.51.0(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-76qs+5KWcaatmwtwsDJvBk4H76RJQBFe+Gext0EfJdC3Vd2kpY2Pf//OHHzHp84Ciw0/rYoGTDnIAr3uWhhJYw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@types/json-schema': 7.0.11 - '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.51.0 - '@typescript-eslint/types': 5.51.0 - '@typescript-eslint/typescript-estree': 5.51.0(typescript@5.2.2) - eslint: 8.51.0 - eslint-scope: 5.1.1 - eslint-utils: 3.0.0(eslint@8.51.0) - semver: 7.3.8 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/utils@5.59.0(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA==} - 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.3.0(eslint@8.51.0) - '@types/json-schema': 7.0.11 - '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.59.0 - '@typescript-eslint/types': 5.59.0 - '@typescript-eslint/typescript-estree': 5.59.0(typescript@5.2.2) - eslint: 8.51.0 - eslint-scope: 5.1.1 - semver: 7.3.8 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/visitor-keys@5.51.0: - resolution: {integrity: sha512-Oh2+eTdjHjOFjKA27sxESlA87YPSOJafGCR0md5oeMdh1ZcCfAGCIOL216uTBAkAIptvLIfKQhl7lHxMJet4GQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.51.0 - eslint-visitor-keys: 3.4.0 - dev: true - - /@typescript-eslint/visitor-keys@5.59.0: - resolution: {integrity: sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.59.0 - eslint-visitor-keys: 3.4.0 - dev: true - /@vitejs/plugin-react@4.1.0(vite@4.5.0): resolution: {integrity: sha512-rM0SqazU9iqPUraQ2JlIvReeaxOoRj6n+PzB1C0cBzIbd8qP336nC39/R9yPi3wVcah7E7j/kdU1uCUqMEU4OQ==} engines: {node: ^14.18.0 || >=16.0.0} @@ -2208,14 +1934,6 @@ packages: acorn: 8.10.0 dev: true - /acorn-jsx@5.3.2(acorn@8.8.2): - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - acorn: 8.8.2 - dev: true - /acorn-walk@8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} @@ -2227,12 +1945,6 @@ packages: hasBin: true dev: true - /acorn@8.8.2: - resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - /add-stream@1.0.0: resolution: {integrity: sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==} dev: true @@ -2341,12 +2053,6 @@ packages: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true - /aria-query@5.1.3: - resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} - dependencies: - deep-equal: 2.2.0 - dev: true - /array-differ@3.0.0: resolution: {integrity: sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==} engines: {node: '>=8'} @@ -2356,52 +2062,11 @@ packages: resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} dev: true - /array-includes@3.1.6: - resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - get-intrinsic: 1.2.0 - is-string: 1.0.7 - dev: true - /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} dev: true - /array.prototype.flat@1.3.1: - resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} - 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 - dev: true - - /array.prototype.flatmap@1.3.1: - resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} - 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 - dev: true - - /array.prototype.tosorted@1.1.1: - resolution: {integrity: sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==} - 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 - /arrify@1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} @@ -2416,34 +2081,14 @@ packages: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true - /ast-metadata-inferer@0.7.0: - resolution: {integrity: sha512-OkMLzd8xelb3gmnp6ToFvvsHLtS6CbagTkFQvQ+ZYFe3/AIl9iKikNR9G7pY3GfOR/2Xc222hwBjzI7HLkE76Q==} - dependencies: - '@mdn/browser-compat-data': 3.3.14 - dev: true - - /ast-types-flow@0.0.7: - resolution: {integrity: sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==} - dev: true - - /async@3.2.4: - resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} + /async@3.2.4: + resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} dev: true /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true - /available-typed-arrays@1.0.5: - resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} - engines: {node: '>= 0.4'} - dev: true - - /axe-core@4.6.3: - resolution: {integrity: sha512-/BQzOX780JhsxDnPpH4ZiyrJAzcd8AfzFPkv+89veFSr1rcMjuq2JDCwypKaPeB6ljHp9KjXhPpjgCvQlWYuqg==} - engines: {node: '>=4'} - dev: true - /axios@1.3.2: resolution: {integrity: sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw==} dependencies: @@ -2454,12 +2099,6 @@ packages: - debug dev: true - /axobject-query@3.1.1: - resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==} - dependencies: - deep-equal: 2.2.0 - dev: true - /babel-plugin-transform-hook-names@1.0.2(@babel/core@7.23.2): resolution: {integrity: sha512-5gafyjyyBTTdX/tQQ0hRgu4AhNHG/hqWi0ZZmg2xvs2FgRkJXzDNKBZCyoYqgFkovfDrgM8OoKg8karoUvWeCw==} peerDependencies: @@ -2496,10 +2135,6 @@ packages: readable-stream: 3.6.0 dev: true - /boolbase@1.0.0: - resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - dev: true - /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -2529,6 +2164,7 @@ packages: electron-to-chromium: 1.4.295 node-releases: 2.0.10 update-browserslist-db: 1.0.10(browserslist@4.21.5) + dev: false /browserslist@4.22.1: resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} @@ -2622,13 +2258,6 @@ packages: unique-filename: 3.0.0 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: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -2650,6 +2279,7 @@ packages: /caniuse-lite@1.0.30001451: resolution: {integrity: sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w==} + dev: false /caniuse-lite@1.0.30001551: resolution: {integrity: sha512-vtBAez47BoGMMzlbYhfXrMV1kvRF2WP/lqiMuDu1Sb4EE4LKEgjopFDSRtZfdVnslNRpOqV/woE+Xgrwj6VQlg==} @@ -2871,10 +2501,6 @@ packages: xdg-basedir: 4.0.0 dev: true - /confusing-browser-globals@1.0.11: - resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} - dev: true - /console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: true @@ -2962,11 +2588,6 @@ packages: /convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - /core-js@3.27.2: - resolution: {integrity: sha512-9ashVQskuh5AZEZ1JdQWp1GqSoC1e1G87MzRqg2gIfVAQ7Qn9K+uFj8EcniUFA4P2NLZfV+TOlX1SzoKfo+s7w==} - requiresBuild: true - dev: true - /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true @@ -3001,20 +2622,10 @@ packages: engines: {node: '>=8'} dev: true - /cssesc@3.0.0: - resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} - engines: {node: '>=4'} - hasBin: true - dev: true - /csstype@3.1.1: resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} dev: true - /damerau-levenshtein@1.0.8: - resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} - dev: true - /dargs@7.0.0: resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==} engines: {node: '>=8'} @@ -3024,17 +2635,6 @@ packages: resolution: {integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==} dev: true - /debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.3 - dev: true - /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -3070,28 +2670,6 @@ packages: type-detect: 4.0.8 dev: true - /deep-equal@2.2.0: - resolution: {integrity: sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==} - dependencies: - call-bind: 1.0.2 - es-get-iterator: 1.1.3 - get-intrinsic: 1.2.0 - is-arguments: 1.1.1 - is-array-buffer: 3.0.1 - is-date-object: 1.0.5 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - isarray: 2.0.5 - object-is: 1.1.5 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 - side-channel: 1.0.4 - which-boxed-primitive: 1.0.2 - which-collection: 1.0.1 - which-typed-array: 1.1.9 - dev: true - /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true @@ -3107,14 +2685,6 @@ packages: engines: {node: '>=8'} dev: true - /define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} - engines: {node: '>= 0.4'} - dependencies: - has-property-descriptors: 1.0.0 - object-keys: 1.1.1 - dev: true - /degit@2.8.4: resolution: {integrity: sha512-vqYuzmSA5I50J882jd+AbAhQtgK6bdKUJIex1JNfEUPENCgYsxugzKVZlFyMwV4i06MmnV47/Iqi5Io86zf3Ng==} engines: {node: '>=8.0.0'} @@ -3161,13 +2731,6 @@ packages: path-type: 4.0.0 dev: true - /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: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} @@ -3210,6 +2773,7 @@ packages: /electron-to-chromium@1.4.295: resolution: {integrity: sha512-lEO94zqf1bDA3aepxwnWoHUjA8sZ+2owgcSZjYQy0+uOSEclJX0VieZC+r+wLpSxUHRd6gG32znTWmr+5iGzFw==} + dev: false /electron-to-chromium@1.4.559: resolution: {integrity: sha512-iS7KhLYCSJbdo3rUSkhDTVuFNCV34RKs2UaB9Ecr7VlqzjjWW//0nfsFF5dtDmyXlZQaDYYtID5fjtC/6lpRug==} @@ -3240,14 +2804,6 @@ packages: once: 1.4.0 dev: true - /enhanced-resolve@5.12.0: - resolution: {integrity: sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==} - engines: {node: '>=10.13.0'} - dependencies: - graceful-fs: 4.2.10 - tapable: 2.2.1 - dev: true - /enquirer@2.3.6: resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} engines: {node: '>=8.6'} @@ -3276,83 +2832,6 @@ packages: is-arrayish: 0.2.1 dev: true - /es-abstract@1.21.1: - resolution: {integrity: sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 - es-to-primitive: 1.2.1 - function-bind: 1.1.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.0 - 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.1 - 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.4.3 - safe-regex-test: 1.0.0 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 - typed-array-length: 1.0.4 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.9 - dev: true - - /es-get-iterator@1.1.3: - resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - has-symbols: 1.0.3 - is-arguments: 1.1.1 - is-map: 2.0.2 - is-set: 2.0.2 - is-string: 1.0.7 - isarray: 2.0.5 - stop-iteration-iterator: 1.0.0 - dev: true - - /es-set-tostringtag@2.0.1: - resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.2.0 - has: 1.0.3 - has-tostringtag: 1.0.0 - dev: true - - /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: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} - dependencies: - is-callable: 1.2.7 - is-date-object: 1.0.5 - is-symbol: 1.0.4 - dev: true - /esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} @@ -3426,317 +2905,6 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.27.5)(eslint@8.51.0): - resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} - engines: {node: ^10.12.0 || >=12.0.0} - peerDependencies: - eslint: ^7.32.0 || ^8.2.0 - eslint-plugin-import: ^2.25.2 - dependencies: - confusing-browser-globals: 1.0.11 - eslint: 8.51.0 - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.51.0) - object.assign: 4.1.4 - object.entries: 1.1.6 - semver: 6.3.0 - dev: true - - /eslint-config-airbnb@19.0.4(eslint-plugin-import@2.27.5)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-react-hooks@4.6.0)(eslint-plugin-react@7.32.2)(eslint@8.51.0): - resolution: {integrity: sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==} - engines: {node: ^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^7.32.0 || ^8.2.0 - eslint-plugin-import: ^2.25.3 - eslint-plugin-jsx-a11y: ^6.5.1 - eslint-plugin-react: ^7.28.0 - eslint-plugin-react-hooks: ^4.3.0 - dependencies: - eslint: 8.51.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.27.5)(eslint@8.51.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.51.0) - eslint-plugin-jsx-a11y: 6.7.1(eslint@8.51.0) - eslint-plugin-react: 7.32.2(eslint@8.51.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.51.0) - object.assign: 4.1.4 - object.entries: 1.1.6 - dev: true - - /eslint-config-lxsmnsyc@0.6.5(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-0v4S5ZCDhw3nceG5yqSy2/eaWlogiARVTT6nMmmzu1H5HCqxbjRhvudKgNGeFw9LSFMmBRUUTr8P3K9e0GVNkQ==} - peerDependencies: - eslint: ^8.0 - typescript: ^4.0 || ^5.0 - dependencies: - '@next/eslint-plugin-next': 13.3.1 - '@typescript-eslint/eslint-plugin': 5.59.0(@typescript-eslint/parser@5.59.0)(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/parser': 5.59.0(eslint@8.51.0)(typescript@5.2.2) - eslint: 8.51.0 - eslint-config-airbnb: 19.0.4(eslint-plugin-import@2.27.5)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-react-hooks@4.6.0)(eslint-plugin-react@7.32.2)(eslint@8.51.0) - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.27.5)(eslint@8.51.0) - eslint-config-preact: 1.3.0(@typescript-eslint/eslint-plugin@5.59.0)(eslint@8.51.0)(typescript@5.2.2) - eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.51.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.51.0) - eslint-plugin-jsx-a11y: 6.7.1(eslint@8.51.0) - eslint-plugin-react: 7.32.2(eslint@8.51.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.51.0) - eslint-plugin-vue: 9.11.0(eslint@8.51.0) - typescript: 5.2.2 - transitivePeerDependencies: - - eslint-import-resolver-webpack - - jest - - supports-color - dev: true - - /eslint-config-preact@1.3.0(@typescript-eslint/eslint-plugin@5.59.0)(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-yHYXg5qNzEJd3D/30AmsIW0W8MuY858KpApXp7xxBF08IYUljSKCOqMx+dVucXHQnAm7+11wOnMkgVHIBAechw==} - peerDependencies: - eslint: 6.x || 7.x || 8.x - dependencies: - '@babel/core': 7.23.2 - '@babel/eslint-parser': 7.19.1(@babel/core@7.23.2)(eslint@8.51.0) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.23.2) - '@babel/plugin-syntax-decorators': 7.19.0(@babel/core@7.23.2) - '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.23.2) - eslint: 8.51.0 - eslint-plugin-compat: 4.1.1(eslint@8.51.0) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.59.0)(eslint@8.51.0)(typescript@5.2.2) - eslint-plugin-react: 7.32.2(eslint@8.51.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.51.0) - transitivePeerDependencies: - - '@typescript-eslint/eslint-plugin' - - jest - - supports-color - - typescript - dev: true - - /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 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.51.0): - resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - eslint: '*' - eslint-plugin-import: '*' - dependencies: - debug: 4.3.4 - enhanced-resolve: 5.12.0 - eslint: 8.51.0 - eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.51.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.51.0) - get-tsconfig: 4.5.0 - globby: 13.1.3 - is-core-module: 2.11.0 - is-glob: 4.0.3 - synckit: 0.8.5 - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - supports-color - dev: true - - /eslint-module-utils@2.7.4(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.51.0): - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - dependencies: - '@typescript-eslint/parser': 5.59.0(eslint@8.51.0)(typescript@5.2.2) - debug: 3.2.7 - eslint: 8.51.0 - eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.51.0) - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-compat@4.1.1(eslint@8.51.0): - resolution: {integrity: sha512-vUAaqKcDwXpVASyCAfKzkfaw3NxZ6FqeCNSGp7yqHpUMzkAiWRO0B6pR5zqh8RUhvybwXhPXvwVKDLr9GqGFUQ==} - engines: {node: '>=9.x'} - peerDependencies: - eslint: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@mdn/browser-compat-data': 5.2.35 - ast-metadata-inferer: 0.7.0 - browserslist: 4.21.5 - caniuse-lite: 1.0.30001451 - core-js: 3.27.2 - eslint: 8.51.0 - find-up: 5.0.0 - lodash.memoize: 4.1.2 - semver: 7.3.8 - dev: true - - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.51.0): - resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - dependencies: - '@typescript-eslint/parser': 5.59.0(eslint@8.51.0)(typescript@5.2.2) - array-includes: 3.1.6 - array.prototype.flat: 1.3.1 - array.prototype.flatmap: 1.3.1 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.51.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.51.0) - has: 1.0.3 - is-core-module: 2.11.0 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.values: 1.1.6 - resolve: 1.22.1 - semver: 6.3.0 - tsconfig-paths: 3.14.1 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - dev: true - - /eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.59.0)(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^4.0.0 || ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - jest: '*' - peerDependenciesMeta: - '@typescript-eslint/eslint-plugin': - optional: true - jest: - optional: true - dependencies: - '@typescript-eslint/eslint-plugin': 5.59.0(@typescript-eslint/parser@5.59.0)(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/experimental-utils': 5.51.0(eslint@8.51.0)(typescript@5.2.2) - eslint: 8.51.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /eslint-plugin-jsx-a11y@6.7.1(eslint@8.51.0): - resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} - engines: {node: '>=4.0'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - '@babel/runtime': 7.20.13 - aria-query: 5.1.3 - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 - ast-types-flow: 0.0.7 - axe-core: 4.6.3 - axobject-query: 3.1.1 - damerau-levenshtein: 1.0.8 - emoji-regex: 9.2.2 - eslint: 8.51.0 - has: 1.0.3 - jsx-ast-utils: 3.3.3 - language-tags: 1.0.5 - minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - semver: 6.3.0 - dev: true - - /eslint-plugin-react-hooks@4.6.0(eslint@8.51.0): - resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} - engines: {node: '>=10'} - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - dependencies: - eslint: 8.51.0 - dev: true - - /eslint-plugin-react@7.32.2(eslint@8.51.0): - resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 - array.prototype.tosorted: 1.1.1 - doctrine: 2.1.0 - eslint: 8.51.0 - estraverse: 5.3.0 - jsx-ast-utils: 3.3.3 - minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - object.hasown: 1.1.2 - object.values: 1.1.6 - prop-types: 15.8.1 - resolve: 2.0.0-next.4 - semver: 6.3.0 - string.prototype.matchall: 4.0.8 - dev: true - - /eslint-plugin-vue@9.11.0(eslint@8.51.0): - resolution: {integrity: sha512-bBCJAZnkBV7ATH4Z1E7CvN3nmtS4H7QUU3UBxPdo8WohRU+yHjnQRALpTbxMVcz0e4Mx3IyxIdP5HYODMxK9cQ==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.3.0(eslint@8.51.0) - eslint: 8.51.0 - natural-compare: 1.4.0 - nth-check: 2.1.1 - postcss-selector-parser: 6.0.11 - semver: 7.3.8 - vue-eslint-parser: 9.1.0(eslint@8.51.0) - xml-name-validator: 4.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /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 - dev: true - - /eslint-scope@7.1.1: - resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - dev: true - /eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3745,26 +2913,6 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils@3.0.0(eslint@8.51.0): - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.51.0 - eslint-visitor-keys: 2.1.0 - dev: true - - /eslint-visitor-keys@2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - dev: true - - /eslint-visitor-keys@3.4.0: - resolution: {integrity: sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - /eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3816,15 +2964,6 @@ packages: - supports-color dev: true - /espree@9.5.1: - resolution: {integrity: sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.8.2 - acorn-jsx: 5.3.2(acorn@8.8.2) - eslint-visitor-keys: 3.4.0 - dev: true - /espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3854,11 +2993,6 @@ packages: estraverse: 5.3.0 dev: true - /estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - dev: true - /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -4036,12 +3170,6 @@ packages: optional: true dev: true - /for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} - dependencies: - is-callable: 1.2.7 - dev: true - /foreground-child@3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} @@ -4101,20 +3229,6 @@ packages: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true - /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 - functions-have-names: 1.2.3 - dev: true - - /functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - dev: true - /fuzzy-search@3.2.1: resolution: {integrity: sha512-vAcPiyomt1ioKAsAL2uxSABHJ4Ju/e4UeDM+g1OlR0vV4YhLGMNsdLNvZTpEDY4JCSt0E4hASCNM5t2ETtsbyg==} dev: true @@ -4146,14 +3260,6 @@ packages: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} 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-pkg-repo@4.2.1: resolution: {integrity: sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==} engines: {node: '>=6.9.0'} @@ -4185,18 +3291,6 @@ packages: engines: {node: '>=16'} dev: true - /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 - dev: true - - /get-tsconfig@4.5.0: - resolution: {integrity: sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==} - dev: true - /git-config-path@2.0.0: resolution: {integrity: sha512-qc8h1KIQbJpp+241id3GuAtkdyJ+IK+LIVtkiFTRKRrmddDzs3SI9CvP1QYmWBFvm1I/PWRwj//of8bgAc0ltA==} engines: {node: '>=4'} @@ -4285,17 +3379,6 @@ packages: path-is-absolute: 1.0.1 dev: true - /glob@7.1.7: - resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: @@ -4332,22 +3415,11 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - /globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.20.2 - dev: true - - /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: - resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} + /globals@13.20.0: + resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 dev: true /globby@11.1.0: @@ -4362,27 +3434,6 @@ packages: slash: 3.0.0 dev: true - /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.2.12 - ignore: 5.2.4 - merge2: 1.4.1 - slash: 4.0.0 - dev: true - - /globrex@0.1.2: - resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - dev: true - - /gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} - dependencies: - get-intrinsic: 1.2.0 - dev: true - /graceful-fs@4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true @@ -4391,10 +3442,6 @@ packages: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} dev: true - /grapheme-splitter@1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} - dev: true - /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true @@ -4417,10 +3464,6 @@ packages: engines: {node: '>=6'} dev: true - /has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - dev: true - /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -4430,29 +3473,6 @@ packages: engines: {node: '>=8'} dev: true - /has-property-descriptors@1.0.0: - resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} - dependencies: - get-intrinsic: 1.2.0 - dev: true - - /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: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - dev: true - - /has-tostringtag@1.0.0: - resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.3 - dev: true - /has-unicode@2.0.1: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} dev: true @@ -4649,58 +3669,14 @@ packages: wrap-ansi: 7.0.0 dev: true - /internal-slot@1.0.5: - resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.2.0 - has: 1.0.3 - side-channel: 1.0.4 - dev: true - /ip@2.0.0: resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==} dev: true - /is-arguments@1.1.1: - resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-array-buffer@3.0.1: - resolution: {integrity: sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - is-typed-array: 1.1.10 - dev: true - /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true - /is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - dependencies: - has-bigints: 1.0.2 - dev: true - - /is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} - dev: true - /is-ci@3.0.1: resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} hasBin: true @@ -4720,13 +3696,6 @@ packages: 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-docker@2.2.1: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} @@ -4764,22 +3733,6 @@ packages: resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} dev: true - /is-map@2.0.2: - resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} - dev: true - - /is-negative-zero@2.0.2: - resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} - engines: {node: '>= 0.4'} - dev: true - - /is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true - /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -4812,24 +3765,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-set@2.0.2: - resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==} - dev: true - - /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-ssh@1.4.0: resolution: {integrity: sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==} dependencies: @@ -4851,20 +3786,6 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /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: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.3 - dev: true - /is-text-path@1.0.1: resolution: {integrity: sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==} engines: {node: '>=0.10.0'} @@ -4872,17 +3793,6 @@ packages: text-extensions: 1.9.0 dev: true - /is-typed-array@1.1.10: - resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} - 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 - /is-typedarray@1.0.0: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: true @@ -4897,23 +3807,6 @@ packages: engines: {node: '>=12'} dev: true - /is-weakmap@2.0.1: - resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==} - dev: true - - /is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} - dependencies: - call-bind: 1.0.2 - dev: true - - /is-weakset@2.0.2: - resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - dev: true - /is-wsl@2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} @@ -4925,10 +3818,6 @@ packages: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} dev: true - /isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - dev: true - /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true @@ -5021,13 +3910,6 @@ packages: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} dev: true - /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: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -5050,14 +3932,6 @@ packages: engines: {'0': node >= 0.2.0} dev: true - /jsx-ast-utils@3.3.3: - resolution: {integrity: sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==} - engines: {node: '>=4.0'} - dependencies: - array-includes: 3.1.6 - object.assign: 4.1.4 - dev: true - /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -5072,16 +3946,6 @@ packages: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} dev: true - /language-subtag-registry@0.3.22: - resolution: {integrity: sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==} - dev: true - - /language-tags@1.0.5: - resolution: {integrity: sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==} - dependencies: - language-subtag-registry: 0.3.22 - dev: true - /lerna@7.4.1: resolution: {integrity: sha512-c6sOO0dlJU689vStIsko+zjRdn2fJOWH8aNjePLNv2AubAdABKqfrDCpE2H/Q7+O80Duo68ZQtWYkUUk7hRWDw==} engines: {node: '>=16.0.0'} @@ -5280,10 +4144,6 @@ packages: resolution: {integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==} dev: true - /lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - dev: true - /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true @@ -5313,6 +4173,7 @@ packages: hasBin: true dependencies: js-tokens: 4.0.0 + dev: false /loupe@2.3.6: resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} @@ -5681,10 +4542,6 @@ packages: 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: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -5757,6 +4614,7 @@ packages: /node-releases@2.0.10: resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + dev: false /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} @@ -5913,12 +4771,6 @@ packages: set-blocking: 2.0.0 dev: true - /nth-check@2.1.1: - resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - dependencies: - boolbase: 1.0.0 - dev: true - /nx@16.10.0: resolution: {integrity: sha512-gZl4iCC0Hx0Qe1VWmO4Bkeul2nttuXdPpfnlcDKSACGu3ZIo+uySqwOF8yBAxSTIf8xe2JRhgzJN1aFkuezEBg==} hasBin: true @@ -5983,72 +4835,6 @@ packages: - debug dev: true - /object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - dev: true - - /object-inspect@1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} - dev: true - - /object-is@1.1.5: - resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - dev: true - - /object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - dev: true - - /object.assign@4.1.4: - resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - has-symbols: 1.0.3 - object-keys: 1.1.1 - dev: true - - /object.entries@1.1.6: - resolution: {integrity: sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - dev: true - - /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.hasown@1.1.2: - resolution: {integrity: sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==} - dependencies: - define-properties: 1.2.0 - es-abstract: 1.21.1 - dev: true - - /object.values@1.1.6: - resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - dev: true - /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: @@ -6409,14 +5195,6 @@ packages: pathe: 1.1.1 dev: true - /postcss-selector-parser@6.0.11: - resolution: {integrity: sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==} - engines: {node: '>=4'} - dependencies: - cssesc: 3.0.0 - util-deprecate: 1.0.2 - dev: true - /postcss@8.4.31: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} @@ -6514,14 +5292,6 @@ packages: read: 2.1.0 dev: true - /prop-types@15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react-is: 16.13.1 - dev: true - /protocols@2.0.1: resolution: {integrity: sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==} dev: true @@ -6554,10 +5324,6 @@ packages: scheduler: 0.23.0 dev: false - /react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - dev: true - /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true @@ -6669,19 +5435,6 @@ packages: strip-indent: 3.0.0 dev: true - /regenerator-runtime@0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} - dev: true - - /regexp.prototype.flags@1.4.3: - resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - functions-have-names: 1.2.3 - dev: true - /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -6726,15 +5479,6 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true - /resolve@2.0.0-next.4: - resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} - hasBin: true - dependencies: - is-core-module: 2.11.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - /restore-cursor@3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} @@ -6816,14 +5560,6 @@ packages: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true - /safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - is-regex: 1.1.4 - dev: true - /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true @@ -6894,14 +5630,6 @@ packages: engines: {node: '>=8'} dev: true - /side-channel@1.0.4: - resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - object-inspect: 1.12.3 - dev: true - /siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} dev: true @@ -6938,11 +5666,6 @@ packages: engines: {node: '>=8'} dev: true - /slash@4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} - engines: {node: '>=12'} - dev: true - /smart-buffer@4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} @@ -7051,13 +5774,6 @@ packages: bl: 5.1.0 dev: true - /stop-iteration-iterator@1.0.0: - resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} - engines: {node: '>= 0.4'} - dependencies: - internal-slot: 1.0.5 - dev: true - /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -7085,35 +5801,6 @@ packages: strip-ansi: 7.1.0 dev: true - /string.prototype.matchall@4.0.8: - resolution: {integrity: sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - get-intrinsic: 1.2.0 - has-symbols: 1.0.3 - internal-slot: 1.0.5 - regexp.prototype.flags: 1.4.3 - side-channel: 1.0.4 - 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 - dev: true - - /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 - dev: true - /string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: @@ -7213,19 +5900,6 @@ packages: engines: {node: '>= 0.4'} dev: true - /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.2 - dev: true - - /tapable@2.2.1: - resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} - engines: {node: '>=6'} - dev: true - /tar-stream@2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} @@ -7286,13 +5960,6 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true - /tiny-glob@0.2.9: - resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} - dependencies: - globalyzer: 0.1.0 - globrex: 0.1.2 - dev: true - /tinybench@2.5.1: resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==} dev: true @@ -7341,15 +6008,6 @@ packages: engines: {node: '>=8'} dev: true - /tsconfig-paths@3.14.1: - resolution: {integrity: sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==} - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.2 - minimist: 1.2.8 - strip-bom: 3.0.0 - dev: true - /tsconfig-paths@4.1.2: resolution: {integrity: sha512-uhxiMgnXQp1IR622dUXI+9Ehnws7i/y6xvpZB9IbUVOPy0muvdvgXeZOn88UcGPiT98Vp3rJPTa8bFoalZ3Qhw==} engines: {node: '>=6'} @@ -7359,24 +6017,10 @@ packages: strip-bom: 3.0.0 dev: true - /tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - dev: true - /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true - /tsutils@3.21.0(typescript@5.2.2): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.2.2 - dev: true - /tuf-js@1.1.7: resolution: {integrity: sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -7430,14 +6074,6 @@ packages: engines: {node: '>=8'} dev: true - /typed-array-length@1.0.4: - resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} - dependencies: - call-bind: 1.0.2 - for-each: 0.3.3 - is-typed-array: 1.1.10 - dev: true - /typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} dependencies: @@ -7466,15 +6102,6 @@ packages: dev: true optional: true - /unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - dependencies: - call-bind: 1.0.2 - has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 - dev: true - /undici-types@5.25.3: resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==} dev: true @@ -7537,6 +6164,7 @@ packages: browserslist: 4.21.5 escalade: 3.1.1 picocolors: 1.0.0 + dev: false /update-browserslist-db@1.0.13(browserslist@4.22.1): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} @@ -7710,24 +6338,6 @@ packages: - terser dev: true - /vue-eslint-parser@9.1.0(eslint@8.51.0): - resolution: {integrity: sha512-NGn/iQy8/Wb7RrRa4aRkokyCZfOUWk19OP5HP6JEozQFX5AoS/t+Z0ZN7FY4LlmWc4FNI922V7cvX28zctN8dQ==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '>=6.0.0' - dependencies: - debug: 4.3.4 - eslint: 8.51.0 - eslint-scope: 7.1.1 - eslint-visitor-keys: 3.4.0 - espree: 9.5.1 - esquery: 1.5.0 - lodash: 4.17.21 - semver: 7.3.8 - transitivePeerDependencies: - - supports-color - dev: true - /wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -7745,41 +6355,10 @@ packages: webidl-conversions: 3.0.1 dev: true - /which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 - dev: true - - /which-collection@1.0.1: - resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} - dependencies: - is-map: 2.0.2 - is-set: 2.0.2 - is-weakmap: 2.0.1 - is-weakset: 2.0.2 - dev: true - /which-module@2.0.0: resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==} dev: true - /which-typed-array@1.1.9: - resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} - 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 - is-typed-array: 1.1.10 - dev: true - /which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -7901,11 +6480,6 @@ packages: engines: {node: '>=8'} dev: true - /xml-name-validator@4.0.0: - resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} - engines: {node: '>=12'} - dev: true - /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'}