From 383b636810cdd58559af5c01565015e7b1bcc188 Mon Sep 17 00:00:00 2001 From: neverland Date: Fri, 13 Oct 2023 16:19:40 +0800 Subject: [PATCH] chore: replace babel-preset-base with rsbuild babel-preset (#4787) --- .changeset/forty-feet-explain.md | 10 + .../src/plugins/babel.ts | 15 +- packages/cli/babel-preset-base/.eslintrc.js | 9 - packages/cli/babel-preset-base/.npmignore | 31 - packages/cli/babel-preset-base/CHANGELOG.md | 1323 ----------------- packages/cli/babel-preset-base/LICENSE | 21 - .../@babel/helper-annotate-as-pure/index.d.ts | 1 - .../@babel/helper-annotate-as-pure/index.js | 1 - .../@babel/helper-annotate-as-pure/license | 22 - .../helper-annotate-as-pure/package.json | 1 - .../index.d.ts | 1 - .../index.js | 95 -- .../license | 22 - .../package.json | 1 - .../@babel/helper-module-imports/index.d.ts | 1 - .../@babel/helper-module-imports/index.js | 1 - .../@babel/helper-module-imports/license | 22 - .../@babel/helper-module-imports/package.json | 1 - .../@babel/helper-plugin-utils/index.d.ts | 1 - .../@babel/helper-plugin-utils/index.js | 1 - .../@babel/helper-plugin-utils/license | 22 - .../@babel/helper-plugin-utils/package.json | 1 - .../helper-validator-identifier/index.d.ts | 1 - .../helper-validator-identifier/index.js | 1 - .../helper-validator-identifier/license | 22 - .../helper-validator-identifier/package.json | 1 - .../plugin-proposal-decorators/index.d.ts | 1 - .../plugin-proposal-decorators/index.js | 23 - .../@babel/plugin-proposal-decorators/license | 22 - .../plugin-proposal-decorators/package.json | 1 - .../index.d.ts | 1 - .../index.js | 1 - .../license | 22 - .../package.json | 1 - .../index.d.ts | 1 - .../index.js | 1 - .../license | 22 - .../package.json | 1 - .../index.d.ts | 1 - .../index.js | 1 - .../plugin-proposal-pipeline-operator/license | 22 - .../package.json | 1 - .../index.d.ts | 1 - .../babel-plugin-dynamic-import-node/index.js | 1 - .../babel-plugin-dynamic-import-node/license | 21 - .../package.json | 1 - .../compiled/babel-plugin-import/index.d.ts | 1 - .../compiled/babel-plugin-import/index.js | 1 - .../compiled/babel-plugin-import/package.json | 1 - .../babel-plugin-styled-components/index.d.ts | 1 - .../babel-plugin-styled-components/index.js | 1 - .../package.json | 1 - packages/cli/babel-preset-base/jest.config.js | 7 - .../cli/babel-preset-base/modern.config.js | 5 - packages/cli/babel-preset-base/package.json | 74 - packages/cli/babel-preset-base/readme.md | 26 - .../src/babel-chain/babel.ts | 68 - .../src/babel-chain/index.ts | 4 - .../src/babel-chain/plain.ts | 194 --- .../src/babel-chain/plugin.ts | 114 -- .../src/babel-chain/preset.ts | 114 -- packages/cli/babel-preset-base/src/index.ts | 46 - packages/cli/babel-preset-base/src/plugins.ts | 123 -- packages/cli/babel-preset-base/src/presets.ts | 85 -- packages/cli/babel-preset-base/src/type.ts | 22 - .../cli/babel-preset-base/tests/.eslintrc.js | 6 - .../cli/babel-preset-base/tests/babel.test.ts | 104 -- .../cli/babel-preset-base/tests/plain.test.ts | 117 -- .../babel-preset-base/tests/plugin.test.ts | 77 - .../babel-preset-base/tests/preset.test.ts | 77 - .../cli/babel-preset-base/tests/tsconfig.json | 11 - packages/cli/babel-preset-base/tsconfig.json | 12 - .../server/src/dev-tools/register/index.ts | 2 - packages/server/utils/package.json | 7 +- .../server/utils/src/compilers/babel/index.ts | 46 +- .../utils/src/compilers/babel/preset/alias.ts | 2 +- .../utils/src/compilers/babel/preset/index.ts | 57 +- .../utils/src/compilers/babel/preset/types.ts | 11 - .../tests/__snapshots__/babel.test.ts.snap | 55 +- packages/server/utils/tests/babel.test.ts | 2 - .../toolkit/utils/src/cli/constants/index.ts | 17 - pnpm-lock.yaml | 129 +- scripts/prebundle/package.json | 12 - scripts/prebundle/src/constant.ts | 74 - 84 files changed, 92 insertions(+), 3388 deletions(-) create mode 100644 .changeset/forty-feet-explain.md delete mode 100644 packages/cli/babel-preset-base/.eslintrc.js delete mode 100644 packages/cli/babel-preset-base/.npmignore delete mode 100644 packages/cli/babel-preset-base/CHANGELOG.md delete mode 100644 packages/cli/babel-preset-base/LICENSE delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/license delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/license delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/license delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/license delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/license delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/license delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/license delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/license delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/license delete mode 100644 packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/license delete mode 100644 packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/babel-plugin-import/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/babel-plugin-import/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/babel-plugin-import/package.json delete mode 100644 packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/index.d.ts delete mode 100644 packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/index.js delete mode 100644 packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/package.json delete mode 100644 packages/cli/babel-preset-base/jest.config.js delete mode 100644 packages/cli/babel-preset-base/modern.config.js delete mode 100644 packages/cli/babel-preset-base/package.json delete mode 100644 packages/cli/babel-preset-base/readme.md delete mode 100644 packages/cli/babel-preset-base/src/babel-chain/babel.ts delete mode 100644 packages/cli/babel-preset-base/src/babel-chain/index.ts delete mode 100644 packages/cli/babel-preset-base/src/babel-chain/plain.ts delete mode 100644 packages/cli/babel-preset-base/src/babel-chain/plugin.ts delete mode 100644 packages/cli/babel-preset-base/src/babel-chain/preset.ts delete mode 100644 packages/cli/babel-preset-base/src/index.ts delete mode 100644 packages/cli/babel-preset-base/src/plugins.ts delete mode 100644 packages/cli/babel-preset-base/src/presets.ts delete mode 100644 packages/cli/babel-preset-base/src/type.ts delete mode 100644 packages/cli/babel-preset-base/tests/.eslintrc.js delete mode 100644 packages/cli/babel-preset-base/tests/babel.test.ts delete mode 100644 packages/cli/babel-preset-base/tests/plain.test.ts delete mode 100644 packages/cli/babel-preset-base/tests/plugin.test.ts delete mode 100644 packages/cli/babel-preset-base/tests/preset.test.ts delete mode 100644 packages/cli/babel-preset-base/tests/tsconfig.json delete mode 100644 packages/cli/babel-preset-base/tsconfig.json diff --git a/.changeset/forty-feet-explain.md b/.changeset/forty-feet-explain.md new file mode 100644 index 000000000000..5715a757e1de --- /dev/null +++ b/.changeset/forty-feet-explain.md @@ -0,0 +1,10 @@ +--- +'@modern-js/builder-rspack-provider': patch +'@modern-js/server': patch +'@modern-js/utils': patch +'@modern-js/server-utils': patch +--- + +chore: replace babel-preset-base with rsbuild babel-preset + +chore: 替换 babel-preset-base 为 rsbuild babel-preset diff --git a/packages/builder/builder-rspack-provider/src/plugins/babel.ts b/packages/builder/builder-rspack-provider/src/plugins/babel.ts index b0eacd3bee00..2178f2408420 100644 --- a/packages/builder/builder-rspack-provider/src/plugins/babel.ts +++ b/packages/builder/builder-rspack-provider/src/plugins/babel.ts @@ -7,8 +7,19 @@ import { import { cloneDeep, isEqual } from '@modern-js/utils/lodash'; import { BuilderPlugin, NormalizedConfig } from '../types'; import type { BabelOptions } from '@modern-js/types'; -// eslint-disable-next-line @typescript-eslint/no-restricted-imports -import { DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS } from '@modern-js/utils'; + +/** + * The `@babel/preset-typescript` default options. + */ +export const DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = { + allowNamespaces: true, + allExtensions: true, + allowDeclareFields: true, + // aligns Babel's behavior with TypeScript's default behavior. + // https://babeljs.io/docs/en/babel-preset-typescript#optimizeconstenums + optimizeConstEnums: true, + isTSX: true, +}; export const builderPluginBabel = (): BuilderPlugin => ({ name: 'builder-plugin-babel', diff --git a/packages/cli/babel-preset-base/.eslintrc.js b/packages/cli/babel-preset-base/.eslintrc.js deleted file mode 100644 index 1594be71aa90..000000000000 --- a/packages/cli/babel-preset-base/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - root: true, - extends: ['@modern-js'], - ignorePatterns: ['compiled/'], - parserOptions: { - tsconfigRootDir: __dirname, - project: ['./tsconfig.json'], - }, -}; diff --git a/packages/cli/babel-preset-base/.npmignore b/packages/cli/babel-preset-base/.npmignore deleted file mode 100644 index 353fddf17262..000000000000 --- a/packages/cli/babel-preset-base/.npmignore +++ /dev/null @@ -1,31 +0,0 @@ -.DS_Store - -.pnp -.pnp.js -.env.local -.env.*.local -*.log* - -node_modules/ -*.tsbuildinfo -.eslintcache - -coverage/ -output/ -output_resource/ -tests/ - -.vscode/**/* -!.vscode/settings.json -!.vscode/extensions.json -.idea/ - -src/ - -modern.config.* -jest.config.js -.eslintrc.js -.eslintrc -tsconfig.json -CHANGELOG.md - diff --git a/packages/cli/babel-preset-base/CHANGELOG.md b/packages/cli/babel-preset-base/CHANGELOG.md deleted file mode 100644 index dabb15a08e1a..000000000000 --- a/packages/cli/babel-preset-base/CHANGELOG.md +++ /dev/null @@ -1,1323 +0,0 @@ -# @modern-js/babel-preset-base - -## 2.36.0 - -### Patch Changes - -- Updated dependencies [3473bee] -- Updated dependencies [b98f8aa] -- Updated dependencies [eb602d2] - - @modern-js/utils@2.36.0 - -## 2.35.1 - -### Patch Changes - -- Updated dependencies [ea3fe18] -- Updated dependencies [9dd3151] -- Updated dependencies [4980480] -- Updated dependencies [6a1d46e] - - @modern-js/utils@2.35.1 - -## 2.35.0 - -### Patch Changes - -- Updated dependencies [15b834f] - - @modern-js/utils@2.35.0 - -## 2.34.0 - -### Patch Changes - -- Updated dependencies [a77b82a] -- Updated dependencies [c8b448b] - - @modern-js/utils@2.34.0 - -## 2.33.1 - -### Patch Changes - -- @modern-js/utils@2.33.1 - -## 2.33.0 - -### Patch Changes - -- Updated dependencies [fd82137] -- Updated dependencies [bc1f8da] - - @modern-js/utils@2.33.0 - -## 2.32.1 - -### Patch Changes - -- @modern-js/utils@2.32.1 - -## 2.32.0 - -### Patch Changes - -- Updated dependencies [e5a3fb4] -- Updated dependencies [6076166] -- Updated dependencies [a030aff] -- Updated dependencies [3c91100] -- Updated dependencies [5255eba] - - @modern-js/utils@2.32.0 - -## 2.31.2 - -### Patch Changes - -- Updated dependencies [15d30abdc66] - - @modern-js/utils@2.31.2 - -## 2.31.1 - -### Patch Changes - -- @modern-js/utils@2.31.1 - -## 2.31.0 - -### Patch Changes - -- Updated dependencies [1882366] - - @modern-js/utils@2.31.0 - -## 2.30.0 - -### Patch Changes - -- cc5f49e: feat(builder): add performance.transformLodash config - - feat(builder): 新增 performance.transformLodash 配置 - - - @modern-js/utils@2.30.0 - -## 2.29.0 - -### Patch Changes - -- Updated dependencies [e6b5355] -- Updated dependencies [93db783] -- Updated dependencies [cba7675] -- Updated dependencies [99052ea] -- Updated dependencies [1d71d2e] - - @modern-js/utils@2.29.0 - -## 2.28.0 - -### Patch Changes - -- Updated dependencies [00b58a7] - - @modern-js/utils@2.28.0 - -## 2.27.0 - -### Patch Changes - -- 8322a51: chore: migrate packages from tsc to module-lib build - - chore: 将使用 tsc 的包迁移到 module-lib 构建 - -- Updated dependencies [91d14b8] -- Updated dependencies [6d7104d] - - @modern-js/utils@2.27.0 - -## 2.26.0 - -### Patch Changes - -- @modern-js/utils@2.26.0 - -## 2.25.2 - -### Patch Changes - -- Updated dependencies [63d8247] -- Updated dependencies [6651684] -- Updated dependencies [272646c] -- Updated dependencies [358ed24] - - @modern-js/utils@2.25.2 - -## 2.25.1 - -### Patch Changes - -- Updated dependencies [9f78d0c] - - @modern-js/utils@2.25.1 - -## 2.25.0 - -### Patch Changes - -- Updated dependencies [5732c6a] - - @modern-js/utils@2.25.0 - -## 2.24.0 - -### Patch Changes - -- 36f5bdf: fix(plugin-vue): remove react-related babel plugins - - fix(plugin-vue): 移除 react 相关的 babel 插件 - -- Updated dependencies [c882fbd] -- Updated dependencies [4a82c3b] - - @modern-js/utils@2.24.0 - -## 2.23.1 - -### Patch Changes - -- Updated dependencies [f08bbfc] -- Updated dependencies [a6b313a] -- Updated dependencies [8f2cab0] - - @modern-js/utils@2.23.1 - -## 2.23.0 - -### Patch Changes - -- 7e6fb5f: chore: publishConfig add provenance config - - chore: publishConfig 增加 provenance 配置 - -- Updated dependencies [7e6fb5f] -- Updated dependencies [a7a7ad7] -- Updated dependencies [6dec7c2] -- Updated dependencies [c3216b5] - - @modern-js/utils@2.23.0 - -## 2.22.1 - -### Patch Changes - -- Updated dependencies [e2848a2] -- Updated dependencies [d4045ed] - - @modern-js/utils@2.22.1 - -## 2.22.0 - -### Patch Changes - -- dc45896: fix(runtime): babel-plugin-styled-components not work - - fix(runtime): 修复 babel-plugin-styled-components 不生效的问题 - -- Updated dependencies [3d48836] -- Updated dependencies [5050e8e] - - @modern-js/utils@2.22.0 - -## 2.21.1 - -### Patch Changes - -- @modern-js/utils@2.21.1 - -## 2.21.0 - -### Patch Changes - -- 26dcf3a: chore: bump typescript to v5 in devDependencies - - chore: 升级 devDependencies 中的 typescript 版本到 v5 - -- ad78387: chore(deps): bump babel-related dependencies to latest version - - chore(deps): 升级 babel 相关依赖到最新版本 - -- Updated dependencies [e81eeaf] -- Updated dependencies [26dcf3a] -- Updated dependencies [056627f] -- Updated dependencies [0fc15ca] -- Updated dependencies [43b4e83] -- Updated dependencies [ad78387] - - @modern-js/utils@2.21.0 - -## 2.20.0 - -### Patch Changes - -- Updated dependencies [3c4e0a5] -- Updated dependencies [6b9d90a] - - @modern-js/utils@2.20.0 - -## 2.19.1 - -### Patch Changes - -- @modern-js/utils@2.19.1 - -## 2.19.0 - -### Patch Changes - -- Updated dependencies [1134fe2] - - @modern-js/utils@2.19.0 - -## 2.18.1 - -### Patch Changes - -- @modern-js/utils@2.18.1 - -## 2.18.0 - -### Patch Changes - -- @modern-js/utils@2.18.0 - -## 2.17.1 - -### Patch Changes - -- @modern-js/utils@2.17.1 - -## 2.17.0 - -### Patch Changes - -- @modern-js/utils@2.17.0 - -## 2.16.0 - -### Patch Changes - -- 4e876ab: chore: package.json include the monorepo-relative directory - - chore: 在 package.json 中声明 monorepo 的子路径 - -- Updated dependencies [5954330] -- Updated dependencies [7596520] -- Updated dependencies [4e876ab] - - @modern-js/utils@2.16.0 - -## 2.15.0 - -### Patch Changes - -- @modern-js/utils@2.15.0 - -## 2.14.0 - -### Patch Changes - -- Updated dependencies [4779152] -- Updated dependencies [9321bef] -- Updated dependencies [9b45c58] -- Updated dependencies [52d0cb1] -- Updated dependencies [60a81d0] -- Updated dependencies [dacef96] -- Updated dependencies [16399fd] - - @modern-js/utils@2.14.0 - -## 2.13.4 - -### Patch Changes - -- @modern-js/utils@2.13.4 - -## 2.13.3 - -### Patch Changes - -- @modern-js/utils@2.13.3 - -## 2.13.2 - -### Patch Changes - -- @modern-js/utils@2.13.2 - -## 2.13.1 - -### Patch Changes - -- @modern-js/utils@2.13.1 - -## 2.13.0 - -### Patch Changes - -- @modern-js/utils@2.13.0 - -## 2.12.0 - -### Patch Changes - -- Updated dependencies [c2ca6c8] -- Updated dependencies [6d86e34] - - @modern-js/utils@2.12.0 - -## 2.11.0 - -### Minor Changes - -- a8c08c3: feat: 添加 `source.transformImoprt` - - feat: add `source.transformImoprt` - -### Patch Changes - -- cfb058f: fix(builder): remove duplicated babel-plugin-import - - fix(builder): 移除重复注册的 babel-plugin-import - -- 274b2e5: fix: For rspack-provider can use `tools.babel` configuration, inline the `@babel/preset-typescript` to handle ts syntax in rspack-provider. - fix: 为了 rspack-provider 能给使用 `tools.babel` 配置项,将 `@babel/preset-typescript` 内置进 rspack-provider 去处理 ts 语法。 -- Updated dependencies [cfb058f] -- Updated dependencies [0bd018b] -- Updated dependencies [5d624fd] -- Updated dependencies [e2466a1] -- Updated dependencies [02bb383] -- Updated dependencies [381a3b9] -- Updated dependencies [7a60f10] -- Updated dependencies [274b2e5] -- Updated dependencies [b9e1c54] - - @modern-js/utils@2.11.0 - -## 2.10.0 - -### Patch Changes - -- 0da32d0: chore: upgrade jest and puppeteer - chore: 升级 jest 和 puppeteer 到 latest -- Updated dependencies [0da32d0] -- Updated dependencies [fbefa7e] -- Updated dependencies [4d54233] -- Updated dependencies [6db4864] - - @modern-js/utils@2.10.0 - -## 2.9.0 - -### Patch Changes - -- @modern-js/utils@2.9.0 - -## 2.8.0 - -### Patch Changes - -- 2c1151271d: fix(builder): fix incorrect browserslist config - - fix(builder): 修复错误的 browserslist 配置 - -- Updated dependencies [1104a9f18b] -- Updated dependencies [1f6ca2c7fb] - - @modern-js/utils@2.8.0 - -## 2.7.0 - -### Patch Changes - -- 7fff9020e1: chore: make file naming consistent - - chore: 统一文件命名为小驼峰格式 - -- 1eea234fdd: chore: make test files naming consistent - - chore: 统一测试文件命名为小驼峰格式 - -- Updated dependencies [0f15fc597c] -- Updated dependencies [dcad887024] -- Updated dependencies [a4672f7c16] -- Updated dependencies [7fff9020e1] -- Updated dependencies [84bfb439b8] - - @modern-js/utils@2.7.0 - -## 2.6.0 - -### Patch Changes - -- 44f1adc: fix: windows path compat in modifyPresetOptions - - fix: 在 modifyPresetOptions 方法中兼容 windows 路径 - -- Updated dependencies [e1f799e] -- Updated dependencies [7915ab3] -- Updated dependencies [0fe658a] - - @modern-js/utils@2.6.0 - -## 2.5.0 - -### Patch Changes - -- 30614fa: chore: modify package.json entry fields and build config - chore: 更改 package.json entry 字段以及构建配置 -- Updated dependencies [30614fa] -- Updated dependencies [1b0ce87] -- Updated dependencies [11c053b] - - @modern-js/utils@2.5.0 - -## 2.4.0 - -### Patch Changes - -- Updated dependencies [98a2733] -- Updated dependencies [8c2db5f] - - @modern-js/utils@2.4.0 - -## 2.3.0 - -### Patch Changes - -- Updated dependencies [fd5a3ed] -- Updated dependencies [6ca1c0b] -- Updated dependencies [89b6739] - - @modern-js/utils@2.3.0 - -## 2.2.0 - -### Patch Changes - -- 1b273d2: feat(babel-plugin-base): compatible with antd v5 - - feat(babel-plugin-base): 适配 antd v5,不再注册 babel-plugin-import - -- Updated dependencies [49eff0c] - - @modern-js/utils@2.2.0 - -## 2.1.0 - -### Patch Changes - -- Updated dependencies [837620c] -- Updated dependencies [8a9482c] - - @modern-js/utils@2.1.0 - -## 2.0.2 - -### Patch Changes - -- @modern-js/utils@2.0.2 - -## 2.0.1 - -### Patch Changes - -- @modern-js/utils@2.0.1 - -## 2.0.0 - -### Major Changes - -- dda38c9c3e: chore: v2 - -### Patch Changes - -- Updated dependencies [edd1cfb1af] -- Updated dependencies [dda38c9c3e] -- Updated dependencies [ffb2ed4] -- Updated dependencies [bbe4c4ab64] - - @modern-js/utils@2.0.0 - -## 2.0.0-beta.7 - -### Major Changes - -- dda38c9c3e: chore: v2 - -### Patch Changes - -- Updated dependencies [edd1cfb1af] -- Updated dependencies [dda38c9c3e] -- Updated dependencies [bbe4c4ab64] - - @modern-js/utils@2.0.0-beta.7 - -## 2.0.0-beta.6 - -### Major Changes - -- dda38c9c3e: chore: v2 - -### Patch Changes - -- 27c0151e8c: refactor: remove @babel/plugin-proposal-function-bind - - refactor: 移除 @babel/plugin-proposal-function-bind - -- 67472ca1cc: fix: move babel-plugin-marcos to plugin-tailwindcss - - fix: 将 babel-plugin-marcos 依赖移动到 plugin-tailwindcss 中 - -- ea7cf06257: chore: bump webpack/babel-loader/postcss-loader/tsconfig-paths - - chore: 升级 webpack/babel-loader/postcss-loader/tsconfig-paths 版本 - -- Updated dependencies [7879e8f711] -- Updated dependencies [6aca875011] -- Updated dependencies [2e6031955e] -- Updated dependencies [7b7d12cf8f] -- Updated dependencies [7efeed4] -- Updated dependencies [92f0eade39] -- Updated dependencies [edd1cfb1af] -- Updated dependencies [cc971eabfc] -- Updated dependencies [5b9049f2e9] -- Updated dependencies [92004d1906] -- Updated dependencies [b8bbe036c7] -- Updated dependencies [d5a31df781] -- Updated dependencies [dda38c9c3e] -- Updated dependencies [3bbea92b2a] -- Updated dependencies [b710adb843] -- Updated dependencies [ea7cf06257] -- Updated dependencies [bbe4c4ab64] -- Updated dependencies [e4558a0bc4] -- Updated dependencies [abf3421a75] -- Updated dependencies [543be9558e] -- Updated dependencies [14b712da84] - - @modern-js/utils@2.0.0-beta.6 - -## 2.0.0-beta.4 - -### Major Changes - -- dda38c9c3e: chore: v2 - -### Patch Changes - -- 27c0151e8c: refactor: remove @babel/plugin-proposal-function-bind - - refactor: 移除 @babel/plugin-proposal-function-bind - -- 67472ca: fix: move babel-plugin-marcos to plugin-tailwindcss - - fix: 将 babel-plugin-marcos 依赖移动到 plugin-tailwindcss 中 - -- ea7cf06: chore: bump webpack/babel-loader/postcss-loader/tsconfig-paths - - chore: 升级 webpack/babel-loader/postcss-loader/tsconfig-paths 版本 - -- Updated dependencies [7879e8f] -- Updated dependencies [6aca875] -- Updated dependencies [2e6031955e] -- Updated dependencies [7b7d12c] -- Updated dependencies [92f0eade39] -- Updated dependencies [edd1cfb1af] -- Updated dependencies [cc971eabfc] -- Updated dependencies [5b9049f2e9] -- Updated dependencies [92004d1906] -- Updated dependencies [b8bbe036c7] -- Updated dependencies [d5a31df781] -- Updated dependencies [dda38c9c3e] -- Updated dependencies [3bbea92b2a] -- Updated dependencies [b710adb843] -- Updated dependencies [ea7cf06] -- Updated dependencies [bbe4c4a] -- Updated dependencies [e4558a0] -- Updated dependencies [abf3421a75] -- Updated dependencies [543be9558e] -- Updated dependencies [14b712da84] - - @modern-js/utils@2.0.0-beta.4 - -## 2.0.0-beta.3 - -### Major Changes - -- dda38c9c3e: chore: v2 - -### Patch Changes - -- 27c0151e8c: refactor: remove @babel/plugin-proposal-function-bind - - refactor: 移除 @babel/plugin-proposal-function-bind - -- ea7cf06: chore: bump webpack/babel-loader/postcss-loader/tsconfig-paths - - chore: 升级 webpack/babel-loader/postcss-loader/tsconfig-paths 版本 - -- Updated dependencies [6aca875] -- Updated dependencies [2e60319] -- Updated dependencies [92f0eade39] -- Updated dependencies [edd1cfb1af] -- Updated dependencies [cc971eabfc] -- Updated dependencies [5b9049f2e9] -- Updated dependencies [92004d1906] -- Updated dependencies [b8bbe036c7] -- Updated dependencies [d5a31df781] -- Updated dependencies [dda38c9c3e] -- Updated dependencies [3bbea92b2a] -- Updated dependencies [b710adb] -- Updated dependencies [ea7cf06] -- Updated dependencies [bbe4c4a] -- Updated dependencies [e4558a0] -- Updated dependencies [abf3421a75] -- Updated dependencies [543be9558e] -- Updated dependencies [14b712da84] - - @modern-js/utils@2.0.0-beta.3 - -## 2.0.0-beta.2 - -### Major Changes - -- dda38c9c3e: chore: v2 - -### Patch Changes - -- 27c0151e8c: refactor: remove @babel/plugin-proposal-function-bind - - refactor: 移除 @babel/plugin-proposal-function-bind - -- Updated dependencies [92f0ead] -- Updated dependencies [edd1cfb1af] -- Updated dependencies [cc971eabfc] -- Updated dependencies [5b9049f2e9] -- Updated dependencies [92004d1] -- Updated dependencies [b8bbe036c7] -- Updated dependencies [d5a31df781] -- Updated dependencies [dda38c9c3e] -- Updated dependencies [3bbea92b2a] -- Updated dependencies [abf3421a75] -- Updated dependencies [543be9558e] -- Updated dependencies [14b712da84] - - @modern-js/utils@2.0.0-beta.2 - -## 2.0.0-beta.1 - -### Major Changes - -- dda38c9: chore: v2 - -### Patch Changes - -- 27c0151e8c: refactor: remove @babel/plugin-proposal-function-bind - - refactor: 移除 @babel/plugin-proposal-function-bind - -- Updated dependencies [92f0ead] -- Updated dependencies [edd1cfb1af] -- Updated dependencies [cc971eabfc] -- Updated dependencies [5b9049f] -- Updated dependencies [92004d1] -- Updated dependencies [b8bbe036c7] -- Updated dependencies [d5a31df781] -- Updated dependencies [dda38c9] -- Updated dependencies [3bbea92b2a] -- Updated dependencies [abf3421] -- Updated dependencies [543be9558e] -- Updated dependencies [14b712d] - - @modern-js/utils@2.0.0-beta.1 - -## 2.0.0-beta.0 - -### Major Changes - -- dda38c9: chore: v2 - -### Patch Changes - -- 27c0151e8: refactor: remove @babel/plugin-proposal-function-bind - - refactor: 移除 @babel/plugin-proposal-function-bind - -- Updated dependencies [edd1cfb1a] -- Updated dependencies [cc971eabf] -- Updated dependencies [5b9049f] -- Updated dependencies [b8bbe036c] -- Updated dependencies [d5a31df78] -- Updated dependencies [dda38c9] -- Updated dependencies [3bbea92b2] -- Updated dependencies [abf3421] -- Updated dependencies [543be95] -- Updated dependencies [14b712d] - - @modern-js/utils@2.0.0-beta.0 - -## 1.21.2 - -### Patch Changes - -- @modern-js/utils@1.21.2 - -## 1.21.1 - -### Patch Changes - -- @modern-js/utils@1.21.1 - -## 1.21.0 - -### Patch Changes - -- @modern-js/utils@1.21.0 - -## 1.20.1 - -### Patch Changes - -- Updated dependencies [49515c5] - - @modern-js/utils@1.20.1 - -## 1.20.0 - -### Patch Changes - -- Updated dependencies [d5d570b] -- Updated dependencies [4ddc185] -- Updated dependencies [df8ee7e] -- Updated dependencies [8c05089] - - @modern-js/utils@1.20.0 - -## 1.19.0 - -### Patch Changes - -- @modern-js/utils@1.19.0 - -## 1.18.1 - -### Patch Changes - -- Updated dependencies [9fcfbd4] -- Updated dependencies [6c2c745] - - @modern-js/utils@1.18.1 - -## 1.18.0 - -### Patch Changes - -- 968be1b: feat: add overrideBrowserslist option - - feat: 新增 overrideBrowserslist 选项 - -- Updated dependencies [8280920] -- Updated dependencies [5227370] -- Updated dependencies [7928bae] - - @modern-js/utils@1.18.0 - -## 1.17.0 - -### Patch Changes - -- Updated dependencies [1b9176f] -- Updated dependencies [77d3a38] -- Updated dependencies [151329d] -- Updated dependencies [5af9472] -- Updated dependencies [6b6a534] -- Updated dependencies [6b43a2b] -- Updated dependencies [a7be124] -- Updated dependencies [31547b4] - - @modern-js/utils@1.17.0 - -## 1.16.0 - -### Patch Changes - -- Updated dependencies [641592f52] -- Updated dependencies [3904b30a5] -- Updated dependencies [1100dd58c] -- Updated dependencies [e04e6e76a] -- Updated dependencies [81c66e4a4] -- Updated dependencies [2c305b6f5] - - @modern-js/utils@1.16.0 - -## 1.15.0 - -### Patch Changes - -- Updated dependencies [8658a78] -- Updated dependencies [05d4a4f] -- Updated dependencies [ad05af9] -- Updated dependencies [5d53d1c] -- Updated dependencies [37cd159] - - @modern-js/utils@1.15.0 - -## 1.6.0 - -### Minor Changes - -- 7b9067f: add babel plugin for builder - -### Patch Changes - -- 22f4dca: chore: move pre-bundled ajv to @modern-js/utils - - chore: 预打包的 ajv 产物移动至 @modern-js/utils 内 - -- Updated dependencies [79e83ef] -- Updated dependencies [22f4dca] -- Updated dependencies [7b9067f] - - @modern-js/utils@1.9.0 - -## 1.5.0 - -### Minor Changes - -- 33cebd2: chore(babel-chain): merge `@modern-js/babel-chain` to `@modern-js/babel-preset-base` - - chore(babel-chain): 合并 `@modern-js/babel-chain` 到 `@modern-js/babel-preset-base` - -### Patch Changes - -- @modern-js/utils@1.7.12 - -## 1.4.4 - -### Patch Changes - -- 3050acc: change babel-plugin-macro babel config -- a90bc96: perf(babel): skip babel-plugin-import if package not installed -- Updated dependencies [a90bc96] - - @modern-js/utils@1.7.9 - -## 1.4.3 - -### Patch Changes - -- 8d0eb81f5: change babel-plugin-macro babel config - -## 1.4.2 - -### Patch Changes - -- 073e9ad78: feat(webpack): improve utils of tools.webpack -- Updated dependencies [63c354ad5] -- Updated dependencies [073e9ad78] -- Updated dependencies [f4a7d49e1] - - @modern-js/utils@1.7.8 - -## 1.4.1 - -### Patch Changes - -- 8c9ad1749: feat(babel-preset-base): prebundle babel plugins -- b7a1cea52: feat: support utils in tools.babel -- fde14696e: node browserlist use v12 -- Updated dependencies [9377d2d9d] -- Updated dependencies [8c9ad1749] - - @modern-js/utils@1.7.7 - -## 1.4.0 - -### Minor Changes - -- a1198d509: fix: regenerator-runtime is bundled twice - -### Patch Changes - -- a1198d509: feat: bump babel 7.18.0 -- Updated dependencies [a1198d509] - - @modern-js/babel-chain@1.2.5 - -## 1.3.2 - -### Patch Changes - -- d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore -- 1a30be07b: fix: remove some babel plugins that provided by @babel/preset-env -- Updated dependencies [d32f35134] -- Updated dependencies [6ae4a34ae] -- Updated dependencies [b80229c79] -- Updated dependencies [948cc4436] - - @modern-js/babel-chain@1.2.3 - - @modern-js/utils@1.7.3 - -## 1.3.1 - -### Patch Changes - -- cd7346b0d: fix some peer dependencies problem & change shell log -- 0e0537005: fix: unlock @babel/core version -- 69a728375: fix: remove exports.jsnext:source after publish -- 0f86e133b: fix react & react-dom types problem -- Updated dependencies [cd7346b0d] -- Updated dependencies [69a728375] - - @modern-js/utils@1.7.2 - -## 1.3.0 - -### Minor Changes - -- 0ee4bb4e: feat: prebundle webpack loaders and plugins - -### Patch Changes - -- Updated dependencies [0ee4bb4e] -- Updated dependencies [6fa74d5f] - - @modern-js/utils@1.7.0 - -## 1.2.5 - -### Patch Changes - -- 6cffe99d: chore: - remove react eslint rules for `modern-js` rule set. - add .eslintrc for each package to speed up linting -- 04ae5262: chore: bump @modern-js/utils to v1.4.1 in dependencies -- 60f7d8bf: feat: add tests dir to npmignore -- Updated dependencies [b8599d09] -- Updated dependencies [6cffe99d] -- Updated dependencies [60f7d8bf] -- Updated dependencies [3bf4f8b0] - - @modern-js/utils@1.5.0 - - @modern-js/babel-chain@1.2.2 - -## 1.2.4 - -### Patch Changes - -- 17d0cc46: feat: prebundle lodash to @modern-js/utils/lodash -- Updated dependencies [77ff9754] -- Updated dependencies [d2d1d6b2] -- Updated dependencies [07a4887e] -- Updated dependencies [ea2ae711] -- Updated dependencies [17d0cc46] -- Updated dependencies [d2d1d6b2] - - @modern-js/utils@1.4.0 - -## 1.2.3 - -### Patch Changes - -- 969f172f: support tools.styledComponents for module-tools,support close tsc process with disbaleTsChecker -- Updated dependencies [4c792f68] -- Updated dependencies [a7f42f48] - - @modern-js/utils@1.3.3 - -## 1.2.2 - -### Patch Changes - -- e62c4efd: fix error typo for 'styledComponents' - -## 1.2.1 - -### Patch Changes - -- 83166714: change .npmignore -- Updated dependencies [83166714] - - @modern-js/babel-chain@1.2.1 - - @modern-js/utils@1.2.2 - -## 1.2.0 - -### Minor Changes - -- cfe11628: Make Modern.js self bootstraping - -### Patch Changes - -- Updated dependencies [2da09c69] -- Updated dependencies [c3d46ee4] -- Updated dependencies [cfe11628] - - @modern-js/utils@1.2.0 - - @modern-js/babel-chain@1.2.0 - -## 1.1.2 - -### Patch Changes - -- add isTSX config - -## 1.1.1 - -### Patch Changes - -- ba51d68b: remove transform-typescript babel plugin -- 0fa83663: support more .env files -- Updated dependencies [0fa83663] -- Updated dependencies [f594fbc8] - - @modern-js/babel-chain@1.1.1 - - @modern-js/utils@1.1.2 - -## 1.1.0 - -### Minor Changes - -- 96119db2: Relese v1.1.0### Patch Changes - -- c503176f: fix babel error when use 'declare class' syntax - - Related links: - - - https://github.com/babel/babel/issues/13853#issuecomment-944838841 - -- Updated dependencies [96119db2] - - @modern-js/babel-chain@1.1.0 - - @modern-js/utils@1.1.0 - -## 1.0.0 - -### Patch Changes - -- 224f7fe: fix server route match -- 30ac27c: feat: add generator package description -- 0fd196e: feat: fix bugs -- 204c626: feat: initial -- 63be0a5: fix: #118 #104 -- Updated dependencies [224f7fe] -- Updated dependencies [30ac27c] -- Updated dependencies [0fd196e] -- Updated dependencies [204c626] -- Updated dependencies [63be0a5] - - @modern-js/babel-chain@1.0.0 - - @modern-js/utils@1.0.0 - -## 1.0.0-rc.23 - -### Patch Changes - -- 224f7fe: fix server route match -- 30ac27c: feat: add generator package description -- 0fd196e: feat: fix bugs -- 204c626: feat: initial -- 63be0a5: fix: #118 #104 -- Updated dependencies [224f7fe] -- Updated dependencies [30ac27c] -- Updated dependencies [0fd196e] -- Updated dependencies [204c626] -- Updated dependencies [63be0a5] - - @modern-js/babel-chain@1.0.0-rc.23 - - @modern-js/utils@1.0.0-rc.23 - -## 1.0.0-rc.22 - -### Patch Changes - -- 224f7fe: fix server route match -- 30ac27c: feat: add generator package description -- 0fd196e: feat: fix bugs -- 204c626: feat: initial -- 63be0a5: fix: #118 #104 -- Updated dependencies [224f7fe] -- Updated dependencies [30ac27c] -- Updated dependencies [0fd196e] -- Updated dependencies [204c626] -- Updated dependencies [63be0a5] - - @modern-js/babel-chain@1.0.0-rc.22 - - @modern-js/utils@1.0.0-rc.22 - -## 1.0.0-rc.21 - -### Patch Changes - -- 224f7fe: fix server route match -- 30ac27c: feat: add generator package description -- 0fd196e: feat: fix bugs -- 204c626: feat: initial -- 63be0a5: fix: #118 #104 -- Updated dependencies [224f7fe] -- Updated dependencies [30ac27c] -- Updated dependencies [0fd196e] -- Updated dependencies [204c626] -- Updated dependencies [63be0a5] - - @modern-js/babel-chain@1.0.0-rc.21 - - @modern-js/utils@1.0.0-rc.21 - -## 1.0.0-rc.20 - -### Patch Changes - -- 224f7fe: fix server route match -- 30ac27c: feat: add generator package description -- feat: fix bugs -- 204c626: feat: initial -- 63be0a5: fix: #118 #104 -- Updated dependencies [224f7fe] -- Updated dependencies [30ac27c] -- Updated dependencies [undefined] -- Updated dependencies [204c626] -- Updated dependencies [63be0a5] - - @modern-js/babel-chain@1.0.0-rc.20 - - @modern-js/utils@1.0.0-rc.20 - -## 1.0.0-rc.19 - -### Patch Changes - -- 224f7fe: fix server route match -- 30ac27c: feat: add generator package description -- 204c626: feat: initial -- 63be0a5: fix: #118 #104 -- Updated dependencies [224f7fe] -- Updated dependencies [30ac27c] -- Updated dependencies [204c626] -- Updated dependencies [63be0a5] - - @modern-js/babel-chain@1.0.0-rc.19 - - @modern-js/utils@1.0.0-rc.19 - -## 1.0.0-rc.18 - -### Patch Changes - -- 224f7fe: fix server route match -- 30ac27c: feat: add generator package description -- 204c626: feat: initial -- 63be0a5: fix: #118 #104 -- Updated dependencies [224f7fe] -- Updated dependencies [30ac27c] -- Updated dependencies [204c626] -- Updated dependencies [63be0a5] - - @modern-js/babel-chain@1.0.0-rc.18 - - @modern-js/utils@1.0.0-rc.18 - -## 1.0.0-rc.17 - -### Patch Changes - -- 224f7fe: fix server route match -- 30ac27c: feat: add generator package description -- 204c626: feat: initial -- fix: #118 #104 -- Updated dependencies [224f7fe] -- Updated dependencies [30ac27c] -- Updated dependencies [204c626] -- Updated dependencies [undefined] - - @modern-js/babel-chain@1.0.0-rc.17 - - @modern-js/utils@1.0.0-rc.17 - -## 1.0.0-rc.16 - -### Patch Changes - -- 224f7fe: fix server route match -- 30ac27c: feat: add generator package description -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [30ac27c] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.16 - - @modern-js/utils@1.0.0-rc.16 - -## 1.0.0-rc.15 - -### Patch Changes - -- 224f7fe: fix server route match -- 30ac27c: feat: add generator package description -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [30ac27c] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.15 - - @modern-js/utils@1.0.0-rc.15 - -## 1.0.0-rc.14 - -### Patch Changes - -- 224f7fe: fix server route match -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.14 - - @modern-js/utils@1.0.0-rc.14 - -## 1.0.0-rc.13 - -### Patch Changes - -- 224f7fe: fix server route match -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.13 - - @modern-js/utils@1.0.0-rc.13 - -## 1.0.0-rc.12 - -### Patch Changes - -- 224f7fe: fix server route match -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.12 - - @modern-js/utils@1.0.0-rc.12 - -## 1.0.0-rc.11 - -### Patch Changes - -- 224f7fe: fix server route match -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.11 - - @modern-js/utils@1.0.0-rc.11 - -## 1.0.0-rc.10 - -### Patch Changes - -- 224f7fe: fix server route match -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.10 - - @modern-js/utils@1.0.0-rc.10 - -## 1.0.0-rc.9 - -### Patch Changes - -- 224f7fe: fix server route match -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.9 - - @modern-js/utils@1.0.0-rc.9 - -## 1.0.0-rc.8 - -### Patch Changes - -- 224f7fe: fix server route match -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.8 - - @modern-js/utils@1.0.0-rc.8 - -## 1.0.0-rc.7 - -### Patch Changes - -- 224f7fe: fix server route match -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.7 - - @modern-js/utils@1.0.0-rc.7 - -## 1.0.0-rc.6 - -### Patch Changes - -- 224f7fe: fix server route match -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.6 - - @modern-js/utils@1.0.0-rc.6 - -## 1.0.0-rc.5 - -### Patch Changes - -- 224f7fe: fix server route match -- 204c626: feat: initial -- Updated dependencies [224f7fe] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.5 - - @modern-js/utils@1.0.0-rc.5 - -## 1.0.0-rc.4 - -### Patch Changes - -- fix server route match -- 204c626: feat: initial -- Updated dependencies [undefined] -- Updated dependencies [204c626] - - @modern-js/babel-chain@1.0.0-rc.4 - - @modern-js/utils@1.0.0-rc.4 - -## 1.0.0-rc.3 - -### Patch Changes - -- feat: initial -- Updated dependencies [undefined] - - @modern-js/babel-chain@1.0.0-rc.3 - - @modern-js/utils@1.0.0-rc.3 diff --git a/packages/cli/babel-preset-base/LICENSE b/packages/cli/babel-preset-base/LICENSE deleted file mode 100644 index 39e3c5971226..000000000000 --- a/packages/cli/babel-preset-base/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021-present Modern.js - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/index.d.ts b/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/index.js b/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/index.js deleted file mode 100644 index 8572024316da..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={638:e=>{e.exports=require("@babel/types")}};var r={};function __nccwpck_require__(_){var t=r[_];if(t!==undefined){return t.exports}var a=r[_]={exports:{}};var n=true;try{e[_](a,a.exports,__nccwpck_require__);n=false}finally{if(n)delete r[_]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var _={};(()=>{var e=_;Object.defineProperty(e,"__esModule",{value:true});e["default"]=annotateAsPure;var r=__nccwpck_require__(638);const{addComment:t}=r;const a="#__PURE__";const isPureAnnotated=({leadingComments:e})=>!!e&&e.some((e=>/[@#]__PURE__/.test(e.value)));function annotateAsPure(e){const r=e["node"]||e;if(isPureAnnotated(r)){return}t(r,"leading",a)}})();module.exports=_})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/license b/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/license deleted file mode 100644 index f31575ec773b..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/license +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/package.json b/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/package.json deleted file mode 100644 index 0c8e7b443deb..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-annotate-as-pure/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@babel/helper-annotate-as-pure","author":"The Babel Team (https://babel.dev/team)","version":"7.22.5","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/index.d.ts b/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/index.js b/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/index.js deleted file mode 100644 index f241cdd68c44..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/index.js +++ /dev/null @@ -1,95 +0,0 @@ -(()=>{var e={641:(e,t)=>{t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var s=256;var n=Number.MAX_SAFE_INTEGER||9007199254740991;var i=16;var o=s-6;var a=t.re=[];var l=t.safeRe=[];var p=t.src=[];var c=t.tokens={};var u=0;function tok(e){c[e]=u++}var d="[a-zA-Z0-9-]";var f=[["\\s",1],["\\d",s],[d,o]];function makeSafeRe(e){for(var t=0;t)?=?)";tok("XRANGEIDENTIFIERLOOSE");p[c.XRANGEIDENTIFIERLOOSE]=p[c.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");p[c.XRANGEIDENTIFIER]=p[c.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");p[c.XRANGEPLAIN]="[v=\\s]*("+p[c.XRANGEIDENTIFIER]+")"+"(?:\\.("+p[c.XRANGEIDENTIFIER]+")"+"(?:\\.("+p[c.XRANGEIDENTIFIER]+")"+"(?:"+p[c.PRERELEASE]+")?"+p[c.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");p[c.XRANGEPLAINLOOSE]="[v=\\s]*("+p[c.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+p[c.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+p[c.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+p[c.PRERELEASELOOSE]+")?"+p[c.BUILD]+"?"+")?)?";tok("XRANGE");p[c.XRANGE]="^"+p[c.GTLT]+"\\s*"+p[c.XRANGEPLAIN]+"$";tok("XRANGELOOSE");p[c.XRANGELOOSE]="^"+p[c.GTLT]+"\\s*"+p[c.XRANGEPLAINLOOSE]+"$";tok("COERCE");p[c.COERCE]="(^|[^\\d])"+"(\\d{1,"+i+"})"+"(?:\\.(\\d{1,"+i+"}))?"+"(?:\\.(\\d{1,"+i+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");a[c.COERCERTL]=new RegExp(p[c.COERCE],"g");l[c.COERCERTL]=new RegExp(makeSafeRe(p[c.COERCE]),"g");tok("LONETILDE");p[c.LONETILDE]="(?:~>?)";tok("TILDETRIM");p[c.TILDETRIM]="(\\s*)"+p[c.LONETILDE]+"\\s+";a[c.TILDETRIM]=new RegExp(p[c.TILDETRIM],"g");l[c.TILDETRIM]=new RegExp(makeSafeRe(p[c.TILDETRIM]),"g");var m="$1~";tok("TILDE");p[c.TILDE]="^"+p[c.LONETILDE]+p[c.XRANGEPLAIN]+"$";tok("TILDELOOSE");p[c.TILDELOOSE]="^"+p[c.LONETILDE]+p[c.XRANGEPLAINLOOSE]+"$";tok("LONECARET");p[c.LONECARET]="(?:\\^)";tok("CARETTRIM");p[c.CARETTRIM]="(\\s*)"+p[c.LONECARET]+"\\s+";a[c.CARETTRIM]=new RegExp(p[c.CARETTRIM],"g");l[c.CARETTRIM]=new RegExp(makeSafeRe(p[c.CARETTRIM]),"g");var h="$1^";tok("CARET");p[c.CARET]="^"+p[c.LONECARET]+p[c.XRANGEPLAIN]+"$";tok("CARETLOOSE");p[c.CARETLOOSE]="^"+p[c.LONECARET]+p[c.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");p[c.COMPARATORLOOSE]="^"+p[c.GTLT]+"\\s*("+p[c.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");p[c.COMPARATOR]="^"+p[c.GTLT]+"\\s*("+p[c.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");p[c.COMPARATORTRIM]="(\\s*)"+p[c.GTLT]+"\\s*("+p[c.LOOSEPLAIN]+"|"+p[c.XRANGEPLAIN]+")";a[c.COMPARATORTRIM]=new RegExp(p[c.COMPARATORTRIM],"g");l[c.COMPARATORTRIM]=new RegExp(makeSafeRe(p[c.COMPARATORTRIM]),"g");var E="$1$2$3";tok("HYPHENRANGE");p[c.HYPHENRANGE]="^\\s*("+p[c.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+p[c.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");p[c.HYPHENRANGELOOSE]="^\\s*("+p[c.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+p[c.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");p[c.STAR]="(<|>)?=?\\s*\\*";for(var g=0;gs){return null}var r=t.loose?l[c.LOOSE]:l[c.FULL];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>s){throw new TypeError("version is longer than "+s+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var i=e.trim().match(t.loose?l[c.LOOSE]:l[c.FULL]);if(!i){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+i[1];this.minor=+i[2];this.patch=+i[3];if(this.major>n||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>n||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>n||this.patch<0){throw new TypeError("Invalid patch version")}if(!i[4]){this.prerelease=[]}else{this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,s){if(typeof r==="string"){s=r;r=undefined}try{return new SemVer(e,r).inc(t,s).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var s=parse(t);var n="";if(r.prerelease.length||s.prerelease.length){n="pre";var i="prerelease"}for(var o in r){if(o==="major"||o==="minor"||o==="patch"){if(r[o]!==s[o]){return n+o}}}return i}}t.compareIdentifiers=compareIdentifiers;var b=/^[0-9]+$/;function compareIdentifiers(e,t){var r=b.test(e);var s=b.test(t);if(r&&s){e=+e;t=+t}return e===t?0:r&&!s?-1:s&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,s){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,s);case"!=":return neq(e,r,s);case">":return gt(e,r,s);case">=":return gte(e,r,s);case"<":return lt(e,r,s);case"<=":return lte(e,r,s);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}e=e.trim().split(/\s+/).join(" ");r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===v){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var v={};Comparator.prototype.parse=function(e){var t=this.options.loose?l[c.COMPARATORLOOSE]:l[c.COMPARATOR];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=v}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===v||e===v){return true}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){if(this.value===""){return true}r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){if(e.value===""){return true}r=new Range(this.value,t);return satisfies(e.semver,r,t)}var s=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var i=this.semver.version===e.semver.version;var o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var l=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return s||n||i&&o||a||l};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length}));if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+this.raw)}this.format()}Range.prototype.format=function(){this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var t=this.options.loose;var s=t?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];e=e.replace(s,hyphenReplace);r("hyphen replace",e);e=e.replace(l[c.COMPARATORTRIM],E);r("comparator trim",e,l[c.COMPARATORTRIM]);e=e.replace(l[c.TILDETRIM],m);e=e.replace(l[c.CARETTRIM],h);e=e.split(/\s+/).join(" ");var n=t?l[c.COMPARATORLOOSE]:l[c.COMPARATOR];var i=e.split(" ").map((function(e){return parseComparator(e,this.options)}),this).join(" ").split(/\s+/);if(this.options.loose){i=i.filter((function(e){return!!e.match(n)}))}i=i.map((function(e){return new Comparator(e,this.options)}),this);return i};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((function(r){return isSatisfiable(r,t)&&e.set.some((function(e){return isSatisfiable(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))};function isSatisfiable(e,t){var r=true;var s=e.slice();var n=s.pop();while(r&&s.length){r=s.every((function(e){return n.intersects(e,t)}));n=s.pop()}return r}t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map((function(e){return replaceTilde(e,t)})).join(" ")}function replaceTilde(e,t){var s=t.loose?l[c.TILDELOOSE]:l[c.TILDE];return e.replace(s,(function(t,s,n,i,o){r("tilde",e,t,s,n,i,o);var a;if(isX(s)){a=""}else if(isX(n)){a=">="+s+".0.0 <"+(+s+1)+".0.0"}else if(isX(i)){a=">="+s+"."+n+".0 <"+s+"."+(+n+1)+".0"}else if(o){r("replaceTilde pr",o);a=">="+s+"."+n+"."+i+"-"+o+" <"+s+"."+(+n+1)+".0"}else{a=">="+s+"."+n+"."+i+" <"+s+"."+(+n+1)+".0"}r("tilde return",a);return a}))}function replaceCarets(e,t){return e.trim().split(/\s+/).map((function(e){return replaceCaret(e,t)})).join(" ")}function replaceCaret(e,t){r("caret",e,t);var s=t.loose?l[c.CARETLOOSE]:l[c.CARET];return e.replace(s,(function(t,s,n,i,o){r("caret",e,t,s,n,i,o);var a;if(isX(s)){a=""}else if(isX(n)){a=">="+s+".0.0 <"+(+s+1)+".0.0"}else if(isX(i)){if(s==="0"){a=">="+s+"."+n+".0 <"+s+"."+(+n+1)+".0"}else{a=">="+s+"."+n+".0 <"+(+s+1)+".0.0"}}else if(o){r("replaceCaret pr",o);if(s==="0"){if(n==="0"){a=">="+s+"."+n+"."+i+"-"+o+" <"+s+"."+n+"."+(+i+1)}else{a=">="+s+"."+n+"."+i+"-"+o+" <"+s+"."+(+n+1)+".0"}}else{a=">="+s+"."+n+"."+i+"-"+o+" <"+(+s+1)+".0.0"}}else{r("no pr");if(s==="0"){if(n==="0"){a=">="+s+"."+n+"."+i+" <"+s+"."+n+"."+(+i+1)}else{a=">="+s+"."+n+"."+i+" <"+s+"."+(+n+1)+".0"}}else{a=">="+s+"."+n+"."+i+" <"+(+s+1)+".0.0"}}r("caret return",a);return a}))}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map((function(e){return replaceXRange(e,t)})).join(" ")}function replaceXRange(e,t){e=e.trim();var s=t.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return e.replace(s,(function(s,n,i,o,a,l){r("xRange",e,s,n,i,o,a,l);var p=isX(i);var c=p||isX(o);var u=c||isX(a);var d=u;if(n==="="&&d){n=""}l=t.includePrerelease?"-0":"";if(p){if(n===">"||n==="<"){s="<0.0.0-0"}else{s="*"}}else if(n&&d){if(c){o=0}a=0;if(n===">"){n=">=";if(c){i=+i+1;o=0;a=0}else{o=+o+1;a=0}}else if(n==="<="){n="<";if(c){i=+i+1}else{o=+o+1}}s=n+i+"."+o+"."+a+l}else if(c){s=">="+i+".0.0"+l+" <"+(+i+1)+".0.0"+l}else if(u){s=">="+i+"."+o+".0"+l+" <"+i+"."+(+o+1)+".0"+l}r("xRange return",s);return s}))}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(l[c.STAR],"")}function hyphenReplace(e,t,r,s,n,i,o,a,l,p,c,u,d){if(isX(r)){t=""}else if(isX(s)){t=">="+r+".0.0"}else if(isX(n)){t=">="+r+"."+s+".0"}else{t=">="+t}if(isX(l)){a=""}else if(isX(p)){a="<"+(+l+1)+".0.0"}else if(isX(c)){a="<"+l+"."+(+p+1)+".0"}else if(u){a="<="+l+"."+p+"."+c+"-"+u}else{a="<="+a}return(t+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}for(var t=0;t0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var s=null;var n=null;try{var i=new Range(t,r)}catch(e){return null}e.forEach((function(e){if(i.test(e)){if(!s||n.compare(e)===-1){s=e;n=new SemVer(s,r)}}}));return s}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var s=null;var n=null;try{var i=new Range(t,r)}catch(e){return null}e.forEach((function(e){if(i.test(e)){if(!s||n.compare(e)===1){s=e;n=new SemVer(s,r)}}}));return s}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var s=0;s":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,s){e=new SemVer(e,s);t=new Range(t,s);var n,i,o,a,l;switch(r){case">":n=gt;i=lte;o=lt;a=">";l=">=";break;case"<":n=lt;i=gte;o=gt;a="<";l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,s)){return false}for(var p=0;p=0.0.0")}u=u||e;d=d||e;if(n(e.semver,u.semver,s)){u=e}else if(o(e.semver,d.semver,s)){d=e}}));if(u.operator===a||u.operator===l){return false}if((!d.operator||d.operator===a)&&i(e,d.semver)){return false}else if(d.operator===l&&o(e,d.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e,t){if(e instanceof SemVer){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};var r=null;if(!t.rtl){r=e.match(l[c.COERCE])}else{var s;while((s=l[c.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||s.index+s[0].length!==r.index+r[0].length){r=s}l[c.COERCERTL].lastIndex=s.index+s[1].length+s[2].length}l[c.COERCERTL].lastIndex=-1}if(r===null){return null}return parse(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},718:e=>{"use strict";e.exports=require("@babel/core")},410:e=>{"use strict";e.exports=require("@babel/template")},638:e=>{"use strict";e.exports=require("@babel/types")},151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=annotateAsPure;var s=r(638);const{addComment:n}=s;const i="#__PURE__";const isPureAnnotated=({leadingComments:e})=>!!e&&e.some((e=>/[@#]__PURE__/.test(e.value)));function annotateAsPure(e){const t=e["node"]||e;if(isPureAnnotated(t)){return}n(t,"leading",i)}},216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.buildDecoratedClass=buildDecoratedClass;t.hasDecorators=hasDecorators;t.hasOwnDecorators=hasOwnDecorators;var s=r(718);var n=r(513);var i=r(850);function hasOwnDecorators(e){var t;return!!((t=e.decorators)!=null&&t.length)}function hasDecorators(e){return hasOwnDecorators(e)||e.body.body.some(hasOwnDecorators)}function prop(e,t){if(!t)return null;return s.types.objectProperty(s.types.identifier(e),t)}function method(e,t){return s.types.objectMethod("method",s.types.identifier(e),[],s.types.blockStatement(t))}function takeDecorators(e){let t;if(e.decorators&&e.decorators.length>0){t=s.types.arrayExpression(e.decorators.map((e=>e.expression)))}e.decorators=undefined;return t}function getKey(e){if(e.computed){return e.key}else if(s.types.isIdentifier(e.key)){return s.types.stringLiteral(e.key.name)}else{return s.types.stringLiteral(String(e.key.value))}}function extractElementDescriptor(e,t,r,o){const a=o.isClassMethod();if(o.isPrivate()){throw o.buildCodeFrameError(`Private ${a?"methods":"fields"} in decorated classes are not supported yet.`)}if(o.node.type==="ClassAccessorProperty"){throw o.buildCodeFrameError(`Accessor properties are not supported in 2018-09 decorator transform, please specify { "version": "2021-12" } instead.`)}if(o.node.type==="StaticBlock"){throw o.buildCodeFrameError(`Static blocks are not supported in 2018-09 decorator transform, please specify { "version": "2021-12" } instead.`)}const{node:l,scope:p}=o;if(!o.isTSDeclareMethod()){new n.default({methodPath:o,objectRef:t,superRef:r,file:e,refToPreserve:t}).replace()}const c=[prop("kind",s.types.stringLiteral(s.types.isClassMethod(l)?l.kind:"field")),prop("decorators",takeDecorators(l)),prop("static",l.static&&s.types.booleanLiteral(true)),prop("key",getKey(l))].filter(Boolean);if(s.types.isClassMethod(l)){const e=l.computed?null:l.key;const t=s.types.toExpression(l);c.push(prop("value",(0,i.default)({node:t,id:e,scope:p})||t))}else if(s.types.isClassProperty(l)&&l.value){c.push(method("value",s.template.statements.ast`return ${l.value}`))}else{c.push(prop("value",p.buildUndefinedNode()))}o.remove();return s.types.objectExpression(c)}function addDecorateHelper(e){return e.addHelper("decorate")}function buildDecoratedClass(e,t,r,n){const{node:i,scope:o}=t;const a=o.generateUidIdentifier("initialize");const l=i.id&&t.isDeclaration();const p=t.isInStrictMode();const{superClass:c}=i;i.type="ClassDeclaration";if(!i.id)i.id=s.types.cloneNode(e);let u;if(c){u=o.generateUidIdentifierBasedOnNode(i.superClass,"super");i.superClass=u}const d=takeDecorators(i);const f=s.types.arrayExpression(r.filter((e=>!e.node.abstract&&e.node.type!=="TSIndexSignature")).map((e=>extractElementDescriptor(n,i.id,u,e))));const m=s.template.expression.ast` - ${addDecorateHelper(n)}( - ${d||s.types.nullLiteral()}, - function (${a}, ${c?s.types.cloneNode(u):null}) { - ${i} - return { F: ${s.types.cloneNode(i.id)}, d: ${f} }; - }, - ${c} - ) - `;if(!p){m.arguments[1].body.directives.push(s.types.directive(s.types.directiveLiteral("use strict")))}let h=m;let E="arguments.1.body.body.0";if(l){h=s.template.statement.ast`let ${e} = ${m}`;E="declarations.0.init."+E}return{instanceNodes:[s.template.statement.ast`${s.types.cloneNode(a)}(this)`],wrapClass(e){e.replaceWith(h);return e.get(E)}}}},173:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FEATURES=void 0;t.enableFeature=enableFeature;t.isLoose=isLoose;t.shouldTransform=shouldTransform;var s=r(216);const n=Object.freeze({fields:1<<1,privateMethods:1<<2,decorators:1<<3,privateIn:1<<4,staticBlocks:1<<5});t.FEATURES=n;const i=new Map([[n.fields,"@babel/plugin-transform-class-properties"],[n.privateMethods,"@babel/plugin-transform-private-methods"],[n.privateIn,"@babel/plugin-transform-private-property-in-object"]]);const o="@babel/plugin-class-features/featuresKey";const a="@babel/plugin-class-features/looseKey";const l="@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing";function enableFeature(e,t,r){if(!hasFeature(e,t)||canIgnoreLoose(e,t)){e.set(o,e.get(o)|t);if(r==="#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"){setLoose(e,t,true);e.set(l,e.get(l)|t)}else if(r==="#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"){setLoose(e,t,false);e.set(l,e.get(l)|t)}else{setLoose(e,t,r)}}let s;let n;for(const[t,r]of i){if(!hasFeature(e,t))continue;const i=isLoose(e,t);if(canIgnoreLoose(e,t)){continue}else if(s===!i){throw new Error("'loose' mode configuration must be the same for @babel/plugin-transform-class-properties, "+"@babel/plugin-transform-private-methods and "+"@babel/plugin-transform-private-property-in-object (when they are enabled).")}else{s=i;n=r}}if(s!==undefined){for(const[t,r]of i){if(hasFeature(e,t)&&isLoose(e,t)!==s){setLoose(e,t,s);console.warn(`Though the "loose" option was set to "${!s}" in your @babel/preset-env `+`config, it will not be used for ${r} since the "loose" mode option was set to `+`"${s}" for ${n}.\nThe "loose" option must be the `+`same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods `+`and @babel/plugin-transform-private-property-in-object (when they are enabled): you can `+`silence this warning by explicitly adding\n`+`\t["${r}", { "loose": ${s} }]\n`+`to the "plugins" section of your Babel config.`)}}}}function hasFeature(e,t){return!!(e.get(o)&t)}function isLoose(e,t){return!!(e.get(a)&t)}function setLoose(e,t,r){if(r)e.set(a,e.get(a)|t);else e.set(a,e.get(a)&~t);e.set(l,e.get(l)&~t)}function canIgnoreLoose(e,t){return!!(e.get(l)&t)}function shouldTransform(e,t){let r=null;let i=null;let o=null;let a=null;let l=null;if((0,s.hasOwnDecorators)(e.node)){r=e.get("decorators.0")}for(const t of e.get("body.body")){if(!r&&(0,s.hasOwnDecorators)(t.node)){r=t.get("decorators.0")}if(!i&&t.isClassProperty()){i=t}if(!o&&t.isClassPrivateProperty()){o=t}if(!a&&t.isClassPrivateMethod!=null&&t.isClassPrivateMethod()){a=t}if(!l&&t.isStaticBlock!=null&&t.isStaticBlock()){l=t}}if(r&&o){throw o.buildCodeFrameError("Private fields in decorated classes are not supported yet.")}if(r&&a){throw a.buildCodeFrameError("Private methods in decorated classes are not supported yet.")}if(r&&!hasFeature(t,n.decorators)){throw e.buildCodeFrameError("Decorators are not enabled."+"\nIf you are using "+'["@babel/plugin-proposal-decorators", { "version": "legacy" }], '+'make sure it comes *before* "@babel/plugin-transform-class-properties" '+"and enable loose mode, like so:\n"+'\t["@babel/plugin-proposal-decorators", { "version": "legacy" }]\n'+'\t["@babel/plugin-transform-class-properties", { "loose": true }]')}if(a&&!hasFeature(t,n.privateMethods)){throw a.buildCodeFrameError("Class private methods are not enabled. "+"Please add `@babel/plugin-transform-private-methods` to your configuration.")}if((i||o)&&!hasFeature(t,n.fields)&&!hasFeature(t,n.privateMethods)){throw e.buildCodeFrameError("Class fields are not enabled. "+"Please add `@babel/plugin-transform-class-properties` to your configuration.")}if(l&&!hasFeature(t,n.staticBlocks)){throw e.buildCodeFrameError("Static class blocks are not enabled. "+"Please add `@babel/plugin-transform-class-static-block` to your configuration.")}if(r||a||l){return true}if((i||o)&&hasFeature(t,n.fields)){return true}return false}},984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.buildCheckInRHS=buildCheckInRHS;t.buildFieldsInitNodes=buildFieldsInitNodes;t.buildPrivateNamesMap=buildPrivateNamesMap;t.buildPrivateNamesNodes=buildPrivateNamesNodes;t.transformPrivateNamesUsage=transformPrivateNamesUsage;var s=r(718);var n=r(513);var i=r(828);var o=r(621);var a=r(756);var l=r(151);var p=r(291);var c=r(981);function buildPrivateNamesMap(e){const t=new Map;for(const r of e){if(r.isPrivate()){const{name:e}=r.node.key.id;const s=t.has(e)?t.get(e):{id:r.scope.generateUidIdentifier(e),static:r.node.static,method:!r.isProperty()};if(r.isClassPrivateMethod()){if(r.node.kind==="get"){s.getId=r.scope.generateUidIdentifier(`get_${e}`)}else if(r.node.kind==="set"){s.setId=r.scope.generateUidIdentifier(`set_${e}`)}else if(r.node.kind==="method"){s.methodId=r.scope.generateUidIdentifier(e)}}t.set(e,s)}}return t}function buildPrivateNamesNodes(e,t,r,n){const i=[];for(const[o,a]of e){const{static:e,method:p,getId:c,setId:u}=a;const d=c||u;const f=s.types.cloneNode(a.id);let m;if(t){m=s.types.callExpression(n.addHelper("classPrivateFieldLooseKey"),[s.types.stringLiteral(o)])}else if(r){m=s.types.callExpression(s.types.identifier("Symbol"),[s.types.stringLiteral(o)])}else if(!e){m=s.types.newExpression(s.types.identifier(!p||d?"WeakMap":"WeakSet"),[])}if(m){(0,l.default)(m);i.push(s.template.statement.ast`var ${f} = ${m}`)}}return i}function privateNameVisitorFactory(e){const t=s.traverse.visitors.merge([Object.assign({},e),i.default]);const r=Object.assign({},e,{Class(e){const{privateNamesMap:s}=this;const n=e.get("body.body");const i=new Map(s);const o=[];for(const e of n){if(!e.isPrivate())continue;const{name:t}=e.node.key.id;i.delete(t);o.push(t)}if(!o.length){return}e.get("body").traverse(t,Object.assign({},this,{redeclared:o}));e.traverse(r,Object.assign({},this,{privateNamesMap:i}));e.skipKey("body")}});return r}const u=privateNameVisitorFactory({PrivateName(e,{noDocumentAll:t}){const{privateNamesMap:r,redeclared:s}=this;const{node:n,parentPath:i}=e;if(!i.isMemberExpression({property:n})&&!i.isOptionalMemberExpression({property:n})){return}const{name:o}=n.id;if(!r.has(o))return;if(s&&s.includes(o))return;this.handle(i,t)}});function unshadow(e,t,r){while((s=t)!=null&&s.hasBinding(e)&&!t.bindingIdentifierEquals(e,r)){var s;t.rename(e);t=t.parent}}function buildCheckInRHS(e,t,r){if(r||!(t.availableHelper!=null&&t.availableHelper("checkInRHS")))return e;return s.types.callExpression(t.addHelper("checkInRHS"),[e])}const d=privateNameVisitorFactory({BinaryExpression(e,{file:t}){const{operator:r,left:n,right:i}=e.node;if(r!=="in")return;if(!s.types.isPrivateName(n))return;const{privateFieldsAsProperties:o,privateNamesMap:a,redeclared:l}=this;const{name:p}=n.id;if(!a.has(p))return;if(l&&l.includes(p))return;unshadow(this.classRef.name,e.scope,this.innerBinding);if(o){const{id:r}=a.get(p);e.replaceWith(s.template.expression.ast` - Object.prototype.hasOwnProperty.call(${buildCheckInRHS(i,t)}, ${s.types.cloneNode(r)}) - `);return}const{id:c,static:u}=a.get(p);if(u){e.replaceWith(s.template.expression.ast`${buildCheckInRHS(i,t)} === ${s.types.cloneNode(this.classRef)}`);return}e.replaceWith(s.template.expression.ast`${s.types.cloneNode(c)}.has(${buildCheckInRHS(i,t)})`)}});const f={memoise(e,t){const{scope:r}=e;const{object:s}=e.node;const n=r.maybeGenerateMemoised(s);if(!n){return}this.memoiser.set(s,n,t)},receiver(e){const{object:t}=e.node;if(this.memoiser.has(t)){return s.types.cloneNode(this.memoiser.get(t))}return s.types.cloneNode(t)},get(e){const{classRef:t,privateNamesMap:r,file:n,innerBinding:i}=this;const{name:o}=e.node.property.id;const{id:a,static:l,method:p,methodId:c,getId:u,setId:d}=r.get(o);const f=u||d;if(l){const r=p&&!f?"classStaticPrivateMethodGet":"classStaticPrivateFieldSpecGet";unshadow(t.name,e.scope,i);return s.types.callExpression(n.addHelper(r),[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(a)])}if(p){if(f){if(!u&&d){if(n.availableHelper("writeOnlyError")){return s.types.sequenceExpression([this.receiver(e),s.types.callExpression(n.addHelper("writeOnlyError"),[s.types.stringLiteral(`#${o}`)])])}console.warn(`@babel/helpers is outdated, update it to silence this warning.`)}return s.types.callExpression(n.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(a)])}return s.types.callExpression(n.addHelper("classPrivateMethodGet"),[this.receiver(e),s.types.cloneNode(a),s.types.cloneNode(c)])}return s.types.callExpression(n.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(a)])},boundGet(e){this.memoise(e,1);return s.types.callExpression(s.types.memberExpression(this.get(e),s.types.identifier("bind")),[this.receiver(e)])},set(e,t){const{classRef:r,privateNamesMap:n,file:i}=this;const{name:o}=e.node.property.id;const{id:a,static:l,method:p,setId:c,getId:u}=n.get(o);const d=u||c;if(l){const n=p&&!d?"classStaticPrivateMethodSet":"classStaticPrivateFieldSpecSet";return s.types.callExpression(i.addHelper(n),[this.receiver(e),s.types.cloneNode(r),s.types.cloneNode(a),t])}if(p){if(c){return s.types.callExpression(i.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(a),t])}return s.types.sequenceExpression([this.receiver(e),t,s.types.callExpression(i.addHelper("readOnlyError"),[s.types.stringLiteral(`#${o}`)])])}return s.types.callExpression(i.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(a),t])},destructureSet(e){const{classRef:t,privateNamesMap:r,file:n}=this;const{name:i}=e.node.property.id;const{id:o,static:a}=r.get(i);if(a){try{var l=n.addHelper("classStaticPrivateFieldDestructureSet")}catch(e){throw new Error("Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \n"+"please update @babel/helpers to the latest version.")}return s.types.memberExpression(s.types.callExpression(l,[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(o)]),s.types.identifier("value"))}return s.types.memberExpression(s.types.callExpression(n.addHelper("classPrivateFieldDestructureSet"),[this.receiver(e),s.types.cloneNode(o)]),s.types.identifier("value"))},call(e,t){this.memoise(e,1);return(0,a.default)(this.get(e),this.receiver(e),t,false)},optionalCall(e,t){this.memoise(e,1);return(0,a.default)(this.get(e),this.receiver(e),t,true)},delete(){throw new Error("Internal Babel error: deleting private elements is a parsing error.")}};const m={get(e){const{privateNamesMap:t,file:r}=this;const{object:n}=e.node;const{name:i}=e.node.property.id;return s.template.expression`BASE(REF, PROP)[PROP]`({BASE:r.addHelper("classPrivateFieldLooseBase"),REF:s.types.cloneNode(n),PROP:s.types.cloneNode(t.get(i).id)})},set(){throw new Error("private name handler with loose = true don't need set()")},boundGet(e){return s.types.callExpression(s.types.memberExpression(this.get(e),s.types.identifier("bind")),[s.types.cloneNode(e.node.object)])},simpleSet(e){return this.get(e)},destructureSet(e){return this.get(e)},call(e,t){return s.types.callExpression(this.get(e),t)},optionalCall(e,t){return s.types.optionalCallExpression(this.get(e),t,true)},delete(){throw new Error("Internal Babel error: deleting private elements is a parsing error.")}};function transformPrivateNamesUsage(e,t,r,{privateFieldsAsProperties:s,noDocumentAll:n,innerBinding:i},a){if(!r.size)return;const l=t.get("body");const p=s?m:f;(0,o.default)(l,u,Object.assign({privateNamesMap:r,classRef:e,file:a},p,{noDocumentAll:n,innerBinding:i}));l.traverse(d,{privateNamesMap:r,classRef:e,file:a,privateFieldsAsProperties:s,innerBinding:i})}function buildPrivateFieldInitLoose(e,t,r){const{id:n}=r.get(t.node.key.id.name);const i=t.node.value||t.scope.buildUndefinedNode();return inheritPropComments(s.template.statement.ast` - Object.defineProperty(${e}, ${s.types.cloneNode(n)}, { - // configurable is false by default - // enumerable is false by default - writable: true, - value: ${i} - }); - `,t)}function buildPrivateInstanceFieldInitSpec(e,t,r,n){const{id:i}=r.get(t.node.key.id.name);const o=t.node.value||t.scope.buildUndefinedNode();{if(!n.availableHelper("classPrivateFieldInitSpec")){return inheritPropComments(s.template.statement.ast`${s.types.cloneNode(i)}.set(${e}, { - // configurable is always false for private elements - // enumerable is always false for private elements - writable: true, - value: ${o}, - })`,t)}}const a=n.addHelper("classPrivateFieldInitSpec");return inheritPropComments(s.template.statement.ast`${a}( - ${s.types.thisExpression()}, - ${s.types.cloneNode(i)}, - { - writable: true, - value: ${o} - }, - )`,t)}function buildPrivateStaticFieldInitSpec(e,t){const r=t.get(e.node.key.id.name);const{id:n,getId:i,setId:o,initAdded:a}=r;const l=i||o;if(!e.isProperty()&&(a||!l))return;if(l){t.set(e.node.key.id.name,Object.assign({},r,{initAdded:true}));return inheritPropComments(s.template.statement.ast` - var ${s.types.cloneNode(n)} = { - // configurable is false by default - // enumerable is false by default - // writable is false by default - get: ${i?i.name:e.scope.buildUndefinedNode()}, - set: ${o?o.name:e.scope.buildUndefinedNode()} - } - `,e)}const p=e.node.value||e.scope.buildUndefinedNode();return inheritPropComments(s.template.statement.ast` - var ${s.types.cloneNode(n)} = { - // configurable is false by default - // enumerable is false by default - writable: true, - value: ${p} - }; - `,e)}function buildPrivateMethodInitLoose(e,t,r){const n=r.get(t.node.key.id.name);const{methodId:i,id:o,getId:a,setId:l,initAdded:p}=n;if(p)return;if(i){return inheritPropComments(s.template.statement.ast` - Object.defineProperty(${e}, ${o}, { - // configurable is false by default - // enumerable is false by default - // writable is false by default - value: ${i.name} - }); - `,t)}const c=a||l;if(c){r.set(t.node.key.id.name,Object.assign({},n,{initAdded:true}));return inheritPropComments(s.template.statement.ast` - Object.defineProperty(${e}, ${o}, { - // configurable is false by default - // enumerable is false by default - // writable is false by default - get: ${a?a.name:t.scope.buildUndefinedNode()}, - set: ${l?l.name:t.scope.buildUndefinedNode()} - }); - `,t)}}function buildPrivateInstanceMethodInitSpec(e,t,r,s){const n=r.get(t.node.key.id.name);const{getId:i,setId:o,initAdded:a}=n;if(a)return;const l=i||o;if(l){return buildPrivateAccessorInitialization(e,t,r,s)}return buildPrivateInstanceMethodInitialization(e,t,r,s)}function buildPrivateAccessorInitialization(e,t,r,n){const i=r.get(t.node.key.id.name);const{id:o,getId:a,setId:l}=i;r.set(t.node.key.id.name,Object.assign({},i,{initAdded:true}));{if(!n.availableHelper("classPrivateFieldInitSpec")){return inheritPropComments(s.template.statement.ast` - ${o}.set(${e}, { - get: ${a?a.name:t.scope.buildUndefinedNode()}, - set: ${l?l.name:t.scope.buildUndefinedNode()} - }); - `,t)}}const p=n.addHelper("classPrivateFieldInitSpec");return inheritPropComments(s.template.statement.ast`${p}( - ${s.types.thisExpression()}, - ${s.types.cloneNode(o)}, - { - get: ${a?a.name:t.scope.buildUndefinedNode()}, - set: ${l?l.name:t.scope.buildUndefinedNode()} - }, - )`,t)}function buildPrivateInstanceMethodInitialization(e,t,r,n){const i=r.get(t.node.key.id.name);const{id:o}=i;{if(!n.availableHelper("classPrivateMethodInitSpec")){return inheritPropComments(s.template.statement.ast`${o}.add(${e})`,t)}}const a=n.addHelper("classPrivateMethodInitSpec");return inheritPropComments(s.template.statement.ast`${a}( - ${s.types.thisExpression()}, - ${s.types.cloneNode(o)} - )`,t)}function buildPublicFieldInitLoose(e,t){const{key:r,computed:n}=t.node;const i=t.node.value||t.scope.buildUndefinedNode();return inheritPropComments(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.memberExpression(e,r,n||s.types.isLiteral(r)),i)),t)}function buildPublicFieldInitSpec(e,t,r){const{key:n,computed:i}=t.node;const o=t.node.value||t.scope.buildUndefinedNode();return inheritPropComments(s.types.expressionStatement(s.types.callExpression(r.addHelper("defineProperty"),[e,i||s.types.isLiteral(n)?n:s.types.stringLiteral(n.name),o])),t)}function buildPrivateStaticMethodInitLoose(e,t,r,n){const i=n.get(t.node.key.id.name);const{id:o,methodId:a,getId:l,setId:p,initAdded:c}=i;if(c)return;const u=l||p;if(u){n.set(t.node.key.id.name,Object.assign({},i,{initAdded:true}));return inheritPropComments(s.template.statement.ast` - Object.defineProperty(${e}, ${o}, { - // configurable is false by default - // enumerable is false by default - // writable is false by default - get: ${l?l.name:t.scope.buildUndefinedNode()}, - set: ${p?p.name:t.scope.buildUndefinedNode()} - }) - `,t)}return inheritPropComments(s.template.statement.ast` - Object.defineProperty(${e}, ${o}, { - // configurable is false by default - // enumerable is false by default - // writable is false by default - value: ${a.name} - }); - `,t)}function buildPrivateMethodDeclaration(e,t,r=false){const n=t.get(e.node.key.id.name);const{id:i,methodId:o,getId:a,setId:l,getterDeclared:p,setterDeclared:c,static:u}=n;const{params:d,body:f,generator:m,async:h}=e.node;const E=a&&!p&&d.length===0;const g=l&&!c&&d.length>0;let b=o;if(E){t.set(e.node.key.id.name,Object.assign({},n,{getterDeclared:true}));b=a}else if(g){t.set(e.node.key.id.name,Object.assign({},n,{setterDeclared:true}));b=l}else if(u&&!r){b=i}return inheritPropComments(s.types.functionDeclaration(s.types.cloneNode(b),d,f,m,h),e)}const h=s.traverse.visitors.merge([{UnaryExpression(e){const{node:t}=e;if(t.operator==="delete"){const r=(0,p.skipTransparentExprWrapperNodes)(t.argument);if(s.types.isThisExpression(r)){e.replaceWith(s.types.booleanLiteral(true))}}},ThisExpression(e,t){t.needsClassRef=true;e.replaceWith(s.types.cloneNode(t.classRef))},MetaProperty(e){const{node:t,scope:r}=e;if(t.meta.name==="new"&&t.property.name==="target"){e.replaceWith(r.buildUndefinedNode())}}},i.default]);const E={ReferencedIdentifier(e,t){if(e.scope.bindingIdentifierEquals(e.node.name,t.innerBinding)){t.needsClassRef=true;e.node.name=t.classRef.name}}};function replaceThisContext(e,t,r){var s;const n={classRef:t,needsClassRef:false,innerBinding:r};if(!e.isMethod()){e.traverse(h,n)}if(r!=null&&(s=n.classRef)!=null&&s.name&&n.classRef.name!==r.name){e.traverse(E,n)}return n.needsClassRef}function isNameOrLength({key:e,computed:t}){if(e.type==="Identifier"){return!t&&(e.name==="name"||e.name==="length")}if(e.type==="StringLiteral"){return e.value==="name"||e.value==="length"}return false}function inheritPropComments(e,t){s.types.inheritLeadingComments(e,t.node);s.types.inheritInnerComments(e,t.node);return e}function buildFieldsInitNodes(e,t,r,i,o,a,l,p,u){var d,f;let m=0;let h;const E=[];const g=[];const b=[];let v=null;const y=s.types.isIdentifier(t)?()=>t:()=>{var e;(e=h)!=null?e:h=r[0].scope.generateUidIdentifierBasedOnNode(t);return h};const I=(d=e)!=null?d:r[0].scope.generateUidIdentifier("class");(f=e)!=null?f:e=s.types.cloneNode(u);for(const t of r){t.isClassProperty()&&c.assertFieldTransformed(t);const r=!(s.types.isStaticBlock!=null&&s.types.isStaticBlock(t.node))&&t.node.static;const d=!r;const f=t.isPrivate();const h=!f;const v=t.isProperty();const R=!v;const N=t.isStaticBlock==null?void 0:t.isStaticBlock();if(r)m|=1;if(r||R&&f||N){new n.default({methodPath:t,constantSuper:p,file:o,refToPreserve:u,getSuperRef:y,getObjectRef(){m|=2;if(r||N){return I}else{return s.types.memberExpression(I,s.types.identifier("prototype"))}}}).replace();const e=replaceThisContext(t,I,u);if(e){m|=2}}switch(true){case N:{const e=t.node.body;if(e.length===1&&s.types.isExpressionStatement(e[0])){E.push(inheritPropComments(e[0],t))}else{E.push(s.types.inheritsComments(s.template.statement.ast`(() => { ${e} })()`,t.node))}break}case r&&f&&v&&l:E.push(buildPrivateFieldInitLoose(s.types.cloneNode(e),t,i));break;case r&&f&&v&&!l:E.push(buildPrivateStaticFieldInitSpec(t,i));break;case r&&h&&v&&a:if(!isNameOrLength(t.node)){E.push(buildPublicFieldInitLoose(s.types.cloneNode(e),t));break}case r&&h&&v&&!a:E.push(buildPublicFieldInitSpec(s.types.cloneNode(e),t,o));break;case d&&f&&v&&l:g.push(buildPrivateFieldInitLoose(s.types.thisExpression(),t,i));break;case d&&f&&v&&!l:g.push(buildPrivateInstanceFieldInitSpec(s.types.thisExpression(),t,i,o));break;case d&&f&&R&&l:g.unshift(buildPrivateMethodInitLoose(s.types.thisExpression(),t,i));b.push(buildPrivateMethodDeclaration(t,i,l));break;case d&&f&&R&&!l:g.unshift(buildPrivateInstanceMethodInitSpec(s.types.thisExpression(),t,i,o));b.push(buildPrivateMethodDeclaration(t,i,l));break;case r&&f&&R&&!l:E.unshift(buildPrivateStaticFieldInitSpec(t,i));b.push(buildPrivateMethodDeclaration(t,i,l));break;case r&&f&&R&&l:E.unshift(buildPrivateStaticMethodInitLoose(s.types.cloneNode(e),t,o,i));b.push(buildPrivateMethodDeclaration(t,i,l));break;case d&&h&&v&&a:g.push(buildPublicFieldInitLoose(s.types.thisExpression(),t));break;case d&&h&&v&&!a:g.push(buildPublicFieldInitSpec(s.types.thisExpression(),t,o));break;default:throw new Error("Unreachable.")}}if(m&2&&u!=null){v=s.types.expressionStatement(s.types.assignmentExpression("=",s.types.cloneNode(I),s.types.cloneNode(u)))}return{staticNodes:E.filter(Boolean),instanceNodes:g.filter(Boolean),pureStaticNodes:b.filter(Boolean),classBindingNode:v,wrapClass(t){for(const e of r){e.node.leadingComments=null;e.remove()}if(h){t.scope.push({id:s.types.cloneNode(h)});t.set("superClass",s.types.assignmentExpression("=",h,t.node.superClass))}if(m!==0){if(t.isClassExpression()){t.scope.push({id:e});t.replaceWith(s.types.assignmentExpression("=",s.types.cloneNode(e),t.node))}else{if(u==null){t.node.id=e}if(v!=null){t.scope.push({id:I})}}}return t}}}},587:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.extractComputedKeys=extractComputedKeys;t.injectInitialization=injectInitialization;var s=r(718);var n=r(828);const i=s.traverse.visitors.merge([{Super(e){const{node:t,parentPath:r}=e;if(r.isCallExpression({callee:t})){this.push(r)}}},n.default]);const o={"TSTypeAnnotation|TypeAnnotation"(e){e.skip()},ReferencedIdentifier(e,{scope:t}){if(t.hasOwnBinding(e.node.name)){t.rename(e.node.name);e.skip()}}};function handleClassTDZ(e,t){if(t.classBinding&&t.classBinding===e.scope.getBinding(e.node.name)){const r=t.file.addHelper("classNameTDZError");const n=s.types.callExpression(r,[s.types.stringLiteral(e.node.name)]);e.replaceWith(s.types.sequenceExpression([n,e.node]));e.skip()}}const a={ReferencedIdentifier:handleClassTDZ};function injectInitialization(e,t,r,n){if(!r.length)return;const a=!!e.node.superClass;if(!t){const r=s.types.classMethod("constructor",s.types.identifier("constructor"),[],s.types.blockStatement([]));if(a){r.params=[s.types.restElement(s.types.identifier("args"))];r.body.body.push(s.template.statement.ast`super(...args)`)}[t]=e.get("body").unshiftContainer("body",r)}if(n){n(o,{scope:t.scope})}if(a){const e=[];t.traverse(i,e);let n=true;for(const t of e){if(n){t.insertAfter(r);n=false}else{t.insertAfter(r.map((e=>s.types.cloneNode(e))))}}}else{t.get("body").unshiftContainer("body",r)}}function extractComputedKeys(e,t,r){const n=[];const i={classBinding:e.node.id&&e.scope.getBinding(e.node.id.name),file:r};for(const r of t){const t=r.get("key");if(t.isReferencedIdentifier()){handleClassTDZ(t,i)}else{t.traverse(a,i)}const o=r.node;if(!t.isConstantExpression()){const t=e.scope.generateUidIdentifierBasedOnNode(o.key);e.scope.push({id:t,kind:"let"});n.push(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.cloneNode(t),o.key)));o.key=s.types.cloneNode(t)}}return n}},981:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertFieldTransformed=assertFieldTransformed;function assertFieldTransformed(e){if(e.node.declare||false){throw e.buildCodeFrameError(`TypeScript 'declare' fields must first be transformed by `+`@babel/plugin-transform-typescript.\n`+`If you have already enabled that plugin (or '@babel/preset-typescript'), make sure `+`that it runs before any plugin related to additional class features:\n`+` - @babel/plugin-transform-class-properties\n`+` - @babel/plugin-transform-private-methods\n`+` - @babel/plugin-proposal-decorators`)}}},828:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;t.requeueComputedKeyAndDecorators=requeueComputedKeyAndDecorators;{{{t.skipAllButComputedKey=function skipAllButComputedKey(e){e.skip();if(e.node.computed){e.context.maybeQueue(e.get("key"))}}}}}function requeueComputedKeyAndDecorators(e){const{context:t,node:r}=e;if(r.computed){t.maybeQueue(e.get("key"))}if(r.decorators){for(const r of e.get("decorators")){t.maybeQueue(r)}}}const r={FunctionParent(e){if(e.isArrowFunctionExpression()){return}else{e.skip();if(e.isMethod()){requeueComputedKeyAndDecorators(e)}}},Property(e){if(e.isObjectProperty()){return}e.skip();requeueComputedKeyAndDecorators(e)}};var s=r;t["default"]=s},850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(410);var n=r(638);const{NOT_LOCAL_BINDING:i,cloneNode:o,identifier:a,isAssignmentExpression:l,isAssignmentPattern:p,isFunction:c,isIdentifier:u,isLiteral:d,isNullLiteral:f,isObjectMethod:m,isObjectProperty:h,isRegExpLiteral:E,isRestElement:g,isTemplateLiteral:b,isVariableDeclarator:v,toBindingIdentifierName:y}=n;function getFunctionArity(e){const t=e.params.findIndex((e=>p(e)||g(e)));return t===-1?e.params.length:t}const I=s.default.statement(`\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n`);const R=s.default.statement(`\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n`);const N={"ReferencedIdentifier|BindingIdentifier"(e,t){if(e.node.name!==t.name)return;const r=e.scope.getBindingIdentifier(t.name);if(r!==t.outerDeclar)return;t.selfReference=true;e.stop()}};function getNameFromLiteralId(e){if(f(e)){return"null"}if(E(e)){return`_${e.pattern}_${e.flags}`}if(b(e)){return e.quasis.map((e=>e.value.raw)).join("")}if(e.value!==undefined){return e.value+""}return""}function wrap(e,t,r,s){if(e.selfReference){if(s.hasBinding(r.name)&&!s.hasGlobal(r.name)){s.rename(r.name)}else{if(!c(t))return;let e=I;if(t.generator){e=R}const n=e({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:s.generateUidIdentifier(r.name)}).expression;const i=n.callee.body.body[0].params;for(let e=0,r=getFunctionArity(t);e{if(E(r)){return r.optional||r.object!==t}if(h(r)){return t!==e.node&&r.optional||r.callee!==t}return true}));if(v.path.isPattern()){i.replaceWith(c(o([],i.node),[]));return}const g=willPathCastToBoolean(i);const N=i.parentPath;if(N.isUpdateExpression({argument:r})||N.isAssignmentExpression({left:r})){throw e.buildCodeFrameError(`can't handle assignment`)}const O=N.isUnaryExpression({operator:"delete"});if(O&&i.isOptionalMemberExpression()&&i.get("property").isPrivateName()){throw e.buildCodeFrameError(`can't delete a private class element`)}let P=e;for(;;){if(P.isOptionalMemberExpression()){if(P.node.optional)break;P=P.get("object");continue}else if(P.isOptionalCallExpression()){if(P.node.optional)break;P=P.get("callee");continue}throw new Error(`Internal error: unexpected ${P.node.type}`)}const S=P.isOptionalMemberExpression()?P.node.object:P.node.callee;const C=v.maybeGenerateMemoised(S);const T=C!=null?C:S;const L=n.isOptionalCallExpression({callee:r});const isOptionalCall=e=>L;const w=n.isCallExpression({callee:r});P.replaceWith(toNonOptional(P,T));if(isOptionalCall()){if(s.optional){n.replaceWith(this.optionalCall(e,s.arguments))}else{n.replaceWith(this.call(e,s.arguments))}}else if(w){e.replaceWith(this.boundGet(e))}else if(this.delete&&n.isUnaryExpression({operator:"delete"})){n.replaceWith(this.delete(e))}else{e.replaceWith(this.get(e))}let x=e.node;for(let t=e;t!==i;){const e=t.parentPath;if(e===i&&isOptionalCall()&&s.optional){x=e.node;break}x=toNonOptional(e,x);t=e}let A;const k=i.parentPath;if(m(x)&&k.isOptionalCallExpression({callee:i.node,optional:true})){const{object:t}=x;A=e.scope.maybeGenerateMemoised(t);if(A){x.object=a("=",A,t)}}let F=i;if(O){F=k;x=k.node}const M=C?a("=",u(T),u(S)):u(T);if(g){let e;if(t){e=l("!=",M,y())}else{e=b("&&",l("!==",M,y()),l("!==",u(T),v.buildUndefinedNode()))}F.replaceWith(b("&&",e,x))}else{let e;if(t){e=l("==",M,y())}else{e=b("||",l("===",M,y()),l("===",u(T),v.buildUndefinedNode()))}F.replaceWith(d(e,O?p(true):v.buildUndefinedNode(),x))}if(A){const e=k.node;k.replaceWith(I(R(e.callee,f("call"),false,true),[u(A),...e.arguments],false))}return}if(g(s,{argument:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,prefix:i}=s;this.memoise(e,2);const o=v.generateUidIdentifierBasedOnNode(r);v.push({id:o});const l=[a("=",u(o),this.get(e))];if(i){l.push(O(t,u(o),i));const r=N(l);n.replaceWith(this.set(e,r));return}else{const s=v.generateUidIdentifierBasedOnNode(r);v.push({id:s});l.push(a("=",u(s),O(t,u(o),i)),u(o));const p=N(l);n.replaceWith(N([this.set(e,p),u(s)]));return}}if(n.isAssignmentExpression({left:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,right:r}=n.node;if(t==="="){n.replaceWith(this.set(e,r))}else{const s=t.slice(0,-1);if(i.includes(s)){this.memoise(e,1);n.replaceWith(b(s,this.get(e),this.set(e,r)))}else{this.memoise(e,2);n.replaceWith(this.set(e,l(s,this.get(e),r)))}}return}if(n.isCallExpression({callee:r})){n.replaceWith(this.call(e,n.node.arguments));return}if(n.isOptionalCallExpression({callee:r})){if(v.path.isPattern()){n.replaceWith(c(o([],n.node),[]));return}n.replaceWith(this.optionalCall(e,n.node.arguments));return}if(this.delete&&n.isUnaryExpression({operator:"delete"})){n.replaceWith(this.delete(e));return}if(n.isForXStatement({left:r})||n.isObjectProperty({value:r})&&n.parentPath.isObjectPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isObjectProperty({value:s})&&n.parentPath.parentPath.isObjectPattern()||n.isArrayPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isArrayPattern()||n.isRestElement()){e.replaceWith(this.destructureSet(e));return}if(n.isTaggedTemplateExpression()){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}}};function memberExpressionToFunctions(e,t,r){e.traverse(t,Object.assign({},P,r,{memoiser:new AssignmentMemoiser}))}t["default"]=memberExpressionToFunctions},756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=optimiseCallExpression;var s=r(638);const{callExpression:n,identifier:i,isIdentifier:o,isSpreadElement:a,memberExpression:l,optionalCallExpression:p,optionalMemberExpression:c}=s;function optimiseCallExpression(e,t,r,s){if(r.length===1&&a(r[0])&&o(r[0].argument,{name:"arguments"})){if(s){return p(c(e,i("apply"),false,true),[t,r[0].argument],false)}return n(l(e,i("apply")),[t,r[0].argument])}else{if(s){return p(c(e,i("call"),false,true),[t,...r],false)}return n(l(e,i("call")),[t,...r])}}},513:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(828);var n=r(621);var i=r(756);var o=r(718);const{assignmentExpression:a,booleanLiteral:l,callExpression:p,cloneNode:c,identifier:u,memberExpression:d,sequenceExpression:f,stringLiteral:m,thisExpression:h}=o.types;{{{const e=r(828);t.environmentVisitor=e.default;t.skipAllButComputedKey=e.skipAllButComputedKey}}}function getPrototypeOfExpression(e,t,r,s){e=c(e);const n=t||s?e:d(e,u("prototype"));return p(r.addHelper("getPrototypeOf"),[n])}const E=o.traverse.visitors.merge([s.default,{Super(e,t){const{node:r,parentPath:s}=e;if(!s.isMemberExpression({object:r}))return;t.handle(s)}}]);const g=o.traverse.visitors.merge([s.default,{Scopable(e,{refName:t}){const r=e.scope.getOwnBinding(t);if(r&&r.identifier.name===t){e.scope.rename(t)}}}]);const b={memoise(e,t){const{scope:r,node:s}=e;const{computed:n,property:i}=s;if(!n){return}const o=r.maybeGenerateMemoised(i);if(!o){return}this.memoiser.set(i,o,t)},prop(e){const{computed:t,property:r}=e.node;if(this.memoiser.has(r)){return c(this.memoiser.get(r))}if(t){return c(r)}return m(r.name)},get(e){return this._get(e,this._getThisRefs())},_get(e,t){const r=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return p(this.file.addHelper("get"),[t.memo?f([t.memo,r]):r,this.prop(e),t.this])},_getThisRefs(){if(!this.isDerivedConstructor){return{this:h()}}const e=this.scope.generateDeclaredUidIdentifier("thisSuper");return{memo:a("=",e,h()),this:c(e)}},set(e,t){const r=this._getThisRefs();const s=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return p(this.file.addHelper("set"),[r.memo?f([r.memo,s]):s,this.prop(e),t,r.this,l(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError(`Destructuring to a super field is not supported yet.`)},call(e,t){const r=this._getThisRefs();return(0,i.default)(this._get(e,r),c(r.this),t,false)},optionalCall(e,t){const r=this._getThisRefs();return(0,i.default)(this._get(e,r),c(r.this),t,true)},delete(e){if(e.node.computed){return f([p(this.file.addHelper("toPropertyKey"),[c(e.node.property)]),o.template.expression.ast` - function () { throw new ReferenceError("'delete super[expr]' is invalid"); }() - `])}else{return o.template.expression.ast` - function () { throw new ReferenceError("'delete super.prop' is invalid"); }() - `}}};const v=Object.assign({},b,{prop(e){const{property:t}=e.node;if(this.memoiser.has(t)){return c(this.memoiser.get(t))}return c(t)},get(e){const{isStatic:t,getSuperRef:r}=this;const{computed:s}=e.node;const n=this.prop(e);let i;if(t){var o;i=(o=r())!=null?o:d(u("Function"),u("prototype"))}else{var a;i=d((a=r())!=null?a:u("Object"),u("prototype"))}return d(i,n,s)},set(e,t){const{computed:r}=e.node;const s=this.prop(e);return a("=",d(h(),s,r),t)},destructureSet(e){const{computed:t}=e.node;const r=this.prop(e);return d(h(),r,t)},call(e,t){return(0,i.default)(this.get(e),h(),t,false)},optionalCall(e,t){return(0,i.default)(this.get(e),h(),t,true)}});class ReplaceSupers{constructor(e){var t;const r=e.methodPath;this.methodPath=r;this.isDerivedConstructor=r.isClassMethod({kind:"constructor"})&&!!e.superRef;this.isStatic=r.isObjectMethod()||r.node.static||(r.isStaticBlock==null?void 0:r.isStaticBlock());this.isPrivateMethod=r.isPrivate()&&r.isMethod();this.file=e.file;this.constantSuper=(t=e.constantSuper)!=null?t:e.isLoose;this.opts=e}getObjectRef(){return c(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){if(this.opts.superRef)return c(this.opts.superRef);if(this.opts.getSuperRef){return c(this.opts.getSuperRef())}}replace(){if(this.opts.refToPreserve){this.methodPath.traverse(g,{refName:this.opts.refToPreserve.name})}const e=this.constantSuper?v:b;(0,n.default)(this.methodPath,E,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:e.get},e))}}t["default"]=ReplaceSupers},291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isTransparentExprWrapper=isTransparentExprWrapper;t.skipTransparentExprWrapperNodes=skipTransparentExprWrapperNodes;t.skipTransparentExprWrappers=skipTransparentExprWrappers;var s=r(638);const{isParenthesizedExpression:n,isTSAsExpression:i,isTSNonNullExpression:o,isTSSatisfiesExpression:a,isTSTypeAssertion:l,isTypeCastExpression:p}=s;function isTransparentExprWrapper(e){return i(e)||a(e)||l(e)||o(e)||p(e)||n(e)}function skipTransparentExprWrappers(e){while(isTransparentExprWrapper(e.node)){e=e.get("expression")}return e}function skipTransparentExprWrapperNodes(e){while(isTransparentExprWrapper(e)){e=e.expression}return e}},605:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=splitExportDeclaration;var s=r(638);const{cloneNode:n,exportNamedDeclaration:i,exportSpecifier:o,identifier:a,variableDeclaration:l,variableDeclarator:p}=s;function splitExportDeclaration(e){if(!e.isExportDeclaration()||e.isExportAllDeclaration()){throw new Error("Only default and named export declarations can be split.")}if(e.isExportDefaultDeclaration()){const t=e.get("declaration");const r=t.isFunctionDeclaration()||t.isClassDeclaration();const s=t.isFunctionExpression()||t.isClassExpression();const c=t.isScope()?t.scope.parent:t.scope;let u=t.node.id;let d=false;if(!u){d=true;u=c.generateUidIdentifier("default");if(r||s){t.node.id=n(u)}}else if(s&&c.hasBinding(u.name)){d=true;u=c.generateUidIdentifier(u.name)}const f=r?t.node:l("var",[p(n(u),t.node)]);const m=i(null,[o(n(u),a("default"))]);e.insertAfter(m);e.replaceWith(f);if(d){c.registerDeclaration(e)}return e}else if(e.get("specifiers").length>0){throw new Error("It doesn't make sense to split exported specifiers.")}const t=e.get("declaration");const r=t.getOuterBindingIdentifiers();const s=Object.keys(r).map((e=>o(a(e),a(e))));const c=i(null,s);e.insertAfter(c);e.replaceWith(t.node);return e}}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var i=true;try{e[r](n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"FEATURES",{enumerable:true,get:function(){return p.FEATURES}});Object.defineProperty(e,"buildCheckInRHS",{enumerable:true,get:function(){return o.buildCheckInRHS}});e.createClassFeaturePlugin=createClassFeaturePlugin;Object.defineProperty(e,"enableFeature",{enumerable:true,get:function(){return p.enableFeature}});Object.defineProperty(e,"injectInitialization",{enumerable:true,get:function(){return l.injectInitialization}});var t=__nccwpck_require__(718);var s=__nccwpck_require__(850);var n=__nccwpck_require__(605);var i=__nccwpck_require__(641);var o=__nccwpck_require__(984);var a=__nccwpck_require__(216);var l=__nccwpck_require__(587);var p=__nccwpck_require__(173);var c=__nccwpck_require__(981);const u="@babel/plugin-class-features/version";function createClassFeaturePlugin({name:e,feature:r,loose:d,manipulateOptions:f,api:m,inherits:h}){{var E;(E=m)!=null?E:m={assumption:()=>void 0}}const g=m.assumption("setPublicClassFields");const b=m.assumption("privateFieldsAsSymbols");const v=m.assumption("privateFieldsAsProperties");const y=m.assumption("constantSuper");const I=m.assumption("noDocumentAll");if(v&&b){throw new Error(`Cannot enable both the "privateFieldsAsProperties" and `+`"privateFieldsAsSymbols" assumptions as the same time.`)}const R=v||b;if(d===true){const t=[];if(g!==undefined){t.push(`"setPublicClassFields"`)}if(v!==undefined){t.push(`"privateFieldsAsProperties"`)}if(b!==undefined){t.push(`"privateFieldsAsSymbols"`)}if(t.length!==0){console.warn(`[${e}]: You are using the "loose: true" option and you are`+` explicitly setting a value for the ${t.join(" and ")}`+` assumption${t.length>1?"s":""}. The "loose" option`+` can cause incompatibilities with the other class features`+` plugins, so it's recommended that you replace it with the`+` following top-level option:\n`+`\t"assumptions": {\n`+`\t\t"setPublicClassFields": true,\n`+`\t\t"privateFieldsAsSymbols": true\n`+`\t}`)}}return{name:e,manipulateOptions:f,inherits:h,pre(e){(0,p.enableFeature)(e,r,d);{if(typeof e.get(u)==="number"){e.set(u,"7.22.15");return}}if(!e.get(u)||i.lt(e.get(u),"7.22.15")){e.set(u,"7.22.15")}},visitor:{Class(e,{file:n}){var i;if(n.get(u)!=="7.22.15")return;if(!(0,p.shouldTransform)(e,n))return;const d=e.isClassDeclaration();if(d)(0,c.assertFieldTransformed)(e);const f=(0,p.isLoose)(n,r);let m;const h=(0,a.hasDecorators)(e.node);const E=[];const N=[];const O=[];const P=new Set;const S=e.get("body");for(const e of S.get("body")){if((e.isClassProperty()||e.isClassMethod())&&e.node.computed){O.push(e)}if(e.isPrivate()){const{name:t}=e.node.key.id;const r=`get ${t}`;const s=`set ${t}`;if(e.isClassPrivateMethod()){if(e.node.kind==="get"){if(P.has(r)||P.has(t)&&!P.has(s)){throw e.buildCodeFrameError("Duplicate private field")}P.add(r).add(t)}else if(e.node.kind==="set"){if(P.has(s)||P.has(t)&&!P.has(r)){throw e.buildCodeFrameError("Duplicate private field")}P.add(s).add(t)}}else{if(P.has(t)&&!P.has(r)&&!P.has(s)||P.has(t)&&(P.has(r)||P.has(s))){throw e.buildCodeFrameError("Duplicate private field")}P.add(t)}}if(e.isClassMethod({kind:"constructor"})){m=e}else{N.push(e);if(e.isProperty()||e.isPrivate()||e.isStaticBlock!=null&&e.isStaticBlock()){E.push(e)}}}{if(!E.length&&!h)return}const C=e.node.id;let T;if(!C||!d){(0,s.default)(e);T=e.scope.generateUidIdentifier("class")}const L=(i=T)!=null?i:t.types.cloneNode(C);const w=(0,o.buildPrivateNamesMap)(E);const x=(0,o.buildPrivateNamesNodes)(w,v!=null?v:f,b!=null?b:false,n);(0,o.transformPrivateNamesUsage)(L,e,w,{privateFieldsAsProperties:R!=null?R:f,noDocumentAll:I,innerBinding:C},n);let A,k,F,M,D,_;{if(h){k=M=A=[];({instanceNodes:F,wrapClass:_}=(0,a.buildDecoratedClass)(L,e,N,n))}else{A=(0,l.extractComputedKeys)(e,O,n);({staticNodes:k,pureStaticNodes:M,instanceNodes:F,classBindingNode:D,wrapClass:_}=(0,o.buildFieldsInitNodes)(T,e.node.superClass,E,w,n,g!=null?g:f,R!=null?R:f,y!=null?y:f,C))}}if(F.length>0){(0,l.injectInitialization)(e,m,F,((e,r)=>{{if(h)return}for(const s of E){if(t.types.isStaticBlock!=null&&t.types.isStaticBlock(s.node)||s.node.static)continue;s.traverse(e,r)}}))}const j=_(e);j.insertBefore([...x,...A]);if(k.length>0){j.insertAfter(k)}if(M.length>0){j.find((e=>e.isStatement()||e.isDeclaration())).insertAfter(M)}if(D!=null&&d){j.insertAfter(D)}},ExportDefaultDeclaration(e,{file:t}){{if(t.get(u)!=="7.22.15")return;const r=e.get("declaration");if(r.isClassDeclaration()&&(0,a.hasDecorators)(r.node)){if(r.node.id){(0,n.default)(e)}else{r.node.type="ClassExpression"}}}}}}}})();module.exports=r})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/license b/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/license deleted file mode 100644 index f31575ec773b..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/license +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/package.json b/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/package.json deleted file mode 100644 index 131aaad8d2c4..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-create-class-features-plugin/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@babel/helper-create-class-features-plugin","author":"The Babel Team (https://babel.dev/team)","version":"7.22.15","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/index.d.ts b/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/index.js b/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/index.js deleted file mode 100644 index 03b6a9149670..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={638:e=>{e.exports=require("@babel/types")},491:e=>{e.exports=require("assert")},79:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=r(491);var s=r(638);const{callExpression:a,cloneNode:n,expressionStatement:o,identifier:l,importDeclaration:d,importDefaultSpecifier:u,importNamespaceSpecifier:f,importSpecifier:p,memberExpression:c,stringLiteral:m,variableDeclaration:_,variableDeclarator:h}=s;class ImportBuilder{constructor(e,t,r){this._statements=[];this._resultName=null;this._importedSource=void 0;this._scope=t;this._hub=r;this._importedSource=e}done(){return{statements:this._statements,resultName:this._resultName}}import(){this._statements.push(d([],m(this._importedSource)));return this}require(){this._statements.push(o(a(l("require"),[m(this._importedSource)])));return this}namespace(e="namespace"){const t=this._scope.generateUidIdentifier(e);const r=this._statements[this._statements.length-1];i(r.type==="ImportDeclaration");i(r.specifiers.length===0);r.specifiers=[f(t)];this._resultName=n(t);return this}default(e){const t=this._scope.generateUidIdentifier(e);const r=this._statements[this._statements.length-1];i(r.type==="ImportDeclaration");i(r.specifiers.length===0);r.specifiers=[u(t)];this._resultName=n(t);return this}named(e,t){if(t==="default")return this.default(e);const r=this._scope.generateUidIdentifier(e);const s=this._statements[this._statements.length-1];i(s.type==="ImportDeclaration");i(s.specifiers.length===0);s.specifiers=[p(r,l(t))];this._resultName=n(r);return this}var(e){const t=this._scope.generateUidIdentifier(e);let r=this._statements[this._statements.length-1];if(r.type!=="ExpressionStatement"){i(this._resultName);r=o(this._resultName);this._statements.push(r)}this._statements[this._statements.length-1]=_("var",[h(t,r.expression)]);this._resultName=n(t);return this}defaultInterop(){return this._interop(this._hub.addHelper("interopRequireDefault"))}wildcardInterop(){return this._interop(this._hub.addHelper("interopRequireWildcard"))}_interop(e){const t=this._statements[this._statements.length-1];if(t.type==="ExpressionStatement"){t.expression=a(e,[t.expression])}else if(t.type==="VariableDeclaration"){i(t.declarations.length===1);t.declarations[0].init=a(e,[t.declarations[0].init])}else{i.fail("Unexpected type.")}return this}prop(e){const t=this._statements[this._statements.length-1];if(t.type==="ExpressionStatement"){t.expression=c(t.expression,l(e))}else if(t.type==="VariableDeclaration"){i(t.declarations.length===1);t.declarations[0].init=c(t.declarations[0].init,l(e))}else{i.fail("Unexpected type:"+t.type)}return this}read(e){this._resultName=c(this._resultName,l(e))}}t["default"]=ImportBuilder},378:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=r(491);var s=r(638);var a=r(79);var n=r(898);const{numericLiteral:o,sequenceExpression:l}=s;class ImportInjector{constructor(e,t,r){this._defaultOpts={importedSource:null,importedType:"commonjs",importedInterop:"babel",importingInterop:"babel",ensureLiveReference:false,ensureNoContext:false,importPosition:"before"};const i=e.find((e=>e.isProgram()));this._programPath=i;this._programScope=i.scope;this._hub=i.hub;this._defaultOpts=this._applyDefaults(t,r,true)}addDefault(e,t){return this.addNamed("default",e,t)}addNamed(e,t,r){i(typeof e==="string");return this._generateImport(this._applyDefaults(t,r),e)}addNamespace(e,t){return this._generateImport(this._applyDefaults(e,t),null)}addSideEffect(e,t){return this._generateImport(this._applyDefaults(e,t),void 0)}_applyDefaults(e,t,r=false){let s;if(typeof e==="string"){s=Object.assign({},this._defaultOpts,{importedSource:e},t)}else{i(!t,"Unexpected secondary arguments.");s=Object.assign({},this._defaultOpts,e)}if(!r&&t){if(t.nameHint!==undefined)s.nameHint=t.nameHint;if(t.blockHoist!==undefined)s.blockHoist=t.blockHoist}return s}_generateImport(e,t){const r=t==="default";const i=!!t&&!r;const s=t===null;const{importedSource:d,importedType:u,importedInterop:f,importingInterop:p,ensureLiveReference:c,ensureNoContext:m,nameHint:_,importPosition:h,blockHoist:b}=e;let v=_||t;const g=(0,n.default)(this._programPath);const y=g&&p==="node";const I=g&&p==="babel";if(h==="after"&&!g){throw new Error(`"importPosition": "after" is only supported in modules`)}const N=new a.default(d,this._programScope,this._hub);if(u==="es6"){if(!y&&!I){throw new Error("Cannot import an ES6 module from CommonJS")}N.import();if(s){N.namespace(_||d)}else if(r||i){N.named(v,t)}}else if(u!=="commonjs"){throw new Error(`Unexpected interopType "${u}"`)}else if(f==="babel"){if(y){v=v!=="default"?v:d;const e=`${d}$es6Default`;N.import();if(s){N.default(e).var(v||d).wildcardInterop()}else if(r){if(c){N.default(e).var(v||d).defaultInterop().read("default")}else{N.default(e).var(v).defaultInterop().prop(t)}}else if(i){N.default(e).read(t)}}else if(I){N.import();if(s){N.namespace(v||d)}else if(r||i){N.named(v,t)}}else{N.require();if(s){N.var(v||d).wildcardInterop()}else if((r||i)&&c){if(r){v=v!=="default"?v:d;N.var(v).read(t);N.defaultInterop()}else{N.var(d).read(t)}}else if(r){N.var(v).defaultInterop().prop(t)}else if(i){N.var(v).prop(t)}}}else if(f==="compiled"){if(y){N.import();if(s){N.default(v||d)}else if(r||i){N.default(d).read(v)}}else if(I){N.import();if(s){N.namespace(v||d)}else if(r||i){N.named(v,t)}}else{N.require();if(s){N.var(v||d)}else if(r||i){if(c){N.var(d).read(v)}else{N.prop(t).var(v)}}}}else if(f==="uncompiled"){if(r&&c){throw new Error("No live reference for commonjs default")}if(y){N.import();if(s){N.default(v||d)}else if(r){N.default(v)}else if(i){N.default(d).read(v)}}else if(I){N.import();if(s){N.default(v||d)}else if(r){N.default(v)}else if(i){N.named(v,t)}}else{N.require();if(s){N.var(v||d)}else if(r){N.var(v)}else if(i){if(c){N.var(d).read(v)}else{N.var(v).prop(t)}}}}else{throw new Error(`Unknown importedInterop "${f}".`)}const{statements:w,resultName:x}=N.done();this._insertStatements(w,h,b);if((r||i)&&m&&x.type!=="Identifier"){return l([o(0),x])}return x}_insertStatements(e,t="before",r=3){const i=this._programPath.get("body");if(t==="after"){for(let t=i.length-1;t>=0;t--){if(i[t].isImportDeclaration()){i[t].insertAfter(e);return}}}else{e.forEach((e=>{e._blockHoist=r}));const t=i.find((e=>{const t=e.node._blockHoist;return Number.isFinite(t)&&t<4}));if(t){t.insertBefore(e);return}}this._programPath.unshiftContainer("body",e)}}t["default"]=ImportInjector},898:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=isModule;function isModule(e){return e.node.sourceType==="module"}}};var t={};function __nccwpck_require__(r){var i=t[r];if(i!==undefined){return i.exports}var s=t[r]={exports:{}};var a=true;try{e[r](s,s.exports,__nccwpck_require__);a=false}finally{if(a)delete t[r]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"ImportInjector",{enumerable:true,get:function(){return t.default}});e.addDefault=addDefault;e.addNamed=addNamed;e.addNamespace=addNamespace;e.addSideEffect=addSideEffect;Object.defineProperty(e,"isModule",{enumerable:true,get:function(){return i.default}});var t=__nccwpck_require__(378);var i=__nccwpck_require__(898);function addDefault(e,r,i){return new t.default(e).addDefault(r,i)}function addNamed(e,r,i,s){return new t.default(e).addNamed(r,i,s)}function addNamespace(e,r,i){return new t.default(e).addNamespace(r,i)}function addSideEffect(e,r,i){return new t.default(e).addSideEffect(r,i)}})();module.exports=r})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/license b/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/license deleted file mode 100644 index f31575ec773b..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/license +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/package.json b/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/package.json deleted file mode 100644 index f74aa5173cd0..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-module-imports/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@babel/helper-module-imports","author":"The Babel Team (https://babel.dev/team)","version":"7.22.15","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/index.d.ts b/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/index.js b/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/index.js deleted file mode 100644 index f0640fdb4bee..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e={};(()=>{var r=e;Object.defineProperty(r,"__esModule",{value:true});r.declare=declare;r.declarePreset=void 0;const t={assertVersion:e=>r=>{throwVersionError(r,e.version)}};{Object.assign(t,{targets:()=>()=>({}),assumption:()=>()=>undefined})}function declare(e){return(r,o,i)=>{var n;let s;for(const e of Object.keys(t)){var a;if(r[e])continue;(a=s)!=null?a:s=copyApiObject(r);s[e]=t[e](s)}return e((n=s)!=null?n:r,o||{},i)}}const o=declare;r.declarePreset=o;function copyApiObject(e){let r=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){r=Object.getPrototypeOf(e);if(r&&(!has(r,"version")||!has(r,"transform")||!has(r,"template")||!has(r,"types"))){r=null}}return Object.assign({},r,e)}function has(e,r){return Object.prototype.hasOwnProperty.call(e,r)}function throwVersionError(e,r){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const t=Error.stackTraceLimit;if(typeof t==="number"&&t<25){Error.stackTraceLimit=25}let o;if(r.slice(0,2)==="7."){o=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${r}". `+`You'll need to update your @babel/core version.`)}else{o=new Error(`Requires Babel "${e}", but was loaded with "${r}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof t==="number"){Error.stackTraceLimit=t}throw Object.assign(o,{code:"BABEL_VERSION_UNSUPPORTED",version:r,range:e})}})();module.exports=e})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/license b/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/license deleted file mode 100644 index f31575ec773b..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/license +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/package.json b/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/package.json deleted file mode 100644 index 46559dd7683f..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-plugin-utils/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@babel/helper-plugin-utils","author":"The Babel Team (https://babel.dev/team)","version":"7.22.5","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/index.d.ts b/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/index.js b/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/index.js deleted file mode 100644 index 4d2018551bb1..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={860:(e,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.isIdentifierChar=isIdentifierChar;r.isIdentifierName=isIdentifierName;r.isIdentifierStart=isIdentifierStart;let t="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";let i="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const n=new RegExp("["+t+"]");const s=new RegExp("["+t+i+"]");t=i=null;const d=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938];const u=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];function isInAstralSet(e,r){let t=65536;for(let i=0,n=r.length;ie)return false;t+=r[i+1];if(t>=e)return true}return false}function isIdentifierStart(e){if(e<65)return e===36;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&n.test(String.fromCharCode(e))}return isInAstralSet(e,d)}function isIdentifierChar(e){if(e<48)return e===36;if(e<58)return true;if(e<65)return false;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&s.test(String.fromCharCode(e))}return isInAstralSet(e,d)||isInAstralSet(e,u)}function isIdentifierName(e){let r=true;for(let t=0;t{Object.defineProperty(r,"__esModule",{value:true});r.isKeyword=isKeyword;r.isReservedWord=isReservedWord;r.isStrictBindOnlyReservedWord=isStrictBindOnlyReservedWord;r.isStrictBindReservedWord=isStrictBindReservedWord;r.isStrictReservedWord=isStrictReservedWord;const t={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]};const i=new Set(t.keyword);const n=new Set(t.strict);const s=new Set(t.strictBind);function isReservedWord(e,r){return r&&e==="await"||e==="enum"}function isStrictReservedWord(e,r){return isReservedWord(e,r)||n.has(e)}function isStrictBindOnlyReservedWord(e){return s.has(e)}function isStrictBindReservedWord(e,r){return isStrictReservedWord(e,r)||isStrictBindOnlyReservedWord(e)}function isKeyword(e){return i.has(e)}}};var r={};function __nccwpck_require__(t){var i=r[t];if(i!==undefined){return i.exports}var n=r[t]={exports:{}};var s=true;try{e[t](n,n.exports,__nccwpck_require__);s=false}finally{if(s)delete r[t]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t={};(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"isIdentifierChar",{enumerable:true,get:function(){return r.isIdentifierChar}});Object.defineProperty(e,"isIdentifierName",{enumerable:true,get:function(){return r.isIdentifierName}});Object.defineProperty(e,"isIdentifierStart",{enumerable:true,get:function(){return r.isIdentifierStart}});Object.defineProperty(e,"isKeyword",{enumerable:true,get:function(){return i.isKeyword}});Object.defineProperty(e,"isReservedWord",{enumerable:true,get:function(){return i.isReservedWord}});Object.defineProperty(e,"isStrictBindOnlyReservedWord",{enumerable:true,get:function(){return i.isStrictBindOnlyReservedWord}});Object.defineProperty(e,"isStrictBindReservedWord",{enumerable:true,get:function(){return i.isStrictBindReservedWord}});Object.defineProperty(e,"isStrictReservedWord",{enumerable:true,get:function(){return i.isStrictReservedWord}});var r=__nccwpck_require__(860);var i=__nccwpck_require__(501)})();module.exports=t})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/license b/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/license deleted file mode 100644 index f31575ec773b..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/license +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/package.json b/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/package.json deleted file mode 100644 index 0196031cd2ab..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/helper-validator-identifier/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@babel/helper-validator-identifier","author":"The Babel Team (https://babel.dev/team)","version":"7.16.7","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/index.d.ts b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/index.js b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/index.js deleted file mode 100644 index 7ba1f007f272..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/index.js +++ /dev/null @@ -1,23 +0,0 @@ -(()=>{"use strict";var e={308:e=>{e.exports=require("../helper-create-class-features-plugin")},345:e=>{e.exports=require("../helper-plugin-utils")},718:e=>{e.exports=require("@babel/core")},638:e=>{e.exports=require("@babel/types")},828:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;t.requeueComputedKeyAndDecorators=requeueComputedKeyAndDecorators;{{{t.skipAllButComputedKey=function skipAllButComputedKey(e){e.skip();if(e.node.computed){e.context.maybeQueue(e.get("key"))}}}}}function requeueComputedKeyAndDecorators(e){const{context:t,node:s}=e;if(s.computed){t.maybeQueue(e.get("key"))}if(s.decorators){for(const s of e.get("decorators")){t.maybeQueue(s)}}}const s={FunctionParent(e){if(e.isArrowFunctionExpression()){return}else{e.skip();if(e.isMethod()){requeueComputedKeyAndDecorators(e)}}},Property(e){if(e.isObjectProperty()){return}e.skip();requeueComputedKeyAndDecorators(e)}};var r=s;t["default"]=r},621:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});var r=s(638);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(s){if(s!=="default"){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:true,get:function(){return e[s]}})}}))}t.default=e;return Object.freeze(t)}var o=_interopNamespace(r);function willPathCastToBoolean(e){const t=e;const{node:s,parentPath:r}=t;if(r.isLogicalExpression()){const{operator:e,right:t}=r.node;if(e==="&&"||e==="||"||e==="??"&&s===t){return willPathCastToBoolean(r)}}if(r.isSequenceExpression()){const{expressions:e}=r.node;if(e[e.length-1]===s){return willPathCastToBoolean(r)}else{return true}}return r.isConditional({test:s})||r.isUnaryExpression({operator:"!"})||r.isLoop({test:s})}const{LOGICAL_OPERATORS:n,arrowFunctionExpression:i,assignmentExpression:a,binaryExpression:p,booleanLiteral:l,callExpression:c,cloneNode:d,conditionalExpression:u,identifier:f,isMemberExpression:y,isOptionalCallExpression:h,isOptionalMemberExpression:m,isUpdateExpression:g,logicalExpression:x,memberExpression:E,nullLiteral:b,optionalCallExpression:v,optionalMemberExpression:P,sequenceExpression:C,updateExpression:D}=o;class AssignmentMemoiser{constructor(){this._map=void 0;this._map=new WeakMap}has(e){return this._map.has(e)}get(e){if(!this.has(e))return;const t=this._map.get(e);const{value:s}=t;t.count--;if(t.count===0){return a("=",s,e)}return s}set(e,t,s){return this._map.set(e,{count:s,value:t})}}function toNonOptional(e,t){const{node:s}=e;if(m(s)){return E(t,s.property,s.computed)}if(e.isOptionalCallExpression()){const s=e.get("callee");if(e.node.optional&&s.isOptionalMemberExpression()){const r=s.node.object;const o=e.scope.maybeGenerateMemoised(r);s.get("object").replaceWith(a("=",o,r));return c(E(t,f("call")),[o,...e.node.arguments])}return c(t,e.node.arguments)}return e.node}function isInDetachedTree(e){while(e){if(e.isProgram())break;const{parentPath:t,container:s,listKey:r}=e;const o=t.node;if(r){if(s!==o[r]){return true}}else{if(s!==o)return true}e=t}return false}const S={memoise(){},handle(e,t){const{node:s,parent:r,parentPath:o,scope:E}=e;if(e.isOptionalMemberExpression()){if(isInDetachedTree(e))return;const n=e.find((({node:t,parent:s})=>{if(m(s)){return s.optional||s.object!==t}if(h(s)){return t!==e.node&&s.optional||s.callee!==t}return true}));if(E.path.isPattern()){n.replaceWith(c(i([],n.node),[]));return}const g=willPathCastToBoolean(n);const C=n.parentPath;if(C.isUpdateExpression({argument:s})||C.isAssignmentExpression({left:s})){throw e.buildCodeFrameError(`can't handle assignment`)}const D=C.isUnaryExpression({operator:"delete"});if(D&&n.isOptionalMemberExpression()&&n.get("property").isPrivateName()){throw e.buildCodeFrameError(`can't delete a private class element`)}let S=e;for(;;){if(S.isOptionalMemberExpression()){if(S.node.optional)break;S=S.get("object");continue}else if(S.isOptionalCallExpression()){if(S.node.optional)break;S=S.get("callee");continue}throw new Error(`Internal error: unexpected ${S.node.type}`)}const _=S.isOptionalMemberExpression()?S.node.object:S.node.callee;const N=E.maybeGenerateMemoised(_);const O=N!=null?N:_;const k=o.isOptionalCallExpression({callee:s});const isOptionalCall=e=>k;const w=o.isCallExpression({callee:s});S.replaceWith(toNonOptional(S,O));if(isOptionalCall()){if(r.optional){o.replaceWith(this.optionalCall(e,r.arguments))}else{o.replaceWith(this.call(e,r.arguments))}}else if(w){e.replaceWith(this.boundGet(e))}else if(this.delete&&o.isUnaryExpression({operator:"delete"})){o.replaceWith(this.delete(e))}else{e.replaceWith(this.get(e))}let A=e.node;for(let t=e;t!==n;){const e=t.parentPath;if(e===n&&isOptionalCall()&&r.optional){A=e.node;break}A=toNonOptional(e,A);t=e}let M;const j=n.parentPath;if(y(A)&&j.isOptionalCallExpression({callee:n.node,optional:true})){const{object:t}=A;M=e.scope.maybeGenerateMemoised(t);if(M){A.object=a("=",M,t)}}let T=n;if(D){T=j;A=j.node}const R=N?a("=",d(O),d(_)):d(O);if(g){let e;if(t){e=p("!=",R,b())}else{e=x("&&",p("!==",R,b()),p("!==",d(O),E.buildUndefinedNode()))}T.replaceWith(x("&&",e,A))}else{let e;if(t){e=p("==",R,b())}else{e=x("||",p("===",R,b()),p("===",d(O),E.buildUndefinedNode()))}T.replaceWith(u(e,D?l(true):E.buildUndefinedNode(),A))}if(M){const e=j.node;j.replaceWith(v(P(e.callee,f("call"),false,true),[d(M),...e.arguments],false))}return}if(g(r,{argument:s})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,prefix:n}=r;this.memoise(e,2);const i=E.generateUidIdentifierBasedOnNode(s);E.push({id:i});const p=[a("=",d(i),this.get(e))];if(n){p.push(D(t,d(i),n));const s=C(p);o.replaceWith(this.set(e,s));return}else{const r=E.generateUidIdentifierBasedOnNode(s);E.push({id:r});p.push(a("=",d(r),D(t,d(i),n)),d(i));const l=C(p);o.replaceWith(C([this.set(e,l),d(r)]));return}}if(o.isAssignmentExpression({left:s})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,right:s}=o.node;if(t==="="){o.replaceWith(this.set(e,s))}else{const r=t.slice(0,-1);if(n.includes(r)){this.memoise(e,1);o.replaceWith(x(r,this.get(e),this.set(e,s)))}else{this.memoise(e,2);o.replaceWith(this.set(e,p(r,this.get(e),s)))}}return}if(o.isCallExpression({callee:s})){o.replaceWith(this.call(e,o.node.arguments));return}if(o.isOptionalCallExpression({callee:s})){if(E.path.isPattern()){o.replaceWith(c(i([],o.node),[]));return}o.replaceWith(this.optionalCall(e,o.node.arguments));return}if(this.delete&&o.isUnaryExpression({operator:"delete"})){o.replaceWith(this.delete(e));return}if(o.isForXStatement({left:s})||o.isObjectProperty({value:s})&&o.parentPath.isObjectPattern()||o.isAssignmentPattern({left:s})&&o.parentPath.isObjectProperty({value:r})&&o.parentPath.parentPath.isObjectPattern()||o.isArrayPattern()||o.isAssignmentPattern({left:s})&&o.parentPath.isArrayPattern()||o.isRestElement()){e.replaceWith(this.destructureSet(e));return}if(o.isTaggedTemplateExpression()){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}}};function memberExpressionToFunctions(e,t,s){e.traverse(t,Object.assign({},S,s,{memoiser:new AssignmentMemoiser}))}t["default"]=memberExpressionToFunctions},756:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=optimiseCallExpression;var r=s(638);const{callExpression:o,identifier:n,isIdentifier:i,isSpreadElement:a,memberExpression:p,optionalCallExpression:l,optionalMemberExpression:c}=r;function optimiseCallExpression(e,t,s,r){if(s.length===1&&a(s[0])&&i(s[0].argument,{name:"arguments"})){if(r){return l(c(e,n("apply"),false,true),[t,s[0].argument],false)}return o(p(e,n("apply")),[t,s[0].argument])}else{if(r){return l(c(e,n("call"),false,true),[t,...s],false)}return o(p(e,n("call")),[t,...s])}}},513:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=s(828);var o=s(621);var n=s(756);var i=s(718);const{assignmentExpression:a,booleanLiteral:p,callExpression:l,cloneNode:c,identifier:d,memberExpression:u,sequenceExpression:f,stringLiteral:y,thisExpression:h}=i.types;{{{const e=s(828);t.environmentVisitor=e.default;t.skipAllButComputedKey=e.skipAllButComputedKey}}}function getPrototypeOfExpression(e,t,s,r){e=c(e);const o=t||r?e:u(e,d("prototype"));return l(s.addHelper("getPrototypeOf"),[o])}const m=i.traverse.visitors.merge([r.default,{Super(e,t){const{node:s,parentPath:r}=e;if(!r.isMemberExpression({object:s}))return;t.handle(r)}}]);const g=i.traverse.visitors.merge([r.default,{Scopable(e,{refName:t}){const s=e.scope.getOwnBinding(t);if(s&&s.identifier.name===t){e.scope.rename(t)}}}]);const x={memoise(e,t){const{scope:s,node:r}=e;const{computed:o,property:n}=r;if(!o){return}const i=s.maybeGenerateMemoised(n);if(!i){return}this.memoiser.set(n,i,t)},prop(e){const{computed:t,property:s}=e.node;if(this.memoiser.has(s)){return c(this.memoiser.get(s))}if(t){return c(s)}return y(s.name)},get(e){return this._get(e,this._getThisRefs())},_get(e,t){const s=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return l(this.file.addHelper("get"),[t.memo?f([t.memo,s]):s,this.prop(e),t.this])},_getThisRefs(){if(!this.isDerivedConstructor){return{this:h()}}const e=this.scope.generateDeclaredUidIdentifier("thisSuper");return{memo:a("=",e,h()),this:c(e)}},set(e,t){const s=this._getThisRefs();const r=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return l(this.file.addHelper("set"),[s.memo?f([s.memo,r]):r,this.prop(e),t,s.this,p(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError(`Destructuring to a super field is not supported yet.`)},call(e,t){const s=this._getThisRefs();return(0,n.default)(this._get(e,s),c(s.this),t,false)},optionalCall(e,t){const s=this._getThisRefs();return(0,n.default)(this._get(e,s),c(s.this),t,true)},delete(e){if(e.node.computed){return f([l(this.file.addHelper("toPropertyKey"),[c(e.node.property)]),i.template.expression.ast` - function () { throw new ReferenceError("'delete super[expr]' is invalid"); }() - `])}else{return i.template.expression.ast` - function () { throw new ReferenceError("'delete super.prop' is invalid"); }() - `}}};const E=Object.assign({},x,{prop(e){const{property:t}=e.node;if(this.memoiser.has(t)){return c(this.memoiser.get(t))}return c(t)},get(e){const{isStatic:t,getSuperRef:s}=this;const{computed:r}=e.node;const o=this.prop(e);let n;if(t){var i;n=(i=s())!=null?i:u(d("Function"),d("prototype"))}else{var a;n=u((a=s())!=null?a:d("Object"),d("prototype"))}return u(n,o,r)},set(e,t){const{computed:s}=e.node;const r=this.prop(e);return a("=",u(h(),r,s),t)},destructureSet(e){const{computed:t}=e.node;const s=this.prop(e);return u(h(),s,t)},call(e,t){return(0,n.default)(this.get(e),h(),t,false)},optionalCall(e,t){return(0,n.default)(this.get(e),h(),t,true)}});class ReplaceSupers{constructor(e){var t;const s=e.methodPath;this.methodPath=s;this.isDerivedConstructor=s.isClassMethod({kind:"constructor"})&&!!e.superRef;this.isStatic=s.isObjectMethod()||s.node.static||(s.isStaticBlock==null?void 0:s.isStaticBlock());this.isPrivateMethod=s.isPrivate()&&s.isMethod();this.file=e.file;this.constantSuper=(t=e.constantSuper)!=null?t:e.isLoose;this.opts=e}getObjectRef(){return c(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){if(this.opts.superRef)return c(this.opts.superRef);if(this.opts.getSuperRef){return c(this.opts.getSuperRef())}}replace(){if(this.opts.refToPreserve){this.methodPath.traverse(g,{refName:this.opts.refToPreserve.name})}const e=this.constantSuper?E:x;(0,o.default)(this.methodPath,m,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:e.get},e))}}t["default"]=ReplaceSupers},605:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=splitExportDeclaration;var r=s(638);const{cloneNode:o,exportNamedDeclaration:n,exportSpecifier:i,identifier:a,variableDeclaration:p,variableDeclarator:l}=r;function splitExportDeclaration(e){if(!e.isExportDeclaration()||e.isExportAllDeclaration()){throw new Error("Only default and named export declarations can be split.")}if(e.isExportDefaultDeclaration()){const t=e.get("declaration");const s=t.isFunctionDeclaration()||t.isClassDeclaration();const r=t.isFunctionExpression()||t.isClassExpression();const c=t.isScope()?t.scope.parent:t.scope;let d=t.node.id;let u=false;if(!d){u=true;d=c.generateUidIdentifier("default");if(s||r){t.node.id=o(d)}}else if(r&&c.hasBinding(d.name)){u=true;d=c.generateUidIdentifier(d.name)}const f=s?t.node:p("var",[l(o(d),t.node)]);const y=n(null,[i(o(d),a("default"))]);e.insertAfter(y);e.replaceWith(f);if(u){c.registerDeclaration(e)}return e}else if(e.get("specifiers").length>0){throw new Error("It doesn't make sense to split exported specifiers.")}const t=e.get("declaration");const s=t.getOuterBindingIdentifiers();const r=Object.keys(s).map((e=>i(a(e),a(e))));const c=n(null,r);e.insertAfter(c);e.replaceWith(t.node);return e}},859:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var r=s(718);var o=s(273);var n=s(513);var i=s(605);function incrementId(e,t=e.length-1){if(t===-1){e.unshift(65);return}const s=e[t];if(s===90){e[t]=97}else if(s===122){e[t]=65;incrementId(e,t-1)}else{e[t]=s+1}}function createPrivateUidGeneratorForClass(e){const t=[];const s=new Set;e.traverse({PrivateName(e){s.add(e.node.id.name)}});return()=>{let e;do{incrementId(t);e=String.fromCharCode(...t)}while(s.has(e));return r.types.privateName(r.types.identifier(e))}}function createLazyPrivateUidGeneratorForClass(e){let t;return()=>{if(!t){t=createPrivateUidGeneratorForClass(e)}return t()}}function replaceClassWithVar(e){if(e.type==="ClassDeclaration"){const t=e.scope.generateUidIdentifierBasedOnNode(e.node.id);const s=r.types.identifier(e.node.id.name);e.scope.rename(s.name,t.name);e.insertBefore(r.types.variableDeclaration("let",[r.types.variableDeclarator(t)]));e.get("id").replaceWith(s);return[r.types.cloneNode(t),e]}else{let t;let s;if(e.node.id){t=e.node.id.name;s=e.scope.parent.generateDeclaredUidIdentifier(t);e.scope.rename(t,s.name)}else if(e.parentPath.node.type==="VariableDeclarator"&&e.parentPath.node.id.type==="Identifier"){t=e.parentPath.node.id.name;s=e.scope.parent.generateDeclaredUidIdentifier(t)}else{s=e.scope.parent.generateDeclaredUidIdentifier("decorated_class")}const o=r.types.classExpression(t&&r.types.identifier(t),e.node.superClass,e.node.body);const[n]=e.replaceWith(r.types.sequenceExpression([o,s]));return[r.types.cloneNode(s),n.get("expressions.0")]}}function generateClassProperty(e,t,s){if(e.type==="PrivateName"){return r.types.classPrivateProperty(e,t,undefined,s)}else{return r.types.classProperty(e,t,undefined,undefined,s)}}function addProxyAccessorsFor(e,t,s,o,n,i=false){const{static:a}=t.node;const p=n==="2023-05"&&a?e:r.types.thisExpression();const l=r.types.blockStatement([r.types.returnStatement(r.types.memberExpression(r.types.cloneNode(p),r.types.cloneNode(o)))]);const c=r.types.blockStatement([r.types.expressionStatement(r.types.assignmentExpression("=",r.types.memberExpression(r.types.cloneNode(p),r.types.cloneNode(o)),r.types.identifier("v")))]);let d,u;if(s.type==="PrivateName"){d=r.types.classPrivateMethod("get",r.types.cloneNode(s),[],l,a);u=r.types.classPrivateMethod("set",r.types.cloneNode(s),[r.types.identifier("v")],c,a)}else{d=r.types.classMethod("get",r.types.cloneNode(s),[],l,i,a);u=r.types.classMethod("set",r.types.cloneNode(s),[r.types.identifier("v")],c,i,a)}t.insertAfter(u);t.insertAfter(d)}function extractProxyAccessorsFor(e,t){if(t!=="2023-05"&&t!=="2023-01"){return[r.template.expression.ast` - function () { - return this.${r.types.cloneNode(e)}; - } - `,r.template.expression.ast` - function (value) { - this.${r.types.cloneNode(e)} = value; - } - `]}return[r.template.expression.ast` - o => o.${r.types.cloneNode(e)} - `,r.template.expression.ast` - (o, v) => o.${r.types.cloneNode(e)} = v - `]}const a=0;const p=1;const l=2;const c=3;const d=4;const u=5;const f=8;const y=16;function getElementKind(e){switch(e.node.type){case"ClassProperty":case"ClassPrivateProperty":return a;case"ClassAccessorProperty":return p;case"ClassMethod":case"ClassPrivateMethod":if(e.node.kind==="get"){return c}else if(e.node.kind==="set"){return d}else{return l}}}function isDecoratorInfo(e){return"decorators"in e}function filteredOrderedDecoratorInfo(e){const t=e.filter(isDecoratorInfo);return[...t.filter((e=>e.isStatic&&e.kind>=p&&e.kind<=d)),...t.filter((e=>!e.isStatic&&e.kind>=p&&e.kind<=d)),...t.filter((e=>e.isStatic&&e.kind===a)),...t.filter((e=>!e.isStatic&&e.kind===a))]}function generateDecorationList(e,t,s){const o=e.length;const n=t.some(Boolean);const i=[];for(let a=0;a{const{decs:s,hasThis:o}=generateDecorationList(e.decorators,e.decoratorsThis,t);let n=e.kind;if(e.isStatic){n+=t==="2023-05"?f:u}if(o)n+=y;return r.types.arrayExpression([s.length===1?s[0]:r.types.arrayExpression(s),r.types.numericLiteral(n),e.name,...e.privateMethods||[]])})))}function extractElementLocalAssignments(e){const t=[];for(const s of filteredOrderedDecoratorInfo(e)){const{locals:e}=s;if(Array.isArray(e)){t.push(...e)}else if(e!==undefined){t.push(e)}}return t}function addCallAccessorsFor(e,t,s,o){e.insertAfter(r.types.classPrivateMethod("get",r.types.cloneNode(t),[],r.types.blockStatement([r.types.returnStatement(r.types.callExpression(r.types.cloneNode(s),[r.types.thisExpression()]))])));e.insertAfter(r.types.classPrivateMethod("set",r.types.cloneNode(t),[r.types.identifier("v")],r.types.blockStatement([r.types.expressionStatement(r.types.callExpression(r.types.cloneNode(o),[r.types.thisExpression(),r.types.identifier("v")]))])))}function isNotTsParameter(e){return e.type!=="TSParameterProperty"}function movePrivateAccessor(e,t,s,o){let n;let i;if(e.node.kind==="set"){n=[r.types.identifier("v")];i=[r.types.expressionStatement(r.types.callExpression(s,[r.types.thisExpression(),r.types.identifier("v")]))]}else{n=[];i=[r.types.returnStatement(r.types.callExpression(s,[r.types.thisExpression()]))]}e.replaceWith(r.types.classPrivateMethod(e.node.kind,r.types.cloneNode(t),n,r.types.blockStatement(i),o))}function isClassDecoratableElementPath(e){const{type:t}=e;return t!=="TSDeclareMethod"&&t!=="TSIndexSignature"&&t!=="StaticBlock"}function staticBlockToIIFE(e){return r.types.callExpression(r.types.arrowFunctionExpression([],r.types.blockStatement(e.body)),[])}function maybeSequenceExpression(e){if(e.length===0)return r.types.unaryExpression("void",r.types.numericLiteral(0));if(e.length===1)return e[0];return r.types.sequenceExpression(e)}function transformClass(e,t,s,o){const i=e.get("body.body");const l=e.node.decorators;let u=false;const f=createLazyPrivateUidGeneratorForClass(e);for(const t of i){if(!isClassDecoratableElementPath(t)){continue}if(t.node.decorators&&t.node.decorators.length>0){u=true}else if(t.node.type==="ClassAccessorProperty"){const{key:s,value:n,static:i,computed:a}=t.node;const p=f();const l=n?r.types.cloneNode(n):undefined;const c=generateClassProperty(p,l,i);const[d]=t.replaceWith(c);addProxyAccessorsFor(e.node.id,d,s,p,o,a)}}if(!l&&!u)return;const y=[];let h;let m;let g=false;let x=false;const E=new Set;let b,v,P,C;const D=[];const S=e.scope.parent;const memoiseExpression=(e,t)=>{const s=S.generateDeclaredUidIdentifier(t);D.push(r.types.assignmentExpression("=",s,e));return r.types.cloneNode(s)};const _=new Map;const maybeExtractDecorator=e=>{const{expression:t}=e;if(o==="2023-05"&&r.types.isMemberExpression(t)){let s;if(r.types.isSuper(t.object)||r.types.isThisExpression(t.object)){s=memoiseExpression(r.types.thisExpression(),"obj")}else if(!S.isStatic(t.object)){s=memoiseExpression(t.object,"obj");t.object=s}else{s=t.object}_.set(e,r.types.cloneNode(s))}if(!S.isStatic(t)){e.expression=memoiseExpression(t,"dec")}};if(l){P=S.generateDeclaredUidIdentifier("initClass");const[t,s]=replaceClassWithVar(e);e=s;C=t;e.node.decorators=null;for(const e of l){maybeExtractDecorator(e)}}else{if(!e.node.id){e.node.id=e.scope.generateUidIdentifier("Class")}C=r.types.cloneNode(e.node.id)}let N;let O=false;if(u){for(const l of i){if(!isClassDecoratableElementPath(l)){continue}const{node:i}=l;const u=l.get("decorators");const b=Array.isArray(u)&&u.length>0;if(b){for(const e of u){maybeExtractDecorator(e.node)}}const v="computed"in l.node&&l.node.computed===true;if(v){if(!S.isStatic(i.key)){i.key=memoiseExpression(i.key,"computedKey")}}const P=getElementKind(l);const{key:D}=i;const k=D.type==="PrivateName";const w=!!l.node.static;let A="computedKey";if(k){A=D.id.name}else if(!v&&D.type==="Identifier"){A=D.name}if(k&&!w){if(b){O=true}if(r.types.isClassPrivateProperty(i)||!N){N=D}}if(l.isClassMethod({kind:"constructor"})){m=l}if(b){let i;let m;if(P===p){const{value:t}=l.node;const s=[r.types.thisExpression()];if(t){s.push(r.types.cloneNode(t))}const n=f();const a=l.scope.parent.generateDeclaredUidIdentifier(`init_${A}`);const p=r.types.callExpression(r.types.cloneNode(a),s);const c=generateClassProperty(n,p,w);const[d]=l.replaceWith(c);if(k){m=extractProxyAccessorsFor(n,o);const e=d.scope.parent.generateDeclaredUidIdentifier(`get_${A}`);const t=d.scope.parent.generateDeclaredUidIdentifier(`set_${A}`);addCallAccessorsFor(d,D,e,t);i=[a,e,t]}else{addProxyAccessorsFor(e.node.id,d,D,n,o,v);i=a}}else if(P===a){const e=l.scope.parent.generateDeclaredUidIdentifier(`init_${A}`);const t=l.get("value");t.replaceWith(r.types.callExpression(r.types.cloneNode(e),[r.types.thisExpression(),t.node].filter((e=>e))));i=e;if(k){m=extractProxyAccessorsFor(D,o)}}else if(k){i=l.scope.parent.generateDeclaredUidIdentifier(`call_${A}`);const o=new n.default({constantSuper:s,methodPath:l,objectRef:C,superRef:e.node.superClass,file:t.file,refToPreserve:C});o.replace();const{params:a,body:p,async:u}=l.node;m=[r.types.functionExpression(undefined,a.filter(isNotTsParameter),p,u)];if(P===c||P===d){movePrivateAccessor(l,r.types.cloneNode(D),r.types.cloneNode(i),w)}else{const t=l.node;e.node.body.body.unshift(r.types.classPrivateProperty(D,r.types.cloneNode(i),[],t.static));E.add(D.id.name);l.remove()}}let b;if(v){b=r.types.cloneNode(D)}else if(D.type==="PrivateName"){b=r.types.stringLiteral(D.id.name)}else if(D.type==="Identifier"){b=r.types.stringLiteral(D.name)}else{b=r.types.cloneNode(D)}y.push({kind:P,decorators:u.map((e=>e.node.expression)),decoratorsThis:u.map((e=>_.get(e.node))),name:b,isStatic:w,privateMethods:m,locals:i});if(P!==a){if(w){x=true}else{g=true}}if(l.node){l.node.decorators=null}if(!h&&!w&&(P===a||P===p)){h=l}}}}const k=generateDecorationExprs(y,o);let w=0;let A=[];if(l){const{hasThis:e,decs:t}=generateDecorationList(l.map((e=>e.expression)),l.map((e=>_.get(e))),o);w=e?1:0;A=t}const M=extractElementLocalAssignments(y);if(g){b=S.generateDeclaredUidIdentifier("initProto");M.push(b);const t=r.types.callExpression(r.types.cloneNode(b),[r.types.thisExpression()]);if(h){const e=h.get("value");const s=[t];if(e.node){s.push(e.node)}e.replaceWith(r.types.sequenceExpression(s))}else if(m){if(e.node.superClass){e.traverse({CallExpression:{exit(e){if(!e.get("callee").isSuper())return;e.replaceWith(r.types.callExpression(r.types.cloneNode(b),[e.node]));e.skip()}}})}else{m.node.body.body.unshift(r.types.expressionStatement(t))}}else{const s=[r.types.expressionStatement(t)];if(e.node.superClass){s.unshift(r.types.expressionStatement(r.types.callExpression(r.types.super(),[r.types.spreadElement(r.types.identifier("args"))])))}e.node.body.body.unshift(r.types.classMethod("constructor",r.types.identifier("constructor"),[r.types.restElement(r.types.identifier("args"))],r.types.blockStatement(s)))}}if(x){v=S.generateDeclaredUidIdentifier("initStatic");M.push(v)}if(E.size>0){e.traverse({PrivateName(e){if(!E.has(e.node.id.name))return;const t=e.parentPath;const s=t.parentPath;if(s.node.type==="AssignmentExpression"&&s.node.left===t.node||s.node.type==="UpdateExpression"||s.node.type==="RestElement"||s.node.type==="ArrayPattern"||s.node.type==="ObjectProperty"&&s.node.value===t.node&&s.parentPath.type==="ObjectPattern"||s.node.type==="ForOfStatement"&&s.node.left===t.node){throw e.buildCodeFrameError(`Decorated private methods are not updatable, but "#${e.node.id.name}" is updated via this expression.`)}}})}const j=[];let T=false;const R=P&&r.types.callExpression(r.types.cloneNode(P),[]);const I=e.node;if(l){j.push(C,P);const s=[];let o=[];e.get("body.body").forEach((e=>{if(e.isStaticBlock()){o.push(e.node);e.remove();return}const t=e.isClassProperty()||e.isClassPrivateProperty();if((t||e.isClassPrivateMethod())&&e.node.static){if(t&&o.length>0){const t=o.map(staticBlockToIIFE);if(e.node.value)t.push(e.node.value);e.node.value=maybeSequenceExpression(t);o=[]}e.node.static=false;s.push(e.node);e.remove()}}));if(s.length>0||o.length>0){const n=r.template.expression.ast` - class extends ${t.addHelper("identity")} {} - `;n.body.body=[r.types.staticBlock([r.types.toStatement(I,true)||r.types.expressionStatement(I)]),...s];const i=[];const a=r.types.newExpression(n,[]);if(o.length>0){i.push(...o.map(staticBlockToIIFE))}if(R){T=true;i.push(R)}if(i.length>0){i.unshift(r.types.callExpression(r.types.super(),[r.types.cloneNode(C)]));n.body.body.push(r.types.classMethod("constructor",r.types.identifier("constructor"),[],r.types.blockStatement([r.types.expressionStatement(r.types.sequenceExpression(i))])))}else{a.arguments.push(r.types.cloneNode(C))}e.replaceWith(a)}}if(!T&&R){e.node.body.body.push(r.types.staticBlock([r.types.expressionStatement(R)]))}I.body.body.unshift(r.types.staticBlock([r.types.expressionStatement(createLocalsAssignment(M,j,k,r.types.arrayExpression(A),r.types.numericLiteral(w),O?N:null,t,o)),x&&r.types.expressionStatement(r.types.callExpression(r.types.cloneNode(v),[r.types.thisExpression()]))].filter(Boolean)));e.insertBefore(D.map((e=>r.types.expressionStatement(e))));e.scope.crawl();return e}function createLocalsAssignment(e,t,s,o,n,i,a,p){let l,c;const d=[r.types.thisExpression(),s,o];{if(p==="2021-12"||p==="2022-03"&&!a.availableHelper("applyDecs2203R")){const s=r.types.arrayPattern([...e,...t]);const o=r.types.callExpression(a.addHelper(p==="2021-12"?"applyDecs":"applyDecs2203"),d);return r.types.assignmentExpression("=",s,o)}}if(p==="2023-05"){if(i||n.value!==0){d.push(n)}if(i){d.push(r.template.expression.ast` - _ => ${r.types.cloneNode(i)} in _ - `)}c=r.types.callExpression(a.addHelper("applyDecs2305"),d)}else if(p==="2023-01"){if(i){d.push(r.template.expression.ast` - _ => ${r.types.cloneNode(i)} in _ - `)}c=r.types.callExpression(a.addHelper("applyDecs2301"),d)}else{c=r.types.callExpression(a.addHelper("applyDecs2203R"),d)}if(e.length>0){if(t.length>0){l=r.types.objectPattern([r.types.objectProperty(r.types.identifier("e"),r.types.arrayPattern(e)),r.types.objectProperty(r.types.identifier("c"),r.types.arrayPattern(t))])}else{l=r.types.arrayPattern(e);c=r.types.memberExpression(c,r.types.identifier("e"),false,false)}}else{l=r.types.arrayPattern(t);c=r.types.memberExpression(c,r.types.identifier("c"),false,false)}return r.types.assignmentExpression("=",l,c)}function _default({assertVersion:e,assumption:t},{loose:s},r){var n;{if(r==="2023-05"||r==="2023-01"){e("^7.21.0")}else if(r==="2021-12"){e("^7.16.0")}else{e("^7.19.0")}}const a=new WeakSet;const p=(n=t("constantSuper"))!=null?n:s;return{name:"proposal-decorators",inherits:o.default,visitor:{"ExportNamedDeclaration|ExportDefaultDeclaration"(e){var t;const{declaration:s}=e.node;if((s==null?void 0:s.type)==="ClassDeclaration"&&((t=s.decorators)==null?void 0:t.length)>0){(0,i.default)(e)}},Class(e,t){if(a.has(e))return;const s=transformClass(e,t,p,r);if(s)a.add(s)}}}}},765:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=s(718);const o=r.template.statement(`\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n`);const n=(0,r.template)(`\n CLASS_REF.prototype;\n`);const i=(0,r.template)(`\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n`);const a=(0,r.template)(`\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n`);const p=new WeakSet;function applyEnsureOrdering(e){const t=(e.isClass()?[e,...e.get("body.body")]:e.get("properties")).reduce(((e,t)=>e.concat(t.node.decorators||[])),[]);const s=t.filter((e=>!r.types.isIdentifier(e.expression)));if(s.length===0)return;return r.types.sequenceExpression(s.map((t=>{const s=t.expression;const o=t.expression=e.scope.generateDeclaredUidIdentifier("dec");return r.types.assignmentExpression("=",o,s)})).concat([e.node]))}function applyClassDecorators(e){if(!hasClassDecorators(e.node))return;const t=e.node.decorators||[];e.node.decorators=null;const s=e.scope.generateDeclaredUidIdentifier("class");return t.map((e=>e.expression)).reverse().reduce((function(e,t){return o({CLASS_REF:r.types.cloneNode(s),DECORATOR:r.types.cloneNode(t),INNER:e}).expression}),e.node)}function hasClassDecorators(e){var t;return!!((t=e.decorators)!=null&&t.length)}function applyMethodDecorators(e,t){if(!hasMethodDecorators(e.node.body.body))return;return applyTargetDecorators(e,t,e.node.body.body)}function hasMethodDecorators(e){return e.some((e=>{var t;return(t=e.decorators)==null?void 0:t.length}))}function applyObjectDecorators(e,t){if(!hasMethodDecorators(e.node.properties))return;return applyTargetDecorators(e,t,e.node.properties.filter((e=>e.type!=="SpreadElement")))}function applyTargetDecorators(e,t,s){const o=e.scope.generateDeclaredUidIdentifier(e.isClass()?"class":"obj");const l=s.reduce((function(s,l){let c=[];if(l.decorators!=null){c=l.decorators;l.decorators=null}if(c.length===0)return s;if(l.computed){throw e.buildCodeFrameError("Computed method/property decorators are not yet supported.")}const d=r.types.isLiteral(l.key)?l.key:r.types.stringLiteral(l.key.name);const u=e.isClass()&&!l.static?n({CLASS_REF:o}).expression:o;if(r.types.isClassProperty(l,{static:false})){const o=e.scope.generateDeclaredUidIdentifier("descriptor");const n=l.value?r.types.functionExpression(null,[],r.types.blockStatement([r.types.returnStatement(l.value)])):r.types.nullLiteral();l.value=r.types.callExpression(t.addHelper("initializerWarningHelper"),[o,r.types.thisExpression()]);p.add(l.value);s.push(r.types.assignmentExpression("=",r.types.cloneNode(o),r.types.callExpression(t.addHelper("applyDecoratedDescriptor"),[r.types.cloneNode(u),r.types.cloneNode(d),r.types.arrayExpression(c.map((e=>r.types.cloneNode(e.expression)))),r.types.objectExpression([r.types.objectProperty(r.types.identifier("configurable"),r.types.booleanLiteral(true)),r.types.objectProperty(r.types.identifier("enumerable"),r.types.booleanLiteral(true)),r.types.objectProperty(r.types.identifier("writable"),r.types.booleanLiteral(true)),r.types.objectProperty(r.types.identifier("initializer"),n)])])))}else{s.push(r.types.callExpression(t.addHelper("applyDecoratedDescriptor"),[r.types.cloneNode(u),r.types.cloneNode(d),r.types.arrayExpression(c.map((e=>r.types.cloneNode(e.expression)))),r.types.isObjectProperty(l)||r.types.isClassProperty(l,{static:true})?a({TEMP:e.scope.generateDeclaredUidIdentifier("init"),TARGET:r.types.cloneNode(u),PROPERTY:r.types.cloneNode(d)}).expression:i({TARGET:r.types.cloneNode(u),PROPERTY:r.types.cloneNode(d)}).expression,r.types.cloneNode(u)]))}return s}),[]);return r.types.sequenceExpression([r.types.assignmentExpression("=",r.types.cloneNode(o),e.node),r.types.sequenceExpression(l),r.types.cloneNode(o)])}function decoratedClassToExpression({node:e,scope:t}){if(!hasClassDecorators(e)&&!hasMethodDecorators(e.body.body)){return}const s=e.id?r.types.cloneNode(e.id):t.generateUidIdentifier("class");return r.types.variableDeclaration("let",[r.types.variableDeclarator(s,r.types.toExpression(e))])}const l={ExportDefaultDeclaration(e){const t=e.get("declaration");if(!t.isClassDeclaration())return;const s=decoratedClassToExpression(t);if(s){const[o]=e.replaceWithMultiple([s,r.types.exportNamedDeclaration(null,[r.types.exportSpecifier(r.types.cloneNode(s.declarations[0].id),r.types.identifier("default"))])]);if(!t.node.id){e.scope.registerDeclaration(o)}}},ClassDeclaration(e){const t=decoratedClassToExpression(e);if(t){const[s]=e.replaceWith(t);const r=s.get("declarations.0");const o=r.node.id;const n=e.scope.getOwnBinding(o.name);n.identifier=o;n.path=r}},ClassExpression(e,t){const s=applyEnsureOrdering(e)||applyClassDecorators(e)||applyMethodDecorators(e,t);if(s)e.replaceWith(s)},ObjectExpression(e,t){const s=applyEnsureOrdering(e)||applyObjectDecorators(e,t);if(s)e.replaceWith(s)},AssignmentExpression(e,t){if(!p.has(e.node.right))return;e.replaceWith(r.types.callExpression(t.addHelper("initializerDefineProperty"),[r.types.cloneNode(e.get("left.object").node),r.types.stringLiteral(e.get("left.property").node.name||e.get("left.property").node.value),r.types.cloneNode(e.get("right.arguments")[0].node),r.types.cloneNode(e.get("right.arguments")[1].node)]))},CallExpression(e,t){if(e.node.arguments.length!==3)return;if(!p.has(e.node.arguments[2]))return;if(e.node.callee.name!==t.addHelper("defineProperty").name){return}e.replaceWith(r.types.callExpression(t.addHelper("initializerDefineProperty"),[r.types.cloneNode(e.get("arguments")[0].node),r.types.cloneNode(e.get("arguments")[1].node),r.types.cloneNode(e.get("arguments.2.arguments")[0].node),r.types.cloneNode(e.get("arguments.2.arguments")[1].node)]))}};var c=l;t["default"]=c},273:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=s(345);var o=(0,r.declare)(((e,t)=>{e.assertVersion(7);let{version:s}=t;{const{legacy:e}=t;if(e!==undefined){if(typeof e!=="boolean"){throw new Error(".legacy must be a boolean.")}if(s!==undefined){throw new Error("You can either use the .legacy or the .version option, not both.")}}if(s===undefined){s=e?"legacy":"2018-09"}else if(s!=="2023-05"&&s!=="2023-01"&&s!=="2022-03"&&s!=="2021-12"&&s!=="2018-09"&&s!=="legacy"){throw new Error("Unsupported decorators version: "+s)}var{decoratorsBeforeExport:r}=t;if(r===undefined){if(s==="2021-12"||s==="2022-03"){r=false}else if(s==="2018-09"){throw new Error("The decorators plugin, when .version is '2018-09' or not specified,"+" requires a 'decoratorsBeforeExport' option, whose value must be a boolean.")}}else{if(s==="legacy"||s==="2022-03"||s==="2023-01"){throw new Error(`'decoratorsBeforeExport' can't be used with ${s} decorators.`)}if(typeof r!=="boolean"){throw new Error("'decoratorsBeforeExport' must be a boolean.")}}}return{name:"syntax-decorators",manipulateOptions({generatorOpts:e},t){if(s==="legacy"){t.plugins.push("decorators-legacy")}else{if(s==="2023-01"||s==="2023-05"){t.plugins.push(["decorators",{allowCallParenthesized:false}],"decoratorAutoAccessors")}else if(s==="2022-03"){t.plugins.push(["decorators",{decoratorsBeforeExport:false,allowCallParenthesized:false}],"decoratorAutoAccessors")}else if(s==="2021-12"){t.plugins.push(["decorators",{decoratorsBeforeExport:r}],"decoratorAutoAccessors");e.decoratorsBeforeExport=r}else if(s==="2018-09"){t.plugins.push(["decorators",{decoratorsBeforeExport:r}]);e.decoratorsBeforeExport=r}}}}}));t["default"]=o}};var t={};function __nccwpck_require__(s){var r=t[s];if(r!==undefined){return r.exports}var o=t[s]={exports:{}};var n=true;try{e[s](o,o.exports,__nccwpck_require__);n=false}finally{if(n)delete t[s]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var s={};(()=>{var e=s;Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var t=__nccwpck_require__(345);var r=__nccwpck_require__(273);var o=__nccwpck_require__(308);var n=__nccwpck_require__(765);var i=__nccwpck_require__(859);var a=(0,t.declare)(((e,t)=>{e.assertVersion(7);{var{legacy:s}=t}const{version:a}=t;if(s||a==="legacy"){return{name:"proposal-decorators",inherits:r.default,visitor:n.default}}else if(a==="2021-12"||a==="2022-03"||a==="2023-01"||a==="2023-05"){return(0,i.default)(e,t,a)}else{e.assertVersion("^7.0.2");return(0,o.createClassFeaturePlugin)({name:"proposal-decorators",api:e,feature:o.FEATURES.decorators,inherits:r.default})}}));e["default"]=a})();module.exports=s})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/license b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/license deleted file mode 100644 index f31575ec773b..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/license +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/package.json b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/package.json deleted file mode 100644 index 8c2e3ba67d2d..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-decorators/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@babel/plugin-proposal-decorators","author":"The Babel Team (https://babel.dev/team)","version":"7.22.15","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/index.d.ts b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/index.js b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/index.js deleted file mode 100644 index eb1e9e26858a..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={345:e=>{e.exports=require("../helper-plugin-utils")},718:e=>{e.exports=require("@babel/core")},825:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var i=t(345);var a=(0,i.declare)((e=>{e.assertVersion(7);return{name:"syntax-export-default-from",manipulateOptions(e,r){r.plugins.push("exportDefaultFrom")}}}));r["default"]=a}};var r={};function __nccwpck_require__(t){var i=r[t];if(i!==undefined){return i.exports}var a=r[t]={exports:{}};var p=true;try{e[t](a,a.exports,__nccwpck_require__);p=false}finally{if(p)delete r[t]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t={};(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var r=__nccwpck_require__(345);var i=__nccwpck_require__(825);var a=__nccwpck_require__(718);var p=(0,r.declare)((e=>{e.assertVersion(7);return{name:"proposal-export-default-from",inherits:i.default,visitor:{ExportNamedDeclaration(e){const{node:r}=e;const{specifiers:t,source:i}=r;if(!a.types.isExportDefaultSpecifier(t[0]))return;const{exported:p}=t.shift();if(t.every((e=>a.types.isExportSpecifier(e)))){t.unshift(a.types.exportSpecifier(a.types.identifier("default"),p));return}const u=[a.types.exportNamedDeclaration(null,[a.types.exportSpecifier(a.types.identifier("default"),p)],a.types.cloneNode(i))];if(t.length>=1){u.push(r)}e.replaceWithMultiple(u)}}}}));e["default"]=p})();module.exports=t})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/license b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/license deleted file mode 100644 index f31575ec773b..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/license +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/package.json b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/package.json deleted file mode 100644 index 2ed372408bff..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@babel/plugin-proposal-export-default-from","author":"The Babel Team (https://babel.dev/team)","version":"7.22.5","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/index.d.ts b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/index.js b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/index.js deleted file mode 100644 index 17e169e828b3..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={345:e=>{e.exports=require("../helper-plugin-utils")},718:e=>{e.exports=require("@babel/core")},911:(e,s,t)=>{Object.defineProperty(s,"__esModule",{value:true});s["default"]=void 0;var r=t(345);var n=(0,r.declare)((e=>{e.assertVersion(7);return{name:"syntax-partial-application",manipulateOptions(e,s){s.plugins.push("partialApplication")}}}));s["default"]=n}};var s={};function __nccwpck_require__(t){var r=s[t];if(r!==undefined){return r.exports}var n=s[t]={exports:{}};var a=true;try{e[t](n,n.exports,__nccwpck_require__);a=false}finally{if(a)delete s[t]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t={};(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var s=__nccwpck_require__(345);var r=__nccwpck_require__(911);var n=__nccwpck_require__(718);var a=(0,s.declare)((e=>{e.assertVersion(7);function hasArgumentPlaceholder(e){return e.arguments.some((e=>n.types.isArgumentPlaceholder(e)))}function unwrapArguments({arguments:e},s){const t=[];for(let r=0;r{if(n.types.isArgumentPlaceholder(e)){const e=s.generateUid("_argPlaceholder");t.push(n.types.identifier(e));r.push(n.types.identifier(e))}else{r.push(e)}}));return[t,r]}return{name:"proposal-partial-application",inherits:r.default,visitor:{CallExpression(e){if(!hasArgumentPlaceholder(e.node)){return}const{node:s,scope:t}=e;const r=e.scope.generateUidIdentifierBasedOnNode(s.callee);const a=[];const p=unwrapArguments(s,t);const[i,o]=replacePlaceholders(s,t);t.push({id:r});if(s.callee.type==="MemberExpression"){const{object:l,property:c}=s.callee;const d=e.scope.generateUidIdentifierBasedOnNode(l);t.push({id:d});a.push(n.types.assignmentExpression("=",n.types.cloneNode(d),l),n.types.assignmentExpression("=",n.types.cloneNode(r),n.types.memberExpression(n.types.cloneNode(d),c)),...p,n.types.functionExpression(n.types.isIdentifier(c)?n.types.cloneNode(c):e.scope.generateUidIdentifierBasedOnNode(c),i,n.types.blockStatement([n.types.returnStatement(n.types.callExpression(n.types.memberExpression(n.types.cloneNode(r),n.types.identifier("call")),[n.types.cloneNode(d),...o]))],[]),false,false))}else{a.push(n.types.assignmentExpression("=",n.types.cloneNode(r),s.callee),...p,n.types.functionExpression(n.types.isIdentifier(s.callee)?n.types.cloneNode(s.callee):e.scope.generateUidIdentifierBasedOnNode(s.callee),i,n.types.blockStatement([n.types.returnStatement(n.types.callExpression(n.types.cloneNode(r),o))],[]),false,false))}e.replaceWith(n.types.sequenceExpression(a))}}}}));e["default"]=a})();module.exports=t})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/license b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/license deleted file mode 100644 index f31575ec773b..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/license +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/package.json b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/package.json deleted file mode 100644 index caa897606b4c..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@babel/plugin-proposal-partial-application","author":"The Babel Team (https://babel.dev/team)","version":"7.22.5","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/index.d.ts b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/index.js b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/index.js deleted file mode 100644 index 4aa631e041ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={345:e=>{e.exports=require("../helper-plugin-utils")},718:e=>{e.exports=require("@babel/core")},742:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(718);function isConciseArrowExpression(e){return s.types.isArrowFunctionExpression(e)&&s.types.isExpression(e.body)&&!e.async}const buildOptimizedSequenceExpression=({call:e,path:r,placeholder:t})=>{const{callee:o}=e;const i=r.node.left;const n=s.types.assignmentExpression("=",s.types.cloneNode(t),i);const p=isConciseArrowExpression(o);if(p){let e;let p=true;const{params:a}=o;if(a.length===1&&s.types.isIdentifier(a[0])){e=a[0]}else if(a.length>0){p=false}if(p&&!e){return s.types.sequenceExpression([i,o.body])}else if(e){r.scope.push({id:s.types.cloneNode(t)});r.get("right").scope.rename(e.name,t.name);return s.types.sequenceExpression([n,o.body])}}else if(s.types.isIdentifier(o,{name:"eval"})){const r=s.types.sequenceExpression([s.types.numericLiteral(0),o]);e.callee=r}r.scope.push({id:s.types.cloneNode(t)});return s.types.sequenceExpression([n,e])};var o=buildOptimizedSequenceExpression;r["default"]=o},177:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(718);var o=t(742);const i={BinaryExpression(e){const{scope:r,node:t}=e;const{operator:i,left:n,right:p}=t;if(i!=="|>")return;const a=r.generateUidIdentifierBasedOnNode(n);const c=p.type==="AwaitExpression"?s.types.awaitExpression(s.types.cloneNode(a)):s.types.callExpression(p,[s.types.cloneNode(a)]);const l=(0,o.default)({placeholder:a,call:c,path:e});e.replaceWith(l)}};var n=i;r["default"]=n},454:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(718);const o={exit(e,r){if(e.isTopicReference()){r.topicReferences.push(e)}else{if(r.topicReferences.length===0&&!r.sideEffectsBeforeFirstTopicReference&&!e.isPure()){r.sideEffectsBeforeFirstTopicReference=true}}},"ClassBody|Function"(e,r){if(r.topicReferences.length===0){r.sideEffectsBeforeFirstTopicReference=true}}};const i={BinaryExpression:{exit(e){const{scope:r,node:t}=e;if(t.operator!=="|>"){return}const i=e.get("right");if(i.node.type==="TopicReference"){e.replaceWith(t.left);return}const n={topicReferences:[],sideEffectsBeforeFirstTopicReference:i.isFunction()};i.traverse(o,n);if(n.topicReferences.length===1&&(!n.sideEffectsBeforeFirstTopicReference||e.scope.isPure(t.left,true))){n.topicReferences[0].replaceWith(t.left);e.replaceWith(t.right);return}const p=r.generateUidIdentifierBasedOnNode(t);r.push({id:p});n.topicReferences.forEach((e=>e.replaceWith(s.types.cloneNode(p))));e.replaceWith(s.types.sequenceExpression([s.types.assignmentExpression("=",s.types.cloneNode(p),t.left),t.right]))}}};var n=i;r["default"]=n},809:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(718);var o=t(742);const i={BinaryExpression(e){const{scope:r,node:t}=e;const{operator:i,left:n,right:p}=t;if(i!=="|>")return;const a=r.generateUidIdentifierBasedOnNode(n);const c=s.types.callExpression(p,[s.types.cloneNode(a)]);e.replaceWith((0,o.default)({placeholder:a,call:c,path:e}))}};var n=i;r["default"]=n},812:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(718);const o={PipelinePrimaryTopicReference(e){e.replaceWith(s.types.cloneNode(this.topicId))},PipelineTopicExpression(e){e.skip()}};const i={BinaryExpression(e){const{scope:r}=e;const{node:t}=e;const{operator:i,left:n,right:p}=t;if(i!=="|>")return;const a=r.generateUidIdentifierBasedOnNode(n);r.push({id:a});let c;if(s.types.isPipelineTopicExpression(p)){e.get("right").traverse(o,{topicId:a});c=p.expression}else{let e=p.callee;if(s.types.isIdentifier(e,{name:"eval"})){e=s.types.sequenceExpression([s.types.numericLiteral(0),e])}c=s.types.callExpression(e,[s.types.cloneNode(a)])}e.replaceWith(s.types.sequenceExpression([s.types.assignmentExpression("=",s.types.cloneNode(a),n),c]))}};var n=i;r["default"]=n},168:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(345);const o=["minimal","fsharp","hack","smart"];const i=["^^","@@","^","%","#"];const n="https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator";var p=(0,s.declare)(((e,{proposal:r,topicToken:t})=>{e.assertVersion(7);if(typeof r!=="string"||!o.includes(r)){const e=o.map((e=>`"${e}"`)).join(", ");throw new Error(`The pipeline plugin requires a "proposal" option. "proposal" must be one of: ${e}. See <${n}>.`)}if(r==="hack"&&!i.includes(t)){const e=i.map((e=>`"${e}"`)).join(", ");throw new Error(`The pipeline plugin in "proposal": "hack" mode also requires a "topicToken" option. "topicToken" must be one of: ${e}. See <${n}>.`)}return{name:"syntax-pipeline-operator",manipulateOptions(e,s){s.plugins.push(["pipelineOperator",{proposal:r,topicToken:t}]);e.generatorOpts.topicToken=t}}}));r["default"]=p}};var r={};function __nccwpck_require__(t){var s=r[t];if(s!==undefined){return s.exports}var o=r[t]={exports:{}};var i=true;try{e[t](o,o.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t={};(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var r=__nccwpck_require__(345);var s=__nccwpck_require__(168);var o=__nccwpck_require__(809);var i=__nccwpck_require__(454);var n=__nccwpck_require__(177);var p=__nccwpck_require__(812);const a={minimal:o.default,hack:i.default,fsharp:n.default,smart:p.default};var c=(0,r.declare)(((e,r)=>{e.assertVersion(7);const{proposal:t}=r;if(t==="smart"){console.warn(`The smart-mix pipe operator is deprecated. Use "proposal": "hack" instead.`)}return{name:"proposal-pipeline-operator",inherits:s.default,visitor:a[r.proposal]}}));e["default"]=c})();module.exports=t})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/license b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/license deleted file mode 100644 index f31575ec773b..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/license +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/package.json b/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/package.json deleted file mode 100644 index 7a60eab9ba12..000000000000 --- a/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@babel/plugin-proposal-pipeline-operator","author":"The Babel Team (https://babel.dev/team)","version":"7.22.15","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/index.d.ts b/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/index.js b/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/index.js deleted file mode 100644 index cfd3027b202c..000000000000 --- a/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={314:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:true});r["default"]=function(e){var r=(0,n.createDynamicImportTransform)(e);return{manipulateOptions:function(){function manipulateOptions(e,r){r.plugins.push("dynamicImport")}return manipulateOptions}(),visitor:{Import:function(){function Import(e){r(this,e)}return Import}()}}};var n=t(925);e.exports=r["default"]},925:(e,r)=>{Object.defineProperty(r,"__esModule",{value:true});var t=function(){function sliceIterator(e,r){var t=[];var n=true;var a=false;var i=undefined;try{for(var o=e[Symbol.iterator](),u;!(n=(u=o.next()).done);n=true){t.push(u.value);if(r&&t.length===r)break}}catch(e){a=true;i=e}finally{try{if(!n&&o["return"])o["return"]()}finally{if(a)throw i}}return t}return function(e,r){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();r.getImportSource=getImportSource;r.createDynamicImportTransform=createDynamicImportTransform;function getImportSource(e,r){var n=r.arguments;var a=t(n,1),i=a[0];var o=e.isStringLiteral(i)||e.isTemplateLiteral(i);if(o){e.removeComments(i);return i}return e.templateLiteral([e.templateElement({raw:"",cooked:""}),e.templateElement({raw:"",cooked:""},true)],n)}function createDynamicImportTransform(e){var r=e.template,t=e.types;var n={static:{interop:r("Promise.resolve().then(() => INTEROP(require(SOURCE)))"),noInterop:r("Promise.resolve().then(() => require(SOURCE))")},dynamic:{interop:r("Promise.resolve(SOURCE).then(s => INTEROP(require(s)))"),noInterop:r("Promise.resolve(SOURCE).then(s => require(s))")}};var a=typeof WeakSet==="function"&&new WeakSet;var i=function isString(e){return t.isStringLiteral(e)||t.isTemplateLiteral(e)&&e.expressions.length===0};return function(e,r){if(a){if(a.has(r)){return}a.add(r)}var o=getImportSource(t,r.parent);var u=i(o)?n["static"]:n.dynamic;var p=e.opts.noInterop?u.noInterop({SOURCE:o}):u.interop({SOURCE:o,INTEROP:e.addHelper("interopRequireWildcard")});r.parentPath.replaceWith(p)}}}};var r={};function __nccwpck_require__(t){var n=r[t];if(n!==undefined){return n.exports}var a=r[t]={exports:{}};var i=true;try{e[t](a,a.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(314);module.exports=t})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/license b/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/license deleted file mode 100644 index 87081c13391e..000000000000 --- a/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/license +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Airbnb - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/package.json b/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/package.json deleted file mode 100644 index c7ef688123d4..000000000000 --- a/packages/cli/babel-preset-base/compiled/babel-plugin-dynamic-import-node/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"babel-plugin-dynamic-import-node","author":"Jordan Gensler ","version":"2.3.3","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/babel-plugin-import/index.d.ts b/packages/cli/babel-preset-base/compiled/babel-plugin-import/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/babel-plugin-import/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/babel-plugin-import/index.js b/packages/cli/babel-preset-base/compiled/babel-plugin-import/index.js deleted file mode 100644 index 85689dd26d8d..000000000000 --- a/packages/cli/babel-preset-base/compiled/babel-plugin-import/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var t={136:(t,r,i)=>{Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var o=i(17);var a=i(16);function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);if(r){o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))}i.push.apply(i,o)}return i}function _objectSpread(t){for(var r=1;r`${r}${t.toLowerCase()}`))}function winPath(t){return t.replace(/\\/g,"/")}function normalizeCustomName(t){if(typeof t==="string"){const r=require(t);return typeof r==="function"?r:r.default}return t}class Plugin{constructor(t,r,i,o,a,l,c,u,p,d,m,h=0){this.libraryName=t;this.libraryDirectory=typeof r==="undefined"?"lib":r;this.camel2DashComponentName=typeof l==="undefined"?true:l;this.camel2UnderlineComponentName=c;this.style=i||false;this.styleLibraryDirectory=o;this.customStyleName=normalizeCustomName(a);this.fileName=u||"";this.customName=normalizeCustomName(p);this.transformToDefaultImport=typeof d==="undefined"?true:d;this.types=m;this.pluginStateKey=`importPluginState${h}`}getPluginState(t){if(!t[this.pluginStateKey]){t[this.pluginStateKey]={}}return t[this.pluginStateKey]}importMethod(t,r,i){if(!i.selectedMethods[t]){const l=this.style,c=this.libraryDirectory;const u=this.camel2UnderlineComponentName?transCamel(t,"_"):this.camel2DashComponentName?transCamel(t,"-"):t;const p=winPath(this.customName?this.customName(u,r):(0,o.join)(this.libraryName,c,u,this.fileName));i.selectedMethods[t]=this.transformToDefaultImport?(0,a.addDefault)(r.path,p,{nameHint:t}):(0,a.addNamed)(r.path,t,p);if(this.customStyleName){const t=winPath(this.customStyleName(u,r));(0,a.addSideEffect)(r.path,`${t}`)}else if(this.styleLibraryDirectory){const t=winPath((0,o.join)(this.libraryName,this.styleLibraryDirectory,u,this.fileName));(0,a.addSideEffect)(r.path,`${t}`)}else if(l===true){(0,a.addSideEffect)(r.path,`${p}/style`)}else if(l==="css"){(0,a.addSideEffect)(r.path,`${p}/style/css`)}else if(typeof l==="function"){const t=l(p,r);if(t){(0,a.addSideEffect)(r.path,t)}}}return _objectSpread({},i.selectedMethods[t])}buildExpressionHandler(t,r,i,o){const a=i&&i.hub&&i.hub.file||o&&o.file;const l=this.types;const c=this.getPluginState(o);r.forEach((r=>{if(!l.isIdentifier(t[r]))return;if(c.specified[t[r].name]&&l.isImportSpecifier(i.scope.getBinding(t[r].name).path)){t[r]=this.importMethod(c.specified[t[r].name],a,c)}}))}buildDeclaratorHandler(t,r,i,o){const a=i&&i.hub&&i.hub.file||o&&o.file;const l=this.types;const c=this.getPluginState(o);const checkScope=t=>c.specified[t.name]&&i.scope.hasBinding(t.name)&&i.scope.getBinding(t.name).path.type==="ImportSpecifier";if(l.isIdentifier(t[r])&&checkScope(t[r])){t[r]=this.importMethod(c.specified[t[r].name],a,c)}else if(l.isSequenceExpression(t[r])){t[r].expressions.forEach(((i,o)=>{if(l.isIdentifier(i)&&checkScope(i)){t[r].expressions[o]=this.importMethod(c.specified[i.name],a,c)}}))}}ProgramEnter(t,r){const i=this.getPluginState(r);i.specified=Object.create(null);i.libraryObjs=Object.create(null);i.selectedMethods=Object.create(null);i.pathsToRemove=[]}ProgramExit(t,r){this.getPluginState(r).pathsToRemove.forEach((t=>!t.removed&&t.remove()))}ImportDeclaration(t,r){const i=t.node;if(!i)return;const o=i.source.value;const a=this.libraryName;const l=this.types;const c=this.getPluginState(r);if(o===a){i.specifiers.forEach((t=>{if(l.isImportSpecifier(t)){c.specified[t.local.name]=t.imported.name}else{c.libraryObjs[t.local.name]=true}}));c.pathsToRemove.push(t)}}CallExpression(t,r){const i=t.node;const o=t&&t.hub&&t.hub.file||r&&r.file;const a=i.callee.name;const l=this.types;const c=this.getPluginState(r);if(l.isIdentifier(i.callee)){if(c.specified[a]){i.callee=this.importMethod(c.specified[a],o,c)}}i.arguments=i.arguments.map((r=>{const i=r.name;if(c.specified[i]&&t.scope.hasBinding(i)&&t.scope.getBinding(i).path.type==="ImportSpecifier"){return this.importMethod(c.specified[i],o,c)}return r}))}MemberExpression(t,r){const i=t.node;const o=t&&t.hub&&t.hub.file||r&&r.file;const a=this.getPluginState(r);if(!i.object||!i.object.name)return;if(a.libraryObjs[i.object.name]){t.replaceWith(this.importMethod(i.property.name,o,a))}else if(a.specified[i.object.name]&&t.scope.hasBinding(i.object.name)){const r=t.scope.getBinding(i.object.name),l=r.scope;if(l.path.parent.type==="File"){i.object=this.importMethod(a.specified[i.object.name],o,a)}}}Property(t,r){const i=t.node;this.buildDeclaratorHandler(i,"value",t,r)}VariableDeclarator(t,r){const i=t.node;this.buildDeclaratorHandler(i,"init",t,r)}ArrayExpression(t,r){const i=t.node;const o=i.elements.map(((t,r)=>r));this.buildExpressionHandler(i.elements,o,t,r)}LogicalExpression(t,r){const i=t.node;this.buildExpressionHandler(i,["left","right"],t,r)}ConditionalExpression(t,r){const i=t.node;this.buildExpressionHandler(i,["test","consequent","alternate"],t,r)}IfStatement(t,r){const i=t.node;this.buildExpressionHandler(i,["test"],t,r);this.buildExpressionHandler(i.test,["left","right"],t,r)}ExpressionStatement(t,r){const i=t.node;const o=this.types;if(o.isAssignmentExpression(i.expression)){this.buildExpressionHandler(i.expression,["right"],t,r)}}ReturnStatement(t,r){const i=t.node;this.buildExpressionHandler(i,["argument"],t,r)}ExportDefaultDeclaration(t,r){const i=t.node;this.buildExpressionHandler(i,["declaration"],t,r)}BinaryExpression(t,r){const i=t.node;this.buildExpressionHandler(i,["left","right"],t,r)}NewExpression(t,r){const i=t.node;this.buildExpressionHandler(i,["callee"],t,r);const o=i.arguments.map(((t,r)=>r));this.buildExpressionHandler(i.arguments,o,t,r)}SwitchStatement(t,r){const i=t.node;this.buildExpressionHandler(i,["discriminant"],t,r)}SwitchCase(t,r){const i=t.node;this.buildExpressionHandler(i,["test"],t,r)}ClassDeclaration(t,r){const i=t.node;this.buildExpressionHandler(i,["superClass"],t,r)}}r["default"]=Plugin},16:t=>{t.exports=require("../@babel/helper-module-imports")},491:t=>{t.exports=require("assert")},17:t=>{t.exports=require("path")}};var r={};function __nccwpck_require__(i){var o=r[i];if(o!==undefined){return o.exports}var a=r[i]={exports:{}};var l=true;try{t[i](a,a.exports,__nccwpck_require__);l=false}finally{if(l)delete r[i]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i={};(()=>{var t=i;Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var r=_interopRequireDefault(__nccwpck_require__(491));var o=_interopRequireDefault(__nccwpck_require__(136));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _createForOfIteratorHelper(t,r){var i=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(i)t=i;var o=0;var a=function F(){};return{s:a,n:function n(){if(o>=t.length)return{done:true};return{done:false,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=true,c=false,u;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){c=true;u=t},f:function f(){try{if(!l&&i.return!=null)i.return()}finally{if(c)throw u}}}}function _unsupportedIterableToArray(t,r){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor)i=t.constructor.name;if(i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var i=0,o=new Array(r);i{i=null};function applyInstance(t,r,o){var a=_createForOfIteratorHelper(i),l;try{for(a.s();!(l=a.n()).done;){const i=l.value;if(i[t]){i[t].apply(i,[...r,o])}}}catch(t){a.e(t)}finally{a.f()}}const a={enter(a,{opts:l={}}){if(!i){if(Array.isArray(l)){i=l.map((({libraryName:i,libraryDirectory:a,style:l,styleLibraryDirectory:c,customStyleName:u,camel2DashComponentName:p,camel2UnderlineComponentName:d,fileName:m,customName:h,transformToDefaultImport:y},b)=>{(0,r.default)(i,"libraryName should be provided");return new o.default(i,a,l,c,u,p,d,m,h,y,t,b)}))}else{(0,r.default)(l.libraryName,"libraryName should be provided");i=[new o.default(l.libraryName,l.libraryDirectory,l.style,l.styleLibraryDirectory,l.customStyleName,l.camel2DashComponentName,l.camel2UnderlineComponentName,l.fileName,l.customName,l.transformToDefaultImport,t)]}}applyInstance("ProgramEnter",arguments,this)},exit(){applyInstance("ProgramExit",arguments,this)}};const l=["ImportDeclaration","CallExpression","MemberExpression","Property","VariableDeclarator","ArrayExpression","LogicalExpression","ConditionalExpression","IfStatement","ExpressionStatement","ReturnStatement","ExportDefaultDeclaration","BinaryExpression","NewExpression","ClassDeclaration","SwitchStatement","SwitchCase"];const c={visitor:{Program:a}};for(var u=0,p=l;u","version":"1.13.5","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/index.d.ts b/packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/index.d.ts deleted file mode 100644 index a2ac5f9bc2ef..000000000000 --- a/packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = any; diff --git a/packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/index.js b/packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/index.js deleted file mode 100644 index 66a9cefa0e42..000000000000 --- a/packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={431:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.splitByPlaceholders=t.placeholderRegex=t.makePlaceholder=void 0;const r=/(?:__PLACEHOLDER_(\d+)__)/g;t.placeholderRegex=r;const n=/__PLACEHOLDER_(?:\d+)__/g;const makePlaceholder=e=>`__PLACEHOLDER_${e}__`;t.makePlaceholder=makePlaceholder;const splitByPlaceholders=([e,...t],i=true)=>[e.split(i?r:n),...t];t.splitByPlaceholders=splitByPlaceholders},991:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.stripLineComment=t.minifyRawValues=t.minifyRaw=t.minifyCookedValues=t.minifyCooked=t.compressSymbols=void 0;var n=_interopRequireDefault(r(296));var i=r(431);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const injectUniquePlaceholders=e=>{let t=0;return e.reduce(((e,r,n,a)=>e+r+(nnew RegExp("\\/\\*[^!](.|"+e+")*?\\*\\/","g");const a=/\/\//g;const s=/(\s*[;:{},]\s*)/g;const countOccurences=(e,t)=>e.split(t).length-1;const reduceSubstr=(e,t,r)=>{const n=e.length;let i=e[0];if(n===1){return i}for(let a=1;areduceSubstr(e.split(a),"//",(e=>!e.endsWith(":")&&countOccurences(e,"'")%2===0&&countOccurences(e,'"')%2===0&&countOccurences(e,"(")===countOccurences(e,")")));t.stripLineComment=stripLineComment;const compressSymbols=e=>e.split(s).reduce(((e,t,r)=>{if(r%2===0){return e+t}if(countOccurences(e,"'")%2===0&&countOccurences(e,'"')%2===0){return e+t.trim()}return e+t}),"");t.compressSymbols=compressSymbols;const isLineComment=e=>e.trim().startsWith("//");const minify=e=>{const t=new RegExp(e+"\\s*","g");const r=makeMultilineCommentRegex(e);return e=>{const a=e.replace(r,"\n").split(t).filter((e=>e.length>0&&!isLineComment(e))).map(stripLineComment).join(" ");const s=(0,n.default)(e.match(i.placeholderRegex),a.match(i.placeholderRegex)).map((e=>parseInt(e.match(/\d+/)[0],10)));return[compressSymbols(a),s]}};const o=minify("(?:\\\\r|\\\\n|\\r|\\n)");t.minifyRaw=o;const l=minify("[\\r\\n]");t.minifyCooked=l;const minifyRawValues=e=>(0,i.splitByPlaceholders)(o(injectUniquePlaceholders(e)),false);t.minifyRawValues=minifyRawValues;const minifyCookedValues=e=>(0,i.splitByPlaceholders)(l(injectUniquePlaceholders(e)),false);t.minifyCookedValues=minifyCookedValues},872:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.isWithThemeHelper=t.isValidTopLevelImport=t.isUseTheme=t.isStyled=t.isPureHelper=t.isKeyframesHelper=t.isInjectGlobalHelper=t.isHelper=t.isCreateGlobalStyleHelper=t.isCSSHelper=t.importLocalName=void 0;var n=r(480);const i=["styled-components","styled-components/no-tags","styled-components/native","styled-components/primitives"];const isValidTopLevelImport=(e,t)=>[...i,...(0,n.useTopLevelImportPaths)(t)].includes(e);t.isValidTopLevelImport=isValidTopLevelImport;const a={};const importLocalName=(e,t,r={})=>{const{cacheIdentifier:n,bypassCache:i=false}=r;const s=n?`|${n}`:"";const o=e+t.file.opts.filename+s;if(!i&&o in a){return a[o]}let l=t.styledRequired?e==="default"?"styled":e:false;t.file.path.traverse({ImportDeclaration:{exit(r){const{node:n}=r;if(isValidTopLevelImport(n.source.value,t)){for(const t of r.get("specifiers")){if(t.isImportSpecifier()&&t.node.imported.name==="styled"){l="styled"}if(t.isImportDefaultSpecifier()){l=t.node.local.name}if(t.isImportSpecifier()&&t.node.imported.name===e){l=t.node.local.name}if(t.isImportNamespaceSpecifier()){l=e==="default"?t.node.local.name:e}}}}}});a[o]=l;return l};t.importLocalName=importLocalName;const isStyled=e=>(t,r)=>{if(e.isCallExpression(t)&&e.isMemberExpression(t.callee)&&t.callee.property.name!=="default"){return isStyled(e)(t.callee.object,r)}else{return e.isMemberExpression(t)&&t.object.name===importLocalName("default",r,{cacheIdentifier:t.object.name})&&!isHelper(e)(t.property,r)||e.isCallExpression(t)&&t.callee.name===importLocalName("default",r,{cacheIdentifier:t.callee.name})||r.styledRequired&&e.isMemberExpression(t)&&e.isMemberExpression(t.object)&&t.object.property.name==="default"&&t.object.object.name===r.styledRequired||r.styledRequired&&e.isCallExpression(t)&&e.isMemberExpression(t.callee)&&t.callee.property.name==="default"&&t.callee.object.name===r.styledRequired||importLocalName("default",r)&&e.isMemberExpression(t)&&e.isMemberExpression(t.object)&&t.object.property.name==="default"&&t.object.object.name===importLocalName("default",r)||importLocalName("default",r)&&e.isCallExpression(t)&&e.isMemberExpression(t.callee)&&t.object.property.name==="default"&&t.object.object.name===importLocalName("default",r)}};t.isStyled=isStyled;const isCSSHelper=e=>(t,r)=>e.isIdentifier(t)&&t.name===importLocalName("css",r);t.isCSSHelper=isCSSHelper;const isCreateGlobalStyleHelper=e=>(t,r)=>e.isIdentifier(t)&&t.name===importLocalName("createGlobalStyle",r);t.isCreateGlobalStyleHelper=isCreateGlobalStyleHelper;const isInjectGlobalHelper=e=>(t,r)=>e.isIdentifier(t)&&t.name===importLocalName("injectGlobal",r);t.isInjectGlobalHelper=isInjectGlobalHelper;const isKeyframesHelper=e=>(t,r)=>e.isIdentifier(t)&&t.name===importLocalName("keyframes",r);t.isKeyframesHelper=isKeyframesHelper;const isWithThemeHelper=e=>(t,r)=>e.isIdentifier(t)&&t.name===importLocalName("withTheme",r);t.isWithThemeHelper=isWithThemeHelper;const isUseTheme=e=>(t,r)=>e.isIdentifier(t)&&t.name===importLocalName("useTheme",r);t.isUseTheme=isUseTheme;const isHelper=e=>(t,r)=>isCreateGlobalStyleHelper(e)(t,r)||isCSSHelper(e)(t,r)||isInjectGlobalHelper(e)(t,r)||isUseTheme(e)(t,r)||isKeyframesHelper(e)(t,r)||isWithThemeHelper(e)(t,r);t.isHelper=isHelper;const isPureHelper=e=>(t,r)=>isCreateGlobalStyleHelper(e)(t,r)||isCSSHelper(e)(t,r)||isKeyframesHelper(e)(t,r)||isUseTheme(e)(t,r)||isWithThemeHelper(e)(t,r);t.isPureHelper=isPureHelper},307:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var _default=e=>t=>{let r;t.find((e=>{if(e.isAssignmentExpression()){r=e.node.left}else if(e.isObjectProperty()){r=e.node.key}else if(e.isClassProperty()){r=e.node.key}else if(e.isVariableDeclarator()){r=e.node.id}else if(e.isStatement()){return true}if(r&&!e.isAssignmentExpression())return true}));if(e.isMemberExpression(r)){r=r.property}return e.isIdentifier(r)?r.name:undefined};t["default"]=_default},839:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;function murmurhash2_32_gc(e){let t=e.length;let r=t;let n=0;let i;while(t>=4){i=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24;i=(i&65535)*1540483477+(((i>>>16)*1540483477&65535)<<16);i^=i>>>24;i=(i&65535)*1540483477+(((i>>>16)*1540483477&65535)<<16);r=(r&65535)*1540483477+(((r>>>16)*1540483477&65535)<<16)^i;t-=4;++n}switch(t){case 3:r^=(e.charCodeAt(n+2)&255)<<16;case 2:r^=(e.charCodeAt(n+1)&255)<<8;case 1:r^=e.charCodeAt(n)&255;r=(r&65535)*1540483477+(((r>>>16)*1540483477&65535)<<16)}r^=r>>>13;r=(r&65535)*1540483477+(((r>>>16)*1540483477&65535)<<16);r^=r>>>15;return(r>>>0).toString(36)}var r=murmurhash2_32_gc;t["default"]=r},480:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.useTranspileTemplateLiterals=t.useTopLevelImportPaths=t.useSSR=t.usePureAnnotation=t.useNamespace=t.useMinify=t.useFileName=t.useDisplayName=t.useCssProp=void 0;function getOption({opts:e},t,r=true){return e[t]===undefined||e[t]===null?r:e[t]}const useDisplayName=e=>getOption(e,"displayName");t.useDisplayName=useDisplayName;const useTopLevelImportPaths=e=>getOption(e,"topLevelImportPaths",[]);t.useTopLevelImportPaths=useTopLevelImportPaths;const useSSR=e=>getOption(e,"ssr",true);t.useSSR=useSSR;const useFileName=e=>getOption(e,"fileName");t.useFileName=useFileName;const useMinify=e=>getOption(e,"minify");t.useMinify=useMinify;const useTranspileTemplateLiterals=e=>getOption(e,"transpileTemplateLiterals");t.useTranspileTemplateLiterals=useTranspileTemplateLiterals;const useNamespace=e=>{const t=getOption(e,"namespace","");if(t){return`${t}__`}return""};t.useNamespace=useNamespace;const usePureAnnotation=e=>getOption(e,"pure",false);t.usePureAnnotation=usePureAnnotation;const useCssProp=e=>getOption(e,"cssProp",true);t.useCssProp=useCssProp},779:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=prefixLeadingDigit;function prefixLeadingDigit(e){return e.replace(/^(\d)/,"sc-$1")}},746:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(872);var _default=e=>(t,r)=>{if(e.isCallExpression(t.node.init)&&e.isIdentifier(t.node.init.callee)&&t.node.init.callee.name==="require"&&t.node.init.arguments&&t.node.init.arguments[0]&&e.isLiteral(t.node.init.arguments[0])&&(0,n.isValidTopLevelImport)(t.node.init.arguments[0].value,r)){r.styledRequired=t.node.id.name}};t["default"]=_default},180:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(17));var i=_interopRequireDefault(r(147));var a=r(480);var s=_interopRequireDefault(r(307));var o=_interopRequireDefault(r(779));var l=_interopRequireDefault(r(839));var u=r(872);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const addConfig=e=>(t,r,n)=>{if(!r&&!n){return}const i=[];if(r){i.push(e.objectProperty(e.identifier("displayName"),e.stringLiteral(r)))}if(n){i.push(e.objectProperty(e.identifier("componentId"),e.stringLiteral(n)))}const a=getExistingConfig(e)(t);if(a&&a.arguments.length&&Array.isArray(a.arguments[0].properties)&&!a.arguments[0].properties.some((e=>["displayName","componentId"].includes(e.key.name)))){a.arguments[0].properties.push(...i);return}if(t.node.callee&&e.isMemberExpression(t.node.callee.callee)&&t.node.callee.callee.property&&t.node.callee.callee.property.name&&t.node.callee.callee.property.name=="withConfig"&&t.node.callee.arguments.length&&Array.isArray(t.node.callee.arguments[0].properties)&&!t.node.callee.arguments[0].properties.some((e=>["displayName","componentId"].includes(e.key.name)))){t.node.callee.arguments[0].properties.push(...i);return}if(t.node.tag){t.node.tag=e.callExpression(e.memberExpression(t.node.tag,e.identifier("withConfig")),[e.objectExpression(i)])}else{t.replaceWith(e.callExpression(e.callExpression(e.memberExpression(t.node.callee,e.identifier("withConfig")),[e.objectExpression(i)]),t.node.arguments))}};const getExistingConfig=e=>t=>{if(t.node.callee&&e.isMemberExpression(t.node.callee.callee)&&t.node.callee.callee.property&&t.node.callee.callee.property.name&&t.node.callee.callee.property.name=="withConfig"){return t.node.callee}if(t.node.callee&&e.isMemberExpression(t.node.callee.callee)&&t.node.callee.callee.object&&t.node.callee.callee.object.callee&&t.node.callee.callee.object.callee.property&&t.node.callee.callee.object.callee.property.name==="withConfig"){return t.node.callee.callee.object}};const getBlockName=e=>{const t=n.default.basename(e.opts.filename,n.default.extname(e.opts.filename));return t!=="index"?t:n.default.basename(n.default.dirname(e.opts.filename))};const getDisplayName=e=>(t,r)=>{const{file:n}=r;const i=(0,s.default)(e)(t);if(n){const e=getBlockName(n);if(e===i){return i}return i?`${(0,o.default)(e)}__${i}`:(0,o.default)(e)}else{return i}};const findModuleRoot=e=>{if(!e){return null}let t=n.default.dirname(e);if(i.default.existsSync(n.default.join(t,"package.json"))){return t}else if(t!==e){return findModuleRoot(t)}else{return null}};const p="styled-components-file-hash";const c="styled-components-component-position";const d=new RegExp(`\\${n.default.sep}`,"g");const getFileHash=e=>{const{file:t}=e;if(t.get(p)){return t.get(p)}const r=t.opts.filename;const a=findModuleRoot(r);const s=a&&n.default.relative(a,r).replace(d,"/");const o=a&&JSON.parse(i.default.readFileSync(n.default.join(a,"package.json"))).name;const u=t.code;const c=[o];if(s){c.push(s)}else{c.push(u)}const f=(0,l.default)(c.join(""));t.set(p,f);return f};const getNextId=e=>{const t=e.file.get(c)||0;e.file.set(c,t+1);return t};const getComponentId=e=>`${(0,a.useNamespace)(e)}sc-${getFileHash(e)}-${getNextId(e)}`;var _default=e=>(t,r)=>{if(t.node.tag?(0,u.isStyled)(e)(t.node.tag,r):(0,u.isStyled)(e)(t.node.callee,r)&&t.node.callee.property&&t.node.callee.property.name!=="withConfig"||(0,u.isStyled)(e)(t.node.callee,r)&&!e.isMemberExpression(t.node.callee.callee)||(0,u.isStyled)(e)(t.node.callee,r)&&e.isMemberExpression(t.node.callee.callee)&&t.node.callee.callee.property&&t.node.callee.callee.property.name&&t.node.callee.callee.property.name!=="withConfig"||(0,u.isStyled)(e)(t.node.callee,r)&&e.isMemberExpression(t.node.callee.callee)&&t.node.callee.callee.property&&t.node.callee.callee.property.name&&t.node.callee.callee.property.name==="withConfig"&&t.node.callee.arguments.length&&Array.isArray(t.node.callee.arguments[0].properties)&&!t.node.callee.arguments[0].properties.some((e=>["displayName","componentId"].includes(e.key.name)))){const n=(0,a.useDisplayName)(r)&&getDisplayName(e)(t,(0,a.useFileName)(r)&&r);addConfig(e)(t,n&&n.replace(/[^_a-zA-Z0-9-]/g,""),(0,a.useSSR)(r)&&getComponentId(r))}};t["default"]=_default},356:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(480);var i=r(872);var a=r(991);var _default=e=>(t,r)=>{if((0,n.useMinify)(r)&&((0,i.isStyled)(e)(t.node.tag,r)||(0,i.isHelper)(e)(t.node.tag,r))){const e=t.node.quasi;const r=e.quasis.length;const[n]=(0,a.minifyRawValues)(e.quasis.map((e=>e.value.raw)));const[i,s]=(0,a.minifyCookedValues)(e.quasis.map((e=>e.value.cooked)));s.forEach(((t,r)=>{e.expressions.splice(t-r,1)}));for(let t=0;t{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(944));var i=r(480);var a=r(872);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=e=>(t,r)=>{if((0,i.usePureAnnotation)(r)){if((0,a.isStyled)(e)(t.node,r)||(0,a.isStyled)(e)(t.node.callee,r)||(0,a.isPureHelper)(e)(t.node.tag||t.node.callee,r)){if(t.parent.type==="VariableDeclarator"||t.parent.type==="TaggedTemplateExpression"){(0,n.default)(t)}}}};t["default"]=_default},882:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(480);var i=_interopRequireDefault(r(521));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=e=>(t,r)=>{if((0,n.useTranspileTemplateLiterals)(r)){(0,i.default)(e)(t,r)}};t["default"]=_default},521:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(872);var _default=e=>(t,r)=>{if((0,n.isStyled)(e)(t.node.tag,r)||(0,n.isHelper)(e)(t.node.tag,r)){const{tag:r,quasi:{quasis:n,expressions:i}}=t.node;const a=e.arrayExpression(n.filter((e=>e.value.cooked!==undefined)).map((t=>e.stringLiteral(t.value.cooked))));t.replaceWith(e.callExpression(r,[a,...i]))}};t["default"]=_default},731:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(16);var i=r(872);var a=r(480);const s=/^[a-z][a-z\d]*(\-[a-z][a-z\d]*)?$/;const getName=(e,t)=>{if(typeof e.name==="string")return e.name;if(t.isJSXMemberExpression(e)){return`${getName(e.object,t)}.${e.property.name}`}throw path.buildCodeFrameError(`Cannot infer name from node with type "${e.type}". Please submit an issue at github.com/styled-components/babel-plugin-styled-components with your code so we can take a look at your use case!`)};const getNameExpression=(e,t)=>{if(typeof e.name==="string")return t.identifier(e.name);if(t.isJSXMemberExpression(e)){return t.memberExpression(getNameExpression(e.object,t),t.identifier(e.property.name))}throw path.buildCodeFrameError(`Cannot infer name expression from node with type "${e.type}". Please submit an issue at github.com/styled-components/babel-plugin-styled-components with your code so we can take a look at your use case!`)};const getLocalIdentifier=e=>{const t=e.scope.generateUidIdentifier("css");t.name=t.name.replace("_","$_");return t};var _default=e=>(t,r)=>{if(!(0,a.useCssProp)(r))return;if(t.node.name.name!=="css")return;const o=r.file.path;let l=r.customImportName||(0,i.importLocalName)("default",r);const{bindings:u}=o.scope;if(!l||!u[l.name]||!u[l]){(0,n.addDefault)(t,"styled-components",{nameHint:"styled"});l=e.identifier((0,i.importLocalName)("default",r,{bypassCache:true}))}if(!e.isIdentifier(l))l=e.identifier(l);const p=t.parentPath;const c=getName(p.node.name,e);const d=getNameExpression(p.node.name,e);const f=t.scope.generateUidIdentifier("Styled"+c.replace(/^([a-z])/,((e,t)=>t.toUpperCase())));let m;let y;if(s.test(c)){m=e.callExpression(l,[e.stringLiteral(c)])}else{m=e.callExpression(l,[d]);if(u[c]&&!e.isImportDeclaration(u[c].path.parent)){y=t=>(e.isVariableDeclaration(u[c].path.parent)?u[c].path.parentPath:u[c].path).insertAfter(t)}}let _;if(e.isStringLiteral(t.node.value)){_=e.templateLiteral([e.templateElement({raw:t.node.value.value,cooked:t.node.value.value},true)],[])}else if(e.isJSXExpressionContainer(t.node.value)){if(e.isTemplateLiteral(t.node.value.expression)){_=t.node.value.expression}else if(e.isTaggedTemplateExpression(t.node.value.expression)&&t.node.value.expression.tag.name==="css"){_=t.node.value.expression.quasi}else if(e.isObjectExpression(t.node.value.expression)){_=t.node.value.expression}else{_=e.templateLiteral([e.templateElement({raw:"",cooked:""},false),e.templateElement({raw:"",cooked:""},true)],[t.node.value.expression])}}if(!_)return;p.node.attributes=p.node.attributes.filter((e=>e!==t.node));p.node.name=e.jSXIdentifier(f.name);if(p.parentPath.node.closingElement){p.parentPath.node.closingElement.name=e.jSXIdentifier(f.name)}if(e.isObjectExpression(_)){const r=e.identifier("p");let n=false;_.properties=_.properties.reduce((function propertiesReducer(i,a){if(e.isMemberExpression(a.key)||e.isCallExpression(a.key)||e.isIdentifier(a.key)&&t.scope.hasBinding(a.key.name)&&(e.isIdentifier(a.value)?a.key.name!==a.value.name:true)){n=true;const i=getLocalIdentifier(t);p.node.attributes.push(e.jSXAttribute(e.jSXIdentifier(i.name),e.jSXExpressionContainer(a.key)));a.key=e.memberExpression(r,i)}if(e.isObjectExpression(a.value)){a.value.properties=a.value.properties.reduce(propertiesReducer,[]);i.push(a)}else if(e.isSpreadElement(a)){if(e.isObjectExpression(a.argument)){a.argument.properties=a.argument.properties.reduce(propertiesReducer,[])}else{n=true;const i=getLocalIdentifier(t);p.node.attributes.push(e.jSXAttribute(e.jSXIdentifier(i.name),e.jSXExpressionContainer(a.argument)));a.argument=e.memberExpression(r,i)}i.push(a)}else if([e.isBigIntLiteral,e.isBooleanLiteral,e.isNullLiteral,e.isNumericLiteral,e.isStringLiteral].filter(Boolean).every((e=>!e(a.value)))){n=true;const s=getLocalIdentifier(t);p.node.attributes.push(e.jSXAttribute(e.jSXIdentifier(s.name),e.jSXExpressionContainer(a.value)));i.push(e.objectProperty(a.key,e.memberExpression(r,s)))}else{i.push(a)}return i}),[]);if(n){_=e.arrowFunctionExpression([r],_)}}else{_.expressions=_.expressions.reduce(((r,n)=>{if(Object.keys(u).some((e=>u[e].referencePaths.find((e=>e.node===n))))||e.isFunctionExpression(n)||e.isArrowFunctionExpression(n)){r.push(n)}else{const i=getLocalIdentifier(t);const a=e.identifier("p");p.node.attributes.push(e.jSXAttribute(e.jSXIdentifier(i.name),e.jSXExpressionContainer(n)));r.push(e.arrowFunctionExpression([a],e.memberExpression(a,i)))}return r}),[])}if(!y){let t=p;while(!e.isProgram(t)){t=t.parentPath}y=e=>t.pushContainer("body",e)}y(e.variableDeclaration("var",[e.variableDeclarator(f,e.isObjectExpression(_)||e.isArrowFunctionExpression(_)?e.callExpression(m,[_]):e.taggedTemplateExpression(m,_))]))};t["default"]=_default},610:(e,t)=>{t.__esModule=true;t["default"]=function(){return{manipulateOptions:function manipulateOptions(e,t){t.plugins.push("jsx")}}};e.exports=t["default"]},944:e=>{e.exports=require("../@babel/helper-annotate-as-pure")},16:e=>{e.exports=require("../@babel/helper-module-imports")},147:e=>{e.exports=require("fs")},296:e=>{e.exports=require("lodash/difference")},17:e=>{e.exports=require("path")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var a=true;try{e[r](i,i.exports,__nccwpck_require__);a=false}finally{if(a)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e["default"]=_default;var t=_interopRequireDefault(__nccwpck_require__(610));var n=_interopRequireDefault(__nccwpck_require__(893));var i=_interopRequireDefault(__nccwpck_require__(356));var a=_interopRequireDefault(__nccwpck_require__(180));var s=_interopRequireDefault(__nccwpck_require__(882));var o=_interopRequireDefault(__nccwpck_require__(746));var l=_interopRequireDefault(__nccwpck_require__(731));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _default({types:e}){return{inherits:t.default,visitor:{Program(t,r){t.traverse({JSXAttribute(t,r){(0,l.default)(e)(t,r)},VariableDeclarator(t,r){(0,o.default)(e)(t,r)}},r)},CallExpression(t,r){(0,a.default)(e)(t,r);(0,n.default)(e)(t,r)},TaggedTemplateExpression(t,r){(0,i.default)(e)(t,r);(0,a.default)(e)(t,r);(0,s.default)(e)(t,r);(0,n.default)(e)(t,r)}}}}})();module.exports=r})(); \ No newline at end of file diff --git a/packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/package.json b/packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/package.json deleted file mode 100644 index 361f4e05ece0..000000000000 --- a/packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"babel-plugin-styled-components","version":"1.13.3","license":"MIT","types":"index.d.ts"} diff --git a/packages/cli/babel-preset-base/jest.config.js b/packages/cli/babel-preset-base/jest.config.js deleted file mode 100644 index 5fcd3e5b28bd..000000000000 --- a/packages/cli/babel-preset-base/jest.config.js +++ /dev/null @@ -1,7 +0,0 @@ -const sharedConfig = require('@scripts/jest-config'); - -/** @type {import('@jest/types').Config.InitialOptions} */ -module.exports = { - ...sharedConfig, - rootDir: __dirname, -}; diff --git a/packages/cli/babel-preset-base/modern.config.js b/packages/cli/babel-preset-base/modern.config.js deleted file mode 100644 index c2bf3e85b393..000000000000 --- a/packages/cli/babel-preset-base/modern.config.js +++ /dev/null @@ -1,5 +0,0 @@ -const { tscLikeBuildConfig } = require('@scripts/build'); - -module.exports = { - buildConfig: tscLikeBuildConfig, -}; diff --git a/packages/cli/babel-preset-base/package.json b/packages/cli/babel-preset-base/package.json deleted file mode 100644 index 1bbb60e1779b..000000000000 --- a/packages/cli/babel-preset-base/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "@modern-js/babel-preset-base", - "description": "A Progressive React Framework for modern web development.", - "homepage": "https://modernjs.dev", - "bugs": "https://github.com/web-infra-dev/modern.js/issues", - "repository": { - "type": "git", - "url": "https://github.com/web-infra-dev/modern.js", - "directory": "packages/cli/babel-preset-base" - }, - "license": "MIT", - "keywords": [ - "react", - "framework", - "modern", - "modern.js" - ], - "version": "2.36.0", - "jsnext:source": "./src/index.ts", - "types": "./src/index.ts", - "main": "./dist/index.js", - "module": "./dist/index.js", - "exports": { - ".": { - "node": { - "jsnext:source": "./src/index.ts", - "import": "./dist/index.js", - "require": "./dist/index.js" - }, - "default": "./dist/index.js" - }, - "./compiled/babel-plugin-import": "./compiled/babel-plugin-import/index.js" - }, - "scripts": { - "prepublishOnly": "only-allow-pnpm", - "new": "modern-lib new", - "dev": "modern-lib build --watch", - "build": "modern-lib build", - "test": "jest --passWithNoTests" - }, - "dependencies": { - "@babel/core": "^7.22.15", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15", - "@babel/traverse": "^7.22.15", - "@babel/template": "^7.22.15", - "@babel/plugin-transform-runtime": "^7.22.15", - "@babel/plugin-transform-typescript": "^7.22.15", - "@babel/preset-env": "^7.22.15", - "@babel/preset-react": "^7.22.15", - "@babel/preset-typescript": "^7.22.15", - "@babel/runtime": "^7.22.15", - "@modern-js/utils": "workspace:*", - "@swc/helpers": "0.5.1", - "@types/babel__core": "^7.20.0", - "lodash": "^4.17.21" - }, - "devDependencies": { - "@modern-js/types": "workspace:*", - "@scripts/build": "workspace:*", - "@scripts/jest-config": "workspace:*", - "@types/jest": "^29", - "@types/node": "^14", - "jest": "^29", - "typescript": "^5" - }, - "sideEffects": false, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public", - "provenance": true, - "types": "./dist/index.d.ts" - } -} diff --git a/packages/cli/babel-preset-base/readme.md b/packages/cli/babel-preset-base/readme.md deleted file mode 100644 index f3d407c43230..000000000000 --- a/packages/cli/babel-preset-base/readme.md +++ /dev/null @@ -1,26 +0,0 @@ -

- Modern.js Logo -

- -

Modern.js

- -

- A Progressive React Framework for modern web development. -

- -## Getting Started - -Please follow [Quick Start](https://modernjs.dev/en/guides/get-started/quick-start) to get started with Modern.js. - -## Documentation - -- [English Documentation](https://modernjs.dev/en/) -- [中文文档](https://modernjs.dev) - -## Contributing - -Please read the [Contributing Guide](https://github.com/web-infra-dev/modern.js/blob/main/CONTRIBUTING.md). - -## License - -Modern.js is [MIT licensed](https://github.com/web-infra-dev/modern.js/blob/main/LICENSE). diff --git a/packages/cli/babel-preset-base/src/babel-chain/babel.ts b/packages/cli/babel-preset-base/src/babel-chain/babel.ts deleted file mode 100644 index 7451c9ed49da..000000000000 --- a/packages/cli/babel-preset-base/src/babel-chain/babel.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { TransformOptions, PluginItem } from '@babel/core'; -import { - BabelPresetChain, - PresetSetter, - createBabelPresetChain, -} from './preset'; -import { - BabelPluginChain, - PluginSetter, - createBabelPluginChain, -} from './plugin'; -import { BabelPlainChain, PlainSetter, createBabelPlainChain } from './plain'; - -export type BabelJSONConfig = { - plugins: PluginItem[]; - presets: PluginItem[]; -}; - -export type BabelChain = PlainSetter & { - preset: PresetSetter; - plugin: PluginSetter; - merge: (chain: BabelChain) => BabelChain; - toJSON: () => TransformOptions; - readonly internal: { - preset: BabelPresetChain; - plugin: BabelPluginChain; - plain: BabelPlainChain; - }; -}; - -export const createBabelChain = (): BabelChain => { - const presetChain = createBabelPresetChain(); - const pluginChain = createBabelPluginChain(); - const plainChain = createBabelPlainChain(); - - const merge = (other: BabelChain): BabelChain => { - presetChain.merge(other.internal.preset); - pluginChain.merge(other.internal.plugin); - plainChain.merge(other.internal.plain); - - return chain; - }; - - const toJSON = (): BabelJSONConfig => ({ - ...plainChain.toJSON(), - presets: presetChain.toJSON(), - plugins: pluginChain.toJSON(), - }); - - const chain: BabelChain = { - ...plainChain.plain, - plugin: pluginChain.plugin, - preset: presetChain.preset, - toJSON, - merge, - get internal() { - return { - preset: presetChain, - plugin: pluginChain, - plain: plainChain, - }; - }, - }; - - return chain; -}; - -export const babelChain = createBabelChain(); diff --git a/packages/cli/babel-preset-base/src/babel-chain/index.ts b/packages/cli/babel-preset-base/src/babel-chain/index.ts deleted file mode 100644 index f92df66c02dc..000000000000 --- a/packages/cli/babel-preset-base/src/babel-chain/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './babel'; -export * from './preset'; -export * from './plugin'; -export * from './plain'; diff --git a/packages/cli/babel-preset-base/src/babel-chain/plain.ts b/packages/cli/babel-preset-base/src/babel-chain/plain.ts deleted file mode 100644 index a143b2d1d755..000000000000 --- a/packages/cli/babel-preset-base/src/babel-chain/plain.ts +++ /dev/null @@ -1,194 +0,0 @@ -import type { TransformOptions } from '@babel/core'; - -export type BabelPlainConfig = Omit; - -export type GetSetter> = { - [K in keyof T]: (input: T[K]) => void; -}; - -export type PlainSetter = { - delete: (key: keyof BabelPlainConfig) => void; -} & GetSetter>; - -export type BabelPlainChain = { - plain: PlainSetter; - toJSON: () => BabelPlainConfig; - merge: (other: BabelPlainChain) => BabelPlainChain; -}; - -export const createBabelPlainChain = (): BabelPlainChain => { - let config: BabelPlainConfig = {}; - - const plain: any = { - // delete operator - delete: (key: keyof BabelPlainConfig) => { - delete config[key]; - }, - // field setter - cwd: (input: BabelPlainConfig['cwd']) => { - config.cwd = input; - }, - caller: (input: BabelPlainConfig['caller']) => { - config.caller = input; - }, - filename: (input: BabelPlainConfig['filename']) => { - config.filename = input; - }, - filenameRelative: (input: BabelPlainConfig['filenameRelative']) => { - config.filenameRelative = input; - }, - code: (input: BabelPlainConfig['code']) => { - config.code = input; - }, - ast: (input: BabelPlainConfig['ast']) => { - config.ast = input; - }, - root: (input: BabelPlainConfig['root']) => { - config.root = input; - }, - rootMode: (input: BabelPlainConfig['rootMode']) => { - config.rootMode = input; - }, - envName: (input: BabelPlainConfig['envName']) => { - config.envName = input; - }, - configFile: (input: BabelPlainConfig['configFile']) => { - config.configFile = input; - }, - babelrc: (input: BabelPlainConfig['babelrc']) => { - config.babelrc = input; - }, - babelrcRoots: (input: BabelPlainConfig['babelrcRoots']) => { - config.babelrcRoots = input; - }, - extends: (input: BabelPlainConfig['extends']) => { - config.extends = input; - }, - env: (input: BabelPlainConfig['env']) => { - config.env = input; - }, - overrides: (input: BabelPlainConfig['overrides']) => { - config.overrides = input; - }, - test: (input: BabelPlainConfig['test']) => { - config.test = input; - }, - include: (input: BabelPlainConfig['include']) => { - config.include = input; - }, - exclude: (input: BabelPlainConfig['exclude']) => { - config.exclude = input; - }, - ignore: (input: BabelPlainConfig['ignore']) => { - config.ignore = input; - }, - only: (input: BabelPlainConfig['only']) => { - config.only = input; - }, - inputSourceMap: (input: BabelPlainConfig['inputSourceMap']) => { - config.inputSourceMap = input; - }, - sourceMaps: (input: BabelPlainConfig['sourceMaps']) => { - config.sourceMaps = input; - }, - sourceFileName: (input: BabelPlainConfig['sourceFileName']) => { - config.sourceFileName = input; - }, - sourceRoot: (input: BabelPlainConfig['sourceRoot']) => { - config.sourceRoot = input; - }, - sourceType: (input: BabelPlainConfig['sourceType']) => { - config.sourceType = input; - }, - highlightCode: (input: BabelPlainConfig['highlightCode']) => { - config.highlightCode = input; - }, - wrapPluginVisitorMethod: ( - input: BabelPlainConfig['wrapPluginVisitorMethod'], - ) => { - config.wrapPluginVisitorMethod = input; - }, - parserOpts: (input: BabelPlainConfig['parserOpts']) => { - config.parserOpts = input; - }, - generatorOpts: (input: BabelPlainConfig['generatorOpts']) => { - config.generatorOpts = input; - }, - retainLines: (input: BabelPlainConfig['retainLines']) => { - config.retainLines = input; - }, - compact: (input: BabelPlainConfig['compact']) => { - config.compact = input; - }, - minified: (input: BabelPlainConfig['minified']) => { - config.minified = input; - }, - auxiliaryCommentBefore: ( - input: BabelPlainConfig['auxiliaryCommentBefore'], - ) => { - config.auxiliaryCommentBefore = input; - }, - auxiliaryCommentAfter: ( - input: BabelPlainConfig['auxiliaryCommentAfter'], - ) => { - config.auxiliaryCommentAfter = input; - }, - comments: (input: BabelPlainConfig['comments']) => { - config.comments = input; - }, - shouldPrintComment: (input: BabelPlainConfig['shouldPrintComment']) => { - config.shouldPrintComment = input; - }, - moduleIds: (input: BabelPlainConfig['moduleIds']) => { - config.moduleIds = input; - }, - moduleId: (input: BabelPlainConfig['moduleId']) => { - config.moduleId = input; - }, - getModuleId: (input: BabelPlainConfig['getModuleId']) => { - config.getModuleId = input; - }, - moduleRoot: (input: BabelPlainConfig['moduleRoot']) => { - config.moduleRoot = input; - }, - }; - - const toJSON = () => ({ ...config }); - - // straightforward merging babel config - // see https://babeljs.io/docs/en/configuration#how-babel-merges-config-items - const merge = (other: BabelPlainChain): BabelPlainChain => { - const otherConfig = other.toJSON(); - - const nexConfig = { - ...config, - ...otherConfig, - }; - - if (nexConfig.parserOpts) { - nexConfig.parserOpts = { - ...config.parserOpts, - ...otherConfig.parserOpts, - }; - } - - if (nexConfig.generatorOpts) { - nexConfig.generatorOpts = { - ...config.generatorOpts, - ...otherConfig.generatorOpts, - }; - } - - config = nexConfig; - - return chain; - }; - - const chain: BabelPlainChain = { - plain, - toJSON, - merge, - }; - - return chain; -}; diff --git a/packages/cli/babel-preset-base/src/babel-chain/plugin.ts b/packages/cli/babel-preset-base/src/babel-chain/plugin.ts deleted file mode 100644 index bfaa087e3b43..000000000000 --- a/packages/cli/babel-preset-base/src/babel-chain/plugin.ts +++ /dev/null @@ -1,114 +0,0 @@ -import type { PluginItem } from '@babel/core'; - -export type Plugin = { - name: string; - path?: string; - options: any[]; -}; - -export type PluginSetter = (name: string) => { - tap: (options: any[]) => void; - delete: () => void; - ban: () => void; - options: () => any[]; - filter: Plugin[]['filter']; - use: (path: string, options?: any[]) => void; -}; - -export type BabelPluginChain = { - plugin: PluginSetter; - plugins: Plugin[]; - blacks: string[]; - toJSON: () => PluginItem[]; - merge: (other: BabelPluginChain) => BabelPluginChain; -}; - -export const createBabelPluginChain = (): BabelPluginChain => { - let plugins: Plugin[] = []; - - const blacks: string[] = []; - - const plugin = (name: string) => { - const pluginExist = plugins.find(plugin => plugin.name === name); - const isExist = Boolean(pluginExist); - const plugin = pluginExist || { name, options: [] }; - - const tap = (options: any[]) => { - plugin.options = options; - set(); - }; - - const options = (): any[] => plugin.options; - - const del = () => { - if (isExist) { - plugins = plugins.filter(plugin => !plugin.name.includes(name)); - } - }; - - const ban = () => { - if (!blacks.includes(name)) { - blacks.push(name); - } - del(); - }; - - const set = () => { - if (blacks.includes(name)) { - throw new Error(`Plugin: ${name} has been banned!, You can't set it.`); - } - - // merge preset with replacing - // see https://babeljs.io/docs/en/configuration#how-babel-merges-config-items - if (!isExist) { - plugins.push(plugin); - } - }; - - const use = (path: string, options?: any[]) => { - plugin.path = path; - plugin.options = options || []; - set(); - }; - - return { - tap, - delete: del, - ban, - options, - filter: plugins.filter, - use, - }; - }; - - const toJSON = (): PluginItem[] => - plugins.map(plugin => - plugin.options - ? [plugin.path || plugin.name, ...plugin.options] - : plugin.path || plugin.name, - ); - - // merge preset with replacing - // see https://babeljs.io/docs/en/configuration#how-babel-merges-config-items - const merge = (other: BabelPluginChain): BabelPluginChain => { - for (const plugin of other.plugins) { - if (plugin.path) { - chain.plugin(plugin.name).use(plugin.path, plugin.options); - } else { - chain.plugin(plugin.name).tap(plugin.options); - } - } - - return chain; - }; - - const chain = { - plugin, - plugins, - blacks, - toJSON, - merge, - }; - - return chain; -}; diff --git a/packages/cli/babel-preset-base/src/babel-chain/preset.ts b/packages/cli/babel-preset-base/src/babel-chain/preset.ts deleted file mode 100644 index 56556bf11dee..000000000000 --- a/packages/cli/babel-preset-base/src/babel-chain/preset.ts +++ /dev/null @@ -1,114 +0,0 @@ -import type { PluginItem } from '@babel/core'; - -export type Preset = { - name: string; - path?: string; - options: any[]; -}; - -export type PresetSetter = (name: string) => { - tap: (options: any[]) => void; - delete: () => void; - ban: () => void; - filter: Preset[]['filter']; - options: () => any[]; - use: (path: string, options?: any[]) => void; -}; - -export type BabelPresetChain = { - preset: PresetSetter; - presets: Preset[]; - blacks: string[]; - toJSON: () => PluginItem[]; - merge: (other: BabelPresetChain) => BabelPresetChain; -}; - -export const createBabelPresetChain = (): BabelPresetChain => { - let presets: Preset[] = []; - - const blacks: string[] = []; - - const preset = (name: string) => { - const presetExist = presets.find(plugin => plugin.name === name); - const isExist = Boolean(presetExist); - const preset: Preset = presetExist || { name, options: [] }; - - const tap = (options: any[]) => { - preset.options = options; - set(); - }; - - const options = (): any[] => preset.options; - - const del = () => { - if (isExist) { - presets = presets.filter(preset => !preset.name.includes(name)); - } - }; - - const ban = () => { - if (!blacks.includes(name)) { - blacks.push(name); - } - del(); - }; - - const set = () => { - if (blacks.includes(name)) { - throw new Error(`Preset: ${name} has been banned!, You can't set it.`); - } - - // merge preset with replacing - // see https://babeljs.io/docs/en/configuration#how-babel-merges-config-items - if (!isExist) { - presets.push(preset); - } - }; - - const use = (path: string, options?: any[]) => { - preset.path = path; - preset.options = options || []; - set(); - }; - - return { - tap, - delete: del, - ban, - options, - filter: presets.filter, - use, - }; - }; - - const toJSON = (): PluginItem[] => - presets.map(preset => - preset.options - ? [preset.path || preset.name, ...preset.options] - : preset.path || preset.name, - ); - - // merge preset with replacing - // see https://babeljs.io/docs/en/configuration#how-babel-merges-config-items - const merge = (other: BabelPresetChain): BabelPresetChain => { - for (const preset of other.presets) { - if (preset.path) { - chain.preset(preset.name).use(preset.path, preset.options); - } else { - chain.preset(preset.name).tap(preset.options); - } - } - - return chain; - }; - - const chain = { - preset, - presets, - blacks, - toJSON, - merge, - }; - - return chain; -}; diff --git a/packages/cli/babel-preset-base/src/index.ts b/packages/cli/babel-preset-base/src/index.ts deleted file mode 100644 index e0ec4a39ce53..000000000000 --- a/packages/cli/babel-preset-base/src/index.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { createBabelChain } from './babel-chain'; -import { getPresetChain } from './presets'; -import { getPluginsChain } from './plugins'; -import { IStyledComponentOptions } from './type'; - -export * from './babel-chain'; - -export interface IBaseBabelConfigOption { - appDirectory: string; - presets?: { - envOptions?: boolean | Record; - reactOptions?: boolean | Record; - typescriptOptions?: boolean | Record; - }; - plugins?: { - transformRuntime?: any; - import?: { - antd?: - | { - libraryDirectory: string; - } - | false; - }; - styledComponentsOptions?: false | IStyledComponentOptions; - }; - useLegacyDecorators?: boolean; - syntax?: 'es5' | 'es6+'; - type?: 'module' | 'commonjs'; - runEnvironments?: 'node' | 'browsers'; - jsxTransformRuntime?: 'automatic' | 'classic'; - useTsLoader?: boolean; - overrideBrowserslist?: string[]; -} - -export const getBaseBabelChain = (option: IBaseBabelConfigOption) => { - const chain = createBabelChain(); - const presetsChain = getPresetChain(option); - const pluginsChain = getPluginsChain(option); - chain.merge(presetsChain).merge(pluginsChain); - return chain; -}; - -export const getBaseBabelConfig: any = (option: IBaseBabelConfigOption) => - getBaseBabelChain(option).toJSON(); - -export * from './type'; diff --git a/packages/cli/babel-preset-base/src/plugins.ts b/packages/cli/babel-preset-base/src/plugins.ts deleted file mode 100644 index aa6d189ff49b..000000000000 --- a/packages/cli/babel-preset-base/src/plugins.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { getAntdMajorVersion } from '@modern-js/utils'; -import { createBabelChain } from './babel-chain'; -import { IBaseBabelConfigOption } from '.'; - -export const getPluginsChain = (option: IBaseBabelConfigOption) => { - const { - runEnvironments, - plugins: { - import: babelPluginImport, - transformRuntime, - styledComponentsOptions, - } = {}, - useLegacyDecorators = true, - type = 'module', - useTsLoader = false, - } = option; - const chain = createBabelChain(); - - if (runEnvironments === 'node') { - chain - .plugin('babel-plugin-dynamic-import-node') - .use(require.resolve('../compiled/babel-plugin-dynamic-import-node')); - } - - const { antd } = babelPluginImport || { - antd: { libraryDirectory: 'es' }, - }; - - if (antd !== false) { - const antdMajorVersion = getAntdMajorVersion(option.appDirectory); - - // antd >= v5 no longer need babel-plugin-import - // see: https://ant.design/docs/react/migration-v5#remove-babel-plugin-import - if (antdMajorVersion && antdMajorVersion < 5) { - chain - .plugin('babel-plugin-import') - .use(require.resolve('../compiled/babel-plugin-import'), [ - { - libraryName: 'antd', - libraryDirectory: antd?.libraryDirectory || 'es', - style: true, - }, - 'import-antd', - ]); - } - } - - if (useTsLoader) { - return chain; - } - - // link: https://github.com/tc39/proposal-decorators - chain - .plugin('@babel/plugin-proposal-decorators') - .use(require.resolve('../compiled/@babel/plugin-proposal-decorators'), [ - useLegacyDecorators - ? { - // https://github.com/nicolo-ribaudo/legacy-decorators-migration-utility - legacy: true, - // https://github.com/tc39/proposal-decorators/issues/69 - } - : { - legacy: false, - decoratorsBeforeExport: true, - }, - ]); - - chain - .plugin('@babel/plugin-transform-runtime') - .use(require.resolve('@babel/plugin-transform-runtime'), [ - { - // By default, babel assumes babel/runtime version 7.0.0-beta.0, - // explicitly resolving to match the provided helper functions. - // https://github.com/babel/babel/issues/10261 - version: require('@babel/runtime/package.json').version, - regenerator: true, - // https://babeljs.io/docs/en/babel-plugin-transform-runtime#useesmodules - // We should turn this on once the lowest version of Node LTS - // supports ES Modules. - useESModules: type === 'module', - // Undocumented option that lets us encapsulate our runtime, ensuring - // the correct version is used - // https://github.com/babel/babel/blob/090c364a90fe73d36a30707fc612ce037bdbbb24/packages/babel-plugin-transform-runtime/src/index.js#L35-L42 - // absoluteRuntime: absoluteRuntimePath, - helpers: false, - ...(transformRuntime || {}), - }, - ]); - - // link: https://github.com/tc39/proposal-export-default-from - chain - .plugin('@babel/plugin-proposal-export-default-from') - .use( - require.resolve('../compiled/@babel/plugin-proposal-export-default-from'), - ); - - // ======= Stage1 ===== - // link: https://github.com/tc39/proposal-pipeline-operator - chain - .plugin('@babel/plugin-proposal-pipeline-operator') - .use( - require.resolve('../compiled/@babel/plugin-proposal-pipeline-operator'), - [{ proposal: 'minimal' }], - ); - - // link: https://github.com/tc39/proposal-partial-application - chain - .plugin('@babel/plugin-proposal-partial-application') - .use( - require.resolve('../compiled/@babel/plugin-proposal-partial-application'), - ); - - if (styledComponentsOptions !== false) { - chain - .plugin('babel-plugin-styled-components') - .use(require.resolve('../compiled/babel-plugin-styled-components'), [ - styledComponentsOptions || {}, - 'styled-components', - ]); - } - - return chain; -}; diff --git a/packages/cli/babel-preset-base/src/presets.ts b/packages/cli/babel-preset-base/src/presets.ts deleted file mode 100644 index 6fbfa435ded6..000000000000 --- a/packages/cli/babel-preset-base/src/presets.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { - getBrowserslist, - DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS, -} from '@modern-js/utils'; -import { createBabelChain } from './babel-chain'; -import { IBaseBabelConfigOption } from '.'; - -const es6BrowserList = [ - 'chrome >= 61', - 'edge >= 16', - 'firefox >= 60', - 'safari >= 11', - 'ios_saf >= 11', -]; - -const getPresetOptions = (options: any) => - typeof options === 'object' ? options : {}; - -export const getPresetChain = (option: IBaseBabelConfigOption) => { - const { - appDirectory, - presets: { envOptions, reactOptions, typescriptOptions } = {}, - syntax = 'es5', - type = 'module', - runEnvironments = 'browsers', - jsxTransformRuntime = 'automatic', - useTsLoader = false, - overrideBrowserslist, - } = option; - const chain = createBabelChain(); - // set envOptions = false - const disableEnvPreset = typeof envOptions === 'boolean' && !envOptions; - const disableReactPreset = typeof reactOptions === 'boolean' && !reactOptions; - const disableTypescriptPreset = - typeof typescriptOptions === 'boolean' && !typescriptOptions; - if (!disableEnvPreset) { - const browsersTargets = - syntax === 'es5' ? getBrowserslist(appDirectory) : es6BrowserList; - const targets = - runEnvironments === 'node' ? { node: '12' } : browsersTargets; - - const presetEnvOptions = { - targets: overrideBrowserslist || targets, - modules: type === 'commonjs' ? 'commonjs' : false, - bugfixes: runEnvironments !== 'node', - shippedProposals: type === 'module' && syntax === 'es6+', - ...getPresetOptions(envOptions), - }; - - chain - .preset('@babel/preset-env') - .use(require.resolve('@babel/preset-env'), [presetEnvOptions]); - } - - if (!disableReactPreset) { - const classicOption = { - useBuiltIns: !(type === 'module' && syntax === 'es5'), - useSpread: type === 'module' && syntax === 'es5', - }; - // auto useSpread enable when automatic - const automaticOption = {}; - const presetReactOptions = { - runtime: jsxTransformRuntime === 'classic' ? 'classic' : 'automatic', - ...(jsxTransformRuntime === 'classic' ? classicOption : automaticOption), - ...getPresetOptions(reactOptions), - }; - chain - .preset('@babel/preset-react') - .use(require.resolve('@babel/preset-react'), [presetReactOptions]); - } - - if (!(useTsLoader || disableTypescriptPreset)) { - const typescriptPresetOptions = { - ...DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS, - ...getPresetOptions(typescriptOptions), - }; - chain - .preset('@babel/preset-typescript') - .use(require.resolve('@babel/preset-typescript'), [ - typescriptPresetOptions, - ]); - } - - return chain; -}; diff --git a/packages/cli/babel-preset-base/src/type.ts b/packages/cli/babel-preset-base/src/type.ts deleted file mode 100644 index 54bf8a04794c..000000000000 --- a/packages/cli/babel-preset-base/src/type.ts +++ /dev/null @@ -1,22 +0,0 @@ -export type { - PresetEnvOptions, - SharedBabelPresetReactOptions, - AutomaticRuntimePresetReactOptions, - ClassicRuntimePresetReactOptions, - PresetReactOptions, - BabelConfigUtils, - BabelConfig, - BabelOptions, -} from '@modern-js/types'; - -export interface IStyledComponentOptions { - pure?: boolean; - displayName?: boolean; - ssr?: boolean; - fileName?: boolean; - meaninglessFileNames?: string[]; - minify?: boolean; - transpileTemplateLiterals?: boolean; - namespace?: string; - topLevelImportPaths?: string[]; -} diff --git a/packages/cli/babel-preset-base/tests/.eslintrc.js b/packages/cli/babel-preset-base/tests/.eslintrc.js deleted file mode 100644 index 8ad708bcff41..000000000000 --- a/packages/cli/babel-preset-base/tests/.eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - extends: ['@modern-js'], - parserOptions: { - project: require.resolve('./tsconfig.json'), - }, -}; diff --git a/packages/cli/babel-preset-base/tests/babel.test.ts b/packages/cli/babel-preset-base/tests/babel.test.ts deleted file mode 100644 index 1a4b29565256..000000000000 --- a/packages/cli/babel-preset-base/tests/babel.test.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { createBabelChain } from '../src/babel-chain'; - -describe('babel', () => { - describe('setter', () => { - it('preset', () => { - const chain = createBabelChain(); - - chain.preset('foo').tap([]); - - expect(chain.toJSON()).toStrictEqual({ presets: [['foo']], plugins: [] }); - }); - - it('plugin', () => { - const chain = createBabelChain(); - - chain.plugin('foo').tap([]); - - expect(chain.toJSON()).toStrictEqual({ presets: [], plugins: [['foo']] }); - }); - - it('plain', () => { - const chain = createBabelChain(); - - chain.cwd('foo'); - - expect(chain.toJSON()).toStrictEqual({ - cwd: 'foo', - presets: [], - plugins: [], - }); - }); - }); - - describe('toJSON', () => { - it('base usage', () => { - const chain = createBabelChain(); - - chain.preset('foo').tap([]); - chain.plugin('foo').tap([]); - chain.cwd('foo'); - - expect(chain.toJSON()).toStrictEqual({ - presets: [['foo']], - plugins: [['foo']], - cwd: 'foo', - }); - }); - }); - - describe('merge', () => { - it('plain', () => { - const chain = createBabelChain(); - chain.cwd('test'); - - const other = createBabelChain(); - other.filename('test'); - - chain.merge(other); - - expect(chain.toJSON()).toStrictEqual({ - cwd: 'test', - filename: 'test', - presets: [], - plugins: [], - }); - }); - - it('preset', () => { - const chain = createBabelChain(); - chain.preset('foo').tap([{ fooOpt: 'test' }]); - - const other = createBabelChain(); - other.preset('bar').tap([{ barOpt: 'test' }]); - - chain.merge(other); - - expect(chain.toJSON()).toStrictEqual({ - presets: [ - ['foo', { fooOpt: 'test' }], - ['bar', { barOpt: 'test' }], - ], - plugins: [], - }); - }); - - it('plugin', () => { - const chain = createBabelChain(); - chain.plugin('foo').tap([{ fooOpt: 'test' }]); - - const other = createBabelChain(); - other.plugin('bar').tap([{ barOpt: 'test' }]); - - chain.merge(other); - - expect(chain.toJSON()).toStrictEqual({ - presets: [], - plugins: [ - ['foo', { fooOpt: 'test' }], - ['bar', { barOpt: 'test' }], - ], - }); - }); - }); -}); diff --git a/packages/cli/babel-preset-base/tests/plain.test.ts b/packages/cli/babel-preset-base/tests/plain.test.ts deleted file mode 100644 index 9b5dc5310118..000000000000 --- a/packages/cli/babel-preset-base/tests/plain.test.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { createBabelPlainChain } from '../src/babel-chain'; - -describe('plain', () => { - describe('setter', () => { - it('cwd', () => { - const chain = createBabelPlainChain(); - - chain.plain.cwd('test'); - - expect(chain.toJSON().cwd).toBe('test'); - }); - - it('caller', () => { - const chain = createBabelPlainChain(); - const caller = { name: 'test' }; - - chain.plain.caller(caller); - - expect(chain.toJSON().caller).toStrictEqual(caller); - }); - - it('filename', () => { - const chain = createBabelPlainChain(); - - chain.plain.filename('test'); - - expect(chain.toJSON().filename).toBe('test'); - }); - - it('filenameRelative', () => { - const chain = createBabelPlainChain(); - - chain.plain.filenameRelative('test'); - - expect(chain.toJSON().filenameRelative).toBe('test'); - }); - - it('code', () => { - const chain = createBabelPlainChain(); - - chain.plain.code(true); - - expect(chain.toJSON().code).toBe(true); - }); - - it('ast', () => { - const chain = createBabelPlainChain(); - - chain.plain.ast(true); - - expect(chain.toJSON().ast).toBe(true); - }); - - it('delete', () => { - const chain = createBabelPlainChain(); - - chain.plain.ast(true); - - expect(chain.toJSON().ast).toBe(true); - - chain.plain.delete('ast'); - - expect(chain.toJSON().ast).toBe(undefined); - }); - }); - - describe('toJSON', () => { - it('base usage', () => { - const chain = createBabelPlainChain(); - - chain.plain.cwd('test'); - - const caller = { name: 'test' }; - chain.plain.caller(caller); - - chain.plain.filename('test'); - - chain.plain.filenameRelative('test'); - - expect(chain.toJSON()).toStrictEqual({ - cwd: 'test', - caller, - filename: 'test', - filenameRelative: 'test', - }); - }); - }); - - describe('merge', () => { - it('base usage', () => { - const chain = createBabelPlainChain(); - chain.plain.cwd('test'); - - const other = createBabelPlainChain(); - other.plain.filename('test'); - - chain.merge(other); - - expect(chain.toJSON()).toStrictEqual({ - cwd: 'test', - filename: 'test', - }); - }); - - it('straightforward', () => { - const chain = createBabelPlainChain(); - chain.plain.cwd('foo'); - - const other = createBabelPlainChain(); - other.plain.cwd('bar'); - - chain.merge(other); - - expect(chain.toJSON()).toStrictEqual({ cwd: 'bar' }); - }); - }); -}); diff --git a/packages/cli/babel-preset-base/tests/plugin.test.ts b/packages/cli/babel-preset-base/tests/plugin.test.ts deleted file mode 100644 index a2fcdaa3e99b..000000000000 --- a/packages/cli/babel-preset-base/tests/plugin.test.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { createBabelPluginChain } from '../src/babel-chain'; - -describe('plugin', () => { - describe('setter', () => { - it('tap', () => { - const chain = createBabelPluginChain(); - - chain.plugin('foo').tap([{ fooOpt: 'test' }]); - - expect(chain.toJSON()).toStrictEqual([['foo', { fooOpt: 'test' }]]); - }); - - it('delete', () => { - const chain = createBabelPluginChain(); - - chain.plugin('foo').tap([{ fooOpt: 'test' }]); - chain.plugin('foo').delete(); - - expect(chain.toJSON()).toStrictEqual([]); - }); - - it('ban', () => { - const chain = createBabelPluginChain(); - - chain.plugin('foo').ban(); - - expect(() => - chain.plugin('foo').tap([{ fooOpt: 'test' }]), - ).toThrowError(); - }); - - it('use', () => { - const chain = createBabelPluginChain(); - - chain.plugin('foo').use('path/to/foo'); - - expect(chain.toJSON()).toStrictEqual([['path/to/foo']]); - }); - }); - - describe('toJSON', () => { - it('base usage', () => { - const chain = createBabelPluginChain(); - - chain.plugin('foo').tap([{ fooOpt: 'test' }]); - - expect(chain.toJSON()).toStrictEqual([['foo', { fooOpt: 'test' }]]); - }); - - it('with path', () => { - const chain = createBabelPluginChain(); - - chain.plugin('foo').use('path/to/foo', [{ fooOpt: 'test' }]); - - expect(chain.toJSON()).toStrictEqual([ - ['path/to/foo', { fooOpt: 'test' }], - ]); - }); - }); - - describe('merge', () => { - it('base usage', () => { - const chain = createBabelPluginChain(); - chain.plugin('foo').tap([{ fooOpt: 'test' }]); - - const other = createBabelPluginChain(); - other.plugin('bar').tap([{ barOpt: 'test' }]); - - chain.merge(other); - - expect(chain.toJSON()).toStrictEqual([ - ['foo', { fooOpt: 'test' }], - ['bar', { barOpt: 'test' }], - ]); - }); - }); -}); diff --git a/packages/cli/babel-preset-base/tests/preset.test.ts b/packages/cli/babel-preset-base/tests/preset.test.ts deleted file mode 100644 index db17a5068b2c..000000000000 --- a/packages/cli/babel-preset-base/tests/preset.test.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { createBabelPresetChain } from '../src/babel-chain'; - -describe('preset', () => { - describe('setter', () => { - it('tap', () => { - const chain = createBabelPresetChain(); - - chain.preset('foo').tap([{ fooOpt: 'test' }]); - - expect(chain.toJSON()).toStrictEqual([['foo', { fooOpt: 'test' }]]); - }); - - it('delete', () => { - const chain = createBabelPresetChain(); - - chain.preset('foo').tap([{ fooOpt: 'test' }]); - chain.preset('foo').delete(); - - expect(chain.toJSON()).toStrictEqual([]); - }); - - it('ban', () => { - const chain = createBabelPresetChain(); - - chain.preset('foo').ban(); - - expect(() => - chain.preset('foo').tap([{ fooOpt: 'test' }]), - ).toThrowError(); - }); - - it('use', () => { - const chain = createBabelPresetChain(); - - chain.preset('foo').use('path/to/foo'); - - expect(chain.toJSON()).toStrictEqual([['path/to/foo']]); - }); - }); - - describe('toJSON', () => { - it('base usage', () => { - const chain = createBabelPresetChain(); - - chain.preset('foo').tap([{ fooOpt: 'test' }]); - - expect(chain.toJSON()).toStrictEqual([['foo', { fooOpt: 'test' }]]); - }); - - it('with path', () => { - const chain = createBabelPresetChain(); - - chain.preset('foo').use('path/to/foo', [{ fooOpt: 'test' }]); - - expect(chain.toJSON()).toStrictEqual([ - ['path/to/foo', { fooOpt: 'test' }], - ]); - }); - }); - - describe('merge', () => { - it('base usage', () => { - const chain = createBabelPresetChain(); - chain.preset('foo').tap([{ fooOpt: 'test' }]); - - const other = createBabelPresetChain(); - other.preset('bar').tap([{ barOpt: 'test' }]); - - chain.merge(other); - - expect(chain.toJSON()).toStrictEqual([ - ['foo', { fooOpt: 'test' }], - ['bar', { barOpt: 'test' }], - ]); - }); - }); -}); diff --git a/packages/cli/babel-preset-base/tests/tsconfig.json b/packages/cli/babel-preset-base/tests/tsconfig.json deleted file mode 100644 index ece298aadab4..000000000000 --- a/packages/cli/babel-preset-base/tests/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "@modern-js/tsconfig/base", - "compilerOptions": { - "noEmit": true, - "declaration": false, - "jsx": "preserve", - "baseUrl": "./", - "isolatedModules": true, - "paths": {} - } -} diff --git a/packages/cli/babel-preset-base/tsconfig.json b/packages/cli/babel-preset-base/tsconfig.json deleted file mode 100644 index cf93335c314b..000000000000 --- a/packages/cli/babel-preset-base/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "@modern-js/tsconfig/base", - "compilerOptions": { - "target": "ES2019", - "declaration": true, - "outDir": "./dist", - "baseUrl": "./", - "isolatedModules": true, - "esModuleInterop": true - }, - "include": ["src"] -} diff --git a/packages/server/server/src/dev-tools/register/index.ts b/packages/server/server/src/dev-tools/register/index.ts index 7fd20b3eee3f..3f945c747aa9 100644 --- a/packages/server/server/src/dev-tools/register/index.ts +++ b/packages/server/server/src/dev-tools/register/index.ts @@ -90,8 +90,6 @@ export const enableRegister = ( }, { tsconfigPath, - syntax: 'es6+', - type: 'commonjs', }, ); diff --git a/packages/server/utils/package.json b/packages/server/utils/package.json index 5debaa3b4303..d92b55041f00 100644 --- a/packages/server/utils/package.json +++ b/packages/server/utils/package.json @@ -41,13 +41,14 @@ "@babel/core": "^7.22.15", "@babel/plugin-proposal-decorators": "^7.22.15", "@babel/preset-env": "^7.22.15", + "@babel/preset-react": "^7.22.15", "@babel/preset-typescript": "^7.22.15", "@modern-js/babel-compiler": "workspace:*", - "@modern-js/babel-preset-base": "workspace:*", "@modern-js/utils": "workspace:*", "@modern-js/babel-plugin-module-resolver": "workspace:*", - "babel-plugin-transform-typescript-metadata": "^0.3.2", - "@swc/helpers": "0.5.1" + "@rsbuild/babel-preset": "0.0.7", + "@swc/helpers": "0.5.1", + "babel-plugin-transform-typescript-metadata": "^0.3.2" }, "devDependencies": { "@modern-js/server-core": "workspace:*", diff --git a/packages/server/utils/src/compilers/babel/index.ts b/packages/server/utils/src/compilers/babel/index.ts index 8b6fc03d6147..4bf534789375 100644 --- a/packages/server/utils/src/compilers/babel/index.ts +++ b/packages/server/utils/src/compilers/babel/index.ts @@ -2,7 +2,7 @@ import * as path from 'path'; import { fs, json5, getAliasConfig } from '@modern-js/utils'; import { compiler } from '@modern-js/babel-compiler'; import { CompileFunc, FILE_EXTENSIONS } from '../../common'; -import { getBabelChain, applyUserBabelConfig } from './preset'; +import { getBabelConfig, applyUserBabelConfig } from './preset'; export * from '@babel/core'; @@ -41,8 +41,6 @@ export const existTsConfigFile = (tsconfigAbsolutePath: string) => { }; export interface IPackageModeValue { - type: 'module' | 'commonjs'; - syntax: 'es5' | 'es6+'; tsconfigPath: string; } @@ -59,42 +57,12 @@ export const resolveBabelConfig = ( }); // babel config - const babelChain = getBabelChain( - { - appDirectory, - enableReactPreset: true, - enableTypescriptPreset: true, - alias: aliasConfig, - }, - { - type: option.type, - syntax: option.syntax, - }, - ); - - const envOptions = babelChain.preset('@babel/preset-env').options(); - babelChain - .preset('@babel/preset-env') - .use(require.resolve('@babel/preset-env'), [ - { - ...envOptions[0], - loose: true, - }, - ]); - - babelChain - .plugin('babel-plugin-transform-typescript-metadata') - .use(require.resolve('babel-plugin-transform-typescript-metadata'), []); - - babelChain - .plugin('@babel/plugin-proposal-decorators') - .use(require.resolve('@babel/plugin-proposal-decorators'), [ - { legacy: true }, - ]); - - const internalBabelConfig = { ...babelChain.toJSON() }; + const defaultBabelConfig = getBabelConfig({ + appDirectory, + alias: aliasConfig, + }); - return applyUserBabelConfig(internalBabelConfig, babelConfig); + return applyUserBabelConfig(defaultBabelConfig, babelConfig); }; export const compileByBabel: CompileFunc = async ( @@ -107,8 +75,6 @@ export const compileByBabel: CompileFunc = async ( sourceDirs.map(async sourceDir => { const babelConfig = resolveBabelConfig(appDirectory, config, { tsconfigPath: tsconfigPath ? tsconfigPath : '', - syntax: 'es6+', - type: 'commonjs', }); if (await fs.pathExists(sourceDir)) { const basename = path.basename(sourceDir); diff --git a/packages/server/utils/src/compilers/babel/preset/alias.ts b/packages/server/utils/src/compilers/babel/preset/alias.ts index 9d55f62393bf..ad00cf474cad 100644 --- a/packages/server/utils/src/compilers/babel/preset/alias.ts +++ b/packages/server/utils/src/compilers/babel/preset/alias.ts @@ -76,7 +76,7 @@ export const aliasPlugin = (alias: AliasOption): [string, PluginOptions] => { }; const typescriptExts = ['.ts', '.tsx', '.js', '.jsx', '.es', '.es6', '.mjs']; return [ - '@modern-js/babel-plugin-module-resolver', + require.resolve('@modern-js/babel-plugin-module-resolver'), { root: absoluteBaseUrl, alias: mergedPaths, diff --git a/packages/server/utils/src/compilers/babel/preset/index.ts b/packages/server/utils/src/compilers/babel/preset/index.ts index 4a2b7da72d2b..16c50b7eb05d 100644 --- a/packages/server/utils/src/compilers/babel/preset/index.ts +++ b/packages/server/utils/src/compilers/babel/preset/index.ts @@ -1,47 +1,34 @@ -import { getBaseBabelChain } from '@modern-js/babel-preset-base'; -import { ISyntaxOption, ILibPresetOption } from './types'; +import { getBabelConfigForNode } from '@rsbuild/babel-preset/node'; +import { ILibPresetOption } from './types'; import { aliasPlugin } from './alias'; -export const getBabelChain = ( - libPresetOption: ILibPresetOption, - syntaxOption: ISyntaxOption, -) => { - const { - appDirectory, - jsxTransformRuntime, - enableReactPreset, - enableTypescriptPreset, - styledComponentsOptions, - } = libPresetOption; - const { syntax, type } = syntaxOption; - const chain = getBaseBabelChain({ - appDirectory, - type, - syntax, - presets: { - envOptions: true, - reactOptions: enableReactPreset, - typescriptOptions: enableTypescriptPreset - ? { allowDeclareFields: true, allExtensions: true } - : false, +export const getBabelConfig = (libPresetOption: ILibPresetOption) => { + const config = getBabelConfigForNode({ + presetEnv: { + loose: true, + modules: 'commonjs', }, - plugins: { - transformRuntime: { - corejs: false, // 关闭 corejs - // for es5 code need helper functions - helpers: syntaxOption.syntax === 'es5', - }, - styledComponentsOptions, + pluginDecorators: { + version: 'legacy', }, - jsxTransformRuntime, }); + config.presets?.push([ + require.resolve('@babel/preset-react'), + { + runtime: 'automatic', + }, + ]); + if (libPresetOption.alias) { - const [name, opt] = aliasPlugin(libPresetOption.alias); - chain.plugin(name).use(require.resolve(name), [opt]); + config.plugins?.push(aliasPlugin(libPresetOption.alias)); } - return chain; + config.plugins?.push( + require.resolve('babel-plugin-transform-typescript-metadata'), + ); + + return config; }; export * from './types'; diff --git a/packages/server/utils/src/compilers/babel/preset/types.ts b/packages/server/utils/src/compilers/babel/preset/types.ts index d27f0bab63ff..df9c483ce637 100644 --- a/packages/server/utils/src/compilers/babel/preset/types.ts +++ b/packages/server/utils/src/compilers/babel/preset/types.ts @@ -1,10 +1,3 @@ -import type { IStyledComponentOptions } from '@modern-js/babel-preset-base'; - -export interface ISyntaxOption { - syntax: 'es5' | 'es6+'; - type: 'module' | 'commonjs'; -} - export interface AliasOption { absoluteBaseUrl: string; paths?: Record; @@ -14,11 +7,7 @@ export interface AliasOption { export interface ILibPresetOption { appDirectory: string; - enableTypescriptPreset?: boolean; - enableReactPreset?: boolean; alias?: AliasOption; - jsxTransformRuntime?: JsxTransformRuntimeType; - styledComponentsOptions?: IStyledComponentOptions; } export type JsxTransformRuntimeType = 'automatic' | 'classic'; diff --git a/packages/server/utils/tests/__snapshots__/babel.test.ts.snap b/packages/server/utils/tests/__snapshots__/babel.test.ts.snap index e57d6654b0f7..be83f5a7ad6f 100644 --- a/packages/server/utils/tests/__snapshots__/babel.test.ts.snap +++ b/packages/server/utils/tests/__snapshots__/babel.test.ts.snap @@ -14,36 +14,18 @@ exports[`babel resolveBabelConfig 1`] = ` [ "/node_modules//@babel/plugin-proposal-decorators/lib/index.js", { - "legacy": true, + "version": "legacy", }, ], + "/node_modules//@babel/plugin-proposal-export-default-from/lib/index.js", + "/node_modules//@babel/plugin-proposal-partial-application/lib/index.js", [ - "/node_modules//@babel/plugin-transform-runtime/lib/index.js", - { - "corejs": false, - "helpers": false, - "regenerator": true, - "useESModules": false, - "version": "7.23.2", - }, - ], - [ - "/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-export-default-from/index.js", - ], - [ - "/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-pipeline-operator/index.js", + "/node_modules//@babel/plugin-proposal-pipeline-operator/lib/index.js", { "proposal": "minimal", }, ], - [ - "/packages/cli/babel-preset-base/compiled/@babel/plugin-proposal-partial-application/index.js", - ], - [ - "/packages/cli/babel-preset-base/compiled/babel-plugin-styled-components/index.js", - {}, - "styled-components", - ], + "/node_modules//babel-plugin-dynamic-import-node/lib/index.js", [ "/packages/server/babel-plugin-module-resolver/src/index.js", { @@ -65,33 +47,22 @@ exports[`babel resolveBabelConfig 1`] = ` "root": "/tests/fixtures/", }, ], - [ - "/node_modules//babel-plugin-transform-typescript-metadata/lib/plugin.js", - ], + "/node_modules//babel-plugin-transform-typescript-metadata/lib/plugin.js", ], "presets": [ [ "/node_modules//@babel/preset-env/lib/index.js", { - "bugfixes": true, + "exclude": [ + "transform-typeof-symbol", + ], "loose": true, "modules": "commonjs", - "shippedProposals": false, "targets": [ - "chrome >= 61", - "edge >= 16", - "firefox >= 60", - "safari >= 11", - "ios_saf >= 11", + "node >= 14", ], }, ], - [ - "/node_modules//@babel/preset-react/lib/index.js", - { - "runtime": "automatic", - }, - ], [ "/node_modules//@babel/preset-typescript/lib/index.js", { @@ -102,6 +73,12 @@ exports[`babel resolveBabelConfig 1`] = ` "optimizeConstEnums": true, }, ], + [ + "/node_modules//@babel/preset-react/lib/index.js", + { + "runtime": "automatic", + }, + ], ], } `; diff --git a/packages/server/utils/tests/babel.test.ts b/packages/server/utils/tests/babel.test.ts index 38fdb1f07cd5..18bd36b77cd8 100644 --- a/packages/server/utils/tests/babel.test.ts +++ b/packages/server/utils/tests/babel.test.ts @@ -15,8 +15,6 @@ describe('babel', () => { './fixtures/api/tsconfig.json', ); const config = resolveBabelConfig(pwd, defaults as any, { - type: 'commonjs', - syntax: 'es6+', tsconfigPath, }); diff --git a/packages/toolkit/utils/src/cli/constants/index.ts b/packages/toolkit/utils/src/cli/constants/index.ts index 3981a105e187..aaf62e294043 100644 --- a/packages/toolkit/utils/src/cli/constants/index.ts +++ b/packages/toolkit/utils/src/cli/constants/index.ts @@ -174,21 +174,4 @@ export const INTERNAL_SERVER_PLUGINS: InternalPlugins = { [SERVER_PLUGIN_POLYFILL]: '@modern-js/plugin-polyfill/server', }; -/** - * The `@babel/preset-typescript` default options. - * - * for: - * - `@modern-js/builder-rspack-provider` - * - `@modern-js/babel-preset-base` - */ -export const DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = { - allowNamespaces: true, - allExtensions: true, - allowDeclareFields: true, - // aligns Babel's behavior with TypeScript's default behavior. - // https://babeljs.io/docs/en/babel-preset-typescript#optimizeconstenums - optimizeConstEnums: true, - isTSX: true, -}; - export * from './chainId'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a7ad1800574..44f3a5a9c7c1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -721,76 +721,6 @@ importers: specifier: ^5.88.1 version: 5.88.1(esbuild@0.17.19) - packages/cli/babel-preset-base: - dependencies: - '@babel/core': - specifier: ^7.22.15 - version: 7.23.0 - '@babel/parser': - specifier: ^7.22.15 - version: 7.23.0 - '@babel/plugin-transform-runtime': - specifier: ^7.22.15 - version: 7.22.15(@babel/core@7.23.0) - '@babel/plugin-transform-typescript': - specifier: ^7.22.15 - version: 7.22.15(@babel/core@7.23.0) - '@babel/preset-env': - specifier: ^7.22.15 - version: 7.22.15(@babel/core@7.23.0) - '@babel/preset-react': - specifier: ^7.22.15 - version: 7.22.15(@babel/core@7.23.0) - '@babel/preset-typescript': - specifier: ^7.22.15 - version: 7.23.0(@babel/core@7.23.0) - '@babel/runtime': - specifier: ^7.22.15 - version: 7.23.2 - '@babel/template': - specifier: ^7.22.15 - version: 7.22.15 - '@babel/traverse': - specifier: ^7.22.15 - version: 7.22.15 - '@babel/types': - specifier: ^7.22.15 - version: 7.23.0 - '@modern-js/utils': - specifier: workspace:* - version: link:../../toolkit/utils - '@swc/helpers': - specifier: 0.5.1 - version: 0.5.1 - '@types/babel__core': - specifier: ^7.20.0 - version: 7.20.2 - lodash: - specifier: ^4.17.21 - version: 4.17.21 - devDependencies: - '@modern-js/types': - specifier: workspace:* - version: link:../../toolkit/types - '@scripts/build': - specifier: workspace:* - version: link:../../../scripts/build - '@scripts/jest-config': - specifier: workspace:* - version: link:../../../scripts/jest-config - '@types/jest': - specifier: ^29 - version: 29.2.6 - '@types/node': - specifier: ^14 - version: 14.18.35 - jest: - specifier: ^29 - version: 29.5.0(@types/node@14.18.35)(ts-node@10.9.1) - typescript: - specifier: ^5 - version: 5.0.4 - packages/cli/core: dependencies: '@modern-js/node-bundle-require': @@ -4541,6 +4471,9 @@ importers: '@babel/preset-env': specifier: ^7.22.15 version: 7.22.15(@babel/core@7.23.0) + '@babel/preset-react': + specifier: ^7.22.15 + version: 7.22.15(@babel/core@7.23.0) '@babel/preset-typescript': specifier: ^7.22.15 version: 7.23.0(@babel/core@7.23.0) @@ -4550,12 +4483,12 @@ importers: '@modern-js/babel-plugin-module-resolver': specifier: workspace:* version: link:../babel-plugin-module-resolver - '@modern-js/babel-preset-base': - specifier: workspace:* - version: link:../../cli/babel-preset-base '@modern-js/utils': specifier: workspace:* version: link:../../toolkit/utils + '@rsbuild/babel-preset': + specifier: 0.0.7 + version: 0.0.7 '@swc/helpers': specifier: 0.5.1 version: 0.5.1 @@ -5353,33 +5286,6 @@ importers: specifier: ^5.88.1 version: 5.88.1(esbuild@0.17.19) devDependencies: - '@babel/helper-annotate-as-pure': - specifier: ^7.22.5 - version: 7.22.5 - '@babel/helper-create-class-features-plugin': - specifier: ^7.22.15 - version: 7.22.15(@babel/core@7.23.0) - '@babel/helper-module-imports': - specifier: ^7.22.15 - version: 7.22.15 - '@babel/helper-plugin-utils': - specifier: ^7.22.5 - version: 7.22.5 - '@babel/helper-validator-identifier': - specifier: ^7.22.15 - version: 7.22.20 - '@babel/plugin-proposal-decorators': - specifier: ^7.22.15 - version: 7.23.0(@babel/core@7.23.0) - '@babel/plugin-proposal-export-default-from': - specifier: ^7.22.5 - version: 7.22.17(@babel/core@7.23.0) - '@babel/plugin-proposal-partial-application': - specifier: ^7.22.5 - version: 7.22.5(@babel/core@7.23.0) - '@babel/plugin-proposal-pipeline-operator': - specifier: ^7.22.15 - version: 7.22.15(@babel/core@7.23.0) '@rollup/plugin-json': specifier: 6.0.0 version: 6.0.0(rollup@3.23.0) @@ -5455,18 +5361,9 @@ importers: babel-loader: specifier: 9.1.3 version: 9.1.3(@babel/core@7.23.0)(webpack@5.88.1) - babel-plugin-dynamic-import-node: - specifier: 2.3.3 - version: 2.3.3 - babel-plugin-import: - specifier: 1.13.5 - version: 1.13.5 babel-plugin-lodash: specifier: 3.3.4 version: 3.3.4 - babel-plugin-styled-components: - specifier: 1.13.3 - version: 1.13.3(styled-components@5.3.5) babel-plugin-transform-react-remove-prop-types: specifier: 0.4.24 version: 0.4.24 @@ -8885,6 +8782,7 @@ packages: '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.0) '@babel/helper-split-export-declaration': 7.22.6 '@babel/plugin-syntax-decorators': 7.22.10(@babel/core@7.23.0) + dev: false /@babel/plugin-proposal-export-default-from@7.22.17(@babel/core@7.23.0): resolution: {integrity: sha512-cop/3quQBVvdz6X5SJC6AhUv3C9DrVTM06LUEXimEdWAhCSyOJIr9NiZDU9leHZ0/aiG0Sh7Zmvaku5TWYNgbA==} @@ -8895,6 +8793,7 @@ packages: '@babel/core': 7.23.0 '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-export-default-from': 7.22.5(@babel/core@7.23.0) + dev: false /@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.23.0): resolution: {integrity: sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==} @@ -8957,6 +8856,7 @@ packages: '@babel/core': 7.23.0 '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-partial-application': 7.22.5(@babel/core@7.23.0) + dev: false /@babel/plugin-proposal-pipeline-operator@7.22.15(@babel/core@7.23.0): resolution: {integrity: sha512-tk81rXNA4T/AQc4zFhIIJp9OSmY8rmy46G7LXiPm4+/X8A0A0f9ri6yjEIj3fYqZQYrQnX9uuWXppPGsEesYtg==} @@ -8967,6 +8867,7 @@ packages: '@babel/core': 7.23.0 '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-pipeline-operator': 7.22.5(@babel/core@7.23.0) + dev: false /@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.23.0): resolution: {integrity: sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==} @@ -9043,6 +8944,7 @@ packages: dependencies: '@babel/core': 7.23.0 '@babel/helper-plugin-utils': 7.22.5 + dev: false /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.23.0): resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} @@ -9060,6 +8962,7 @@ packages: dependencies: '@babel/core': 7.23.0 '@babel/helper-plugin-utils': 7.22.5 + dev: false /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.23.0): resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} @@ -9196,6 +9099,7 @@ packages: dependencies: '@babel/core': 7.23.0 '@babel/helper-plugin-utils': 7.22.5 + dev: false /@babel/plugin-syntax-pipeline-operator@7.22.5(@babel/core@7.23.0): resolution: {integrity: sha512-7yuGXd+h8gpR14FnPDTTCd5TfC/1B9njNZJT29GJ7UFF/WVbzkZy7728DynrENqgImqj5xyPTQAo8si9n3QVJQ==} @@ -9205,6 +9109,7 @@ packages: dependencies: '@babel/core': 7.23.0 '@babel/helper-plugin-utils': 7.22.5 + dev: false /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.23.0): resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} @@ -18685,6 +18590,7 @@ packages: resolution: {integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==} dependencies: object.assign: 4.1.4 + dev: false /babel-plugin-extract-import-names@1.6.22: resolution: {integrity: sha512-yJ9BsJaISua7d8zNT7oRG1ZLBJCIdZ4PZqmH8qa9N5AK01ifk3fnkc98AXhtzE7UkfCsEumvoQWgoYLhOnJ7jQ==} @@ -18696,6 +18602,7 @@ packages: resolution: {integrity: sha512-IkqnoV+ov1hdJVofly9pXRJmeDm9EtROfrc5i6eII0Hix2xMs5FEm8FG3ExMvazbnZBbgHIt6qdO8And6lCloQ==} dependencies: '@babel/helper-module-imports': 7.22.15 + dev: false /babel-plugin-istanbul@6.1.1: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} @@ -21049,6 +20956,7 @@ packages: dependencies: has-property-descriptors: 1.0.0 object-keys: 1.1.1 + dev: false /define-property@0.2.5: resolution: {integrity: sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==} @@ -23572,6 +23480,7 @@ packages: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: get-intrinsic: 1.2.0 + dev: false /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} @@ -27859,6 +27768,7 @@ packages: /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} + dev: false /object-visit@1.0.1: resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} @@ -27875,6 +27785,7 @@ packages: define-properties: 1.1.4 has-symbols: 1.0.3 object-keys: 1.1.1 + dev: false /object.entries@1.1.5: resolution: {integrity: sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==} diff --git a/scripts/prebundle/package.json b/scripts/prebundle/package.json index 086c6ba7d427..acb5c480e850 100644 --- a/scripts/prebundle/package.json +++ b/scripts/prebundle/package.json @@ -20,15 +20,6 @@ "webpack": "^5.88.1" }, "devDependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.15", - "@babel/plugin-proposal-decorators": "^7.22.15", - "@babel/plugin-proposal-export-default-from": "^7.22.5", - "@babel/plugin-proposal-partial-application": "^7.22.5", - "@babel/plugin-proposal-pipeline-operator": "^7.22.15", "@rollup/plugin-json": "6.0.0", "@types/debug": "4.1.7", "@types/fs-extra": "9.0.13", @@ -54,10 +45,7 @@ "ansi-escapes": "4.3.2", "autoprefixer": "10.4.13", "babel-loader": "9.1.3", - "babel-plugin-dynamic-import-node": "2.3.3", - "babel-plugin-import": "1.13.5", "babel-plugin-lodash": "3.3.4", - "babel-plugin-styled-components": "1.13.3", "babel-plugin-transform-react-remove-prop-types": "0.4.24", "better-ajv-errors": "1.2.0", "browserslist": "4.20.2", diff --git a/scripts/prebundle/src/constant.ts b/scripts/prebundle/src/constant.ts index b97e9d946232..b334874e3a1e 100644 --- a/scripts/prebundle/src/constant.ts +++ b/scripts/prebundle/src/constant.ts @@ -473,80 +473,6 @@ export const TASKS: TaskConfig[] = [ }, ], }, - { - packageDir: 'cli/babel-preset-base', - packageName: '@modern-js/babel-preset-base', - dependencies: [ - { - name: '@babel/helper-plugin-utils', - ignoreDts: true, - }, - { - name: '@babel/helper-annotate-as-pure', - ignoreDts: true, - }, - { - name: '@babel/helper-module-imports', - ignoreDts: true, - }, - { - name: 'babel-plugin-dynamic-import-node', - ignoreDts: true, - }, - { - name: 'babel-plugin-import', - ignoreDts: true, - externals: { - '@babel/helper-module-imports': '../@babel/helper-module-imports', - }, - }, - { - name: 'babel-plugin-styled-components', - ignoreDts: true, - externals: { - '@babel/helper-module-imports': '../@babel/helper-module-imports', - '@babel/helper-annotate-as-pure': '../@babel/helper-annotate-as-pure', - }, - }, - { - name: '@babel/plugin-proposal-pipeline-operator', - ignoreDts: true, - externals: { - '@babel/helper-plugin-utils': '../helper-plugin-utils', - }, - }, - { - name: '@babel/plugin-proposal-export-default-from', - ignoreDts: true, - externals: { - '@babel/helper-plugin-utils': '../helper-plugin-utils', - }, - }, - { - name: '@babel/plugin-proposal-partial-application', - ignoreDts: true, - externals: { - '@babel/helper-plugin-utils': '../helper-plugin-utils', - }, - }, - { - name: '@babel/helper-create-class-features-plugin', - ignoreDts: true, - externals: { - '@babel/template': '@babel/template', - }, - }, - { - name: '@babel/plugin-proposal-decorators', - ignoreDts: true, - externals: { - '@babel/helper-plugin-utils': '../helper-plugin-utils', - '@babel/helper-create-class-features-plugin': - '../helper-create-class-features-plugin', - }, - }, - ], - }, { packageDir: 'builder/plugin-esbuild', packageName: '@modern-js/builder-plugin-esbuild',