From aad3473a7f2aa324217c2a2cf2f5638983aa26e2 Mon Sep 17 00:00:00 2001 From: Oleksandr Fediashov Date: Sat, 7 Jan 2023 15:27:25 +0100 Subject: [PATCH] chore: upgrade to Linaria v4 --- .../ahead-of-time-compilation/with-babel.md | 4 +- .../ahead-of-time-compilation/with-webpack.md | 4 +- ...-b40a43d0-1b08-4469-8ac1-c1d56a93523d.json | 7 + ...-b20f4e52-7e3f-4efc-ac1d-6157f9fb99ee.json | 7 + ...-0d6fd156-25c5-453b-a0d6-633a6c4adcb8.json | 7 + ...-294e1c0f-f12b-4129-b5dc-27cdebd726d0.json | 7 + e2e/nextjs/project.json | 2 +- e2e/nextjs/src/test.ts | 1 + package.json | 14 +- packages/babel-preset/README.md | 41 +- .../assets-multiple-declarations/output.ts | 10 +- .../assets-reset-styles/output.ts | 16 +- .../__fixtures__/assets-urls/output.ts | 4 +- .../__fixtures__/assets/output.ts | 22 +- .../__fixtures__/at-rules/output.ts | 4 +- .../config-babel-options/output.ts | 12 +- .../config-evaluation-rules/output.ts | 5 +- .../sampleEvaluator.js | 19 +- .../__fixtures__/duplicated-imports/code.ts | 10 +- .../__fixtures__/duplicated-imports/output.ts | 21 +- .../error-argument-count/fixture.js | 4 - .../__fixtures__/function-mixin/output.ts | 5 +- .../__fixtures__/import-alias/output.ts | 4 +- .../__fixtures__/import-custom-module/code.ts | 6 - .../import-custom-module/output.ts | 12 - .../__fixtures__/import-custom-name/code.ts | 6 - .../__fixtures__/import-custom-name/output.ts | 12 - .../__fixtures__/keyframes/output.ts | 4 +- .../multiple-declarations/output.ts | 7 +- .../non-existing-module-call/code.ts | 10 - .../non-existing-module-call/module.ts | 13 - .../non-existing-module-call/output.ts | 13 - .../object-computed-keys/output.ts | 5 +- .../object-imported-keys/output.ts | 5 +- .../__fixtures__/object-mixins/output.ts | 5 +- .../__fixtures__/object-nesting/output.ts | 5 +- .../__fixtures__/object-sequence-expr/code.ts | 3 +- .../object-sequence-expr/output.ts | 6 +- .../__fixtures__/object-variables/output.ts | 6 +- .../__fixtures__/object/output.ts | 4 +- .../require-custom-module/code.ts | 10 - .../require-custom-module/output.ts | 13 - .../__fixtures__/require-reset-styles/code.ts | 7 +- .../require-reset-styles/output.ts | 7 +- .../babel-preset/__fixtures__/require/code.ts | 5 +- .../__fixtures__/require/output.ts | 6 +- .../reset-styles-at-rules/output.ts | 4 +- .../__fixtures__/reset-styles/output.ts | 4 +- .../rules-with-metadata/output.ts | 4 +- .../__fixtures__/shared-mixins/output.ts | 5 +- .../__fixtures__/tokens/output.ts | 5 +- .../unsupported-css-properties/output.ts | 4 +- packages/babel-preset/package.json | 12 +- .../src/assets/absolutePathToRelative.test.ts | 62 - .../src/assets/isAssetUrl.test.ts | 24 - .../babel-preset/src/assets/isAssetUrl.ts | 11 - .../src/assets/normalizeStyleRules.test.ts | 151 -- .../src/assets/replaceAssetsWithImports.ts | 90 - ...{transformPlugin.test.ts => index.test.ts} | 68 +- packages/babel-preset/src/index.ts | 19 +- packages/babel-preset/src/schema.ts | 18 - packages/babel-preset/src/transformPlugin.ts | 354 ---- packages/babel-preset/src/types.ts | 17 +- .../babel-preset/src/utils/evaluatePaths.ts | 34 - .../src/utils/evaluatePathsInVM.test.ts | 16 - .../src/utils/evaluatePathsInVM.ts | 111 - .../babel-preset/src/validateOptions.test.ts | 24 +- packages/babel-preset/src/validateOptions.ts | 4 +- packages/babel-preset/tsconfig.spec.json | 1 + packages/linaria-processor/.eslintrc.json | 18 + packages/linaria-processor/README.md | 55 + packages/linaria-processor/jest.config.js | 14 + packages/linaria-processor/package.json | 30 + packages/linaria-processor/project.json | 49 + .../src/BaseGriffelProcessor.ts | 47 + .../src/MakeResetStylesProcessor.ts | 66 + .../src/MakeStylesProcessor.ts | 69 + .../src/assets/createRuleLiteral.test.ts | 61 + .../src/assets/createRuleLiteral.ts | 51 + .../src/assets/normalizeStyleRules.test.ts | 187 ++ .../src/assets/normalizeStyleRules.ts | 40 +- .../assets/relativePathToImportLike.test.ts | 74 + .../src/assets/relativePathToImportLike.ts} | 13 +- packages/linaria-processor/src/index.ts | 1 + packages/linaria-processor/src/types.ts | 4 + .../src/utils/dedupeCSSRules.test.ts | 0 .../src/utils/dedupeCSSRules.ts | 0 packages/linaria-processor/tsconfig.json | 23 + packages/linaria-processor/tsconfig.lib.json | 11 + packages/linaria-processor/tsconfig.spec.json | 20 + packages/react/package.json | 6 + packages/webpack-loader/README.md | 44 +- .../__fixtures__/config-modules/code.ts | 6 - .../__fixtures__/config-modules/output.ts | 12 - .../__fixtures__/empty/output.ts | 4 +- .../__fixtures__/error-argument-count/code.ts | 4 - .../error-argument-count/error.ts | 1 - .../__fixtures__/error-config/code.ts | 3 - .../__fixtures__/error-config/error.ts | 1 - .../__fixtures__/error-syntax/code.txt | 6 - .../__fixtures__/error-syntax/error.ts | 1 - .../__fixtures__/function/output.ts | 4 +- .../__fixtures__/object/output.ts | 5 +- .../__fixtures__/react-component/code.ts | 12 + .../__fixtures__/react-component/output.ts | 18 + .../__fixtures__/reset/output.ts | 5 +- .../__fixtures__/webpack-aliases/output.ts | 7 +- .../webpack-resolve-plugins/output.ts | 7 +- packages/webpack-loader/package.json | 6 +- packages/webpack-loader/src/transformSync.ts | 57 - .../webpack-loader/src/webpackLoader.test.ts | 83 +- packages/webpack-loader/src/webpackLoader.ts | 115 +- tsconfig.base.json | 3 + workspace.json | 1 + yarn.lock | 1797 +++++++++-------- 115 files changed, 2066 insertions(+), 2417 deletions(-) create mode 100644 change/@griffel-babel-preset-b40a43d0-1b08-4469-8ac1-c1d56a93523d.json create mode 100644 change/@griffel-linaria-processor-b20f4e52-7e3f-4efc-ac1d-6157f9fb99ee.json create mode 100644 change/@griffel-react-0d6fd156-25c5-453b-a0d6-633a6c4adcb8.json create mode 100644 change/@griffel-webpack-loader-294e1c0f-f12b-4129-b5dc-27cdebd726d0.json delete mode 100644 packages/babel-preset/__fixtures__/error-argument-count/fixture.js delete mode 100644 packages/babel-preset/__fixtures__/import-custom-module/code.ts delete mode 100644 packages/babel-preset/__fixtures__/import-custom-module/output.ts delete mode 100644 packages/babel-preset/__fixtures__/import-custom-name/code.ts delete mode 100644 packages/babel-preset/__fixtures__/import-custom-name/output.ts delete mode 100644 packages/babel-preset/__fixtures__/non-existing-module-call/code.ts delete mode 100644 packages/babel-preset/__fixtures__/non-existing-module-call/module.ts delete mode 100644 packages/babel-preset/__fixtures__/non-existing-module-call/output.ts delete mode 100644 packages/babel-preset/__fixtures__/require-custom-module/code.ts delete mode 100644 packages/babel-preset/__fixtures__/require-custom-module/output.ts delete mode 100644 packages/babel-preset/src/assets/absolutePathToRelative.test.ts delete mode 100644 packages/babel-preset/src/assets/isAssetUrl.test.ts delete mode 100644 packages/babel-preset/src/assets/isAssetUrl.ts delete mode 100644 packages/babel-preset/src/assets/normalizeStyleRules.test.ts delete mode 100644 packages/babel-preset/src/assets/replaceAssetsWithImports.ts rename packages/babel-preset/src/{transformPlugin.test.ts => index.test.ts} (77%) delete mode 100644 packages/babel-preset/src/transformPlugin.ts delete mode 100644 packages/babel-preset/src/utils/evaluatePaths.ts delete mode 100644 packages/babel-preset/src/utils/evaluatePathsInVM.test.ts delete mode 100644 packages/babel-preset/src/utils/evaluatePathsInVM.ts create mode 100644 packages/linaria-processor/.eslintrc.json create mode 100644 packages/linaria-processor/README.md create mode 100644 packages/linaria-processor/jest.config.js create mode 100644 packages/linaria-processor/package.json create mode 100644 packages/linaria-processor/project.json create mode 100644 packages/linaria-processor/src/BaseGriffelProcessor.ts create mode 100644 packages/linaria-processor/src/MakeResetStylesProcessor.ts create mode 100644 packages/linaria-processor/src/MakeStylesProcessor.ts create mode 100644 packages/linaria-processor/src/assets/createRuleLiteral.test.ts create mode 100644 packages/linaria-processor/src/assets/createRuleLiteral.ts create mode 100644 packages/linaria-processor/src/assets/normalizeStyleRules.test.ts rename packages/{babel-preset => linaria-processor}/src/assets/normalizeStyleRules.ts (60%) create mode 100644 packages/linaria-processor/src/assets/relativePathToImportLike.test.ts rename packages/{babel-preset/src/assets/absolutePathToRelative.ts => linaria-processor/src/assets/relativePathToImportLike.ts} (59%) create mode 100644 packages/linaria-processor/src/index.ts create mode 100644 packages/linaria-processor/src/types.ts rename packages/{babel-preset => linaria-processor}/src/utils/dedupeCSSRules.test.ts (100%) rename packages/{babel-preset => linaria-processor}/src/utils/dedupeCSSRules.ts (100%) create mode 100644 packages/linaria-processor/tsconfig.json create mode 100644 packages/linaria-processor/tsconfig.lib.json create mode 100644 packages/linaria-processor/tsconfig.spec.json delete mode 100644 packages/webpack-loader/__fixtures__/config-modules/code.ts delete mode 100644 packages/webpack-loader/__fixtures__/config-modules/output.ts delete mode 100644 packages/webpack-loader/__fixtures__/error-argument-count/code.ts delete mode 100644 packages/webpack-loader/__fixtures__/error-argument-count/error.ts delete mode 100644 packages/webpack-loader/__fixtures__/error-config/code.ts delete mode 100644 packages/webpack-loader/__fixtures__/error-config/error.ts delete mode 100644 packages/webpack-loader/__fixtures__/error-syntax/code.txt delete mode 100644 packages/webpack-loader/__fixtures__/error-syntax/error.ts create mode 100644 packages/webpack-loader/__fixtures__/react-component/code.ts create mode 100644 packages/webpack-loader/__fixtures__/react-component/output.ts delete mode 100644 packages/webpack-loader/src/transformSync.ts diff --git a/apps/website/docs/react/ahead-of-time-compilation/with-babel.md b/apps/website/docs/react/ahead-of-time-compilation/with-babel.md index bff405335..609cbee47 100644 --- a/apps/website/docs/react/ahead-of-time-compilation/with-babel.md +++ b/apps/website/docs/react/ahead-of-time-compilation/with-babel.md @@ -13,14 +13,14 @@ import TabItem from '@theme/TabItem'; ```shell -yarn add --dev @griffel/babel-preset +yarn add --dev @griffel/babel-preset @griffel/linaria-processor ``` ```shell -npm install --save-dev @griffel/babel-preset +npm install --save-dev @griffel/babel-preset @griffel/linaria-processor ``` diff --git a/apps/website/docs/react/ahead-of-time-compilation/with-webpack.md b/apps/website/docs/react/ahead-of-time-compilation/with-webpack.md index 2c1096553..fe5da823d 100644 --- a/apps/website/docs/react/ahead-of-time-compilation/with-webpack.md +++ b/apps/website/docs/react/ahead-of-time-compilation/with-webpack.md @@ -13,14 +13,14 @@ import TabItem from '@theme/TabItem'; ```shell -yarn add --dev @griffel/webpack-loader +yarn add --dev @griffel/linaria-processor @griffel/webpack-loader ``` ```shell -npm install --save-dev @griffel/webpack-loader +npm install --save-dev @griffel/linaria-processor @griffel/webpack-loader ``` diff --git a/change/@griffel-babel-preset-b40a43d0-1b08-4469-8ac1-c1d56a93523d.json b/change/@griffel-babel-preset-b40a43d0-1b08-4469-8ac1-c1d56a93523d.json new file mode 100644 index 000000000..2e22eca7d --- /dev/null +++ b/change/@griffel-babel-preset-b40a43d0-1b08-4469-8ac1-c1d56a93523d.json @@ -0,0 +1,7 @@ +{ + "type": "major", + "comment": "BREAKING: update to Linaria v4", + "packageName": "@griffel/babel-preset", + "email": "olfedias@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@griffel-linaria-processor-b20f4e52-7e3f-4efc-ac1d-6157f9fb99ee.json b/change/@griffel-linaria-processor-b20f4e52-7e3f-4efc-ac1d-6157f9fb99ee.json new file mode 100644 index 000000000..063a1a8ec --- /dev/null +++ b/change/@griffel-linaria-processor-b20f4e52-7e3f-4efc-ac1d-6157f9fb99ee.json @@ -0,0 +1,7 @@ +{ + "type": "major", + "comment": "chore: initial release", + "packageName": "@griffel/linaria-processor", + "email": "olfedias@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@griffel-react-0d6fd156-25c5-453b-a0d6-633a6c4adcb8.json b/change/@griffel-react-0d6fd156-25c5-453b-a0d6-633a6c4adcb8.json new file mode 100644 index 000000000..47ec6490e --- /dev/null +++ b/change/@griffel-react-0d6fd156-25c5-453b-a0d6-633a6c4adcb8.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: add meta to package.json for @griffel/processor", + "packageName": "@griffel/react", + "email": "olfedias@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@griffel-webpack-loader-294e1c0f-f12b-4129-b5dc-27cdebd726d0.json b/change/@griffel-webpack-loader-294e1c0f-f12b-4129-b5dc-27cdebd726d0.json new file mode 100644 index 000000000..c51c1a388 --- /dev/null +++ b/change/@griffel-webpack-loader-294e1c0f-f12b-4129-b5dc-27cdebd726d0.json @@ -0,0 +1,7 @@ +{ + "type": "major", + "comment": "BREAKING: update to Linaria v4", + "packageName": "@griffel/webpack-loader", + "email": "olfedias@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/e2e/nextjs/project.json b/e2e/nextjs/project.json index bff67292e..95871550d 100644 --- a/e2e/nextjs/project.json +++ b/e2e/nextjs/project.json @@ -3,7 +3,7 @@ "$schema": "../../node_modules/nx/schemas/project-schema.json", "sourceRoot": "e2e/nextjs/src", "projectType": "library", - "implicitDependencies": ["@griffel/webpack-loader"], + "implicitDependencies": ["@griffel/linaria-processor", "@griffel/webpack-loader"], "targets": { "test": { "executor": "nx:run-commands", diff --git a/e2e/nextjs/src/test.ts b/e2e/nextjs/src/test.ts index 35e8587b7..e3dc06719 100644 --- a/e2e/nextjs/src/test.ts +++ b/e2e/nextjs/src/test.ts @@ -23,6 +23,7 @@ async function performTest() { packLocalPackage(rootDir, tempDir, '@griffel/style-types'), packLocalPackage(rootDir, tempDir, '@griffel/core'), packLocalPackage(rootDir, tempDir, '@griffel/react'), + packLocalPackage(rootDir, tempDir, '@griffel/linaria-processor'), packLocalPackage(rootDir, tempDir, '@griffel/webpack-extraction-plugin'), packLocalPackage(rootDir, tempDir, '@griffel/webpack-loader'), packLocalPackage(rootDir, tempDir, '@griffel/next-extraction-plugin'), diff --git a/package.json b/package.json index 545a0a949..74a453893 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "type-check": "nx affected --target=type-check" }, "devDependencies": { + "@babel/generator": "^7.12.13", "@babel/preset-react": "^7.14.5", "@babel/preset-typescript": "7.12.13", "@codesandbox/sandpack-react": "1.18.4", @@ -50,6 +51,7 @@ "@storybook/builder-webpack5": "6.5.15", "@storybook/manager-webpack5": "6.5.15", "@storybook/react": "6.5.15", + "@swc/core": "^1.3.19", "@testing-library/jest-dom": "5.16.1", "@testing-library/react": "13.4.0", "@tsconfig/docusaurus": "^1.0.4", @@ -137,20 +139,18 @@ }, "dependencies": { "@babel/core": "^7.12.13", - "@babel/generator": "^7.12.13", "@babel/helper-module-imports": "^7.12.13", "@babel/helper-plugin-utils": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.12.13", "@emotion/hash": "^0.9.0", - "@linaria/babel-preset": "^3.0.0-beta.23", - "@linaria/shaker": "^3.0.0-beta.22", - "@swc/core": "^1.3.19", + "@linaria/babel-preset": "^4.5.4", + "@linaria/shaker": "^4.5.3", + "@linaria/tags": "^4.5.4", + "@linaria/utils": "^4.5.3", + "@linaria/webpack-loader": "^4.5.4", "@typescript-eslint/utils": "^5.47.0", "ajv": "^8.4.0", "browserslist": "^4.19.1", "csstype": "^3.1.2", - "enhanced-resolve": "^5.8.2", "rtl-css-js": "^1.16.1", "source-map-js": "1.0.2", "stylis": "^4.2.0", diff --git a/packages/babel-preset/README.md b/packages/babel-preset/README.md index 46c842373..0c80521b7 100644 --- a/packages/babel-preset/README.md +++ b/packages/babel-preset/README.md @@ -21,9 +21,9 @@ A Babel preset that performs build time transforms for [`@griffel/react`](../rea ## Install ```bash -yarn add --dev @griffel/babel-preset +yarn add --dev @griffel/babel-preset @griffel/linaria-processor # or -npm install --save-dev @griffel/babel-preset +npm install --save-dev @griffel/babel-preset @griffel/linaria-processor ``` ## When to use it? @@ -49,22 +49,27 @@ import { makeStyles } from 'custom-package'; import { createStyles } from 'custom-package'; ``` -By default, preset handles imports from `@griffel/react` & `@fluentui/react-components`, to handle imports from custom packages settings should be tweaked: +By default, preset handles imports from `@griffel/react` & `@fluentui/react-components`, to handle imports from custom packages settings you need to include meta information to a matching `package.json`: ```json { - "presets": [ - [ - "@griffel", - { - "modules": [{ "moduleSource": "custom-package", "importName": "makeStyles" }] - } - ] - ] + "name": "custom-package", + "version": "1.0.0", + "linaria": { + "tags": { + "makeStyles": "@griffel/linaria-processor/make-styles", + "makeResetStyles": "@griffel/linaria-processor/make-reset-styles" + } + } } ``` -> **Note**: "custom-package" should re-export `__styles` function from `@griffel/react` +> **Note**: "custom-package" should re-export following functions from `@griffel/react`: +> +> - `__styles` +> - `__css` +> - `__resetStyles` +> - `__resetCSS` ### Configuring Babel settings @@ -156,9 +161,9 @@ const useStyles = makeStyles({ roughly to ```js -import { __styles } from '@griffel/react'; +import { __styles as _styles } from '@griffel/react'; -const useStyles = __styles(/* resolved styles */); +const useStyles = _styles(/* resolved styles */); ``` ## Troubleshooting @@ -168,7 +173,7 @@ However, the concepts are not coupled to the repo setup. ### Module evaluation -The preset uses tools from [linaria](https://github.com/callstack/linaria) to evaluate runtime calls of `makeStyles`. +The preset reuses `@linaria/babel-preset` from [linaria](https://github.com/callstack/linaria) to evaluate runtime calls of `makeStyles` and `makeResetStyles`. [Linaria's debugging documentation can help here](https://github.com/callstack/linaria/blob/master/CONTRIBUTING.md#debugging-and-deep-dive-into-babel-plugin). Debugging output can be activated with following environment variables: @@ -182,9 +187,3 @@ On Windows it's required to set environment variables via [`set`](https://docs.m ```sh $ cross-env DEBUG=linaria\* LINARIA_LOG=debug yarn build ``` - -The debug output will include: - -- Prepared code -- Evaluated code -- AST that indicates what code has been shaken with `@linaria/shaker` diff --git a/packages/babel-preset/__fixtures__/assets-multiple-declarations/output.ts b/packages/babel-preset/__fixtures__/assets-multiple-declarations/output.ts index 56fa34f7a..32aed5e39 100644 --- a/packages/babel-preset/__fixtures__/assets-multiple-declarations/output.ts +++ b/packages/babel-preset/__fixtures__/assets-multiple-declarations/output.ts @@ -1,15 +1,13 @@ +import { __styles as _styles } from '@griffel/react'; import _asset2 from './empty.jpg'; import _asset from './blank.jpg'; -import { __styles } from '@griffel/react'; -import blank from './blank.jpg'; -import empty from './empty.jpg'; -export const useStyles = __styles( +export const useStyles = /*#__PURE__*/ _styles( { root: { - Bcmaq0h: 'fp00rh9', + Bcmaq0h: 'f1surbjy', }, }, { - d: [`.fp00rh9{background-image:url(${_asset}),url(${_asset2});}`], + d: [`.f1surbjy{background-image:url(${_asset}),url(${_asset2});}`], }, ); diff --git a/packages/babel-preset/__fixtures__/assets-reset-styles/output.ts b/packages/babel-preset/__fixtures__/assets-reset-styles/output.ts index f582824f6..611acf347 100644 --- a/packages/babel-preset/__fixtures__/assets-reset-styles/output.ts +++ b/packages/babel-preset/__fixtures__/assets-reset-styles/output.ts @@ -1,11 +1,9 @@ -import _asset2 from './empty.jpg'; +import { __resetStyles as _resetStyles } from '@griffel/react'; +import _asset3 from './empty.jpg'; +import _asset2 from './blank.jpg'; import _asset from './blank.jpg'; -import { __resetStyles } from '@griffel/react'; -import blank from './blank.jpg'; -import blankDuplicate from './blank.jpg'; -import empty from './empty.jpg'; -export const useStyles = __resetStyles('ra9m047', null, [ - `.ra9m047{background-image:url(${_asset});}`, - `.ra9m047:hover{background-image:url(${_asset});}`, - `.ra9m047:focus{background-image:url(${_asset2});}`, +export const useStyles = /*#__PURE__*/ _resetStyles('rzkd6zb', null, [ + `.rzkd6zb{background-image:url(${_asset});}`, + `.rzkd6zb:hover{background-image:url(${_asset2});}`, + `.rzkd6zb:focus{background-image:url(${_asset3});}`, ]); diff --git a/packages/babel-preset/__fixtures__/assets-urls/output.ts b/packages/babel-preset/__fixtures__/assets-urls/output.ts index 082fd705e..260058ea3 100644 --- a/packages/babel-preset/__fixtures__/assets-urls/output.ts +++ b/packages/babel-preset/__fixtures__/assets-urls/output.ts @@ -1,5 +1,5 @@ -import { __styles } from '@griffel/react'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { httpUrl: { Bcmaq0h: 'f405sdg', diff --git a/packages/babel-preset/__fixtures__/assets/output.ts b/packages/babel-preset/__fixtures__/assets/output.ts index 652af3b2d..b5c908aa8 100644 --- a/packages/babel-preset/__fixtures__/assets/output.ts +++ b/packages/babel-preset/__fixtures__/assets/output.ts @@ -1,30 +1,26 @@ -import _asset3 from './a.svg'; +import { __styles as _styles } from '@griffel/react'; import _asset2 from './empty.jpg'; import _asset from './blank.jpg'; -import { __styles } from '@griffel/react'; -import blank from './blank.jpg'; -import blankDuplicate from './blank.jpg'; -import empty from './empty.jpg'; -export const useStyles = __styles( +export const useStyles = /*#__PURE__*/ _styles( { rootA: { - Bcmaq0h: 'fnwsaxv', + Bcmaq0h: 'f1lg9ji5', }, rootB: { - Bcmaq0h: 'fnwsaxv', + Bcmaq0h: 'f1lg9ji5', }, rootC: { - Bcmaq0h: 'f1ryfumh', + Bcmaq0h: 'feire57', }, assetWithHash: { - Bhu2qc9: 'fv04sme', + Bhu2qc9: 'f12vvth1', }, }, { d: [ - `.fnwsaxv{background-image:url(${_asset});}`, - `.f1ryfumh{background-image:url(${_asset2});}`, - `.fv04sme{filter:url(${_asset3}#a);}`, + `.f1lg9ji5{background-image:url(${_asset});}`, + `.feire57{background-image:url(${_asset2});}`, + `.f12vvth1{filter:url(./a.svg#a);}`, ], }, ); diff --git a/packages/babel-preset/__fixtures__/at-rules/output.ts b/packages/babel-preset/__fixtures__/at-rules/output.ts index 6310605e7..0da41e64d 100644 --- a/packages/babel-preset/__fixtures__/at-rules/output.ts +++ b/packages/babel-preset/__fixtures__/at-rules/output.ts @@ -1,5 +1,5 @@ -import { __styles } from '@griffel/react'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { cvzfql: ['f13wceqr', 'fmtq1hn'], diff --git a/packages/babel-preset/__fixtures__/config-babel-options/output.ts b/packages/babel-preset/__fixtures__/config-babel-options/output.ts index 658f15b66..2b7acf8df 100644 --- a/packages/babel-preset/__fixtures__/config-babel-options/output.ts +++ b/packages/babel-preset/__fixtures__/config-babel-options/output.ts @@ -1,13 +1,5 @@ -import { __styles } from '@griffel/react'; -const func = () => { - // This assignment has no sense, but it will prevent us from evaluation in AST - // This fixture uses "colorRenamePlugin.js" in transformPlugin's config so input we should get a different color - const color = 'red'; - return { - color, - }; -}; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { sj55zd: 'f163i14w', diff --git a/packages/babel-preset/__fixtures__/config-evaluation-rules/output.ts b/packages/babel-preset/__fixtures__/config-evaluation-rules/output.ts index 303604072..2b7acf8df 100644 --- a/packages/babel-preset/__fixtures__/config-evaluation-rules/output.ts +++ b/packages/babel-preset/__fixtures__/config-evaluation-rules/output.ts @@ -1,6 +1,5 @@ -import { __styles } from '@griffel/react'; -import { colorRed } from './consts'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { sj55zd: 'f163i14w', diff --git a/packages/babel-preset/__fixtures__/config-evaluation-rules/sampleEvaluator.js b/packages/babel-preset/__fixtures__/config-evaluation-rules/sampleEvaluator.js index 8871cf21f..2c2a3fb9c 100644 --- a/packages/babel-preset/__fixtures__/config-evaluation-rules/sampleEvaluator.js +++ b/packages/babel-preset/__fixtures__/config-evaluation-rules/sampleEvaluator.js @@ -1,12 +1,19 @@ // @ts-check -/** @type {import("@linaria/babel-preset").Evaluator} */ -const sampleEvaluator = () => { - // Evaluators transform input code to something that will be evaluated by Node later. In evaluatePathsInVM() we expect - // that results will be available as "exports.__mkPreval", this evaluator mocks it - const result = `exports.__mkPreval = [{ root: { color: 'blue' } }]`; +/** @type {import("@linaria/utils").Evaluator} */ +const sampleEvaluator = (babelOptions, ast) => { + // Evaluators transform input code to something that will be evaluated by Node + // later. Linaria expects that results will be available as + // "exports.__linariaPreval", this evaluator mocks it + const result = ` + exports.__linariaPreval = { + _exp: () => ({ + root: { color: 'blue' } + }) + }; + `; - return [result, null]; + return [ast, result, null]; }; module.exports.default = sampleEvaluator; diff --git a/packages/babel-preset/__fixtures__/duplicated-imports/code.ts b/packages/babel-preset/__fixtures__/duplicated-imports/code.ts index 8c4eb21f0..968db4043 100644 --- a/packages/babel-preset/__fixtures__/duplicated-imports/code.ts +++ b/packages/babel-preset/__fixtures__/duplicated-imports/code.ts @@ -1,12 +1,10 @@ -// @ts-expect-error This module does not exist, but will be resolved via aliases -import { createStylesA } from 'custom-package'; -// @ts-expect-error This module does not exist, but will be resolved via aliases -import { createStylesB } from 'custom-package'; +import { makeStyles as makeStylesA } from '@griffel/react'; +import { makeStyles as makeStylesB } from '@griffel/react'; -export const useClassesA = createStylesA({ +export const useClassesA = makeStylesA({ root: { color: 'red' }, }); -export const useClassesB = createStylesB({ +export const useClassesB = makeStylesB({ root: { color: 'yellow' }, }); diff --git a/packages/babel-preset/__fixtures__/duplicated-imports/output.ts b/packages/babel-preset/__fixtures__/duplicated-imports/output.ts index cd944f8b2..ff0abe6d0 100644 --- a/packages/babel-preset/__fixtures__/duplicated-imports/output.ts +++ b/packages/babel-preset/__fixtures__/duplicated-imports/output.ts @@ -1,8 +1,6 @@ -// @ts-expect-error This module does not exist, but will be resolved via aliases -import { __styles } from 'custom-package'; -// @ts-expect-error This module does not exist, but will be resolved via aliases -import { createStylesB } from 'custom-package'; -export const useClassesA = __styles( +import { __styles as _styles2 } from '@griffel/react'; +import { __styles as _styles } from '@griffel/react'; +export const useClassesA = /*#__PURE__*/ _styles( { root: { sj55zd: 'fe3e8s9', @@ -12,8 +10,13 @@ export const useClassesA = __styles( d: ['.fe3e8s9{color:red;}'], }, ); -export const useClassesB = createStylesB({ - root: { - color: 'yellow', +export const useClassesB = /*#__PURE__*/ _styles2( + { + root: { + sj55zd: 'f1aqe04n', + }, }, -}); + { + d: ['.f1aqe04n{color:yellow;}'], + }, +); diff --git a/packages/babel-preset/__fixtures__/error-argument-count/fixture.js b/packages/babel-preset/__fixtures__/error-argument-count/fixture.js deleted file mode 100644 index 1f0d00fd9..000000000 --- a/packages/babel-preset/__fixtures__/error-argument-count/fixture.js +++ /dev/null @@ -1,4 +0,0 @@ -import { makeStyles } from '@griffel/react'; - -// This file is .js intentionally to avoid TS compiler errors -export const useStyles = makeStyles({ root: { color: 'red' } }, 'foo'); diff --git a/packages/babel-preset/__fixtures__/function-mixin/output.ts b/packages/babel-preset/__fixtures__/function-mixin/output.ts index 51ced1db5..f48f0faf6 100644 --- a/packages/babel-preset/__fixtures__/function-mixin/output.ts +++ b/packages/babel-preset/__fixtures__/function-mixin/output.ts @@ -1,6 +1,5 @@ -import { __styles } from '@griffel/react'; -import { createMixin } from './mixins'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { avatar: { sj55zd: 'f1817uup', diff --git a/packages/babel-preset/__fixtures__/import-alias/output.ts b/packages/babel-preset/__fixtures__/import-alias/output.ts index 27d3dfbc6..44ef1b6c7 100644 --- a/packages/babel-preset/__fixtures__/import-alias/output.ts +++ b/packages/babel-preset/__fixtures__/import-alias/output.ts @@ -1,5 +1,5 @@ -import { __styles } from '@griffel/react'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { sj55zd: 'fe3e8s9', diff --git a/packages/babel-preset/__fixtures__/import-custom-module/code.ts b/packages/babel-preset/__fixtures__/import-custom-module/code.ts deleted file mode 100644 index 05a61939e..000000000 --- a/packages/babel-preset/__fixtures__/import-custom-module/code.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-expect-error This module does not exist, but will be resolved via aliases -import { makeStyles } from 'custom-package'; - -export const useStyles = makeStyles({ - root: { color: 'red' }, -}); diff --git a/packages/babel-preset/__fixtures__/import-custom-module/output.ts b/packages/babel-preset/__fixtures__/import-custom-module/output.ts deleted file mode 100644 index e53499e0b..000000000 --- a/packages/babel-preset/__fixtures__/import-custom-module/output.ts +++ /dev/null @@ -1,12 +0,0 @@ -// @ts-expect-error This module does not exist, but will be resolved via aliases -import { __styles } from 'custom-package'; -export const useStyles = __styles( - { - root: { - sj55zd: 'fe3e8s9', - }, - }, - { - d: ['.fe3e8s9{color:red;}'], - }, -); diff --git a/packages/babel-preset/__fixtures__/import-custom-name/code.ts b/packages/babel-preset/__fixtures__/import-custom-name/code.ts deleted file mode 100644 index fe1f8436b..000000000 --- a/packages/babel-preset/__fixtures__/import-custom-name/code.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-expect-error This module does not exist, but will be resolved via aliases -import { createStyles } from 'custom-package'; - -export const useStyles = createStyles({ - root: { color: 'red' }, -}); diff --git a/packages/babel-preset/__fixtures__/import-custom-name/output.ts b/packages/babel-preset/__fixtures__/import-custom-name/output.ts deleted file mode 100644 index e53499e0b..000000000 --- a/packages/babel-preset/__fixtures__/import-custom-name/output.ts +++ /dev/null @@ -1,12 +0,0 @@ -// @ts-expect-error This module does not exist, but will be resolved via aliases -import { __styles } from 'custom-package'; -export const useStyles = __styles( - { - root: { - sj55zd: 'fe3e8s9', - }, - }, - { - d: ['.fe3e8s9{color:red;}'], - }, -); diff --git a/packages/babel-preset/__fixtures__/keyframes/output.ts b/packages/babel-preset/__fixtures__/keyframes/output.ts index 10655ab89..1edc6aebc 100644 --- a/packages/babel-preset/__fixtures__/keyframes/output.ts +++ b/packages/babel-preset/__fixtures__/keyframes/output.ts @@ -1,5 +1,5 @@ -import { __styles } from '@griffel/react'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { single: { Bv12yb3: ['f1g6ul6r', 'f1fp4ujf'], diff --git a/packages/babel-preset/__fixtures__/multiple-declarations/output.ts b/packages/babel-preset/__fixtures__/multiple-declarations/output.ts index 7a796c441..990a3a308 100644 --- a/packages/babel-preset/__fixtures__/multiple-declarations/output.ts +++ b/packages/babel-preset/__fixtures__/multiple-declarations/output.ts @@ -1,5 +1,6 @@ -import { __styles } from '@griffel/react'; -export const useStyles1 = __styles( +import { __styles as _styles2 } from '@griffel/react'; +import { __styles as _styles } from '@griffel/react'; +export const useStyles1 = /*#__PURE__*/ _styles( { root: { sj55zd: 'fe3e8s9', @@ -9,7 +10,7 @@ export const useStyles1 = __styles( d: ['.fe3e8s9{color:red;}'], }, ); -export const useStyles2 = __styles( +export const useStyles2 = /*#__PURE__*/ _styles2( { root: { sj55zd: 'fka9v86', diff --git a/packages/babel-preset/__fixtures__/non-existing-module-call/code.ts b/packages/babel-preset/__fixtures__/non-existing-module-call/code.ts deleted file mode 100644 index 82a5a97f7..000000000 --- a/packages/babel-preset/__fixtures__/non-existing-module-call/code.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { makeStyles } from '@griffel/react'; -import { createModule } from './module'; - -export const useStyles = makeStyles({ - container: { - color: 'red', - }, -}); - -createModule().baz(); diff --git a/packages/babel-preset/__fixtures__/non-existing-module-call/module.ts b/packages/babel-preset/__fixtures__/non-existing-module-call/module.ts deleted file mode 100644 index 3158365a5..000000000 --- a/packages/babel-preset/__fixtures__/non-existing-module-call/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -type FakeModule = { - foo: () => void; - bar: () => void; - baz: () => void; -}; - -export function createModule(): FakeModule { - return { - foo: () => {}, - bar: () => {}, - // this implementation intentionally missing "baz" property to throw on calls in runtime - } as unknown as FakeModule; -} diff --git a/packages/babel-preset/__fixtures__/non-existing-module-call/output.ts b/packages/babel-preset/__fixtures__/non-existing-module-call/output.ts deleted file mode 100644 index f735a9172..000000000 --- a/packages/babel-preset/__fixtures__/non-existing-module-call/output.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { __styles } from '@griffel/react'; -import { createModule } from './module'; -export const useStyles = __styles( - { - container: { - sj55zd: 'fe3e8s9', - }, - }, - { - d: ['.fe3e8s9{color:red;}'], - }, -); -createModule().baz(); diff --git a/packages/babel-preset/__fixtures__/object-computed-keys/output.ts b/packages/babel-preset/__fixtures__/object-computed-keys/output.ts index 9e8cd4cff..7a7340c6f 100644 --- a/packages/babel-preset/__fixtures__/object-computed-keys/output.ts +++ b/packages/babel-preset/__fixtures__/object-computed-keys/output.ts @@ -1,6 +1,5 @@ -import { __styles } from '@griffel/react'; -const rootSlot = 'root'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { sj55zd: 'fe3e8s9', diff --git a/packages/babel-preset/__fixtures__/object-imported-keys/output.ts b/packages/babel-preset/__fixtures__/object-imported-keys/output.ts index 3640bc8c4..98d4b5708 100644 --- a/packages/babel-preset/__fixtures__/object-imported-keys/output.ts +++ b/packages/babel-preset/__fixtures__/object-imported-keys/output.ts @@ -1,6 +1,5 @@ -import { __styles } from '@griffel/react'; -import { className, selector } from './consts'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { B0egftl: 'f1wgwx3x', diff --git a/packages/babel-preset/__fixtures__/object-mixins/output.ts b/packages/babel-preset/__fixtures__/object-mixins/output.ts index 9d6f1d206..7cb95b6ae 100644 --- a/packages/babel-preset/__fixtures__/object-mixins/output.ts +++ b/packages/babel-preset/__fixtures__/object-mixins/output.ts @@ -1,6 +1,5 @@ -import { __styles } from '@griffel/react'; -import { flexStyles, gridStyles, typography } from './mixins'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { mc9l5x: 'f22iagw', diff --git a/packages/babel-preset/__fixtures__/object-nesting/output.ts b/packages/babel-preset/__fixtures__/object-nesting/output.ts index d1304b8cc..d5555b4b5 100644 --- a/packages/babel-preset/__fixtures__/object-nesting/output.ts +++ b/packages/babel-preset/__fixtures__/object-nesting/output.ts @@ -1,6 +1,5 @@ -import { __styles } from '@griffel/react'; -import { colorBlue } from './consts'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { mc9l5x: 'f22iagw', diff --git a/packages/babel-preset/__fixtures__/object-sequence-expr/code.ts b/packages/babel-preset/__fixtures__/object-sequence-expr/code.ts index dab6d2abf..27f2cf785 100644 --- a/packages/babel-preset/__fixtures__/object-sequence-expr/code.ts +++ b/packages/babel-preset/__fixtures__/object-sequence-expr/code.ts @@ -1,4 +1,5 @@ -import { makeStyles, GriffelStyle } from '@griffel/react'; +import { makeStyles } from '@griffel/react'; +import type { GriffelStyle } from '@griffel/react'; const switchClassName = 'fui-Switch'; let _a: Record; diff --git a/packages/babel-preset/__fixtures__/object-sequence-expr/output.ts b/packages/babel-preset/__fixtures__/object-sequence-expr/output.ts index 4da492c9c..1398f6832 100644 --- a/packages/babel-preset/__fixtures__/object-sequence-expr/output.ts +++ b/packages/babel-preset/__fixtures__/object-sequence-expr/output.ts @@ -1,7 +1,7 @@ -import { __styles, GriffelStyle } from '@griffel/react'; -const switchClassName = 'fui-Switch'; +import { __styles as _styles } from '@griffel/react'; +import type { GriffelStyle } from '@griffel/react'; let _a: Record; -export const useStyles = __styles( +export const useStyles = /*#__PURE__*/ _styles( { root: { ozcac4: 'f1cm6cy7', diff --git a/packages/babel-preset/__fixtures__/object-variables/output.ts b/packages/babel-preset/__fixtures__/object-variables/output.ts index 4d0f53c0c..703a35dcd 100644 --- a/packages/babel-preset/__fixtures__/object-variables/output.ts +++ b/packages/babel-preset/__fixtures__/object-variables/output.ts @@ -1,7 +1,5 @@ -import { __styles } from '@griffel/react'; -import { colorGreen, theme } from './vars'; -const colorRed = 'red'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { sj55zd: 'fe3e8s9', diff --git a/packages/babel-preset/__fixtures__/object/output.ts b/packages/babel-preset/__fixtures__/object/output.ts index 3fbb29473..5297e9d31 100644 --- a/packages/babel-preset/__fixtures__/object/output.ts +++ b/packages/babel-preset/__fixtures__/object/output.ts @@ -1,5 +1,5 @@ -import { __styles } from '@griffel/react'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { sj55zd: 'fe3e8s9', diff --git a/packages/babel-preset/__fixtures__/require-custom-module/code.ts b/packages/babel-preset/__fixtures__/require-custom-module/code.ts deleted file mode 100644 index 21ca02b1d..000000000 --- a/packages/babel-preset/__fixtures__/require-custom-module/code.ts +++ /dev/null @@ -1,10 +0,0 @@ -const react_make_styles_1 = require('custom-package'); - -export const useStyles = react_make_styles_1.makeStyles({ - root: { - fontSize: '14px', - lineHeight: 1, - }, -}); - -console.log(useStyles); diff --git a/packages/babel-preset/__fixtures__/require-custom-module/output.ts b/packages/babel-preset/__fixtures__/require-custom-module/output.ts deleted file mode 100644 index 6fd3af32f..000000000 --- a/packages/babel-preset/__fixtures__/require-custom-module/output.ts +++ /dev/null @@ -1,13 +0,0 @@ -const react_make_styles_1 = require('custom-package'); -export const useStyles = react_make_styles_1.__styles( - { - root: { - Be2twd7: 'fses1vf', - Bg96gwp: 'fp6vxd', - }, - }, - { - d: ['.fses1vf{font-size:14px;}', '.fp6vxd{line-height:1;}'], - }, -); -console.log(useStyles); diff --git a/packages/babel-preset/__fixtures__/require-reset-styles/code.ts b/packages/babel-preset/__fixtures__/require-reset-styles/code.ts index 2194b3342..9aa8f0ae0 100644 --- a/packages/babel-preset/__fixtures__/require-reset-styles/code.ts +++ b/packages/babel-preset/__fixtures__/require-reset-styles/code.ts @@ -1,6 +1,7 @@ -const react_make_styles_1 = require('@griffel/react'); - -export const useStyles = react_make_styles_1.makeResetStyles({ +const react_make_styles_2 = require('@griffel/react'); +const useResetStyles = react_make_styles_2.makeResetStyles({ fontSize: '14px', lineHeight: 1, }); + +exports.useResetStyles = useResetStyles; diff --git a/packages/babel-preset/__fixtures__/require-reset-styles/output.ts b/packages/babel-preset/__fixtures__/require-reset-styles/output.ts index 99637e266..2bf1728df 100644 --- a/packages/babel-preset/__fixtures__/require-reset-styles/output.ts +++ b/packages/babel-preset/__fixtures__/require-reset-styles/output.ts @@ -1,4 +1,3 @@ -const react_make_styles_1 = require('@griffel/react'); -export const useStyles = react_make_styles_1.__resetStyles('r1qlvv59', null, [ - '.r1qlvv59{font-size:14px;line-height:1;}', -]); +var _resetStyles = require('@griffel/react').__resetStyles; +const useResetStyles = /*#__PURE__*/ _resetStyles('r1qlvv59', null, ['.r1qlvv59{font-size:14px;line-height:1;}']); +exports.useResetStyles = useResetStyles; diff --git a/packages/babel-preset/__fixtures__/require/code.ts b/packages/babel-preset/__fixtures__/require/code.ts index 6d560d7ea..689b5b7e7 100644 --- a/packages/babel-preset/__fixtures__/require/code.ts +++ b/packages/babel-preset/__fixtures__/require/code.ts @@ -1,10 +1,9 @@ const react_make_styles_1 = require('@griffel/react'); - -export const useStyles = react_make_styles_1.makeStyles({ +const useStyles = react_make_styles_1.makeStyles({ root: { fontSize: '14px', lineHeight: 1, }, }); -console.log(useStyles); +exports.useStyles = useStyles; diff --git a/packages/babel-preset/__fixtures__/require/output.ts b/packages/babel-preset/__fixtures__/require/output.ts index e217c3f33..c3b4f1ad6 100644 --- a/packages/babel-preset/__fixtures__/require/output.ts +++ b/packages/babel-preset/__fixtures__/require/output.ts @@ -1,5 +1,5 @@ -const react_make_styles_1 = require('@griffel/react'); -export const useStyles = react_make_styles_1.__styles( +var _styles = require('@griffel/react').__styles; +const useStyles = /*#__PURE__*/ _styles( { root: { Be2twd7: 'fses1vf', @@ -10,4 +10,4 @@ export const useStyles = react_make_styles_1.__styles( d: ['.fses1vf{font-size:14px;}', '.fp6vxd{line-height:1;}'], }, ); -console.log(useStyles); +exports.useStyles = useStyles; diff --git a/packages/babel-preset/__fixtures__/reset-styles-at-rules/output.ts b/packages/babel-preset/__fixtures__/reset-styles-at-rules/output.ts index 2495b0f62..1fafb830f 100644 --- a/packages/babel-preset/__fixtures__/reset-styles-at-rules/output.ts +++ b/packages/babel-preset/__fixtures__/reset-styles-at-rules/output.ts @@ -1,5 +1,5 @@ -import { __resetStyles } from '@griffel/react'; -export const useStyles = __resetStyles('rjrhw4c', null, { +import { __resetStyles as _resetStyles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _resetStyles('rjrhw4c', null, { r: ['.rjrhw4c{color:red;}'], s: ['@supports (display: flex){.rjrhw4c{color:pink;}}', '@media (min-width: 100px){.rjrhw4c{color:blue;}}'], }); diff --git a/packages/babel-preset/__fixtures__/reset-styles/output.ts b/packages/babel-preset/__fixtures__/reset-styles/output.ts index 4101e2fc9..74d412f80 100644 --- a/packages/babel-preset/__fixtures__/reset-styles/output.ts +++ b/packages/babel-preset/__fixtures__/reset-styles/output.ts @@ -1,5 +1,5 @@ -import { __resetStyles } from '@griffel/react'; -export const useStyles = __resetStyles('rjefjbm', 'r7z97ji', [ +import { __resetStyles as _resetStyles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _resetStyles('rjefjbm', 'r7z97ji', [ '.rjefjbm{color:red;padding-left:4px;}', '.r7z97ji{color:red;padding-right:4px;}', ]); diff --git a/packages/babel-preset/__fixtures__/rules-with-metadata/output.ts b/packages/babel-preset/__fixtures__/rules-with-metadata/output.ts index f4541c5d5..66b27a1af 100644 --- a/packages/babel-preset/__fixtures__/rules-with-metadata/output.ts +++ b/packages/babel-preset/__fixtures__/rules-with-metadata/output.ts @@ -1,5 +1,5 @@ -import { __styles } from '@griffel/react'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { media: { Bulngiv: 'fr5o61b', diff --git a/packages/babel-preset/__fixtures__/shared-mixins/output.ts b/packages/babel-preset/__fixtures__/shared-mixins/output.ts index 62b5e43d3..8d8408893 100644 --- a/packages/babel-preset/__fixtures__/shared-mixins/output.ts +++ b/packages/babel-preset/__fixtures__/shared-mixins/output.ts @@ -1,6 +1,5 @@ -import { __styles } from '@griffel/react'; -import { sharedStyles } from './mixins'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { mc9l5x: 'f22iagw', diff --git a/packages/babel-preset/__fixtures__/tokens/output.ts b/packages/babel-preset/__fixtures__/tokens/output.ts index d8744efb4..1d88c1ef7 100644 --- a/packages/babel-preset/__fixtures__/tokens/output.ts +++ b/packages/babel-preset/__fixtures__/tokens/output.ts @@ -1,6 +1,5 @@ -import { __styles } from '@griffel/react'; -import { tokens } from './tokens'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: { De3pzq: 'f1734hy', diff --git a/packages/babel-preset/__fixtures__/unsupported-css-properties/output.ts b/packages/babel-preset/__fixtures__/unsupported-css-properties/output.ts index f7330031a..f5930e731 100644 --- a/packages/babel-preset/__fixtures__/unsupported-css-properties/output.ts +++ b/packages/babel-preset/__fixtures__/unsupported-css-properties/output.ts @@ -1,5 +1,5 @@ -import { __styles } from '@griffel/react'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: {}, }, diff --git a/packages/babel-preset/package.json b/packages/babel-preset/package.json index 44d9e354b..1eea6aa68 100644 --- a/packages/babel-preset/package.json +++ b/packages/babel-preset/package.json @@ -9,15 +9,15 @@ }, "dependencies": { "@babel/core": "^7.12.13", - "@babel/generator": "^7.12.13", - "@babel/helper-plugin-utils": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.12.13", + "@linaria/babel-preset": "^4.5.4", + "@linaria/shaker": "^4.5.3", + "@linaria/utils": "^4.5.3", "@griffel/core": "^1.14.1", - "@linaria/babel-preset": "^3.0.0-beta.23", - "@linaria/shaker": "^3.0.0-beta.22", "ajv": "^8.4.0", "stylis": "^4.2.0", "tslib": "^2.1.0" + }, + "peerDependencies": { + "@griffel/linaria-processor": "^0.0.1" } } diff --git a/packages/babel-preset/src/assets/absolutePathToRelative.test.ts b/packages/babel-preset/src/assets/absolutePathToRelative.test.ts deleted file mode 100644 index 1cd41fda4..000000000 --- a/packages/babel-preset/src/assets/absolutePathToRelative.test.ts +++ /dev/null @@ -1,62 +0,0 @@ -import * as path from 'path'; -import { absolutePathToRelative } from './absolutePathToRelative'; - -describe('absolutePathToRelative', () => { - it('handles POSIX paths', () => { - expect( - absolutePathToRelative( - path.posix, - '/home/projects/foo', - '/home/projects/foo/src/styles/Component.styles.ts', - 'assets/image.png', - ), - ).toBe('../../assets/image.png'); - - expect( - absolutePathToRelative( - path.posix, - '/home/projects/foo', - '/home/projects/foo/src/styles/Component.styles.ts', - 'src/styles/Component.png', - ), - ).toBe('./Component.png'); - - expect( - absolutePathToRelative( - path.posix, - '/home/projects/foo', - '/home/projects/foo/packages/components/src/index.styles.ts', - 'packages/components/src/images/Component.png', - ), - ).toBe('./images/Component.png'); - }); - - it('handles Windows paths', () => { - expect( - absolutePathToRelative( - path.win32, - 'C:\\Users\\Foo\\projects', - 'C:\\Users\\Foo\\projects\\src\\styles\\Component.styles.ts', - 'assets/image.png', - ), - ).toBe('../../assets/image.png'); - - expect( - absolutePathToRelative( - path.win32, - 'C:\\Users\\Foo\\projects', - 'C:\\Users\\Foo\\projects\\src\\styles\\Component.styles.ts', - 'src/styles/Component.png', - ), - ).toBe('./Component.png'); - - expect( - absolutePathToRelative( - path.win32, - 'C:\\Users\\Foo\\projects', - 'C:\\Users\\Foo\\projects\\packages\\components\\src\\index.styles.ts', - 'packages/components/src/images/Component.png', - ), - ).toBe('./images/Component.png'); - }); -}); diff --git a/packages/babel-preset/src/assets/isAssetUrl.test.ts b/packages/babel-preset/src/assets/isAssetUrl.test.ts deleted file mode 100644 index 4747dedc5..000000000 --- a/packages/babel-preset/src/assets/isAssetUrl.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { isAssetUrl } from './isAssetUrl'; - -describe('isAssetUrl', () => { - it('handles remote URLs', () => { - expect(isAssetUrl('data://example.com')).toBe(false); - expect(isAssetUrl('http://example.com')).toBe(false); - expect(isAssetUrl('https://example.com')).toBe(false); - expect(isAssetUrl('//example.com')).toBe(false); - expect(isAssetUrl('#svg-part')).toBe(false); - }); - - it('handles assets URLs', () => { - expect(isAssetUrl('../file.jpg')).toBe(true); - expect(isAssetUrl('./file.jpg')).toBe(true); - }); - - it('handles quotes around URLs', () => { - expect(isAssetUrl('"//example.com"')).toBe(false); - expect(isAssetUrl("'//example.com'")).toBe(false); - - expect(isAssetUrl('"./file.jpg"')).toBe(true); - expect(isAssetUrl("'./file.jpg'")).toBe(true); - }); -}); diff --git a/packages/babel-preset/src/assets/isAssetUrl.ts b/packages/babel-preset/src/assets/isAssetUrl.ts deleted file mode 100644 index 165ab36ae..000000000 --- a/packages/babel-preset/src/assets/isAssetUrl.ts +++ /dev/null @@ -1,11 +0,0 @@ -export function isAssetUrl(value: string): boolean { - const url = value.replace(/^['|"]/, ''); - const isRemoteUrl = - url.startsWith('data:') || - url.startsWith('http:') || - url.startsWith('https:') || - url.startsWith('//') /* Urls without protocol (use the same protocol as current page) */ || - url.startsWith('#'); - - return !isRemoteUrl; -} diff --git a/packages/babel-preset/src/assets/normalizeStyleRules.test.ts b/packages/babel-preset/src/assets/normalizeStyleRules.test.ts deleted file mode 100644 index 6076f617e..000000000 --- a/packages/babel-preset/src/assets/normalizeStyleRules.test.ts +++ /dev/null @@ -1,151 +0,0 @@ -import * as path from 'path'; -import { normalizeStyleRule, normalizeStyleRules } from './normalizeStyleRules'; - -describe('normalizeStyleRule', () => { - it('handles rules without quotes', () => { - expect( - normalizeStyleRule( - path.posix, - '/home/projects/foo', - '/home/projects/foo/src/styles/Component.styles.ts', - 'url(../../assets/image.png)', - ), - ).toBe('url(assets/image.png)'); - }); - - it('handles rules with quotes', () => { - expect( - normalizeStyleRule( - path.posix, - '/home/projects/foo', - '/home/projects/foo/src/styles/Component.styles.ts', - "url('../../assets/image.png')", - ), - ).toBe('url(assets/image.png)'); - expect( - normalizeStyleRule( - path.posix, - '/home/projects/foo', - '/home/projects/foo/src/styles/Component.styles.ts', - 'url("../../assets/image.png")', - ), - ).toBe('url(assets/image.png)'); - }); - - it('keeps data-url', () => { - expect( - normalizeStyleRule( - path.posix, - '/home/projects/foo', - '/home/projects/foo/src/styles/Component.styles.ts', - 'url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2Q==)', - ), - ).toBe('url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2Q==)'); - }); - - it('handles Windows paths', () => { - expect( - normalizeStyleRule( - path.win32, - 'C:\\Users\\Foo\\projects\\bar', - 'C:\\Users\\Foo\\projects\\bar\\src\\styles\\Component.styles.ts', - 'url(../../assets/image.png)', - ), - ).toBe('url(assets/image.png)'); - }); -}); - -describe('normalizeStyleRules', () => { - it('handles rules without metadata', () => { - expect( - normalizeStyleRules( - path.posix, - '/home/projects/foo', - '/home/projects/foo/src/styles/Component.styles.ts', - - { - root: { - color: 'red', - backgroundImage: 'url(../../assets/image.jpg)', - overflowY: ['hidden', 'scroll'], - - ':hover': { - backgroundImage: 'url(../../assets/hoverImage.jpg)', - }, - - '@media screen and (max-width: 100px)': { - '& .foo': { - backgroundImage: 'url(../../assets/mediaImage.jpg)', - }, - }, - }, - }, - ), - ).toEqual({ - root: { - color: 'red', - backgroundImage: 'url(assets/image.jpg)', - overflowY: ['hidden', 'scroll'], - - ':hover': { - backgroundImage: 'url(assets/hoverImage.jpg)', - }, - - '@media screen and (max-width: 100px)': { - '& .foo': { - backgroundImage: 'url(assets/mediaImage.jpg)', - }, - }, - }, - }); - }); - - it('handles multiple URLs', () => { - expect( - normalizeStyleRules( - path.posix, - '/home/projects/foo', - '/home/projects/foo/src/styles/Component.styles.ts', - - { - root: { - // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Backgrounds_and_Borders/Using_multiple_backgrounds - backgroundImage: [ - 'url(../../assets/firefox.png),', - 'url(../../assets/bubbles.png),', - 'linear-gradient(to right, rgba(30, 75, 115, 1), rgba(255, 255, 255, 0))', - ].join(' '), - }, - }, - ), - ).toEqual({ - root: { - backgroundImage: [ - 'url(assets/firefox.png),', - 'url(assets/bubbles.png),', - 'linear-gradient(to right, rgba(30, 75, 115, 1), rgba(255, 255, 255, 0))', - ].join(' '), - }, - }); - }); - - it('handles keyframe arrays', () => { - expect( - normalizeStyleRules( - path.posix, - '/home/projects/foo', - '/home/projects/foo/src/styles/Component.styles.ts', - - { - root: { - animationName: [{ from: { height: '20px' }, to: { height: '10px' } }], - }, - }, - ), - ).toEqual({ - root: { - animationName: [{ from: { height: '20px' }, to: { height: '10px' } }], - }, - }); - }); -}); diff --git a/packages/babel-preset/src/assets/replaceAssetsWithImports.ts b/packages/babel-preset/src/assets/replaceAssetsWithImports.ts deleted file mode 100644 index fb64fa2df..000000000 --- a/packages/babel-preset/src/assets/replaceAssetsWithImports.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { NodePath, traverse, types as t } from '@babel/core'; -import * as path from 'path'; -import { tokenize } from 'stylis'; - -import { absolutePathToRelative } from './absolutePathToRelative'; -import { isAssetUrl } from './isAssetUrl'; - -/** - * Replaces assets used in styles with imports and template literals. - * - * @example - * "['.foo { background-image: url(image.png) }" - * // to - * import _asset from 'image.png' - * `['.foo { background-image: url(${_asset}) }` - */ -export function replaceAssetsWithImports( - projectRoot: string, - filename: string, - programPath: NodePath, - pathToUpdate: NodePath, -) { - const assetIdentifiers = new Map(); - - function getAssetIdentifier(assetPath: string): t.Identifier { - if (!assetIdentifiers.has(assetPath)) { - assetIdentifiers.set(assetPath, programPath.scope.generateUidIdentifier('asset')); - } - - return assetIdentifiers.get(assetPath) as t.Identifier; - } - - function buildTemplateLiteralFromValue(value: string): t.TemplateLiteral { - const tokens = tokenize(value); - - const quasis: t.TemplateElement[] = []; - const expressions: t.Identifier[] = []; - - let acc = ''; - - for (let i = 0, l = tokens.length; i < l; i++) { - acc += tokens[i]; - - if (tokens[i] === 'url') { - const url = tokens[i + 1].slice(1, -1); - - if (isAssetUrl(url)) { - // Handle `filter: url(./a.svg#id)` - const [pathname, hash] = url.split('#'); - - quasis.push(t.templateElement({ raw: acc + '(' }, false)); - expressions.push(getAssetIdentifier(pathname)); - - acc = `${hash ? `#${hash}` : ''})`; - i++; - } - } - } - - quasis.push(t.templateElement({ raw: acc }, true)); - - return t.templateLiteral(quasis, expressions); - } - - traverse( - pathToUpdate.node, - { - StringLiteral(literalPath) { - const value = literalPath.node.value; - - if (value.indexOf('url(') === -1) { - return; - } - - literalPath.replaceWith(buildTemplateLiteralFromValue(value)); - }, - }, - programPath.scope, - programPath, - ); - - for (const [importPath, identifier] of assetIdentifiers.entries()) { - const relativePath = absolutePathToRelative(path, projectRoot, filename, importPath); - - programPath.unshiftContainer( - 'body', - t.importDeclaration([t.importDefaultSpecifier(identifier)], t.stringLiteral(relativePath)), - ); - } -} diff --git a/packages/babel-preset/src/transformPlugin.test.ts b/packages/babel-preset/src/index.test.ts similarity index 77% rename from packages/babel-preset/src/transformPlugin.test.ts rename to packages/babel-preset/src/index.test.ts index c03802154..7b3e87fb1 100644 --- a/packages/babel-preset/src/transformPlugin.test.ts +++ b/packages/babel-preset/src/index.test.ts @@ -2,7 +2,7 @@ import pluginTester, { prettierFormatter } from 'babel-plugin-tester'; import * as fs from 'fs'; import * as path from 'path'; -import { transformPlugin } from './transformPlugin'; +import griffelPreset from './index'; const prettierConfig = JSON.parse( fs.readFileSync(path.resolve(__dirname, '../../../.prettierrc'), { encoding: 'utf-8' }), @@ -13,11 +13,7 @@ pluginTester({ babelOptions: { parserOpts: { plugins: ['typescript'], - }, - }, - pluginOptions: { - babelOptions: { - presets: ['@babel/typescript'], + sourceType: 'unambiguous', }, }, formatResult: code => @@ -39,9 +35,6 @@ pluginTester({ title: 'duplicated imports', fixture: path.resolve(fixturesDir, 'duplicated-imports', 'code.ts'), outputFixture: path.resolve(fixturesDir, 'duplicated-imports', 'output.ts'), - pluginOptions: { - modules: [{ moduleSource: 'custom-package', importName: 'createStylesA' }], - }, }, { title: 'at rules', @@ -53,11 +46,6 @@ pluginTester({ fixture: path.resolve(fixturesDir, 'multiple-declarations', 'code.ts'), outputFixture: path.resolve(fixturesDir, 'multiple-declarations', 'output.ts'), }, - { - title: 'call of non existing module', - fixture: path.resolve(fixturesDir, 'non-existing-module-call', 'code.ts'), - outputFixture: path.resolve(fixturesDir, 'non-existing-module-call', 'output.ts'), - }, { title: 'syntax: animationName', fixture: path.resolve(fixturesDir, 'keyframes', 'code.ts'), @@ -149,9 +137,9 @@ pluginTester({ title: 'config: babelOptions', fixture: path.resolve(fixturesDir, 'config-babel-options', 'code.ts'), outputFixture: path.resolve(fixturesDir, 'config-babel-options', 'output.ts'), - pluginOptions: { + presetOptions: { babelOptions: { - plugins: ['./packages/babel-preset/__fixtures__/config-babel-options/colorRenamePlugin'], + plugins: [path.resolve(fixturesDir, 'config-babel-options', 'colorRenamePlugin.js')], }, }, }, @@ -159,12 +147,8 @@ pluginTester({ title: 'config: evaluationRules', fixture: path.resolve(fixturesDir, 'config-evaluation-rules', 'code.ts'), outputFixture: path.resolve(fixturesDir, 'config-evaluation-rules', 'output.ts'), - pluginOptions: { - evaluationRules: [ - { - action: 'sampleEvaluator', - }, - ], + presetOptions: { + evaluationRules: [{ action: 'sampleEvaluator' }], }, }, @@ -195,36 +179,11 @@ pluginTester({ fixture: path.resolve(fixturesDir, 'import-alias', 'code.ts'), outputFixture: path.resolve(fixturesDir, 'import-alias', 'output.ts'), }, - { - title: 'imports: custom module', - fixture: path.resolve(fixturesDir, 'import-custom-module', 'code.ts'), - outputFixture: path.resolve(fixturesDir, 'import-custom-module', 'output.ts'), - pluginOptions: { - modules: [{ moduleSource: 'custom-package', importName: 'makeStyles' }], - }, - }, - { - title: 'imports: custom module name', - fixture: path.resolve(fixturesDir, 'import-custom-name', 'code.ts'), - outputFixture: path.resolve(fixturesDir, 'import-custom-name', 'output.ts'), - pluginOptions: { - modules: [{ moduleSource: 'custom-package', importName: 'createStyles' }], - }, - }, { title: 'imports: require()', fixture: path.resolve(fixturesDir, 'require', 'code.ts'), outputFixture: path.resolve(fixturesDir, 'require', 'output.ts'), }, - { - title: 'imports: require() with custom module', - fixture: path.resolve(fixturesDir, 'require-custom-module', 'code.ts'), - outputFixture: path.resolve(fixturesDir, 'require-custom-module', 'output.ts'), - pluginOptions: { - modules: [{ moduleSource: 'custom-package', importName: 'makeStyles' }], - }, - }, - { title: 'imports: require() for makeResetStyles', fixture: path.resolve(fixturesDir, 'require-reset-styles', 'code.ts'), @@ -238,6 +197,7 @@ pluginTester({ title: 'errors: unsupported shorthand CSS properties', fixture: path.resolve(fixturesDir, 'unsupported-css-properties', 'fixture.ts'), outputFixture: path.resolve(fixturesDir, 'unsupported-css-properties', 'output.ts'), + setup() { const consoleSpy = jest.spyOn(console, 'error').mockImplementation(); @@ -246,15 +206,10 @@ pluginTester({ }; }, }, - { - title: 'errors: throws on invalid argument count', - fixture: path.resolve(fixturesDir, 'error-argument-count', 'fixture.js'), - error: /function accepts only a single param/, - }, { title: 'errors: throws on invalid config', fixture: path.resolve(fixturesDir, 'error-config-babel-options', 'fixture.ts'), - pluginOptions: { + presetOptions: { babelOptions: { plugins: {}, }, @@ -263,6 +218,9 @@ pluginTester({ }, ], - plugin: transformPlugin, - pluginName: '@griffel/babel-plugin-transform', + preset: griffelPreset, + presetName: '@griffel/babel-preset', + presetOptions: { + babelOptions: { presets: ['@babel/preset-typescript'] }, + }, }); diff --git a/packages/babel-preset/src/index.ts b/packages/babel-preset/src/index.ts index d6f2dd964..af4eff725 100644 --- a/packages/babel-preset/src/index.ts +++ b/packages/babel-preset/src/index.ts @@ -1,17 +1,20 @@ -import { transformPlugin } from './transformPlugin'; - import type { ConfigAPI } from '@babel/core'; +import linariaPreset, { PluginOptions } from '@linaria/babel-preset'; + +import { validateOptions } from './validateOptions'; import type { BabelPluginOptions } from './types'; export { default as shakerEvaluator } from '@linaria/shaker'; -export { EvalCache, Module } from '@linaria/babel-preset'; export { configSchema } from './schema'; -export type { Evaluator, EvalRule } from '@linaria/babel-preset'; +export type { Evaluator, EvalRule } from '@linaria/utils'; export type { BabelPluginOptions }; -export default function griffelPreset(babel: ConfigAPI, options: BabelPluginOptions) { - return { - plugins: [[transformPlugin, options]], - }; +export default function griffelPreset(babel: ConfigAPI, options: BabelPluginOptions = {}) { + const { babelOptions, evaluationRules } = validateOptions(options); + + return linariaPreset(babel, { + babelOptions, + rules: evaluationRules, + } as PluginOptions); } diff --git a/packages/babel-preset/src/schema.ts b/packages/babel-preset/src/schema.ts index 4f316419e..e07111756 100644 --- a/packages/babel-preset/src/schema.ts +++ b/packages/babel-preset/src/schema.ts @@ -6,21 +6,6 @@ export const configSchema: JSONSchema7 = { type: 'object', properties: { - modules: { - type: 'array', - items: { - type: 'object', - required: ['moduleSource', 'importName'], - properties: { - moduleSource: { - type: 'string', - }, - importName: { - type: 'string', - }, - }, - }, - }, babelOptions: { type: 'object', properties: { @@ -45,9 +30,6 @@ export const configSchema: JSONSchema7 = { }, }, }, - projectRoot: { - type: 'string', - }, }, additionalProperties: false, }; diff --git a/packages/babel-preset/src/transformPlugin.ts b/packages/babel-preset/src/transformPlugin.ts deleted file mode 100644 index a1061e162..000000000 --- a/packages/babel-preset/src/transformPlugin.ts +++ /dev/null @@ -1,354 +0,0 @@ -import { NodePath, PluginObj, PluginPass, types as t } from '@babel/core'; -import { declare } from '@babel/helper-plugin-utils'; -import { Module } from '@linaria/babel-preset'; -import shakerEvaluator from '@linaria/shaker'; -import { resolveStyleRulesForSlots, GriffelStyle, resolveResetStyleRules } from '@griffel/core'; -import * as path from 'path'; - -import { normalizeStyleRules } from './assets/normalizeStyleRules'; -import { replaceAssetsWithImports } from './assets/replaceAssetsWithImports'; -import { dedupeCSSRules } from './utils/dedupeCSSRules'; -import { evaluatePaths } from './utils/evaluatePaths'; -import { BabelPluginOptions } from './types'; -import { validateOptions } from './validateOptions'; - -type FunctionKinds = 'makeStyles' | 'makeResetStyles'; - -type BabelPluginState = PluginPass & { - importDeclarationPaths?: NodePath[]; - requireDeclarationPath?: NodePath; - - definitionPaths?: { functionKind: FunctionKinds; path: NodePath }[]; - calleePaths?: NodePath[]; -}; - -function getDefinitionPathFromCallExpression( - functionKind: FunctionKinds, - callExpression: NodePath, -): NodePath { - const argumentPaths = callExpression.get('arguments'); - const hasValidArguments = Array.isArray(argumentPaths) && argumentPaths.length === 1; - - if (!hasValidArguments) { - throw callExpression.buildCodeFrameError(`${functionKind}() function accepts only a single param`); - } - - const definitionsPath = argumentPaths[0]; - - if (definitionsPath.isExpression() || definitionsPath.isSpreadElement()) { - return definitionsPath; - } - - throw definitionsPath.buildCodeFrameError(`${functionKind}() function accepts only expressions and spreads`); -} - -/** - * Gets a kind of passed callee. - */ -function getCalleeFunctionKind( - path: NodePath, - modules: NonNullable, -): FunctionKinds | null { - for (const module of modules) { - if (path.referencesImport(module.moduleSource, module.importName)) { - return 'makeStyles'; - } - - if (path.referencesImport(module.moduleSource, module.resetImportName || 'makeResetStyles')) { - return 'makeResetStyles'; - } - } - - return null; -} - -/** - * Checks if import statement import makeStyles(). - */ -function hasMakeStylesImport( - path: NodePath, - modules: NonNullable, -): boolean { - return Boolean(modules.find(module => path.node.source.value === module.moduleSource)); -} - -/** - * Checks that passed declarator imports makesStyles(). - * - * @example react_make_styles_1 = require('@griffel/react') - */ -function isRequireDeclarator( - path: NodePath, - modules: NonNullable, -): boolean { - const initPath = path.get('init'); - - if (!initPath.isCallExpression()) { - return false; - } - - if (initPath.get('callee').isIdentifier({ name: 'require' })) { - const args = initPath.get('arguments'); - - if (Array.isArray(args) && args.length === 1) { - const moduleNamePath = args[0]; - - if (moduleNamePath.isStringLiteral()) { - return Boolean(modules.find(module => moduleNamePath.node.value === module.moduleSource)); - } - } - } - - return false; -} - -export const transformPlugin = declare, PluginObj>((api, options) => { - api.assertVersion(7); - - const pluginOptions: Required = { - babelOptions: {}, - modules: [ - { moduleSource: '@griffel/react', importName: 'makeStyles' }, - { moduleSource: '@fluentui/react-components', importName: 'makeStyles' }, - ], - evaluationRules: [ - { action: shakerEvaluator }, - { - test: /[/\\]node_modules[/\\]/, - action: 'ignore', - }, - ], - projectRoot: process.cwd(), - - ...options, - }; - - validateOptions(pluginOptions); - - return { - name: '@griffel/babel-plugin-transform', - - pre() { - this.importDeclarationPaths = []; - this.definitionPaths = []; - this.calleePaths = []; - }, - - visitor: { - Program: { - enter(programPath, state) { - if (typeof state.filename === 'undefined') { - throw new Error( - [ - '@griffel/babel-preset: This preset requires "filename" option to be specified by Babel. ', - "It's automatically done by Babel and our loaders/plugins. ", - "If you're facing this issue, please check your setup.\n\n", - 'See: https://babeljs.io/docs/en/options#filename', - ].join(''), - ); - } - - // Invalidate cache for module evaluation to get fresh modules - Module.invalidate(); - }, - - exit(programPath, state) { - if (state.importDeclarationPaths!.length === 0 && !state.requireDeclarationPath) { - return; - } - - if (state.definitionPaths) { - // Runs Babel AST processing or module evaluation for Node once for all arguments of makeStyles() calls once - evaluatePaths( - programPath, - state.file.opts.filename!, - state.definitionPaths.map(p => p.path), - pluginOptions, - ); - - state.definitionPaths.forEach(definitionPath => { - const callExpressionPath = definitionPath.path.findParent(parentPath => - parentPath.isCallExpression(), - ) as NodePath; - const evaluationResult = definitionPath.path.evaluate(); - - if (!evaluationResult.confident) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const deoptPath = (evaluationResult as any).deopt as NodePath | undefined; - throw (deoptPath || definitionPath.path).buildCodeFrameError( - 'Evaluation of a code fragment failed, this is a bug, please report it', - ); - } - - if (definitionPath.functionKind === 'makeStyles') { - const stylesBySlots: Record = evaluationResult.value; - const [classnamesMapping, cssRulesByBucket] = resolveStyleRulesForSlots( - // Heads up! - // Style rules should be normalized *before* they will be resolved to CSS rules to have deterministic - // results across different build targets. - normalizeStyleRules( - path, - pluginOptions.projectRoot, - // Presence of "state.filename" is validated on `Program.enter()` - state.filename as string, - stylesBySlots, - ), - ); - const uniqueCSSRules = dedupeCSSRules(cssRulesByBucket); - - (callExpressionPath.get('arguments.0') as NodePath).remove(); - callExpressionPath.pushContainer('arguments', [ - t.valueToNode(classnamesMapping), - t.valueToNode(uniqueCSSRules), - ]); - } - - if (definitionPath.functionKind === 'makeResetStyles') { - const styles: GriffelStyle = evaluationResult.value; - const [ltrClassName, rtlClassName, cssRules] = resolveResetStyleRules( - // Heads up! - // Style rules should be normalized *before* they will be resolved to CSS rules to have deterministic - // results across different build targets. - normalizeStyleRules( - path, - pluginOptions.projectRoot, - // Presence of "state.filename" is validated on `Program.enter()` - state.filename as string, - styles, - ), - ); - - (callExpressionPath.get('arguments.0') as NodePath).remove(); - callExpressionPath.pushContainer('arguments', [ - t.valueToNode(ltrClassName), - t.valueToNode(rtlClassName), - t.valueToNode(cssRules), - ]); - } - - replaceAssetsWithImports(pluginOptions.projectRoot, state.filename!, programPath, callExpressionPath); - }); - } - - state.importDeclarationPaths!.forEach(importDeclarationPath => { - const specifiers = importDeclarationPath.get('specifiers'); - const source = importDeclarationPath.get('source'); - - specifiers.forEach(specifier => { - if (specifier.isImportSpecifier()) { - const importedPath = specifier.get('imported'); - - for (const module of pluginOptions.modules) { - if (module.moduleSource !== source.node.value) { - // 👆 "moduleSource" should match "importDeclarationPath.source" to skip unrelated ".importName" - continue; - } - - if (importedPath.isIdentifier({ name: module.importName })) { - specifier.replaceWith(t.identifier('__styles')); - } else if (importedPath.isIdentifier({ name: module.resetImportName || 'makeResetStyles' })) { - specifier.replaceWith(t.identifier('__resetStyles')); - } - } - } - }); - }); - - if (state.calleePaths) { - state.calleePaths.forEach(calleePath => { - if (calleePath.node.name === 'makeResetStyles') { - calleePath.replaceWith(t.identifier('__resetStyles')); - return; - } - - calleePath.replaceWith(t.identifier('__styles')); - }); - } - }, - }, - - // eslint-disable-next-line @typescript-eslint/naming-convention - ImportDeclaration(path, state) { - if (hasMakeStylesImport(path, pluginOptions.modules)) { - state.importDeclarationPaths!.push(path); - } - }, - - // eslint-disable-next-line @typescript-eslint/naming-convention - VariableDeclarator(path, state) { - if (isRequireDeclarator(path, pluginOptions.modules)) { - state.requireDeclarationPath = path; - } - }, - - // eslint-disable-next-line @typescript-eslint/naming-convention - CallExpression(path, state) { - /** - * Handles case when `makeStyles()` is `CallExpression`. - * - * @example makeStyles({}) - */ - if (state.importDeclarationPaths!.length === 0) { - return; - } - - const calleePath = path.get('callee'); - - if (calleePath.isIdentifier()) { - const functionKind = getCalleeFunctionKind(calleePath, pluginOptions.modules); - - if (functionKind) { - state.definitionPaths!.push({ - functionKind, - path: getDefinitionPathFromCallExpression(functionKind, path), - }); - state.calleePaths!.push(calleePath); - } - } - }, - - // eslint-disable-next-line @typescript-eslint/naming-convention - MemberExpression(expressionPath, state) { - /** - * Handles case when `makeStyles()` is inside `MemberExpression`. - * - * @example module.makeStyles({}) - */ - if (!state.requireDeclarationPath) { - return; - } - - const objectPath = expressionPath.get('object'); - const propertyPath = expressionPath.get('property'); - - if (!objectPath.isIdentifier({ name: (state.requireDeclarationPath.node.id as t.Identifier).name })) { - return; - } - - let functionKind: FunctionKinds | null = null; - - if (propertyPath.isIdentifier({ name: 'makeStyles' })) { - functionKind = 'makeStyles'; - } else if (propertyPath.isIdentifier({ name: 'makeResetStyles' })) { - functionKind = 'makeResetStyles'; - } - - if (!functionKind) { - return; - } - - const parentPath = expressionPath.parentPath; - - if (!parentPath.isCallExpression()) { - return; - } - - state.definitionPaths!.push({ - functionKind, - path: getDefinitionPathFromCallExpression(functionKind, parentPath), - }); - state.calleePaths!.push(propertyPath as NodePath); - }, - }, - }; -}); diff --git a/packages/babel-preset/src/types.ts b/packages/babel-preset/src/types.ts index 5ac91d61f..729c95aac 100644 --- a/packages/babel-preset/src/types.ts +++ b/packages/babel-preset/src/types.ts @@ -1,14 +1,7 @@ import type { TransformOptions } from '@babel/core'; -import type { EvalRule } from '@linaria/babel-preset'; +import type { EvalRule } from '@linaria/utils'; export type BabelPluginOptions = { - /** Defines set of modules and imports handled by a transformPlugin. */ - modules?: { - moduleSource: string; - importName: string; - resetImportName?: string; - }[]; - /** * If you need to specify custom Babel configuration, you can pass them here. These options will be used by the * transformPlugin when parsing and evaluating modules. @@ -17,12 +10,4 @@ export type BabelPluginOptions = { /** The set of rules that defines how the matched files will be transformed during the evaluation. */ evaluationRules?: EvalRule[]; - - /** - * Defined the of the project. Is used to have a deterministic path for asset paths, usually should be equal to Git - * root. - * - * @default process.cwd() - */ - projectRoot?: string; }; diff --git a/packages/babel-preset/src/utils/evaluatePaths.ts b/packages/babel-preset/src/utils/evaluatePaths.ts deleted file mode 100644 index 0ace2eca3..000000000 --- a/packages/babel-preset/src/utils/evaluatePaths.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { NodePath, types as t } from '@babel/core'; - -import type { BabelPluginOptions } from '../types'; -import { evaluatePathsInVM } from './evaluatePathsInVM'; - -/** - * Checks if passed paths can be evaluated by Babel, if no - fallbacks to Node evaluation. - * The goal there is to ensure that all paths are pure and can be safely evaluated later by Babel. - */ -export function evaluatePaths( - program: NodePath, - filename: string, - paths: NodePath[], - pluginOptions: Required, -): void { - const pathsToBeEvaluatedInVM: NodePath[] = []; - - for (let i = 0; i < paths.length; i++) { - const result = paths[i].evaluate(); - - // Optimistic case, we were able to resolve a path without evaluation in Node environment 🎉 - if (result.confident) { - // Heads up! - // We don't need to do any replacements there as after resolving all style objects will be evaluated again - continue; - } - - pathsToBeEvaluatedInVM.push(paths[i]); - } - - if (pathsToBeEvaluatedInVM.length > 0) { - evaluatePathsInVM(program, filename, pathsToBeEvaluatedInVM, pluginOptions); - } -} diff --git a/packages/babel-preset/src/utils/evaluatePathsInVM.test.ts b/packages/babel-preset/src/utils/evaluatePathsInVM.test.ts deleted file mode 100644 index cba10532b..000000000 --- a/packages/babel-preset/src/utils/evaluatePathsInVM.test.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as Babel from '@babel/core'; -import generator from '@babel/generator'; - -import { expressionTpl } from './evaluatePathsInVM'; - -describe('expressionTpl', () => { - it('returns an expression based on a template', () => { - const expression = Babel.types.identifier('foo'); - - const result = expressionTpl({ expression, wrapName: 'wrap' }); - const resultCode = generator(result).code; - - expect(Babel.types.isCallExpression(result)).toBe(true); - expect(resultCode).toMatchInlineSnapshot(`"wrap(() => foo)"`); - }); -}); diff --git a/packages/babel-preset/src/utils/evaluatePathsInVM.ts b/packages/babel-preset/src/utils/evaluatePathsInVM.ts deleted file mode 100644 index e9fed30ff..000000000 --- a/packages/babel-preset/src/utils/evaluatePathsInVM.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { NodePath, types as t } from '@babel/core'; -import { Scope } from '@babel/traverse'; -import * as template from '@babel/template'; -import generator from '@babel/generator'; -import { Module, StrictOptions } from '@linaria/babel-preset'; - -import type { BabelPluginOptions } from '../types'; - -const EVAL_EXPORT_NAME = '__mkPreval'; - -function evaluate(code: string, filename: string, pluginOptions: Required) { - const options: StrictOptions = { - displayName: false, - evaluate: true, - - rules: pluginOptions.evaluationRules, - babelOptions: { - ...pluginOptions.babelOptions, - - // This instance of Babel should ignore all user's configs and apply only our transformPlugin - configFile: false, - babelrc: false, - }, - }; - const mod = new Module(filename, options); - - mod.evaluate(code, [EVAL_EXPORT_NAME]); - - return (mod.exports as { [EVAL_EXPORT_NAME]: unknown[] })[EVAL_EXPORT_NAME]; -} - -function findFreeName(scope: Scope, name: string): string { - // By default `name` is used as a name of the function … - let nextName = name; - let idx = 0; - while (scope.hasBinding(nextName, false)) { - // … but if there is an already defined variable with this name … - // … we are trying to use a name like wrap_N - idx += 1; - nextName = `wrap_${idx}`; - } - - return nextName; -} - -const expressionWrapperTpl = template.statement(` - const %%wrapName%% = (fn) => { - try { - return fn(); - } catch (e) { - return e; - } - }; -`); - -export const expressionTpl = template.expression(`%%wrapName%%(() => %%expression%%)`); -const exportsPrevalTpl = template.statement(`exports.${EVAL_EXPORT_NAME} = %%expressions%%`); - -/** - * Creates a new program that includes required imports and wrappers to return resolved values. - */ -function addPreval(path: NodePath, lazyDeps: Array): t.Program { - // Constant for "__mkPreval" with all dependencies - const wrapName = findFreeName(path.scope, '_wrap'); - const programNode = path.node; - - return t.program( - [ - ...programNode.body, - - expressionWrapperTpl({ wrapName }), - exportsPrevalTpl({ - expressions: t.arrayExpression(lazyDeps.map(expression => expressionTpl({ expression, wrapName }))), - }), - ], - programNode.directives, - programNode.sourceType, - programNode.interpreter, - ); -} - -/** - * Evaluates passed paths in Node environment to resolve all lazy values. - */ -export function evaluatePathsInVM( - program: NodePath, - filename: string, - nodePaths: NodePath[], - pluginOptions: Required, -): void { - const pathsToEvaluate = nodePaths.map(nodePath => { - // spreads ("...fooBar") can't be executed directly, so they are wrapped with an object ("{...fooBar}") - if (nodePath.isSpreadElement()) { - return t.objectExpression([nodePath.node as t.SpreadElement]); - } - - return nodePath.node; - }); - - // Linaria also performs hoisting of identifiers, we don't need this as all makeStyles() calls should be top level - const modifiedProgram = addPreval(program, pathsToEvaluate); - - const { code } = generator(modifiedProgram); - const results = evaluate(code, filename, pluginOptions); - - for (let i = 0; i < nodePaths.length; i++) { - const nodePath = nodePaths[i]; - - nodePath.replaceWith(t.valueToNode(results[i])); - } -} diff --git a/packages/babel-preset/src/validateOptions.test.ts b/packages/babel-preset/src/validateOptions.test.ts index e3769c034..49271e4a8 100644 --- a/packages/babel-preset/src/validateOptions.test.ts +++ b/packages/babel-preset/src/validateOptions.test.ts @@ -1,28 +1,10 @@ -import type { Evaluator } from '@linaria/babel-preset'; +import type { File } from '@babel/types'; +import type { Evaluator } from '@linaria/utils'; import { validateOptions } from './validateOptions'; import { BabelPluginOptions } from './types'; describe('validateOptions', () => { - describe('modules', () => { - it('passes on valid options', () => { - const pluginOptions: BabelPluginOptions = { - modules: [{ moduleSource: 'react-make-styles', importName: 'makeStyles' }], - }; - - expect(() => validateOptions(pluginOptions)).not.toThrow(); - }); - - it('throws on wrong options', () => { - const pluginOptions = { modules: {} }; - - // @ts-expect-error Invalid options are passed for testing purposes - expect(() => validateOptions(pluginOptions)).toThrowErrorMatchingInlineSnapshot( - `"Validation failed for passed config: data/modules must be array"`, - ); - }); - }); - describe('babelOptions', () => { it('passes on valid options', () => { const pluginOptions: BabelPluginOptions = { @@ -47,7 +29,7 @@ describe('validateOptions', () => { describe('evaluationRules', () => { it('passes on valid options', () => { - const noopEvaluator: Evaluator = () => ['foo', null]; + const noopEvaluator: Evaluator = () => [null as unknown as File, 'foo', null]; const pluginOptions: BabelPluginOptions = { evaluationRules: [ { action: noopEvaluator }, diff --git a/packages/babel-preset/src/validateOptions.ts b/packages/babel-preset/src/validateOptions.ts index 1d92bb8b2..461872fec 100644 --- a/packages/babel-preset/src/validateOptions.ts +++ b/packages/babel-preset/src/validateOptions.ts @@ -8,10 +8,12 @@ const ajv = new Ajv(); /** * Validates options for transformPlugin with a schema. */ -export function validateOptions(pluginOptions: BabelPluginOptions): void { +export function validateOptions(pluginOptions: BabelPluginOptions): BabelPluginOptions { const valid = ajv.validate(configSchema, pluginOptions); if (!valid) { throw new Error(`Validation failed for passed config: ${ajv.errorsText(ajv.errors)}`); } + + return pluginOptions; } diff --git a/packages/babel-preset/tsconfig.spec.json b/packages/babel-preset/tsconfig.spec.json index 0321a8aa6..82af2525c 100644 --- a/packages/babel-preset/tsconfig.spec.json +++ b/packages/babel-preset/tsconfig.spec.json @@ -9,6 +9,7 @@ "include": [ "__fixtures__/**/code.ts", "__fixtures__/**/fixture.ts", + "__fixtures__/config-evaluation-rules/sampleEvaluator.js", "**/*.test.ts", "**/*.spec.ts", "**/*.test.tsx", diff --git a/packages/linaria-processor/.eslintrc.json b/packages/linaria-processor/.eslintrc.json new file mode 100644 index 000000000..9d9c0db55 --- /dev/null +++ b/packages/linaria-processor/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/packages/linaria-processor/README.md b/packages/linaria-processor/README.md new file mode 100644 index 000000000..b80683556 --- /dev/null +++ b/packages/linaria-processor/README.md @@ -0,0 +1,55 @@ +# Griffel processor for Linaria + +A processor for [Linaria](https://github.com/callstack/linaria) for that performs build time transforms for `makeStyles` & `makeResetStyles` [`@griffel/react`](../react). + + + + +- [Install](#install) +- [How to use it?](#how-to-use-it) + - [Handling Griffel re-exports](#handling-griffel-re-exports) + + + +## Install + +```bash +yarn add --dev @griffel/linaria-processor +# or +npm install --save-dev @griffel/linaria-processor +``` + +## How to use it? + +This package cannot be used solely, it should be paired with `@griffel/babel-preset` or `@griffel/webpack-loader` + +- For library developers, please use [`@griffel/babel-preset`](../babel-preset) +- For application developers, please use [`@griffel/webpack-loader`](../webpack-loader) + +### Handling Griffel re-exports + +```js +import { makeStyles, makeResetStyles } from 'custom-package'; +``` + +By default, the processor handles imports from `@griffel/react` & `@fluentui/react-components`, to handle imports from custom packages settings you need to include meta information to a matching `package.json`: + +```json +{ + "name": "custom-package", + "version": "1.0.0", + "linaria": { + "tags": { + "makeStyles": "@griffel/linaria-processor/make-styles", + "makeResetStyles": "@griffel/linaria-processor/make-reset-styles" + } + } +} +``` + +> **Note**: "custom-package" should re-export following functions from `@griffel/react`: +> +> - `__styles` +> - `__css` +> - `__resetStyles` +> - `__resetCSS` diff --git a/packages/linaria-processor/jest.config.js b/packages/linaria-processor/jest.config.js new file mode 100644 index 000000000..bf28fa7c5 --- /dev/null +++ b/packages/linaria-processor/jest.config.js @@ -0,0 +1,14 @@ +module.exports = { + displayName: 'linaria-processor', + preset: '../../jest.preset.js', + globals: { + 'ts-jest': { + tsconfig: '/tsconfig.spec.json', + }, + }, + transform: { + '^.+\\.[tj]sx?$': 'ts-jest', + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: '../../coverage/packages/linaria-processor', +}; diff --git a/packages/linaria-processor/package.json b/packages/linaria-processor/package.json new file mode 100644 index 000000000..50c64fcd7 --- /dev/null +++ b/packages/linaria-processor/package.json @@ -0,0 +1,30 @@ +{ + "name": "@griffel/linaria-processor", + "version": "0.0.1", + "description": "Linaria processor for Griffel", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/griffel" + }, + "dependencies": { + "@griffel/core": "^1.14.1", + "@linaria/tags": "^4.5.4", + "stylis": "^4.2.0", + "tslib": "^2.1.0" + }, + "exports": { + ".": { + "types": "./src/index.d.ts", + "default": "./src/index.js" + }, + "./make-styles": { + "types": "./src/MakeStylesProcessor.d.ts", + "default": "./src/MakeStylesProcessor.js" + }, + "./make-reset-styles": { + "types": "./src/MakeResetStylesProcessor.d.ts", + "default": "./src/MakeResetStylesProcessor.js" + } + } +} diff --git a/packages/linaria-processor/project.json b/packages/linaria-processor/project.json new file mode 100644 index 000000000..d5ccdd0c7 --- /dev/null +++ b/packages/linaria-processor/project.json @@ -0,0 +1,49 @@ +{ + "root": "packages/linaria-processor", + "sourceRoot": "packages/linaria-processor/src", + "projectType": "library", + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["packages/linaria-processor/**/*.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["coverage/packages/linaria-processor"], + "options": { + "jestConfig": "packages/linaria-processor/jest.config.js", + "passWithNoTests": true + } + }, + "build": { + "executor": "@nrwl/js:tsc", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/packages/linaria-processor", + "tsConfig": "packages/linaria-processor/tsconfig.lib.json", + "packageJson": "packages/linaria-processor/package.json", + "main": "packages/linaria-processor/src/index.ts", + "assets": [ + "packages/linaria-processor/README.md", + { + "glob": "LICENSE.md", + "input": ".", + "output": "." + } + ] + } + }, + "type-check": { + "executor": "@nrwl/workspace:run-commands", + "options": { + "cwd": "packages/linaria-processor", + "commands": [{ "command": "tsc -b --pretty" }], + "outputPath": [] + } + } + }, + "tags": [] +} diff --git a/packages/linaria-processor/src/BaseGriffelProcessor.ts b/packages/linaria-processor/src/BaseGriffelProcessor.ts new file mode 100644 index 000000000..8e1e1d7c6 --- /dev/null +++ b/packages/linaria-processor/src/BaseGriffelProcessor.ts @@ -0,0 +1,47 @@ +import type { Expression } from '@babel/types'; +import type { Params, TailProcessorParams } from '@linaria/tags'; +import { BaseProcessor, TaggedTemplateProcessor, validateParams } from '@linaria/tags'; +import * as path from 'path'; + +export default abstract class BaseGriffelProcessor extends BaseProcessor { + readonly expressionName: string | number | boolean | null = null; + + public constructor([tag, callParam]: Params, ...args: TailProcessorParams) { + super([tag], ...args); + + validateParams([tag, callParam], ['callee', 'call'], TaggedTemplateProcessor.SKIP); + + if (callParam[0] === 'call') { + const { ex } = callParam[1]; + + if (ex.type === 'Identifier') { + this.dependencies.push(callParam[1] as any); + this.expressionName = ex.name; + } else if (ex.type === 'NullLiteral') { + this.expressionName = null; + } else { + this.expressionName = ex.value; + } + } + } + + public get path() { + return process.platform === 'win32' ? path.win32 : path.posix; + } + + public override get asSelector(): string { + throw new Error('The result of makeStyles cannot be used as a selector.'); + } + + public override doEvaltimeReplacement(): void { + this.replacer(this.value, false); + } + + public override get value(): Expression { + return this.astService.nullLiteral(); + } + + public override toString(): string { + return `${super.toString()}(…)`; + } +} diff --git a/packages/linaria-processor/src/MakeResetStylesProcessor.ts b/packages/linaria-processor/src/MakeResetStylesProcessor.ts new file mode 100644 index 000000000..388e33676 --- /dev/null +++ b/packages/linaria-processor/src/MakeResetStylesProcessor.ts @@ -0,0 +1,66 @@ +import { resolveResetStyleRules } from '@griffel/core'; +import type { CSSRulesByBucket, GriffelResetStyle } from '@griffel/core'; +import type { ValueCache } from '@linaria/tags'; + +import { createRuleLiteral } from './assets/createRuleLiteral'; +import { normalizeStyleRules } from './assets/normalizeStyleRules'; +import BaseGriffelProcessor from './BaseGriffelProcessor'; +import { FileContext } from './types'; + +export default class MakeResetStylesProcessor extends BaseGriffelProcessor { + #ltrClassName: string | null = null; + #rtlClassName: string | null = null; + #cssRules: CSSRulesByBucket | string[] | null = null; + + public override build(valueCache: ValueCache) { + const styles = valueCache.get(this.expressionName) as GriffelResetStyle; + + [this.#ltrClassName, this.#rtlClassName, this.#cssRules] = resolveResetStyleRules( + // Heads up! + // Style rules should be normalized *before* they will be resolved to CSS rules to have deterministic + // results across different build targets. + normalizeStyleRules(this.path, this.context as FileContext, styles), + ); + } + + public override doRuntimeReplacement(): void { + if (!this.#cssRules || !this.#ltrClassName) { + throw new Error('Styles are not extracted yet. Please call `build` first.'); + } + + const t = this.astService; + const addAssetImport = (path: string) => t.addDefaultImport(path, 'asset'); + + let rulesExpression; + + if (Array.isArray(this.#cssRules)) { + rulesExpression = t.arrayExpression( + this.#cssRules.map(rule => { + return createRuleLiteral(this.path, t, this.context as FileContext, rule, addAssetImport); + }), + ); + } else { + rulesExpression = t.objectExpression( + Object.entries(this.#cssRules).map(([bucketName, cssRules]) => + t.objectProperty( + t.identifier(bucketName), + t.arrayExpression( + cssRules.map(rule => { + return createRuleLiteral(this.path, t, this.context as FileContext, rule as string, addAssetImport); + }), + ), + ), + ), + ); + } + + const stylesImportIdentifier = t.addNamedImport('__resetStyles', this.tagSource.source); + const stylesCallExpression = t.callExpression(stylesImportIdentifier, [ + t.stringLiteral(this.#ltrClassName), + this.#rtlClassName ? t.stringLiteral(this.#rtlClassName) : t.nullLiteral(), + rulesExpression, + ]); + + this.replacer(stylesCallExpression, true); + } +} diff --git a/packages/linaria-processor/src/MakeStylesProcessor.ts b/packages/linaria-processor/src/MakeStylesProcessor.ts new file mode 100644 index 000000000..df850f6a6 --- /dev/null +++ b/packages/linaria-processor/src/MakeStylesProcessor.ts @@ -0,0 +1,69 @@ +import { GriffelStyle, resolveStyleRulesForSlots } from '@griffel/core'; +import type { CSSClassesMapBySlot, CSSRulesByBucket } from '@griffel/core'; +import type { ValueCache } from '@linaria/tags'; + +import { createRuleLiteral } from './assets/createRuleLiteral'; +import { normalizeStyleRules } from './assets/normalizeStyleRules'; +import BaseGriffelProcessor from './BaseGriffelProcessor'; +import type { FileContext } from './types'; +import { dedupeCSSRules } from './utils/dedupeCSSRules'; + +export default class MakeStylesProcessor extends BaseGriffelProcessor { + #cssClassMap: CSSClassesMapBySlot | undefined; + #cssRulesByBucket: CSSRulesByBucket | undefined; + + public override build(valueCache: ValueCache) { + const stylesBySlots = valueCache.get(this.expressionName) as Record; + + [this.#cssClassMap, this.#cssRulesByBucket] = resolveStyleRulesForSlots( + // Heads up! + // Style rules should be normalized *before* they will be resolved to CSS rules to have deterministic + // results across different build targets. + normalizeStyleRules(this.path, this.context as FileContext, stylesBySlots), + ); + } + + public override doRuntimeReplacement(): void { + if (!this.#cssClassMap || !this.#cssRulesByBucket) { + throw new Error('Styles are not extracted yet. Please call `build` first.'); + } + + const t = this.astService; + const addAssetImport = (path: string) => t.addDefaultImport(path, 'asset'); + + const uniqueRules = dedupeCSSRules(this.#cssRulesByBucket); + const rulesObjectExpression = t.objectExpression( + Object.entries(uniqueRules).map(([bucketName, cssRules]) => + t.objectProperty( + t.identifier(bucketName), + t.arrayExpression( + cssRules.map(rule => { + if (typeof rule === 'string') { + return createRuleLiteral(this.path, t, this.context as FileContext, rule, addAssetImport); + } + + const [cssRule, metadata] = rule; + + return t.arrayExpression([ + createRuleLiteral(this.path, t, this.context as FileContext, cssRule, addAssetImport), + t.objectExpression( + Object.entries(metadata).map(([key, value]) => + t.objectProperty(t.identifier(key), t.stringLiteral(value as string)), + ), + ), + ]); + }), + ), + ), + ), + ); + + const stylesImportIdentifier = t.addNamedImport('__styles', this.tagSource.source); + const stylesCallExpression = t.callExpression(stylesImportIdentifier, [ + t.valueToNode(this.#cssClassMap), + rulesObjectExpression, + ]); + + this.replacer(stylesCallExpression, true); + } +} diff --git a/packages/linaria-processor/src/assets/createRuleLiteral.test.ts b/packages/linaria-processor/src/assets/createRuleLiteral.test.ts new file mode 100644 index 000000000..27c6cb1b0 --- /dev/null +++ b/packages/linaria-processor/src/assets/createRuleLiteral.test.ts @@ -0,0 +1,61 @@ +import { types as t } from '@babel/core'; +import generate from '@babel/generator'; +import * as path from 'path'; + +import type { FileContext } from '../types'; +import { createRuleLiteral } from './createRuleLiteral'; + +const fileContextPosix: FileContext = { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', +}; +const fileContextWin32: FileContext = { + root: 'C:\\Users\\Foo\\projects', + filename: 'C:\\Users\\Foo\\projects\\src\\styles\\Component.styles.ts', +}; + +describe('createRuleLiteral', () => { + it('creates strings for rules', () => { + const addAssetImport = jest.fn(); + + const node = createRuleLiteral(path.posix, t, fileContextPosix, '.foo { color: red }', addAssetImport); + const { code } = generate(node); + + expect(code).toMatchInlineSnapshot(`"\\".foo { color: red }\\""`); + expect(addAssetImport).not.toHaveBeenCalled(); + }); + + describe('updates URLs that start with "griffel"', () => { + it('posix', () => { + const addAssetImport = jest.fn().mockImplementation(() => t.identifier('foo')); + + const node = createRuleLiteral( + path.posix, + t, + fileContextPosix, + '.foo { url(griffel:assets/foo.png) }', + addAssetImport, + ); + const { code } = generate(node); + + expect(code).toMatchInlineSnapshot(`"\`.foo { url(\${foo}) }\`"`); + expect(addAssetImport).toHaveBeenCalledWith('../../assets/foo.png'); + }); + + it('win32', () => { + const addAssetImport = jest.fn().mockImplementation(() => t.identifier('foo')); + + const node = createRuleLiteral( + path.win32, + t, + fileContextWin32, + '.foo { url(griffel:assets/foo.png) }', + addAssetImport, + ); + const { code } = generate(node); + + expect(code).toMatchInlineSnapshot(`"\`.foo { url(\${foo}) }\`"`); + expect(addAssetImport).toHaveBeenCalledWith('../../assets/foo.png'); + }); + }); +}); diff --git a/packages/linaria-processor/src/assets/createRuleLiteral.ts b/packages/linaria-processor/src/assets/createRuleLiteral.ts new file mode 100644 index 000000000..fbe7252c9 --- /dev/null +++ b/packages/linaria-processor/src/assets/createRuleLiteral.ts @@ -0,0 +1,51 @@ +import type { types as t } from '@babel/core'; +import { tokenize } from 'stylis'; + +import { relativePathToImportLike } from './relativePathToImportLike'; +import type { FileContext } from '../types'; + +export function createRuleLiteral( + path: typeof import('path'), + astService: typeof t, + fileContext: FileContext, + rule: string, + addAssetImport: (path: string) => t.Identifier, +): t.StringLiteral | t.TemplateLiteral { + if (rule.indexOf('url(') === -1) { + return astService.stringLiteral(rule); + } + + const tokens = tokenize(rule); + + const quasis: t.TemplateElement[] = []; + const expressions: t.Identifier[] = []; + + let acc = ''; + + for (let i = 0, l = tokens.length; i < l; i++) { + acc += tokens[i]; + + if (tokens[i] === 'url') { + const url = tokens[i + 1].slice(1, -1); + + if (url.startsWith('griffel:')) { + // Handle `filter: url(./a.svg#id)` + const [pathname, hash] = url.slice(8).split('#'); + + quasis.push(astService.templateElement({ raw: acc + '(' }, false)); + + const importPath = relativePathToImportLike(path, fileContext, pathname); + const importName = addAssetImport(importPath); + + expressions.push(importName); + + acc = `${hash ? `#${hash}` : ''})`; + i++; + } + } + } + + quasis.push(astService.templateElement({ raw: acc }, true)); + + return astService.templateLiteral(quasis, expressions); +} diff --git a/packages/linaria-processor/src/assets/normalizeStyleRules.test.ts b/packages/linaria-processor/src/assets/normalizeStyleRules.test.ts new file mode 100644 index 000000000..4b881269c --- /dev/null +++ b/packages/linaria-processor/src/assets/normalizeStyleRules.test.ts @@ -0,0 +1,187 @@ +import * as path from 'path'; +import { normalizeStyleRule, normalizeStyleRules } from './normalizeStyleRules'; + +describe('normalizeStyleRule', () => { + it('handles rules without quotes', () => { + expect( + normalizeStyleRule( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + 'url(/home/projects/foo/assets/image.png)', + ), + ).toBe('url(griffel:assets/image.png)'); + }); + + it('handles rules with quotes', () => { + expect( + normalizeStyleRule( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + "url('/home/projects/foo/assets/image.png')", + ), + ).toBe('url(griffel:assets/image.png)'); + expect( + normalizeStyleRule( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + 'url("/home/projects/foo/assets/image.png")', + ), + ).toBe('url(griffel:assets/image.png)'); + }); + + it('keeps relative URLs', () => { + expect( + normalizeStyleRule( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + 'url(./foo.img)', + ), + ).toBe('url(./foo.img)'); + expect( + normalizeStyleRule( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + 'url(../foo.img)', + ), + ).toBe('url(../foo.img)'); + }); + + it('keeps data-url', () => { + expect( + normalizeStyleRule( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + 'url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2Q==)', + ), + ).toBe('url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2Q==)'); + }); + + it('handles Windows paths', () => { + expect( + normalizeStyleRule( + path.win32, + { + root: 'C:\\Users\\Foo\\projects\\bar', + filename: 'C:\\Users\\Foo\\projects\\bar\\src\\styles\\Component.styles.ts', + }, + 'url(C:\\Users\\Foo\\projects\\bar\\assets\\image.png)', + ), + ).toBe('url(griffel:assets/image.png)'); + }); +}); + +describe('normalizeStyleRules', () => { + it('handles rules without metadata', () => { + expect( + normalizeStyleRules( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + { + root: { + color: 'red', + backgroundImage: 'url(/home/projects/foo/assets/image.jpg)', + overflowY: ['hidden', 'scroll'], + + ':hover': { + backgroundImage: 'url(/home/projects/foo/assets/hoverImage.jpg)', + }, + + '@media screen and (max-width: 100px)': { + '& .foo': { + backgroundImage: 'url(/home/projects/foo/assets/mediaImage.jpg)', + }, + }, + }, + }, + ), + ).toEqual({ + root: { + color: 'red', + backgroundImage: 'url(griffel:assets/image.jpg)', + overflowY: ['hidden', 'scroll'], + + ':hover': { + backgroundImage: 'url(griffel:assets/hoverImage.jpg)', + }, + + '@media screen and (max-width: 100px)': { + '& .foo': { + backgroundImage: 'url(griffel:assets/mediaImage.jpg)', + }, + }, + }, + }); + }); + + it('handles multiple URLs', () => { + expect( + normalizeStyleRules( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + { + root: { + // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Backgrounds_and_Borders/Using_multiple_backgrounds + backgroundImage: [ + 'url(/home/projects/foo/assets/firefox.png),', + 'url(/home/projects/foo/assets/bubbles.png),', + 'linear-gradient(to right, rgba(30, 75, 115, 1), rgba(255, 255, 255, 0))', + ].join(' '), + }, + }, + ), + ).toEqual({ + root: { + backgroundImage: [ + 'url(griffel:assets/firefox.png),', + 'url(griffel:assets/bubbles.png),', + 'linear-gradient(to right, rgba(30, 75, 115, 1), rgba(255, 255, 255, 0))', + ].join(' '), + }, + }); + }); + + it('handles keyframe arrays', () => { + expect( + normalizeStyleRules( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + { + root: { + animationName: [{ from: { height: '20px' }, to: { height: '10px' } }], + }, + }, + ), + ).toEqual({ + root: { + animationName: [{ from: { height: '20px' }, to: { height: '10px' } }], + }, + }); + }); +}); diff --git a/packages/babel-preset/src/assets/normalizeStyleRules.ts b/packages/linaria-processor/src/assets/normalizeStyleRules.ts similarity index 60% rename from packages/babel-preset/src/assets/normalizeStyleRules.ts rename to packages/linaria-processor/src/assets/normalizeStyleRules.ts index c56fd8dd2..f6bab71ea 100644 --- a/packages/babel-preset/src/assets/normalizeStyleRules.ts +++ b/packages/linaria-processor/src/assets/normalizeStyleRules.ts @@ -1,25 +1,18 @@ -import { GriffelAnimation, GriffelStyle } from '@griffel/core'; +import type { GriffelAnimation, GriffelResetStyle, GriffelStyle } from '@griffel/core'; import { tokenize } from 'stylis'; -import { isAssetUrl } from './isAssetUrl'; +import { FileContext } from '../types'; /** - * Linaria v3 emits relative paths for assets, we normalize these paths to be relative from the project root to be the + * Linaria v4 emits absolute paths for assets, we normalize these paths to be relative from the project root to be the * same if an assets was used in different files. */ -export function normalizeAssetPath(path: typeof import('path'), projectRoot: string, filename: string, asset: string) { - const absoluteAssetPath = path.resolve(path.dirname(filename), asset); - +export function normalizeAssetPath(path: typeof import('path'), fileContext: FileContext, absoluteAssetPath: string) { // Normalize paths to be POSIX-like to be independent of an execution environment - return path.relative(projectRoot, absoluteAssetPath).split(path.sep).join(path.posix.sep); + return path.relative(fileContext.root, absoluteAssetPath).split(path.sep).join(path.posix.sep); } -export function normalizeStyleRule( - path: typeof import('path'), - projectRoot: string, - filename: string, - ruleValue: string | number, -) { +export function normalizeStyleRule(path: typeof import('path'), fileContext: FileContext, ruleValue: string | number) { if (typeof ruleValue === 'number' || ruleValue.indexOf('url(') === -1) { return ruleValue; } @@ -27,12 +20,12 @@ export function normalizeStyleRule( return tokenize(ruleValue).reduce((result, token, index, array) => { if (token === 'url') { const url = array[index + 1].slice(1, -1); + const isFilePath = url.replace(/^['|"]/, '').startsWith(fileContext.root); - if (isAssetUrl(url)) { - array[index + 1] = `(${normalizeAssetPath( + if (isFilePath) { + array[index + 1] = `(griffel:${normalizeAssetPath( path, - projectRoot, - filename, + fileContext, // Quotes in URL are optional, so we can also normalize them as we know that it's a file path // https://www.w3.org/TR/CSS2/syndata.html#value-def-uri url.replace(/^['|"](.+)['|"]$/, '$1'), @@ -49,9 +42,8 @@ export function normalizeStyleRule( export function normalizeStyleRules( path: typeof import('path'), - projectRoot: string, - filename: string, - stylesBySlots: Record | GriffelStyle, + fileContext: FileContext, + stylesBySlots: Record | GriffelStyle | GriffelResetStyle, ): Record { return Object.fromEntries( Object.entries(stylesBySlots).map(([key, value]) => { @@ -65,20 +57,20 @@ export function normalizeStyleRules( key, value.map(rule => { if (typeof rule === 'object') { - return normalizeStyleRules(path, projectRoot, filename, rule as GriffelAnimation); + return normalizeStyleRules(path, fileContext, rule as GriffelAnimation); } - return normalizeStyleRule(path, projectRoot, filename, rule); + return normalizeStyleRule(path, fileContext, rule); }), ]; } // Nested objects if (typeof value === 'object') { - return [key, normalizeStyleRules(path, projectRoot, filename, value as unknown as GriffelStyle)]; + return [key, normalizeStyleRules(path, fileContext, value as unknown as GriffelStyle)]; } - return [key, normalizeStyleRule(path, projectRoot, filename, value)]; + return [key, normalizeStyleRule(path, fileContext, value)]; }), ); } diff --git a/packages/linaria-processor/src/assets/relativePathToImportLike.test.ts b/packages/linaria-processor/src/assets/relativePathToImportLike.test.ts new file mode 100644 index 000000000..95f28d9c6 --- /dev/null +++ b/packages/linaria-processor/src/assets/relativePathToImportLike.test.ts @@ -0,0 +1,74 @@ +import * as path from 'path'; +import { relativePathToImportLike } from './relativePathToImportLike'; + +describe('relativePathToImportLike', () => { + it('handles POSIX paths', () => { + expect( + relativePathToImportLike( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + 'assets/image.png', + ), + ).toBe('../../assets/image.png'); + + expect( + relativePathToImportLike( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/src/styles/Component.styles.ts', + }, + 'src/styles/Component.png', + ), + ).toBe('./Component.png'); + + expect( + relativePathToImportLike( + path.posix, + { + root: '/home/projects/foo', + filename: '/home/projects/foo/packages/components/src/index.styles.ts', + }, + 'packages/components/src/images/Component.png', + ), + ).toBe('./images/Component.png'); + }); + + it('handles Windows paths', () => { + expect( + relativePathToImportLike( + path.win32, + { + root: 'C:\\Users\\Foo\\projects', + filename: 'C:\\Users\\Foo\\projects\\src\\styles\\Component.styles.ts', + }, + 'assets/image.png', + ), + ).toBe('../../assets/image.png'); + + expect( + relativePathToImportLike( + path.win32, + { + root: 'C:\\Users\\Foo\\projects', + filename: 'C:\\Users\\Foo\\projects\\src\\styles\\Component.styles.ts', + }, + 'src/styles/Component.png', + ), + ).toBe('./Component.png'); + + expect( + relativePathToImportLike( + path.win32, + { + root: 'C:\\Users\\Foo\\projects', + filename: 'C:\\Users\\Foo\\projects\\packages\\components\\src\\index.styles.ts', + }, + 'packages/components/src/images/Component.png', + ), + ).toBe('./images/Component.png'); + }); +}); diff --git a/packages/babel-preset/src/assets/absolutePathToRelative.ts b/packages/linaria-processor/src/assets/relativePathToImportLike.ts similarity index 59% rename from packages/babel-preset/src/assets/absolutePathToRelative.ts rename to packages/linaria-processor/src/assets/relativePathToImportLike.ts index db7c23073..f8a946c76 100644 --- a/packages/babel-preset/src/assets/absolutePathToRelative.ts +++ b/packages/linaria-processor/src/assets/relativePathToImportLike.ts @@ -1,11 +1,8 @@ -export function absolutePathToRelative( - path: typeof import('path'), - projectRoot: string, - filename: string, - assetPath: string, -) { - const fileDirectory = path.dirname(filename); - const absoluteAssetPath = path.resolve(projectRoot, assetPath); +import type { FileContext } from '../types'; + +export function relativePathToImportLike(path: typeof import('path'), fileContext: FileContext, assetPath: string) { + const fileDirectory = path.dirname(fileContext.filename); + const absoluteAssetPath = path.resolve(fileContext.root, assetPath); let relativeAssetPath = path.relative(fileDirectory, absoluteAssetPath); diff --git a/packages/linaria-processor/src/index.ts b/packages/linaria-processor/src/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/packages/linaria-processor/src/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/packages/linaria-processor/src/types.ts b/packages/linaria-processor/src/types.ts new file mode 100644 index 000000000..8d40090ad --- /dev/null +++ b/packages/linaria-processor/src/types.ts @@ -0,0 +1,4 @@ +export type FileContext = { + root: string; + filename: string; +}; diff --git a/packages/babel-preset/src/utils/dedupeCSSRules.test.ts b/packages/linaria-processor/src/utils/dedupeCSSRules.test.ts similarity index 100% rename from packages/babel-preset/src/utils/dedupeCSSRules.test.ts rename to packages/linaria-processor/src/utils/dedupeCSSRules.test.ts diff --git a/packages/babel-preset/src/utils/dedupeCSSRules.ts b/packages/linaria-processor/src/utils/dedupeCSSRules.ts similarity index 100% rename from packages/babel-preset/src/utils/dedupeCSSRules.ts rename to packages/linaria-processor/src/utils/dedupeCSSRules.ts diff --git a/packages/linaria-processor/tsconfig.json b/packages/linaria-processor/tsconfig.json new file mode 100644 index 000000000..42707b2da --- /dev/null +++ b/packages/linaria-processor/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "allowJs": true, + "forceConsistentCasingInFileNames": true, + "lib": ["ES2019", "dom", "DOM.Iterable"], + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/packages/linaria-processor/tsconfig.lib.json b/packages/linaria-processor/tsconfig.lib.json new file mode 100644 index 000000000..8d27d94f9 --- /dev/null +++ b/packages/linaria-processor/tsconfig.lib.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node", "environment"] + }, + "exclude": ["**/*.spec.ts", "**/*.test.ts"], + "include": ["**/*.ts"] +} diff --git a/packages/linaria-processor/tsconfig.spec.json b/packages/linaria-processor/tsconfig.spec.json new file mode 100644 index 000000000..e75e7becd --- /dev/null +++ b/packages/linaria-processor/tsconfig.spec.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "jsx": "react", + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node", "environment", "@testing-library/jest-dom"] + }, + "include": [ + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ] +} diff --git a/packages/react/package.json b/packages/react/package.json index 0fa915447..c49d450be 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -8,6 +8,12 @@ "url": "https://github.com/microsoft/griffel" }, "sideEffects": false, + "linaria": { + "tags": { + "makeStyles": "@griffel/linaria-processor/make-styles", + "makeResetStyles": "@griffel/linaria-processor/make-reset-styles" + } + }, "dependencies": { "@griffel/core": "^1.14.1", "tslib": "^2.1.0" diff --git a/packages/webpack-loader/README.md b/packages/webpack-loader/README.md index a34666255..e51226405 100644 --- a/packages/webpack-loader/README.md +++ b/packages/webpack-loader/README.md @@ -18,9 +18,9 @@ A loader for Webpack 5 that performs build time transforms for [`@griffel/react` ## Install ```bash -yarn add --dev @griffel/webpack-loader +yarn add --dev @griffel/linaria-processor @griffel/webpack-loader # or -npm install --save-dev @griffel/webpack-loader +npm install --save-dev @griffel/linaria-processor @griffel/webpack-loader ``` ## When to use it? @@ -91,35 +91,21 @@ module.exports = { ```js import { makeStyles, makeResetStyles } from 'custom-package'; -// 👇 custom import names are also supported -import { createStyles } from 'custom-package'; ``` -By default, the Webpack loader handles imports from `@griffel/react`. The webpack loader can be re-configured to handle re-exports of Griffel from custom packages. The `makeStyles` function itself can also be renamed in this case. - -```js -module.exports = { - module: { - rules: [ - { - test: /\.(js|jsx)$/, - exclude: /node_modules/, - use: { - loader: '@griffel/webpack-loader', - options: { - modules: [ - { - moduleSource: 'custom-package', - importName: 'makeStyles', - resetImportName: 'makeResetStyles', - }, - ], - }, - }, - }, - ], - }, -}; +By default, the Webpack loader handles imports from `@griffel/react` & `@fluentui/react-components`, to handle imports from custom packages settings you need to include meta information to a matching `package.json`: + +```json +{ + "name": "custom-package", + "version": "1.0.0", + "linaria": { + "tags": { + "makeStyles": "@griffel/linaria-processor/make-styles", + "makeResetStyles": "@griffel/linaria-processor/make-reset-styles" + } + } +} ``` > **Note**: "custom-package" should re-export following functions from `@griffel/react`: diff --git a/packages/webpack-loader/__fixtures__/config-modules/code.ts b/packages/webpack-loader/__fixtures__/config-modules/code.ts deleted file mode 100644 index 8357320ae..000000000 --- a/packages/webpack-loader/__fixtures__/config-modules/code.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-expect-error This is a fake module, will be resolved by Webpack aliases -import { makeStyles } from 'react-make-styles'; - -export const styles = makeStyles({ - root: { backgroundColor: 'red' }, -}); diff --git a/packages/webpack-loader/__fixtures__/config-modules/output.ts b/packages/webpack-loader/__fixtures__/config-modules/output.ts deleted file mode 100644 index fdd5b2392..000000000 --- a/packages/webpack-loader/__fixtures__/config-modules/output.ts +++ /dev/null @@ -1,12 +0,0 @@ -// @ts-expect-error This is a fake module, will be resolved by Webpack aliases -import { __styles } from 'react-make-styles'; -export const styles = __styles( - { - root: { - De3pzq: 'f3xbvq9', - }, - }, - { - d: ['.f3xbvq9{background-color:red;}'], - }, -); diff --git a/packages/webpack-loader/__fixtures__/empty/output.ts b/packages/webpack-loader/__fixtures__/empty/output.ts index f7330031a..f5930e731 100644 --- a/packages/webpack-loader/__fixtures__/empty/output.ts +++ b/packages/webpack-loader/__fixtures__/empty/output.ts @@ -1,5 +1,5 @@ -import { __styles } from '@griffel/react'; -export const useStyles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _styles( { root: {}, }, diff --git a/packages/webpack-loader/__fixtures__/error-argument-count/code.ts b/packages/webpack-loader/__fixtures__/error-argument-count/code.ts deleted file mode 100644 index b04fbcd97..000000000 --- a/packages/webpack-loader/__fixtures__/error-argument-count/code.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { makeStyles } from '@griffel/react'; - -// @ts-expect-error Invalid arguments for "makeStyles" function -export const useStyles = makeStyles({ root: { color: 'red' } }, 'foo'); diff --git a/packages/webpack-loader/__fixtures__/error-argument-count/error.ts b/packages/webpack-loader/__fixtures__/error-argument-count/error.ts deleted file mode 100644 index f687a24a7..000000000 --- a/packages/webpack-loader/__fixtures__/error-argument-count/error.ts +++ /dev/null @@ -1 +0,0 @@ -export default /makeStyles\(\) function accepts only a single param/; diff --git a/packages/webpack-loader/__fixtures__/error-config/code.ts b/packages/webpack-loader/__fixtures__/error-config/code.ts deleted file mode 100644 index 5d70d13b8..000000000 --- a/packages/webpack-loader/__fixtures__/error-config/code.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { makeStyles } from '@griffel/react'; - -export const useStyles = makeStyles({ root: { color: 'red' } }); diff --git a/packages/webpack-loader/__fixtures__/error-config/error.ts b/packages/webpack-loader/__fixtures__/error-config/error.ts deleted file mode 100644 index 77b57681f..000000000 --- a/packages/webpack-loader/__fixtures__/error-config/error.ts +++ /dev/null @@ -1 +0,0 @@ -export default /Loader has been initialized using an options object that does not match the API schema/; diff --git a/packages/webpack-loader/__fixtures__/error-syntax/code.txt b/packages/webpack-loader/__fixtures__/error-syntax/code.txt deleted file mode 100644 index c71bbc16e..000000000 --- a/packages/webpack-loader/__fixtures__/error-syntax/code.txt +++ /dev/null @@ -1,6 +0,0 @@ -// This file is .txt intentionally to avoid Prettier formatting -import { makeStyles } from '@griffel/react'; - -const styles = makeStyles({ - root: { color: 'red' }, -} diff --git a/packages/webpack-loader/__fixtures__/error-syntax/error.ts b/packages/webpack-loader/__fixtures__/error-syntax/error.ts deleted file mode 100644 index 14647cf21..000000000 --- a/packages/webpack-loader/__fixtures__/error-syntax/error.ts +++ /dev/null @@ -1 +0,0 @@ -export default /Module build failed/; diff --git a/packages/webpack-loader/__fixtures__/function/output.ts b/packages/webpack-loader/__fixtures__/function/output.ts index f227f4c15..e38a3bc7c 100644 --- a/packages/webpack-loader/__fixtures__/function/output.ts +++ b/packages/webpack-loader/__fixtures__/function/output.ts @@ -1,5 +1,5 @@ -import { __styles } from '@griffel/react'; -export const styles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const styles = /*#__PURE__*/ _styles( { root: { sj55zd: 'fe3e8s9', diff --git a/packages/webpack-loader/__fixtures__/object/output.ts b/packages/webpack-loader/__fixtures__/object/output.ts index 3f3ef2479..acf11e401 100644 --- a/packages/webpack-loader/__fixtures__/object/output.ts +++ b/packages/webpack-loader/__fixtures__/object/output.ts @@ -1,6 +1,5 @@ -import { __styles } from '@griffel/react'; -import { tokens } from './tokens'; -export const styles = __styles( +import { __styles as _styles } from '@griffel/react'; +export const styles = /*#__PURE__*/ _styles( { root: { sj55zd: 'fl9q5hc', diff --git a/packages/webpack-loader/__fixtures__/react-component/code.ts b/packages/webpack-loader/__fixtures__/react-component/code.ts new file mode 100644 index 000000000..24d1a07ad --- /dev/null +++ b/packages/webpack-loader/__fixtures__/react-component/code.ts @@ -0,0 +1,12 @@ +import { makeStyles } from '@griffel/react'; +import * as React from 'react'; + +const useStyles = makeStyles({ + root: { color: 'red' }, +}); + +export default function Component() { + const classes = useStyles(); + + return React.createElement('div', { className: classes.root }); +} diff --git a/packages/webpack-loader/__fixtures__/react-component/output.ts b/packages/webpack-loader/__fixtures__/react-component/output.ts new file mode 100644 index 000000000..deecd1848 --- /dev/null +++ b/packages/webpack-loader/__fixtures__/react-component/output.ts @@ -0,0 +1,18 @@ +import { __styles as _styles } from '@griffel/react'; +import * as React from 'react'; +const useStyles = /*#__PURE__*/ _styles( + { + root: { + sj55zd: 'fe3e8s9', + }, + }, + { + d: ['.fe3e8s9{color:red;}'], + }, +); +export default function Component() { + const classes = useStyles(); + return React.createElement('div', { + className: classes.root, + }); +} diff --git a/packages/webpack-loader/__fixtures__/reset/output.ts b/packages/webpack-loader/__fixtures__/reset/output.ts index 908b64601..a176e7560 100644 --- a/packages/webpack-loader/__fixtures__/reset/output.ts +++ b/packages/webpack-loader/__fixtures__/reset/output.ts @@ -1,6 +1,5 @@ -import { __resetStyles } from '@griffel/react'; -import { tokens } from './tokens'; -export const useStyles = __resetStyles('rgwtdav', 'r133dp1', [ +import { __resetStyles as _resetStyles } from '@griffel/react'; +export const useStyles = /*#__PURE__*/ _resetStyles('rgwtdav', 'r133dp1', [ '.rgwtdav{color:var(--colorBrandStroke1);padding-left:4px;}', '.r133dp1{color:var(--colorBrandStroke1);padding-right:4px;}', ]); diff --git a/packages/webpack-loader/__fixtures__/webpack-aliases/output.ts b/packages/webpack-loader/__fixtures__/webpack-aliases/output.ts index 06a3744a4..1c4e424fa 100644 --- a/packages/webpack-loader/__fixtures__/webpack-aliases/output.ts +++ b/packages/webpack-loader/__fixtures__/webpack-aliases/output.ts @@ -1,8 +1,5 @@ -import { __styles } from '@griffel/react'; -// @ts-expect-error This module will be resolved via aliases -import color from 'non-existing-color-module'; -import { tokens } from './tokens'; -export const styles = __styles( +import { __styles as _styles } from '@griffel/react'; // @ts-expect-error This module will be resolved via aliases +export const styles = /*#__PURE__*/ _styles( { root: { De3pzq: 'f1bh81bl', diff --git a/packages/webpack-loader/__fixtures__/webpack-resolve-plugins/output.ts b/packages/webpack-loader/__fixtures__/webpack-resolve-plugins/output.ts index 22cb5aea9..d75789a45 100644 --- a/packages/webpack-loader/__fixtures__/webpack-resolve-plugins/output.ts +++ b/packages/webpack-loader/__fixtures__/webpack-resolve-plugins/output.ts @@ -1,8 +1,7 @@ -import { __styles } from '@griffel/react'; -import { tokens } from './tokens'; +import { __styles as _styles } from '@griffel/react'; // @ts-expect-error This module will be resolved via aliases -import color from 'non-existing-color-module'; -export const styles = __styles( + +export const styles = /*#__PURE__*/ _styles( { root: { De3pzq: 'f1bh81bl', diff --git a/packages/webpack-loader/package.json b/packages/webpack-loader/package.json index 7b3acc6be..ecd4bb8ca 100644 --- a/packages/webpack-loader/package.json +++ b/packages/webpack-loader/package.json @@ -8,12 +8,10 @@ "url": "https://github.com/microsoft/griffel" }, "dependencies": { - "@babel/core": "^7.12.13", - "@griffel/babel-preset": "^1.4.20", - "enhanced-resolve": "^5.8.2", + "@linaria/webpack-loader": "^4.5.4", "tslib": "^2.1.0" }, "peerDependencies": { - "webpack": "^5" + "@griffel/linaria-processor": "^0.0.1" } } diff --git a/packages/webpack-loader/src/transformSync.ts b/packages/webpack-loader/src/transformSync.ts deleted file mode 100644 index 4709d1748..000000000 --- a/packages/webpack-loader/src/transformSync.ts +++ /dev/null @@ -1,57 +0,0 @@ -import * as Babel from '@babel/core'; -import griffelPreset, { BabelPluginOptions } from '@griffel/babel-preset'; - -export type TransformOptions = { - filename: string; - - inputSourceMap: Babel.TransformOptions['inputSourceMap']; - enableSourceMaps: boolean; - - pluginOptions: BabelPluginOptions; -}; - -export type TransformResult = { - code: string; - sourceMap: NonNullable | undefined; -}; - -/** - * Transforms passed source code with Babel, uses user's config for parsing, but ignores it for transforms. - */ -export function transformSync(sourceCode: string, options: TransformOptions): TransformResult { - // Parse the code first so Babel will use user's babel config for parsing - // During transforms we don't want to use user's config - const babelAST = Babel.parseSync(sourceCode, { - caller: { name: 'griffel' }, - - filename: options.filename, - inputSourceMap: options.inputSourceMap, - sourceMaps: options.enableSourceMaps, - }); - - if (babelAST === null) { - throw new Error(`Failed to create AST for "${options.filename}" due unknown Babel error...`); - } - - const babelFileResult = Babel.transformFromAstSync(babelAST, sourceCode, { - // Ignore all user's configs and apply only our plugin - babelrc: false, - configFile: false, - presets: [[griffelPreset, options.pluginOptions]], - - filename: options.filename, - - sourceMaps: options.enableSourceMaps, - sourceFileName: options.filename, - inputSourceMap: options.inputSourceMap, - }); - - if (babelFileResult === null) { - throw new Error(`Failed to transform "${options.filename}" due unknown Babel error...`); - } - - return { - code: babelFileResult.code as string, - sourceMap: babelFileResult.map === null ? undefined : babelFileResult.map, - }; -} diff --git a/packages/webpack-loader/src/webpackLoader.test.ts b/packages/webpack-loader/src/webpackLoader.test.ts index 2acae75ad..cbecaff71 100644 --- a/packages/webpack-loader/src/webpackLoader.test.ts +++ b/packages/webpack-loader/src/webpackLoader.test.ts @@ -5,11 +5,10 @@ import * as prettier from 'prettier'; import * as webpack from 'webpack'; import { merge } from 'webpack-merge'; -import type { WebpackLoaderOptions } from './webpackLoader'; import { shouldTransformSourceCode } from './webpackLoader'; type CompileOptions = { - loaderOptions?: WebpackLoaderOptions; + loaderOptions?: Record; webpackConfig?: webpack.Configuration; }; @@ -35,7 +34,7 @@ async function compileSourceWithWebpack(entryPath: string, options: CompileOptio module: { rules: [ { - test: /\.(ts|tsx|txt)$/, + test: /\.ts$/, include: path.dirname(entryPath), use: { loader: path.resolve(__dirname, './index.ts'), @@ -174,77 +173,29 @@ function testFixture(fixtureName: string, options: CompileOptions = {}) { } describe('shouldTransformSourceCode', () => { - describe('handles defaults', () => { + describe('handles functions', () => { it('makeStyles', () => { - expect(shouldTransformSourceCode(`import { makeStyles } from "@griffel/react"`, undefined)).toBe(true); - expect(shouldTransformSourceCode(`import { Button } from "@fluentui/react"`, undefined)).toBe(false); + expect(shouldTransformSourceCode(`import { makeStyles } from "@griffel/react"`)).toBe(true); + expect(shouldTransformSourceCode(`import { Button } from "@fluentui/react"`)).toBe(false); }); it('makeResetStyles', () => { - expect(shouldTransformSourceCode(`import { makeResetStyles } from "@griffel/react"`, undefined)).toBe(true); - expect(shouldTransformSourceCode(`import { Button } from "@fluentui/react"`, undefined)).toBe(false); - }); - }); - - describe('handles options', () => { - it('makeStyles', () => { - expect( - shouldTransformSourceCode(`import { makeStyles } from "@griffel/react"`, [ - { moduleSource: '@griffel/react', importName: 'makeStyles' }, - ]), - ).toBe(true); - expect( - shouldTransformSourceCode(`import { createStyles } from "make-styles"`, [ - { moduleSource: 'make-styles', importName: 'createStyles' }, - ]), - ).toBe(true); - - expect( - shouldTransformSourceCode(`import { Button } from "@fluentui/react"`, [ - { moduleSource: '@griffel/react', importName: 'makeStyles' }, - ]), - ).toBe(false); - }); - - it('makeResetStyles', () => { - expect( - shouldTransformSourceCode(`import { makeResetStyles } from "@griffel/react"`, [ - { moduleSource: '@griffel/react', importName: 'makeStyles', resetImportName: 'makeResetStyles' }, - ]), - ).toBe(true); - expect( - shouldTransformSourceCode(`import { createResetStyles } from "make-styles"`, [ - { moduleSource: 'make-styles', importName: 'makeStyles', resetImportName: 'createResetStyles' }, - ]), - ).toBe(true); - - expect( - shouldTransformSourceCode(`import { Button } from "@fluentui/react"`, [ - { moduleSource: '@griffel/react', importName: 'makeStyles', resetImportName: 'makeResetStyles' }, - ]), - ).toBe(false); + expect(shouldTransformSourceCode(`import { makeResetStyles } from "@griffel/react"`)).toBe(true); + expect(shouldTransformSourceCode(`import { Button } from "@fluentui/react"`)).toBe(false); }); }); }); describe('webpackLoader', () => { + jest.setTimeout(15000); + // Integration fixtures for base functionality, all scenarios are tested in "@griffel/babel-preset" testFixture('object'); testFixture('function'); testFixture('reset'); testFixture('empty'); - // Integration fixtures for config functionality - testFixture('config-modules', { - loaderOptions: { - modules: [{ moduleSource: 'react-make-styles', importName: 'makeStyles' }], - }, - webpackConfig: { - externals: { - 'react-make-styles': 'Griffel', - }, - }, - }); + testFixture('react-component'); // Asserts that aliases are resolved properly in Babel plugin testFixture('webpack-aliases', { @@ -287,18 +238,4 @@ describe('webpackLoader', () => { }, }, }); - - // Asserts handling errors from Babel plugin - testFixture('error-argument-count'); - // Asserts errors in loader's config - testFixture('error-config', { - loaderOptions: { - babelOptions: { - // @ts-expect-error "plugins" should be an array, an object is passed to test schema - plugins: {}, - }, - }, - }); - // Asserts errors in loader functionality - testFixture('error-syntax'); }); diff --git a/packages/webpack-loader/src/webpackLoader.ts b/packages/webpack-loader/src/webpackLoader.ts index 798ff7bca..9f45789be 100644 --- a/packages/webpack-loader/src/webpackLoader.ts +++ b/packages/webpack-loader/src/webpackLoader.ts @@ -1,119 +1,24 @@ -import { configSchema, BabelPluginOptions, EvalCache, Module } from '@griffel/babel-preset'; -import * as enhancedResolve from 'enhanced-resolve'; -import * as path from 'path'; -import * as webpack from 'webpack'; +import linariaLoader from '@linaria/webpack-loader'; -import { transformSync, TransformResult, TransformOptions } from './transformSync'; +export function shouldTransformSourceCode(source: string | Buffer): boolean { + const code = Buffer.isBuffer(source) ? source.toString('utf8') : source; -export type WebpackLoaderOptions = BabelPluginOptions; - -type WebpackLoaderParams = Parameters>; - -export function shouldTransformSourceCode( - sourceCode: string, - modules: WebpackLoaderOptions['modules'] | undefined, -): boolean { - // Fallback to "makeStyles" if options were not provided - const imports = modules - ? modules.flatMap(module => [module.importName, module.resetImportName || 'makeResetStyles']).join('|') - : 'makeStyles|makeResetStyles'; - - return new RegExp(`\\b(${imports}|makeResetStyles)`).test(sourceCode); -} - -/** - * Webpack can also pass sourcemaps as a string, Babel accepts only objects. - * See https://github.com/babel/babel-loader/pull/889. - */ -function parseSourceMap(inputSourceMap: WebpackLoaderParams[1]): TransformOptions['inputSourceMap'] { - try { - if (typeof inputSourceMap === 'string') { - return JSON.parse(inputSourceMap) as TransformOptions['inputSourceMap']; - } - - return inputSourceMap as TransformOptions['inputSourceMap']; - } catch (err) { - return undefined; - } + return new RegExp(`\\b(makeStyles|makeResetStyles)`).test(code); } export function webpackLoader( - this: webpack.LoaderContext, - sourceCode: WebpackLoaderParams[0], - inputSourceMap: WebpackLoaderParams[1], -) { + this: ThisParameterType, + ...args: Parameters +): void { // Loaders are cacheable by default, but there are edge cases/bugs when caching does not work until it's specified: // https://github.com/webpack/webpack/issues/14946 this.cacheable(); - const options = this.getOptions(configSchema); - // Early return to handle cases when makeStyles() calls are not present, allows to avoid expensive invocation of Babel - if (!shouldTransformSourceCode(sourceCode, options.modules)) { - this.callback(null, sourceCode, inputSourceMap); - return; - } - - EvalCache.clearForFile(this.resourcePath); - - const resolveOptionsDefaults: webpack.ResolveOptions = { - conditionNames: ['require'], - extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'], - }; - // ⚠ "this._compilation" limits loaders compatibility, however there seems to be no other way to access Webpack's - // resolver. - // There is this.resolve(), but it's asynchronous. Another option is to read the webpack.config.js, but it won't work - // for programmatic usage. This API is used by many loaders/plugins, so hope we're safe for a while - const resolveOptionsFromWebpackConfig: webpack.ResolveOptions = this._compilation?.options.resolve || {}; - - const resolveSync = enhancedResolve.create.sync({ - ...resolveOptionsDefaults, - alias: resolveOptionsFromWebpackConfig.alias, - modules: resolveOptionsFromWebpackConfig.modules, - plugins: resolveOptionsFromWebpackConfig.plugins, - }); - - const originalResolveFilename = Module._resolveFilename; - - let result: TransformResult | null = null; - let error: Error | null = null; - - try { - // We are evaluating modules in Babel plugin to resolve expressions (function calls, imported constants, etc.) in - // makeStyles() calls, see evaluatePathsInVM.ts. - // Webpack's config can define own module resolution, Babel plugin should use Webpack's resolution to properly - // resolve paths. - Module._resolveFilename = (id, { filename }) => { - const resolvedPath = resolveSync(path.dirname(filename), id); - - if (!resolvedPath) { - throw new Error(`enhanced-resolve: Failed to resolve module "${id}"`); - } - - this.addDependency(resolvedPath); - - return resolvedPath; - }; - - result = transformSync(sourceCode, { - filename: path.relative(process.cwd(), this.resourcePath), - - enableSourceMaps: this.sourceMap || false, - inputSourceMap: parseSourceMap(inputSourceMap), - - pluginOptions: options, - }); - } catch (err) { - error = err as Error; - } finally { - // Restore original behaviour - Module._resolveFilename = originalResolveFilename; - } - - if (result) { - this.callback(null, result.code, result.sourceMap); + if (!shouldTransformSourceCode(args[0])) { + this.callback(null, args[0], args[1]); return; } - this.callback(error); + return linariaLoader.apply(this, args); } diff --git a/tsconfig.base.json b/tsconfig.base.json index 4f4911951..89148f54e 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -21,6 +21,9 @@ "@griffel/e2e-utils": ["e2e/utils/src/index.ts"], "@griffel/eslint-plugin": ["packages/eslint-plugin/src/index.ts"], "@griffel/jest-serializer": ["packages/jest-serializer/src/index.ts"], + "@griffel/linaria-processor": ["packages/linaria-processor/src/index.ts"], + "@griffel/linaria-processor/make-styles": ["packages/linaria-processor/src/MakeStylesProcessor.ts"], + "@griffel/linaria-processor/make-reset-styles": ["packages/linaria-processor/src/MakeResetStylesProcessor.ts"], "@griffel/next-extraction-plugin": ["packages/next-extraction-plugin/src/index.ts"], "@griffel/style-types": ["packages/style-types/src/index.ts"], "@griffel/react": ["packages/react/src/index.ts"], diff --git a/workspace.json b/workspace.json index 3e7d684a2..ff705d6ee 100644 --- a/workspace.json +++ b/workspace.json @@ -10,6 +10,7 @@ "@griffel/e2e-utils": "e2e/utils", "@griffel/eslint-plugin": "packages/eslint-plugin", "@griffel/jest-serializer": "packages/jest-serializer", + "@griffel/linaria-processor": "packages/linaria-processor", "@griffel/next-extraction-plugin": "packages/next-extraction-plugin", "@griffel/react": "packages/react", "@griffel/style-types": "packages/style-types", diff --git a/yarn.lock b/yarn.lock index 59fe79157..e30610886 100644 --- a/yarn.lock +++ b/yarn.lock @@ -172,28 +172,29 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:^2.1.0": - version: 2.1.2 - resolution: "@ampproject/remapping@npm:2.1.2" +"@ampproject/remapping@npm:^2.2.0": + version: 2.2.1 + resolution: "@ampproject/remapping@npm:2.2.1" dependencies: - "@jridgewell/trace-mapping": ^0.3.0 - checksum: e023f92cdd9723f3042cde3b4d922adfeef0e198aa73486b0b6c034ad36af5f96e5c0cc72b335b30b2eb9852d907efc92af6bfcd3f4b4d286177ee32a189cf92 + "@jridgewell/gen-mapping": ^0.3.0 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 03c04fd526acc64a1f4df22651186f3e5ef0a9d6d6530ce4482ec9841269cf7a11dbb8af79237c282d721c5312024ff17529cd72cc4768c11e999b58e2302079 languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.18.6, @babel/code-frame@npm:^7.5.5, @babel/code-frame@npm:^7.8.3": - version: 7.18.6 - resolution: "@babel/code-frame@npm:7.18.6" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.22.5, @babel/code-frame@npm:^7.5.5, @babel/code-frame@npm:^7.8.3": + version: 7.22.5 + resolution: "@babel/code-frame@npm:7.22.5" dependencies: - "@babel/highlight": ^7.18.6 - checksum: 195e2be3172d7684bf95cff69ae3b7a15a9841ea9d27d3c843662d50cdd7d6470fd9c8e64be84d031117e4a4083486effba39f9aef6bbb2c89f7f21bcfba33ba + "@babel/highlight": ^7.22.5 + checksum: cfe804f518f53faaf9a1d3e0f9f74127ab9a004912c3a16fda07fb6a633393ecb9918a053cb71804204c1b7ec3d49e1699604715e2cfb0c9f7bc4933d324ebb6 languageName: node linkType: hard -"@babel/compat-data@npm:^7.17.7, @babel/compat-data@npm:^7.20.1, @babel/compat-data@npm:^7.20.5": - version: 7.20.14 - resolution: "@babel/compat-data@npm:7.20.14" - checksum: 6c9efe36232094e4ad0b70d165587f21ca718e5d011f7a52a77a18502a7524e90e2855aa5a2e086395bcfd21bd2c7c99128dcd8d9fdffe94316b72acf5c66f2c +"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": + version: 7.22.9 + resolution: "@babel/compat-data@npm:7.22.9" + checksum: bed77d9044ce948b4327b30dd0de0779fa9f3a7ed1f2d31638714ed00229fa71fc4d1617ae0eb1fad419338d3658d0e9a5a083297451e09e73e078d0347ff808 languageName: node linkType: hard @@ -221,101 +222,103 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.0.1, @babel/core@npm:^7.1.0, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.13, @babel/core@npm:^7.12.3, @babel/core@npm:^7.15.0, @babel/core@npm:^7.15.5, @babel/core@npm:^7.18.2, @babel/core@npm:^7.18.6, @babel/core@npm:^7.20.2, @babel/core@npm:^7.7.5": - version: 7.20.12 - resolution: "@babel/core@npm:7.20.12" +"@babel/core@npm:^7.0.1, @babel/core@npm:^7.1.0, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.13, @babel/core@npm:^7.12.3, @babel/core@npm:^7.15.0, @babel/core@npm:^7.15.5, @babel/core@npm:^7.18.6, @babel/core@npm:^7.20.2, @babel/core@npm:^7.22.9, @babel/core@npm:^7.7.5": + version: 7.22.9 + resolution: "@babel/core@npm:7.22.9" dependencies: - "@ampproject/remapping": ^2.1.0 - "@babel/code-frame": ^7.18.6 - "@babel/generator": ^7.20.7 - "@babel/helper-compilation-targets": ^7.20.7 - "@babel/helper-module-transforms": ^7.20.11 - "@babel/helpers": ^7.20.7 - "@babel/parser": ^7.20.7 - "@babel/template": ^7.20.7 - "@babel/traverse": ^7.20.12 - "@babel/types": ^7.20.7 + "@ampproject/remapping": ^2.2.0 + "@babel/code-frame": ^7.22.5 + "@babel/generator": ^7.22.9 + "@babel/helper-compilation-targets": ^7.22.9 + "@babel/helper-module-transforms": ^7.22.9 + "@babel/helpers": ^7.22.6 + "@babel/parser": ^7.22.7 + "@babel/template": ^7.22.5 + "@babel/traverse": ^7.22.8 + "@babel/types": ^7.22.5 convert-source-map: ^1.7.0 debug: ^4.1.0 gensync: ^1.0.0-beta.2 json5: ^2.2.2 - semver: ^6.3.0 - checksum: 62e6c3e2149a70b5c9729ef5f0d3e2e97e9dcde89fc039c8d8e3463d5d7ba9b29ee84d10faf79b61532ac1645aa62f2bd42338320617e6e3a8a4d8e2a27076e7 + semver: ^6.3.1 + checksum: 7bf069aeceb417902c4efdaefab1f7b94adb7dea694a9aed1bda2edf4135348a080820529b1a300c6f8605740a00ca00c19b2d5e74b5dd489d99d8c11d5e56d1 languageName: node linkType: hard -"@babel/generator@npm:>=7, @babel/generator@npm:^7.12.11, @babel/generator@npm:^7.12.13, @babel/generator@npm:^7.12.5, @babel/generator@npm:^7.17.9, @babel/generator@npm:^7.18.7, @babel/generator@npm:^7.20.7, @babel/generator@npm:^7.7.2": - version: 7.20.14 - resolution: "@babel/generator@npm:7.20.14" +"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.12.13, @babel/generator@npm:^7.12.5, @babel/generator@npm:^7.17.9, @babel/generator@npm:^7.18.7, @babel/generator@npm:^7.22.7, @babel/generator@npm:^7.22.9, @babel/generator@npm:^7.7.2": + version: 7.22.9 + resolution: "@babel/generator@npm:7.22.9" dependencies: - "@babel/types": ^7.20.7 + "@babel/types": ^7.22.5 "@jridgewell/gen-mapping": ^0.3.2 + "@jridgewell/trace-mapping": ^0.3.17 jsesc: ^2.5.1 - checksum: 5f6aa2d86af26e76d276923a5c34191124a119b16ee9ccc34aef654a7dec84fbd7d2daed2e6458a6a06bf87f3661deb77c9fea59b8f67faff5c90793c96d76d6 + checksum: 7c9d2c58b8d5ac5e047421a6ab03ec2ff5d9a5ff2c2212130a0055e063ac349e0b19d435537d6886c999771aef394832e4f54cd9fc810100a7f23d982f6af06b languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:^7.16.0, @babel/helper-annotate-as-pure@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-annotate-as-pure@npm:7.18.6" +"@babel/helper-annotate-as-pure@npm:^7.16.0, @babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" dependencies: - "@babel/types": ^7.18.6 - checksum: 88ccd15ced475ef2243fdd3b2916a29ea54c5db3cd0cfabf9d1d29ff6e63b7f7cd1c27264137d7a40ac2e978b9b9a542c332e78f40eb72abe737a7400788fc1b + "@babel/types": ^7.22.5 + checksum: 53da330f1835c46f26b7bf4da31f7a496dee9fd8696cca12366b94ba19d97421ce519a74a837f687749318f94d1a37f8d1abcbf35e8ed22c32d16373b2f6198d languageName: node linkType: hard -"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.18.6" +"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.22.5" dependencies: - "@babel/helper-explode-assignable-expression": ^7.18.6 - "@babel/types": ^7.18.6 - checksum: c4d71356e0adbc20ce9fe7c1e1181ff65a78603f8bba7615745f0417fed86bad7dc0a54a840bc83667c66709b3cb3721edcb9be0d393a298ce4e9eb6d085f3c1 + "@babel/types": ^7.22.5 + checksum: d753acac62399fc6dd354cf1b9441bde0c331c2fe792a4c14904c5e5eafc3cac79478f6aa038e8a51c1148b0af6710a2e619855e4b5d54497ac972eaffed5884 languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.13.0, @babel/helper-compilation-targets@npm:^7.17.7, @babel/helper-compilation-targets@npm:^7.18.9, @babel/helper-compilation-targets@npm:^7.20.0, @babel/helper-compilation-targets@npm:^7.20.7": - version: 7.20.7 - resolution: "@babel/helper-compilation-targets@npm:7.20.7" +"@babel/helper-compilation-targets@npm:^7.13.0, @babel/helper-compilation-targets@npm:^7.20.7, @babel/helper-compilation-targets@npm:^7.22.5, @babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.22.9": + version: 7.22.9 + resolution: "@babel/helper-compilation-targets@npm:7.22.9" dependencies: - "@babel/compat-data": ^7.20.5 - "@babel/helper-validator-option": ^7.18.6 - browserslist: ^4.21.3 + "@babel/compat-data": ^7.22.9 + "@babel/helper-validator-option": ^7.22.5 + browserslist: ^4.21.9 lru-cache: ^5.1.1 - semver: ^6.3.0 + semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0 - checksum: 8c32c873ba86e2e1805b30e0807abd07188acbe00ebb97576f0b09061cc65007f1312b589eccb4349c5a8c7f8bb9f2ab199d41da7030bf103d9f347dcd3a3cf4 + checksum: ea0006c6a93759025f4a35a25228ae260538c9f15023e8aac2a6d45ca68aef4cf86cfc429b19af9a402cbdd54d5de74ad3fbcf6baa7e48184dc079f1a791e178 languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.17.0, @babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.20.5": - version: 7.20.12 - resolution: "@babel/helper-create-class-features-plugin@npm:7.20.12" +"@babel/helper-create-class-features-plugin@npm:^7.17.0, @babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.20.5, @babel/helper-create-class-features-plugin@npm:^7.22.5": + version: 7.22.9 + resolution: "@babel/helper-create-class-features-plugin@npm:7.22.9" dependencies: - "@babel/helper-annotate-as-pure": ^7.18.6 - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-function-name": ^7.19.0 - "@babel/helper-member-expression-to-functions": ^7.20.7 - "@babel/helper-optimise-call-expression": ^7.18.6 - "@babel/helper-replace-supers": ^7.20.7 - "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 - "@babel/helper-split-export-declaration": ^7.18.6 + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-function-name": ^7.22.5 + "@babel/helper-member-expression-to-functions": ^7.22.5 + "@babel/helper-optimise-call-expression": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.9 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0 - checksum: 1e9ed4243b75278fa24deb40dc62bf537b79307987223a2d2d2ae5abf7ba6dc8435d6e3bb55d52ceb30d3e1eba88e7eb6a1885a8bb519e5cfc3e9dedb97d43e6 + checksum: 6c2436d1a5a3f1ff24628d78fa8c6d3120c40285aa3eda7815b1adbf8c5951e0dd73d368cf845825888fa3dc2f207dadce53309825598d7c67953e5ed9dd51d2 languageName: node linkType: hard -"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.20.5": - version: 7.20.5 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.20.5" +"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.22.5": + version: 7.22.9 + resolution: "@babel/helper-create-regexp-features-plugin@npm:7.22.9" dependencies: - "@babel/helper-annotate-as-pure": ^7.18.6 - regexpu-core: ^5.2.1 + "@babel/helper-annotate-as-pure": ^7.22.5 + regexpu-core: ^5.3.1 + semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0 - checksum: 7f29c3cb7447cca047b0d394f8ab98e4923d00e86a7afa56e5df9770c48ec107891505d2d1f06b720ecc94ed24bf58d90986cc35fe4a43b549eb7b7a5077b693 + checksum: 87cb48a7ee898ab205374274364c3adc70b87b08c7bd07f51019ae4562c0170d7148e654d591f825dee14b5fe11666a0e7966872dfdbfa0d1b94b861ecf0e4e1 languageName: node linkType: hard @@ -337,97 +340,86 @@ __metadata: languageName: node linkType: hard -"@babel/helper-define-polyfill-provider@npm:^0.3.1, @babel/helper-define-polyfill-provider@npm:^0.3.3": - version: 0.3.3 - resolution: "@babel/helper-define-polyfill-provider@npm:0.3.3" +"@babel/helper-define-polyfill-provider@npm:^0.4.2": + version: 0.4.2 + resolution: "@babel/helper-define-polyfill-provider@npm:0.4.2" dependencies: - "@babel/helper-compilation-targets": ^7.17.7 - "@babel/helper-plugin-utils": ^7.16.7 + "@babel/helper-compilation-targets": ^7.22.6 + "@babel/helper-plugin-utils": ^7.22.5 debug: ^4.1.1 lodash.debounce: ^4.0.8 resolve: ^1.14.2 - semver: ^6.1.2 peerDependencies: - "@babel/core": ^7.4.0-0 - checksum: 8e3fe75513302e34f6d92bd67b53890e8545e6c5bca8fe757b9979f09d68d7e259f6daea90dc9e01e332c4f8781bda31c5fe551c82a277f9bc0bec007aed497c + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 1f6dec0c5d0876d278fe15b71238eccc5f74c4e2efa2c78aaafa8bc2cc96336b8e68d94cd1a78497356c96e8b91b8c1f4452179820624d1702aee2f9832e6569 languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-environment-visitor@npm:7.18.9" - checksum: b25101f6162ddca2d12da73942c08ad203d7668e06663df685634a8fde54a98bc015f6f62938e8554457a592a024108d45b8f3e651fd6dcdb877275b73cc4420 +"@babel/helper-environment-visitor@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-environment-visitor@npm:7.22.5" + checksum: 248532077d732a34cd0844eb7b078ff917c3a8ec81a7f133593f71a860a582f05b60f818dc5049c2212e5baa12289c27889a4b81d56ef409b4863db49646c4b1 languageName: node linkType: hard -"@babel/helper-explode-assignable-expression@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-explode-assignable-expression@npm:7.18.6" +"@babel/helper-function-name@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-function-name@npm:7.22.5" dependencies: - "@babel/types": ^7.18.6 - checksum: 225cfcc3376a8799023d15dc95000609e9d4e7547b29528c7f7111a0e05493ffb12c15d70d379a0bb32d42752f340233c4115bded6d299bc0c3ab7a12be3d30f + "@babel/template": ^7.22.5 + "@babel/types": ^7.22.5 + checksum: 6b1f6ce1b1f4e513bf2c8385a557ea0dd7fa37971b9002ad19268ca4384bbe90c09681fe4c076013f33deabc63a53b341ed91e792de741b4b35e01c00238177a languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.18.9, @babel/helper-function-name@npm:^7.19.0": - version: 7.19.0 - resolution: "@babel/helper-function-name@npm:7.19.0" +"@babel/helper-hoist-variables@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-hoist-variables@npm:7.22.5" dependencies: - "@babel/template": ^7.18.10 - "@babel/types": ^7.19.0 - checksum: eac1f5db428ba546270c2b8d750c24eb528b8fcfe50c81de2e0bdebf0e20f24bec688d4331533b782e4a907fad435244621ca2193cfcf80a86731299840e0f6e + "@babel/types": ^7.22.5 + checksum: 394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc languageName: node linkType: hard -"@babel/helper-hoist-variables@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-hoist-variables@npm:7.18.6" +"@babel/helper-member-expression-to-functions@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-member-expression-to-functions@npm:7.22.5" dependencies: - "@babel/types": ^7.18.6 - checksum: fd9c35bb435fda802bf9ff7b6f2df06308a21277c6dec2120a35b09f9de68f68a33972e2c15505c1a1a04b36ec64c9ace97d4a9e26d6097b76b4396b7c5fa20f + "@babel/types": ^7.22.5 + checksum: 4bd5791529c280c00743e8bdc669ef0d4cd1620d6e3d35e0d42b862f8262bc2364973e5968007f960780344c539a4b9cf92ab41f5b4f94560a9620f536de2a39 languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.20.7": - version: 7.20.7 - resolution: "@babel/helper-member-expression-to-functions@npm:7.20.7" +"@babel/helper-module-imports@npm:^7.0.0, @babel/helper-module-imports@npm:^7.10.4, @babel/helper-module-imports@npm:^7.12.13, @babel/helper-module-imports@npm:^7.16.0, @babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.18.6, @babel/helper-module-imports@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-module-imports@npm:7.22.5" dependencies: - "@babel/types": ^7.20.7 - checksum: cec17aab7e964830b0146e575bd141127032319f26ed864a65b35abd75ad618d264d3e11449b9b4e29cfd95bb1a7e774afddd4884fdcc29c36ac9cbd2b66359f - languageName: node - linkType: hard - -"@babel/helper-module-imports@npm:^7.0.0, @babel/helper-module-imports@npm:^7.10.4, @babel/helper-module-imports@npm:^7.12.13, @babel/helper-module-imports@npm:^7.16.0, @babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-module-imports@npm:7.18.6" - dependencies: - "@babel/types": ^7.18.6 - checksum: f393f8a3b3304b1b7a288a38c10989de754f01d29caf62ce7c4e5835daf0a27b81f3ac687d9d2780d39685aae7b55267324b512150e7b2be967b0c493b6a1def + "@babel/types": ^7.22.5 + checksum: 9ac2b0404fa38b80bdf2653fbeaf8e8a43ccb41bd505f9741d820ed95d3c4e037c62a1bcdcb6c9527d7798d2e595924c4d025daed73283badc180ada2c9c49ad languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.12.1, @babel/helper-module-transforms@npm:^7.18.6, @babel/helper-module-transforms@npm:^7.20.11": - version: 7.20.11 - resolution: "@babel/helper-module-transforms@npm:7.20.11" +"@babel/helper-module-transforms@npm:^7.12.1, @babel/helper-module-transforms@npm:^7.22.5, @babel/helper-module-transforms@npm:^7.22.9": + version: 7.22.9 + resolution: "@babel/helper-module-transforms@npm:7.22.9" dependencies: - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-module-imports": ^7.18.6 - "@babel/helper-simple-access": ^7.20.2 - "@babel/helper-split-export-declaration": ^7.18.6 - "@babel/helper-validator-identifier": ^7.19.1 - "@babel/template": ^7.20.7 - "@babel/traverse": ^7.20.10 - "@babel/types": ^7.20.7 - checksum: 29319ebafa693d48756c6ba0d871677bb0037e0da084fbe221a17c38d57093fc8aa38543c07d76e788266a937976e37ab4901971ca7f237c5ab45f524b9ecca0 + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-module-imports": ^7.22.5 + "@babel/helper-simple-access": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/helper-validator-identifier": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 2751f77660518cf4ff027514d6f4794f04598c6393be7b04b8e46c6e21606e11c19f3f57ab6129a9c21bacdf8b3ffe3af87bb401d972f34af2d0ffde02ac3001 languageName: node linkType: hard -"@babel/helper-optimise-call-expression@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-optimise-call-expression@npm:7.18.6" +"@babel/helper-optimise-call-expression@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-optimise-call-expression@npm:7.22.5" dependencies: - "@babel/types": ^7.18.6 - checksum: e518fe8418571405e21644cfb39cf694f30b6c47b10b006609a92469ae8b8775cbff56f0b19732343e2ea910641091c5a2dc73b56ceba04e116a33b0f8bd2fbd + "@babel/types": ^7.22.5 + checksum: c70ef6cc6b6ed32eeeec4482127e8be5451d0e5282d5495d5d569d39eb04d7f1d66ec99b327f45d1d5842a9ad8c22d48567e93fc502003a47de78d122e355f7c languageName: node linkType: hard @@ -438,171 +430,154 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.13.0, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.18.9, @babel/helper-plugin-utils@npm:^7.19.0, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.20.2 - resolution: "@babel/helper-plugin-utils@npm:7.20.2" - checksum: f6cae53b7fdb1bf3abd50fa61b10b4470985b400cc794d92635da1e7077bb19729f626adc0741b69403d9b6e411cddddb9c0157a709cc7c4eeb41e663be5d74b +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.13.0, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.18.9, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.22.5 + resolution: "@babel/helper-plugin-utils@npm:7.22.5" + checksum: c0fc7227076b6041acd2f0e818145d2e8c41968cc52fb5ca70eed48e21b8fe6dd88a0a91cbddf4951e33647336eb5ae184747ca706817ca3bef5e9e905151ff5 languageName: node linkType: hard -"@babel/helper-remap-async-to-generator@npm:^7.18.6, @babel/helper-remap-async-to-generator@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-remap-async-to-generator@npm:7.18.9" +"@babel/helper-remap-async-to-generator@npm:^7.22.5": + version: 7.22.9 + resolution: "@babel/helper-remap-async-to-generator@npm:7.22.9" dependencies: - "@babel/helper-annotate-as-pure": ^7.18.6 - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-wrap-function": ^7.18.9 - "@babel/types": ^7.18.9 + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-wrap-function": ^7.22.9 peerDependencies: "@babel/core": ^7.0.0 - checksum: 4be6076192308671b046245899b703ba090dbe7ad03e0bea897bb2944ae5b88e5e85853c9d1f83f643474b54c578d8ac0800b80341a86e8538264a725fbbefec + checksum: 05538079447829b13512157491cc77f9cf1ea7e1680e15cff0682c3ed9ee162de0c4862ece20a6d6b2df28177a1520bcfe45993fbeccf2747a81795a7c3f6290 languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.16.7, @babel/helper-replace-supers@npm:^7.18.6, @babel/helper-replace-supers@npm:^7.20.7": - version: 7.20.7 - resolution: "@babel/helper-replace-supers@npm:7.20.7" +"@babel/helper-replace-supers@npm:^7.16.7, @babel/helper-replace-supers@npm:^7.22.5, @babel/helper-replace-supers@npm:^7.22.9": + version: 7.22.9 + resolution: "@babel/helper-replace-supers@npm:7.22.9" dependencies: - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-member-expression-to-functions": ^7.20.7 - "@babel/helper-optimise-call-expression": ^7.18.6 - "@babel/template": ^7.20.7 - "@babel/traverse": ^7.20.7 - "@babel/types": ^7.20.7 - checksum: b8e0087c9b0c1446e3c6f3f72b73b7e03559c6b570e2cfbe62c738676d9ebd8c369a708cf1a564ef88113b4330750a50232ee1131d303d478b7a5e65e46fbc7c + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-member-expression-to-functions": ^7.22.5 + "@babel/helper-optimise-call-expression": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: d41471f56ff2616459d35a5df1900d5f0756ae78b1027040365325ef332d66e08e3be02a9489756d870887585ff222403a228546e93dd7019e19e59c0c0fe586 languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.20.2": - version: 7.20.2 - resolution: "@babel/helper-simple-access@npm:7.20.2" +"@babel/helper-simple-access@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-simple-access@npm:7.22.5" dependencies: - "@babel/types": ^7.20.2 - checksum: ad1e96ee2e5f654ffee2369a586e5e8d2722bf2d8b028a121b4c33ebae47253f64d420157b9f0a8927aea3a9e0f18c0103e74fdd531815cf3650a0a4adca11a1 + "@babel/types": ^7.22.5 + checksum: fe9686714caf7d70aedb46c3cce090f8b915b206e09225f1e4dbc416786c2fdbbee40b38b23c268b7ccef749dd2db35f255338fb4f2444429874d900dede5ad2 languageName: node linkType: hard -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0": - version: 7.20.0 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.20.0" +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0, @babel/helper-skip-transparent-expression-wrappers@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.22.5" dependencies: - "@babel/types": ^7.20.0 - checksum: 34da8c832d1c8a546e45d5c1d59755459ffe43629436707079989599b91e8c19e50e73af7a4bd09c95402d389266731b0d9c5f69e372d8ebd3a709c05c80d7dd + "@babel/types": ^7.22.5 + checksum: 1012ef2295eb12dc073f2b9edf3425661e9b8432a3387e62a8bc27c42963f1f216ab3124228015c748770b2257b4f1fda882ca8fa34c0bf485e929ae5bc45244 languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-split-export-declaration@npm:7.18.6" +"@babel/helper-split-export-declaration@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/helper-split-export-declaration@npm:7.22.6" dependencies: - "@babel/types": ^7.18.6 - checksum: c6d3dede53878f6be1d869e03e9ffbbb36f4897c7cc1527dc96c56d127d834ffe4520a6f7e467f5b6f3c2843ea0e81a7819d66ae02f707f6ac057f3d57943a2b + "@babel/types": ^7.22.5 + checksum: e141cace583b19d9195f9c2b8e17a3ae913b7ee9b8120246d0f9ca349ca6f03cb2c001fd5ec57488c544347c0bb584afec66c936511e447fd20a360e591ac921 languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.19.4": - version: 7.19.4 - resolution: "@babel/helper-string-parser@npm:7.19.4" - checksum: b2f8a3920b30dfac81ec282ac4ad9598ea170648f8254b10f475abe6d944808fb006aab325d3eb5a8ad3bea8dfa888cfa6ef471050dae5748497c110ec060943 +"@babel/helper-string-parser@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-string-parser@npm:7.22.5" + checksum: 836851ca5ec813077bbb303acc992d75a360267aa3b5de7134d220411c852a6f17de7c0d0b8c8dcc0f567f67874c00f4528672b2a4f1bc978a3ada64c8c78467 languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.19.1": - version: 7.19.1 - resolution: "@babel/helper-validator-identifier@npm:7.19.1" - checksum: 0eca5e86a729162af569b46c6c41a63e18b43dbe09fda1d2a3c8924f7d617116af39cac5e4cd5d431bb760b4dca3c0970e0c444789b1db42bcf1fa41fbad0a3a +"@babel/helper-validator-identifier@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-validator-identifier@npm:7.22.5" + checksum: 7f0f30113474a28298c12161763b49de5018732290ca4de13cdaefd4fd0d635a6fe3f6686c37a02905fb1e64f21a5ee2b55140cf7b070e729f1bd66866506aea languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.12.11, @babel/helper-validator-option@npm:^7.16.7, @babel/helper-validator-option@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-validator-option@npm:7.18.6" - checksum: f9cc6eb7cc5d759c5abf006402180f8d5e4251e9198197428a97e05d65eb2f8ae5a0ce73b1dfd2d35af41d0eb780627a64edf98a4e71f064eeeacef8de58f2cf +"@babel/helper-validator-option@npm:^7.12.11, @babel/helper-validator-option@npm:^7.16.7, @babel/helper-validator-option@npm:^7.18.6, @babel/helper-validator-option@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-validator-option@npm:7.22.5" + checksum: bbeca8a85ee86990215c0424997438b388b8d642d69b9f86c375a174d3cdeb270efafd1ff128bc7a1d370923d13b6e45829ba8581c027620e83e3a80c5c414b3 languageName: node linkType: hard -"@babel/helper-wrap-function@npm:^7.18.9": - version: 7.20.5 - resolution: "@babel/helper-wrap-function@npm:7.20.5" +"@babel/helper-wrap-function@npm:^7.22.9": + version: 7.22.9 + resolution: "@babel/helper-wrap-function@npm:7.22.9" dependencies: - "@babel/helper-function-name": ^7.19.0 - "@babel/template": ^7.18.10 - "@babel/traverse": ^7.20.5 - "@babel/types": ^7.20.5 - checksum: 11a6fc28334368a193a9cb3ad16f29cd7603bab958433efc82ebe59fa6556c227faa24f07ce43983f7a85df826f71d441638442c4315e90a554fe0a70ca5005b + "@babel/helper-function-name": ^7.22.5 + "@babel/template": ^7.22.5 + "@babel/types": ^7.22.5 + checksum: 037317dc06dac6593e388738ae1d3e43193bc1d31698f067c0ef3d4dc6f074dbed860ed42aa137b48a67aa7cb87336826c4bdc13189260481bcf67eb7256c789 languageName: node linkType: hard -"@babel/helpers@npm:^7.12.5, @babel/helpers@npm:^7.20.7": - version: 7.20.13 - resolution: "@babel/helpers@npm:7.20.13" +"@babel/helpers@npm:^7.12.5, @babel/helpers@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/helpers@npm:7.22.6" dependencies: - "@babel/template": ^7.20.7 - "@babel/traverse": ^7.20.13 - "@babel/types": ^7.20.7 - checksum: d62076fa834f342798f8c3fd7aec0870cc1725d273d99e540cbaa8d6c3ed10258228dd14601c8e66bfeabbb9424c3b31090ecc467fe855f7bd72c4734df7fb09 + "@babel/template": ^7.22.5 + "@babel/traverse": ^7.22.6 + "@babel/types": ^7.22.5 + checksum: 5c1f33241fe7bf7709868c2105134a0a86dca26a0fbd508af10a89312b1f77ca38ebae43e50be3b208613c5eacca1559618af4ca236f0abc55d294800faeff30 languageName: node linkType: hard -"@babel/highlight@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/highlight@npm:7.18.6" +"@babel/highlight@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/highlight@npm:7.22.5" dependencies: - "@babel/helper-validator-identifier": ^7.18.6 + "@babel/helper-validator-identifier": ^7.22.5 chalk: ^2.0.0 js-tokens: ^4.0.0 - checksum: 92d8ee61549de5ff5120e945e774728e5ccd57fd3b2ed6eace020ec744823d4a98e242be1453d21764a30a14769ecd62170fba28539b211799bbaf232bbb2789 + checksum: f61ae6de6ee0ea8d9b5bcf2a532faec5ab0a1dc0f7c640e5047fc61630a0edb88b18d8c92eb06566d30da7a27db841aca11820ecd3ebe9ce514c9350fbed39c4 languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.11, @babel/parser@npm:^7.12.7, @babel/parser@npm:^7.13.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.8, @babel/parser@npm:^7.20.13, @babel/parser@npm:^7.20.7": - version: 7.20.15 - resolution: "@babel/parser@npm:7.20.15" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.11, @babel/parser@npm:^7.12.7, @babel/parser@npm:^7.13.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.8, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.22.7": + version: 7.22.7 + resolution: "@babel/parser@npm:7.22.7" bin: parser: ./bin/babel-parser.js - checksum: 1d0f47ca67ff2652f1c0ff1570bed8deccbc4b53509e7cd73476af9cc7ed23480c99f1179bd6d0be01612368b92b39e206d330ad6054009d699934848a89298b + checksum: 02209ddbd445831ee8bf966fdf7c29d189ed4b14343a68eb2479d940e7e3846340d7cc6bd654a5f3d87d19dc84f49f50a58cf9363bee249dc5409ff3ba3dab54 languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.18.6" +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0 - checksum: 845bd280c55a6a91d232cfa54eaf9708ec71e594676fe705794f494bb8b711d833b752b59d1a5c154695225880c23dbc9cab0e53af16fd57807976cd3ff41b8d + checksum: 1e353a060fb2cd8f1256d28cd768f16fb02513f905b9b6d656fb0242c96c341a196fa188b27c2701506a6e27515359fbcc1a5ca7fa8b9b530cf88fbd137baefc languageName: node linkType: hard -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.18.9": - version: 7.20.7 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.20.7" +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 - "@babel/plugin-proposal-optional-chaining": ^7.20.7 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/plugin-transform-optional-chaining": ^7.22.5 peerDependencies: "@babel/core": ^7.13.0 - checksum: d610f532210bee5342f5b44a12395ccc6d904e675a297189bc1e401cc185beec09873da523466d7fec34ae1574f7a384235cba1ccc9fe7b89ba094167897c845 - languageName: node - linkType: hard - -"@babel/plugin-proposal-async-generator-functions@npm:^7.20.1": - version: 7.20.7 - resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.20.7" - dependencies: - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/helper-remap-async-to-generator": ^7.18.9 - "@babel/plugin-syntax-async-generators": ^7.8.4 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 111109ee118c9e69982f08d5e119eab04190b36a0f40e22e873802d941956eee66d2aa5a15f5321e51e3f9aa70a91136451b987fe15185ef8cc547ac88937723 + checksum: 16e7a5f3bf2f2ac0ca032a70bf0ebd7e886d84dbb712b55c0643c04c495f0f221fbcbca14b5f8f8027fa6c87a3dafae0934022ad2b409384af6c5c356495b7bd languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.12.1, @babel/plugin-proposal-class-properties@npm:^7.14.5, @babel/plugin-proposal-class-properties@npm:^7.18.6": +"@babel/plugin-proposal-class-properties@npm:^7.12.1, @babel/plugin-proposal-class-properties@npm:^7.14.5": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" dependencies: @@ -614,19 +589,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-static-block@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-class-static-block@npm:7.18.6" - dependencies: - "@babel/helper-create-class-features-plugin": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/plugin-syntax-class-static-block": ^7.14.5 - peerDependencies: - "@babel/core": ^7.12.0 - checksum: b8d7ae99ed5ad784f39e7820e3ac03841f91d6ed60ab4a98c61d6112253da36013e12807bae4ffed0ef3cb318e47debac112ed614e03b403fb8b075b09a828ee - languageName: node - linkType: hard - "@babel/plugin-proposal-decorators@npm:^7.12.12, @babel/plugin-proposal-decorators@npm:^7.14.5": version: 7.17.0 resolution: "@babel/plugin-proposal-decorators@npm:7.17.0" @@ -642,18 +604,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-dynamic-import@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-dynamic-import@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/plugin-syntax-dynamic-import": ^7.8.3 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 96b1c8a8ad8171d39e9ab106be33bde37ae09b22fb2c449afee9a5edf3c537933d79d963dcdc2694d10677cb96da739cdf1b53454e6a5deab9801f28a818bb2f - languageName: node - linkType: hard - "@babel/plugin-proposal-export-default-from@npm:^7.12.1": version: 7.18.6 resolution: "@babel/plugin-proposal-export-default-from@npm:7.18.6" @@ -666,7 +616,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-export-namespace-from@npm:>=7, @babel/plugin-proposal-export-namespace-from@npm:^7.18.9": +"@babel/plugin-proposal-export-namespace-from@npm:^7.18.9": version: 7.18.9 resolution: "@babel/plugin-proposal-export-namespace-from@npm:7.18.9" dependencies: @@ -678,31 +628,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-json-strings@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-json-strings@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/plugin-syntax-json-strings": ^7.8.3 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 25ba0e6b9d6115174f51f7c6787e96214c90dd4026e266976b248a2ed417fe50fddae72843ffb3cbe324014a18632ce5648dfac77f089da858022b49fd608cb3 - languageName: node - linkType: hard - -"@babel/plugin-proposal-logical-assignment-operators@npm:^7.18.9": - version: 7.20.7 - resolution: "@babel/plugin-proposal-logical-assignment-operators@npm:7.20.7" - dependencies: - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: cdd7b8136cc4db3f47714d5266f9e7b592a2ac5a94a5878787ce08890e97c8ab1ca8e94b27bfeba7b0f2b1549a026d9fc414ca2196de603df36fb32633bbdc19 - languageName: node - linkType: hard - -"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.12.1, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.6": +"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.12.1": version: 7.18.6 resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" dependencies: @@ -714,18 +640,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-numeric-separator@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-numeric-separator@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/plugin-syntax-numeric-separator": ^7.10.4 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: f370ea584c55bf4040e1f78c80b4eeb1ce2e6aaa74f87d1a48266493c33931d0b6222d8cee3a082383d6bb648ab8d6b7147a06f974d3296ef3bc39c7851683ec - languageName: node - linkType: hard - "@babel/plugin-proposal-object-rest-spread@npm:7.12.1": version: 7.12.1 resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.12.1" @@ -739,7 +653,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-object-rest-spread@npm:^7.12.1, @babel/plugin-proposal-object-rest-spread@npm:^7.20.2": +"@babel/plugin-proposal-object-rest-spread@npm:^7.12.1": version: 7.20.7 resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.20.7" dependencies: @@ -754,19 +668,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-optional-catch-binding@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-optional-catch-binding@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 7b5b39fb5d8d6d14faad6cb68ece5eeb2fd550fb66b5af7d7582402f974f5bc3684641f7c192a5a57e0f59acfae4aada6786be1eba030881ddc590666eff4d1e - languageName: node - linkType: hard - -"@babel/plugin-proposal-optional-chaining@npm:^7.12.7, @babel/plugin-proposal-optional-chaining@npm:^7.18.9, @babel/plugin-proposal-optional-chaining@npm:^7.20.7": +"@babel/plugin-proposal-optional-chaining@npm:^7.12.7": version: 7.20.7 resolution: "@babel/plugin-proposal-optional-chaining@npm:7.20.7" dependencies: @@ -779,7 +681,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-private-methods@npm:^7.12.1, @babel/plugin-proposal-private-methods@npm:^7.18.6": +"@babel/plugin-proposal-private-methods@npm:^7.12.1": version: 7.18.6 resolution: "@babel/plugin-proposal-private-methods@npm:7.18.6" dependencies: @@ -791,7 +693,16 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-private-property-in-object@npm:^7.12.1, @babel/plugin-proposal-private-property-in-object@npm:^7.18.6": +"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": + version: 7.21.0-placeholder-for-preset-env.2 + resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d97745d098b835d55033ff3a7fb2b895b9c5295b08a5759e4f20df325aa385a3e0bc9bd5ad8f2ec554a44d4e6525acfc257b8c5848a1345cb40f26a30e277e91 + languageName: node + linkType: hard + +"@babel/plugin-proposal-private-property-in-object@npm:^7.12.1": version: 7.20.5 resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.20.5" dependencies: @@ -805,7 +716,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-unicode-property-regex@npm:^7.18.6, @babel/plugin-proposal-unicode-property-regex@npm:^7.4.4": +"@babel/plugin-proposal-unicode-property-regex@npm:^7.4.4": version: 7.18.6 resolution: "@babel/plugin-proposal-unicode-property-regex@npm:7.18.6" dependencies: @@ -872,7 +783,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-dynamic-import@npm:>=7, @babel/plugin-syntax-dynamic-import@npm:^7.8.3": +"@babel/plugin-syntax-dynamic-import@npm:^7.8.3": version: 7.8.3 resolution: "@babel/plugin-syntax-dynamic-import@npm:7.8.3" dependencies: @@ -916,18 +827,29 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-assertions@npm:^7.20.0": - version: 7.20.0 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.20.0" +"@babel/plugin-syntax-import-assertions@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-syntax-import-assertions@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.19.0 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 6a86220e0aae40164cd3ffaf80e7c076a1be02a8f3480455dddbae05fda8140f429290027604df7a11b3f3f124866e8a6d69dbfa1dda61ee7377b920ad144d5b + checksum: 2b8b5572db04a7bef1e6cd20debf447e4eef7cb012616f5eceb8fa3e23ce469b8f76ee74fd6d1e158ba17a8f58b0aec579d092fb67c5a30e83ccfbc5754916c1 languageName: node linkType: hard -"@babel/plugin-syntax-import-meta@npm:^7.8.3": +"@babel/plugin-syntax-import-attributes@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-syntax-import-attributes@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 197b3c5ea2a9649347f033342cb222ab47f4645633695205c0250c6bf2af29e643753b8bb24a2db39948bef08e7c540babfd365591eb57fc110cb30b425ffc47 + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-meta@npm:^7.10.4, @babel/plugin-syntax-import-meta@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" dependencies: @@ -1070,126 +992,201 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-arrow-functions@npm:^7.12.1, @babel/plugin-transform-arrow-functions@npm:^7.18.6": +"@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": version: 7.18.6 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.18.6" + resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6" dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.18.6 "@babel/helper-plugin-utils": ^7.18.6 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: a651d700fe63ff0ddfd7186f4ebc24447ca734f114433139e3c027bc94a900d013cf1ef2e2db8430425ba542e39ae160c3b05f06b59fd4656273a3df97679e9c + languageName: node + linkType: hard + +"@babel/plugin-transform-arrow-functions@npm:^7.12.1, @babel/plugin-transform-arrow-functions@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-arrow-functions@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 900f5c695755062b91eec74da6f9092f40b8fada099058b92576f1e23c55e9813ec437051893a9b3c05cefe39e8ac06303d4a91b384e1c03dd8dc1581ea11602 + checksum: 35abb6c57062802c7ce8bd96b2ef2883e3124370c688bbd67609f7d2453802fb73944df8808f893b6c67de978eb2bcf87bbfe325e46d6f39b5fcb09ece11d01a languageName: node linkType: hard -"@babel/plugin-transform-async-to-generator@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.18.6" +"@babel/plugin-transform-async-generator-functions@npm:^7.22.7": + version: 7.22.7 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.22.7" dependencies: - "@babel/helper-module-imports": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/helper-remap-async-to-generator": ^7.18.6 + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-remap-async-to-generator": ^7.22.5 + "@babel/plugin-syntax-async-generators": ^7.8.4 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: c2cca47468cf1aeefdc7ec35d670e195c86cee4de28a1970648c46a88ce6bd1806ef0bab27251b9e7fb791bb28a64dcd543770efd899f28ee5f7854e64e873d3 + checksum: 57cd2cce3fb696dadf00e88f168683df69e900b92dadeae07429243c43bc21d5ccdc0c2db61cf5c37bd0fbd893fc455466bef6babe4aa5b79d9cb8ba89f40ae7 languageName: node linkType: hard -"@babel/plugin-transform-block-scoped-functions@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.18.6" +"@babel/plugin-transform-async-to-generator@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-async-to-generator@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-module-imports": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-remap-async-to-generator": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 0a0df61f94601e3666bf39f2cc26f5f7b22a94450fb93081edbed967bd752ce3f81d1227fefd3799f5ee2722171b5e28db61379234d1bb85b6ec689589f99d7e + checksum: b95f23f99dcb379a9f0a1c2a3bbea3f8dc0e1b16dc1ac8b484fe378370169290a7a63d520959a9ba1232837cf74a80e23f6facbe14fd42a3cda6d3c2d7168e62 languageName: node linkType: hard -"@babel/plugin-transform-block-scoping@npm:^7.12.12, @babel/plugin-transform-block-scoping@npm:^7.20.2": - version: 7.20.15 - resolution: "@babel/plugin-transform-block-scoping@npm:7.20.15" +"@babel/plugin-transform-block-scoped-functions@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 1dddf7be578306837074cb5059f8408af0b1c0bfcf922ed920d4aa65d08fb7c6e6129ca254e9879c4c6d2a6be4937111551f51922e8b0e071ed16eb6564a4dbb + checksum: 416b1341858e8ca4e524dee66044735956ced5f478b2c3b9bc11ec2285b0c25d7dbb96d79887169eb938084c95d0a89338c8b2fe70d473bd9dc92e5d9db1732c languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.12.1, @babel/plugin-transform-classes@npm:^7.20.2": - version: 7.20.7 - resolution: "@babel/plugin-transform-classes@npm:7.20.7" +"@babel/plugin-transform-block-scoping@npm:^7.12.12, @babel/plugin-transform-block-scoping@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-block-scoping@npm:7.22.5" dependencies: - "@babel/helper-annotate-as-pure": ^7.18.6 - "@babel/helper-compilation-targets": ^7.20.7 - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-function-name": ^7.19.0 - "@babel/helper-optimise-call-expression": ^7.18.6 - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/helper-replace-supers": ^7.20.7 - "@babel/helper-split-export-declaration": ^7.18.6 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 26987002cfe6e24544e60fa35f07052b6557f590c1a1cc5cf35d6dc341d7fea163c1222a2d70d5d2692f0b9860d942fd3ba979848b2995d4debffa387b9b19ae + languageName: node + linkType: hard + +"@babel/plugin-transform-class-properties@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-class-properties@npm:7.22.5" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b830152dfc2ff2f647f0abe76e6251babdfbef54d18c4b2c73a6bf76b1a00050a5d998dac80dc901a48514e95604324943a9dd39317073fe0928b559e0e0c579 + languageName: node + linkType: hard + +"@babel/plugin-transform-class-static-block@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-class-static-block@npm:7.22.5" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-class-static-block": ^7.14.5 + peerDependencies: + "@babel/core": ^7.12.0 + checksum: bc48b92dbaf625a14f2bf62382384eef01e0515802426841636ae9146e27395d068c7a8a45e9e15699491b0a01d990f38f179cbc9dc89274a393f85648772f12 + languageName: node + linkType: hard + +"@babel/plugin-transform-classes@npm:^7.12.1, @babel/plugin-transform-classes@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/plugin-transform-classes@npm:7.22.6" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-compilation-targets": ^7.22.6 + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-function-name": ^7.22.5 + "@babel/helper-optimise-call-expression": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 globals: ^11.1.0 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 4cf55ad88e52c7c66a991add4c8e1c3324384bd52df7085962d396879561456a44352e5ab1725cc80f4e83737a2931e847c4a96c7aa4a549357f23631ff31799 + checksum: 8380e855c01033dbc7460d9acfbc1fc37c880350fa798c2de8c594ef818ade0e4c96173ec72f05f2a4549d8d37135e18cb62548352d51557b45a0fb4388d2f3f languageName: node linkType: hard -"@babel/plugin-transform-computed-properties@npm:^7.18.9": - version: 7.20.7 - resolution: "@babel/plugin-transform-computed-properties@npm:7.20.7" +"@babel/plugin-transform-computed-properties@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-computed-properties@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/template": ^7.20.7 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/template": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: be70e54bda8b469146459f429e5f2bd415023b87b2d5af8b10e48f465ffb02847a3ed162ca60378c004b82db848e4d62e90010d41ded7e7176b6d8d1c2911139 + checksum: c2a77a0f94ec71efbc569109ec14ea2aa925b333289272ced8b33c6108bdbb02caf01830ffc7e49486b62dec51911924d13f3a76f1149f40daace1898009e131 languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.12.1, @babel/plugin-transform-destructuring@npm:^7.20.2": - version: 7.20.7 - resolution: "@babel/plugin-transform-destructuring@npm:7.20.7" +"@babel/plugin-transform-destructuring@npm:^7.12.1, @babel/plugin-transform-destructuring@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-destructuring@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: bd8affdb142c77662037215e37128b2110a786c92a67e1f00b38223c438c1610bd84cbc0386e9cd3479245ea811c5ca6c9838f49be4729b592159a30ce79add2 + checksum: 76f6ea2aee1fcfa1c3791eb7a5b89703c6472650b993e8666fff0f1d6e9d737a84134edf89f63c92297f3e75064c1263219463b02dd9bc7434b6e5b9935e3f20 languageName: node linkType: hard -"@babel/plugin-transform-dotall-regex@npm:^7.18.6, @babel/plugin-transform-dotall-regex@npm:^7.4.4": - version: 7.18.6 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.18.6" +"@babel/plugin-transform-dotall-regex@npm:^7.22.5, @babel/plugin-transform-dotall-regex@npm:^7.4.4": + version: 7.22.5 + resolution: "@babel/plugin-transform-dotall-regex@npm:7.22.5" dependencies: - "@babel/helper-create-regexp-features-plugin": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: cbe5d7063eb8f8cca24cd4827bc97f5641166509e58781a5f8aa47fb3d2d786ce4506a30fca2e01f61f18792783a5cb5d96bf5434c3dd1ad0de8c9cc625a53da + checksum: 409b658d11e3082c8f69e9cdef2d96e4d6d11256f005772425fb230cc48fd05945edbfbcb709dab293a1a2f01f9c8a5bb7b4131e632b23264039d9f95864b453 languageName: node linkType: hard -"@babel/plugin-transform-duplicate-keys@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.18.9" +"@babel/plugin-transform-duplicate-keys@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-duplicate-keys@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.9 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 220bf4a9fec5c4d4a7b1de38810350260e8ea08481bf78332a464a21256a95f0df8cd56025f346238f09b04f8e86d4158fafc9f4af57abaef31637e3b58bd4fe + checksum: bb1280fbabaab6fab2ede585df34900712698210a3bd413f4df5bae6d8c24be36b496c92722ae676a7a67d060a4624f4d6c23b923485f906bfba8773c69f55b4 languageName: node linkType: hard -"@babel/plugin-transform-exponentiation-operator@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.18.6" +"@babel/plugin-transform-dynamic-import@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-dynamic-import@npm:7.22.5" dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 186a6d59f36eb3c5824739fc9c22ed0f4ca68e001662aa3a302634346a8b785cb9579b23b0c158f4570604d697d19598ca09b58c60a7fa2894da1163c4eb1907 + languageName: node + linkType: hard + +"@babel/plugin-transform-exponentiation-operator@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.22.5" + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f2d660c1b1d51ad5fec1cd5ad426a52187204068c4158f8c4aa977b31535c61b66898d532603eef21c15756827be8277f724c869b888d560f26d7fe848bb5eae + languageName: node + linkType: hard + +"@babel/plugin-transform-export-namespace-from@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-export-namespace-from@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 7f70222f6829c82a36005508d34ddbe6fd0974ae190683a8670dd6ff08669aaf51fef2209d7403f9bd543cb2d12b18458016c99a6ed0332ccedb3ea127b01229 + checksum: 3d197b788758044983c96b9c49bed4b456055f35a388521a405968db0f6e2ffb6fd59110e3931f4dcc5e126ae9e5e00e154a0afb47a7ea359d8d0dea79f480d7 languageName: node linkType: hard @@ -1205,157 +1202,271 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.12.1, @babel/plugin-transform-for-of@npm:^7.18.8": - version: 7.18.8 - resolution: "@babel/plugin-transform-for-of@npm:7.18.8" +"@babel/plugin-transform-for-of@npm:^7.12.1, @babel/plugin-transform-for-of@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-for-of@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: ca64c623cf0c7a80ab6f07ebd3e6e4ade95e2ae806696f70b43eafe6394fa8ce21f2b1ffdd15df2067f7363d2ecfe26472a97c6c774403d2163fa05f50c98f17 + checksum: d7b8d4db010bce7273674caa95c4e6abd909362866ce297e86a2ecaa9ae636e05d525415811db9b3c942155df7f3651d19b91dd6c41f142f7308a97c7cb06023 languageName: node linkType: hard -"@babel/plugin-transform-function-name@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-transform-function-name@npm:7.18.9" +"@babel/plugin-transform-function-name@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-function-name@npm:7.22.5" dependencies: - "@babel/helper-compilation-targets": ^7.18.9 - "@babel/helper-function-name": ^7.18.9 - "@babel/helper-plugin-utils": ^7.18.9 + "@babel/helper-compilation-targets": ^7.22.5 + "@babel/helper-function-name": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 62dd9c6cdc9714704efe15545e782ee52d74dc73916bf954b4d3bee088fb0ec9e3c8f52e751252433656c09f744b27b757fc06ed99bcde28e8a21600a1d8e597 + checksum: cff3b876357999cb8ae30e439c3ec6b0491a53b0aa6f722920a4675a6dd5b53af97a833051df4b34791fe5b3dd326ccf769d5c8e45b322aa50ee11a660b17845 languageName: node linkType: hard -"@babel/plugin-transform-literals@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-transform-literals@npm:7.18.9" +"@babel/plugin-transform-json-strings@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-json-strings@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.9 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-json-strings": ^7.8.3 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 3458dd2f1a47ac51d9d607aa18f3d321cbfa8560a985199185bed5a906bb0c61ba85575d386460bac9aed43fdd98940041fae5a67dff286f6f967707cff489f8 + checksum: 4e00b902487a670b6c8948f33f9108133fd745cf9d1478aca515fb460b9b2f12e137988ebc1663630fb82070a870aed8b0c1aa4d007a841c18004619798f255c languageName: node linkType: hard -"@babel/plugin-transform-member-expression-literals@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.18.6" +"@babel/plugin-transform-literals@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-literals@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 35a3d04f6693bc6b298c05453d85ee6e41cc806538acb6928427e0e97ae06059f97d2f07d21495fcf5f70d3c13a242e2ecbd09d5c1fcb1b1a73ff528dcb0b695 + checksum: ec37cc2ffb32667af935ab32fe28f00920ec8a1eb999aa6dc6602f2bebd8ba205a558aeedcdccdebf334381d5c57106c61f52332045730393e73410892a9735b languageName: node linkType: hard -"@babel/plugin-transform-modules-amd@npm:^7.19.6": - version: 7.20.11 - resolution: "@babel/plugin-transform-modules-amd@npm:7.20.11" +"@babel/plugin-transform-logical-assignment-operators@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.22.5" dependencies: - "@babel/helper-module-transforms": ^7.20.11 - "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 23665c1c20c8f11c89382b588fb9651c0756d130737a7625baeaadbd3b973bc5bfba1303bedffa8fb99db1e6d848afb01016e1df2b69b18303e946890c790001 + checksum: 18748e953c08f64885f18c224eac58df10a13eac4d845d16b5d9b6276907da7ca2530dfebe6ed41cdc5f8a75d9db3e36d8eb54ddce7cd0364af1cab09b435302 languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.18.2, @babel/plugin-transform-modules-commonjs@npm:^7.19.6": - version: 7.20.11 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.20.11" +"@babel/plugin-transform-member-expression-literals@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-member-expression-literals@npm:7.22.5" dependencies: - "@babel/helper-module-transforms": ^7.20.11 - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/helper-simple-access": ^7.20.2 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: ddd0623e2ad4b5c0faaa0ae30d3407a3fa484d911c968ed33cfb1b339ac3691321c959db60b66dc136dbd67770fff586f7e48a7ce0d7d357f92d6ef6fb7ed1a7 + checksum: ec4b0e07915ddd4fda0142fd104ee61015c208608a84cfa13643a95d18760b1dc1ceb6c6e0548898b8c49e5959a994e46367260176dbabc4467f729b21868504 languageName: node linkType: hard -"@babel/plugin-transform-modules-systemjs@npm:^7.19.6": - version: 7.20.11 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.20.11" +"@babel/plugin-transform-modules-amd@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-modules-amd@npm:7.22.5" dependencies: - "@babel/helper-hoist-variables": ^7.18.6 - "@babel/helper-module-transforms": ^7.20.11 - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/helper-validator-identifier": ^7.19.1 + "@babel/helper-module-transforms": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 4546c47587f88156d66c7eb7808e903cf4bb3f6ba6ac9bc8e3af2e29e92eb9f0b3f44d52043bfd24eb25fa7827fd7b6c8bfeac0cac7584e019b87e1ecbd0e673 + checksum: 7da4c4ebbbcf7d182abb59b2046b22d86eee340caf8a22a39ef6a727da2d8acfec1f714fcdcd5054110b280e4934f735e80a6848d192b6834c5d4459a014f04d languageName: node linkType: hard -"@babel/plugin-transform-modules-umd@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-modules-umd@npm:7.18.6" +"@babel/plugin-transform-modules-commonjs@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.22.5" dependencies: - "@babel/helper-module-transforms": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-module-transforms": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-simple-access": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: c3b6796c6f4579f1ba5ab0cdcc73910c1e9c8e1e773c507c8bb4da33072b3ae5df73c6d68f9126dab6e99c24ea8571e1563f8710d7c421fac1cde1e434c20153 + checksum: 2067aca8f6454d54ffcce69b02c457cfa61428e11372f6a1d99ff4fcfbb55c396ed2ca6ca886bf06c852e38c1a205b8095921b2364fd0243f3e66bc1dda61caa languageName: node linkType: hard -"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.19.1": - version: 7.20.5 - resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.20.5" +"@babel/plugin-transform-modules-systemjs@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-modules-systemjs@npm:7.22.5" dependencies: - "@babel/helper-create-regexp-features-plugin": ^7.20.5 - "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-module-transforms": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-identifier": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 04f4178589543396b3c24330a67a59c5e69af5e96119c9adda730c0f20122deaff54671ebbc72ad2df6495a5db8a758bd96942de95fba7ad427de9c80b1b38c8 + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-umd@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-modules-umd@npm:7.22.5" + dependencies: + "@babel/helper-module-transforms": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 46622834c54c551b231963b867adbc80854881b3e516ff29984a8da989bd81665bd70e8cba6710345248e97166689310f544aee1a5773e262845a8f1b3e5b8b4 + languageName: node + linkType: hard + +"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.22.5" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0 - checksum: 528c95fb1087e212f17e1c6456df041b28a83c772b9c93d2e407c9d03b72182b0d9d126770c1d6e0b23aab052599ceaf25ed6a2c0627f4249be34a83f6fae853 + checksum: 3ee564ddee620c035b928fdc942c5d17e9c4b98329b76f9cefac65c111135d925eb94ed324064cd7556d4f5123beec79abea1d4b97d1c8a2a5c748887a2eb623 languageName: node linkType: hard -"@babel/plugin-transform-new-target@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-new-target@npm:7.18.6" +"@babel/plugin-transform-new-target@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-new-target@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: bd780e14f46af55d0ae8503b3cb81ca86dcc73ed782f177e74f498fff934754f9e9911df1f8f3bd123777eed7c1c1af4d66abab87c8daae5403e7719a6b845d1 + checksum: 6b72112773487a881a1d6ffa680afde08bad699252020e86122180ee7a88854d5da3f15d9bca3331cf2e025df045604494a8208a2e63b486266b07c14e2ffbf3 languageName: node linkType: hard -"@babel/plugin-transform-object-super@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-object-super@npm:7.18.6" +"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/helper-replace-supers": ^7.18.6 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 0fcb04e15deea96ae047c21cb403607d49f06b23b4589055993365ebd7a7d7541334f06bf9642e90075e66efce6ebaf1eb0ef066fbbab802d21d714f1aac3aef + checksum: e6a059169d257fc61322d0708edae423072449b7c33de396261e68dee582aec5396789a1c22bce84e5bd88a169623c2e750b513fc222930979e6accd52a44bf2 languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.12.1, @babel/plugin-transform-parameters@npm:^7.20.1, @babel/plugin-transform-parameters@npm:^7.20.7": - version: 7.20.7 - resolution: "@babel/plugin-transform-parameters@npm:7.20.7" +"@babel/plugin-transform-numeric-separator@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-numeric-separator@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 6ffe0dd9afb2d2b9bc247381aa2e95dd9997ff5568a0a11900528919a4e073ac68f46409431455badb8809644d47cff180045bc2b9700e3f36e3b23554978947 + checksum: 9e7837d4eae04f211ebaa034fe5003d2927b6bf6d5b9dc09f2b1183c01482cdde5a75b8bd5c7ff195c2abc7b923339eb0b2a9d27cb78359d38248a3b2c2367c4 languageName: node linkType: hard -"@babel/plugin-transform-property-literals@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-property-literals@npm:7.18.6" +"@babel/plugin-transform-object-rest-spread@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-object-rest-spread@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/compat-data": ^7.22.5 + "@babel/helper-compilation-targets": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-transform-parameters": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3b5e091f0dc67108f2e41ed5a97e15bbe4381a19d9a7eea80b71c7de1d8169fd28784e1e41a3d2ad12709ab212e58fc481282a5bb65d591fae7b443048de3330 + languageName: node + linkType: hard + +"@babel/plugin-transform-object-super@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-object-super@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b71887877d74cb64dbccb5c0324fa67e31171e6a5311991f626650e44a4083e5436a1eaa89da78c0474fb095d4ec322d63ee778b202d33aa2e4194e1ed8e62d7 + languageName: node + linkType: hard + +"@babel/plugin-transform-optional-catch-binding@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b0e8b4233ff06b5c9d285257f49c5bd441f883189b24282e6200f9ebdf5db29aeeebbffae57fbbcd5df9f4387b3e66e5d322aaae5652a78e89685ddbae46bbd1 + languageName: node + linkType: hard + +"@babel/plugin-transform-optional-chaining@npm:^7.22.5, @babel/plugin-transform-optional-chaining@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/plugin-transform-optional-chaining@npm:7.22.6" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9713f7920ed04090c149fc5ec024dd1638e8b97aa4ae3753b93072d84103b8de380afb96d6cf03e53b285420db4f705f3ac13149c6fd54f322b61dc19e33c54f + languageName: node + linkType: hard + +"@babel/plugin-transform-parameters@npm:^7.12.1, @babel/plugin-transform-parameters@npm:^7.20.7, @babel/plugin-transform-parameters@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-parameters@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b44f89cf97daf23903776ba27c2ab13b439d80d8c8a95be5c476ab65023b1e0c0e94c28d3745f3b60a58edc4e590fa0cd4287a0293e51401ca7d29a2ddb13b8e + languageName: node + linkType: hard + +"@babel/plugin-transform-private-methods@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-private-methods@npm:7.22.5" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 1c16e64de554703f4b547541de2edda6c01346dd3031d4d29e881aa7733785cd26d53611a4ccf5353f4d3e69097bb0111c0a93ace9e683edd94fea28c4484144 + checksum: 321479b4fcb6d3b3ef622ab22fd24001e43d46e680e8e41324c033d5810c84646e470f81b44cbcbef5c22e99030784f7cac92f1829974da7a47a60a7139082c3 + languageName: node + linkType: hard + +"@babel/plugin-transform-private-property-in-object@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-private-property-in-object@npm:7.22.5" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-create-class-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-private-property-in-object": ^7.14.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 9ac019fb2772f3af6278a7f4b8b14b0663accb3fd123d87142ceb2fbc57fd1afa07c945d1329029b026b9ee122096ef71a3f34f257a9e04cf4245b87298c38b4 + languageName: node + linkType: hard + +"@babel/plugin-transform-property-literals@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-property-literals@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 796176a3176106f77fcb8cd04eb34a8475ce82d6d03a88db089531b8f0453a2fb8b0c6ec9a52c27948bc0ea478becec449893741fc546dfc3930ab927e3f9f2e languageName: node linkType: hard @@ -1419,98 +1530,98 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-regenerator@npm:7.18.6" +"@babel/plugin-transform-regenerator@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-regenerator@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - regenerator-transform: ^0.15.0 + "@babel/helper-plugin-utils": ^7.22.5 + regenerator-transform: ^0.15.1 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 60bd482cb0343c714f85c3e19a13b3b5fa05ee336c079974091c0b35e263307f4e661f4555dff90707a87d5efe19b1d51835db44455405444ac1813e268ad750 + checksum: f7c5ca5151321963df777cc02725d10d1ccc3b3b8323da0423aecd9ac6144cbdd2274af5281a5580db2fc2f8b234e318517b5d76b85669118906533a559f2b6a languageName: node linkType: hard -"@babel/plugin-transform-reserved-words@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-reserved-words@npm:7.18.6" +"@babel/plugin-transform-reserved-words@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-reserved-words@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 0738cdc30abdae07c8ec4b233b30c31f68b3ff0eaa40eddb45ae607c066127f5fa99ddad3c0177d8e2832e3a7d3ad115775c62b431ebd6189c40a951b867a80c + checksum: 3ffd7dbc425fe8132bfec118b9817572799cab1473113a635d25ab606c1f5a2341a636c04cf6b22df3813320365ed5a965b5eeb3192320a10e4cc2c137bd8bfc languageName: node linkType: hard -"@babel/plugin-transform-runtime@npm:>=7, @babel/plugin-transform-runtime@npm:^7.15.0, @babel/plugin-transform-runtime@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-runtime@npm:7.18.6" +"@babel/plugin-transform-runtime@npm:^7.15.0, @babel/plugin-transform-runtime@npm:^7.18.6, @babel/plugin-transform-runtime@npm:^7.22.9": + version: 7.22.9 + resolution: "@babel/plugin-transform-runtime@npm:7.22.9" dependencies: - "@babel/helper-module-imports": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 - babel-plugin-polyfill-corejs2: ^0.3.1 - babel-plugin-polyfill-corejs3: ^0.5.2 - babel-plugin-polyfill-regenerator: ^0.3.1 - semver: ^6.3.0 + "@babel/helper-module-imports": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + babel-plugin-polyfill-corejs2: ^0.4.4 + babel-plugin-polyfill-corejs3: ^0.8.2 + babel-plugin-polyfill-regenerator: ^0.5.1 + semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: ed1ee31d02c86b4cad3d38678fd9593a50478588c1ad15b0128135dfbfb463555d49335a55d1486c3a15c5791e6ef9e21a3cc124c555b250fadfd83861ac61d2 + checksum: 2fe5e41f83015ca174feda841d77aa9012fc855c907f9b360a11927f41b100537c8c83487771769147668e797eec26d5294e972b997f4759133cc43a22a43eec languageName: node linkType: hard -"@babel/plugin-transform-shorthand-properties@npm:^7.12.1, @babel/plugin-transform-shorthand-properties@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.18.6" +"@babel/plugin-transform-shorthand-properties@npm:^7.12.1, @babel/plugin-transform-shorthand-properties@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-shorthand-properties@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: b8e4e8acc2700d1e0d7d5dbfd4fdfb935651913de6be36e6afb7e739d8f9ca539a5150075a0f9b79c88be25ddf45abb912fe7abf525f0b80f5b9d9860de685d7 + checksum: a5ac902c56ea8effa99f681340ee61bac21094588f7aef0bc01dff98246651702e677552fa6d10e548c4ac22a3ffad047dd2f8c8f0540b68316c2c203e56818b languageName: node linkType: hard -"@babel/plugin-transform-spread@npm:^7.12.1, @babel/plugin-transform-spread@npm:^7.19.0": - version: 7.20.7 - resolution: "@babel/plugin-transform-spread@npm:7.20.7" +"@babel/plugin-transform-spread@npm:^7.12.1, @babel/plugin-transform-spread@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-spread@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 8ea698a12da15718aac7489d4cde10beb8a3eea1f66167d11ab1e625033641e8b328157fd1a0b55dd6531933a160c01fc2e2e61132a385cece05f26429fd0cc2 + checksum: 5587f0deb60b3dfc9b274e269031cc45ec75facccf1933ea2ea71ced9fd3ce98ed91bb36d6cd26817c14474b90ed998c5078415f0eab531caf301496ce24c95c languageName: node linkType: hard -"@babel/plugin-transform-sticky-regex@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.18.6" +"@babel/plugin-transform-sticky-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-sticky-regex@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 68ea18884ae9723443ffa975eb736c8c0d751265859cd3955691253f7fee37d7a0f7efea96c8a062876af49a257a18ea0ed5fea0d95a7b3611ce40f7ee23aee3 + checksum: 63b2c575e3e7f96c32d52ed45ee098fb7d354b35c2223b8c8e76840b32cc529ee0c0ceb5742fd082e56e91e3d82842a367ce177e82b05039af3d602c9627a729 languageName: node linkType: hard -"@babel/plugin-transform-template-literals@npm:>=7, @babel/plugin-transform-template-literals@npm:^7.12.1, @babel/plugin-transform-template-literals@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-transform-template-literals@npm:7.18.9" +"@babel/plugin-transform-template-literals@npm:^7.12.1, @babel/plugin-transform-template-literals@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-template-literals@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.9 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 3d2fcd79b7c345917f69b92a85bdc3ddd68ce2c87dc70c7d61a8373546ccd1f5cb8adc8540b49dfba08e1b82bb7b3bbe23a19efdb2b9c994db2db42906ca9fb2 + checksum: 27e9bb030654cb425381c69754be4abe6a7c75b45cd7f962cd8d604b841b2f0fb7b024f2efc1c25cc53f5b16d79d5e8cfc47cacbdaa983895b3aeefa3e7e24ff languageName: node linkType: hard -"@babel/plugin-transform-typeof-symbol@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.18.9" +"@babel/plugin-transform-typeof-symbol@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-typeof-symbol@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.9 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: e754e0d8b8a028c52e10c148088606e3f7a9942c57bd648fc0438e5b4868db73c386a5ed47ab6d6f0594aae29ee5ffc2ffc0f7ebee7fae560a066d6dea811cd4 + checksum: 82a53a63ffc3010b689ca9a54e5f53b2718b9f4b4a9818f36f9b7dba234f38a01876680553d2716a645a61920b5e6e4aaf8d4a0064add379b27ca0b403049512 languageName: node linkType: hard @@ -1527,60 +1638,72 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-escapes@npm:^7.18.10": - version: 7.18.10 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.18.10" +"@babel/plugin-transform-unicode-escapes@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-unicode-escapes@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.9 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: f5baca55cb3c11bc08ec589f5f522d85c1ab509b4d11492437e45027d64ae0b22f0907bd1381e8d7f2a436384bb1f9ad89d19277314242c5c2671a0f91d0f9cd + checksum: da5e85ab3bb33a75cbf6181bfd236b208dc934702fd304db127232f17b4e0f42c6d3f238de8589470b4190906967eea8ca27adf3ae9d8ee4de2a2eae906ed186 languageName: node linkType: hard -"@babel/plugin-transform-unicode-regex@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.18.6" +"@babel/plugin-transform-unicode-property-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.22.5" dependencies: - "@babel/helper-create-regexp-features-plugin": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: d9e18d57536a2d317fb0b7c04f8f55347f3cfacb75e636b4c6fa2080ab13a3542771b5120e726b598b815891fc606d1472ac02b749c69fd527b03847f22dc25e + checksum: 2495e5f663cb388e3d888b4ba3df419ac436a5012144ac170b622ddfc221f9ea9bdba839fa2bc0185cb776b578030666406452ec7791cbf0e7a3d4c88ae9574c languageName: node linkType: hard -"@babel/preset-env@npm:>=7, @babel/preset-env@npm:^7.0.0, @babel/preset-env@npm:^7.12.11, @babel/preset-env@npm:^7.15.0, @babel/preset-env@npm:^7.15.6, @babel/preset-env@npm:^7.18.6": - version: 7.20.2 - resolution: "@babel/preset-env@npm:7.20.2" +"@babel/plugin-transform-unicode-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-unicode-regex@npm:7.22.5" dependencies: - "@babel/compat-data": ^7.20.1 - "@babel/helper-compilation-targets": ^7.20.0 - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/helper-validator-option": ^7.18.6 - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.18.6 - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.18.9 - "@babel/plugin-proposal-async-generator-functions": ^7.20.1 - "@babel/plugin-proposal-class-properties": ^7.18.6 - "@babel/plugin-proposal-class-static-block": ^7.18.6 - "@babel/plugin-proposal-dynamic-import": ^7.18.6 - "@babel/plugin-proposal-export-namespace-from": ^7.18.9 - "@babel/plugin-proposal-json-strings": ^7.18.6 - "@babel/plugin-proposal-logical-assignment-operators": ^7.18.9 - "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.6 - "@babel/plugin-proposal-numeric-separator": ^7.18.6 - "@babel/plugin-proposal-object-rest-spread": ^7.20.2 - "@babel/plugin-proposal-optional-catch-binding": ^7.18.6 - "@babel/plugin-proposal-optional-chaining": ^7.18.9 - "@babel/plugin-proposal-private-methods": ^7.18.6 - "@babel/plugin-proposal-private-property-in-object": ^7.18.6 - "@babel/plugin-proposal-unicode-property-regex": ^7.18.6 + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 6b5d1404c8c623b0ec9bd436c00d885a17d6a34f3f2597996343ddb9d94f6379705b21582dfd4cec2c47fd34068872e74ab6b9580116c0566b3f9447e2a7fa06 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-sets-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.22.5" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: c042070f980b139547f8b0179efbc049ac5930abec7fc26ed7a41d89a048d8ab17d362200e204b6f71c3c20d6991a0e74415e1a412a49adc8131c2a40c04822e + languageName: node + linkType: hard + +"@babel/preset-env@npm:^7.0.0, @babel/preset-env@npm:^7.12.11, @babel/preset-env@npm:^7.15.0, @babel/preset-env@npm:^7.15.6, @babel/preset-env@npm:^7.18.6, @babel/preset-env@npm:^7.22.9": + version: 7.22.9 + resolution: "@babel/preset-env@npm:7.22.9" + dependencies: + "@babel/compat-data": ^7.22.9 + "@babel/helper-compilation-targets": ^7.22.9 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.5 + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.22.5 + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.22.5 + "@babel/plugin-proposal-private-property-in-object": 7.21.0-placeholder-for-preset-env.2 "@babel/plugin-syntax-async-generators": ^7.8.4 "@babel/plugin-syntax-class-properties": ^7.12.13 "@babel/plugin-syntax-class-static-block": ^7.14.5 "@babel/plugin-syntax-dynamic-import": ^7.8.3 "@babel/plugin-syntax-export-namespace-from": ^7.8.3 - "@babel/plugin-syntax-import-assertions": ^7.20.0 + "@babel/plugin-syntax-import-assertions": ^7.22.5 + "@babel/plugin-syntax-import-attributes": ^7.22.5 + "@babel/plugin-syntax-import-meta": ^7.10.4 "@babel/plugin-syntax-json-strings": ^7.8.3 "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 @@ -1590,48 +1713,65 @@ __metadata: "@babel/plugin-syntax-optional-chaining": ^7.8.3 "@babel/plugin-syntax-private-property-in-object": ^7.14.5 "@babel/plugin-syntax-top-level-await": ^7.14.5 - "@babel/plugin-transform-arrow-functions": ^7.18.6 - "@babel/plugin-transform-async-to-generator": ^7.18.6 - "@babel/plugin-transform-block-scoped-functions": ^7.18.6 - "@babel/plugin-transform-block-scoping": ^7.20.2 - "@babel/plugin-transform-classes": ^7.20.2 - "@babel/plugin-transform-computed-properties": ^7.18.9 - "@babel/plugin-transform-destructuring": ^7.20.2 - "@babel/plugin-transform-dotall-regex": ^7.18.6 - "@babel/plugin-transform-duplicate-keys": ^7.18.9 - "@babel/plugin-transform-exponentiation-operator": ^7.18.6 - "@babel/plugin-transform-for-of": ^7.18.8 - "@babel/plugin-transform-function-name": ^7.18.9 - "@babel/plugin-transform-literals": ^7.18.9 - "@babel/plugin-transform-member-expression-literals": ^7.18.6 - "@babel/plugin-transform-modules-amd": ^7.19.6 - "@babel/plugin-transform-modules-commonjs": ^7.19.6 - "@babel/plugin-transform-modules-systemjs": ^7.19.6 - "@babel/plugin-transform-modules-umd": ^7.18.6 - "@babel/plugin-transform-named-capturing-groups-regex": ^7.19.1 - "@babel/plugin-transform-new-target": ^7.18.6 - "@babel/plugin-transform-object-super": ^7.18.6 - "@babel/plugin-transform-parameters": ^7.20.1 - "@babel/plugin-transform-property-literals": ^7.18.6 - "@babel/plugin-transform-regenerator": ^7.18.6 - "@babel/plugin-transform-reserved-words": ^7.18.6 - "@babel/plugin-transform-shorthand-properties": ^7.18.6 - "@babel/plugin-transform-spread": ^7.19.0 - "@babel/plugin-transform-sticky-regex": ^7.18.6 - "@babel/plugin-transform-template-literals": ^7.18.9 - "@babel/plugin-transform-typeof-symbol": ^7.18.9 - "@babel/plugin-transform-unicode-escapes": ^7.18.10 - "@babel/plugin-transform-unicode-regex": ^7.18.6 + "@babel/plugin-syntax-unicode-sets-regex": ^7.18.6 + "@babel/plugin-transform-arrow-functions": ^7.22.5 + "@babel/plugin-transform-async-generator-functions": ^7.22.7 + "@babel/plugin-transform-async-to-generator": ^7.22.5 + "@babel/plugin-transform-block-scoped-functions": ^7.22.5 + "@babel/plugin-transform-block-scoping": ^7.22.5 + "@babel/plugin-transform-class-properties": ^7.22.5 + "@babel/plugin-transform-class-static-block": ^7.22.5 + "@babel/plugin-transform-classes": ^7.22.6 + "@babel/plugin-transform-computed-properties": ^7.22.5 + "@babel/plugin-transform-destructuring": ^7.22.5 + "@babel/plugin-transform-dotall-regex": ^7.22.5 + "@babel/plugin-transform-duplicate-keys": ^7.22.5 + "@babel/plugin-transform-dynamic-import": ^7.22.5 + "@babel/plugin-transform-exponentiation-operator": ^7.22.5 + "@babel/plugin-transform-export-namespace-from": ^7.22.5 + "@babel/plugin-transform-for-of": ^7.22.5 + "@babel/plugin-transform-function-name": ^7.22.5 + "@babel/plugin-transform-json-strings": ^7.22.5 + "@babel/plugin-transform-literals": ^7.22.5 + "@babel/plugin-transform-logical-assignment-operators": ^7.22.5 + "@babel/plugin-transform-member-expression-literals": ^7.22.5 + "@babel/plugin-transform-modules-amd": ^7.22.5 + "@babel/plugin-transform-modules-commonjs": ^7.22.5 + "@babel/plugin-transform-modules-systemjs": ^7.22.5 + "@babel/plugin-transform-modules-umd": ^7.22.5 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.22.5 + "@babel/plugin-transform-new-target": ^7.22.5 + "@babel/plugin-transform-nullish-coalescing-operator": ^7.22.5 + "@babel/plugin-transform-numeric-separator": ^7.22.5 + "@babel/plugin-transform-object-rest-spread": ^7.22.5 + "@babel/plugin-transform-object-super": ^7.22.5 + "@babel/plugin-transform-optional-catch-binding": ^7.22.5 + "@babel/plugin-transform-optional-chaining": ^7.22.6 + "@babel/plugin-transform-parameters": ^7.22.5 + "@babel/plugin-transform-private-methods": ^7.22.5 + "@babel/plugin-transform-private-property-in-object": ^7.22.5 + "@babel/plugin-transform-property-literals": ^7.22.5 + "@babel/plugin-transform-regenerator": ^7.22.5 + "@babel/plugin-transform-reserved-words": ^7.22.5 + "@babel/plugin-transform-shorthand-properties": ^7.22.5 + "@babel/plugin-transform-spread": ^7.22.5 + "@babel/plugin-transform-sticky-regex": ^7.22.5 + "@babel/plugin-transform-template-literals": ^7.22.5 + "@babel/plugin-transform-typeof-symbol": ^7.22.5 + "@babel/plugin-transform-unicode-escapes": ^7.22.5 + "@babel/plugin-transform-unicode-property-regex": ^7.22.5 + "@babel/plugin-transform-unicode-regex": ^7.22.5 + "@babel/plugin-transform-unicode-sets-regex": ^7.22.5 "@babel/preset-modules": ^0.1.5 - "@babel/types": ^7.20.2 - babel-plugin-polyfill-corejs2: ^0.3.3 - babel-plugin-polyfill-corejs3: ^0.6.0 - babel-plugin-polyfill-regenerator: ^0.4.1 - core-js-compat: ^3.25.1 - semver: ^6.3.0 + "@babel/types": ^7.22.5 + babel-plugin-polyfill-corejs2: ^0.4.4 + babel-plugin-polyfill-corejs3: ^0.8.2 + babel-plugin-polyfill-regenerator: ^0.5.1 + core-js-compat: ^3.31.0 + semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: ece2d7e9c7789db6116e962b8e1a55eb55c110c44c217f0c8f6ffea4ca234954e66557f7bd019b7affadf7fbb3a53ccc807e93fc935aacd48146234b73b6947e + checksum: 6caa2897bbda30c6932aed0a03827deb1337c57108050c9f97dc9a857e1533c7125b168b6d70b9d191965bf05f9f233f0ad20303080505dff7ce39740aaa759d languageName: node linkType: hard @@ -1720,6 +1860,13 @@ __metadata: languageName: node linkType: hard +"@babel/regjsgen@npm:^0.8.0": + version: 0.8.0 + resolution: "@babel/regjsgen@npm:0.8.0" + checksum: 89c338fee774770e5a487382170711014d49a68eb281e74f2b5eac88f38300a4ad545516a7786a8dd5702e9cf009c94c2f582d200f077ac5decd74c56b973730 + languageName: node + linkType: hard + "@babel/runtime-corejs3@npm:^7.10.2, @babel/runtime-corejs3@npm:^7.18.6": version: 7.18.6 resolution: "@babel/runtime-corejs3@npm:7.18.6" @@ -1739,43 +1886,43 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:>=7, @babel/template@npm:^7.12.13, @babel/template@npm:^7.12.7, @babel/template@npm:^7.18.10, @babel/template@npm:^7.20.7, @babel/template@npm:^7.3.3": - version: 7.20.7 - resolution: "@babel/template@npm:7.20.7" +"@babel/template@npm:^7.12.7, @babel/template@npm:^7.22.5, @babel/template@npm:^7.3.3": + version: 7.22.5 + resolution: "@babel/template@npm:7.22.5" dependencies: - "@babel/code-frame": ^7.18.6 - "@babel/parser": ^7.20.7 - "@babel/types": ^7.20.7 - checksum: 2eb1a0ab8d415078776bceb3473d07ab746e6bb4c2f6ca46ee70efb284d75c4a32bb0cd6f4f4946dec9711f9c0780e8e5d64b743208deac6f8e9858afadc349e + "@babel/code-frame": ^7.22.5 + "@babel/parser": ^7.22.5 + "@babel/types": ^7.22.5 + checksum: c5746410164039aca61829cdb42e9a55410f43cace6f51ca443313f3d0bdfa9a5a330d0b0df73dc17ef885c72104234ae05efede37c1cc8a72dc9f93425977a3 languageName: node linkType: hard -"@babel/traverse@npm:>=7, @babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.12.11, @babel/traverse@npm:^7.12.13, @babel/traverse@npm:^7.12.9, @babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.17.9, @babel/traverse@npm:^7.18.8, @babel/traverse@npm:^7.20.10, @babel/traverse@npm:^7.20.12, @babel/traverse@npm:^7.20.13, @babel/traverse@npm:^7.20.5, @babel/traverse@npm:^7.20.7, @babel/traverse@npm:^7.4.5, @babel/traverse@npm:^7.7.2": - version: 7.20.13 - resolution: "@babel/traverse@npm:7.20.13" - dependencies: - "@babel/code-frame": ^7.18.6 - "@babel/generator": ^7.20.7 - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-function-name": ^7.19.0 - "@babel/helper-hoist-variables": ^7.18.6 - "@babel/helper-split-export-declaration": ^7.18.6 - "@babel/parser": ^7.20.13 - "@babel/types": ^7.20.7 +"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.12.11, @babel/traverse@npm:^7.12.9, @babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.17.9, @babel/traverse@npm:^7.18.8, @babel/traverse@npm:^7.22.6, @babel/traverse@npm:^7.22.8, @babel/traverse@npm:^7.4.5, @babel/traverse@npm:^7.7.2": + version: 7.22.8 + resolution: "@babel/traverse@npm:7.22.8" + dependencies: + "@babel/code-frame": ^7.22.5 + "@babel/generator": ^7.22.7 + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-function-name": ^7.22.5 + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/parser": ^7.22.7 + "@babel/types": ^7.22.5 debug: ^4.1.0 globals: ^11.1.0 - checksum: 30ca6e0bd18233fda48fa09315efd14dfc61dcf5b8fa3712b343bfc61b32bc63b5e85ea1773cc9576c9b293b96f46b4589aaeb0a52e1f3eeac4edc076d049fc7 + checksum: a381369bc3eedfd13ed5fef7b884657f1c29024ea7388198149f0edc34bd69ce3966e9f40188d15f56490a5e12ba250ccc485f2882b53d41b054fccefb233e33 languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.11, @babel/types@npm:^7.12.7, @babel/types@npm:^7.15.6, @babel/types@npm:^7.18.6, @babel/types@npm:^7.18.9, @babel/types@npm:^7.19.0, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.2, @babel/types@npm:^7.20.5, @babel/types@npm:^7.20.7, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": - version: 7.20.7 - resolution: "@babel/types@npm:7.20.7" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.11, @babel/types@npm:^7.12.7, @babel/types@npm:^7.15.6, @babel/types@npm:^7.18.6, @babel/types@npm:^7.2.0, @babel/types@npm:^7.22.5, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.22.5 + resolution: "@babel/types@npm:7.22.5" dependencies: - "@babel/helper-string-parser": ^7.19.4 - "@babel/helper-validator-identifier": ^7.19.1 + "@babel/helper-string-parser": ^7.22.5 + "@babel/helper-validator-identifier": ^7.22.5 to-fast-properties: ^2.0.0 - checksum: b39af241f0b72bba67fd6d0d23914f6faec8c0eba8015c181cbd5ea92e59fc91a52a1ab490d3520c7dbd19ddb9ebb76c476308f6388764f16d8201e37fae6811 + checksum: c13a9c1dc7d2d1a241a2f8363540cb9af1d66e978e8984b400a20c4f38ba38ca29f06e26a0f2d49a70bad9e57615dac09c35accfddf1bb90d23cd3e0a0bab892 languageName: node linkType: hard @@ -3287,7 +3434,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.0, @jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.13, @jridgewell/trace-mapping@npm:^0.3.14, @jridgewell/trace-mapping@npm:^0.3.7, @jridgewell/trace-mapping@npm:^0.3.9": +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.13, @jridgewell/trace-mapping@npm:^0.3.14, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.7, @jridgewell/trace-mapping@npm:^0.3.9": version: 0.3.17 resolution: "@jridgewell/trace-mapping@npm:0.3.17" dependencies: @@ -3347,79 +3494,135 @@ __metadata: languageName: node linkType: hard -"@linaria/babel-preset@npm:^3.0.0-beta.22, @linaria/babel-preset@npm:^3.0.0-beta.23": - version: 3.0.0-beta.23 - resolution: "@linaria/babel-preset@npm:3.0.0-beta.23" +"@linaria/babel-preset@npm:^4.5.4": + version: 4.5.4 + resolution: "@linaria/babel-preset@npm:4.5.4" dependencies: - "@babel/core": ^7.18.2 - "@babel/generator": ">=7" - "@babel/plugin-proposal-export-namespace-from": ">=7" - "@babel/plugin-syntax-dynamic-import": ">=7" - "@babel/plugin-transform-modules-commonjs": ^7.18.2 - "@babel/template": ">=7" - "@babel/traverse": ">=7" - "@linaria/core": ^3.0.0-beta.22 - "@linaria/logger": ^3.0.0-beta.20 - "@linaria/utils": ^3.0.0-beta.20 - cosmiconfig: ^5.1.0 - find-up: ^5.0.0 + "@babel/core": ^7.22.9 + "@babel/generator": ^7.22.9 + "@babel/helper-module-imports": ^7.22.5 + "@babel/template": ^7.22.5 + "@babel/traverse": ^7.22.8 + "@babel/types": ^7.22.5 + "@linaria/core": ^4.5.4 + "@linaria/logger": ^4.5.0 + "@linaria/shaker": ^4.5.3 + "@linaria/tags": ^4.5.4 + "@linaria/utils": ^4.5.3 + cosmiconfig: ^8.0.0 source-map: ^0.7.3 stylis: ^3.5.4 - checksum: 5e1b7d077272ca93105631b0f9e1d78632769c63fd06d14994ae2b20519e470c2b7170cf50d8a32945e2298afb30f406284a6b46d8abf91b1d9772a55b761385 + checksum: 2b894afde749cbcde5c4e1249b5e3c2585049ec59c1c6fc716b68f3b82ddad3008b437f6c5d321d53055869c78d66e66922d4c593cbd4d9858cd56511e40d9e5 languageName: node linkType: hard -"@linaria/core@npm:^3.0.0-beta.22": - version: 3.0.0-beta.22 - resolution: "@linaria/core@npm:3.0.0-beta.22" +"@linaria/core@npm:^4.5.4": + version: 4.5.4 + resolution: "@linaria/core@npm:4.5.4" dependencies: - "@linaria/logger": ^3.0.0-beta.20 - "@linaria/utils": ^3.0.0-beta.20 - checksum: 67f57811c78821eb4866e3f307078e3c1cf375ca84f23b4a25cf7f4c34b48b76eaef70a4320436a51145a73b4d0fbac54db7459ab5a23049e7c347fee3644abb + "@linaria/logger": ^4.5.0 + "@linaria/tags": ^4.5.4 + "@linaria/utils": ^4.5.3 + checksum: 3eff66a8d7ce272fbf3cd680a916d133e5194b8d65410c0512b768948fd81306b6d435b09834793428b005d43f65b20ad5d1569a0a77b81d7dbf11679cd69c55 languageName: node linkType: hard -"@linaria/logger@npm:^3.0.0-beta.20": - version: 3.0.0-beta.20 - resolution: "@linaria/logger@npm:3.0.0-beta.20" +"@linaria/logger@npm:^4.5.0": + version: 4.5.0 + resolution: "@linaria/logger@npm:4.5.0" dependencies: debug: ^4.1.1 picocolors: ^1.0.0 - checksum: c5c1fbe593d9110fcbf7309517530fbda419c42c4258e0854f05619f917641724718919693a0a12eb50250bace9857435f29f4de8b056e1dc5f40c01eb074a7a + checksum: 8a01717e4935244c44d0952442811a8c4fa57aade9b99ab811d30ecbef5261859839af9f0c78645b6549d40c97eef79754cd12a8436f54e4c2139635c60cab91 + languageName: node + linkType: hard + +"@linaria/shaker@npm:^4.5.3": + version: 4.5.3 + resolution: "@linaria/shaker@npm:4.5.3" + dependencies: + "@babel/core": ^7.22.9 + "@babel/generator": ^7.22.9 + "@babel/plugin-transform-modules-commonjs": ^7.22.5 + "@babel/plugin-transform-runtime": ^7.22.9 + "@babel/plugin-transform-template-literals": ^7.22.5 + "@babel/preset-env": ^7.22.9 + "@linaria/logger": ^4.5.0 + "@linaria/utils": ^4.5.3 + babel-plugin-transform-react-remove-prop-types: ^0.4.24 + ts-invariant: ^0.10.3 + checksum: 9ec1f9ce014ac5e94d1ddc78d011585c84415edd5b9854f511e9498bf88bc4266073a282030e584d2f829d47cbc66577e6f1d209150c74d5188dfb56f3dc7f43 languageName: node linkType: hard -"@linaria/preeval@npm:^3.0.0-beta.22": - version: 3.0.0-beta.22 - resolution: "@linaria/preeval@npm:3.0.0-beta.22" +"@linaria/tags@npm:^4.5.4": + version: 4.5.4 + resolution: "@linaria/tags@npm:4.5.4" dependencies: - "@linaria/babel-preset": ^3.0.0-beta.22 - checksum: 3f1cf0c27cbcfd3ebd6e82346ee3ad00f146a8dd2e41b440a677707893e03a82937be5aee3f33fabba2c537b0639d1280cafa139558123548f1473eee08bb446 + "@babel/generator": ^7.22.9 + "@linaria/logger": ^4.5.0 + "@linaria/utils": ^4.5.3 + checksum: ea4b07414d09220f3a99da72325ca9b6395494037468a15783a422fcb1364272760ae65f003b690284583ce9ea5e266ee506fab694fb95aeca37fc3ee87f40e8 languageName: node linkType: hard -"@linaria/shaker@npm:^3.0.0-beta.22": - version: 3.0.0-beta.22 - resolution: "@linaria/shaker@npm:3.0.0-beta.22" +"@linaria/utils@npm:^4.5.3": + version: 4.5.3 + resolution: "@linaria/utils@npm:4.5.3" dependencies: - "@babel/core": ^7.18.2 - "@babel/generator": ">=7" - "@babel/plugin-transform-runtime": ">=7" - "@babel/plugin-transform-template-literals": ">=7" - "@babel/preset-env": ">=7" - "@linaria/babel-preset": ^3.0.0-beta.22 - "@linaria/logger": ^3.0.0-beta.20 - "@linaria/preeval": ^3.0.0-beta.22 - babel-plugin-transform-react-remove-prop-types: ^0.4.24 - ts-invariant: ^0.10.3 - checksum: 4b9d3d5112f82317fddbe9369e3b96f5023a4c212aa220e51c32165fe33ba9487683a61263cacb6ad2e202c13e9f1bdba80f0264d3e0074a97a2bcb15af22e9b + "@babel/core": ^7.22.9 + "@babel/generator": ^7.22.9 + "@babel/plugin-proposal-export-namespace-from": ^7.18.9 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + "@babel/plugin-transform-modules-commonjs": ^7.22.5 + "@babel/template": ^7.22.5 + "@babel/traverse": ^7.22.8 + "@babel/types": ^7.22.5 + "@linaria/logger": ^4.5.0 + babel-merge: ^3.0.0 + find-up: ^5.0.0 + minimatch: ^9.0.3 + checksum: 5285283ed2b7b46a442d870ff39b781c154bd7840c48c889042c2b88a464400bf95f19f07b26d85219215e2347fa8e172ebfa500e88b85e177a5fcc3a524b7ac + languageName: node + linkType: hard + +"@linaria/webpack-loader@npm:^4.5.4": + version: 4.5.4 + resolution: "@linaria/webpack-loader@npm:4.5.4" + dependencies: + "@linaria/webpack4-loader": ^4.5.4 + "@linaria/webpack5-loader": ^4.5.4 + checksum: 6856f38ff5d85b680dbd3cc2c799bf049fc5bed65a6e28d8b7b315459453a44e7f76e1a779bb991ec48ee5f658192c54289b44d48c247363fe0538d6f18ab146 + languageName: node + linkType: hard + +"@linaria/webpack4-loader@npm:^4.5.4": + version: 4.5.4 + resolution: "@linaria/webpack4-loader@npm:4.5.4" + dependencies: + "@linaria/babel-preset": ^4.5.4 + "@linaria/logger": ^4.5.0 + enhanced-resolve: ^4.1.0 + loader-utils: ^1.2.3 + mkdirp: ^0.5.1 + peerDependencies: + webpack: ">=4.0.0 <5.0.0" + checksum: 7e680d5c0b16495e6707f6de76a6dc83064379cb33b13355c98796769f24ac3f38b91a96d136cd29805abd7798fbc36116a649e4e7e24f931e35926d40afc3a9 languageName: node linkType: hard -"@linaria/utils@npm:^3.0.0-beta.20": - version: 3.0.0-beta.20 - resolution: "@linaria/utils@npm:3.0.0-beta.20" - checksum: dbf2170bf89a06fd7158b979069ca0a445a56baeebe258109a2490d4709dacc5c4b1a3628cd179ba991478809907847e0460c0c32ac92f3d427f9056e2b8c152 +"@linaria/webpack5-loader@npm:^4.5.4": + version: 4.5.4 + resolution: "@linaria/webpack5-loader@npm:4.5.4" + dependencies: + "@linaria/babel-preset": ^4.5.4 + "@linaria/logger": ^4.5.0 + "@linaria/utils": ^4.5.3 + enhanced-resolve: ^5.3.1 + mkdirp: ^0.5.1 + peerDependencies: + webpack: ^5.0.0 + checksum: 814c4b46a3d24cc8a850311d12a9cd5e561243d691ac4613237c19f2bb4e3b4c35f6b15a4b9b4e9674cc65e3e216341c78875e41dac7de09694c2eaabb11a75a languageName: node linkType: hard @@ -8174,6 +8377,18 @@ __metadata: languageName: node linkType: hard +"babel-merge@npm:^3.0.0": + version: 3.0.0 + resolution: "babel-merge@npm:3.0.0" + dependencies: + deepmerge: ^2.2.1 + object.omit: ^3.0.0 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 8613efb6edcacaac628f9f86056bb110bc4f78dcc35c38787aaa4b8cfe92481ebedf56d558a1e74fcb8cdb4242d0bea2c1ab00e150e243548934157d0c9db06b + languageName: node + linkType: hard + "babel-plugin-add-react-displayname@npm:^0.0.5": version: 0.0.5 resolution: "babel-plugin-add-react-displayname@npm:0.0.5" @@ -8287,16 +8502,16 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs2@npm:^0.3.1, babel-plugin-polyfill-corejs2@npm:^0.3.3": - version: 0.3.3 - resolution: "babel-plugin-polyfill-corejs2@npm:0.3.3" +"babel-plugin-polyfill-corejs2@npm:^0.4.4": + version: 0.4.5 + resolution: "babel-plugin-polyfill-corejs2@npm:0.4.5" dependencies: - "@babel/compat-data": ^7.17.7 - "@babel/helper-define-polyfill-provider": ^0.3.3 - semver: ^6.1.1 + "@babel/compat-data": ^7.22.6 + "@babel/helper-define-polyfill-provider": ^0.4.2 + semver: ^6.3.1 peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 7db3044993f3dddb3cc3d407bc82e640964a3bfe22de05d90e1f8f7a5cb71460011ab136d3c03c6c1ba428359ebf635688cd6205e28d0469bba221985f5c6179 + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 33a8e06aa54e2858d211c743d179f0487b03222f9ca1bfd7c4865bca243fca942a3358cb75f6bb894ed476cbddede834811fbd6903ff589f055821146f053e1a languageName: node linkType: hard @@ -8312,49 +8527,26 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs3@npm:^0.5.2": - version: 0.5.2 - resolution: "babel-plugin-polyfill-corejs3@npm:0.5.2" - dependencies: - "@babel/helper-define-polyfill-provider": ^0.3.1 - core-js-compat: ^3.21.0 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 2f3184c73f80f00ac876a5ebcad945fd8d2ae70e5f85b7ab6cc3bc69bc74025f4f7070de7abbb2a7274c78e130bd34fc13f4c85342da28205930364a1ef0aa21 - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs3@npm:^0.6.0": - version: 0.6.0 - resolution: "babel-plugin-polyfill-corejs3@npm:0.6.0" - dependencies: - "@babel/helper-define-polyfill-provider": ^0.3.3 - core-js-compat: ^3.25.1 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 470bb8c59f7c0912bd77fe1b5a2e72f349b3f65bbdee1d60d6eb7e1f4a085c6f24b2dd5ab4ac6c2df6444a96b070ef6790eccc9edb6a2668c60d33133bfb62c6 - languageName: node - linkType: hard - -"babel-plugin-polyfill-regenerator@npm:^0.3.1": - version: 0.3.1 - resolution: "babel-plugin-polyfill-regenerator@npm:0.3.1" +"babel-plugin-polyfill-corejs3@npm:^0.8.2": + version: 0.8.3 + resolution: "babel-plugin-polyfill-corejs3@npm:0.8.3" dependencies: - "@babel/helper-define-polyfill-provider": ^0.3.1 + "@babel/helper-define-polyfill-provider": ^0.4.2 + core-js-compat: ^3.31.0 peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: f1473df7b700d6795ca41301b1e65a0aff15ce6c1463fc0ce2cf0c821114b0330920f59d4cebf52976363ee817ba29ad2758544a4661a724b08191080b9fe1da + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: dcbb30e551702a82cfd4d2c375da2c317658e55f95e9edcda93b9bbfdcc8fb6e5344efcb144e04d3406859e7682afce7974c60ededd9f12072a48a83dd22a0da languageName: node linkType: hard -"babel-plugin-polyfill-regenerator@npm:^0.4.1": - version: 0.4.1 - resolution: "babel-plugin-polyfill-regenerator@npm:0.4.1" +"babel-plugin-polyfill-regenerator@npm:^0.5.1": + version: 0.5.2 + resolution: "babel-plugin-polyfill-regenerator@npm:0.5.2" dependencies: - "@babel/helper-define-polyfill-provider": ^0.3.3 + "@babel/helper-define-polyfill-provider": ^0.4.2 peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: ab0355efbad17d29492503230387679dfb780b63b25408990d2e4cf421012dae61d6199ddc309f4d2409ce4e9d3002d187702700dd8f4f8770ebbba651ed066c + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: d962200f604016a9a09bc9b4aaf60a3db7af876bb65bcefaeac04d44ac9d9ec4037cf24ce117760cc141d7046b6394c7eb0320ba9665cb4a2ee64df2be187c93 languageName: node linkType: hard @@ -8892,17 +9084,17 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.0.0, browserslist@npm:^4.12.0, browserslist@npm:^4.14.5, browserslist@npm:^4.16.6, browserslist@npm:^4.18.1, browserslist@npm:^4.19.1, browserslist@npm:^4.20.3, browserslist@npm:^4.21.3, browserslist@npm:^4.21.4": - version: 4.21.5 - resolution: "browserslist@npm:4.21.5" +"browserslist@npm:^4.0.0, browserslist@npm:^4.12.0, browserslist@npm:^4.14.5, browserslist@npm:^4.16.6, browserslist@npm:^4.18.1, browserslist@npm:^4.19.1, browserslist@npm:^4.20.3, browserslist@npm:^4.21.4, browserslist@npm:^4.21.9": + version: 4.21.10 + resolution: "browserslist@npm:4.21.10" dependencies: - caniuse-lite: ^1.0.30001449 - electron-to-chromium: ^1.4.284 - node-releases: ^2.0.8 - update-browserslist-db: ^1.0.10 + caniuse-lite: ^1.0.30001517 + electron-to-chromium: ^1.4.477 + node-releases: ^2.0.13 + update-browserslist-db: ^1.0.11 bin: browserslist: cli.js - checksum: 9755986b22e73a6a1497fd8797aedd88e04270be33ce66ed5d85a1c8a798292a65e222b0f251bafa1c2522261e237d73b08b58689d4920a607e5a53d56dc4706 + checksum: 1e27c0f111a35d1dd0e8fc2c61781b0daefabc2c9471b0b10537ce54843014bceb2a1ce4571af1a82b2bf1e6e6e05d38865916689a158f03bc2c7a4ec2577db8 languageName: node linkType: hard @@ -9114,31 +9306,6 @@ __metadata: languageName: node linkType: hard -"caller-callsite@npm:^2.0.0": - version: 2.0.0 - resolution: "caller-callsite@npm:2.0.0" - dependencies: - callsites: ^2.0.0 - checksum: b685e9d126d9247b320cfdfeb3bc8da0c4be28d8fb98c471a96bc51aab3130099898a2fe3bf0308f0fe048d64c37d6d09f563958b9afce1a1e5e63d879c128a2 - languageName: node - linkType: hard - -"caller-path@npm:^2.0.0": - version: 2.0.0 - resolution: "caller-path@npm:2.0.0" - dependencies: - caller-callsite: ^2.0.0 - checksum: 3e12ccd0c71ec10a057aac69e3ec175b721ca858c640df021ef0d25999e22f7c1d864934b596b7d47038e9b56b7ec315add042abbd15caac882998b50102fb12 - languageName: node - linkType: hard - -"callsites@npm:^2.0.0": - version: 2.0.0 - resolution: "callsites@npm:2.0.0" - checksum: be2f67b247df913732b7dec1ec0bbfcdbaea263e5a95968b19ec7965affae9496b970e3024317e6d4baa8e28dc6ba0cec03f46fdddc2fdcc51396600e53c2623 - languageName: node - linkType: hard - "callsites@npm:^3.0.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" @@ -9213,10 +9380,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001109, caniuse-lite@npm:^1.0.30001332, caniuse-lite@npm:^1.0.30001394, caniuse-lite@npm:^1.0.30001426, caniuse-lite@npm:^1.0.30001449": - version: 1.0.30001450 - resolution: "caniuse-lite@npm:1.0.30001450" - checksum: 511b360bfc907b2e437699364cf96b83507bc45043926450056642332bcd6f65a1e72540c828534ae15e0ac906e3e9af46cb2bb84458dd580bc31478e9dce282 +"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001109, caniuse-lite@npm:^1.0.30001332, caniuse-lite@npm:^1.0.30001394, caniuse-lite@npm:^1.0.30001426, caniuse-lite@npm:^1.0.30001517": + version: 1.0.30001518 + resolution: "caniuse-lite@npm:1.0.30001518" + checksum: 1b63272f6e3d628ac52e2547e0b75fc477004d4b19b63e34b2c045de7f2e48909f9ea513978fc5a46c4ab5ac6c9daf9cc5e6a78466e90684fb824c3f2105e8f5 languageName: node linkType: hard @@ -10048,12 +10215,12 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.21.0, core-js-compat@npm:^3.25.1, core-js-compat@npm:^3.8.1": - version: 3.27.2 - resolution: "core-js-compat@npm:3.27.2" +"core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.8.1": + version: 3.32.0 + resolution: "core-js-compat@npm:3.32.0" dependencies: - browserslist: ^4.21.4 - checksum: 4574d4507de8cba9a75e37401b3ca6e5908ab066ec717e3b34866d25f623e1aa614fb886e10973be64a6250f325dcba6809e4fae4ed43375cc3e4276c5514c13 + browserslist: ^4.21.9 + checksum: e740b348dfd8dc25ac851ab625a1d5a63c012252bdd6d8ae92d1b2ebf46e6cf57ca6cbec4494cbacdd90d3f8ed822480c8a7106c990dbe9055ebdf5b79fbb92e languageName: node linkType: hard @@ -10085,7 +10252,7 @@ __metadata: languageName: node linkType: hard -"cosmiconfig@npm:8.0.0": +"cosmiconfig@npm:8.0.0, cosmiconfig@npm:^8.0.0": version: 8.0.0 resolution: "cosmiconfig@npm:8.0.0" dependencies: @@ -10097,18 +10264,6 @@ __metadata: languageName: node linkType: hard -"cosmiconfig@npm:^5.1.0": - version: 5.2.1 - resolution: "cosmiconfig@npm:5.2.1" - dependencies: - import-fresh: ^2.0.0 - is-directory: ^0.3.1 - js-yaml: ^3.13.1 - parse-json: ^4.0.0 - checksum: 8b6f1d3c8a5ffdf663a952f17af0761adf210b7a5933d0fe8988f3ca3a1f0e1e5cbbb74d5b419c15933dd2fdcaec31dbc5cc85cb8259a822342b93b529eff89c - languageName: node - linkType: hard - "cosmiconfig@npm:^6.0.0": version: 6.0.0 resolution: "cosmiconfig@npm:6.0.0" @@ -11102,6 +11257,13 @@ __metadata: languageName: node linkType: hard +"deepmerge@npm:^2.2.1": + version: 2.2.1 + resolution: "deepmerge@npm:2.2.1" + checksum: 284b71065079e66096229f735a9a0222463c9ca9ee9dda7d5e9a0545bf254906dbc7377e3499ca3b2212073672b1a430d80587993b43b87d8de17edc6af649a8 + languageName: node + linkType: hard + "deepmerge@npm:^4.2.2": version: 4.2.2 resolution: "deepmerge@npm:4.2.2" @@ -11647,10 +11809,10 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.284": - version: 1.4.286 - resolution: "electron-to-chromium@npm:1.4.286" - checksum: 6b53e2aea63892cb4af85ea4ee5ed2b6d848713519987efcf4c1177a32e2fe6d04a7f591f5bcd1feab0b3c88890c6eaf65b6feb16c0e0319bf07e31de31930af +"electron-to-chromium@npm:^1.4.477": + version: 1.4.477 + resolution: "electron-to-chromium@npm:1.4.477" + checksum: 1bf6117b2b58d4f18eff4f019fdffd0a68988142e095d8e59a66dbd0b6587e963b405aefc925b229959de20e3e8483849bcc41e3edb4366a359f825bc0a97377 languageName: node linkType: hard @@ -11747,7 +11909,7 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^4.5.0": +"enhanced-resolve@npm:^4.1.0, enhanced-resolve@npm:^4.5.0": version: 4.5.0 resolution: "enhanced-resolve@npm:4.5.0" dependencies: @@ -11758,7 +11920,7 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.10.0, enhanced-resolve@npm:^5.7.0, enhanced-resolve@npm:^5.8.2": +"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.10.0, enhanced-resolve@npm:^5.3.1, enhanced-resolve@npm:^5.7.0": version: 5.12.0 resolution: "enhanced-resolve@npm:5.12.0" dependencies: @@ -14159,8 +14321,6 @@ __metadata: "@babel/helper-plugin-utils": ^7.12.13 "@babel/preset-react": ^7.14.5 "@babel/preset-typescript": 7.12.13 - "@babel/template": ^7.12.13 - "@babel/traverse": ^7.12.13 "@codesandbox/sandpack-react": 1.18.4 "@codesandbox/sandpack-themes": 1.17.0 "@docusaurus/core": 2.3.1 @@ -14169,8 +14329,11 @@ __metadata: "@docusaurus/theme-mermaid": 2.3.1 "@emotion/css": ^11.9.0 "@emotion/hash": ^0.9.0 - "@linaria/babel-preset": ^3.0.0-beta.23 - "@linaria/shaker": ^3.0.0-beta.22 + "@linaria/babel-preset": ^4.5.4 + "@linaria/shaker": ^4.5.3 + "@linaria/tags": ^4.5.4 + "@linaria/utils": ^4.5.3 + "@linaria/webpack-loader": ^4.5.4 "@nrwl/cli": 15.3.3 "@nrwl/eslint-plugin-nx": 15.3.3 "@nrwl/jest": 15.3.3 @@ -14224,7 +14387,6 @@ __metadata: csstype: ^3.1.2 d3-scale-chromatic: ^3.0.0 doctoc: 2.2.1 - enhanced-resolve: ^5.8.2 esbuild: ^0.14.43 esbuild-plugin-alias: ^0.2.1 esbuild-plugin-import-glob: ^0.1.1 @@ -15058,16 +15220,6 @@ __metadata: languageName: node linkType: hard -"import-fresh@npm:^2.0.0": - version: 2.0.0 - resolution: "import-fresh@npm:2.0.0" - dependencies: - caller-path: ^2.0.0 - resolve-from: ^3.0.0 - checksum: 610255f9753cc6775df00be08e9f43691aa39f7703e3636c45afe22346b8b545e600ccfe100c554607546fc8e861fa149a0d1da078c8adedeea30fff326eef79 - languageName: node - linkType: hard - "import-fresh@npm:^3.0.0, import-fresh@npm:^3.1.0, import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -15489,13 +15641,6 @@ __metadata: languageName: node linkType: hard -"is-directory@npm:^0.3.1": - version: 0.3.1 - resolution: "is-directory@npm:0.3.1" - checksum: dce9a9d3981e38f2ded2a80848734824c50ee8680cd09aa477bef617949715cfc987197a2ca0176c58a9fb192a1a0d69b535c397140d241996a609d5906ae524 - languageName: node - linkType: hard - "is-docker@npm:^2.0.0, is-docker@npm:^2.1.1": version: 2.2.1 resolution: "is-docker@npm:2.2.1" @@ -15522,7 +15667,7 @@ __metadata: languageName: node linkType: hard -"is-extendable@npm:^1.0.1": +"is-extendable@npm:^1.0.0, is-extendable@npm:^1.0.1": version: 1.0.1 resolution: "is-extendable@npm:1.0.1" dependencies: @@ -16854,7 +16999,7 @@ __metadata: languageName: node linkType: hard -"json-parse-better-errors@npm:^1.0.1, json-parse-better-errors@npm:^1.0.2": +"json-parse-better-errors@npm:^1.0.2": version: 1.0.2 resolution: "json-parse-better-errors@npm:1.0.2" checksum: ff2b5ba2a70e88fd97a3cb28c1840144c5ce8fae9cbeeddba15afa333a5c407cf0e42300cd0a2885dbb055227fe68d405070faad941beeffbfde9cf3b2c78c5d @@ -18265,6 +18410,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^9.0.3": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: ^2.0.1 + checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + languageName: node + linkType: hard + "minimist@npm:^1.1.1, minimist@npm:^1.1.3, minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6": version: 1.2.7 resolution: "minimist@npm:1.2.7" @@ -18816,10 +18970,10 @@ __metadata: languageName: node linkType: hard -"node-releases@npm:^2.0.8": - version: 2.0.9 - resolution: "node-releases@npm:2.0.9" - checksum: 3ae6b1b300dc72c1a628861093d339a01aa017d3ad9017b0478384be29d6f9c93b9e26c91fce79728cecaadc04d0f16834b7ae1a018730e3e54962ec8c6aa86f +"node-releases@npm:^2.0.13": + version: 2.0.13 + resolution: "node-releases@npm:2.0.13" + checksum: 17ec8f315dba62710cae71a8dad3cd0288ba943d2ece43504b3b1aa8625bf138637798ab470b1d9035b0545996f63000a8a926e0f6d35d0996424f8b6d36dda3 languageName: node linkType: hard @@ -19111,6 +19265,15 @@ __metadata: languageName: node linkType: hard +"object.omit@npm:^3.0.0": + version: 3.0.0 + resolution: "object.omit@npm:3.0.0" + dependencies: + is-extendable: ^1.0.0 + checksum: 7444bcbd5e240bb933956b02450e61fe3c64670f6a99dd4b9fc26f4261afd629dd4f707770b2e8c399688358f90886d9ce9c31700486f58f1635aaf233d32931 + languageName: node + linkType: hard + "object.pick@npm:^1.3.0": version: 1.3.0 resolution: "object.pick@npm:1.3.0" @@ -19517,16 +19680,6 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^4.0.0": - version: 4.0.0 - resolution: "parse-json@npm:4.0.0" - dependencies: - error-ex: ^1.3.1 - json-parse-better-errors: ^1.0.1 - checksum: 0fe227d410a61090c247e34fa210552b834613c006c2c64d9a05cfe9e89cf8b4246d1246b1a99524b53b313e9ac024438d0680f67e33eaed7e6f38db64cfe7b5 - languageName: node - linkType: hard - "parse-json@npm:^5.0.0, parse-json@npm:^5.2.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" @@ -21585,12 +21738,12 @@ __metadata: languageName: node linkType: hard -"regenerator-transform@npm:^0.15.0": - version: 0.15.0 - resolution: "regenerator-transform@npm:0.15.0" +"regenerator-transform@npm:^0.15.1": + version: 0.15.1 + resolution: "regenerator-transform@npm:0.15.1" dependencies: "@babel/runtime": ^7.8.4 - checksum: 86e54849ab1167618d28bb56d214c52a983daf29b0d115c976d79840511420049b6b42c9ebdf187defa8e7129bdd74b6dd266420d0d3868c9fa7f793b5d15d49 + checksum: 2d15bdeadbbfb1d12c93f5775493d85874dbe1d405bec323da5c61ec6e701bc9eea36167483e1a5e752de9b2df59ab9a2dfff6bf3784f2b28af2279a673d29a4 languageName: node linkType: hard @@ -21622,17 +21775,17 @@ __metadata: languageName: node linkType: hard -"regexpu-core@npm:^5.2.1": - version: 5.2.2 - resolution: "regexpu-core@npm:5.2.2" +"regexpu-core@npm:^5.3.1": + version: 5.3.2 + resolution: "regexpu-core@npm:5.3.2" dependencies: + "@babel/regjsgen": ^0.8.0 regenerate: ^1.4.2 regenerate-unicode-properties: ^10.1.0 - regjsgen: ^0.7.1 regjsparser: ^0.9.1 unicode-match-property-ecmascript: ^2.0.0 unicode-match-property-value-ecmascript: ^2.1.0 - checksum: 87c56815e20d213848d38f6b047ba52f0d632f36e791b777f59327e8d350c0743b27cc25feab64c0eadc9fe9959dde6b1261af71108a9371b72c8c26beda05ef + checksum: 95bb97088419f5396e07769b7de96f995f58137ad75fac5811fb5fe53737766dfff35d66a0ee66babb1eb55386ef981feaef392f9df6d671f3c124812ba24da2 languageName: node linkType: hard @@ -21654,13 +21807,6 @@ __metadata: languageName: node linkType: hard -"regjsgen@npm:^0.7.1": - version: 0.7.1 - resolution: "regjsgen@npm:0.7.1" - checksum: 7cac399921c58db8e16454869283ff66871531180218064fa938ac05c11c2976792a00706c3c78bbc625e1d793ca373065ea90564e06189a751a7b4ae33acadc - languageName: node - linkType: hard - "regjsparser@npm:^0.9.1": version: 0.9.1 resolution: "regjsparser@npm:0.9.1" @@ -21902,13 +22048,6 @@ __metadata: languageName: node linkType: hard -"resolve-from@npm:^3.0.0": - version: 3.0.0 - resolution: "resolve-from@npm:3.0.0" - checksum: fff9819254d2d62b57f74e5c2ca9c0bdd425ca47287c4d801bc15f947533148d858229ded7793b0f59e61e49e782fffd6722048add12996e1bd4333c29669062 - languageName: node - linkType: hard - "resolve-from@npm:^4.0.0": version: 4.0.0 resolution: "resolve-from@npm:4.0.0" @@ -22533,12 +22672,12 @@ __metadata: languageName: node linkType: hard -"semver@npm:^6.0.0, semver@npm:^6.1.1, semver@npm:^6.1.2, semver@npm:^6.2.0, semver@npm:^6.3.0": - version: 6.3.0 - resolution: "semver@npm:6.3.0" +"semver@npm:^6.0.0, semver@npm:^6.1.2, semver@npm:^6.2.0, semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" bin: - semver: ./bin/semver.js - checksum: 1b26ecf6db9e8292dd90df4e781d91875c0dcc1b1909e70f5d12959a23c7eebb8f01ea581c00783bbee72ceeaad9505797c381756326073850dc36ed284b21b9 + semver: bin/semver.js + checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2 languageName: node linkType: hard @@ -23631,7 +23770,7 @@ __metadata: languageName: node linkType: hard -"stylis@npm:4.1.3, stylis@npm:^4.0.13, stylis@npm:^4.1.2": +"stylis@npm:4.1.3": version: 4.1.3 resolution: "stylis@npm:4.1.3" checksum: d04dbffcb9bf2c5ca8d8dc09534203c75df3bf711d33973ea22038a99cc475412a350b661ebd99cbc01daa50d7eedcf0d130d121800eb7318759a197023442a6 @@ -23645,7 +23784,7 @@ __metadata: languageName: node linkType: hard -"stylis@npm:^4.2.0": +"stylis@npm:^4.0.13, stylis@npm:^4.1.2, stylis@npm:^4.2.0": version: 4.2.0 resolution: "stylis@npm:4.2.0" checksum: 0eb6cc1b866dc17a6037d0a82ac7fa877eba6a757443e79e7c4f35bacedbf6421fadcab4363b39667b43355cbaaa570a3cde850f776498e5450f32ed2f9b7584 @@ -24846,17 +24985,17 @@ __metadata: languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.10": - version: 1.0.10 - resolution: "update-browserslist-db@npm:1.0.10" +"update-browserslist-db@npm:^1.0.11": + version: 1.0.11 + resolution: "update-browserslist-db@npm:1.0.11" dependencies: escalade: ^3.1.1 picocolors: ^1.0.0 peerDependencies: browserslist: ">= 4.21.0" bin: - browserslist-lint: cli.js - checksum: 12db73b4f63029ac407b153732e7cd69a1ea8206c9100b482b7d12859cd3cd0bc59c602d7ae31e652706189f1acb90d42c53ab24a5ba563ed13aebdddc5561a0 + update-browserslist-db: cli.js + checksum: b98327518f9a345c7cad5437afae4d2ae7d865f9779554baf2a200fdf4bac4969076b679b1115434bd6557376bdd37ca7583d0f9b8f8e302d7d4cc1e91b5f231 languageName: node linkType: hard