From ea3fe185b6e11e23a42655ca00bb84d0cec99f9f Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 19 Sep 2023 10:22:58 +0800 Subject: [PATCH 01/26] feat(app-tools): make logs easier to read (#4671) --- .changeset/early-parents-switch.md | 13 +++ .../builder-rspack-provider/package.json | 6 +- .../src/core/createCompiler.ts | 7 +- .../src/plugins/progress.ts | 6 -- .../ProgressPlugin/ProgressPlugin.ts | 49 ++-------- .../ProgressPlugin/helpers/bar.ts | 21 +---- .../ProgressPlugin/helpers/type.ts | 5 - .../__snapshots__/default.test.ts.snap | 20 ++-- .../builder/builder/src/plugins/fileSize.ts | 8 +- .../plugin-proxy/src/utils/whistleProxy.ts | 4 +- .../en/config/performance/printFileSize.md | 13 ++- .../zh/config/performance/printFileSize.md | 13 ++- .../main-doc/docs/en/apis/app/commands.mdx | 13 +-- .../main-doc/docs/en/components/debug-app.mdx | 4 +- .../en/components/global-proxy-config.mdx | 6 +- .../docs/en/components/global-proxy.mdx | 6 +- .../main-doc/docs/en/components/init-app.mdx | 2 +- .../docs/en/configure/app/server/base-url.mdx | 2 - .../en/guides/get-started/quick-start.mdx | 25 ++--- .../main-doc/docs/zh/apis/app/commands.mdx | 13 +-- .../main-doc/docs/zh/components/debug-app.mdx | 4 +- .../zh/components/global-proxy-config.mdx | 6 +- .../docs/zh/components/global-proxy.mdx | 6 +- .../docs/zh/configure/app/server/base-url.mdx | 2 - .../zh/guides/get-started/quick-start.mdx | 25 ++--- .../solutions/app-tools/src/builder/index.ts | 2 +- .../solutions/app-tools/src/commands/serve.ts | 4 +- .../app-tools/src/utils/printInstructions.ts | 2 +- packages/toolkit/utils/src/cli/logger.ts | 5 + packages/toolkit/utils/src/cli/port.ts | 4 +- .../utils/src/cli/prettyInstructions.ts | 2 +- .../prettyInstructions.test.ts.snap | 15 +-- pnpm-lock.yaml | 94 +++++++++---------- 33 files changed, 158 insertions(+), 249 deletions(-) create mode 100644 .changeset/early-parents-switch.md diff --git a/.changeset/early-parents-switch.md b/.changeset/early-parents-switch.md new file mode 100644 index 000000000000..5aad8bf4d539 --- /dev/null +++ b/.changeset/early-parents-switch.md @@ -0,0 +1,13 @@ +--- +'@modern-js/builder-webpack-provider': patch +'@modern-js/builder-rspack-provider': patch +'@modern-js/builder-doc': patch +'@modern-js/app-tools': patch +'@modern-js/plugin-proxy': patch +'@modern-js/builder': patch +'@modern-js/utils': patch +--- + +feat(app-tools): make logs easier to read + +feat(app-tools): 让日志更容易阅读 diff --git a/packages/builder/builder-rspack-provider/package.json b/packages/builder/builder-rspack-provider/package.json index 95e76a333604..cec450d8602d 100644 --- a/packages/builder/builder-rspack-provider/package.json +++ b/packages/builder/builder-rspack-provider/package.json @@ -56,9 +56,9 @@ "@modern-js/types": "workspace:*", "@modern-js/utils": "workspace:*", "@babel/preset-typescript": "^7.22.15", - "@rspack/core": "0.3.4", - "@rspack/dev-client": "0.3.4", - "@rspack/plugin-html": "0.3.4", + "@rspack/core": "0.3.4-canary-9d910ae-20230918010610", + "@rspack/dev-client": "0.3.4-canary-9d910ae-20230918010610", + "@rspack/plugin-html": "0.3.4-canary-9d910ae-20230918010610", "@swc/helpers": "0.5.1", "rspack-manifest-plugin": "5.0.0-alpha0", "caniuse-lite": "^1.0.30001520", diff --git a/packages/builder/builder-rspack-provider/src/core/createCompiler.ts b/packages/builder/builder-rspack-provider/src/core/createCompiler.ts index 1a5c6a1cc4b7..2eb3e5937f78 100644 --- a/packages/builder/builder-rspack-provider/src/core/createCompiler.ts +++ b/packages/builder/builder-rspack-provider/src/core/createCompiler.ts @@ -3,10 +3,8 @@ import { logger, formatStats, TARGET_ID_MAP, - getProgressColor, } from '@modern-js/builder-shared'; import type { Context, RspackConfig } from '../types'; -import chalk from '@modern-js/utils/chalk'; import prettyTime from '@modern-js/builder-shared/pretty-time'; export async function createCompiler({ @@ -37,13 +35,12 @@ export async function createCompiler({ if (!stats.hasErrors()) { obj.children?.forEach((c, index) => { if (c.time) { - const color = chalk[getProgressColor(index)]; - const time = prettyTime([0, c.time * 10 ** 6], 1); + const time = prettyTime([0, c.time * 10 ** 6], 0); const target = Array.isArray(context.target) ? context.target[index] : context.target; const name = TARGET_ID_MAP[target || 'web']; - logger.log(color(`✔ ${name} compiled in`, time)); + logger.ready(`${name} compiled in ${time}`); } }); } diff --git a/packages/builder/builder-webpack-provider/src/plugins/progress.ts b/packages/builder/builder-webpack-provider/src/plugins/progress.ts index 7219f533da2d..3736f333a7d4 100644 --- a/packages/builder/builder-webpack-provider/src/plugins/progress.ts +++ b/packages/builder/builder-webpack-provider/src/plugins/progress.ts @@ -11,9 +11,6 @@ export const builderPluginProgress = (): BuilderPlugin => ({ return; } - const isFirstTarget = - !Array.isArray(api.context.target) || target === api.context.target[0]; - const { ProgressPlugin } = await import( '../webpackPlugins/ProgressPlugin/ProgressPlugin' ); @@ -21,9 +18,6 @@ export const builderPluginProgress = (): BuilderPlugin => ({ { id: TARGET_ID_MAP[target], ...(options === true ? {} : options), - // If there is multiple target, show recompile log only once - showRecompileLog: isFirstTarget, - disableTsChecker: config.output.disableTsChecker, }, ]); }); diff --git a/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/ProgressPlugin.ts b/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/ProgressPlugin.ts index 2a060285a1b3..ad5803a6812d 100644 --- a/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/ProgressPlugin.ts +++ b/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/ProgressPlugin.ts @@ -1,7 +1,6 @@ import webpack from 'webpack'; import { logger } from '@modern-js/utils/logger'; import prettyTime from '@modern-js/builder-shared/pretty-time'; -import ForkTsCheckerWebpackPlugin from '@modern-js/builder-shared/fork-ts-checker-webpack-plugin'; import { bus, createFriendlyPercentage } from './helpers'; import { createNonTTYLogger } from './helpers/nonTty'; import type { Props } from './helpers/type'; @@ -10,30 +9,22 @@ export interface ProgressOptions extends Omit, 'message' | 'total' | 'current' | 'done'> { id?: string; clearOnDone?: boolean; - showRecompileLog?: boolean; disableTsChecker?: boolean; } export class ProgressPlugin extends webpack.ProgressPlugin { readonly name: string = 'ProgressPlugin'; - hasTypeErrors: boolean = false; + id: string; hasCompileErrors: boolean = false; compileTime: string | null = null; - showRecompileLog: boolean; - disableTsChecker?: boolean; constructor(options: ProgressOptions) { - const { - id = 'Modern', - clearOnDone = false, - showRecompileLog = false, - disableTsChecker, - } = options; + const { id = 'Modern', clearOnDone = false, disableTsChecker } = options; const nonTTYLogger = createNonTTYLogger(); const friendlyPercentage = createFriendlyPercentage(); @@ -59,7 +50,6 @@ export class ProgressPlugin extends webpack.ProgressPlugin { message, done, hasErrors: this.hasCompileErrors, - compileTime: this.compileTime, }); bus.render(); @@ -78,7 +68,7 @@ export class ProgressPlugin extends webpack.ProgressPlugin { }, }); - this.showRecompileLog = showRecompileLog; + this.id = id; this.disableTsChecker = disableTsChecker; } @@ -86,45 +76,22 @@ export class ProgressPlugin extends webpack.ProgressPlugin { super.apply(compiler); let startTime: [number, number] | null = null; - let isReCompile = false; compiler.hooks.compile.tap(this.name, () => { - // If it is a recompile and there are compilation errors, - // print a recompile log so that users can know that the recompile - // is triggered and the above error log is outdated. - if ( - isReCompile && - this.showRecompileLog && - (this.hasCompileErrors || this.hasTypeErrors) - ) { - logger.info(`Start recompile...\n`); - } - this.compileTime = null; startTime = process.hrtime(); - isReCompile = true; }); compiler.hooks.done.tap(this.name, stat => { if (startTime) { this.hasCompileErrors = stat.hasErrors(); - this.compileTime = prettyTime(process.hrtime(startTime), 1); + this.compileTime = prettyTime(process.hrtime(startTime), 0); startTime = null; + + if (!this.hasCompileErrors) { + logger.ready(`${this.id} compiled in ${this.compileTime}`); + } } }); - - if (!this.disableTsChecker) { - const hooks = ForkTsCheckerWebpackPlugin.getCompilerHooks(compiler); - - hooks.start.tap(this.name, change => { - this.hasTypeErrors = false; - return change; - }); - - hooks.issues.tap(this.name, issues => { - this.hasTypeErrors = Boolean(issues.length); - return issues; - }); - } } } diff --git a/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/bar.ts b/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/bar.ts index 1649d7160534..dd83aaab34fb 100644 --- a/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/bar.ts +++ b/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/bar.ts @@ -11,10 +11,6 @@ const defaultOption: Props = { char: '━', width: 25, buildIcon: '◯', - finishIcon: '✔', - finishInfo: 'compiled', - errorIcon: '✖', - errorInfo: 'compile failed', message: '', done: false, spaceWidth: 1, @@ -23,7 +19,6 @@ const defaultOption: Props = { id: '', maxIdLen: 16, hasErrors: false, - compileTime: null, }; const padding = (id: string, maxLen: number) => { @@ -45,10 +40,6 @@ export const renderBar = (option: Partial) => { total, done, buildIcon, - errorIcon, - errorInfo, - finishIcon, - finishInfo, width, current, color, @@ -60,7 +51,6 @@ export const renderBar = (option: Partial) => { messageColor, maxIdLen, hasErrors, - compileTime, } = mergedOptions; const space = ' '.repeat(spaceWidth); @@ -78,16 +68,7 @@ export const renderBar = (option: Partial) => { const { columns: terminalWidth = FULL_WIDTH } = process.stdout; if (done) { - const info = hasErrors ? errorInfo : finishInfo; - const icon = hasErrors ? errorIcon : finishIcon; - const message = doneColor( - compileTime && !hasErrors ? `${info} in ${compileTime}` : info, - ); - - if (terminalWidth >= MIDDLE_WIDTH) { - return [idColor(icon), id, doneColor(`${space}${message}`)].join(''); - } - return [id, doneColor(`${message}`)].join(''); + return ''; } const msgStr = Reflect.get( diff --git a/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/type.ts b/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/type.ts index 5eec54b44ac8..1c8fdf5cfba6 100644 --- a/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/type.ts +++ b/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/type.ts @@ -8,10 +8,6 @@ export type Props = { char: string; width: number; buildIcon: string; - errorIcon: string; - errorInfo: string; - finishIcon: string; - finishInfo: string; message: string; done: boolean; messageWidth: number; @@ -19,7 +15,6 @@ export type Props = { messageColor: typeof Color; id: string; maxIdLen: number; - compileTime: string | null; hasErrors: boolean; }; diff --git a/packages/builder/builder-webpack-provider/tests/plugins/__snapshots__/default.test.ts.snap b/packages/builder/builder-webpack-provider/tests/plugins/__snapshots__/default.test.ts.snap index cf0a89fbd89b..efc86a872c5a 100644 --- a/packages/builder/builder-webpack-provider/tests/plugins/__snapshots__/default.test.ts.snap +++ b/packages/builder/builder-webpack-provider/tests/plugins/__snapshots__/default.test.ts.snap @@ -871,10 +871,10 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` ProgressPlugin { "compileTime": null, "dependenciesCount": 10000, - "disableTsChecker": false, + "disableTsChecker": undefined, "handler": [Function], "hasCompileErrors": false, - "hasTypeErrors": false, + "id": "Client", "modulesCount": 5000, "name": "ProgressPlugin", "percentBy": null, @@ -883,7 +883,6 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` "showDependencies": true, "showEntries": true, "showModules": true, - "showRecompileLog": true, }, ReactRefreshPlugin { "options": { @@ -1864,10 +1863,10 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ ProgressPlugin { "compileTime": null, "dependenciesCount": 10000, - "disableTsChecker": false, + "disableTsChecker": undefined, "handler": [Function], "hasCompileErrors": false, - "hasTypeErrors": false, + "id": "Client", "modulesCount": 5000, "name": "ProgressPlugin", "percentBy": null, @@ -1876,7 +1875,6 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ "showDependencies": true, "showEntries": true, "showModules": true, - "showRecompileLog": true, }, ], "resolve": { @@ -2676,10 +2674,10 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe ProgressPlugin { "compileTime": null, "dependenciesCount": 10000, - "disableTsChecker": false, + "disableTsChecker": undefined, "handler": [Function], "hasCompileErrors": false, - "hasTypeErrors": false, + "id": "Server", "modulesCount": 5000, "name": "ProgressPlugin", "percentBy": null, @@ -2688,7 +2686,6 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe "showDependencies": true, "showEntries": true, "showModules": true, - "showRecompileLog": true, }, ], "resolve": { @@ -3478,10 +3475,10 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe ProgressPlugin { "compileTime": null, "dependenciesCount": 10000, - "disableTsChecker": false, + "disableTsChecker": undefined, "handler": [Function], "hasCompileErrors": false, - "hasTypeErrors": false, + "id": "Web Worker", "modulesCount": 5000, "name": "ProgressPlugin", "percentBy": null, @@ -3490,7 +3487,6 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe "showDependencies": true, "showEntries": true, "showModules": true, - "showRecompileLog": true, }, ], "resolve": { diff --git a/packages/builder/builder/src/plugins/fileSize.ts b/packages/builder/builder/src/plugins/fileSize.ts index 128414bc69f5..9bf5b9b2f14c 100644 --- a/packages/builder/builder/src/plugins/fileSize.ts +++ b/packages/builder/builder/src/plugins/fileSize.ts @@ -59,8 +59,10 @@ async function printFileSizes(stats: Stats | MultiStats, distPath: string) { folder: path.join(path.basename(distPath), path.dirname(asset.name)), name: path.basename(asset.name), gzippedSize, - sizeLabel: filesize(size), - gzipSizeLabel: getAssetColor(gzippedSize)(filesize(gzippedSize)), + sizeLabel: filesize(size, { round: 1 }), + gzipSizeLabel: getAssetColor(gzippedSize)( + filesize(gzippedSize, { round: 1 }), + ), }; }; @@ -99,7 +101,7 @@ async function printFileSizes(stats: Stats | MultiStats, distPath: string) { ...assets.map(a => stripAnsi(a.folder + path.sep + a.name).length), ); - logger.info(`File sizes after production build:\n`); + logger.info(`Production file sizes:\n`); printHeader(longestFileLength, longestLabelLength); diff --git a/packages/cli/plugin-proxy/src/utils/whistleProxy.ts b/packages/cli/plugin-proxy/src/utils/whistleProxy.ts index c7b4fe7a2fe5..6b92ec63e13d 100644 --- a/packages/cli/plugin-proxy/src/utils/whistleProxy.ts +++ b/packages/cli/plugin-proxy/src/utils/whistleProxy.ts @@ -50,13 +50,13 @@ export default class WhistleProxy { } async start() { - logger.info(`Starting the proxy server.....`); + logger.info(`Starting proxy server.....`); execSync(`${this.bin} start --certDir=${this.certDir} --port=${this.port}`); execSync(`${this.bin} use ${this.rule} --force`); await this.installRootCA(); enableGlobalProxy('localhost', this.port); - logger.info(`Proxy Server start on localhost:${this.port}\n`); + logger.info(`Proxy server start on localhost:${this.port}\n`); } close() { diff --git a/packages/document/builder-doc/docs/en/config/performance/printFileSize.md b/packages/document/builder-doc/docs/en/config/performance/printFileSize.md index 8a250d5f2175..2b18db1784d2 100644 --- a/packages/document/builder-doc/docs/en/config/performance/printFileSize.md +++ b/packages/document/builder-doc/docs/en/config/performance/printFileSize.md @@ -4,14 +4,13 @@ Whether to print the file sizes after production build. ```bash -info File sizes after production build: +info Production file sizes: - File Size Gzipped - dist/static/js/lib-corejs.1c836fe7.js 212.89 kB 66.57 kB - dist/static/js/lib-react.fcafbc5c.js 134.65 kB 43.45 kB - dist/static/js/main.6ff06f70.js 8.93 kB 3.73 kB - dist/static/css/main.9f48031b.css 2.64 kB 927 B - dist/html/main/index.html 1.64 kB 874 B + File Size Gzipped + dist/static/js/lib-react.09721b5c.js 152.6 kB 49.0 kB + dist/html/main/index.html 5.8 kB 2.5 kB + dist/static/js/main.3568a38e.js 3.5 kB 1.4 kB + dist/static/css/main.03221f72.css 1.4 kB 741 B ``` ### Example diff --git a/packages/document/builder-doc/docs/zh/config/performance/printFileSize.md b/packages/document/builder-doc/docs/zh/config/performance/printFileSize.md index ca42f182c471..21c650106145 100644 --- a/packages/document/builder-doc/docs/zh/config/performance/printFileSize.md +++ b/packages/document/builder-doc/docs/zh/config/performance/printFileSize.md @@ -4,14 +4,13 @@ 是否在生产环境构建后输出所有静态资源文件的体积。 ```bash -info File sizes after production build: +info Production file sizes: - File Size Gzipped - dist/static/js/lib-corejs.1c836fe7.js 212.89 kB 66.57 kB - dist/static/js/lib-react.fcafbc5c.js 134.65 kB 43.45 kB - dist/static/js/main.6ff06f70.js 8.93 kB 3.73 kB - dist/static/css/main.9f48031b.css 2.64 kB 927 B - dist/html/main/index.html 1.64 kB 874 B + File Size Gzipped + dist/static/js/lib-react.09721b5c.js 152.6 kB 49.0 kB + dist/html/main/index.html 5.8 kB 2.5 kB + dist/static/js/main.3568a38e.js 3.5 kB 1.4 kB + dist/static/css/main.03221f72.css 1.4 kB 741 B ``` ### 示例 diff --git a/packages/document/main-doc/docs/en/apis/app/commands.mdx b/packages/document/main-doc/docs/en/apis/app/commands.mdx index d730a8f5b558..17af5d2bea8a 100644 --- a/packages/document/main-doc/docs/en/apis/app/commands.mdx +++ b/packages/document/main-doc/docs/en/apis/app/commands.mdx @@ -30,7 +30,6 @@ After running `modern dev`, Modern.js will watch source file changes and apply h $ modern dev info Starting dev server... -info App running at: > Local: http://localhost:8080/ > Network: http://192.168.0.1:8080/ @@ -88,12 +87,14 @@ execute `npx modern build --analyze` command, can produce an HTML file that anal ```text Bundle Analyzer saved report to /example/dist/report.html -File sizes after production build: - 122.35 KB dist/static/js/885.1d4fbe5a.js - 2.3 KB dist/static/js/main.4b8e8d64.js - 761 B dist/static/js/runtime-main.edb7cf35.js - 645 B dist/static/css/main.0dd3ecc1.css +info Production file sizes: + + File Size Gzipped + dist/static/js/lib-react.09721b5c.js 152.6 kB 49.0 kB + dist/html/main/index.html 5.8 kB 2.5 kB + dist/static/js/main.3568a38e.js 3.5 kB 1.4 kB + dist/static/css/main.03221f72.css 1.4 kB 741 B ``` Open the above HTML file in the browser, you can see the tile diagram of the bundled files, and perform package volume analysis and optimization: diff --git a/packages/document/main-doc/docs/en/components/debug-app.mdx b/packages/document/main-doc/docs/en/components/debug-app.mdx index 23d388c6770b..85f172b7c071 100644 --- a/packages/document/main-doc/docs/en/components/debug-app.mdx +++ b/packages/document/main-doc/docs/en/components/debug-app.mdx @@ -6,12 +6,10 @@ $ pnpm run dev > modern dev info Starting dev server... -info App running at: +ready Client compiled in 50ms > Local: http://localhost:8080/ > Network: http://192.168.0.1:8080/ - - Client ✔ done in 76.10ms ``` Open `http://localhost:8000/` in your browser to see the page content. diff --git a/packages/document/main-doc/docs/en/components/global-proxy-config.mdx b/packages/document/main-doc/docs/en/components/global-proxy-config.mdx index 9b166c53acb8..dccb8d8a2a71 100644 --- a/packages/document/main-doc/docs/en/components/global-proxy-config.mdx +++ b/packages/document/main-doc/docs/en/components/global-proxy-config.mdx @@ -75,13 +75,11 @@ module.exports = { Execute `dev`, when the prompt is as follows, the proxy server starts successfully: ```bash - App running at: - Local: http://localhost:8080/ Network: http://192.168.0.1:8080/ -ℹ info Starting the proxy server..... -✔ success Proxy Server start on localhost:8899 +info Starting proxy server..... +success Proxy server start on localhost:8899 ``` Access the `localhost:8899` to view the Network and configure proxy rules on the UI interface: diff --git a/packages/document/main-doc/docs/en/components/global-proxy.mdx b/packages/document/main-doc/docs/en/components/global-proxy.mdx index e3cf972b8efd..445c0d2c4dea 100644 --- a/packages/document/main-doc/docs/en/components/global-proxy.mdx +++ b/packages/document/main-doc/docs/en/components/global-proxy.mdx @@ -11,13 +11,11 @@ Specific proxy rules can be set via the [`dev.proxy`](/configure/app/dev/proxy) After installing the proxy plugin and configuring the proxy rules, run the `pnpm run dev` command: ```bash - App running at: - Local: http://localhost:8080/ Network: http://192.168.0.1:8080/ -ℹ info Starting the proxy server..... -✔ success Proxy Server start on localhost:8899 +info Starting proxy server..... +success Proxy server start on localhost:8899 ``` You can see that the proxy server has started successfully in the console. diff --git a/packages/document/main-doc/docs/en/components/init-app.mdx b/packages/document/main-doc/docs/en/components/init-app.mdx index a2411e113609..1dd3bdc70214 100644 --- a/packages/document/main-doc/docs/en/components/init-app.mdx +++ b/packages/document/main-doc/docs/en/components/init-app.mdx @@ -14,7 +14,7 @@ After create the project, Modern.js will automatically install dependencies and [INFO] git repository has been automatically created [INFO] Success! You can run the following command in the directory of the new project: -pnpm run dev # Starting the dev server +pnpm run dev # Starting dev server pnpm run build # Build the app for production pnpm run serve # Preview the production build locally pnpm run lint # Run ESLint and automatically fix problems diff --git a/packages/document/main-doc/docs/en/configure/app/server/base-url.mdx b/packages/document/main-doc/docs/en/configure/app/server/base-url.mdx index 41ac106d8933..b0cd163525b6 100644 --- a/packages/document/main-doc/docs/en/configure/app/server/base-url.mdx +++ b/packages/document/main-doc/docs/en/configure/app/server/base-url.mdx @@ -25,8 +25,6 @@ export default defineConfig({ After running `dev`, you will see that the route access will have the corresponding prefix added: ```bash -App running at: - > Local: http://localhost:8080/base/ > Network: http://192.168.0.1:8080/base/ ``` diff --git a/packages/document/main-doc/docs/en/guides/get-started/quick-start.mdx b/packages/document/main-doc/docs/en/guides/get-started/quick-start.mdx index fa1b54419012..9a92440124d3 100644 --- a/packages/document/main-doc/docs/en/guides/get-started/quick-start.mdx +++ b/packages/document/main-doc/docs/en/guides/get-started/quick-start.mdx @@ -91,23 +91,15 @@ $ pnpm run build > modern build -info Create a production build... - -info File sizes after production build: +info Staring production build... +ready Client compiled in 50ms +info Production file sizes: File Size Gzipped - dist/static/js/lib-corejs.ffeb7fb8.js 214.96 kB 67.23 kB - dist/static/js/lib-react.09721b5c.js 152.61 kB 49.02 kB - dist/static/js/218.102e2f39.js 85.45 kB 28.5 kB - dist/static/js/lib-babel.a7bba875.js 11.93 kB 3.95 kB - dist/html/main/index.html 5.84 kB 2.57 kB - dist/static/js/main.3568a38e.js 3.57 kB 1.44 kB - dist/static/css/async/304.c3c481a5.css 2.62 kB 874 B - dist/asset-manifest.json 1.48 kB 349 B - dist/static/js/async/304.c45706bc.js 1.4 kB 575 B - dist/static/js/async/509.fcb06e14.js 283 B 230 B - - Client ✔ done in 3.57s + dist/static/js/lib-react.09721b5c.js 152.6 kB 49.0 kB + dist/html/main/index.html 5.8 kB 2.5 kB + dist/static/js/main.3568a38e.js 3.5 kB 1.4 kB + dist/static/css/main.03221f72.css 1.4 kB 741 B ``` By default, the build artifacts are generated in `dist/`, with the following directory structure: @@ -135,8 +127,7 @@ $ pnpm run serve > modern serve -Starting the modern server... -info App running at: +info Starting production server... > Local: http://localhost:8080/ > Network: http://192.168.0.1:8080/ diff --git a/packages/document/main-doc/docs/zh/apis/app/commands.mdx b/packages/document/main-doc/docs/zh/apis/app/commands.mdx index e463c857ad89..0f91f58911e0 100644 --- a/packages/document/main-doc/docs/zh/apis/app/commands.mdx +++ b/packages/document/main-doc/docs/zh/apis/app/commands.mdx @@ -30,7 +30,6 @@ Options: $ modern dev info Starting dev server... -info App running at: > Local: http://localhost:8080/ > Network: http://192.168.0.1:8080/ @@ -88,12 +87,14 @@ Options: ``` Bundle Analyzer saved report to /example/dist/report.html -File sizes after production build: - 122.35 KB dist/static/js/885.1d4fbe5a.js - 2.3 KB dist/static/js/main.4b8e8d64.js - 761 B dist/static/js/runtime-main.edb7cf35.js - 645 B dist/static/css/main.0dd3ecc1.css +info Production file sizes: + + File Size Gzipped + dist/static/js/lib-react.09721b5c.js 152.6 kB 49.0 kB + dist/html/main/index.html 5.8 kB 2.5 kB + dist/static/js/main.3568a38e.js 3.5 kB 1.4 kB + dist/static/css/main.03221f72.css 1.4 kB 741 B ``` 手动在浏览器中打开上述 HTML 文件,可以看到打包产物的瓦片图,并进行包体积分析和优化: diff --git a/packages/document/main-doc/docs/zh/components/debug-app.mdx b/packages/document/main-doc/docs/zh/components/debug-app.mdx index ee4b9a0b48ca..4067889774dd 100644 --- a/packages/document/main-doc/docs/zh/components/debug-app.mdx +++ b/packages/document/main-doc/docs/zh/components/debug-app.mdx @@ -6,12 +6,10 @@ $ pnpm run dev > modern dev info Starting dev server... -info App running at: +ready Client compiled in 50ms > Local: http://localhost:8080/ > Network: http://192.168.0.1:8080/ - - Client ✔ done in 76.10ms ``` 在浏览器中打开 `http://localhost:8000/`,可以看到页面内容。 diff --git a/packages/document/main-doc/docs/zh/components/global-proxy-config.mdx b/packages/document/main-doc/docs/zh/components/global-proxy-config.mdx index 56f8899b3bd2..032d24094cc1 100644 --- a/packages/document/main-doc/docs/zh/components/global-proxy-config.mdx +++ b/packages/document/main-doc/docs/zh/components/global-proxy-config.mdx @@ -75,13 +75,11 @@ module.exports = { 执行 `dev`, 提示如下时,即代理服务器启动成功: ```bash - App running at: - Local: http://localhost:8080/ Network: http://192.168.0.1:8080/ -ℹ info Starting the proxy server..... -✔ success Proxy Server start on localhost:8899 +info Starting proxy server..... +success Proxy server start on localhost:8899 ``` 访问 `localhost:8899`, 可以在 UI 界面上查看 Network 以及配置代理规则: diff --git a/packages/document/main-doc/docs/zh/components/global-proxy.mdx b/packages/document/main-doc/docs/zh/components/global-proxy.mdx index ace7bb0cea74..1e2d05fe3b9f 100644 --- a/packages/document/main-doc/docs/zh/components/global-proxy.mdx +++ b/packages/document/main-doc/docs/zh/components/global-proxy.mdx @@ -11,13 +11,11 @@ Modern.js 提供了开箱即用的全局代理插件 `@modern-js/plugin-proxy` 安装代理插件并配置代理规则后, 执行 `pnpm run dev` 命令: ```bash - App running at: - Local: http://localhost:8080/ Network: http://192.168.0.1:8080/ -ℹ info Starting the proxy server..... -✔ success Proxy Server start on localhost:8899 +info Starting proxy server..... +success Proxy server start on localhost:8899 ``` 在控制台中可以看到代理服务器成功启动。 diff --git a/packages/document/main-doc/docs/zh/configure/app/server/base-url.mdx b/packages/document/main-doc/docs/zh/configure/app/server/base-url.mdx index 833bf591dc76..fc6f39af0b74 100644 --- a/packages/document/main-doc/docs/zh/configure/app/server/base-url.mdx +++ b/packages/document/main-doc/docs/zh/configure/app/server/base-url.mdx @@ -25,8 +25,6 @@ export default defineConfig({ `dev` 之后可以看到路由访问会加上对应前缀: ```bash -App running at: - > Local: http://localhost:8080/base/ > Network: http://192.168.0.1:8080/base/ ``` diff --git a/packages/document/main-doc/docs/zh/guides/get-started/quick-start.mdx b/packages/document/main-doc/docs/zh/guides/get-started/quick-start.mdx index b652f0a459e2..5daa3b200e03 100644 --- a/packages/document/main-doc/docs/zh/guides/get-started/quick-start.mdx +++ b/packages/document/main-doc/docs/zh/guides/get-started/quick-start.mdx @@ -91,23 +91,15 @@ $ pnpm run build > modern build -info Create a production build... - -info File sizes after production build: +info Staring production build... +ready Client compiled in 50ms +info Production file sizes: File Size Gzipped - dist/static/js/lib-corejs.ffeb7fb8.js 214.96 kB 67.23 kB - dist/static/js/lib-react.09721b5c.js 152.61 kB 49.02 kB - dist/static/js/218.102e2f39.js 85.45 kB 28.5 kB - dist/static/js/lib-babel.a7bba875.js 11.93 kB 3.95 kB - dist/html/main/index.html 5.84 kB 2.57 kB - dist/static/js/main.3568a38e.js 3.57 kB 1.44 kB - dist/static/css/async/304.c3c481a5.css 2.62 kB 874 B - dist/asset-manifest.json 1.48 kB 349 B - dist/static/js/async/304.c45706bc.js 1.4 kB 575 B - dist/static/js/async/509.fcb06e14.js 283 B 230 B - - Client ✔ done in 3.57s + dist/static/js/lib-react.09721b5c.js 152.6 kB 49.0 kB + dist/html/main/index.html 5.8 kB 2.5 kB + dist/static/js/main.3568a38e.js 3.5 kB 1.4 kB + dist/static/css/main.03221f72.css 1.4 kB 741 B ``` 构建产物默认生成到 `dist/`,目录结构如下: @@ -135,8 +127,7 @@ $ pnpm run serve > modern serve -Starting the modern server... -info App running at: +Starting production server... > Local: http://localhost:8080/ > Network: http://192.168.0.1:8080/ diff --git a/packages/solutions/app-tools/src/builder/index.ts b/packages/solutions/app-tools/src/builder/index.ts index 9e41fa0000ef..1e91d27d2330 100644 --- a/packages/solutions/app-tools/src/builder/index.ts +++ b/packages/solutions/app-tools/src/builder/index.ts @@ -8,7 +8,7 @@ export async function createBuilderGenerator(bundler: 'webpack' | 'rspack') { '@modern-js/builder-rspack-provider' ); const version = await getRspackVersion(); - logger.info(`Using Rspack v${version} 🦀`); + logger.info(`Using Rspack v${version}`); return createRspackBuilderForModern; } catch (_) { throw new Error( diff --git a/packages/solutions/app-tools/src/commands/serve.ts b/packages/solutions/app-tools/src/commands/serve.ts index cd53f9229a8f..a7132827681e 100644 --- a/packages/solutions/app-tools/src/commands/serve.ts +++ b/packages/solutions/app-tools/src/commands/serve.ts @@ -1,4 +1,4 @@ -import { logger, chalk, isApiOnly, getTargetDir } from '@modern-js/utils'; +import { logger, isApiOnly, getTargetDir } from '@modern-js/utils'; import type { PluginAPI } from '@modern-js/core'; import server from '@modern-js/prod-server'; import { printInstructions } from '../utils/printInstructions'; @@ -13,7 +13,7 @@ export const start = async (api: PluginAPI>) => { const { appDirectory, port, serverConfigFile, metaName } = appContext; - logger.log(chalk.cyan(`Starting the modern server...`)); + logger.info(`Starting production server...`); const apiOnly = await isApiOnly( appContext.appDirectory, userConfig?.source?.entriesDir, diff --git a/packages/solutions/app-tools/src/utils/printInstructions.ts b/packages/solutions/app-tools/src/utils/printInstructions.ts index ae79d73f8ec1..aeee99863891 100644 --- a/packages/solutions/app-tools/src/utils/printInstructions.ts +++ b/packages/solutions/app-tools/src/utils/printInstructions.ts @@ -14,5 +14,5 @@ export const printInstructions = async ( instructions: message, }); - logger.info(instructions); + logger.log(instructions); }; diff --git a/packages/toolkit/utils/src/cli/logger.ts b/packages/toolkit/utils/src/cli/logger.ts index ebf277ffbef2..b0080c37eccd 100644 --- a/packages/toolkit/utils/src/cli/logger.ts +++ b/packages/toolkit/utils/src/cli/logger.ts @@ -42,6 +42,11 @@ const LOG_TYPES = { label: 'info', level: 'info', }, + ready: { + color: 'green', + label: 'ready', + level: 'info', + }, success: { color: 'green', label: 'success', diff --git a/packages/toolkit/utils/src/cli/port.ts b/packages/toolkit/utils/src/cli/port.ts index 3ae1c87d9763..3b275bbe81bd 100644 --- a/packages/toolkit/utils/src/cli/port.ts +++ b/packages/toolkit/utils/src/cli/port.ts @@ -67,9 +67,7 @@ export const getPort = async ( ); } else if (!slient) { logger.info( - `Something is already running on port ${original}. ${chalk.yellow( - `Use port ${port} instead.`, - )}`, + `Port ${original} is in use. ${chalk.yellow(`using port ${port}.`)}`, ); } } diff --git a/packages/toolkit/utils/src/cli/prettyInstructions.ts b/packages/toolkit/utils/src/cli/prettyInstructions.ts index 0da146b67ecc..afa902d189cd 100644 --- a/packages/toolkit/utils/src/cli/prettyInstructions.ts +++ b/packages/toolkit/utils/src/cli/prettyInstructions.ts @@ -93,7 +93,7 @@ export const prettyInstructions = (appContext: any, config: any) => { ? serverRoutes.filter(route => route.entryName) : serverRoutes; - let message = 'App running at:\n\n'; + let message = '\n'; if (isSingleEntry(entrypoints, config.source?.mainEntryName) || apiOnly) { message += urls diff --git a/packages/toolkit/utils/tests/__snapshots__/prettyInstructions.test.ts.snap b/packages/toolkit/utils/tests/__snapshots__/prettyInstructions.test.ts.snap index 16f5c1006f1d..890793169dac 100644 --- a/packages/toolkit/utils/tests/__snapshots__/prettyInstructions.test.ts.snap +++ b/packages/toolkit/utils/tests/__snapshots__/prettyInstructions.test.ts.snap @@ -1,8 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`prettyInstructions The src directory does not exist 1`] = ` -"App running at: - +" > Local: http://localhost:8080/api > Network: http://11.11.111.11:8080/api > Network: http://10.100.100.100:8080/api @@ -10,8 +9,7 @@ exports[`prettyInstructions The src directory does not exist 1`] = ` `; exports[`prettyInstructions basic usage 1`] = ` -"App running at: - +" > Local: http://localhost:8080/ > Network: http://11.11.111.11:8080/ > Network: http://10.100.100.100:8080/ @@ -19,8 +17,7 @@ exports[`prettyInstructions basic usage 1`] = ` `; exports[`prettyInstructions custom entry 1`] = ` -"App running at: - +" > Local: http://localhost:8080 > Network: http://11.11.111.11:8080 > Network: http://10.100.100.100:8080 @@ -31,15 +28,13 @@ exports[`prettyInstructions custom entry 1`] = ` `; exports[`prettyInstructions should print host correctly 1`] = ` -"App running at: - +" > Network: http://my-host:8080/ " `; exports[`prettyInstructions should print https URLs 1`] = ` -"App running at: - +" > Local: https://localhost:8080/ > Network: https://11.11.111.11:8080/ > Network: https://10.100.100.100:8080/ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 32ad24d8102f..37938f78abdc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -165,14 +165,14 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rspack/core': - specifier: 0.3.4 - version: 0.3.4 + specifier: 0.3.4-canary-9d910ae-20230918010610 + version: 0.3.4-canary-9d910ae-20230918010610 '@rspack/dev-client': - specifier: 0.3.4 - version: 0.3.4(react-refresh@0.14.0)(webpack@5.88.1) + specifier: 0.3.4-canary-9d910ae-20230918010610 + version: 0.3.4-canary-9d910ae-20230918010610(react-refresh@0.14.0)(webpack@5.88.1) '@rspack/plugin-html': - specifier: 0.3.4 - version: 0.3.4(@rspack/core@0.3.4) + specifier: 0.3.4-canary-9d910ae-20230918010610 + version: 0.3.4-canary-9d910ae-20230918010610(@rspack/core@0.3.4-canary-9d910ae-20230918010610) '@swc/helpers': specifier: 0.5.1 version: 0.5.1 @@ -14295,96 +14295,96 @@ packages: rollup: 3.23.0 dev: true - /@rspack/binding-darwin-arm64@0.3.4: - resolution: {integrity: sha512-/B9Xp9mfz+tiq2caM37PvrWDyzvQ4aGBPCbKbnRq13kfOrwJmT9nUAy1y+D8bDl1gLYT+7eVHczGZwMooPa2AA==} + /@rspack/binding-darwin-arm64@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-bvwmHRMYV8MMdCaX3h5Jvxf4FM42F575PKk254QFKRcBH9MMuQmBapaVKg81t6BMjGzqHUEeAlXdx6vPrVH7LA==} cpu: [arm64] os: [darwin] requiresBuild: true dev: false optional: true - /@rspack/binding-darwin-x64@0.3.4: - resolution: {integrity: sha512-NEazY8uHAhGQ3qxs2sY/DFSSgkF8QGd6ls/n1V3sArwcSozRQZhIT79RBhwBJ7qK3o1QIc2a6OjDzkUSPBNEzw==} + /@rspack/binding-darwin-x64@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-Vy2e7Hi9ty78a4cwOIydAgPtroOlqHXlQnxmWEUu8BElIcehHicWg1itdADEcZff+mJR5n6NO+12lUtXQ8Ywcg==} cpu: [x64] os: [darwin] requiresBuild: true dev: false optional: true - /@rspack/binding-linux-arm64-gnu@0.3.4: - resolution: {integrity: sha512-zsVroEhA5T6HhFxiQCrEZiqEAeHP379iT+Scupp3JD7ITfDvNqCTcXObJUUhZctQWPlxn4MqtuL3goRPgvpWWQ==} + /@rspack/binding-linux-arm64-gnu@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-lvKXeTym1LVZamRdjhoeQbio2DQStcEj8dR0jglTtYWz38c91UKRMWqBeqWfiOWL27WipmWM8t5AyPWsp+4j7A==} cpu: [arm64] os: [linux] requiresBuild: true dev: false optional: true - /@rspack/binding-linux-arm64-musl@0.3.4: - resolution: {integrity: sha512-5x8i92eP9ubMDEO3OLT31GdjF9nEyQCPNequAspwv98spaazbiUawPcWZN5XPhsAR41f/w2CvrNUNL7EOHJMkQ==} + /@rspack/binding-linux-arm64-musl@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-VPiB5jSlEah1CVvFoOi48hi398HIx4gE6M2mvN6kqP92LjyG9aw9FTsok7TOl0BeMFMyOcTtYX++gd1v2GOWTQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: false optional: true - /@rspack/binding-linux-x64-gnu@0.3.4: - resolution: {integrity: sha512-oOtLICpLwdgKexHBQi9DERo2Ciweadf2b942Gh9vnMrVJz/oXf9eubewmN4mni5/S+RpSGJoChVvtV1E8ugN/Q==} + /@rspack/binding-linux-x64-gnu@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-e3WgG7zZ8cE5H4O5b/3Ehz+J9lCh6PkfWEe4oZatuMvHqSSkrZWHsdhmbTCmtIpMQ9d+LhmjKIYqq+Um1PdlJg==} cpu: [x64] os: [linux] requiresBuild: true dev: false optional: true - /@rspack/binding-linux-x64-musl@0.3.4: - resolution: {integrity: sha512-yCEb90A3uWOvW4XKxTSaAma70P9UuPffgvt16W+uNb/rGSmTDcZr9/jytvmB5nbOwOq7dx2cu2NEJwWdSvMvxQ==} + /@rspack/binding-linux-x64-musl@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-imODBQ9o9KBiMtAOvFpH3BVLoi/n4svmOubtXV/y+P6yREanU6CJOndlFZfgluk5f/Ckl4QaHTKYnZmxpfvtIw==} cpu: [x64] os: [linux] requiresBuild: true dev: false optional: true - /@rspack/binding-win32-arm64-msvc@0.3.4: - resolution: {integrity: sha512-fp1weWXd/ByMg0L94xKemxnyH9KOLecfbRMcmalmqGyTunneP1YLGiYvBAl2U4Uh0hTKAt3DZ80NCLIHRnqq+Q==} + /@rspack/binding-win32-arm64-msvc@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-y4JmhUk/zho4onIBLMbKx1MTu+glkUKXOS6cWTZk4EB6Dr0oz+Q3ac3YEOzWIU5FkftJ6aCkOkgzdZaG43G24g==} cpu: [arm64] os: [win32] requiresBuild: true dev: false optional: true - /@rspack/binding-win32-ia32-msvc@0.3.4: - resolution: {integrity: sha512-h0wLL8CdLFAQoPaiNU9tbW+ppPYMtgNBmSr77ARNC9M252KuBgEQjOhRhCvVpK/xTVrXxdYddQ+ruhI+VfSo5g==} + /@rspack/binding-win32-ia32-msvc@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-IdGPDjCRUlQo+UMxjED9ZQ947lNeJX3AM+LtACMuusFUh0Ekii+ZQRaFBN3CaZiNDZs024BkqyFc1hWX85XzBQ==} cpu: [ia32] os: [win32] requiresBuild: true dev: false optional: true - /@rspack/binding-win32-x64-msvc@0.3.4: - resolution: {integrity: sha512-AA0XgfefL2TpfFPXc3iN+WhMYAt4B0BvWOijC0n9Xjq+hSh3fx68l+eg2vKDNiG0c1Iji3V0S2Ux+HLV/XuMcA==} + /@rspack/binding-win32-x64-msvc@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-u6YHBgzcgK9jUBYRFY/0DijCZJ/3ds48+SPvu1doY14yvR1tfrrWxc8WbzTY44VAy/du80DFnvYnS9oG0jM+ag==} cpu: [x64] os: [win32] requiresBuild: true dev: false optional: true - /@rspack/binding@0.3.4: - resolution: {integrity: sha512-HIhzKlL/XKhiww4koZDw5ehnQ0zvtAqy0Lr2JYAZJicIsdFkkOoMRXCqgo2ivcEypHAaVNY66/AaWyDLHHmXkg==} + /@rspack/binding@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-Pn+HvoGy0RqTHbC8TdHhcgyraAzJRvp15JWWD9vW/558ZRpig8deICBI4rtM6NWAD4x1y4GpRkX6kgT94IEQeA==} optionalDependencies: - '@rspack/binding-darwin-arm64': 0.3.4 - '@rspack/binding-darwin-x64': 0.3.4 - '@rspack/binding-linux-arm64-gnu': 0.3.4 - '@rspack/binding-linux-arm64-musl': 0.3.4 - '@rspack/binding-linux-x64-gnu': 0.3.4 - '@rspack/binding-linux-x64-musl': 0.3.4 - '@rspack/binding-win32-arm64-msvc': 0.3.4 - '@rspack/binding-win32-ia32-msvc': 0.3.4 - '@rspack/binding-win32-x64-msvc': 0.3.4 + '@rspack/binding-darwin-arm64': 0.3.4-canary-9d910ae-20230918010610 + '@rspack/binding-darwin-x64': 0.3.4-canary-9d910ae-20230918010610 + '@rspack/binding-linux-arm64-gnu': 0.3.4-canary-9d910ae-20230918010610 + '@rspack/binding-linux-arm64-musl': 0.3.4-canary-9d910ae-20230918010610 + '@rspack/binding-linux-x64-gnu': 0.3.4-canary-9d910ae-20230918010610 + '@rspack/binding-linux-x64-musl': 0.3.4-canary-9d910ae-20230918010610 + '@rspack/binding-win32-arm64-msvc': 0.3.4-canary-9d910ae-20230918010610 + '@rspack/binding-win32-ia32-msvc': 0.3.4-canary-9d910ae-20230918010610 + '@rspack/binding-win32-x64-msvc': 0.3.4-canary-9d910ae-20230918010610 dev: false - /@rspack/core@0.3.4: - resolution: {integrity: sha512-Z0IJxZG7IxlORy/VdmoUd+l3ekA89vKh7xH0WR3OsEJ8qLBn+k26Waq8CcaCAWlDt40Vxw7zOi/Vxwops6Mo0w==} + /@rspack/core@0.3.4-canary-9d910ae-20230918010610: + resolution: {integrity: sha512-x8CpDT1rNcjf2ShQxRVtfJ7zK622Qltn3iBYhEnCGL3Cnu4BeGX9SuK5YOY2FqjR/wiHip9EgVC0qil0umi18A==} dependencies: - '@rspack/binding': 0.3.4 + '@rspack/binding': 0.3.4-canary-9d910ae-20230918010610 '@swc/helpers': 0.5.1 browserslist: 4.21.10 compare-versions: 6.0.0-rc.1 @@ -14402,15 +14402,15 @@ packages: zod-validation-error: 1.2.0(zod@3.21.4) dev: false - /@rspack/dev-client@0.3.4(react-refresh@0.14.0)(webpack@5.88.1): - resolution: {integrity: sha512-+s5gpTJm529AUJ80tOu0/JlspyT/keqK7BGOwj7wT6I6uVl9jKInmVowtiDX/LGL57z5J7PmZPO5L30fPuGQZw==} + /@rspack/dev-client@0.3.4-canary-9d910ae-20230918010610(react-refresh@0.14.0)(webpack@5.88.1): + resolution: {integrity: sha512-+AF5LVFAW2PpSuJH/7teqwX0epIkGBvKCN6MzcYMOOmQ7jZlirus8rnHUEjWt9ugD3Q4dVSgs1k8ikbm8rxWeA==} peerDependencies: react-refresh: '>=0.10.0 <1.0.0' peerDependenciesMeta: react-refresh: optional: true dependencies: - '@rspack/plugin-react-refresh': 0.3.4(react-refresh@0.14.0)(webpack@5.88.1) + '@rspack/plugin-react-refresh': 0.3.4-canary-9d910ae-20230918010610(react-refresh@0.14.0)(webpack@5.88.1) react-refresh: 0.14.0 transitivePeerDependencies: - '@types/webpack' @@ -14422,15 +14422,15 @@ packages: - webpack-plugin-serve dev: false - /@rspack/plugin-html@0.3.4(@rspack/core@0.3.4): - resolution: {integrity: sha512-wvg/YHz3IRloOVYdXGG1PXI/tgfzfivlSi5pT36Opp3+wRDMc7s+Qt0V2gK20BojC5hXI+R3zwB8wld3OS+Fow==} + /@rspack/plugin-html@0.3.4-canary-9d910ae-20230918010610(@rspack/core@0.3.4-canary-9d910ae-20230918010610): + resolution: {integrity: sha512-HbQ1TOfq2zhcTr2XBtMO7ruIRWR6PmbgRtIHyB1kR7tWI2G+EVPXoukXmtt4hcZnj22RrjJRYPygPFHoJ3+3eQ==} peerDependencies: - '@rspack/core': 0.3.4 + '@rspack/core': 0.3.4-canary-9d910ae-20230918010610 peerDependenciesMeta: '@rspack/core': optional: true dependencies: - '@rspack/core': 0.3.4 + '@rspack/core': 0.3.4-canary-9d910ae-20230918010610 '@types/html-minifier-terser': 7.0.0 html-minifier-terser: 7.0.0 lodash.template: 4.5.0 @@ -14438,8 +14438,8 @@ packages: tapable: 2.2.1 dev: false - /@rspack/plugin-react-refresh@0.3.4(react-refresh@0.14.0)(webpack@5.88.1): - resolution: {integrity: sha512-4SJlntJg2RSfTzf9/s4zXDqZzINzit134N9QhVKdm+FoJsJOD5KF3a20fMqhuI1NGtuuT3tZ7kCRNi05fC9XNw==} + /@rspack/plugin-react-refresh@0.3.4-canary-9d910ae-20230918010610(react-refresh@0.14.0)(webpack@5.88.1): + resolution: {integrity: sha512-9OJct74th+C1CXP9+SmEfhxo+qwHA5omX7CHTagoRH57X09GymXETbE4QAKmTYoTQPPG0pBr3sHn9VQxDUVf5w==} peerDependencies: react-refresh: '>=0.10.0 <1.0.0' peerDependenciesMeta: From 39aab870b34d92203944c730211d0bfc255cbe3f Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 19 Sep 2023 11:42:44 +0800 Subject: [PATCH 02/26] docs: using PackageManagerTabs component (#4675) --- .../docs/en/guide/basic/builder-cli.mdx | 14 +-- .../builder-doc/docs/en/guide/quick-start.mdx | 12 +- .../docs/en/plugins/plugin-esbuild.mdx | 11 +- .../docs/en/plugins/plugin-image-compress.mdx | 11 +- .../docs/en/plugins/plugin-node-polyfill.mdx | 11 +- .../docs/en/plugins/plugin-stylus.mdx | 11 +- .../docs/en/plugins/plugin-swc.mdx | 11 +- .../docs/en/plugins/plugin-vue.mdx | 11 +- .../docs/en/plugins/plugin-vue2.mdx | 11 +- .../docs/zh/guide/basic/builder-cli.mdx | 14 +-- .../builder-doc/docs/zh/guide/quick-start.mdx | 12 +- .../docs/zh/plugins/plugin-esbuild.mdx | 11 +- .../docs/zh/plugins/plugin-image-compress.mdx | 11 +- .../docs/zh/plugins/plugin-node-polyfill.mdx | 11 +- .../docs/zh/plugins/plugin-stylus.mdx | 11 +- .../docs/zh/plugins/plugin-swc.mdx | 11 +- .../docs/zh/plugins/plugin-vue.mdx | 11 +- .../docs/zh/plugins/plugin-vue2.mdx | 11 +- .../en/components/global-proxy-config.mdx | 11 +- .../docs/en/guides/get-started/upgrade.mdx | 14 ++- .../en/tutorials/first-app/c02-component.mdx | 7 +- .../zh/components/global-proxy-config.mdx | 11 +- .../docs/zh/guides/get-started/upgrade.mdx | 14 ++- .../zh/tutorials/first-app/c02-component.mdx | 7 +- ...getting-started.md => getting-started.mdx} | 12 +- .../{plugin-babel.md => plugin-babel.mdx} | 16 +-- .../{plugin-banner.md => plugin-banner.mdx} | 22 ++-- .../plugins/official-list/plugin-import.mdx | 11 +- ...e-polyfill.md => plugin-node-polyfill.mdx} | 104 ++++++++---------- ...plugin-polyfill.md => plugin-polyfill.mdx} | 22 +--- ...getting-started.md => getting-started.mdx} | 6 +- .../{plugin-babel.md => plugin-babel.mdx} | 16 +-- .../{plugin-banner.md => plugin-banner.mdx} | 21 ++-- .../plugins/official-list/plugin-import.mdx | 11 +- ...e-polyfill.md => plugin-node-polyfill.mdx} | 104 ++++++++---------- ...plugin-polyfill.md => plugin-polyfill.mdx} | 22 +--- 36 files changed, 221 insertions(+), 416 deletions(-) rename packages/document/module-doc/docs/en/guide/intro/{getting-started.md => getting-started.mdx} (95%) rename packages/document/module-doc/docs/en/plugins/official-list/{plugin-babel.md => plugin-babel.mdx} (78%) rename packages/document/module-doc/docs/en/plugins/official-list/{plugin-banner.md => plugin-banner.mdx} (80%) rename packages/document/module-doc/docs/en/plugins/official-list/{plugin-node-polyfill.md => plugin-node-polyfill.mdx} (75%) rename packages/document/module-doc/docs/en/plugins/official-list/{plugin-polyfill.md => plugin-polyfill.mdx} (81%) rename packages/document/module-doc/docs/zh/guide/intro/{getting-started.md => getting-started.mdx} (96%) rename packages/document/module-doc/docs/zh/plugins/official-list/{plugin-babel.md => plugin-babel.mdx} (78%) rename packages/document/module-doc/docs/zh/plugins/official-list/{plugin-banner.md => plugin-banner.mdx} (80%) rename packages/document/module-doc/docs/zh/plugins/official-list/{plugin-node-polyfill.md => plugin-node-polyfill.mdx} (74%) rename packages/document/module-doc/docs/zh/plugins/official-list/{plugin-polyfill.md => plugin-polyfill.mdx} (81%) diff --git a/packages/document/builder-doc/docs/en/guide/basic/builder-cli.mdx b/packages/document/builder-doc/docs/en/guide/basic/builder-cli.mdx index b82d70a4bf3c..f4e7ae22fdb8 100644 --- a/packages/document/builder-doc/docs/en/guide/basic/builder-cli.mdx +++ b/packages/document/builder-doc/docs/en/guide/basic/builder-cli.mdx @@ -9,16 +9,14 @@ Modern.js Builder provides a lightweight CLI tool that includes basic commands s You need to install two packages: -- `@modern-js/builder-cli` is the CLI tool for Builder, providing basic CLI commands and automatically loading the installed Provider in the current project. -- `@modern-js/builder-webpack-provider` or `@modern-js/builder-rspack-provider`, they are Providers for Builder, offering build capabilities based on webpack or Rspack. +- `@modern-js/builder-cli`: the CLI tool for Builder, providing basic CLI commands and automatically loading the installed Provider in the current project. +- `@modern-js/builder-rspack-provider`: To provide the building capabilities based on Rspack. -```bash -# Using webpack for bundling -pnpm add @modern-js/builder-cli @modern-js/builder-webpack-provider -D +import { PackageManagerTabs } from '@theme'; -# Using Rspack for bundling -pnpm add @modern-js/builder-cli @modern-js/builder-rspack-provider -D -``` + + +if you want to use webpack instead of Rspack, you can replace the `@modern-js/builder-rspack-provider` with `@modern-js/builder-webpack-provider`: ## Commands diff --git a/packages/document/builder-doc/docs/en/guide/quick-start.mdx b/packages/document/builder-doc/docs/en/guide/quick-start.mdx index 69dbe6dad31e..3c0558935dd8 100644 --- a/packages/document/builder-doc/docs/en/guide/quick-start.mdx +++ b/packages/document/builder-doc/docs/en/guide/quick-start.mdx @@ -37,15 +37,13 @@ If you are developing a front-end framework, you can use Builder by following th You need to install two packages: - `@modern-js/builder`: This is the core package of Builder, which exports the core API of Builder. -- `@modern-js/builder-webpack-provider` or `@modern-js/builder-rspack-provider`: These are the Providers for Builder, which provide the building capabilities based on webpack or Rspack. +- `@modern-js/builder-rspack-provider`: To provide the building capabilities based on Rspack. -```bash -# Using webpack for bundling -pnpm add @modern-js/builder @modern-js/builder-webpack-provider -D +import { PackageManagerTabs } from '@theme'; -# Using Rspack for bundling -pnpm add @modern-js/builder @modern-js/builder-rspack-provider -D -``` + + +if you want to use webpack instead of Rspack, you can replace the `@modern-js/builder-rspack-provider` with `@modern-js/builder-webpack-provider`: > When performing a version upgrade, please ensure that the Builder and Provider packages you install are of the same version. diff --git a/packages/document/builder-doc/docs/en/plugins/plugin-esbuild.mdx b/packages/document/builder-doc/docs/en/plugins/plugin-esbuild.mdx index a78937154089..2ed183d68dd5 100644 --- a/packages/document/builder-doc/docs/en/plugins/plugin-esbuild.mdx +++ b/packages/document/builder-doc/docs/en/plugins/plugin-esbuild.mdx @@ -40,16 +40,9 @@ If you use the Builder's Node API, you need to manually install and register the You can install the plugin with the following command: -```bash -# npm -npm install @modern-js/builder-plugin-esbuild -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-esbuild -D - -# pnpm -pnpm add @modern-js/builder-plugin-esbuild -D -``` + #### Register diff --git a/packages/document/builder-doc/docs/en/plugins/plugin-image-compress.mdx b/packages/document/builder-doc/docs/en/plugins/plugin-image-compress.mdx index fcb0f549b8e5..26441b8ebcf8 100644 --- a/packages/document/builder-doc/docs/en/plugins/plugin-image-compress.mdx +++ b/packages/document/builder-doc/docs/en/plugins/plugin-image-compress.mdx @@ -8,16 +8,9 @@ With the image compression plugin, image resources used in the project can be co You can install the plugin with the following command: -```bash -# npm -npm install @modern-js/builder-plugin-image-compress -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-image-compress -D - -# pnpm -pnpm add @modern-js/builder-plugin-image-compress -D -``` + ### Register diff --git a/packages/document/builder-doc/docs/en/plugins/plugin-node-polyfill.mdx b/packages/document/builder-doc/docs/en/plugins/plugin-node-polyfill.mdx index 07bff4ef3056..882a949de122 100644 --- a/packages/document/builder-doc/docs/en/plugins/plugin-node-polyfill.mdx +++ b/packages/document/builder-doc/docs/en/plugins/plugin-node-polyfill.mdx @@ -28,16 +28,9 @@ If you use the Builder's Node API, you need to manually install and register the You can install the plugin with the following command: -```bash -# npm -npm install @modern-js/builder-plugin-node-polyfill -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-node-polyfill -D - -# pnpm -pnpm add @modern-js/builder-plugin-node-polyfill -D -``` + #### Register diff --git a/packages/document/builder-doc/docs/en/plugins/plugin-stylus.mdx b/packages/document/builder-doc/docs/en/plugins/plugin-stylus.mdx index c897c617a6fc..410d289a91ea 100644 --- a/packages/document/builder-doc/docs/en/plugins/plugin-stylus.mdx +++ b/packages/document/builder-doc/docs/en/plugins/plugin-stylus.mdx @@ -8,16 +8,9 @@ Stylus is an Expressive, dynamic and robust CSS preprocessor. This chapter intro You can install the plugin with the following command: -```bash -# npm -npm install @modern-js/builder-plugin-stylus -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-stylus -D - -# pnpm -pnpm install @modern-js/builder-plugin-stylus -D -``` + ### Register diff --git a/packages/document/builder-doc/docs/en/plugins/plugin-swc.mdx b/packages/document/builder-doc/docs/en/plugins/plugin-swc.mdx index 2bf1a2b6a696..387c09ac8919 100644 --- a/packages/document/builder-doc/docs/en/plugins/plugin-swc.mdx +++ b/packages/document/builder-doc/docs/en/plugins/plugin-swc.mdx @@ -54,16 +54,9 @@ If you use the Builder's Node API, you need to manually install and register the You can install the plugin with the following command: -```bash -# npm -npm install @modern-js/builder-plugin-swc -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-swc -D - -# pnpm -pnpm add @modern-js/builder-plugin-swc -D -``` + #### Register diff --git a/packages/document/builder-doc/docs/en/plugins/plugin-vue.mdx b/packages/document/builder-doc/docs/en/plugins/plugin-vue.mdx index 31ef84bb6bce..20a32ab13fb0 100644 --- a/packages/document/builder-doc/docs/en/plugins/plugin-vue.mdx +++ b/packages/document/builder-doc/docs/en/plugins/plugin-vue.mdx @@ -8,16 +8,9 @@ The Vue plugin provides support for building Vue 3 applications. The plugin inte You can install the plugin with the following command: -```bash -# npm -npm install @modern-js/builder-plugin-vue -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-vue -D - -# pnpm -pnpm install @modern-js/builder-plugin-vue -D -``` + ### Register diff --git a/packages/document/builder-doc/docs/en/plugins/plugin-vue2.mdx b/packages/document/builder-doc/docs/en/plugins/plugin-vue2.mdx index 2617b191df44..c6f79a498937 100644 --- a/packages/document/builder-doc/docs/en/plugins/plugin-vue2.mdx +++ b/packages/document/builder-doc/docs/en/plugins/plugin-vue2.mdx @@ -8,16 +8,9 @@ The Vue 2 plugin provides support for building Vue 2 applications. The plugin in You can install the plugin with the following command: -```bash -# npm -npm install @modern-js/builder-plugin-vue2 -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-vue2 -D - -# pnpm -pnpm install @modern-js/builder-plugin-vue2 -D -``` + ### Register diff --git a/packages/document/builder-doc/docs/zh/guide/basic/builder-cli.mdx b/packages/document/builder-doc/docs/zh/guide/basic/builder-cli.mdx index 7f00d6de6717..16a1b366cf74 100644 --- a/packages/document/builder-doc/docs/zh/guide/basic/builder-cli.mdx +++ b/packages/document/builder-doc/docs/zh/guide/basic/builder-cli.mdx @@ -9,16 +9,14 @@ Modern.js Builder 提供了一个轻量的 CLI 工具,包含 dev、build 等 你需要安装两个包,其中: -- `@modern-js/builder-cli` 为 Builder 的 CLI 工具,提供基础的 CLI 命令,并会自动加载当前项目中安装的 Provider。 -- `@modern-js/builder-webpack-provider` 或 `@modern-js/builder-rspack-provider`,它们是 Builder 的 Provider,提供基于 webpack 或 Rspack 的构建能力。 +- `@modern-js/builder-cli`:Builder 的 CLI 工具,提供基础的 CLI 命令,并会自动加载当前项目中安装的 Provider。 +- `@modern-js/builder-rspack-provider`:提供基于 webpack 或 Rspack 的构建能力。 -```bash -# 使用 webpack 打包 -pnpm add @modern-js/builder-cli @modern-js/builder-webpack-provider -D +import { PackageManagerTabs } from '@theme'; -# 使用 Rspack 打包 -pnpm add @modern-js/builder-cli @modern-js/builder-rspack-provider -D -``` + + +如果你想使用 webpack 而不是 Rspack,可以将 `@modern-js/builder-rspack-provider` 替换为 `@modern-js/builder-webpack-provider`: ## 命令 diff --git a/packages/document/builder-doc/docs/zh/guide/quick-start.mdx b/packages/document/builder-doc/docs/zh/guide/quick-start.mdx index f75d876e4a56..315faafdf592 100644 --- a/packages/document/builder-doc/docs/zh/guide/quick-start.mdx +++ b/packages/document/builder-doc/docs/zh/guide/quick-start.mdx @@ -37,15 +37,13 @@ Modern.js Builder 提供了一个轻量的 CLI 工具,包含 dev、build 等 你需要安装两个包,其中: - `@modern-js/builder` 为 Builder 的核心包,导出了 Builder 的核心 API。 -- `@modern-js/builder-webpack-provider` 或 `@modern-js/builder-rspack-provider`,它们是 Builder 的 Provider,提供基于 webpack 或 Rspack 的构建能力。 +- `@modern-js/builder-rspack-provider`,它提供基于 Rspack 的构建能力。 -```bash -# 使用 webpack 打包 -pnpm add @modern-js/builder @modern-js/builder-webpack-provider -D +import { PackageManagerTabs } from '@theme'; -# 使用 Rspack 打包 -pnpm add @modern-js/builder @modern-js/builder-rspack-provider -D -``` + + +如果你想使用 webpack 而不是 Rspack,可以将 `@modern-js/builder-rspack-provider` 替换为 `@modern-js/builder-webpack-provider`: > 在进行版本升级时,请确保你安装的 builder 和 provider 为同一个版本。 diff --git a/packages/document/builder-doc/docs/zh/plugins/plugin-esbuild.mdx b/packages/document/builder-doc/docs/zh/plugins/plugin-esbuild.mdx index abaeabb6ceda..837c1cb7c83c 100644 --- a/packages/document/builder-doc/docs/zh/plugins/plugin-esbuild.mdx +++ b/packages/document/builder-doc/docs/zh/plugins/plugin-esbuild.mdx @@ -40,16 +40,9 @@ export default defineConfig({ 你可以通过如下的命令安装插件: -```bash -# npm -npm install @modern-js/builder-plugin-esbuild -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-esbuild -D - -# pnpm -pnpm add @modern-js/builder-plugin-esbuild -D -``` + #### 注册插件 diff --git a/packages/document/builder-doc/docs/zh/plugins/plugin-image-compress.mdx b/packages/document/builder-doc/docs/zh/plugins/plugin-image-compress.mdx index b8e933dc53ea..9c9d878e9902 100644 --- a/packages/document/builder-doc/docs/zh/plugins/plugin-image-compress.mdx +++ b/packages/document/builder-doc/docs/zh/plugins/plugin-image-compress.mdx @@ -8,16 +8,9 @@ Image Compress 插件会将项目中用到的图片资源进行压缩处理, 你可以通过如下的命令安装插件: -```bash -# npm -npm install @modern-js/builder-plugin-image-compress -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-image-compress -D - -# pnpm -pnpm add @modern-js/builder-plugin-image-compress -D -``` + ### 注册插件 diff --git a/packages/document/builder-doc/docs/zh/plugins/plugin-node-polyfill.mdx b/packages/document/builder-doc/docs/zh/plugins/plugin-node-polyfill.mdx index b23b590259d3..5f7a9e99b1d2 100644 --- a/packages/document/builder-doc/docs/zh/plugins/plugin-node-polyfill.mdx +++ b/packages/document/builder-doc/docs/zh/plugins/plugin-node-polyfill.mdx @@ -28,16 +28,9 @@ export default defineConfig({ 你可以通过如下的命令安装插件: -```bash -# npm -npm install @modern-js/builder-plugin-node-polyfill -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-node-polyfill -D - -# pnpm -pnpm add @modern-js/builder-plugin-node-polyfill -D -``` + #### 注册插件 diff --git a/packages/document/builder-doc/docs/zh/plugins/plugin-stylus.mdx b/packages/document/builder-doc/docs/zh/plugins/plugin-stylus.mdx index 7b2853a7d05c..d0c3fbe7f140 100644 --- a/packages/document/builder-doc/docs/zh/plugins/plugin-stylus.mdx +++ b/packages/document/builder-doc/docs/zh/plugins/plugin-stylus.mdx @@ -8,16 +8,9 @@ Stylus 是一个富于表现力、动态的、健壮的 CSS 预处理器,本 你可以通过如下的命令安装插件: -```bash -# npm -npm install @modern-js/builder-plugin-stylus -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-stylus -D - -# pnpm -pnpm install @modern-js/builder-plugin-stylus -D -``` + ### 注册插件 diff --git a/packages/document/builder-doc/docs/zh/plugins/plugin-swc.mdx b/packages/document/builder-doc/docs/zh/plugins/plugin-swc.mdx index 60a60b4d3e9a..7692b8e08bac 100644 --- a/packages/document/builder-doc/docs/zh/plugins/plugin-swc.mdx +++ b/packages/document/builder-doc/docs/zh/plugins/plugin-swc.mdx @@ -54,16 +54,9 @@ import EnableSWC from '@zh/shared/enableSwc.md'; 你可以通过如下的命令安装插件: -```bash -# npm -npm install @modern-js/builder-plugin-swc -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-swc -D - -# pnpm -pnpm add @modern-js/builder-plugin-swc -D -``` + #### 注册插件 diff --git a/packages/document/builder-doc/docs/zh/plugins/plugin-vue.mdx b/packages/document/builder-doc/docs/zh/plugins/plugin-vue.mdx index 05fc1e4ef1cf..6eec114bad1b 100644 --- a/packages/document/builder-doc/docs/zh/plugins/plugin-vue.mdx +++ b/packages/document/builder-doc/docs/zh/plugins/plugin-vue.mdx @@ -8,16 +8,9 @@ Vue 插件提供了对 Vue 3 应用构建的支持,插件内部集成了 [vue- 你可以通过如下的命令安装插件: -```bash -# npm -npm install @modern-js/builder-plugin-vue -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-vue -D - -# pnpm -pnpm install @modern-js/builder-plugin-vue -D -``` + ### 注册插件 diff --git a/packages/document/builder-doc/docs/zh/plugins/plugin-vue2.mdx b/packages/document/builder-doc/docs/zh/plugins/plugin-vue2.mdx index 24bfe62506ab..1c3f55979417 100644 --- a/packages/document/builder-doc/docs/zh/plugins/plugin-vue2.mdx +++ b/packages/document/builder-doc/docs/zh/plugins/plugin-vue2.mdx @@ -8,16 +8,9 @@ Vue 2 插件提供了对 Vue 2 应用构建的支持,插件内部集成了 [vu 你可以通过如下的命令安装插件: -```bash -# npm -npm install @modern-js/builder-plugin-vue2 -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/builder-plugin-vue2 -D - -# pnpm -pnpm install @modern-js/builder-plugin-vue2 -D -``` + ### 注册插件 diff --git a/packages/document/main-doc/docs/en/components/global-proxy-config.mdx b/packages/document/main-doc/docs/en/components/global-proxy-config.mdx index dccb8d8a2a71..f6d3c2be26f4 100644 --- a/packages/document/main-doc/docs/en/components/global-proxy-config.mdx +++ b/packages/document/main-doc/docs/en/components/global-proxy-config.mdx @@ -7,16 +7,9 @@ This option is used to configure a global proxy based on [whistle](https://wprox Before using this option, you need to install and register the `@modern-js/plugin-proxy` plugin: -```bash -# npm -npm add @modern-js/plugin-proxy -D - -# yarn -yarn add @modern-js/plugin-proxy -D +import { PackageManagerTabs } from '@theme'; -# pnpm -pnpm add @modern-js/plugin-proxy -D -``` + After the installation, please register the plugin in the `modern.config.ts` file: diff --git a/packages/document/main-doc/docs/en/guides/get-started/upgrade.mdx b/packages/document/main-doc/docs/en/guides/get-started/upgrade.mdx index 88411f3efb5c..bd9d1999e8f3 100644 --- a/packages/document/main-doc/docs/en/guides/get-started/upgrade.mdx +++ b/packages/document/main-doc/docs/en/guides/get-started/upgrade.mdx @@ -8,11 +8,13 @@ sidebar_position: 3 Modern.js provides the `upgrade` command to support upgrading the project to the latest version of Modern.js. -Run `pnpm run upgrade` in the project: +Run the `upgrade` script in the project: -```bash -$ pnpm run upgrade +import { PackageManagerTabs } from '@theme'; + + +```bash > modern upgrade [INFO] [Project Type]: Web App @@ -22,11 +24,15 @@ $ pnpm run upgrade You can see that the dependencies in the project's `package.json` have been updated to the latest version. +:::tip +If the `upgrade` command is not declared in the project's `package.json`, you can execute `npx modern upgrade` as an equivalent alternative. +::: + ## Upgrade to a specified version All packages of Modern.js are currently released with a **uniform version number**. -import ReleaseNote from "@site-docs-en/components/release-note" +import ReleaseNote from '@site-docs-en/components/release-note'; diff --git a/packages/document/main-doc/docs/en/tutorials/first-app/c02-component.mdx b/packages/document/main-doc/docs/en/tutorials/first-app/c02-component.mdx index d48e21d97d7d..57b831b1c0b5 100644 --- a/packages/document/main-doc/docs/en/tutorials/first-app/c02-component.mdx +++ b/packages/document/main-doc/docs/en/tutorials/first-app/c02-component.mdx @@ -1,6 +1,7 @@ --- title: Add UI Components --- + # Add UI Components In the previous chapter, we learned how to initialize a project and use configuration to modify the default behavior of Modern.js. @@ -9,9 +10,9 @@ In this chapter, we continue to use the project code of the previous chapter and In order to do better UI display and interaction, we introduce the component library [Antd](https://ant.design/index-cn) to develop, and use the `` component instead of the primitive list. Add dependency first: -```bash -pnpm add antd -``` +import { PackageManagerTabs } from '@theme'; + + Modify `src/routes/page.tsx` to import components at the top: diff --git a/packages/document/main-doc/docs/zh/components/global-proxy-config.mdx b/packages/document/main-doc/docs/zh/components/global-proxy-config.mdx index 032d24094cc1..cae9e27cdfa3 100644 --- a/packages/document/main-doc/docs/zh/components/global-proxy-config.mdx +++ b/packages/document/main-doc/docs/zh/components/global-proxy-config.mdx @@ -7,16 +7,9 @@ 使用该选项前,你需要提前安装和注册 `@modern-js/plugin-proxy` 插件: -```bash -# npm -npm add @modern-js/plugin-proxy -D - -# yarn -yarn add @modern-js/plugin-proxy -D +import { PackageManagerTabs } from '@theme'; -# pnpm -pnpm add @modern-js/plugin-proxy -D -``` + 安装完成后,在 `modern.config.ts` 文件中注册插件: diff --git a/packages/document/main-doc/docs/zh/guides/get-started/upgrade.mdx b/packages/document/main-doc/docs/zh/guides/get-started/upgrade.mdx index b3ecc08bb99e..2349bb103cb9 100644 --- a/packages/document/main-doc/docs/zh/guides/get-started/upgrade.mdx +++ b/packages/document/main-doc/docs/zh/guides/get-started/upgrade.mdx @@ -8,11 +8,13 @@ sidebar_position: 3 Modern.js 提供了 `upgrade` 命令支持项目升级到最新的 Modern.js 版本。 -在项目中执行 `pnpm run upgrade`: +在项目中执行 `upgrade` 命令: -```bash -$ pnpm run upgrade +import { PackageManagerTabs } from '@theme'; + + +```bash > modern upgrade [INFO] [项目类型]: Web 应用 @@ -22,11 +24,15 @@ $ pnpm run upgrade 可以看到项目 `package.json` 中的依赖已经更改到最新。 +:::tip +如果项目的 package.json 中没有声明 upgrade 命令,你可以执行 `npx modern upgrade`,效果是等价的。 +::: + ## 指定版本升级 Modern.js 所有的官方包目前都使用**统一版本号**进行发布。 -import ReleaseNote from "@site-docs/components/release-note" +import ReleaseNote from '@site-docs/components/release-note'; diff --git a/packages/document/main-doc/docs/zh/tutorials/first-app/c02-component.mdx b/packages/document/main-doc/docs/zh/tutorials/first-app/c02-component.mdx index c4d906897d19..9d8ab74f3103 100644 --- a/packages/document/main-doc/docs/zh/tutorials/first-app/c02-component.mdx +++ b/packages/document/main-doc/docs/zh/tutorials/first-app/c02-component.mdx @@ -1,6 +1,7 @@ --- title: 编写 UI 组件 --- + # 编写 UI 组件 上一章节中,我们学习了如何初始化项目,并使用配置修改 Modern.js 的默认行为。 @@ -9,9 +10,9 @@ title: 编写 UI 组件 为了做更好的 UI 展示和交互,我们引入组件库 [Antd](https://ant.design/index-cn) 来开发,使用 `` 组件来代替原始的列表。先添加依赖: -```bash -pnpm add antd -``` +import { PackageManagerTabs } from '@theme'; + + 修改 `src/routes/page.tsx`,在顶部导入组件: diff --git a/packages/document/module-doc/docs/en/guide/intro/getting-started.md b/packages/document/module-doc/docs/en/guide/intro/getting-started.mdx similarity index 95% rename from packages/document/module-doc/docs/en/guide/intro/getting-started.md rename to packages/document/module-doc/docs/en/guide/intro/getting-started.mdx index 218e1d4c4dcf..00d0fd231298 100644 --- a/packages/document/module-doc/docs/en/guide/intro/getting-started.md +++ b/packages/document/module-doc/docs/en/guide/intro/getting-started.mdx @@ -22,7 +22,7 @@ Execute `npx @modern-js/create -h` for more command line arguments Next, in the issue interaction, follow the options below. -```bash +```text ? Please select the type of project you want to create: Npm Module ? Please fill in the project name: library ? Please select the programming language: TS @@ -44,9 +44,9 @@ From your shell, install the following dependencies in your project. > If it's a TypeScript project, add the `"typescript"` dependency. -```bash -npm install -D @modern-js/module-tools typescript -``` +import { PackageManagerTabs } from '@theme'; + + > For projects that use pnpm or the Yarn package manager, just replace npm. **pnpm is recommended**. @@ -56,8 +56,8 @@ Next, create the `modern.config.(t|j)s` file in the root of the project. import { moduleTools, defineConfig } from '@modern-js/module-tools'; export default defineConfig({ - plugins: [moduleTools()], -}) + plugins: [moduleTools()], +}); ``` Finally, add the command `"build": "modern build"` to the project's `package.json` file. diff --git a/packages/document/module-doc/docs/en/plugins/official-list/plugin-babel.md b/packages/document/module-doc/docs/en/plugins/official-list/plugin-babel.mdx similarity index 78% rename from packages/document/module-doc/docs/en/plugins/official-list/plugin-babel.md rename to packages/document/module-doc/docs/en/plugins/official-list/plugin-babel.mdx index d5822575cfbc..e531fe5485aa 100644 --- a/packages/document/module-doc/docs/en/plugins/official-list/plugin-babel.md +++ b/packages/document/module-doc/docs/en/plugins/official-list/plugin-babel.mdx @@ -8,16 +8,9 @@ Normally, we don't need to use Babel to transform our code, this plugin is only ### Install -```bash -# npm -npm install @modern-js/plugin-module-babel -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/plugin-module-babel -D - -# pnpm -pnpm add @modern-js/plugin-module-babel -D -``` + ### Register @@ -28,10 +21,7 @@ import { moduleTools, defineConfig } from '@modern-js/module-tools'; import { modulePluginBabel } from '@modern-js/plugin-module-babel'; export default defineConfig({ - plugins: [ - moduleTools(), - modulePluginBabel(), - ], + plugins: [moduleTools(), modulePluginBabel()], }); ``` diff --git a/packages/document/module-doc/docs/en/plugins/official-list/plugin-banner.md b/packages/document/module-doc/docs/en/plugins/official-list/plugin-banner.mdx similarity index 80% rename from packages/document/module-doc/docs/en/plugins/official-list/plugin-banner.md rename to packages/document/module-doc/docs/en/plugins/official-list/plugin-banner.mdx index 7550f3b7160f..8e9743b48707 100644 --- a/packages/document/module-doc/docs/en/plugins/official-list/plugin-banner.md +++ b/packages/document/module-doc/docs/en/plugins/official-list/plugin-banner.mdx @@ -6,16 +6,9 @@ Provide the ability to inject content at the top and bottom of each JS and CSS f ### Install -```bash -# npm -npm install @modern-js/plugin-module-banner -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/plugin-module-banner -D - -# pnpm -pnpm add @modern-js/plugin-module-banner -D -``` + ### Register @@ -50,7 +43,6 @@ Note: CSS comments do not support the `//comment` syntax. Refer to ["CSS Comment import { modulePluginBanner } from '@modern-js/plugin-module-banner'; import { moduleTools, defineConfig } from '@modern-js/module-tools'; - const copyRight = `/* © Copyright 2020 xxx.com or one of its affiliates. * Some Sample Copyright Text Line @@ -75,7 +67,7 @@ export default defineConfig({ ## Configuration -* **Type** +- **Type** ```ts type BannerOptions = { @@ -94,12 +86,12 @@ type BannerOptions = { Add content at the top. -* `banner.js`: Add content at the top of a JS file. -* `banner.css`: Add content at the top of a CSS file. +- `banner.js`: Add content at the top of a JS file. +- `banner.css`: Add content at the top of a CSS file. ### footer Add content at the bottom. -* `footer.js`: Add content at the bottom of a JS file. -* `footer.css`: Add content at the bottom of a CSS file. +- `footer.js`: Add content at the bottom of a JS file. +- `footer.css`: Add content at the bottom of a CSS file. diff --git a/packages/document/module-doc/docs/en/plugins/official-list/plugin-import.mdx b/packages/document/module-doc/docs/en/plugins/official-list/plugin-import.mdx index 1bc64e761a06..0ccfeb565d44 100644 --- a/packages/document/module-doc/docs/en/plugins/official-list/plugin-import.mdx +++ b/packages/document/module-doc/docs/en/plugins/official-list/plugin-import.mdx @@ -10,16 +10,9 @@ Since `@modern-js/module-tools` version >= v2.16.0, this plugin functionality is ### Install -```bash -# npm -npm install @modern-js/plugin-module-import -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/plugin-module-import -D - -# pnpm -pnpm add @modern-js/plugin-module-import -D -``` + ### Register diff --git a/packages/document/module-doc/docs/en/plugins/official-list/plugin-node-polyfill.md b/packages/document/module-doc/docs/en/plugins/official-list/plugin-node-polyfill.mdx similarity index 75% rename from packages/document/module-doc/docs/en/plugins/official-list/plugin-node-polyfill.md rename to packages/document/module-doc/docs/en/plugins/official-list/plugin-node-polyfill.mdx index 71bb6298710d..fa70ca4c2265 100644 --- a/packages/document/module-doc/docs/en/plugins/official-list/plugin-node-polyfill.md +++ b/packages/document/module-doc/docs/en/plugins/official-list/plugin-node-polyfill.mdx @@ -10,16 +10,9 @@ By using the Node Polyfill plugin, Node core libs polyfills are automatically in ### Install -```bash -# npm -npm install @modern-js/plugin-module-node-polyfill -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/plugin-module-node-polyfill -D - -# pnpm -pnpm add @modern-js/plugin-module-node-polyfill -D -``` + ### Register @@ -30,22 +23,19 @@ import { moduleTools, defineConfig } from '@modern-js/module-tools'; import { modulePluginNodePolyfill } from '@modern-js/plugin-module-node-polyfill'; export default defineConfig({ - plugins: [ - moduleTools(), - modulePluginNodePolyfill(), - ], + plugins: [moduleTools(), modulePluginNodePolyfill()], }); ``` ## Configurations -* **Type**: +- **Type**: ```ts type NodePolyfillOptions = { exclude?: string[]; overrides?: Record; -} +}; ``` ### exclude @@ -80,7 +70,7 @@ export default defineConfig({ modulePluginNodePolyfill({ overrides: { fs: path.join(__dirname, './custom-fs.js'), - } + }, }), ], }); @@ -90,9 +80,9 @@ export default defineConfig({ ### Globals -* `Buffer` -* `process` -* `console` +- `Buffer` +- `process` +- `console` When the above global variables are used directly in code, the corresponding polyfill will be injected. @@ -102,34 +92,34 @@ const bufferData = Buffer.from('xxxx'); ### Modules -* `assert` -* `buffer` -* `console` -* `constants` -* `crypto` -* `domain` -* `events` -* `http` -* `https` -* `os` -* `path` -* `punycode` -* `process` -* `querystring` -* `stream` -* `_stream_duplex` -* `_stream_passthrough` -* `_stream_readable` -* `_stream_transform` -* `_stream_writable` -* `string_decoder` -* `sys` -* `timers` -* `tty` -* `url` -* `util` -* `vm` -* `zlib` +- `assert` +- `buffer` +- `console` +- `constants` +- `crypto` +- `domain` +- `events` +- `http` +- `https` +- `os` +- `path` +- `punycode` +- `process` +- `querystring` +- `stream` +- `_stream_duplex` +- `_stream_passthrough` +- `_stream_readable` +- `_stream_transform` +- `_stream_writable` +- `string_decoder` +- `sys` +- `timers` +- `tty` +- `url` +- `util` +- `vm` +- `zlib` When the above module is referenced in code via import / require syntax, the corresponding polyfill will be injected. @@ -141,16 +131,16 @@ const bufferData = Buffer.from('xxxx'); ### Fallbacks -* `child_process` -* `cluster` -* `dgram` -* `dns` -* `fs` -* `module` -* `net` -* `readline` -* `repl` -* `tls` +- `child_process` +- `cluster` +- `dgram` +- `dns` +- `fs` +- `module` +- `net` +- `readline` +- `repl` +- `tls` Currently there is no polyfill for the above modules on the browser side, so when you import the above modules, it will automatically fallback to an empty object. diff --git a/packages/document/module-doc/docs/en/plugins/official-list/plugin-polyfill.md b/packages/document/module-doc/docs/en/plugins/official-list/plugin-polyfill.mdx similarity index 81% rename from packages/document/module-doc/docs/en/plugins/official-list/plugin-polyfill.md rename to packages/document/module-doc/docs/en/plugins/official-list/plugin-polyfill.mdx index ba07f83ca025..d72704af905f 100644 --- a/packages/document/module-doc/docs/en/plugins/official-list/plugin-polyfill.md +++ b/packages/document/module-doc/docs/en/plugins/official-list/plugin-polyfill.mdx @@ -11,16 +11,9 @@ Note that this plugin does not transform your code syntax, it only injects polyf ### Install -```bash -# npm -npm install @modern-js/plugin-module-polyfill -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/plugin-module-polyfill -D - -# pnpm -pnpm add @modern-js/plugin-module-polyfill -D -``` + ### Register @@ -31,21 +24,18 @@ import { moduleTools, defineConfig } from '@modern-js/module-tools'; import { modulePluginPolyfill } from '@modern-js/plugin-module-polyfill'; export default defineConfig({ - plugins: [ - moduleTools(), - modulePluginPolyfill(), - ], + plugins: [moduleTools(), modulePluginPolyfill()], }); ``` ## Config -* **Type** +- **Type** ```ts type options = { targets?: Record | string; -} +}; ``` ### targets @@ -62,7 +52,7 @@ export default defineConfig({ plugins: [ moduleTools(), modulePluginPolyfill({ - targets: "> 0.25%, not dead" + targets: '> 0.25%, not dead', }), ], }); diff --git a/packages/document/module-doc/docs/zh/guide/intro/getting-started.md b/packages/document/module-doc/docs/zh/guide/intro/getting-started.mdx similarity index 96% rename from packages/document/module-doc/docs/zh/guide/intro/getting-started.md rename to packages/document/module-doc/docs/zh/guide/intro/getting-started.mdx index 3ee07e1b0553..711e8756f679 100644 --- a/packages/document/module-doc/docs/zh/guide/intro/getting-started.md +++ b/packages/document/module-doc/docs/zh/guide/intro/getting-started.mdx @@ -42,9 +42,9 @@ npx @modern-js/create your-project-dir-name - `"@modern-js/module-tools"` - `"typescript"`(如果不是 TypeScript 项目,则省略) -```bash -npm install -D @modern-js/module-tools typescript -``` +import { PackageManagerTabs } from '@theme'; + + > 对于使用 pnpm 或者 Yarn 包管理器的项目,只需要替换 npm 就可以了。**推荐使用 pnpm**。 diff --git a/packages/document/module-doc/docs/zh/plugins/official-list/plugin-babel.md b/packages/document/module-doc/docs/zh/plugins/official-list/plugin-babel.mdx similarity index 78% rename from packages/document/module-doc/docs/zh/plugins/official-list/plugin-babel.md rename to packages/document/module-doc/docs/zh/plugins/official-list/plugin-babel.mdx index 11ae7e24d16f..8ee0b5dfb40a 100644 --- a/packages/document/module-doc/docs/zh/plugins/official-list/plugin-babel.md +++ b/packages/document/module-doc/docs/zh/plugins/official-list/plugin-babel.mdx @@ -8,16 +8,9 @@ ### 安装 -```bash -# npm -npm install @modern-js/plugin-module-babel -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/plugin-module-babel -D - -# pnpm -pnpm add @modern-js/plugin-module-babel -D -``` + ### 注册插件 @@ -28,10 +21,7 @@ import { moduleTools, defineConfig } from '@modern-js/module-tools'; import { modulePluginBabel } from '@modern-js/plugin-module-babel'; export default defineConfig({ - plugins: [ - moduleTools(), - modulePluginBabel(), - ], + plugins: [moduleTools(), modulePluginBabel()], }); ``` diff --git a/packages/document/module-doc/docs/zh/plugins/official-list/plugin-banner.md b/packages/document/module-doc/docs/zh/plugins/official-list/plugin-banner.mdx similarity index 80% rename from packages/document/module-doc/docs/zh/plugins/official-list/plugin-banner.md rename to packages/document/module-doc/docs/zh/plugins/official-list/plugin-banner.mdx index 092345c0a76f..28fdcb6e8048 100644 --- a/packages/document/module-doc/docs/zh/plugins/official-list/plugin-banner.md +++ b/packages/document/module-doc/docs/zh/plugins/official-list/plugin-banner.mdx @@ -6,16 +6,9 @@ ### 安装 -```bash -# npm -npm install @modern-js/plugin-module-banner -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/plugin-module-banner -D - -# pnpm -pnpm add @modern-js/plugin-module-banner -D -``` + ### 注册插件 @@ -74,7 +67,7 @@ export default defineConfig({ ## 配置 -* **类型:** +- **类型:** ```ts type BannerOptions = { @@ -93,12 +86,12 @@ type BannerOptions = { 在顶部增加内容。 -* `banner.js`:在 JS 文件顶部增加内容。 -* `banner.css`:在 CSS 文件顶部增加内容。 +- `banner.js`:在 JS 文件顶部增加内容。 +- `banner.css`:在 CSS 文件顶部增加内容。 ### footer 在底部增加内容。 -* `footer.js`:在 JS 文件底部增加内容。 -* `footer.css`:在 CSS 文件底部增加内容。 +- `footer.js`:在 JS 文件底部增加内容。 +- `footer.css`:在 CSS 文件底部增加内容。 diff --git a/packages/document/module-doc/docs/zh/plugins/official-list/plugin-import.mdx b/packages/document/module-doc/docs/zh/plugins/official-list/plugin-import.mdx index d2d9e2bfd082..ae09effc8e93 100644 --- a/packages/document/module-doc/docs/zh/plugins/official-list/plugin-import.mdx +++ b/packages/document/module-doc/docs/zh/plugins/official-list/plugin-import.mdx @@ -11,16 +11,9 @@ ### 安装 -```bash -# npm -npm install @modern-js/plugin-module-import -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/plugin-module-import -D - -# pnpm -pnpm add @modern-js/plugin-module-import -D -``` + ### 注册插件 diff --git a/packages/document/module-doc/docs/zh/plugins/official-list/plugin-node-polyfill.md b/packages/document/module-doc/docs/zh/plugins/official-list/plugin-node-polyfill.mdx similarity index 74% rename from packages/document/module-doc/docs/zh/plugins/official-list/plugin-node-polyfill.md rename to packages/document/module-doc/docs/zh/plugins/official-list/plugin-node-polyfill.mdx index b1941fa35e17..dc1299dfa74e 100644 --- a/packages/document/module-doc/docs/zh/plugins/official-list/plugin-node-polyfill.md +++ b/packages/document/module-doc/docs/zh/plugins/official-list/plugin-node-polyfill.mdx @@ -10,16 +10,9 @@ ### 安装 -```bash -# npm -npm install @modern-js/plugin-module-node-polyfill -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/plugin-module-node-polyfill -D - -# pnpm -pnpm add @modern-js/plugin-module-node-polyfill -D -``` + ### 注册插件 @@ -30,22 +23,19 @@ import { moduleTools, defineConfig } from '@modern-js/module-tools'; import { modulePluginNodePolyfill } from '@modern-js/plugin-module-node-polyfill'; export default defineConfig({ - plugins: [ - moduleTools(), - modulePluginNodePolyfill(), - ], + plugins: [moduleTools(), modulePluginNodePolyfill()], }); ``` ## 配置 -* **类型:** +- **类型:** ```ts type NodePolyfillOptions = { exclude?: string[]; overrides?: Record; -} +}; ``` ### exclude @@ -80,7 +70,7 @@ export default defineConfig({ modulePluginNodePolyfill({ overrides: { fs: path.join(__dirname, './custom-fs.js'), - } + }, }), ], }); @@ -90,9 +80,9 @@ export default defineConfig({ ### Globals -* `Buffer` -* `process` -* `console` +- `Buffer` +- `process` +- `console` 当你在代码中使用以上全局变量时,对应 polyfill 会被自动注入。 @@ -102,34 +92,34 @@ const bufferData = Buffer.from('xxxx'); ### Modules -* `assert` -* `buffer` -* `console` -* `constants` -* `crypto` -* `domain` -* `events` -* `http` -* `https` -* `os` -* `path` -* `punycode` -* `process` -* `querystring` -* `stream` -* `_stream_duplex` -* `_stream_passthrough` -* `_stream_readable` -* `_stream_transform` -* `_stream_writable` -* `string_decoder` -* `sys` -* `timers` -* `tty` -* `url` -* `util` -* `vm` -* `zlib` +- `assert` +- `buffer` +- `console` +- `constants` +- `crypto` +- `domain` +- `events` +- `http` +- `https` +- `os` +- `path` +- `punycode` +- `process` +- `querystring` +- `stream` +- `_stream_duplex` +- `_stream_passthrough` +- `_stream_readable` +- `_stream_transform` +- `_stream_writable` +- `string_decoder` +- `sys` +- `timers` +- `tty` +- `url` +- `util` +- `vm` +- `zlib` 当你通过 `require` 或 `import` 等语法在代码中引用以上模块时,对应 polyfill 会被注入。 @@ -141,16 +131,16 @@ const bufferData = Buffer.from('xxxx'); ### Fallbacks -* `child_process` -* `cluster` -* `dgram` -* `dns` -* `fs` -* `module` -* `net` -* `readline` -* `repl` -* `tls` +- `child_process` +- `cluster` +- `dgram` +- `dns` +- `fs` +- `module` +- `net` +- `readline` +- `repl` +- `tls` 目前浏览器端没有以上模块的 polyfill,因此当你引用以上模块时,会自动 fallback 为一个空对象。 diff --git a/packages/document/module-doc/docs/zh/plugins/official-list/plugin-polyfill.md b/packages/document/module-doc/docs/zh/plugins/official-list/plugin-polyfill.mdx similarity index 81% rename from packages/document/module-doc/docs/zh/plugins/official-list/plugin-polyfill.md rename to packages/document/module-doc/docs/zh/plugins/official-list/plugin-polyfill.mdx index bdb4c6fea2f8..887da390f27a 100644 --- a/packages/document/module-doc/docs/zh/plugins/official-list/plugin-polyfill.md +++ b/packages/document/module-doc/docs/zh/plugins/official-list/plugin-polyfill.mdx @@ -11,16 +11,9 @@ ### 安装 -```bash -# npm -npm install @modern-js/plugin-module-polyfill -D +import { PackageManagerTabs } from '@theme'; -# yarn -yarn add @modern-js/plugin-module-polyfill -D - -# pnpm -pnpm add @modern-js/plugin-module-polyfill -D -``` + ### 注册插件 @@ -31,21 +24,18 @@ import { moduleTools, defineConfig } from '@modern-js/module-tools'; import { modulePluginPolyfill } from '@modern-js/plugin-module-polyfill'; export default defineConfig({ - plugins: [ - moduleTools(), - modulePluginPolyfill(), - ], + plugins: [moduleTools(), modulePluginPolyfill()], }); ``` ## 配置 -* **类型:** +- **类型:** ```ts type options = { targets?: Record | string; -} +}; ``` ### targets @@ -62,7 +52,7 @@ export default defineConfig({ plugins: [ moduleTools(), modulePluginPolyfill({ - targets: "> 0.25%, not dead" + targets: '> 0.25%, not dead', }), ], }); From 7427bdc9159d30357a53bd42947497aee10fbf24 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 19 Sep 2023 14:30:21 +0800 Subject: [PATCH 03/26] test: fix garfish e2e failed (#4677) --- .../src/webpackPlugins/ProgressPlugin/helpers/nonTty.ts | 6 +++--- .../document/builder-doc/docs/en/api/builder-instance.mdx | 1 - packages/document/builder-doc/docs/en/guide/quick-start.mdx | 1 - .../document/builder-doc/docs/zh/api/builder-instance.mdx | 1 - packages/document/builder-doc/docs/zh/guide/quick-start.mdx | 1 - tests/utils/modernTestUtils.js | 4 ++-- 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/nonTty.ts b/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/nonTty.ts index 2dad309c773b..dcbd47f0e3a1 100644 --- a/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/nonTty.ts +++ b/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/helpers/nonTty.ts @@ -24,16 +24,16 @@ export function createNonTTYLogger() { prevPercentage = 100; if (hasErrors) { - logger.error(`[${id}] compile failed in ${compileTime}`); + logger.error(`${id} compile failed in ${compileTime}`); } else { - logger.success(`[${id}] compile succeed in ${compileTime}`); + logger.ready(`${id} compiled in ${compileTime}`); } } // print progress when percentage increased by more than 10% // because we don't want to spam the console else if (current - prevPercentage > 10) { prevPercentage = current; - logger.info(`[${id}] compile progress: ${current.toFixed(0)}%`); + logger.info(`${id} compile progress: ${current.toFixed(0)}%`); } }; diff --git a/packages/document/builder-doc/docs/en/api/builder-instance.mdx b/packages/document/builder-doc/docs/en/api/builder-instance.mdx index 850d72644203..5e7901446de0 100644 --- a/packages/document/builder-doc/docs/en/api/builder-instance.mdx +++ b/packages/document/builder-doc/docs/en/api/builder-instance.mdx @@ -228,7 +228,6 @@ After successfully starting Dev Server, you can see the following logs: ```bash info Starting dev server... -info Dev server running at: > Local: http://localhost:8080 > Network: http://192.168.0.1:8080 diff --git a/packages/document/builder-doc/docs/en/guide/quick-start.mdx b/packages/document/builder-doc/docs/en/guide/quick-start.mdx index 3c0558935dd8..17a28b3b82a0 100644 --- a/packages/document/builder-doc/docs/en/guide/quick-start.mdx +++ b/packages/document/builder-doc/docs/en/guide/quick-start.mdx @@ -105,7 +105,6 @@ After successfully starting Dev Server, you can see the following logs: ```bash info Starting dev server... -info Dev server running at: > Local: http://localhost:8081 > Network: http://192.168.0.1:8081 diff --git a/packages/document/builder-doc/docs/zh/api/builder-instance.mdx b/packages/document/builder-doc/docs/zh/api/builder-instance.mdx index 68ee20c9427d..75f6a04382d2 100644 --- a/packages/document/builder-doc/docs/zh/api/builder-instance.mdx +++ b/packages/document/builder-doc/docs/zh/api/builder-instance.mdx @@ -228,7 +228,6 @@ await builder.startDevServer(); ```bash info Starting dev server... -info Dev server running at: > Local: http://localhost:8080 > Network: http://192.168.0.1:8080 diff --git a/packages/document/builder-doc/docs/zh/guide/quick-start.mdx b/packages/document/builder-doc/docs/zh/guide/quick-start.mdx index 315faafdf592..85af436549e3 100644 --- a/packages/document/builder-doc/docs/zh/guide/quick-start.mdx +++ b/packages/document/builder-doc/docs/zh/guide/quick-start.mdx @@ -105,7 +105,6 @@ await builder.startDevServer(); ```bash info Starting dev server... -info Dev server running at: > Local: http://localhost:8081 > Network: http://192.168.0.1:8081 diff --git a/tests/utils/modernTestUtils.js b/tests/utils/modernTestUtils.js index 0c2bbd9676da..6548f0168f65 100644 --- a/tests/utils/modernTestUtils.js +++ b/tests/utils/modernTestUtils.js @@ -89,8 +89,8 @@ function runModernCommandDev(argv, stdOut, options = {}) { function handleStdout(data) { const message = data.toString(); const bootupMarkers = { - dev: /(App|Dev server|Preview server) running at/i, - serve: /(App|Dev server|Preview server) running at/i, + dev: /> Local:/i, + serve: /> Local:/i, }; if (bootupMarkers[options.modernServe ? 'serve' : 'dev'].test(message)) { if (!didResolve) { From 85f877bfc12a2cb1755d8c41715b2f47541b7fc1 Mon Sep 17 00:00:00 2001 From: qixuan <58852732+GiveMe-A-Name@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:50:39 +0800 Subject: [PATCH 04/26] fix: ssr style link should not add scriptLoading attrributes (#4676) --- .changeset/pink-teachers-hug.md | 6 +++++ .../serverRender/renderToString/loadable.ts | 25 +++++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 .changeset/pink-teachers-hug.md diff --git a/.changeset/pink-teachers-hug.md b/.changeset/pink-teachers-hug.md new file mode 100644 index 000000000000..ebe79a0b2c70 --- /dev/null +++ b/.changeset/pink-teachers-hug.md @@ -0,0 +1,6 @@ +--- +'@modern-js/runtime': patch +--- + +fix: ssr style link should not add scriptLoading attrributes +fix: ssr style link 标签 不应该添加 scriptLoading 属性 diff --git a/packages/runtime/plugin-runtime/src/ssr/serverRender/renderToString/loadable.ts b/packages/runtime/plugin-runtime/src/ssr/serverRender/renderToString/loadable.ts index 25063def65fe..1d7730e62634 100644 --- a/packages/runtime/plugin-runtime/src/ssr/serverRender/renderToString/loadable.ts +++ b/packages/runtime/plugin-runtime/src/ssr/serverRender/renderToString/loadable.ts @@ -52,7 +52,10 @@ class LoadableCollector implements Collector { chunksMap.js = (chunksMap.js || '') + getLoadableScripts(extractor); for (const v of chunks) { - const fileType = extname(v.url!).slice(1); + if (!v.url) { + continue; + } + const fileType = extname(v.url).slice(1); const attributes: Record = {}; const { crossorigin, scriptLoading = 'defer' } = config; if (crossorigin) { @@ -60,17 +63,17 @@ class LoadableCollector implements Collector { crossorigin === true ? 'anonymous' : crossorigin; } - switch (scriptLoading) { - case 'defer': - attributes.defer = true; - break; - case 'module': - attributes.type = 'module'; - break; - default: - } - if (fileType === 'js') { + // scriptLoading just apply for script tag. + switch (scriptLoading) { + case 'defer': + attributes.defer = true; + break; + case 'module': + attributes.type = 'module'; + break; + default: + } const jsChunkReg = new RegExp(``; } } else if (fileType === 'css') { - const attrsStr = attributesToString(attributes); - chunksMap[ - fileType - ] += ``; + const cssChunkReg = new RegExp(``); + if (!cssChunkReg.test(template)) { + const attrsStr = attributesToString(attributes); + chunksMap[ + fileType + ] += ``; + } } } } + + private generateAttributes(): Record { + const { config } = this.options; + const { crossorigin } = config; + + const attributes: Record = {}; + + if (crossorigin) { + attributes.crossorigin = crossorigin === true ? 'anonymous' : crossorigin; + } + + return attributes; + } } export interface LoadableCollectorOptions { nonce?: string; From bb970821f0943ad0019a565d7f6962215c4d6b5c Mon Sep 17 00:00:00 2001 From: qixuan <58852732+GiveMe-A-Name@users.noreply.github.com> Date: Wed, 20 Sep 2023 20:51:21 +0800 Subject: [PATCH 20/26] fix: error header key in other metaName (#4695) --- .changeset/green-pandas-buy.md | 6 ++++++ packages/server/prod-server/src/libs/render/index.ts | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .changeset/green-pandas-buy.md diff --git a/.changeset/green-pandas-buy.md b/.changeset/green-pandas-buy.md new file mode 100644 index 000000000000..56d96b228a13 --- /dev/null +++ b/.changeset/green-pandas-buy.md @@ -0,0 +1,6 @@ +--- +'@modern-js/prod-server': patch +--- + +fix(prod-server): error header key in other metaName +fix(prod-server): 错误的 header key 在不同的 metaName diff --git a/packages/server/prod-server/src/libs/render/index.ts b/packages/server/prod-server/src/libs/render/index.ts index d99f8441aed5..8dab1aca5075 100644 --- a/packages/server/prod-server/src/libs/render/index.ts +++ b/packages/server/prod-server/src/libs/render/index.ts @@ -27,6 +27,9 @@ type CreateRenderHandler = (ctx: { metaName?: string; }) => RenderHandler; +const calcFallback = (metaName: string) => + `x-${cutNameByHyphen(metaName)}-ssr-fallback`; + export const createRenderHandler: CreateRenderHandler = ({ distDir, staticGenerate, @@ -73,9 +76,7 @@ export const createRenderHandler: CreateRenderHandler = ({ // handles ssr first const useCSR = - forceCSR && - (ctx.query.csr || - ctx.headers[`x-${cutNameByHyphen(metaName)}-ssr-fallback`]); + forceCSR && (ctx.query.csr || ctx.headers[calcFallback(metaName)]); if (route.isSSR && !useCSR) { try { const userAgent = ctx.getReqHeader('User-Agent') as string | undefined; @@ -129,7 +130,7 @@ export const createRenderHandler: CreateRenderHandler = ({ ERROR_DIGEST.ERENDER, (err as Error).stack || (err as Error).message, ); - ctx.res.set('x-modern-ssr-fallback', '1'); + ctx.res.set(calcFallback(metaName), '1'); } } From 3448e8208579be963e4fe2dfb4ff1a3726129d44 Mon Sep 17 00:00:00 2001 From: gaoyuan Date: Thu, 21 Sep 2023 11:31:02 +0800 Subject: [PATCH 21/26] chore(builder): simplify assets rule (#4701) * chore(builder): simply assets rule * chore: spell * fix: snapshot --- .changeset/big-snakes-kick.md | 7 + .../__snapshots__/default.test.ts.snap | 212 +++--------------- packages/builder/builder-shared/src/config.ts | 9 +- .../__snapshots__/default.test.ts.snap | 212 +++--------------- packages/builder/builder/src/plugins/svg.ts | 19 +- .../plugins/__snapshots__/asset.test.ts.snap | 28 +-- .../plugins/__snapshots__/svg.test.ts.snap | 167 +++----------- .../tests/__snapshots__/index.test.ts.snap | 7 +- 8 files changed, 122 insertions(+), 539 deletions(-) create mode 100644 .changeset/big-snakes-kick.md diff --git a/.changeset/big-snakes-kick.md b/.changeset/big-snakes-kick.md new file mode 100644 index 000000000000..10e2670f4801 --- /dev/null +++ b/.changeset/big-snakes-kick.md @@ -0,0 +1,7 @@ +--- +'@modern-js/builder': patch +--- + +chore(builder): simplify assets rule + +chore(builder): 简化 assets 规则 diff --git a/packages/builder/builder-rspack-provider/tests/plugins/__snapshots__/default.test.ts.snap b/packages/builder/builder-rspack-provider/tests/plugins/__snapshots__/default.test.ts.snap index ff5444051eee..276dae5372b4 100644 --- a/packages/builder/builder-rspack-provider/tests/plugins/__snapshots__/default.test.ts.snap +++ b/packages/builder/builder-rspack-provider/tests/plugins/__snapshots__/default.test.ts.snap @@ -85,13 +85,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` "generator": { "filename": "static/font/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -117,13 +112,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` "generator": { "filename": "static/image/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -149,13 +139,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` "generator": { "filename": "static/media/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -187,13 +172,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -224,29 +204,14 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -837,13 +802,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod "generator": { "filename": "static/font/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -869,13 +829,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod "generator": { "filename": "static/image/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -901,13 +856,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod "generator": { "filename": "static/media/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -939,13 +889,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -976,29 +921,14 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -1641,13 +1571,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctyly when targ "generator": { "filename": "static/font/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -1673,13 +1598,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctyly when targ "generator": { "filename": "static/image/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -1705,13 +1625,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctyly when targ "generator": { "filename": "static/media/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -1743,13 +1658,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctyly when targ /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -1780,29 +1690,14 @@ exports[`applyDefaultPlugins > should apply default plugins correctyly when targ }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -2147,13 +2042,8 @@ exports[`tools.rspack > should match snapshot 1`] = ` "generator": { "filename": "static/font/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -2179,13 +2069,8 @@ exports[`tools.rspack > should match snapshot 1`] = ` "generator": { "filename": "static/image/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -2211,13 +2096,8 @@ exports[`tools.rspack > should match snapshot 1`] = ` "generator": { "filename": "static/media/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -2249,13 +2129,8 @@ exports[`tools.rspack > should match snapshot 1`] = ` /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -2286,29 +2161,14 @@ exports[`tools.rspack > should match snapshot 1`] = ` }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", diff --git a/packages/builder/builder-shared/src/config.ts b/packages/builder/builder-shared/src/config.ts index ddba96643207..73caeece929d 100644 --- a/packages/builder/builder-shared/src/config.ts +++ b/packages/builder/builder-shared/src/config.ts @@ -360,17 +360,12 @@ export const chainStaticAssetRule = ({ // forceNoInline: "foo.png?__inline=false" or "foo.png?url", rule .oneOf(`${assetType}-asset-url`) - .type('asset') + .type('asset/resource') .resourceQuery(/(__inline=false|url)/) .set('generator', { filename, }) - .set('issuer', issuer) - .parser({ - dataUrlCondition: { - maxSize: 0, - }, - }); + .set('issuer', issuer); // forceInline: "foo.png?inline" or "foo.png?__inline", rule diff --git a/packages/builder/builder-webpack-provider/tests/plugins/__snapshots__/default.test.ts.snap b/packages/builder/builder-webpack-provider/tests/plugins/__snapshots__/default.test.ts.snap index efc86a872c5a..e7d5a7c57173 100644 --- a/packages/builder/builder-webpack-provider/tests/plugins/__snapshots__/default.test.ts.snap +++ b/packages/builder/builder-webpack-provider/tests/plugins/__snapshots__/default.test.ts.snap @@ -49,13 +49,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -86,29 +81,14 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -150,13 +130,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` "generator": { "filename": "static/font/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -182,13 +157,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` "generator": { "filename": "static/image/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -214,13 +184,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` "generator": { "filename": "static/media/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -984,13 +949,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -1021,29 +981,14 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -1085,13 +1030,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ "generator": { "filename": "static/font/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -1117,13 +1057,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ "generator": { "filename": "static/image/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -1149,13 +1084,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ "generator": { "filename": "static/media/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -1967,13 +1897,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -2004,29 +1929,14 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -2068,13 +1978,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe "generator": { "filename": "static/font/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -2100,13 +2005,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe "generator": { "filename": "static/image/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -2132,13 +2032,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe "generator": { "filename": "static/media/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -2776,13 +2671,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -2813,29 +2703,14 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "/packages/builder/builder-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -2877,13 +2752,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe "generator": { "filename": "static/font/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -2909,13 +2779,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe "generator": { "filename": "static/image/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -2941,13 +2806,8 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe "generator": { "filename": "static/media/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, diff --git a/packages/builder/builder/src/plugins/svg.ts b/packages/builder/builder/src/plugins/svg.ts index abd299d93600..52c2310209cd 100644 --- a/packages/builder/builder/src/plugins/svg.ts +++ b/packages/builder/builder/src/plugins/svg.ts @@ -52,24 +52,15 @@ export const builderPluginSvg = (): DefaultBuilderPlugin => { rule .oneOf(CHAIN_ID.ONE_OF.SVG_INLINE) - .type('javascript/auto') - .resourceQuery(/inline/) - .use(CHAIN_ID.USE.URL) - .loader(getSharedPkgCompiledPath('url-loader')) - .options({ - limit: Infinity, - name: outputName, - }); + .type('asset/inline') + .resourceQuery(/inline/); rule .oneOf(CHAIN_ID.ONE_OF.SVG_URL) - .type('javascript/auto') + .type('asset/resource') .resourceQuery(/url/) - .use(CHAIN_ID.USE.URL) - .loader(getSharedPkgCompiledPath('url-loader')) - .options({ - limit: false, - name: outputName, + .set('generator', { + filename: outputName, }); rule diff --git a/packages/builder/builder/tests/plugins/__snapshots__/asset.test.ts.snap b/packages/builder/builder/tests/plugins/__snapshots__/asset.test.ts.snap index d909711f5d6c..73f202c8f80d 100644 --- a/packages/builder/builder/tests/plugins/__snapshots__/asset.test.ts.snap +++ b/packages/builder/builder/tests/plugins/__snapshots__/asset.test.ts.snap @@ -10,13 +10,8 @@ exports[`plugins/asset(image) > 'should add image rules correctly' 1`] = ` "generator": { "filename": "static/image/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -51,13 +46,8 @@ exports[`plugins/asset(image) > 'should allow to use distPath.image to be empty "generator": { "filename": "[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -92,13 +82,8 @@ exports[`plugins/asset(image) > 'should allow to use distPath.image to modify di "generator": { "filename": "foo/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -133,13 +118,8 @@ exports[`plugins/asset(image) > 'should allow to use filename.image to modify fi "generator": { "filename": "static/image/foo[ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, diff --git a/packages/builder/builder/tests/plugins/__snapshots__/svg.test.ts.snap b/packages/builder/builder/tests/plugins/__snapshots__/svg.test.ts.snap index e97015842c1a..1e7f50b1792a 100644 --- a/packages/builder/builder/tests/plugins/__snapshots__/svg.test.ts.snap +++ b/packages/builder/builder/tests/plugins/__snapshots__/svg.test.ts.snap @@ -10,13 +10,8 @@ exports[`plugins/svg > 'disableSvgr' 1`] = ` "generator": { "filename": "static/svg/[name].[contenthash:8].svg", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, @@ -57,13 +52,8 @@ exports[`plugins/svg > 'export default Component' 1`] = ` /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -94,29 +84,14 @@ exports[`plugins/svg > 'export default Component' 1`] = ` }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -166,13 +141,8 @@ exports[`plugins/svg > 'export default url' 1`] = ` /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -203,29 +173,14 @@ exports[`plugins/svg > 'export default url' 1`] = ` }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -282,13 +237,8 @@ exports[`plugins/svg > 'should allow to use distPath.svg to modify dist path' 1` /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -319,29 +269,14 @@ exports[`plugins/svg > 'should allow to use distPath.svg to modify dist path' 1` }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "foo/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "foo/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "foo/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -398,13 +333,8 @@ exports[`plugins/svg > 'should allow to use filename.svg to modify filename' 1`] /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -435,29 +365,14 @@ exports[`plugins/svg > 'should allow to use filename.svg to modify filename' 1`] }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/foo.svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/foo.svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/foo.svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", @@ -514,13 +429,8 @@ exports[`plugins/svg > 'should allow using output.dataUriLimit.svg to custom dat /\\\\\\.\\(ts\\|mts\\|cts\\|tsx\\)\\$/, ], }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "issuer": { @@ -551,29 +461,14 @@ exports[`plugins/svg > 'should allow using output.dataUriLimit.svg to custom dat }, { "resourceQuery": /inline/, - "type": "javascript/auto", - "use": [ - { - "loader": "-shared/compiled/url-loader", - "options": { - "limit": Infinity, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/inline", }, { + "generator": { + "filename": "static/svg/[name].[contenthash:8].svg", + }, "resourceQuery": /url/, - "type": "javascript/auto", - "use": [ - { - "loader": "-shared/compiled/url-loader", - "options": { - "limit": false, - "name": "static/svg/[name].[contenthash:8].svg", - }, - }, - ], + "type": "asset/resource", }, { "type": "javascript/auto", diff --git a/packages/builder/plugin-image-compress/tests/__snapshots__/index.test.ts.snap b/packages/builder/plugin-image-compress/tests/__snapshots__/index.test.ts.snap index 149e5357e7fe..dfc907b4498f 100644 --- a/packages/builder/plugin-image-compress/tests/__snapshots__/index.test.ts.snap +++ b/packages/builder/plugin-image-compress/tests/__snapshots__/index.test.ts.snap @@ -10,13 +10,8 @@ exports[`plugin/image-compress > should generate correct options 1`] = ` "generator": { "filename": "static/image/[name].[contenthash:8][ext]", }, - "parser": { - "dataUrlCondition": { - "maxSize": 0, - }, - }, "resourceQuery": /\\(__inline=false\\|url\\)/, - "type": "asset", + "type": "asset/resource", }, { "resourceQuery": /inline/, From 6cefc257ec81c640ec9278a63d84d705405f904d Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 21 Sep 2023 11:50:49 +0800 Subject: [PATCH 22/26] fix(plugin-proxy): failed to run networksetup command in Windows (#4700) --- .changeset/shaggy-ants-worry.md | 7 +++++++ .../cli/plugin-proxy/src/utils/macProxyManager.ts | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 .changeset/shaggy-ants-worry.md diff --git a/.changeset/shaggy-ants-worry.md b/.changeset/shaggy-ants-worry.md new file mode 100644 index 000000000000..a96e545d4dce --- /dev/null +++ b/.changeset/shaggy-ants-worry.md @@ -0,0 +1,7 @@ +--- +'@modern-js/plugin-proxy': patch +--- + +fix(plugin-proxy): failed to run networksetup command in Windows + +fix(plugin-proxy): 修复 Windows 下运行 networksetup 失败的问题 diff --git a/packages/cli/plugin-proxy/src/utils/macProxyManager.ts b/packages/cli/plugin-proxy/src/utils/macProxyManager.ts index 48bed329138f..c8a2ace45472 100644 --- a/packages/cli/plugin-proxy/src/utils/macProxyManager.ts +++ b/packages/cli/plugin-proxy/src/utils/macProxyManager.ts @@ -2,6 +2,8 @@ import execSync from './execSync'; const networkTypes = ['Ethernet', 'Thunderbolt Ethernet', 'Wi-Fi']; +const isMacOS = () => process.platform === 'darwin'; + const getNetworkType = () => { // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < networkTypes.length; i++) { @@ -17,6 +19,11 @@ const getNetworkType = () => { }; export const enableGlobalProxy = (ip: string, port: string) => { + // The `networksetup` command only exists under macOS + if (!isMacOS()) { + return; + } + const networkType = getNetworkType(); // && networksetup -setproxybypassdomains ${networkType} localhost localhost @@ -25,6 +32,10 @@ export const enableGlobalProxy = (ip: string, port: string) => { }; export const disableGlobalProxy = () => { + if (!isMacOS()) { + return; + } + const networkType = getNetworkType(); execSync(`networksetup -setwebproxystate ${networkType} off`); execSync(`networksetup -setsecurewebproxystate ${networkType} off`); From 2675812d345aa8c803686416528bebb6959b52fa Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 21 Sep 2023 11:53:13 +0800 Subject: [PATCH 23/26] feat(builder): improve time logs format (#4702) * feat(builder): improve time logs format * chore: improve * fix: only remove digits for ms time * chore: fix filesize round * chore: update doc --- .changeset/rude-ghosts-reflect.md | 9 ++++++++ .../src/core/createCompiler.ts | 4 ++-- packages/builder/builder-shared/package.json | 8 ------- packages/builder/builder-shared/src/index.ts | 1 + .../builder/builder-shared/src/prettyTime.ts | 22 +++++++++++++++++++ .../ProgressPlugin/ProgressPlugin.ts | 4 ++-- .../builder/builder/src/plugins/fileSize.ts | 2 ++ .../main-doc/docs/en/components/debug-app.mdx | 2 +- .../en/guides/get-started/quick-start.mdx | 2 +- .../main-doc/docs/zh/components/debug-app.mdx | 2 +- .../zh/guides/get-started/quick-start.mdx | 2 +- 11 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 .changeset/rude-ghosts-reflect.md create mode 100644 packages/builder/builder-shared/src/prettyTime.ts diff --git a/.changeset/rude-ghosts-reflect.md b/.changeset/rude-ghosts-reflect.md new file mode 100644 index 000000000000..6573d1316730 --- /dev/null +++ b/.changeset/rude-ghosts-reflect.md @@ -0,0 +1,9 @@ +--- +'@modern-js/builder-webpack-provider': patch +'@modern-js/builder-rspack-provider': patch +'@modern-js/builder-shared': patch +--- + +feat(builder): improve time logs format + +feat(builder): 优化时间日志的格式 diff --git a/packages/builder/builder-rspack-provider/src/core/createCompiler.ts b/packages/builder/builder-rspack-provider/src/core/createCompiler.ts index 2eb3e5937f78..f452614ef178 100644 --- a/packages/builder/builder-rspack-provider/src/core/createCompiler.ts +++ b/packages/builder/builder-rspack-provider/src/core/createCompiler.ts @@ -1,11 +1,11 @@ import { debug, logger, + prettyTime, formatStats, TARGET_ID_MAP, } from '@modern-js/builder-shared'; import type { Context, RspackConfig } from '../types'; -import prettyTime from '@modern-js/builder-shared/pretty-time'; export async function createCompiler({ context, @@ -35,7 +35,7 @@ export async function createCompiler({ if (!stats.hasErrors()) { obj.children?.forEach((c, index) => { if (c.time) { - const time = prettyTime([0, c.time * 10 ** 6], 0); + const time = prettyTime([0, c.time * 10 ** 6]); const target = Array.isArray(context.target) ? context.target[index] : context.target; diff --git a/packages/builder/builder-shared/package.json b/packages/builder/builder-shared/package.json index fdada42320e6..4bc1d50a5966 100644 --- a/packages/builder/builder-shared/package.json +++ b/packages/builder/builder-shared/package.json @@ -94,10 +94,6 @@ "types": "./compiled/postcss-modules-values/index.d.ts", "default": "./compiled/postcss-modules-values/index.js" }, - "./pretty-time": { - "types": "./compiled/pretty-time/index.d.ts", - "default": "./compiled/pretty-time/index.js" - }, "./webpack-merge": { "types": "./compiled/webpack-merge/index.d.ts", "default": "./compiled/webpack-merge/index.js" @@ -148,9 +144,6 @@ "postcss-modules-values": [ "./compiled/postcss-modules-values/index.d.ts" ], - "pretty-time": [ - "./compiled/pretty-time/index.d.ts" - ], "webpack-merge": [ "./compiled/webpack-merge/types/index.d.ts" ] @@ -212,7 +205,6 @@ "./postcss-modules-local-by-default": "./compiled/postcss-modules-local-by-default/index.js", "./postcss-modules-scope": "./compiled/postcss-modules-scope/index.js", "./postcss-modules-values": "./compiled/postcss-modules-values/index.js", - "./pretty-time": "./compiled/pretty-time/index.js", "./webpack-merge": "./compiled/webpack-merge/index.js" } } diff --git a/packages/builder/builder-shared/src/index.ts b/packages/builder/builder-shared/src/index.ts index 0ef5c224fb3d..43422b5b34bd 100644 --- a/packages/builder/builder-shared/src/index.ts +++ b/packages/builder/builder-shared/src/index.ts @@ -32,3 +32,4 @@ export * from './css'; export * from './minimize'; export * from './core-js'; export * from './progress'; +export * from './prettyTime'; diff --git a/packages/builder/builder-shared/src/prettyTime.ts b/packages/builder/builder-shared/src/prettyTime.ts new file mode 100644 index 000000000000..6a2b0775a727 --- /dev/null +++ b/packages/builder/builder-shared/src/prettyTime.ts @@ -0,0 +1,22 @@ +import basePrettyTime from '../compiled/pretty-time'; +import chalk from '@modern-js/utils/chalk'; + +const TIME_REGEXP = /([\d.]+)([a-zA-Z]+)/; + +export const prettyTime = (time: number | [number, number], digits = 1) => { + const timeStr: string = basePrettyTime(time, digits); + + return timeStr.replace(TIME_REGEXP, (match, p1, p2) => { + if (p1 && p2) { + let time = p1; + + // remove digits of ms time + if (p2 === 'ms') { + time = Number(time).toFixed(0); + } + + return `${chalk.bold(time)} ${p2}`; + } + return chalk.bold(match); + }); +}; diff --git a/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/ProgressPlugin.ts b/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/ProgressPlugin.ts index ad5803a6812d..c7e368962e09 100644 --- a/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/ProgressPlugin.ts +++ b/packages/builder/builder-webpack-provider/src/webpackPlugins/ProgressPlugin/ProgressPlugin.ts @@ -1,6 +1,6 @@ import webpack from 'webpack'; import { logger } from '@modern-js/utils/logger'; -import prettyTime from '@modern-js/builder-shared/pretty-time'; +import { prettyTime } from '@modern-js/builder-shared'; import { bus, createFriendlyPercentage } from './helpers'; import { createNonTTYLogger } from './helpers/nonTty'; import type { Props } from './helpers/type'; @@ -85,7 +85,7 @@ export class ProgressPlugin extends webpack.ProgressPlugin { compiler.hooks.done.tap(this.name, stat => { if (startTime) { this.hasCompileErrors = stat.hasErrors(); - this.compileTime = prettyTime(process.hrtime(startTime), 0); + this.compileTime = prettyTime(process.hrtime(startTime)); startTime = null; if (!this.hasCompileErrors) { diff --git a/packages/builder/builder/src/plugins/fileSize.ts b/packages/builder/builder/src/plugins/fileSize.ts index 9bf5b9b2f14c..83df363702b9 100644 --- a/packages/builder/builder/src/plugins/fileSize.ts +++ b/packages/builder/builder/src/plugins/fileSize.ts @@ -135,9 +135,11 @@ async function printFileSizes(stats: Stats | MultiStats, distPath: string) { const totalSizeLabel = `${chalk.bold.blue('Total size:')} ${filesize( totalSize, + { round: 1 }, )}`; const gzippedSizeLabel = `${chalk.bold.blue('Gzipped size:')} ${filesize( totalGzipSize, + { round: 1 }, )}`; logger.log(`\n ${totalSizeLabel}\n ${gzippedSizeLabel}\n`); } diff --git a/packages/document/main-doc/docs/en/components/debug-app.mdx b/packages/document/main-doc/docs/en/components/debug-app.mdx index 85f172b7c071..951b2d712775 100644 --- a/packages/document/main-doc/docs/en/components/debug-app.mdx +++ b/packages/document/main-doc/docs/en/components/debug-app.mdx @@ -6,7 +6,7 @@ $ pnpm run dev > modern dev info Starting dev server... -ready Client compiled in 50ms +ready Client compiled in 50 ms > Local: http://localhost:8080/ > Network: http://192.168.0.1:8080/ diff --git a/packages/document/main-doc/docs/en/guides/get-started/quick-start.mdx b/packages/document/main-doc/docs/en/guides/get-started/quick-start.mdx index 9a92440124d3..8eca5ef599b9 100644 --- a/packages/document/main-doc/docs/en/guides/get-started/quick-start.mdx +++ b/packages/document/main-doc/docs/en/guides/get-started/quick-start.mdx @@ -92,7 +92,7 @@ $ pnpm run build > modern build info Staring production build... -ready Client compiled in 50ms +ready Client compiled in 50 ms info Production file sizes: File Size Gzipped diff --git a/packages/document/main-doc/docs/zh/components/debug-app.mdx b/packages/document/main-doc/docs/zh/components/debug-app.mdx index 4067889774dd..3b352a2c698d 100644 --- a/packages/document/main-doc/docs/zh/components/debug-app.mdx +++ b/packages/document/main-doc/docs/zh/components/debug-app.mdx @@ -6,7 +6,7 @@ $ pnpm run dev > modern dev info Starting dev server... -ready Client compiled in 50ms +ready Client compiled in 50 ms > Local: http://localhost:8080/ > Network: http://192.168.0.1:8080/ diff --git a/packages/document/main-doc/docs/zh/guides/get-started/quick-start.mdx b/packages/document/main-doc/docs/zh/guides/get-started/quick-start.mdx index 5daa3b200e03..4e9c51b2838e 100644 --- a/packages/document/main-doc/docs/zh/guides/get-started/quick-start.mdx +++ b/packages/document/main-doc/docs/zh/guides/get-started/quick-start.mdx @@ -92,7 +92,7 @@ $ pnpm run build > modern build info Staring production build... -ready Client compiled in 50ms +ready Client compiled in 50 ms info Production file sizes: File Size Gzipped From 8b340a4d037148db113fc6143db4167020b80dbd Mon Sep 17 00:00:00 2001 From: Asuka109 Date: Thu, 21 Sep 2023 14:08:48 +0800 Subject: [PATCH 24/26] feat: add draggable FAB & better plugin typings and definition (#4683) * feat: re-organize exports * build: update pnpm lock file * fix: can't resolve main * feat: auto configure devtools data source hostname * feat: sizing logo image * fix: disable rspack to fix resolve issues * feat: remove settings button * feat: make action button draggable * feat: add box shadow for framebox * feat: use environment variable `HASH_SUFFIXED_VERSION` control whether use hash suffix for version * build: update pnpm lock file * feat: re-export type `Options` * fix: property `devtools` is missing in return type * build: update pnpm lock file * feat: hosting client in local * build: remove plugin devtools from the dependencies of app tools * fix: not found export `RPC_SERVER_PATHNAME` * feat: disable dynamic prefix * build: update pnpm lock file --- .github/workflows/build-devtools-website.yml | 62 ---- packages/devtools/client/modern.config.ts | 52 +--- packages/devtools/client/package.json | 7 +- .../devtools/client/src/routes/RootTabs.tsx | 13 +- .../client/src/routes/overview/page.tsx | 8 +- .../devtools/kit/src/types/mount-point.ts | 6 +- .../components/Devtools/Action.module.scss | 23 ++ .../Devtools/Action.module.scss.d.ts | 1 + .../mount/src/components/Devtools/Action.tsx | 96 +++++- .../components/Devtools/FrameBox.module.scss | 1 + .../src/components/Devtools/FrameBox.tsx | 6 +- packages/devtools/plugin/package.json | 8 +- packages/devtools/plugin/src/cli.ts | 97 +++--- packages/devtools/plugin/src/config.ts | 26 ++ packages/devtools/plugin/src/index.ts | 6 +- .../devtools/plugin/src/modern-app-env.d.ts | 2 + packages/devtools/plugin/src/rpc/index.ts | 16 +- packages/devtools/plugin/src/runtime.ts | 5 +- .../app-tools/src/config/legacy/index.ts | 1 + .../app-tools/src/types/config/index.ts | 5 +- pnpm-lock.yaml | 275 ++++++++++++------ tests/integration/devtools/modern.config.ts | 14 +- 22 files changed, 432 insertions(+), 298 deletions(-) delete mode 100644 .github/workflows/build-devtools-website.yml create mode 100644 packages/devtools/plugin/src/config.ts diff --git a/.github/workflows/build-devtools-website.yml b/.github/workflows/build-devtools-website.yml deleted file mode 100644 index d642deaf76d8..000000000000 --- a/.github/workflows/build-devtools-website.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Build DevTools Website - -on: - push: - branches: [main, dev/modernjs-devtools] - paths: - - 'packages/devtools/client/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - build-devtools-website: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Pnpm - run: corepack enable - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: 'pnpm' - - - name: Turbo Cache - id: turbo-cache - uses: actions/cache@v3 - with: - path: .turbo - key: turbo-${{ github.ref_name }}-${{ github.sha }} - restore-keys: | - turbo-${{ github.ref_name }}- - turbo- - - - name: Set outputs - id: vars - run: echo "sha_short=$(git rev-parse --short=10 HEAD)" >> $GITHUB_OUTPUT - - - name: Install Dependencies - run: pnpm install - - - name: Build Website - run: pnpm --filter @modern-js/devtools-client run build - env: - BASENAME: /${{ steps.vars.outputs.sha_short }} - - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.4.1 - with: - repository-name: web-infra-dev/web-infra-dev.github.io - branch: main - folder: packages/devtools/client/dist - token: ${{ secrets.MODERN_DEPLOY_TOKEN }} - target-folder: devtools/${{ steps.vars.outputs.sha_short }} - git-config-name: gh-pages-bot - git-config-email: 41898282+github-actions[bot]@users.noreply.github.com - # enable single-commit to reduce the repo size - single-commit: true - clean: true diff --git a/packages/devtools/client/modern.config.ts b/packages/devtools/client/modern.config.ts index 5a42457cb012..37fdf57c037d 100644 --- a/packages/devtools/client/modern.config.ts +++ b/packages/devtools/client/modern.config.ts @@ -1,69 +1,29 @@ -import { URL } from 'url'; -import path from 'path/posix'; -import { execSync } from 'child_process'; -import { logger } from '@modern-js/builder-shared'; import { appTools, defineConfig } from '@modern-js/app-tools'; import { proxyPlugin } from '@modern-js/plugin-proxy'; import { version } from './package.json'; -const commitShort = execSync('git rev-parse --short=10 HEAD').toString().trim(); -if (!commitShort.match(/^\w{10}$/)) { - throw new Error("Can't resolve git commit hash."); -} - -const basename = new URL(process.env.DEPLOY_HOST || 'https://modernjs.dev'); -if (process.env.BASENAME === 'version' || !process.env.BASENAME) { - basename.pathname = `/devtools/${version}`; -} else if (process.env.BASENAME === 'commit') { - basename.pathname = `/devtools/${commitShort}`; -} else if (process.env.BASENAME === 'false') { - basename.pathname = '/devtools'; -} else { - basename.pathname = path.resolve('/devtools', process.env.BASENAME); -} - -logger.info( - `Access client:`, - `${basename.href}?src=ws://localhost:8080/_modern_js/devtools/rpc`, -); - // https://modernjs.dev/en/configure/app/usage export default defineConfig<'rspack'>({ runtime: { router: { - basename: basename.pathname, + basename: '/_modern_js/devtools', }, }, dev: { + assetPrefix: '/_modern_js/devtools', port: 8780, - assetPrefix: basename.pathname, - proxy: { - [basename.href]: new URL(basename.pathname, 'http://localhost:8780').href, - }, }, source: { preEntry: [require.resolve('modern-normalize/modern-normalize.css')], globalVars: { - 'process.env.PKG_VERSION': `${version}-${commitShort}`, + 'process.env.PKG_VERSION': version, }, }, output: { - assetPrefix: basename.href, + assetPrefix: '/_modern_js/devtools', enableCssModuleTSDeclaration: true, }, - tools: { - devServer: { - client: { - host: 'localhost', - protocol: 'ws', - }, - }, - }, + tools: {}, html: {}, - plugins: [ - appTools({ - bundler: 'experimental-rspack', - }), - proxyPlugin(), - ], + plugins: [appTools({ bundler: 'experimental-rspack' }), proxyPlugin()], }); diff --git a/packages/devtools/client/package.json b/packages/devtools/client/package.json index e632ab2a33fc..a8dc52af67cd 100644 --- a/packages/devtools/client/package.json +++ b/packages/devtools/client/package.json @@ -6,7 +6,6 @@ "reset": "npx rimraf ./**/node_modules", "dev": "modern dev", "build": "modern build", - "deploy": "pnpm build && node scripts/build-redirects.js", "start": "modern start", "serve": "modern serve", "new": "modern new", @@ -16,7 +15,7 @@ "engines": { "node": ">=14.0.0" }, - "dependencies": { + "devDependencies": { "birpc": "0.2.13", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", @@ -38,9 +37,7 @@ "react-use": "^17.4.0", "suspend-react": "^0.1.3", "ufo": "^1.2.0", - "valtio": "^1.11.1" - }, - "devDependencies": { + "valtio": "^1.11.1", "@modern-js-app/eslint-config": "workspace:*", "@modern-js/app-tools": "workspace:*", "@modern-js/builder-shared": "workspace:*", diff --git a/packages/devtools/client/src/routes/RootTabs.tsx b/packages/devtools/client/src/routes/RootTabs.tsx index 85f3c9dd189e..517c989b9015 100644 --- a/packages/devtools/client/src/routes/RootTabs.tsx +++ b/packages/devtools/client/src/routes/RootTabs.tsx @@ -2,9 +2,9 @@ import { Suspense } from 'react'; import styled from '@emotion/styled'; import { useSnapshot } from 'valtio'; import { Outlet, useNavigate, useLocation } from '@modern-js/runtime/router'; -import { Box, Text, Button } from '@radix-ui/themes'; +import { Box } from '@radix-ui/themes'; import _ from 'lodash'; -import { GearIcon, HomeIcon } from '@radix-ui/react-icons'; +import { HomeIcon } from '@radix-ui/react-icons'; import { useStore } from '@/stores'; import { InternalTab } from '@/types'; import Breadcrumbs from '@/components/Breadcrumbs'; @@ -48,10 +48,6 @@ export const RootTabs: React.FC = () => { ))} - - - Settings - @@ -72,11 +68,6 @@ export const RootTabs: React.FC = () => { ); }; -const SettingButton = styled(Button)({ - '--accent-9': 'var(--gray-5)', - '--accent-10': 'var(--gray-6)', -}); - const IconBox = styled(Box)({ width: '2rem', height: '2rem', diff --git a/packages/devtools/client/src/routes/overview/page.tsx b/packages/devtools/client/src/routes/overview/page.tsx index 8693fd68765d..808666cce88d 100644 --- a/packages/devtools/client/src/routes/overview/page.tsx +++ b/packages/devtools/client/src/routes/overview/page.tsx @@ -34,7 +34,7 @@ const Page: React.FC = () => { return ( - + @@ -120,3 +120,9 @@ const Description = styled(Text)({ const LogoHeading = styled.img({ width: '10rem', }); + +const LogoImage = styled.img({ + width: '2rem', + height: '2rem', + objectFit: 'contain', +}); diff --git a/packages/devtools/kit/src/types/mount-point.ts b/packages/devtools/kit/src/types/mount-point.ts index f16e530c36af..86e69583f51d 100644 --- a/packages/devtools/kit/src/types/mount-point.ts +++ b/packages/devtools/kit/src/types/mount-point.ts @@ -1,14 +1,10 @@ import _ from '@modern-js/utils/lodash'; -import { parseURL, stringifyParsedURL } from 'ufo'; export interface MountPointFunctions { getLocation: () => string; } -export interface SetupClientOptions { +export interface SetupClientOptions extends Record { endpoint?: string; - - version?: string | boolean; - dataSource?: string; } diff --git a/packages/devtools/mount/src/components/Devtools/Action.module.scss b/packages/devtools/mount/src/components/Devtools/Action.module.scss index 1c4f69d542cd..e0f67a1dfc9a 100644 --- a/packages/devtools/mount/src/components/Devtools/Action.module.scss +++ b/packages/devtools/mount/src/components/Devtools/Action.module.scss @@ -17,4 +17,27 @@ position: fixed; bottom: 10px; right: 10px; + width: max-content; + height: max-content; + padding: 0.25rem 0.5rem; + font-size: 0.75rem; + display: flex; + gap: 0.25rem; + border: 1px solid #011c64; + background: linear-gradient(to bottom, #212121, #1e1e1e, #212121); + box-shadow: 0 0 3px #011c64; + color: #b8b9bb; + border-radius: 999px; + align-items: center; +} + +.fab :global(*) { + user-select: none; + pointer-events: none; } + +.logo { + width: 1.5rem; + height: 1.5rem; + object-fit: contain; +} \ No newline at end of file diff --git a/packages/devtools/mount/src/components/Devtools/Action.module.scss.d.ts b/packages/devtools/mount/src/components/Devtools/Action.module.scss.d.ts index 6a94a79deb47..393606ce4692 100644 --- a/packages/devtools/mount/src/components/Devtools/Action.module.scss.d.ts +++ b/packages/devtools/mount/src/components/Devtools/Action.module.scss.d.ts @@ -3,6 +3,7 @@ interface CssExports { container: string; fab: string; + logo: string; } export const cssExports: CssExports; export default cssExports; diff --git a/packages/devtools/mount/src/components/Devtools/Action.tsx b/packages/devtools/mount/src/components/Devtools/Action.tsx index d7f83d0f7c03..d04ccfac88b2 100644 --- a/packages/devtools/mount/src/components/Devtools/Action.tsx +++ b/packages/devtools/mount/src/components/Devtools/Action.tsx @@ -1,41 +1,105 @@ import React from 'react'; -import { useToggle } from 'react-use'; -import { joinURL, withQuery } from 'ufo'; +import { useGetSet, useToggle } from 'react-use'; +import { withQuery, stringifyParsedURL, parseURL } from 'ufo'; import { SetupClientOptions } from '@modern-js/devtools-kit'; import Visible from '../Visible'; import styles from './Action.module.scss'; import FrameBox from './FrameBox'; -const getDefaultRPC = () => { - const url = new URL('ws://localhost/_modern_js/devtools/rpc'); - url.protocol = location.protocol === 'https:' ? 'wss:' : 'ws:'; - url.host = location.host; - return url.href; +const parseDataSource = (url: string) => { + const newSrc = parseURL(url); + return stringifyParsedURL({ + protocol: location.protocol === 'https:' ? 'wss:' : 'ws:', + host: location.host, + ...newSrc, + pathname: newSrc.pathname || '/_modern_js/devtools/rpc', + }); +}; + +const useStickyDraggable = () => { + const [isDragging, setIsDragging] = useGetSet(false); + const handleMouseDown = (e: React.MouseEvent) => { + const target = e.currentTarget; + if (!(target instanceof HTMLElement)) { + return; + } + const { offsetX, offsetY } = e.nativeEvent; + const handleMousemove = (e: MouseEvent) => { + if (e.movementX + e.movementY > 1) { + setIsDragging(true); + } + + const x = e.clientX - offsetX; + const y = e.clientY - offsetY; + const distances = [ + { prop: 'top', value: e.clientY } as const, + { prop: 'bottom', value: window.innerHeight - e.clientY } as const, + { prop: 'left', value: e.clientX } as const, + { prop: 'right', value: window.innerWidth - e.clientX } as const, + ]; + const [primary, ...rest] = distances.sort((a, b) => a.value - b.value); + target.style[primary.prop] = '10px'; + for (const unset of rest) { + target.style.removeProperty(unset.prop); + } + if (['top', 'bottom'].includes(primary.prop)) { + target.style.left = `${x}px`; + } else { + target.style.top = `${y}px`; + } + }; + window.addEventListener('mousemove', handleMousemove); + window.addEventListener('blur', () => { + setTimeout(() => setIsDragging(false), 0); + window.removeEventListener('mousemove', handleMousemove); + }); + window.addEventListener( + 'mouseup', + () => { + setTimeout(() => setIsDragging(false), 0); + window.removeEventListener('mousemove', handleMousemove); + }, + { once: true }, + ); + }; + return { + onMouseDown: handleMouseDown, + isDragging: isDragging(), + }; }; const DevtoolsAction: React.FC = props => { - const version = process.env.VERSION!; + const logoSrc = process.env._MODERN_DEVTOOLS_LOGO_SRC!; const opts: Required = { - version, - dataSource: getDefaultRPC(), endpoint: 'https://modernjs.dev/devtools', ...props, + dataSource: parseDataSource(props.dataSource ?? ''), }; const [showDevtools, toggleDevtools] = useToggle(false); - const ver = opts.version === true ? version : opts.version; let src = opts.endpoint; - ver && (src = joinURL(src, ver)); src = withQuery(src, { src: opts.dataSource }); + const { isDragging, onMouseDown } = useStickyDraggable(); + return ( <> -
- -
+
- +
diff --git a/packages/devtools/mount/src/components/Devtools/FrameBox.module.scss b/packages/devtools/mount/src/components/Devtools/FrameBox.module.scss index eb59d68086cb..35ff1a027e44 100644 --- a/packages/devtools/mount/src/components/Devtools/FrameBox.module.scss +++ b/packages/devtools/mount/src/components/Devtools/FrameBox.module.scss @@ -6,6 +6,7 @@ height: 30rem; background-color: white; border: 1px solid #082577; + box-shadow: 0 0 5px #082577; } .frame { diff --git a/packages/devtools/mount/src/components/Devtools/FrameBox.tsx b/packages/devtools/mount/src/components/Devtools/FrameBox.tsx index d07e38a54e13..bc3bf990a3f3 100644 --- a/packages/devtools/mount/src/components/Devtools/FrameBox.tsx +++ b/packages/devtools/mount/src/components/Devtools/FrameBox.tsx @@ -2,11 +2,11 @@ import React, { useState } from 'react'; import { LoaderIcon } from '../LoadingIcon'; import styles from './FrameBox.module.scss'; -export interface FrameBoxProps { +export interface FrameBoxProps extends React.HTMLAttributes { src?: string; } -const FrameBox: React.FC = ({ src }) => { +const FrameBox: React.FC = ({ src, ...props }) => { const [showFrame, setShowFrame] = useState(false); const handleFrameMount = (el: HTMLIFrameElement | null) => { @@ -15,7 +15,7 @@ const FrameBox: React.FC = ({ src }) => { }; return ( -
+
; -} - -const getDefaultOptions = (): Options => ({ - rpcPath: '/_modern_js/devtools/rpc', - def: new ClientDefinition(), -}); +export type { Options }; export const devtoolsPlugin = (options?: Options): CliPlugin => ({ name: '@modern-js/plugin-devtools', usePlugins: [], setup: async api => { - const opts: Options = _.defaultsDeep( - _.cloneDeep(options), - getDefaultOptions(), + const port = await getPort(8782, { slient: true }); + const clientServeDir = path.resolve( + require.resolve('@modern-js/devtools-client/package.json'), + '../dist', ); - const mountOpts: SetupClientOptions = _.pick(opts, [ - 'endpoint', - 'version', - 'dataSource', - ]); - // setup socket server. - const { hooks, builderPlugin, url } = await setupClientConnection({ - api, - def: opts.def, + const serveMiddleware = createServeMiddleware(clientServeDir); + const httpServer = http.createServer((req, res) => { + const usePageNotFound = () => { + res.write('404'); + res.statusCode = 404; + res.end(); + }; + const useMainRoute = () => { + req.url = '/html/main/index.html'; + serveMiddleware(req, res, usePageNotFound); + }; + serveMiddleware(req, res, useMainRoute); }); + httpServer.listen(port); + + const socketServer = new SocketServer({ server: httpServer, path: '/rpc' }); + const rpc = await setupClientConnection({ api, server: socketServer }); return { - prepare: hooks.prepare, - modifyFileSystemRoutes: hooks.modifyFileSystemRoutes, + prepare: rpc.hooks.prepare, + modifyFileSystemRoutes: rpc.hooks.modifyFileSystemRoutes, validateSchema() { return [ { - target: 'tools.devtools', - schema: { typeof: ['boolean'] }, + target: 'devtools', + schema: { typeof: ['boolean', 'object'] }, }, ]; }, + beforeRestart() { + return new Promise((resolve, reject) => + httpServer.close(err => (err ? reject(err) : resolve())), + ); + }, config() { + const opts = resolveOptions(api, options); + opts.def && rpc.setDefinition(opts.def); + + const mountOpts = { + dataSource: `/_modern_js/devtools/rpc`, + endpoint: `/_modern_js/devtools`, + __keep: true, + } as SetupClientOptions; + let runtimeEntry = require.resolve( + '@modern-js/plugin-devtools/runtime', + ); + runtimeEntry = withQuery(runtimeEntry, mountOpts); + return { - builderPlugins: [builderPlugin], + builderPlugins: [rpc.builderPlugin], source: { - preEntry: [require.resolve('@modern-js/plugin-devtools/runtime')], + preEntry: [runtimeEntry], globalVars: { - 'process.env.__MODERN_DEVTOOLS_MOUNT_OPTIONS': mountOpts as any, + 'process.env._MODERN_DEVTOOLS_LOGO_SRC': new ClientDefinition() + .assets.logo, }, }, tools: { devServer: { proxy: { - [opts.rpcPath!]: { - target: url.href, - autoRewrite: true, + '/_modern_js/devtools': { + target: `http://localhost:${port}`, + pathRewrite: { + '^/_modern_js/devtools': '', + }, ws: true, }, - }, + } as Record, }, }, }; diff --git a/packages/devtools/plugin/src/config.ts b/packages/devtools/plugin/src/config.ts new file mode 100644 index 000000000000..3381069df488 --- /dev/null +++ b/packages/devtools/plugin/src/config.ts @@ -0,0 +1,26 @@ +import { ClientDefinition } from '@modern-js/devtools-kit'; +import _ from '@modern-js/utils/lodash'; +import { PartialDeep } from 'type-fest'; +import { CliPluginAPI } from './types'; + +export interface Options { + // prefix?: string; + def?: PartialDeep; +} + +export const getDefaultOptions = () => + ({ + // prefix: '/_modern_js/devtools', + def: new ClientDefinition(), + } satisfies Options); + +export const resolveOptions = (api: CliPluginAPI, options: Options = {}) => { + const config = api.useConfigContext(); + const opts: Options & ReturnType = _.defaultsDeep( + {}, + options, + config.devtools, + getDefaultOptions(), + ); + return opts; +}; diff --git a/packages/devtools/plugin/src/index.ts b/packages/devtools/plugin/src/index.ts index 6167d0aba774..096d08320e1d 100644 --- a/packages/devtools/plugin/src/index.ts +++ b/packages/devtools/plugin/src/index.ts @@ -1,4 +1,2 @@ -import { devtoolsPlugin } from './cli'; - -export { devtoolsPlugin }; -export default devtoolsPlugin; +export { devtoolsPlugin, default } from './cli'; +export type { Options } from './cli'; diff --git a/packages/devtools/plugin/src/modern-app-env.d.ts b/packages/devtools/plugin/src/modern-app-env.d.ts index b3ff6795d0d3..76b628e390aa 100644 --- a/packages/devtools/plugin/src/modern-app-env.d.ts +++ b/packages/devtools/plugin/src/modern-app-env.d.ts @@ -1 +1,3 @@ /// + +declare let __resourceQuery: string; diff --git a/packages/devtools/plugin/src/rpc/index.ts b/packages/devtools/plugin/src/rpc/index.ts index a9c469f7fca1..ed4610042f21 100644 --- a/packages/devtools/plugin/src/rpc/index.ts +++ b/packages/devtools/plugin/src/rpc/index.ts @@ -1,4 +1,3 @@ -import { URL } from 'url'; import _ from '@modern-js/utils/lodash'; import { NameDefinition, @@ -16,7 +15,6 @@ import type { JsonValue, PartialDeep } from 'type-fest'; import { createBirpc, BirpcOptions } from 'birpc'; import createDeferPromise from 'p-defer'; import { RawData } from 'ws'; -import { getPort } from '@modern-js/utils'; import type { BuilderContext, BuilderPlugin } from '@modern-js/builder-shared'; import { CliPluginAPI, BuilderPluginAPI, InjectedHooks } from '../types'; import { SocketServer } from '../utils/socket'; @@ -24,18 +22,18 @@ import { requireModule } from '../utils/module'; export interface SetupClientConnectionOptions { api: CliPluginAPI; - def?: PartialDeep; + server: SocketServer; } export const setupClientConnection = async ( options: SetupClientConnectionOptions, ) => { - const { api, def = {} } = options; + const { api, server } = options; + let def: PartialDeep = {}; + const setDefinition = (definition: PartialDeep) => { + def = definition; + }; - // generate url. - const port = await getPort(8782); - const server = new SocketServer({ port }); - const url = new URL(`ws://localhost:${port}`); const _fileSystemRoutesMap: Record = {}; // register events. @@ -226,5 +224,5 @@ export const setupClientConnection = async ( }, }; - return { client: clientConn, hooks, builderPlugin, url }; + return { client: clientConn, hooks, builderPlugin, setDefinition }; }; diff --git a/packages/devtools/plugin/src/runtime.ts b/packages/devtools/plugin/src/runtime.ts index fb3ddaa3aa3e..dc90b79fa07c 100644 --- a/packages/devtools/plugin/src/runtime.ts +++ b/packages/devtools/plugin/src/runtime.ts @@ -1,6 +1,7 @@ import type { SetupClientOptions } from '@modern-js/devtools-kit'; import { mountDevTools } from '@modern-js/devtools-mount'; +import { parseQuery } from 'ufo'; -const opts = process.env.__MODERN_DEVTOOLS_MOUNT_OPTIONS; +const opts = parseQuery(__resourceQuery); -mountDevTools(opts as unknown as SetupClientOptions); +mountDevTools(opts as SetupClientOptions); diff --git a/packages/solutions/app-tools/src/config/legacy/index.ts b/packages/solutions/app-tools/src/config/legacy/index.ts index e723c758b9ab..e949272b3607 100644 --- a/packages/solutions/app-tools/src/config/legacy/index.ts +++ b/packages/solutions/app-tools/src/config/legacy/index.ts @@ -41,6 +41,7 @@ export function transformNormalizedConfig( server, cliOptions, testing, + devtools: {}, builderPlugins: [], plugins: plugins as any, security: {}, diff --git a/packages/solutions/app-tools/src/types/config/index.ts b/packages/solutions/app-tools/src/types/config/index.ts index 1b0fa5ae1816..70d01657835f 100644 --- a/packages/solutions/app-tools/src/types/config/index.ts +++ b/packages/solutions/app-tools/src/types/config/index.ts @@ -44,7 +44,7 @@ export interface RuntimeByEntriesUserConfig { [name: string]: RuntimeUserConfig; } -export type SharedUserConfig = { +export interface SharedUserConfig { server?: ServerUserConfig; source?: SharedSourceConfig; output?: SharedOutputConfig; @@ -64,7 +64,8 @@ export type SharedUserConfig = { testing?: TestingUserConfig; builderPlugins?: BuilderPlugin[]; performance?: SharedPerformanceConfig; -}; + devtools?: any; +} export interface AppToolsUserConfig extends SharedUserConfig { source?: SourceUserConfig; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6cfb4bb8ea4..218a7b10e333 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1538,19 +1538,40 @@ importers: version: 5.0.4 packages/devtools/client: - dependencies: + devDependencies: '@emotion/react': specifier: ^11.11.1 version: 11.11.1(@types/react@18.0.21)(react@18.2.0) '@emotion/styled': specifier: ^11.11.0 version: 11.11.0(@emotion/react@11.11.1)(@types/react@18.0.21)(react@18.2.0) + '@modern-js-app/eslint-config': + specifier: workspace:* + version: link:../../review/eslint-config-app + '@modern-js/app-tools': + specifier: workspace:* + version: link:../../solutions/app-tools + '@modern-js/builder-rspack-provider': + specifier: workspace:* + version: link:../../builder/builder-rspack-provider + '@modern-js/builder-shared': + specifier: workspace:* + version: link:../../builder/builder-shared '@modern-js/devtools-kit': specifier: workspace:* version: link:../kit + '@modern-js/eslint-config': + specifier: workspace:* + version: link:../../review/eslint-config + '@modern-js/plugin-proxy': + specifier: workspace:* + version: link:../../cli/plugin-proxy '@modern-js/runtime': specifier: workspace:* version: link:../../runtime/plugin-runtime + '@modern-js/tsconfig': + specifier: workspace:* + version: link:../../review/tsconfig '@modern-js/types': specifier: workspace:* version: link:../../toolkit/types @@ -1569,6 +1590,21 @@ importers: '@radix-ui/themes': specifier: ^1.1.2 version: 1.1.2(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0) + '@types/jest': + specifier: ~29.2.4 + version: 29.2.6 + '@types/lodash': + specifier: ^4.14.196 + version: 4.14.196 + '@types/node': + specifier: ~16.11.7 + version: 16.11.68 + '@types/react': + specifier: ^18 + version: 18.0.21 + '@types/react-dom': + specifier: ^18 + version: 18.0.6 birpc: specifier: 0.2.13 version: 0.2.13 @@ -1596,61 +1632,24 @@ importers: react-use: specifier: ^17.4.0 version: 17.4.0(react-dom@18.2.0)(react@18.2.0) - suspend-react: - specifier: ^0.1.3 - version: 0.1.3(react@18.2.0) - ufo: - specifier: ^1.2.0 - version: 1.3.0 - valtio: - specifier: ^1.11.1 - version: 1.11.2(@types/react@18.0.21)(react@18.2.0) - devDependencies: - '@modern-js-app/eslint-config': - specifier: workspace:* - version: link:../../review/eslint-config-app - '@modern-js/app-tools': - specifier: workspace:* - version: link:../../solutions/app-tools - '@modern-js/builder-rspack-provider': - specifier: workspace:* - version: link:../../builder/builder-rspack-provider - '@modern-js/builder-shared': - specifier: workspace:* - version: link:../../builder/builder-shared - '@modern-js/eslint-config': - specifier: workspace:* - version: link:../../review/eslint-config - '@modern-js/plugin-proxy': - specifier: workspace:* - version: link:../../cli/plugin-proxy - '@modern-js/tsconfig': - specifier: workspace:* - version: link:../../review/tsconfig - '@types/jest': - specifier: ~29.2.4 - version: 29.2.6 - '@types/lodash': - specifier: ^4.14.196 - version: 4.14.196 - '@types/node': - specifier: ~16.11.7 - version: 16.11.68 - '@types/react': - specifier: ^18 - version: 18.0.21 - '@types/react-dom': - specifier: ^18 - version: 18.0.6 rimraf: specifier: ~3.0.2 version: 3.0.2 + suspend-react: + specifier: ^0.1.3 + version: 0.1.3(react@18.2.0) type-fest: specifier: ^4.1.0 version: 4.1.0 typescript: specifier: ~5.0.4 version: 5.0.4 + ufo: + specifier: ^1.2.0 + version: 1.3.0 + valtio: + specifier: ^1.11.1 + version: 1.11.2(@types/react@18.0.21)(react@18.2.0) packages/devtools/kit: dependencies: @@ -1787,6 +1786,9 @@ importers: packages/devtools/plugin: dependencies: + '@modern-js/devtools-client': + specifier: workspace:* + version: link:../client '@modern-js/devtools-kit': specifier: workspace:* version: link:../kit @@ -1802,6 +1804,12 @@ importers: p-defer: specifier: ^3.0.0 version: 3.0.0 + serve-static: + specifier: ^1.14.1 + version: 1.15.0 + ufo: + specifier: ^1.3.0 + version: 1.3.0 ws: specifier: 8.13.0 version: 8.13.0 @@ -1842,6 +1850,9 @@ importers: '@types/node': specifier: ^14 version: 14.18.35 + '@types/serve-static': + specifier: ^1.13.10 + version: 1.13.10 '@types/ws': specifier: ^8.5.5 version: 8.5.5 @@ -11065,7 +11076,7 @@ packages: find-root: 1.1.0 source-map: 0.5.7 stylis: 4.2.0 - dev: false + dev: true /@emotion/cache@11.11.0: resolution: {integrity: sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==} @@ -11075,7 +11086,7 @@ packages: '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 stylis: 4.2.0 - dev: false + dev: true /@emotion/hash@0.8.0: resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==} @@ -11083,7 +11094,7 @@ packages: /@emotion/hash@0.9.1: resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} - dev: false + dev: true /@emotion/is-prop-valid@1.1.3: resolution: {integrity: sha512-RFg04p6C+1uO19uG8N+vqanzKqiM9eeV1LDOG3bmkYmuOj7NbKNlFC/4EZq5gnwAIlcC/jOT24f8Td0iax2SXA==} @@ -11094,14 +11105,14 @@ packages: resolution: {integrity: sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==} dependencies: '@emotion/memoize': 0.8.1 - dev: false + dev: true /@emotion/memoize@0.7.5: resolution: {integrity: sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==} /@emotion/memoize@0.8.1: resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} - dev: false + dev: true /@emotion/react@11.11.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} @@ -11122,7 +11133,7 @@ packages: '@types/react': 18.0.21 hoist-non-react-statics: 3.3.2 react: 18.2.0 - dev: false + dev: true /@emotion/serialize@1.1.2: resolution: {integrity: sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==} @@ -11132,11 +11143,11 @@ packages: '@emotion/unitless': 0.8.1 '@emotion/utils': 1.2.1 csstype: 3.1.2 - dev: false + dev: true /@emotion/sheet@1.2.2: resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} - dev: false + dev: true /@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==} @@ -11157,7 +11168,7 @@ packages: '@emotion/utils': 1.2.1 '@types/react': 18.0.21 react: 18.2.0 - dev: false + dev: true /@emotion/stylis@0.8.5: resolution: {integrity: sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==} @@ -11167,7 +11178,7 @@ packages: /@emotion/unitless@0.8.1: resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} - dev: false + dev: true /@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@18.2.0): resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} @@ -11175,15 +11186,15 @@ packages: react: '>=16.8.0' dependencies: react: 18.2.0 - dev: false + dev: true /@emotion/utils@1.2.1: resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} - dev: false + dev: true /@emotion/weak-memoize@0.3.1: resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} - dev: false + dev: true /@esbuild-kit/cjs-loader@2.4.2: resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} @@ -11430,12 +11441,14 @@ packages: resolution: {integrity: sha512-jk3WqquEJRlcyu7997NtR5PibI+y5bi+LS3hPmguVClypenMsCY3CBa3LAQnozRCtCrYWSEtAdiskpamuJRFOQ==} dependencies: '@floating-ui/utils': 0.1.2 + dev: true /@floating-ui/dom@1.5.2: resolution: {integrity: sha512-6ArmenS6qJEWmwzczWyhvrXRdI/rI78poBcW0h/456+onlabit+2G+QxHx5xTOX60NBJQXjsCLFbW2CmsXpUog==} dependencies: '@floating-ui/core': 1.4.1 '@floating-ui/utils': 0.1.2 + dev: true /@floating-ui/react-dom@2.0.2(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==} @@ -11446,9 +11459,11 @@ packages: '@floating-ui/dom': 1.5.2 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@floating-ui/utils@0.1.2: resolution: {integrity: sha512-ou3elfqG/hZsbmF4bxeJhPHIf3G2pm0ujc39hYEZrfVqt7Vk/Zji6CXc3W0pmYM8BW1g40U+akTl9DKZhFhInQ==} + dev: true /@formatjs/ecma402-abstract@1.4.0: resolution: {integrity: sha512-Mv027hcLFjE45K8UJ8PjRpdDGfR0aManEFj1KzoN8zXNveHGEygpZGfFf/FTTMl+QEVSrPAUlyxaCApvmv47AQ==} @@ -13031,16 +13046,19 @@ packages: /@radix-ui/colors@2.1.0: resolution: {integrity: sha512-gcBnxjS2u2c6thQz/9K1+Pt2ZYcm5WKU4SLi0emYkRmYbVUw+37rlc5wgLtYOsSsRP9nxVtbJJYj6WVO7UUmZg==} + dev: true /@radix-ui/number@1.0.1: resolution: {integrity: sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==} dependencies: '@babel/runtime': 7.22.15 + dev: true /@radix-ui/primitive@1.0.1: resolution: {integrity: sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==} dependencies: '@babel/runtime': 7.22.15 + dev: true /@radix-ui/react-accessible-icon@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-duVGKeWPSUILr/MdlPxV+GeULTc2rS1aihGdQ3N2qCUPMgxYLxvAsHJM3mCVLF8d5eK+ympmB22mb1F3a5biNw==} @@ -13061,6 +13079,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-alert-dialog@1.0.4(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-jbfBCRlKYlhbitueOAv7z74PXYeIQmWpKwm3jllsdkw7fGWNkxqP3v0nY9WmOzcPqpQuoorNtvViBgL46n5gVg==} @@ -13086,6 +13105,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-arrow@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==} @@ -13106,6 +13126,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-aspect-ratio@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-fXR5kbMan9oQqMuacfzlGG/SQMcmMlZ4wrvpckv8SgUulD0MMpspxJrxg/Gp/ISV3JfV1AeSWTYK9GvxA4ySwA==} @@ -13126,6 +13147,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-avatar@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-9ToF7YNex3Ste45LrAeTlKtONI9yVRt/zOS158iilIkW5K/Apeyb/TUQlcEFTEFvWr8Kzdi2ZYrm1/suiXPajQ==} @@ -13149,6 +13171,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-checkbox@1.0.4(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-CBuGQa52aAYnADZVt/KBQzXrwx6TqnlwtcIPGtVt5JkkzQwMOLJjPukimhfKEr4GQNd43C+djUh5Ikopj8pSLg==} @@ -13176,6 +13199,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-collapsible@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-UBmVDkmR6IvDsloHVN+3rtx4Mi5TFvylYXpluuv0f37dtaz3H99bp8No0LGXRigVpl3UAT4l9j6bIchh42S/Gg==} @@ -13203,7 +13227,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - dev: false + dev: true /@radix-ui/react-collection@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==} @@ -13227,6 +13251,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-compose-refs@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==} @@ -13240,6 +13265,7 @@ packages: '@babel/runtime': 7.22.15 '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-context-menu@2.1.4(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-HVHLUtZOBiR2Fh5l07qQ9y0IgX4dGZF0S9Gwdk4CVA+DL9afSphvFNa4nRiw6RNgb6quwLV4dLPF/gFDvNaOcQ==} @@ -13265,6 +13291,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-context@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==} @@ -13278,6 +13305,7 @@ packages: '@babel/runtime': 7.22.15 '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-dialog@1.0.4(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-hJtRy/jPULGQZceSAP2Re6/4NpKo8im6V8P2hUqZsdFiSL8l35kYsw3qbRI6Ay5mQd2+wlLqje770eq+RJ3yZg==} @@ -13311,6 +13339,7 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-remove-scroll: 2.5.5(@types/react@18.0.21)(react@18.2.0) + dev: true /@radix-ui/react-direction@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==} @@ -13324,6 +13353,7 @@ packages: '@babel/runtime': 7.22.15 '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-dismissable-layer@1.0.4(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-7UpBa/RKMoHJYjie1gkF1DlK8l1fdU/VKDpoS3rCCo8YBJR294GwcEHyxHw72yvphJ7ld0AXEcSLAzY2F/WyCg==} @@ -13348,6 +13378,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-dropdown-menu@2.0.5(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-xdOrZzOTocqqkCkYo8yRPCib5OkTkqN7lqNCdxwPOdE466DOaNl4N8PkUIlsXthQvW5Wwkd+aEmWpfWlBoDPEw==} @@ -13374,6 +13405,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-focus-guards@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==} @@ -13387,6 +13419,7 @@ packages: '@babel/runtime': 7.22.15 '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-focus-scope@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-upXdPfqI4islj2CslyfUBNlaJCPybbqRHAi1KER7Isel9Q2AtSJ0zRBZv8mWQiFXD2nyAJ4BhC3yXgZ6kMBSrQ==} @@ -13409,6 +13442,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-form@0.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-kgE+Z/haV6fxE5WqIXj05KkaXa3OkZASoTDy25yX2EIp/x0c54rOH/vFr5nOZTg7n7T1z8bSyXmiVIFP9bbhPQ==} @@ -13434,6 +13468,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-hover-card@1.0.6(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-2K3ToJuMk9wjwBOa+jdg2oPma+AmLdcEyTNsG/iC4BDVG3E0/mGCjbY8PEDSLxJcUi+nJi2QII+ec/4kWd88DA==} @@ -13462,6 +13497,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-icons@1.3.0(react@18.2.0): resolution: {integrity: sha512-jQxj/0LKgp+j9BiTXz3O3sgs26RNet2iLWmsPyRz2SIcR4q/4SbazXfnYwbAr+vLYKSfc7qxzyGQA1HLlYiuNw==} @@ -13469,7 +13505,7 @@ packages: react: ^16.x || ^17.x || ^18.x dependencies: react: 18.2.0 - dev: false + dev: true /@radix-ui/react-id@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==} @@ -13484,6 +13520,7 @@ packages: '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.0.21)(react@18.2.0) '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-label@2.0.2(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-N5ehvlM7qoTLx7nWPodsPYPgMzA5WM8zZChQg8nyFJKnDO5WHdba1vv5/H6IO5LtJMfD2Q3wh1qHFGNtK0w3bQ==} @@ -13504,6 +13541,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-menu@2.0.5(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-Gw4f9pwdH+w5w+49k0gLjN0PfRDHvxmAgG16AbyJZ7zhwZ6PBHKtWohvnSwfusfnK3L68dpBREHpVkj8wEM7ZA==} @@ -13541,6 +13579,7 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-remove-scroll: 2.5.5(@types/react@18.0.21)(react@18.2.0) + dev: true /@radix-ui/react-popover@1.0.6(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-cZ4defGpkZ0qTRtlIBzJLSzL6ht7ofhhW4i1+pkemjV1IKXm0wgCRnee154qlV6r9Ttunmh2TNZhMfV2bavUyA==} @@ -13575,6 +13614,7 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-remove-scroll: 2.5.5(@types/react@18.0.21)(react@18.2.0) + dev: true /@radix-ui/react-popper@1.1.2(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-1CnGGfFi/bbqtJZZ0P/NQY20xdG3E0LALJaLUEoKwPLwl6PPPfbeiCqMVQnhoFRAxjJj4RpBRJzDmUgsex2tSg==} @@ -13604,6 +13644,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-portal@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-xLYZeHrWoPmA5mEKEfZZevoVRK/Q43GfzRXkWV6qawIWWK8t6ifIiLQdd7rmQ4Vk1bmI21XhqF9BN3jWf+phpA==} @@ -13624,6 +13665,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-presence@1.0.1(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==} @@ -13645,6 +13687,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-primitive@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==} @@ -13665,6 +13708,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-radio-group@1.1.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-x+yELayyefNeKeTx4fjK6j99Fs6c4qKm3aY38G3swQVTN6xMpsrbigC0uHs2L//g8q4qR7qOcww8430jJmi2ag==} @@ -13694,6 +13738,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-roving-focus@1.0.4(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==} @@ -13722,6 +13767,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-scroll-area@1.0.4(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-OIClwBkwPG+FKvC4OMTRaa/3cfD069nkKFFL/TQzRzaO42Ce5ivKU9VMKgT7UU6UIkjcQqKBrDOIzWtPGw6e6w==} @@ -13750,6 +13796,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-select@1.2.2(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-zI7McXr8fNaSrUY9mZe4x/HC0jTLY9fWNhO1oLWYMQGDXuV4UCivIGTxwioSzO0ZCYX9iSLyWmAh/1TOmX3Cnw==} @@ -13790,6 +13837,7 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-remove-scroll: 2.5.5(@types/react@18.0.21)(react@18.2.0) + dev: true /@radix-ui/react-separator@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-itYmTy/kokS21aiV5+Z56MZB54KrhPgn6eHDKkFeOLR34HMN2s8PaN47qZZAGnvupcjxHaFZnW4pQEh0BvvVuw==} @@ -13810,6 +13858,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-slider@1.1.2(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-NKs15MJylfzVsCagVSWKhGGLNR1W9qWs+HtgbmjjVUB3B9+lb3PYoXxVju3kOrpf0VKyVCtZp+iTwVoqpa1Chw==} @@ -13840,6 +13889,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-slot@1.0.2(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} @@ -13854,6 +13904,7 @@ packages: '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.0.21)(react@18.2.0) '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-switch@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-mxm87F88HyHztsI7N+ZUmEoARGkC22YVW5CaC+Byc+HRpuvCrOBPTAnXgf+tZ/7i0Sg/eOePGdMhUKhPaQEqow==} @@ -13880,6 +13931,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-tabs@1.0.4(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-egZfYY/+wRNCflXNHx+dePvnz9FbmssDTJBtgRfDY7e8SE5oIo3Py2eCB1ckAbh1Q7cQ/6yJZThJ++sgbxibog==} @@ -13907,6 +13959,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-tooltip@1.0.6(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-DmNFOiwEc2UDigsYj6clJENma58OelxD24O4IODoZ+3sQc3Zb+L8w1EP+y9laTuKCLAysPw4fD6/v0j4KNV8rg==} @@ -13938,6 +13991,7 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/react-use-callback-ref@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==} @@ -13951,6 +14005,7 @@ packages: '@babel/runtime': 7.22.15 '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-use-controllable-state@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==} @@ -13965,6 +14020,7 @@ packages: '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.0.21)(react@18.2.0) '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-use-escape-keydown@1.0.3(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==} @@ -13979,6 +14035,7 @@ packages: '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.0.21)(react@18.2.0) '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-use-layout-effect@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==} @@ -13992,6 +14049,7 @@ packages: '@babel/runtime': 7.22.15 '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-use-previous@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-cV5La9DPwiQ7S0gf/0qiD6YgNqM5Fk97Kdrlc5yBcrF3jyEZQwm7vYFqMo4IfeHgJXsRaMvLABFtd0OVEmZhDw==} @@ -14005,6 +14063,7 @@ packages: '@babel/runtime': 7.22.15 '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-use-rect@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==} @@ -14019,6 +14078,7 @@ packages: '@radix-ui/rect': 1.0.1 '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-use-size@1.0.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g==} @@ -14033,6 +14093,7 @@ packages: '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.0.21)(react@18.2.0) '@types/react': 18.0.21 react: 18.2.0 + dev: true /@radix-ui/react-visually-hidden@1.0.3(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==} @@ -14053,11 +14114,13 @@ packages: '@types/react-dom': 18.0.6 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@radix-ui/rect@1.0.1: resolution: {integrity: sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==} dependencies: '@babel/runtime': 7.22.15 + dev: true /@radix-ui/themes@1.1.2(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-VnNeanSxHQurSgwQe5Z3zNZP5SrwhRY+RW97FPZe7TOJGpa+rpDHLDR9vourSsEGxsgrtTXHJaoII1pyIXDi8A==} @@ -14102,6 +14165,7 @@ packages: classnames: 2.3.2 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + dev: true /@rc-component/context@1.3.0(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-6QdaCJ7Wn5UZLJs15IEfqy4Ru3OaL5ctqpQYWd5rlfV9wwzrzdt6+kgAQZV/qdB0MUPN4nhyBfRembQCIvBf+w==} @@ -16516,7 +16580,7 @@ packages: /@types/base16@1.0.2: resolution: {integrity: sha512-oYO/U4VD1DavwrKuCSQWdLG+5K22SLPem2OQaHmFcQuwHoVeGC+JGVRji2MUqZUAIQZHEonOeVfAX09hYiLsdg==} - dev: false + dev: true /@types/body-parser@1.19.2: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} @@ -16829,6 +16893,7 @@ packages: /@types/js-cookie@2.2.7: resolution: {integrity: sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA==} + dev: true /@types/js-yaml@4.0.5: resolution: {integrity: sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==} @@ -17749,7 +17814,7 @@ packages: lru-cache: 4.1.5 merge-source-map: 1.1.0 postcss: 7.0.39 - postcss-selector-parser: 6.0.13 + postcss-selector-parser: 6.0.11 source-map: 0.6.1 vue-template-es2015-compiler: 1.9.1 optionalDependencies: @@ -18110,6 +18175,7 @@ packages: /@xobotyi/scrollbar-width@1.9.5: resolution: {integrity: sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ==} + dev: true /@xtuc/ieee754@1.2.0: resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -18591,6 +18657,7 @@ packages: engines: {node: '>=10'} dependencies: tslib: 2.3.1 + dev: true /aria-query@5.0.0: resolution: {integrity: sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==} @@ -19027,7 +19094,6 @@ packages: '@babel/runtime': 7.22.15 cosmiconfig: 7.0.1 resolve: 1.22.4 - dev: false /babel-plugin-named-exports-order@0.0.2: resolution: {integrity: sha512-OgOYHOLoRK+/mvXU9imKHlG6GkPLYrUCvFXG/CM93R/aNNO8pOOF4aS+S8CCHMDQoNSeiOYEZb/G6RwL95Jktw==} @@ -19180,7 +19246,7 @@ packages: /base16@1.0.0: resolution: {integrity: sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ==} - dev: false + dev: true /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -19258,7 +19324,6 @@ packages: /birpc@0.2.13: resolution: {integrity: sha512-30rz9OBSJoGfiWox7dpyqoSVo6664PBEYSTfmmG1GBridUxnMysyovNpnwhaPMvjtKn3Y1UfII+HMTU0kqJFjA==} - dev: false /bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} @@ -20831,6 +20896,7 @@ packages: node-fetch: 2.6.7 transitivePeerDependencies: - encoding + dev: true /cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} @@ -20904,6 +20970,7 @@ packages: resolution: {integrity: sha512-fJAcud6B3rRu+KHYk+Bwf+WFL2MDCJJ1XG9x137tJQ0xYxor7XziQtuGFbWNdqrvF4Tk26O3H73nfVqXt/fW1A==} dependencies: hyphenate-style-name: 1.0.4 + dev: true /css-loader@3.6.0(webpack@4.46.0): resolution: {integrity: sha512-M5lSukoWi1If8dhQAUCvj4H8vUt3vOnwbQBH9DdTm/s4Ym2B/3dPMtYZeJmq7Q3S3Pa+I94DcZ7pc9bP14cWIQ==} @@ -21029,6 +21096,7 @@ packages: dependencies: mdn-data: 2.0.14 source-map: 0.6.1 + dev: true /css-tree@2.2.1: resolution: {integrity: sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==} @@ -22849,12 +22917,14 @@ packages: /fast-loops@1.1.3: resolution: {integrity: sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g==} + dev: true /fast-safe-stringify@2.1.1: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} /fast-shallow-equal@1.0.0: resolution: {integrity: sha512-HPtaa38cPgWvaCFmRNhlc6NG7pv6NUHqjPgVAkWGoB9mQMwYB27/K0CvOM5Czy+qpT3e8XJ6Q4aPAnzpNpzNaw==} + dev: true /fastest-levenshtein@1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} @@ -22862,6 +22932,7 @@ packages: /fastest-stable-stringify@2.0.2: resolution: {integrity: sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q==} + dev: true /fastestsmallesttextencoderdecoder@1.0.22: resolution: {integrity: sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==} @@ -22888,11 +22959,11 @@ packages: fbjs: 3.0.5 transitivePeerDependencies: - encoding - dev: false + dev: true /fbjs-css-vars@1.0.2: resolution: {integrity: sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==} - dev: false + dev: true /fbjs@3.0.5: resolution: {integrity: sha512-ztsSx77JBtkuMrEypfhgc3cI0+0h+svqeie7xHbh1k/IKdcydnvadp/mUaGgjAOXQmQSxsqgaRhS3q9fy+1kxg==} @@ -22906,7 +22977,7 @@ packages: ua-parser-js: 1.0.36 transitivePeerDependencies: - encoding - dev: false + dev: true /fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} @@ -23110,7 +23181,7 @@ packages: /find-root@1.1.0: resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} - dev: false + dev: true /find-up@1.1.2: resolution: {integrity: sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==} @@ -23208,7 +23279,7 @@ packages: react: 18.2.0 transitivePeerDependencies: - encoding - dev: false + dev: true /focus-lock@0.11.2: resolution: {integrity: sha512-pZ2bO++NWLHhiKkgP1bEXHhR1/OjVcSvlCJ98aNJDFeb7H5OOQaO+SKOZle6041O9rv2tmbrO4JzClAvDUHf0g==} @@ -23640,6 +23711,7 @@ packages: /get-nonce@1.0.1: resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} engines: {node: '>=6'} + dev: true /get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} @@ -24569,6 +24641,7 @@ packages: /hyphenate-style-name@1.0.4: resolution: {integrity: sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==} + dev: true /iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} @@ -24716,6 +24789,7 @@ packages: dependencies: css-in-js-utils: 3.1.0 fast-loops: 1.1.3 + dev: true /inquirer@8.1.3: resolution: {integrity: sha512-Ga5u7VbdPgTSUAy3bdOGlJqO/qpKGyYcbCmwu8KEXMXG8J/B3b4vTgeMc8+ALuvb9nejZu/LIag0bhSejzJnPQ==} @@ -26149,6 +26223,7 @@ packages: /js-cookie@2.2.1: resolution: {integrity: sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==} + dev: true /js-md5@0.7.3: resolution: {integrity: sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==} @@ -26698,7 +26773,7 @@ packages: /lodash.curry@4.1.1: resolution: {integrity: sha512-/u14pXGviLaweY5JI0IUzgzF2J6Ne8INyzAZjImcryjgkZ+ebruBxy2/JaOOkTqScddcYtakjhSaeemV8lR0tA==} - dev: false + dev: true /lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} @@ -26717,7 +26792,7 @@ packages: /lodash.flow@3.5.0: resolution: {integrity: sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw==} - dev: false + dev: true /lodash.get@4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} @@ -27187,6 +27262,7 @@ packages: /mdn-data@2.0.14: resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} + dev: true /mdn-data@2.0.28: resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} @@ -28080,6 +28156,7 @@ packages: sourcemap-codec: 1.4.8 stacktrace-js: 2.0.2 stylis: 4.1.3 + dev: true /nanoid@3.1.25: resolution: {integrity: sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==} @@ -28647,7 +28724,6 @@ packages: /p-defer@3.0.0: resolution: {integrity: sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw==} engines: {node: '>=8'} - dev: false /p-event@4.2.0: resolution: {integrity: sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==} @@ -30027,6 +30103,7 @@ packages: resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==} dependencies: asap: 2.0.6 + dev: true /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} @@ -30065,7 +30142,7 @@ packages: /proxy-compare@2.5.1: resolution: {integrity: sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA==} - dev: false + dev: true /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} @@ -30263,7 +30340,7 @@ packages: /pure-color@1.3.0: resolution: {integrity: sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA==} - dev: false + dev: true /pure-rand@6.0.1: resolution: {integrity: sha512-t+x1zEHDjBwkDGY5v5ApnZ/utcd4XYDiJsaQQoptTXgUXX95sDg1elCdJghzicm7n2mbCBJ3uYWr6M22SO19rg==} @@ -31277,7 +31354,7 @@ packages: lodash.curry: 4.1.1 lodash.flow: 3.5.0 pure-color: 1.3.0 - dev: false + dev: true /react-base16-styling@0.9.1: resolution: {integrity: sha512-1s0CY1zRBOQ5M3T61wetEpvQmsYSNtWEcdYzyZNxKa8t7oDvaOn9d21xrGezGAHFWLM7SHcktPuPTrvoqxSfKw==} @@ -31289,7 +31366,7 @@ packages: color: 3.2.1 csstype: 3.1.2 lodash.curry: 4.1.1 - dev: false + dev: true /react-clientside-effect@1.2.6(react@18.2.0): resolution: {integrity: sha512-XGGGRQAKY+q25Lz9a/4EPqom7WRjz3z9R2k4jhVKA/puQFH/5Nt27vFZYql4m4NVNdUvX8PS3O7r/Zzm7cjUlg==} @@ -31452,7 +31529,7 @@ packages: '@types/react': 18.0.21 react: 18.2.0 react-base16-styling: 0.9.1 - dev: false + dev: true /react-json-view@1.21.3(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-13p8IREj9/x/Ye4WI/JpjhoIwuzEgUAtgJZNBJckfzJt1qyh24BdTm6UQNGnyTq9dapQdrqvquZTo3dz1X6Cjw==} @@ -31469,7 +31546,7 @@ packages: transitivePeerDependencies: - '@types/react' - encoding - dev: false + dev: true /react-lazy-with-preload@2.2.1: resolution: {integrity: sha512-ONSb8gizLE5jFpdHAclZ6EAAKuFX2JydnFXPPPjoUImZlLjGtKzyBS8SJgJq7CpLgsGKh9QCZdugJyEEOVC16Q==} @@ -31477,7 +31554,7 @@ packages: /react-lifecycles-compat@3.0.4: resolution: {integrity: sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==} - dev: false + dev: true /react-loadable@5.5.0(react@18.2.0): resolution: {integrity: sha512-C8Aui0ZpMd4KokxRdVAm2bQtI03k2RMRNzOB+IipV3yxFTSVICv7WoUr5L9ALB5BmKO1iHgZtWM8EvYG83otdg==} @@ -31512,6 +31589,7 @@ packages: react: 18.2.0 react-style-singleton: 2.2.1(@types/react@18.0.21)(react@18.2.0) tslib: 2.3.1 + dev: true /react-remove-scroll@2.5.5(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==} @@ -31530,6 +31608,7 @@ packages: tslib: 2.3.1 use-callback-ref: 1.3.0(@types/react@18.0.21)(react@18.2.0) use-sidecar: 1.1.2(@types/react@18.0.21)(react@18.2.0) + dev: true /react-router-dom@5.3.4(react@18.2.0): resolution: {integrity: sha512-m4EqFMHv/Ih4kpcBCONHbkT68KoAeHN4p3lAGoNryfHi0dMy0kCzEZakiKRsvg5wHZ/JLrLW8o8KomWiz/qbYQ==} @@ -31628,6 +31707,7 @@ packages: invariant: 2.2.4 react: 18.2.0 tslib: 2.3.1 + dev: true /react-syntax-highlighter@15.5.0(react@18.2.0): resolution: {integrity: sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==} @@ -31653,7 +31733,7 @@ packages: use-latest: 1.2.1(@types/react@18.0.21)(react@18.2.0) transitivePeerDependencies: - '@types/react' - dev: false + dev: true /react-transition-group@4.4.5(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} @@ -31676,6 +31756,7 @@ packages: dependencies: react: 18.2.0 tslib: 2.3.1 + dev: true /react-use@17.4.0(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-TgbNTCA33Wl7xzIJegn1HndB4qTS9u03QUwyNycUnXaweZkE4Kq2SB+Yoxx8qbshkZGYBDvUXbXWRUmQDcZZ/Q==} @@ -31699,6 +31780,7 @@ packages: throttle-debounce: 3.0.1 ts-easing: 0.2.0 tslib: 2.3.1 + dev: true /react@17.0.2: resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} @@ -32415,6 +32497,7 @@ packages: resolution: {integrity: sha512-lRQgou1mu19e+Ya0LsTvKrVJ5TYUbqCVPAiImX3UfLTenarvPUl1QFdvu5Z3PYmHT9RCcwIfbjRQBntExyj3Zg==} dependencies: '@babel/runtime': 7.22.15 + dev: true /run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} @@ -32606,6 +32689,7 @@ packages: /screenfull@5.2.0: resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==} engines: {node: '>=0.10.0'} + dev: true /scroll-into-view-if-needed@2.2.20: resolution: {integrity: sha512-P9kYMrhi9f6dvWwTGpO5I3HgjSU/8Mts7xL3lkoH5xlewK7O9Obdc5WmMCzppln7bCVGNmf3qfoZXrpCeyNJXw==} @@ -32739,6 +32823,7 @@ packages: /set-harmonic-interval@1.0.1: resolution: {integrity: sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g==} engines: {node: '>=6.9'} + dev: true /set-value@2.0.1: resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} @@ -32751,7 +32836,6 @@ packages: /setimmediate@1.0.5: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} - dev: false /setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} @@ -32991,6 +33075,7 @@ packages: /source-map@0.5.6: resolution: {integrity: sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==} engines: {node: '>=0.10.0'} + dev: true /source-map@0.5.7: resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} @@ -33007,6 +33092,7 @@ packages: /sourcemap-codec@1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} deprecated: Please use @jridgewell/sourcemap-codec instead + dev: true /space-separated-tokens@1.1.5: resolution: {integrity: sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==} @@ -33099,6 +33185,7 @@ packages: resolution: {integrity: sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ==} dependencies: stackframe: 1.3.4 + dev: true /stack-trace@1.0.0-pre1: resolution: {integrity: sha512-biM7OwS3J2hcou7tfozHcsqhJZxX5pqMMqe/Zr6stw9uVn8Gh7ct3eFR9Gb66BBi/ToSeOgk4FsjKgZVrDIyew==} @@ -33123,6 +33210,7 @@ packages: dependencies: source-map: 0.5.6 stackframe: 1.3.4 + dev: true /stacktrace-js@2.0.2: resolution: {integrity: sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg==} @@ -33130,6 +33218,7 @@ packages: error-stack-parser: 2.1.4 stack-generator: 2.0.10 stacktrace-gps: 3.1.2 + dev: true /starting@8.0.1: resolution: {integrity: sha512-lw4aX8PLHgIX1zu+JvZCHCNTK0urWveE3nbMzFhul5fDRvLg8ESKK3kDmnPyu6QX3ivXPpj+0ySxdOf+IGT0Mg==} @@ -33551,7 +33640,7 @@ packages: /stylis@4.2.0: resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} - dev: false + dev: true /stylus-loader@7.1.0(stylus@0.59.0)(webpack@5.88.1): resolution: {integrity: sha512-gNUEjjozR+oZ8cuC/Fx4LVXqZOgDKvpW9t2hpXHcxjfPYqSjQftaGwZUK+wL9B0QJ26uS6p1EmoWHmvld1dF7g==} @@ -33696,7 +33785,7 @@ packages: react: '>=17.0' dependencies: react: 18.2.0 - dev: false + dev: true /svg-parser@2.0.4: resolution: {integrity: sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==} @@ -34054,6 +34143,7 @@ packages: /throttle-debounce@3.0.1: resolution: {integrity: sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==} engines: {node: '>=10'} + dev: true /throttle-debounce@5.0.0: resolution: {integrity: sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg==} @@ -34268,6 +34358,7 @@ packages: /ts-easing@0.2.0: resolution: {integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==} + dev: true /ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} @@ -34739,7 +34830,7 @@ packages: /ua-parser-js@1.0.36: resolution: {integrity: sha512-znuyCIXzl8ciS3+y3fHJI/2OhQIXbXw9MWC/o3qwyR+RGppjZHrM27CGFSKCJXi2Kctiz537iOu2KnXs1lMQhw==} - dev: false + dev: true /ufo@1.3.0: resolution: {integrity: sha512-bRn3CsoojyNStCZe0BG0Mt4Nr/4KF+rhFlnNXybgqt5pXHNFRlqinSoQaTrGyzE4X8aHplSb+TorH+COin9Yxw==} @@ -35120,7 +35211,7 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: react: 18.2.0 - dev: false + dev: true /use-isomorphic-layout-effect@1.1.2(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} @@ -35133,7 +35224,7 @@ packages: dependencies: '@types/react': 18.0.21 react: 18.2.0 - dev: false + dev: true /use-latest@1.2.1(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==} @@ -35147,7 +35238,7 @@ packages: '@types/react': 18.0.21 react: 18.2.0 use-isomorphic-layout-effect: 1.1.2(@types/react@18.0.21)(react@18.2.0) - dev: false + dev: true /use-sidecar@1.1.2(@types/react@18.0.21)(react@18.2.0): resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} @@ -35170,7 +35261,7 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: react: 18.2.0 - dev: false + dev: true /use@3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} @@ -35300,7 +35391,7 @@ packages: proxy-compare: 2.5.1 react: 18.2.0 use-sync-external-store: 1.2.0(react@18.2.0) - dev: false + dev: true /value-equal@1.0.1: resolution: {integrity: sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==} diff --git a/tests/integration/devtools/modern.config.ts b/tests/integration/devtools/modern.config.ts index f500db0c05bc..9fad1c9e8c12 100644 --- a/tests/integration/devtools/modern.config.ts +++ b/tests/integration/devtools/modern.config.ts @@ -1,12 +1,20 @@ import { devtoolsPlugin } from '@modern-js/plugin-devtools'; -import { applyBaseConfig } from '../../utils/applyBaseConfig'; +import { defineConfig, appTools } from '@modern-js/app-tools'; -export default applyBaseConfig({ +export default defineConfig({ runtime: { router: true, }, + output: { + // disable polyfill and ts checker to make test faster + polyfill: 'off', + disableTsChecker: true, + }, performance: { buildCache: false, }, - plugins: [devtoolsPlugin()], + tools: { + devServer: {}, + }, + plugins: [appTools(), devtoolsPlugin()], }); From 62d2c7ebea6cb6d2862823b18bb44832a949cd6a Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 21 Sep 2023 14:31:25 +0800 Subject: [PATCH 25/26] docs: re-write the guide of custom entires (#4703) --- .../docs/en/configure/app/source/entries.mdx | 13 ++-- .../docs/en/guides/concept/entries.mdx | 61 ++++++++--------- .../docs/zh/configure/app/source/entries.mdx | 13 ++-- .../docs/zh/guides/concept/entries.mdx | 66 ++++++++++--------- 4 files changed, 79 insertions(+), 74 deletions(-) diff --git a/packages/document/main-doc/docs/en/configure/app/source/entries.mdx b/packages/document/main-doc/docs/en/configure/app/source/entries.mdx index eec45a6cbf7c..43a7da09650c 100644 --- a/packages/document/main-doc/docs/en/configure/app/source/entries.mdx +++ b/packages/document/main-doc/docs/en/configure/app/source/entries.mdx @@ -39,8 +39,8 @@ import { defineConfig } from '@modern-js/app-tools'; export default defineConfig({ source: { entries: { - // Specify a new entry named entry_customize - entry_customize: './src/home/test/index.ts', + // Specify a new entry named 'my-entry' + 'my-entry': './src/home/test/index.ts', }, disableDefaultEntries: true, }, @@ -90,9 +90,10 @@ import { defineConfig } from '@modern-js/app-tools'; export default defineConfig({ source: { entries: { - entry_customize: { + 'my-entry': { // entry file path - entry: './src/home/test/App.tsx', + entry: './src/my-page/index.tsx', + disableMount: true, }, }, // Disable default entry scanning @@ -111,8 +112,8 @@ If you want to disable the logic of Modern.js automatically generating entry fil export default defineConfig({ source: { entries: { - entry_customize: { - entry: './src/home/test/index.tsx', + 'my-entry': { + entry: './src/my-page/index.tsx', disableMount: true, }, }, diff --git a/packages/document/main-doc/docs/en/guides/concept/entries.mdx b/packages/document/main-doc/docs/en/guides/concept/entries.mdx index 7c9970c0f07e..d5bf02c55762 100644 --- a/packages/document/main-doc/docs/en/guides/concept/entries.mdx +++ b/packages/document/main-doc/docs/en/guides/concept/entries.mdx @@ -32,7 +32,7 @@ The project initialized by Modern.js is a single entry (SPA) project, with the f In a Modern.js project, you can easily switch from single entry to multiple entries by running `pnpm run new` in the project directory and creating an entry: -```bash +```text ? Please select the operation you want: Create Element ? Please select the type of element to create: New "entry" ? Please fill in the entry name: new-entry @@ -56,7 +56,7 @@ After running the command, Modern.js will automatically generate a new entry dir The original entry code has been moved to a directory with the same name as the `name` field in `package.json`, and a `new-entry` entry directory has been created. -After running `pnpm run dev`, you can see a new route named `/new-entry` has been added, and the migrated code route has not changed. +You can run `pnpm run dev` to start the development server. At this point, you will see a new route named `/new-entry` added, and the existing page routes remain unchanged. :::tip Modern.js will use the entry with the same name as the `name` field in `package.json` as the main entry. The route of the main entry is `/`, and the route of other entries is `/{entryName}`. @@ -76,7 +76,9 @@ import EntryMode from '@site-docs-en/components/entry-mode.mdx'; By default, Modern.js scans the files under `src/` before starting the project, identifies the entry, and generates the corresponding server-side route. :::tip -You can modify the directory for entry identification by using the [source.entriesDir](/configure/app/source/entries-dir) config. + +- You can custom the recognition directory for page entries by using [source.entriesDir](/configure/app/source/entries-dir). +- If you need to customize the entry points, please refer to [Custom Entries](#custom-entries). ::: @@ -98,7 +100,7 @@ When the project is not a single entry application, Modern.js will further look ### Framework Mode Entry -Framework mode refers to the need to use Modern.js framework capabilities, such as Router, SSR, integrated calls, etc. Under this type of entry convention, the entry defined by the developer is not a real webpack compilation entry. Modern.js will generate a wrapped entry during startup, and you can find the real entry in `node_modules/.modern/{entryName}/index.js`. +The framework mode refers to the need to use the framework capabilities of Modern.js, such as nested routing, SSR, and integrated BFF, etc. Under this kind of entry convention, the entry defined by the developer is not the actual compilation entry. When Modern.js is launched, it generates a wrapped entry, and the real entry can be found at `node_modules/.modern/[entryName]/index.js`. #### Conventional Routing @@ -146,7 +148,7 @@ export default (App: React.ComponentType, bootstrap: () => void) => { // do something before bootstrap... initSomething().then(() => { bootstrap(); - }) + }); }; ``` @@ -181,9 +183,11 @@ export default AppWrapper; ### Build Mode Entry -Build mode refers to not using any Modern.js runtime capabilities and completely defining the project's webpack entry by the developer. +Build mode refers to the mode where the entry point of the page is not automatically generated by Modern.js, but is fully defined by the developers themselves. + +When there is an `index.[jt]sx` file in the entry directory and it is not exported as a function using `export default`, this type of file will be recognized as the entry module for webpack or Rspack. -If there is an `index.[jt]sx` file in the entry and it does not export a default function, then this file is the real webpack entry file. Similar to [Create React App](https://github.com/facebook/create-react-app), you need to mount the component to the DOM node by yourself, add hot update code, etc. For example: +In this case, Modern.js will not generate the entry code automatically. Therefore, you need to manually mount the component to the DOM node, for example: ```js title=src/index.jsx import React from 'react'; @@ -193,42 +197,39 @@ import App from './App'; ReactDOM.render(, document.getElementById('root')); ``` -Modern.js **does not recommend** using this method for new projects, as it loses some of the framework's capabilities, such as the `runtime` configuration in the `modern.config.js` file will no longer take effect. However, this method can be very useful when migrating projects from other frameworks to Modern.js, such as CRA, or manually building webpack. +This approach is equivalent to enabling the [source.entries.disableMount](/configure/app/source/entries) option in Modern.js. When you use this approach, **you will not be able to use the runtime capabilities of the Modern.js framework**, such as the `runtime` configuration in the modern.config.js file will no longer take effect. -## Specifying Entry Using Configuration +## Custom Entries -Most existing projects are not built according to the directory structure of Modern.js. If you want to change to the directory structure of Modern.js, there will be certain migration costs. +In some cases, you may need to customize the entry configuration instead of using the entry conventions provided by Modern.js. -In this case, in addition to using file conventions to generate entries, you can manually configure the entry in `modern.config.[jt]s`. +For example, if you want to migrate a non-Modern.js project to Modern.js and it is not structured according to Modern.js directory structure, there might be some migration costs involved in changing it to the conventional structure. In such cases, you can custom the entries. -```ts title="modern.config.ts" -export default defineConfig({ - source: { - entries: { - // Specify a new entry named entry_customize - entry_customize: './src/home/test/index.ts', - }, - // Disable default ingress scanning - disableDefaultEntries: true, - }, -}); -``` +Modern.js provides the following configuration options that you can set in [modern.config.ts](/configure/app/usage): -### Disable Default Entry Scanning +- [source.entries](/configure/app/source/entries): Used to set custom entry objects. +- [source.disableDefaultEntries](/configure/app/source/disable-default-entries): Used to disable Modern.js's default entry scanning behavior. When you use custom entries, parts of your project structure might coincidentally match the Modern.js conventional directory structure, but you may not want Modern.js to generate entry configurations for them. Enabling this option can help avoid this issue. -When using custom entries, part of the project structure may coincidentally hit the directory conventions of Modern.js, but in fact, this part of the directory is not the real entry. +### Example -Modern.js provides the `disableDefaultEntries` configuration to disable the default entry scanning rules. When you need to customize the entry, you generally need to use `disableDefaultEntries` in combination with `entries`. This way, some existing projects can be quickly migrated without modifying the directory structure. +Here is an example of a custom entry point. You can also refer to the documentation of the corresponding configuration options for more usage. ```ts title="modern.config.ts" export default defineConfig({ source: { + entries: { + // Specify an entry named 'my-entry' + 'my-entry': { + // Path to the entry module + entry: './src/my-page/index.tsx', + // Disable automatic generation of entry code by Modern.js + disableMount: true, + }, + }, + // Disable entry scanning behavior disableDefaultEntries: true, }, }); ``` -:::tip -For detailed usage, please refer to [source.entries](/configure/app/source/entries) and [source.disableDefaultEntries](/configure/app/source/disable-default-entries). - -::: +Note that when you enable `disableMount`, **you won't be able to use the runtime capabilities of the Modern.js framework**, such as the `runtime` configuration in the modern.config.ts file. diff --git a/packages/document/main-doc/docs/zh/configure/app/source/entries.mdx b/packages/document/main-doc/docs/zh/configure/app/source/entries.mdx index b0d215479ae0..831501f9a870 100644 --- a/packages/document/main-doc/docs/zh/configure/app/source/entries.mdx +++ b/packages/document/main-doc/docs/zh/configure/app/source/entries.mdx @@ -39,8 +39,8 @@ import { defineConfig } from '@modern-js/app-tools'; export default defineConfig({ source: { entries: { - // 指定一个名称为 entry_customize 的新入口 - entry_customize: './src/home/test/index.ts', + // 指定一个名称为 'my-entry' 的新入口 + 'my-entry': './src/home/test/index.ts', }, // 禁用默认入口扫描 disableDefaultEntries: true, @@ -92,9 +92,10 @@ import { defineConfig } from '@modern-js/app-tools'; export default defineConfig({ source: { entries: { - entry_customize: { + 'my-entry': { // 入口文件路径 - entry: './src/home/test/index.tsx', + entry: './src/my-page/index.tsx', + disableMount: true, }, }, // 禁用默认入口扫描 @@ -113,8 +114,8 @@ export default defineConfig({ export default defineConfig({ source: { entries: { - entry_customize: { - entry: './src/home/test/index.tsx', + 'my-entry': { + entry: './src/my-page/index.tsx', disableMount: true, }, }, diff --git a/packages/document/main-doc/docs/zh/guides/concept/entries.mdx b/packages/document/main-doc/docs/zh/guides/concept/entries.mdx index aa855fa4c316..f60ae6c5ea98 100644 --- a/packages/document/main-doc/docs/zh/guides/concept/entries.mdx +++ b/packages/document/main-doc/docs/zh/guides/concept/entries.mdx @@ -6,9 +6,9 @@ sidebar_position: 1 通过本章节,你可以了解到 Modern.js 中的入口约定,以及如何自定义入口。 -## 什么是入口(Entry) +## 什么是入口 -**入口指的是一个页面的起始模块。** +**入口(Entry)指的是一个页面的起始模块。** 在 Modern.js 项目中,每一个入口对应一个独立的页面,也对应一条服务端路由。默认情况下,Modern.js 会基于目录约定来自动确定页面的入口,同时也支持通过配置项来自定义入口。 @@ -56,7 +56,7 @@ Modern.js 初始化的项目是单入口的(SPA),项目结构如下: 原本的入口代码被移动到了和 `package.json` 中 `name` 同名的目录下,并创建了 `new-entry` 入口目录。 -执行 `pnpm run dev` 后,可以看到新增了一条名为 `/new-entry` 的路由,并且被迁移的代码路由并未发生变化。 +你可以执行 `pnpm run dev` 启动开发服务,此时可以看到新增了一条名为 `/new-entry` 的路由,并且原有页面的路由并未发生变化。 :::tip Modern.js 会将与 `package.json` 文件中 `name` 字段同名的入口作为主入口,主入口的路由为 `/`,其他入口的路由为 `/{entryName}`。 @@ -76,7 +76,8 @@ import EntryMode from '@site-docs/components/entry-mode.mdx'; 默认情况下,Modern.js 启动项目前会对 `src/` 下的文件进行扫描,识别入口,并生成对应的服务端路由。 :::tip -可以通过 [source.entriesDir](/configure/app/source/entries-dir) 修改页面的入口识别目录。 +- 你可以通过 [source.entriesDir](/configure/app/source/entries-dir) 修改页面入口的识别目录。 +- 如果你需要自定义入口,请参考 [自定义入口](#自定义入口)。 ::: @@ -98,7 +99,7 @@ import EntryMode from '@site-docs/components/entry-mode.mdx'; ### 框架模式入口 -框架模式指需要使用 Modern.js 框架能力,例如 Router、SSR、一体化调用等。这类入口约定下,开发者定义的入口并不是真正的 webpack 编译入口。Modern.js 在启动时会生成一个封装过的入口,可以在 `node_modules/.modern/{entryName}/index.js` 找到真正的入口。 +框架模式指的是需要使用 Modern.js 的框架能力,例如嵌套路由、SSR、一体化调用等。这类入口约定下,开发者定义的入口并不是真正的编译入口。Modern.js 在启动时会生成一个封装过的入口,可以在 `node_modules/.modern/[entryName]/index.js` 找到真正的入口。 #### 约定式路由 @@ -146,7 +147,7 @@ export default (App: React.ComponentType, bootstrap: () => void) => { // do something before bootstrap... initSomething().then(() => { bootstrap(); - }) + }); }; ``` @@ -170,7 +171,9 @@ function render() { // runtime 的插件参数... })(App); if (IS_BROWSER) { - customBootstrap(AppWrapper, () => bootstrap(AppWrapper, MOUNT_ID, root, ReactDOM)); + customBootstrap(AppWrapper, () => + bootstrap(AppWrapper, MOUNT_ID, root, ReactDOM), + ); } return AppWrapper; } @@ -182,9 +185,11 @@ export default AppWrapper; ### 构建模式入口 -构建模式是指不使用任何 Modern.js 运行时的能力,完全由开发者自己定义项目 webpack 的入口。 +构建模式指的是不使用 Modern.js 自动生成的入口,而是完全由开发者自行定义页面的入口。 -如果入口中存在 `index.[jt]sx` ,并且没有默认导出函数时,这时候该文件就是真正的 webpack 入口文件。这里和 [Create React App](https://github.com/facebook/create-react-app) 类似,需要自己将组件挂载到 DOM 节点、添加热更新代码等。例如: +当入口目录中存在 `index.[jt]sx`,并且没有通过 `export default` 导出函数时,这类文件就会被识别为 webpack 或 Rspack 的 entry 模块。 + +此时 Modern.js 不会自动生成入口代码,因此需要你自行将组件挂载到 DOM 节点上,例如: ```js title=src/index.jsx import React from 'react'; @@ -194,42 +199,39 @@ import App from './App'; ReactDOM.render(, document.getElementById('root')); ``` -Modern.js **不推荐**新项目使用这种方式,这种方式丧失了框架的一些能力,如 **`modern.config.js` 文件中的 `runtime` 配置将不会再生效**。但是在项目从其他框架迁移到 Modern.js,例如 CRA,或是自己手动搭建的 webpack 时,这种方式会非常有用。 +这种方式等价于开启 Modern.js 的 [source.entries.disableMount](/configure/app/source/entries) 选项。当你使用这种方式时,**将无法使用 Modern.js 框架的运行时能力**,比如 modern.config.js 文件中的 `runtime` 配置将不会再生效。 -## 使用配置指定入口 +## 自定义入口 -大部分存量项目并不是按照 Modern.js 的目录结构来搭建的。如果要改成 Modern.js 约定的目录结构,会存在一定的迁移成本。 +在某些情况下,你可能需要自定义入口配置,而不是使用 Modern.js 提供的入口约定。 -在这种情况下,除了使用文件约定生成入口外,你可以在 `modern.config.[jt]s` 中手动配置入口。 +比如你需要将一个非 Modern.js 项目迁移到 Modern.js,它并不是按照 Modern.js 的目录结构来搭建的。如果你要将它改成 Modern.js 约定的目录结构,可能会存在一定的迁移成本。这种情况下,你就可以使用自定义入口。 -```ts title="modern.config.ts" -export default defineConfig({ - source: { - entries: { - // 指定一个名称为 entry_customize 的新入口 - entry_customize: './src/home/test/index.ts', - }, - // 禁用默认入口扫描 - disableDefaultEntries: true, - }, -}); -``` +Modern.js 提供了以下配置项,你可以在 [modern.config.ts](/configure/app/usage) 中配置它们: -### 禁用默认入口扫描 +- [source.entries](/configure/app/source/entries):用于设置自定义的入口对象。 +- [source.disableDefaultEntries](/configure/app/source/disable-default-entries):用于关闭 Modern.js 默认的入口扫描行为。当你使用自定义入口时,项目的部分结构可能会恰巧命中 Modern.js 约定的目录结构,但你可能不希望 Modern.js 为你自动生成入口配置,开启该选项可以避免这个问题。 -当使用自定义入口时,项目的部分结构可能恰巧命中了 Modern.js 的目录约定,但实际上这部分目录并不是真实的入口。 +### 示例 -Modern.js 提供了 `disableDefaultEntries` 配置,来禁用默认的入口扫描规则。当你需要自定义入口时,一般需要将 `disableDefaultEntries` 与 `entries` 结合使用。这样,一些存量项目可以在不修改目录结构的情况下,快速地进行迁移。 +下面是一个自定义入口的例子,你也可以查看相关配置项的文档来了解更多用法。 ```ts title="modern.config.ts" export default defineConfig({ source: { + entries: { + // 指定一个名为 'my-entry' 的入口 + 'my-entry': { + // 入口模块的路径 + entry: './src/my-page/index.tsx', + // 关闭 Modern.js 自动生成入口代码的行为 + disableMount: true, + }, + }, + // 禁用入口扫描行为 disableDefaultEntries: true, }, }); ``` -:::tip -详细用法请查看 [source.entries](/configure/app/source/entries) 和 [source.disableDefaultEntries](/configure/app/source/disable-default-entries)。 - -::: +注意,当你开启 `disableMount` 时,**将无法使用 Modern.js 框架的运行时能力**,比如 modern.config.ts 文件中的 `runtime` 配置将不会再生效。 From 4590cc2a301b0777e2fe757302a56f6c60e2a4a6 Mon Sep 17 00:00:00 2001 From: Belinda Cao Date: Thu, 21 Sep 2023 16:41:29 +0800 Subject: [PATCH 26/26] Release v2.35.1 (#4697) Co-authored-by: github-actions[bot] --- .changeset/chatty-needles-speak.md | 8 --- .changeset/early-parents-switch.md | 13 ---- .changeset/eleven-wolves-look.md | 6 -- .changeset/few-icons-scream.md | 7 --- .changeset/fifty-apes-yell.md | 7 --- .changeset/four-beds-glow.md | 7 --- .changeset/green-pandas-buy.md | 6 -- .changeset/hot-grapes-shop.md | 7 --- .changeset/khaki-pumas-exercise.md | 8 --- .changeset/large-olives-march.md | 8 --- .changeset/moody-parents-breathe.md | 6 -- .changeset/pink-olives-matter.md | 9 --- .changeset/pink-teachers-hug.md | 6 -- .changeset/quick-seas-sin.md | 6 -- .changeset/rotten-bees-wash.md | 8 --- .changeset/rude-walls-work.md | 7 --- .changeset/shiny-deers-live.md | 7 --- .changeset/slimy-seals-battle.md | 6 -- .changeset/small-bears-appear.md | 6 -- .changeset/stale-comics-change.md | 7 --- .changeset/strange-dingos-train.md | 8 --- .changeset/thin-ducks-sort.md | 14 ----- .changeset/twenty-months-march.md | 6 -- .changeset/unlucky-ants-greet.md | 9 --- packages/builder/builder-cli/CHANGELOG.md | 19 ++++++ packages/builder/builder-cli/package.json | 6 +- .../builder-rspack-provider/CHANGELOG.md | 45 ++++++++++++++ .../builder-rspack-provider/package.json | 2 +- packages/builder/builder-shared/CHANGELOG.md | 32 ++++++++++ packages/builder/builder-shared/package.json | 2 +- .../builder-webpack-provider/CHANGELOG.md | 35 +++++++++++ .../builder-webpack-provider/package.json | 2 +- packages/builder/builder/CHANGELOG.md | 21 +++++++ packages/builder/builder/package.json | 2 +- .../CHANGELOG.md | 10 ++++ .../package.json | 2 +- packages/builder/plugin-esbuild/CHANGELOG.md | 10 ++++ packages/builder/plugin-esbuild/package.json | 2 +- .../plugin-image-compress/CHANGELOG.md | 10 ++++ .../plugin-image-compress/package.json | 2 +- .../builder/plugin-node-polyfill/CHANGELOG.md | 10 ++++ .../builder/plugin-node-polyfill/package.json | 2 +- packages/builder/plugin-stylus/CHANGELOG.md | 17 ++++++ packages/builder/plugin-stylus/package.json | 4 +- packages/builder/plugin-swc/CHANGELOG.md | 18 ++++++ packages/builder/plugin-swc/package.json | 2 +- packages/builder/plugin-vue/CHANGELOG.md | 17 ++++++ packages/builder/plugin-vue/package.json | 6 +- packages/builder/plugin-vue2/CHANGELOG.md | 17 ++++++ packages/builder/plugin-vue2/package.json | 6 +- packages/cli/babel-preset-app/CHANGELOG.md | 11 ++++ packages/cli/babel-preset-app/package.json | 2 +- packages/cli/babel-preset-base/CHANGELOG.md | 10 ++++ packages/cli/babel-preset-base/package.json | 2 +- packages/cli/core/CHANGELOG.md | 19 ++++++ packages/cli/core/package.json | 2 +- .../cli/doc-plugin-auto-sidebar/CHANGELOG.md | 10 ++++ .../cli/doc-plugin-auto-sidebar/package.json | 2 +- packages/cli/plugin-bff/CHANGELOG.md | 13 ++++ packages/cli/plugin-bff/package.json | 2 +- packages/cli/plugin-changeset/CHANGELOG.md | 11 ++++ packages/cli/plugin-changeset/package.json | 2 +- packages/cli/plugin-data-loader/CHANGELOG.md | 13 ++++ packages/cli/plugin-data-loader/package.json | 2 +- packages/cli/plugin-i18n/CHANGELOG.md | 10 ++++ packages/cli/plugin-i18n/package.json | 2 +- packages/cli/plugin-lint/CHANGELOG.md | 11 ++++ packages/cli/plugin-lint/package.json | 2 +- packages/cli/plugin-proxy/CHANGELOG.md | 14 +++++ packages/cli/plugin-proxy/package.json | 2 +- packages/cli/plugin-ssg/CHANGELOG.md | 10 ++++ packages/cli/plugin-ssg/package.json | 2 +- packages/cli/plugin-storybook/CHANGELOG.md | 23 +++++++ packages/cli/plugin-storybook/package.json | 6 +- packages/cli/plugin-swc/CHANGELOG.md | 13 ++++ packages/cli/plugin-swc/package.json | 2 +- packages/cli/plugin-tailwind/CHANGELOG.md | 14 +++++ packages/cli/plugin-tailwind/package.json | 4 +- packages/devtools/client/CHANGELOG.md | 11 ++++ packages/devtools/client/package.json | 2 +- packages/devtools/kit/package.json | 2 +- packages/devtools/mount/CHANGELOG.md | 2 + packages/devtools/mount/package.json | 2 +- packages/devtools/plugin/CHANGELOG.md | 15 +++++ packages/devtools/plugin/package.json | 4 +- packages/document/builder-doc/CHANGELOG.md | 8 +++ packages/document/builder-doc/package.json | 2 +- packages/document/main-doc/CHANGELOG.md | 8 +++ packages/document/main-doc/package.json | 4 +- packages/document/module-doc/CHANGELOG.md | 2 + packages/document/module-doc/package.json | 2 +- .../generator/generator-cases/CHANGELOG.md | 6 ++ .../generator/generator-cases/package.json | 2 +- .../generator/generator-common/CHANGELOG.md | 6 ++ .../generator/generator-common/package.json | 2 +- .../generator/generator-plugin/CHANGELOG.md | 14 +++++ .../generator/generator-plugin/package.json | 2 +- .../generator/generator-utils/CHANGELOG.md | 12 ++++ .../generator/generator-utils/package.json | 2 +- .../generators/base-generator/CHANGELOG.md | 2 + .../generators/base-generator/package.json | 2 +- .../generators/bff-generator/CHANGELOG.md | 2 + .../generators/bff-generator/package.json | 2 +- .../changeset-generator/CHANGELOG.md | 2 + .../changeset-generator/package.json | 2 +- .../dependence-generator/CHANGELOG.md | 2 + .../dependence-generator/package.json | 2 +- .../generators/entry-generator/CHANGELOG.md | 2 + .../generators/entry-generator/package.json | 2 +- .../generator-generator/CHANGELOG.md | 2 + .../generator-generator/package.json | 2 +- .../generators/module-generator/CHANGELOG.md | 2 + .../generators/module-generator/package.json | 2 +- .../module-test-generator/CHANGELOG.md | 2 + .../module-test-generator/package.json | 2 +- .../monorepo-generator/CHANGELOG.md | 2 + .../monorepo-generator/package.json | 2 +- .../generators/mwa-generator/CHANGELOG.md | 2 + .../generators/mwa-generator/package.json | 2 +- .../packages-generator/CHANGELOG.md | 2 + .../packages-generator/package.json | 2 +- .../generators/repo-generator/CHANGELOG.md | 2 + .../generators/repo-generator/package.json | 2 +- .../router-v5-generator/CHANGELOG.md | 2 + .../router-v5-generator/package.json | 2 +- .../generators/rspack-generator/CHANGELOG.md | 2 + .../generators/rspack-generator/package.json | 2 +- .../generators/server-generator/CHANGELOG.md | 2 + .../generators/server-generator/package.json | 2 +- .../generators/ssg-generator/CHANGELOG.md | 2 + .../generators/ssg-generator/package.json | 2 +- .../storybook-generator/CHANGELOG.md | 2 + .../storybook-generator/package.json | 2 +- .../tailwindcss-generator/CHANGELOG.md | 2 + .../tailwindcss-generator/package.json | 2 +- .../generators/test-generator/CHANGELOG.md | 2 + .../generators/test-generator/package.json | 2 +- .../generators/upgrade-generator/CHANGELOG.md | 2 + .../generators/upgrade-generator/package.json | 2 +- packages/generator/new-action/CHANGELOG.md | 12 ++++ packages/generator/new-action/package.json | 2 +- .../plugins/generator-plugin/CHANGELOG.md | 2 + .../plugins/generator-plugin/package.json | 2 +- .../generator/sandpack-react/package.json | 2 +- packages/libuild/libuild-core/CHANGELOG.md | 2 + packages/libuild/libuild-core/package.json | 2 +- .../libuild/libuild-plugin-babel/CHANGELOG.md | 2 + .../libuild/libuild-plugin-babel/package.json | 2 +- .../libuild-plugin-node-polyfill/CHANGELOG.md | 7 +++ .../libuild-plugin-node-polyfill/package.json | 2 +- .../libuild/libuild-plugin-svgr/CHANGELOG.md | 2 + .../libuild/libuild-plugin-svgr/package.json | 2 +- .../libuild/libuild-plugin-swc/CHANGELOG.md | 8 +++ .../libuild/libuild-plugin-swc/package.json | 2 +- packages/libuild/libuild-utils/CHANGELOG.md | 2 + packages/libuild/libuild-utils/package.json | 2 +- .../module/plugin-module-babel/CHANGELOG.md | 8 +++ .../module/plugin-module-babel/package.json | 4 +- .../module/plugin-module-banner/CHANGELOG.md | 7 +++ .../module/plugin-module-banner/package.json | 4 +- .../module/plugin-module-import/CHANGELOG.md | 10 ++++ .../module/plugin-module-import/package.json | 4 +- .../plugin-module-main-fields/CHANGELOG.md | 7 +++ .../plugin-module-main-fields/package.json | 4 +- .../plugin-module-node-polyfill/CHANGELOG.md | 9 +++ .../plugin-module-node-polyfill/package.json | 4 +- .../plugin-module-polyfill/CHANGELOG.md | 8 +++ .../plugin-module-polyfill/package.json | 4 +- .../module/plugin-module-target/CHANGELOG.md | 7 +++ .../module/plugin-module-target/package.json | 4 +- .../review/eslint-config-app/CHANGELOG.md | 6 ++ .../review/eslint-config-app/package.json | 2 +- packages/review/eslint-config/CHANGELOG.md | 6 ++ packages/review/eslint-config/package.json | 2 +- packages/review/tsconfig/CHANGELOG.md | 2 + packages/review/tsconfig/package.json | 2 +- packages/runtime/plugin-garfish/CHANGELOG.md | 13 ++++ packages/runtime/plugin-garfish/package.json | 4 +- .../runtime/plugin-router-v5/CHANGELOG.md | 15 +++++ .../runtime/plugin-router-v5/package.json | 2 +- packages/runtime/plugin-runtime/CHANGELOG.md | 20 +++++++ packages/runtime/plugin-runtime/package.json | 2 +- packages/runtime/plugin-testing/CHANGELOG.md | 22 +++++++ packages/runtime/plugin-testing/package.json | 4 +- .../babel-plugin-module-resolver/CHANGELOG.md | 2 + .../babel-plugin-module-resolver/package.json | 2 +- packages/server/bff-core/CHANGELOG.md | 10 ++++ packages/server/bff-core/package.json | 2 +- packages/server/bff-runtime/CHANGELOG.md | 2 + packages/server/bff-runtime/package.json | 2 +- packages/server/core/CHANGELOG.md | 12 ++++ packages/server/core/package.json | 2 +- packages/server/create-request/CHANGELOG.md | 13 ++++ packages/server/create-request/package.json | 2 +- packages/server/plugin-express/CHANGELOG.md | 13 ++++ packages/server/plugin-express/package.json | 2 +- packages/server/plugin-koa/CHANGELOG.md | 13 ++++ packages/server/plugin-koa/package.json | 2 +- packages/server/plugin-polyfill/CHANGELOG.md | 10 ++++ packages/server/plugin-polyfill/package.json | 2 +- packages/server/plugin-server/CHANGELOG.md | 11 ++++ packages/server/plugin-server/package.json | 2 +- packages/server/plugin-worker/CHANGELOG.md | 15 +++++ packages/server/plugin-worker/package.json | 2 +- packages/server/prod-server/CHANGELOG.md | 28 +++++++++ packages/server/prod-server/package.json | 2 +- packages/server/server/CHANGELOG.md | 19 ++++++ packages/server/server/package.json | 2 +- packages/server/utils/CHANGELOG.md | 13 ++++ packages/server/utils/package.json | 2 +- packages/solutions/app-tools/CHANGELOG.md | 60 +++++++++++++++++++ packages/solutions/app-tools/package.json | 4 +- packages/solutions/module-tools/CHANGELOG.md | 30 ++++++++++ packages/solutions/module-tools/package.json | 2 +- .../solutions/monorepo-tools/CHANGELOG.md | 20 +++++++ .../solutions/monorepo-tools/package.json | 2 +- packages/toolkit/compiler/babel/CHANGELOG.md | 10 ++++ packages/toolkit/compiler/babel/package.json | 2 +- packages/toolkit/create/CHANGELOG.md | 2 + packages/toolkit/create/package.json | 2 +- packages/toolkit/e2e/CHANGELOG.md | 10 ++++ packages/toolkit/e2e/package.json | 2 +- packages/toolkit/monorepo-utils/CHANGELOG.md | 10 ++++ packages/toolkit/monorepo-utils/package.json | 2 +- .../toolkit/node-bundle-require/CHANGELOG.md | 10 ++++ .../toolkit/node-bundle-require/package.json | 2 +- packages/toolkit/plugin/CHANGELOG.md | 14 +++++ packages/toolkit/plugin/package.json | 2 +- packages/toolkit/runtime-utils/CHANGELOG.md | 13 ++++ packages/toolkit/runtime-utils/package.json | 2 +- packages/toolkit/types/CHANGELOG.md | 2 + packages/toolkit/types/package.json | 2 +- packages/toolkit/upgrade/CHANGELOG.md | 11 ++++ packages/toolkit/upgrade/package.json | 2 +- packages/toolkit/utils/CHANGELOG.md | 17 ++++++ packages/toolkit/utils/package.json | 2 +- pnpm-lock.yaml | 6 +- scripts/build/package.json | 2 +- scripts/check-changeset/package.json | 2 +- scripts/jest-config/package.json | 2 +- scripts/lint-package-json/package.json | 2 +- scripts/prebundle/package.json | 2 +- scripts/update-codesmith/package.json | 2 +- scripts/update-rspress/package.json | 2 +- scripts/vitest-config/package.json | 2 +- 245 files changed, 1254 insertions(+), 322 deletions(-) delete mode 100644 .changeset/chatty-needles-speak.md delete mode 100644 .changeset/early-parents-switch.md delete mode 100644 .changeset/eleven-wolves-look.md delete mode 100644 .changeset/few-icons-scream.md delete mode 100644 .changeset/fifty-apes-yell.md delete mode 100644 .changeset/four-beds-glow.md delete mode 100644 .changeset/green-pandas-buy.md delete mode 100644 .changeset/hot-grapes-shop.md delete mode 100644 .changeset/khaki-pumas-exercise.md delete mode 100644 .changeset/large-olives-march.md delete mode 100644 .changeset/moody-parents-breathe.md delete mode 100644 .changeset/pink-olives-matter.md delete mode 100644 .changeset/pink-teachers-hug.md delete mode 100644 .changeset/quick-seas-sin.md delete mode 100644 .changeset/rotten-bees-wash.md delete mode 100644 .changeset/rude-walls-work.md delete mode 100644 .changeset/shiny-deers-live.md delete mode 100644 .changeset/slimy-seals-battle.md delete mode 100644 .changeset/small-bears-appear.md delete mode 100644 .changeset/stale-comics-change.md delete mode 100644 .changeset/strange-dingos-train.md delete mode 100644 .changeset/thin-ducks-sort.md delete mode 100644 .changeset/twenty-months-march.md delete mode 100644 .changeset/unlucky-ants-greet.md diff --git a/.changeset/chatty-needles-speak.md b/.changeset/chatty-needles-speak.md deleted file mode 100644 index acd0695a7d9d..000000000000 --- a/.changeset/chatty-needles-speak.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@modern-js/builder-shared': patch -'@modern-js/module-tools': patch ---- - -feat: bump postcss-nesting v12 to support latest CSS nesting syntax - -feat: 升级 postcss-nesting v12,支持最新的 CSS nesting 语法 diff --git a/.changeset/early-parents-switch.md b/.changeset/early-parents-switch.md deleted file mode 100644 index 5aad8bf4d539..000000000000 --- a/.changeset/early-parents-switch.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@modern-js/builder-webpack-provider': patch -'@modern-js/builder-rspack-provider': patch -'@modern-js/builder-doc': patch -'@modern-js/app-tools': patch -'@modern-js/plugin-proxy': patch -'@modern-js/builder': patch -'@modern-js/utils': patch ---- - -feat(app-tools): make logs easier to read - -feat(app-tools): 让日志更容易阅读 diff --git a/.changeset/eleven-wolves-look.md b/.changeset/eleven-wolves-look.md deleted file mode 100644 index 63f3cba424d6..000000000000 --- a/.changeset/eleven-wolves-look.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@modern-js/libuild-plugin-swc': patch -'@modern-js/builder-plugin-swc': patch ---- - -fix(swc): update binding to reduce package size diff --git a/.changeset/few-icons-scream.md b/.changeset/few-icons-scream.md deleted file mode 100644 index 690dbb6788e6..000000000000 --- a/.changeset/few-icons-scream.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@modern-js/builder-shared': patch ---- - -fix(builder): remove extra quote from generated CSS module types - -fix(builder): 移除生成的 CSS module 类型中多余的引号 diff --git a/.changeset/fifty-apes-yell.md b/.changeset/fifty-apes-yell.md deleted file mode 100644 index 0ecf956bc31f..000000000000 --- a/.changeset/fifty-apes-yell.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@modern-js/plugin': patch ---- - -fix(plugin): run async setup function in the correct order - -fix(plugin): 以正确的顺序执行异步的 setup 函数 diff --git a/.changeset/four-beds-glow.md b/.changeset/four-beds-glow.md deleted file mode 100644 index 63a0cb2bbe93..000000000000 --- a/.changeset/four-beds-glow.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@modern-js/core': patch ---- - -fix(core): should not print extra logs when press Ctrl+C - -fix(core): 修复按下 press Ctrl+C 时会打印多余日志的问题 diff --git a/.changeset/green-pandas-buy.md b/.changeset/green-pandas-buy.md deleted file mode 100644 index 56d96b228a13..000000000000 --- a/.changeset/green-pandas-buy.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@modern-js/prod-server': patch ---- - -fix(prod-server): error header key in other metaName -fix(prod-server): 错误的 header key 在不同的 metaName diff --git a/.changeset/hot-grapes-shop.md b/.changeset/hot-grapes-shop.md deleted file mode 100644 index 52bf3f309b08..000000000000 --- a/.changeset/hot-grapes-shop.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@modern-js/app-tools': patch -'@modern-js/utils': patch ---- - -chore(app-tools): add RouterPlugin name -chore(app-tools): 增加 RouterPlugin 名称 diff --git a/.changeset/khaki-pumas-exercise.md b/.changeset/khaki-pumas-exercise.md deleted file mode 100644 index 9c0438bfb038..000000000000 --- a/.changeset/khaki-pumas-exercise.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@modern-js/builder-webpack-provider': patch -'@modern-js/builder-rspack-provider': patch ---- - -fix(builder): resolve-url-loader performance regression issue - -fix(builder): 修复 resolve-url-loader 导致的性能下降问题 diff --git a/.changeset/large-olives-march.md b/.changeset/large-olives-march.md deleted file mode 100644 index 27ad12364dfe..000000000000 --- a/.changeset/large-olives-march.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@modern-js/app-tools': patch -'@modern-js/prod-server': patch ---- - -fix(app-tools): failed to emit modern.config.json when distPath.root is absolute path - -fix(app-tools): 修复 distPath.root 为绝对路径时无法输出 modern.config.json 的问题 diff --git a/.changeset/moody-parents-breathe.md b/.changeset/moody-parents-breathe.md deleted file mode 100644 index 2016c70fc88b..000000000000 --- a/.changeset/moody-parents-breathe.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@modern-js/prod-server': patch ---- - -fix(prod-server): the server need use headersSent without use flushHeader -fix(prod-server): 没有 flushHeader 时 server 应该使用 headersSent diff --git a/.changeset/pink-olives-matter.md b/.changeset/pink-olives-matter.md deleted file mode 100644 index e9b3a8ed1019..000000000000 --- a/.changeset/pink-olives-matter.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@modern-js/builder-webpack-provider': patch -'@modern-js/builder-rspack-provider': patch -'@modern-js/builder-shared': patch ---- - -chore(builder): move duplicated prebundle packages to shared - -chore(builder): 合并重复的预打包 packages 到 shared diff --git a/.changeset/pink-teachers-hug.md b/.changeset/pink-teachers-hug.md deleted file mode 100644 index ebe79a0b2c70..000000000000 --- a/.changeset/pink-teachers-hug.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@modern-js/runtime': patch ---- - -fix: ssr style link should not add scriptLoading attrributes -fix: ssr style link 标签 不应该添加 scriptLoading 属性 diff --git a/.changeset/quick-seas-sin.md b/.changeset/quick-seas-sin.md deleted file mode 100644 index 2a4aa39d26c9..000000000000 --- a/.changeset/quick-seas-sin.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@modern-js/app-tools': patch ---- - -feat: support splat route config file -feat: 支持通配路由配置文件 diff --git a/.changeset/rotten-bees-wash.md b/.changeset/rotten-bees-wash.md deleted file mode 100644 index 7411cd277a75..000000000000 --- a/.changeset/rotten-bees-wash.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@modern-js/prod-server': patch -'@modern-js/utils': patch ---- - -chore(prod-server): remove duplicated logger module - -chore(prod-server): 移除重复的 logger 模块 diff --git a/.changeset/rude-walls-work.md b/.changeset/rude-walls-work.md deleted file mode 100644 index bbd439b8ec75..000000000000 --- a/.changeset/rude-walls-work.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@modern-js/builder-rspack-provider': patch ---- - -fix(builder): should not apply babel in rspack mode when tools.babel not modify config - -fix(builder): 在使用 rspack 构建时,如果 tools.babel 未实际修改配置时,则不使用 babel diff --git a/.changeset/shiny-deers-live.md b/.changeset/shiny-deers-live.md deleted file mode 100644 index ac0122bc4e1f..000000000000 --- a/.changeset/shiny-deers-live.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@modern-js/libuild-plugin-swc': patch -'@modern-js/builder-plugin-swc': patch ---- - -fix(swc): fix transform core-js-pure incorrectly, allow using new decorator for js -fix(swc): 修复误转换core-js-pure,对js允许使用新 decorator diff --git a/.changeset/slimy-seals-battle.md b/.changeset/slimy-seals-battle.md deleted file mode 100644 index 60f77f106807..000000000000 --- a/.changeset/slimy-seals-battle.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@modern-js/core': patch ---- - -fix(core): we should not pass it, if err is not instanceof Error. -fix(core): 如果 err 不属于错误,我们不应该直接丢弃它 diff --git a/.changeset/small-bears-appear.md b/.changeset/small-bears-appear.md deleted file mode 100644 index 9362f995ac5b..000000000000 --- a/.changeset/small-bears-appear.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@modern-js/runtime': patch ---- - -fix: ssr loadable-component inject repeat css link tag -fix: ssr loadable-component 注入重复的 css link 标签 diff --git a/.changeset/stale-comics-change.md b/.changeset/stale-comics-change.md deleted file mode 100644 index 3a3599378448..000000000000 --- a/.changeset/stale-comics-change.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@modern-js/builder-rspack-provider': patch ---- - -chore(builder): apply chunkIds deterministic in Rspack mode production - -chore(builder): 在 Rspack 模式下,生产环境开启 chunkIds 'deterministic' diff --git a/.changeset/strange-dingos-train.md b/.changeset/strange-dingos-train.md deleted file mode 100644 index 9242d0fc074c..000000000000 --- a/.changeset/strange-dingos-train.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@modern-js/builder-rspack-provider': patch -'@modern-js/app-tools': patch ---- - -chore(rspack): use DataURI module instead of rspack-plugin-virtual-module - -chore(rspack): 使用 DataURI module 替代 rspack-plugin-virtual-module diff --git a/.changeset/thin-ducks-sort.md b/.changeset/thin-ducks-sort.md deleted file mode 100644 index f0a0ae746f56..000000000000 --- a/.changeset/thin-ducks-sort.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@modern-js/plugin-router-v5': patch -'@modern-js/plugin-data-loader': patch -'@modern-js/runtime': patch -'@modern-js/create-request': patch -'@modern-js/runtime-utils': patch -'@modern-js/app-tools': patch -'@modern-js/prod-server': patch -'@modern-js/server': patch -'@modern-js/utils': patch ---- - -refactor: split runtime utils into a seperate package -refactor: runtime utils 单独拆分成一个包 diff --git a/.changeset/twenty-months-march.md b/.changeset/twenty-months-march.md deleted file mode 100644 index e6434abfad7f..000000000000 --- a/.changeset/twenty-months-march.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@modern-js/libuild-plugin-node-polyfill': patch ---- - -fix(libuild-plugin-node-polyfill): fix error resolve path -fix(libuild-plugin-node-polyfill): 修复错误的解析路径 diff --git a/.changeset/unlucky-ants-greet.md b/.changeset/unlucky-ants-greet.md deleted file mode 100644 index 116fab4bde2a..000000000000 --- a/.changeset/unlucky-ants-greet.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@modern-js/builder-webpack-provider': patch -'@modern-js/builder-rspack-provider': patch -'@modern-js/builder-shared': patch ---- - -feat(builder): unify progress bar style in webpack / Rspack mode - -feat(builder): 对齐 webpack / Rspack 模式下的进度条样式 diff --git a/packages/builder/builder-cli/CHANGELOG.md b/packages/builder/builder-cli/CHANGELOG.md index fce619039d51..8a7abd6bc56f 100644 --- a/packages/builder/builder-cli/CHANGELOG.md +++ b/packages/builder/builder-cli/CHANGELOG.md @@ -1,5 +1,24 @@ # @modern-js/builder-cli +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [bc1413d] +- Updated dependencies [0988b12] +- Updated dependencies [4980480] +- Updated dependencies [dc93952] +- Updated dependencies [6b03be8] +- Updated dependencies [578f94f] +- Updated dependencies [6a1d46e] +- Updated dependencies [fe8caeb] + - @modern-js/builder-webpack-provider@2.35.1 + - @modern-js/builder-rspack-provider@2.35.1 + - @modern-js/builder@2.35.1 + - @modern-js/utils@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/builder-cli/package.json b/packages/builder/builder-cli/package.json index fa59aa6efa92..ab258754aecd 100644 --- a/packages/builder/builder-cli/package.json +++ b/packages/builder/builder-cli/package.json @@ -21,7 +21,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", @@ -51,8 +51,8 @@ "typescript": "^5" }, "peerDependencies": { - "@modern-js/builder-webpack-provider": "workspace:^2.35.0", - "@modern-js/builder-rspack-provider": "workspace:^2.35.0" + "@modern-js/builder-webpack-provider": "workspace:^2.35.1", + "@modern-js/builder-rspack-provider": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/builder-webpack-provider": { diff --git a/packages/builder/builder-rspack-provider/CHANGELOG.md b/packages/builder/builder-rspack-provider/CHANGELOG.md index f85d1c92b30f..a5a36a104dac 100644 --- a/packages/builder/builder-rspack-provider/CHANGELOG.md +++ b/packages/builder/builder-rspack-provider/CHANGELOG.md @@ -1,5 +1,50 @@ # @modern-js/builder-rspack-provider +## 2.35.1 + +### Patch Changes + +- ea3fe18: feat(app-tools): make logs easier to read + + feat(app-tools): 让日志更容易阅读 + +- bc1413d: fix(builder): resolve-url-loader performance regression issue + + fix(builder): 修复 resolve-url-loader 导致的性能下降问题 + +- 0988b12: chore(builder): move duplicated prebundle packages to shared + + chore(builder): 合并重复的预打包 packages 到 shared + +- dc93952: fix(builder): should not apply babel in rspack mode when tools.babel not modify config + + fix(builder): 在使用 rspack 构建时,如果 tools.babel 未实际修改配置时,则不使用 babel + +- 6b03be8: chore(builder): apply chunkIds deterministic in Rspack mode production + + chore(builder): 在 Rspack 模式下,生产环境开启 chunkIds 'deterministic' + +- 578f94f: chore(rspack): use DataURI module instead of rspack-plugin-virtual-module + + chore(rspack): 使用 DataURI module 替代 rspack-plugin-virtual-module + +- fe8caeb: feat(builder): unify progress bar style in webpack / Rspack mode + + feat(builder): 对齐 webpack / Rspack 模式下的进度条样式 + +- Updated dependencies [ce24aad] +- Updated dependencies [ea3fe18] +- Updated dependencies [de9cdee] +- Updated dependencies [9dd3151] +- Updated dependencies [0988b12] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + - @modern-js/utils@2.35.1 + - @modern-js/server@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/builder-rspack-provider/package.json b/packages/builder/builder-rspack-provider/package.json index 95e76a333604..0335a5126da4 100644 --- a/packages/builder/builder-rspack-provider/package.json +++ b/packages/builder/builder-rspack-provider/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/builder/builder-shared/CHANGELOG.md b/packages/builder/builder-shared/CHANGELOG.md index 976bafe5304b..498b2dce7c43 100644 --- a/packages/builder/builder-shared/CHANGELOG.md +++ b/packages/builder/builder-shared/CHANGELOG.md @@ -1,5 +1,37 @@ # @modern-js/builder-shared +## 2.35.1 + +### Patch Changes + +- ce24aad: feat: bump postcss-nesting v12 to support latest CSS nesting syntax + + feat: 升级 postcss-nesting v12,支持最新的 CSS nesting 语法 + +- de9cdee: fix(builder): remove extra quote from generated CSS module types + + fix(builder): 移除生成的 CSS module 类型中多余的引号 + +- 0988b12: chore(builder): move duplicated prebundle packages to shared + + chore(builder): 合并重复的预打包 packages 到 shared + +- fe8caeb: feat(builder): unify progress bar style in webpack / Rspack mode + + feat(builder): 对齐 webpack / Rspack 模式下的进度条样式 + +- Updated dependencies [ea3fe18] +- Updated dependencies [bb97082] +- Updated dependencies [9dd3151] +- Updated dependencies [0db5680] +- Updated dependencies [411cea2] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/prod-server@2.35.1 + - @modern-js/server@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/builder-shared/package.json b/packages/builder/builder-shared/package.json index 4bc1d50a5966..de6863ab3c30 100644 --- a/packages/builder/builder-shared/package.json +++ b/packages/builder/builder-shared/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/builder/builder-webpack-provider/CHANGELOG.md b/packages/builder/builder-webpack-provider/CHANGELOG.md index 2a5d145e4f89..d534ea48d60b 100644 --- a/packages/builder/builder-webpack-provider/CHANGELOG.md +++ b/packages/builder/builder-webpack-provider/CHANGELOG.md @@ -1,5 +1,40 @@ # @modern-js/builder-webpack-provider +## 2.35.1 + +### Patch Changes + +- ea3fe18: feat(app-tools): make logs easier to read + + feat(app-tools): 让日志更容易阅读 + +- bc1413d: fix(builder): resolve-url-loader performance regression issue + + fix(builder): 修复 resolve-url-loader 导致的性能下降问题 + +- 0988b12: chore(builder): move duplicated prebundle packages to shared + + chore(builder): 合并重复的预打包 packages 到 shared + +- fe8caeb: feat(builder): unify progress bar style in webpack / Rspack mode + + feat(builder): 对齐 webpack / Rspack 模式下的进度条样式 + +- Updated dependencies [ce24aad] +- Updated dependencies [ea3fe18] +- Updated dependencies [de9cdee] +- Updated dependencies [9dd3151] +- Updated dependencies [0988b12] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + - @modern-js/utils@2.35.1 + - @modern-js/server@2.35.1 + - @modern-js/babel-preset-app@2.35.1 + - @modern-js/babel-preset-base@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/builder-webpack-provider/package.json b/packages/builder/builder-webpack-provider/package.json index f6420228712d..00605096c7d7 100644 --- a/packages/builder/builder-webpack-provider/package.json +++ b/packages/builder/builder-webpack-provider/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/builder/builder/CHANGELOG.md b/packages/builder/builder/CHANGELOG.md index 744190c9527e..fd4770c84515 100644 --- a/packages/builder/builder/CHANGELOG.md +++ b/packages/builder/builder/CHANGELOG.md @@ -1,5 +1,26 @@ # @modern-js/builder +## 2.35.1 + +### Patch Changes + +- ea3fe18: feat(app-tools): make logs easier to read + + feat(app-tools): 让日志更容易阅读 + +- Updated dependencies [ce24aad] +- Updated dependencies [ea3fe18] +- Updated dependencies [de9cdee] +- Updated dependencies [9dd3151] +- Updated dependencies [0988b12] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + - @modern-js/utils@2.35.1 + - @modern-js/monorepo-utils@2.35.1 + - @modern-js/node-bundle-require@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/builder/package.json b/packages/builder/builder/package.json index a77aab3823f1..9d31f63e0c38 100644 --- a/packages/builder/builder/package.json +++ b/packages/builder/builder/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/builder/friendly-errors-webpack-plugin/CHANGELOG.md b/packages/builder/friendly-errors-webpack-plugin/CHANGELOG.md index 9a7c427f73cf..464c9792a730 100644 --- a/packages/builder/friendly-errors-webpack-plugin/CHANGELOG.md +++ b/packages/builder/friendly-errors-webpack-plugin/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/friendly-errors-webpack-plugin +## 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 diff --git a/packages/builder/friendly-errors-webpack-plugin/package.json b/packages/builder/friendly-errors-webpack-plugin/package.json index c50fbd972793..8f7dd2248ae0 100644 --- a/packages/builder/friendly-errors-webpack-plugin/package.json +++ b/packages/builder/friendly-errors-webpack-plugin/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/builder/plugin-esbuild/CHANGELOG.md b/packages/builder/plugin-esbuild/CHANGELOG.md index 7e6ee7125061..78da381c925f 100644 --- a/packages/builder/plugin-esbuild/CHANGELOG.md +++ b/packages/builder/plugin-esbuild/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/builder-plugin-esbuild +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] +- Updated dependencies [de9cdee] +- Updated dependencies [0988b12] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/plugin-esbuild/package.json b/packages/builder/plugin-esbuild/package.json index 59cd033dfbf6..3824ca356d7b 100644 --- a/packages/builder/plugin-esbuild/package.json +++ b/packages/builder/plugin-esbuild/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/builder/plugin-image-compress/CHANGELOG.md b/packages/builder/plugin-image-compress/CHANGELOG.md index e92c9303edbb..bd0f4ade7e83 100644 --- a/packages/builder/plugin-image-compress/CHANGELOG.md +++ b/packages/builder/plugin-image-compress/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/builder-plugin-image-compress +## 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 diff --git a/packages/builder/plugin-image-compress/package.json b/packages/builder/plugin-image-compress/package.json index d058bf0a0679..a0553c5a8d61 100644 --- a/packages/builder/plugin-image-compress/package.json +++ b/packages/builder/plugin-image-compress/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/builder/plugin-node-polyfill/CHANGELOG.md b/packages/builder/plugin-node-polyfill/CHANGELOG.md index 9402595aab18..9761f02460b2 100644 --- a/packages/builder/plugin-node-polyfill/CHANGELOG.md +++ b/packages/builder/plugin-node-polyfill/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/builder-plugin-node-polyfill +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] +- Updated dependencies [de9cdee] +- Updated dependencies [0988b12] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/plugin-node-polyfill/package.json b/packages/builder/plugin-node-polyfill/package.json index 657bab8fb712..ce30795436e0 100644 --- a/packages/builder/plugin-node-polyfill/package.json +++ b/packages/builder/plugin-node-polyfill/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/builder/plugin-stylus/CHANGELOG.md b/packages/builder/plugin-stylus/CHANGELOG.md index 175a1a359775..61b9d1236698 100644 --- a/packages/builder/plugin-stylus/CHANGELOG.md +++ b/packages/builder/plugin-stylus/CHANGELOG.md @@ -1,5 +1,22 @@ # @modern-js/builder-plugin-stylus +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] +- Updated dependencies [ea3fe18] +- Updated dependencies [de9cdee] +- Updated dependencies [bc1413d] +- Updated dependencies [0988b12] +- Updated dependencies [dc93952] +- Updated dependencies [6b03be8] +- Updated dependencies [578f94f] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + - @modern-js/builder-webpack-provider@2.35.1 + - @modern-js/builder-rspack-provider@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/plugin-stylus/package.json b/packages/builder/plugin-stylus/package.json index c7a6a93a999c..68d809ed5e7b 100644 --- a/packages/builder/plugin-stylus/package.json +++ b/packages/builder/plugin-stylus/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", @@ -55,7 +55,7 @@ "webpack": "^5.88.1" }, "peerDependencies": { - "@modern-js/builder-rspack-provider": "workspace:^2.35.0" + "@modern-js/builder-rspack-provider": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/builder-rspack-provider": { diff --git a/packages/builder/plugin-swc/CHANGELOG.md b/packages/builder/plugin-swc/CHANGELOG.md index 8e824bd7ea28..3e66fe74e98e 100644 --- a/packages/builder/plugin-swc/CHANGELOG.md +++ b/packages/builder/plugin-swc/CHANGELOG.md @@ -1,5 +1,23 @@ # @modern-js/builder-plugin-swc +## 2.35.1 + +### Patch Changes + +- a45cc5b: fix(swc): update binding to reduce package size +- 14b0906: fix(swc): fix transform core-js-pure incorrectly, allow using new decorator for js + fix(swc): 修复误转换 core-js-pure,对 js 允许使用新 decorator +- Updated dependencies [ce24aad] +- Updated dependencies [ea3fe18] +- Updated dependencies [de9cdee] +- Updated dependencies [9dd3151] +- Updated dependencies [0988b12] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + - @modern-js/utils@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/plugin-swc/package.json b/packages/builder/plugin-swc/package.json index 2fdf4f63b7d8..ab6948a4553a 100644 --- a/packages/builder/plugin-swc/package.json +++ b/packages/builder/plugin-swc/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/builder-plugin-swc", - "version": "2.35.0", + "version": "2.35.1", "description": "SWC plugin for builder in Modern.js", "repository": { "type": "git", diff --git a/packages/builder/plugin-vue/CHANGELOG.md b/packages/builder/plugin-vue/CHANGELOG.md index c6bfa91a2190..4bc436813407 100644 --- a/packages/builder/plugin-vue/CHANGELOG.md +++ b/packages/builder/plugin-vue/CHANGELOG.md @@ -1,5 +1,22 @@ # @modern-js/builder-plugin-vue +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] +- Updated dependencies [ea3fe18] +- Updated dependencies [de9cdee] +- Updated dependencies [bc1413d] +- Updated dependencies [0988b12] +- Updated dependencies [dc93952] +- Updated dependencies [6b03be8] +- Updated dependencies [578f94f] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + - @modern-js/builder-webpack-provider@2.35.1 + - @modern-js/builder-rspack-provider@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/plugin-vue/package.json b/packages/builder/plugin-vue/package.json index 47b661350e81..32c50987c5be 100644 --- a/packages/builder/plugin-vue/package.json +++ b/packages/builder/plugin-vue/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", @@ -55,8 +55,8 @@ "webpack": "^5.88.1" }, "peerDependencies": { - "@modern-js/builder-webpack-provider": "workspace:^2.35.0", - "@modern-js/builder-rspack-provider": "workspace:^2.35.0" + "@modern-js/builder-webpack-provider": "workspace:^2.35.1", + "@modern-js/builder-rspack-provider": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/builder-webpack-provider": { diff --git a/packages/builder/plugin-vue2/CHANGELOG.md b/packages/builder/plugin-vue2/CHANGELOG.md index 73ebd56bed77..501eaa0f4e2f 100644 --- a/packages/builder/plugin-vue2/CHANGELOG.md +++ b/packages/builder/plugin-vue2/CHANGELOG.md @@ -1,5 +1,22 @@ # @modern-js/builder-plugin-vue2 +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] +- Updated dependencies [ea3fe18] +- Updated dependencies [de9cdee] +- Updated dependencies [bc1413d] +- Updated dependencies [0988b12] +- Updated dependencies [dc93952] +- Updated dependencies [6b03be8] +- Updated dependencies [578f94f] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + - @modern-js/builder-webpack-provider@2.35.1 + - @modern-js/builder-rspack-provider@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/builder/plugin-vue2/package.json b/packages/builder/plugin-vue2/package.json index fdce8ba04d3f..d28a99db1228 100644 --- a/packages/builder/plugin-vue2/package.json +++ b/packages/builder/plugin-vue2/package.json @@ -18,7 +18,7 @@ "engines": { "node": ">=14.0.0" }, - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", @@ -55,8 +55,8 @@ "webpack": "^5.88.1" }, "peerDependencies": { - "@modern-js/builder-webpack-provider": "workspace:^2.35.0", - "@modern-js/builder-rspack-provider": "workspace:^2.35.0" + "@modern-js/builder-webpack-provider": "workspace:^2.35.1", + "@modern-js/builder-rspack-provider": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/builder-webpack-provider": { diff --git a/packages/cli/babel-preset-app/CHANGELOG.md b/packages/cli/babel-preset-app/CHANGELOG.md index 32f5d4d2eced..12efdc28526f 100644 --- a/packages/cli/babel-preset-app/CHANGELOG.md +++ b/packages/cli/babel-preset-app/CHANGELOG.md @@ -1,5 +1,16 @@ # @modern-js/babel-preset-app +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/babel-preset-base@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/cli/babel-preset-app/package.json b/packages/cli/babel-preset-app/package.json index 94b2809cda22..0c4895e21332 100644 --- a/packages/cli/babel-preset-app/package.json +++ b/packages/cli/babel-preset-app/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/cli/babel-preset-base/CHANGELOG.md b/packages/cli/babel-preset-base/CHANGELOG.md index 7a50fa98e687..8f5213011749 100644 --- a/packages/cli/babel-preset-base/CHANGELOG.md +++ b/packages/cli/babel-preset-base/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/babel-preset-base +## 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 diff --git a/packages/cli/babel-preset-base/package.json b/packages/cli/babel-preset-base/package.json index f6a4e51d1191..28873c841b41 100644 --- a/packages/cli/babel-preset-base/package.json +++ b/packages/cli/babel-preset-base/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/cli/core/CHANGELOG.md b/packages/cli/core/CHANGELOG.md index 5e5ae73bdcea..f623602a37ed 100644 --- a/packages/cli/core/CHANGELOG.md +++ b/packages/cli/core/CHANGELOG.md @@ -1,5 +1,24 @@ # @modern-js/core +## 2.35.1 + +### Patch Changes + +- 4b8cdd3: fix(core): should not print extra logs when press Ctrl+C + + fix(core): 修复按下 press Ctrl+C 时会打印多余日志的问题 + +- 843cb2c: fix(core): we should not pass it, if err is not instanceof Error. + fix(core): 如果 err 不属于错误,我们不应该直接丢弃它 +- Updated dependencies [ea3fe18] +- Updated dependencies [14f95cf] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin@2.35.1 + - @modern-js/node-bundle-require@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/cli/core/package.json b/packages/cli/core/package.json index 4ab945ed14d5..37c459708f06 100644 --- a/packages/cli/core/package.json +++ b/packages/cli/core/package.json @@ -14,7 +14,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/cli/doc-plugin-auto-sidebar/CHANGELOG.md b/packages/cli/doc-plugin-auto-sidebar/CHANGELOG.md index 327e55a5303b..7c19ecb86f75 100644 --- a/packages/cli/doc-plugin-auto-sidebar/CHANGELOG.md +++ b/packages/cli/doc-plugin-auto-sidebar/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/doc-plugin-auto-sidebar +## 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 diff --git a/packages/cli/doc-plugin-auto-sidebar/package.json b/packages/cli/doc-plugin-auto-sidebar/package.json index cfa2b4a27b81..0816ea3f7c7f 100644 --- a/packages/cli/doc-plugin-auto-sidebar/package.json +++ b/packages/cli/doc-plugin-auto-sidebar/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/doc-plugin-auto-sidebar", - "version": "2.35.0", + "version": "2.35.1", "description": "The Documentation Framework of Modern.js.", "homepage": "https://modernjs.dev/", "bugs": "https://github.com/web-infra-dev/modern.js/issues", diff --git a/packages/cli/plugin-bff/CHANGELOG.md b/packages/cli/plugin-bff/CHANGELOG.md index 537df8b9225a..7105c8e72dec 100644 --- a/packages/cli/plugin-bff/CHANGELOG.md +++ b/packages/cli/plugin-bff/CHANGELOG.md @@ -1,5 +1,18 @@ # @modern-js/plugin-bff +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/create-request@2.35.1 + - @modern-js/bff-core@2.35.1 + - @modern-js/server-utils@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/cli/plugin-bff/package.json b/packages/cli/plugin-bff/package.json index 2ed96bc2d80b..6e88c62259df 100644 --- a/packages/cli/plugin-bff/package.json +++ b/packages/cli/plugin-bff/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/cli.ts", "types": "./src/cli.ts", "main": "./dist/cjs/cli.js", diff --git a/packages/cli/plugin-changeset/CHANGELOG.md b/packages/cli/plugin-changeset/CHANGELOG.md index 867c9dc900a8..d587a877de77 100644 --- a/packages/cli/plugin-changeset/CHANGELOG.md +++ b/packages/cli/plugin-changeset/CHANGELOG.md @@ -1,5 +1,16 @@ # @modern-js/plugin-changeset +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin-i18n@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/cli/plugin-changeset/package.json b/packages/cli/plugin-changeset/package.json index d6ef3f05bc79..5bde0bfe3f05 100644 --- a/packages/cli/plugin-changeset/package.json +++ b/packages/cli/plugin-changeset/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/cli/plugin-data-loader/CHANGELOG.md b/packages/cli/plugin-data-loader/CHANGELOG.md index 6a5a6d192104..b8046feae3c9 100644 --- a/packages/cli/plugin-data-loader/CHANGELOG.md +++ b/packages/cli/plugin-data-loader/CHANGELOG.md @@ -1,5 +1,18 @@ # @modern-js/plugin-data-loader +## 2.35.1 + +### Patch Changes + +- 6a1d46e: refactor: split runtime utils into a seperate package + refactor: runtime utils 单独拆分成一个包 +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/runtime-utils@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/cli/plugin-data-loader/package.json b/packages/cli/plugin-data-loader/package.json index 85aa0faae8e8..a6e11324fa6d 100644 --- a/packages/cli/plugin-data-loader/package.json +++ b/packages/cli/plugin-data-loader/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "engines": { "node": ">=14.17.6" }, diff --git a/packages/cli/plugin-i18n/CHANGELOG.md b/packages/cli/plugin-i18n/CHANGELOG.md index 6bb06ee9d9da..45eac91ad344 100644 --- a/packages/cli/plugin-i18n/CHANGELOG.md +++ b/packages/cli/plugin-i18n/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/plugin-i18n +## 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 diff --git a/packages/cli/plugin-i18n/package.json b/packages/cli/plugin-i18n/package.json index 1d6156b5da44..c4a956b31253 100644 --- a/packages/cli/plugin-i18n/package.json +++ b/packages/cli/plugin-i18n/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/cli/plugin-lint/CHANGELOG.md b/packages/cli/plugin-lint/CHANGELOG.md index bb52d6537dea..4f19b4e93d4d 100644 --- a/packages/cli/plugin-lint/CHANGELOG.md +++ b/packages/cli/plugin-lint/CHANGELOG.md @@ -1,5 +1,16 @@ # @modern-js/plugin-lint +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/tsconfig@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/cli/plugin-lint/package.json b/packages/cli/plugin-lint/package.json index c87afd0c92e7..36950874029c 100644 --- a/packages/cli/plugin-lint/package.json +++ b/packages/cli/plugin-lint/package.json @@ -14,7 +14,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/cli/plugin-proxy/CHANGELOG.md b/packages/cli/plugin-proxy/CHANGELOG.md index 0206508c055f..7d13f526ee54 100644 --- a/packages/cli/plugin-proxy/CHANGELOG.md +++ b/packages/cli/plugin-proxy/CHANGELOG.md @@ -1,5 +1,19 @@ # @modern-js/plugin-proxy +## 2.35.1 + +### Patch Changes + +- ea3fe18: feat(app-tools): make logs easier to read + + feat(app-tools): 让日志更容易阅读 + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/cli/plugin-proxy/package.json b/packages/cli/plugin-proxy/package.json index 4ea4710cd383..c919e4ddd32d 100644 --- a/packages/cli/plugin-proxy/package.json +++ b/packages/cli/plugin-proxy/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/cli/plugin-ssg/CHANGELOG.md b/packages/cli/plugin-ssg/CHANGELOG.md index 09bd1663154d..79bdd309300f 100644 --- a/packages/cli/plugin-ssg/CHANGELOG.md +++ b/packages/cli/plugin-ssg/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/plugin-ssg +## 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 diff --git a/packages/cli/plugin-ssg/package.json b/packages/cli/plugin-ssg/package.json index 40c9973f3a8c..b2daec0e8efc 100644 --- a/packages/cli/plugin-ssg/package.json +++ b/packages/cli/plugin-ssg/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/cli/plugin-storybook/CHANGELOG.md b/packages/cli/plugin-storybook/CHANGELOG.md index f9297708ef60..a2196610cf3b 100644 --- a/packages/cli/plugin-storybook/CHANGELOG.md +++ b/packages/cli/plugin-storybook/CHANGELOG.md @@ -1,5 +1,28 @@ # @modern-js/plugin-storybook +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] +- Updated dependencies [ea3fe18] +- Updated dependencies [de9cdee] +- Updated dependencies [9dd3151] +- Updated dependencies [bc1413d] +- Updated dependencies [0988b12] +- Updated dependencies [85f877b] +- Updated dependencies [4980480] +- Updated dependencies [7bc7e9c] +- Updated dependencies [6a1d46e] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + - @modern-js/builder-webpack-provider@2.35.1 + - @modern-js/builder@2.35.1 + - @modern-js/utils@2.35.1 + - @modern-js/runtime@2.35.1 + - @modern-js/plugin-router-v5@2.35.1 + - @modern-js/builder-plugin-node-polyfill@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/cli/plugin-storybook/package.json b/packages/cli/plugin-storybook/package.json index ee637cec5f8d..83c2fb4bc9b0 100644 --- a/packages/cli/plugin-storybook/package.json +++ b/packages/cli/plugin-storybook/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", @@ -89,8 +89,8 @@ "webpack": "^5.88.1" }, "peerDependencies": { - "@modern-js/runtime": "workspace:^2.35.0", - "@modern-js/plugin-router-v5": "workspace:^2.35.0", + "@modern-js/runtime": "workspace:^2.35.1", + "@modern-js/plugin-router-v5": "workspace:^2.35.1", "react": ">=17", "react-dom": ">=17" }, diff --git a/packages/cli/plugin-swc/CHANGELOG.md b/packages/cli/plugin-swc/CHANGELOG.md index c1bdd8bef7ba..5bd6e37b6cf8 100644 --- a/packages/cli/plugin-swc/CHANGELOG.md +++ b/packages/cli/plugin-swc/CHANGELOG.md @@ -1,5 +1,18 @@ # @modern-js/core +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [a45cc5b] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [14b0906] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/builder-plugin-swc@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/cli/plugin-swc/package.json b/packages/cli/plugin-swc/package.json index 25f8a303fd1b..f00cac5e9531 100644 --- a/packages/cli/plugin-swc/package.json +++ b/packages/cli/plugin-swc/package.json @@ -14,7 +14,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/cli/plugin-tailwind/CHANGELOG.md b/packages/cli/plugin-tailwind/CHANGELOG.md index 710a6ac4a3ce..9687b455196a 100644 --- a/packages/cli/plugin-tailwind/CHANGELOG.md +++ b/packages/cli/plugin-tailwind/CHANGELOG.md @@ -1,5 +1,19 @@ # @modern-js/plugin-tailwindcss +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [85f877b] +- Updated dependencies [4980480] +- Updated dependencies [7bc7e9c] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/runtime@2.35.1 + - @modern-js/node-bundle-require@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/cli/plugin-tailwind/package.json b/packages/cli/plugin-tailwind/package.json index f831b7d702d2..137dd4227021 100644 --- a/packages/cli/plugin-tailwind/package.json +++ b/packages/cli/plugin-tailwind/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", @@ -77,7 +77,7 @@ }, "peerDependencies": { "tailwindcss": ">= 2.0.0 || >= 3.0.0", - "@modern-js/runtime": "workspace:^2.35.0" + "@modern-js/runtime": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/runtime": { diff --git a/packages/devtools/client/CHANGELOG.md b/packages/devtools/client/CHANGELOG.md index d50a1accada0..dc43cad6a10b 100644 --- a/packages/devtools/client/CHANGELOG.md +++ b/packages/devtools/client/CHANGELOG.md @@ -1,5 +1,16 @@ # @modern-js/devtools-client +## 2.35.1 + +### Patch Changes + +- Updated dependencies [85f877b] +- Updated dependencies [7bc7e9c] +- Updated dependencies [6a1d46e] + - @modern-js/runtime@2.35.1 + - @modern-js/devtools-kit@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/devtools/client/package.json b/packages/devtools/client/package.json index a8dc52af67cd..4bce739c34b9 100644 --- a/packages/devtools/client/package.json +++ b/packages/devtools/client/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/devtools-client", - "version": "2.35.0", + "version": "2.35.1", "main": "./index.js", "scripts": { "reset": "npx rimraf ./**/node_modules", diff --git a/packages/devtools/kit/package.json b/packages/devtools/kit/package.json index cf436a65352a..535ce29dd10b 100644 --- a/packages/devtools/kit/package.json +++ b/packages/devtools/kit/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/devtools/mount/CHANGELOG.md b/packages/devtools/mount/CHANGELOG.md index ac8a656503a1..eb459d227598 100644 --- a/packages/devtools/mount/CHANGELOG.md +++ b/packages/devtools/mount/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/devtools-mount +## 2.35.1 + ## 2.35.0 ## 2.34.0 diff --git a/packages/devtools/mount/package.json b/packages/devtools/mount/package.json index 5cc58c8b7583..f4d7ec7c7da9 100644 --- a/packages/devtools/mount/package.json +++ b/packages/devtools/mount/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/devtools-mount", - "version": "2.35.0", + "version": "2.35.1", "main": "dist/main.js", "types": "dist/types.d.ts", "scripts": { diff --git a/packages/devtools/plugin/CHANGELOG.md b/packages/devtools/plugin/CHANGELOG.md index 10a25ee5a2ad..ed951b55febd 100644 --- a/packages/devtools/plugin/CHANGELOG.md +++ b/packages/devtools/plugin/CHANGELOG.md @@ -1,5 +1,20 @@ # @modern-js/plugin-devtools +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [85f877b] +- Updated dependencies [4980480] +- Updated dependencies [7bc7e9c] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/runtime@2.35.1 + - @modern-js/devtools-kit@2.35.1 + - @modern-js/devtools-mount@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/devtools/plugin/package.json b/packages/devtools/plugin/package.json index 0e4ec3ceaf6d..a2bb763eee67 100644 --- a/packages/devtools/plugin/package.json +++ b/packages/devtools/plugin/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", @@ -73,7 +73,7 @@ "typescript": "^5" }, "peerDependencies": { - "@modern-js/runtime": "workspace:^2.35.0" + "@modern-js/runtime": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/runtime": { diff --git a/packages/document/builder-doc/CHANGELOG.md b/packages/document/builder-doc/CHANGELOG.md index 68e391d6af3e..9eca897d8af5 100644 --- a/packages/document/builder-doc/CHANGELOG.md +++ b/packages/document/builder-doc/CHANGELOG.md @@ -1,5 +1,13 @@ # @modern-js/builder-doc +## 2.35.1 + +### Patch Changes + +- ea3fe18: feat(app-tools): make logs easier to read + + feat(app-tools): 让日志更容易阅读 + ## 2.35.0 ## 2.34.0 diff --git a/packages/document/builder-doc/package.json b/packages/document/builder-doc/package.json index 87a8c2a58d5d..9d1a401a1b27 100644 --- a/packages/document/builder-doc/package.json +++ b/packages/document/builder-doc/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/builder-doc", - "version": "2.35.0", + "version": "2.35.1", "description": "Shared documentation of modern.js builder", "homepage": "https://modernjs.dev", "bugs": "https://github.com/web-infra-dev/modern.js/issues", diff --git a/packages/document/main-doc/CHANGELOG.md b/packages/document/main-doc/CHANGELOG.md index 894cbd4a04ee..eb9d2a46e126 100644 --- a/packages/document/main-doc/CHANGELOG.md +++ b/packages/document/main-doc/CHANGELOG.md @@ -1,5 +1,13 @@ # @modern-js/main-doc +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] + - @modern-js/builder-doc@2.35.1 + - @modern-js/sandpack-react@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/document/main-doc/package.json b/packages/document/main-doc/package.json index a5b787efa931..101c9b4e9b9f 100644 --- a/packages/document/main-doc/package.json +++ b/packages/document/main-doc/package.json @@ -21,7 +21,7 @@ "build:doc": "rspress build", "preview": "rspress preview" }, - "version": "2.35.0", + "version": "2.35.1", "publishConfig": { "registry": "https://registry.npmjs.org/", "access": "public", @@ -31,7 +31,7 @@ "@modern-js/sandpack-react": "workspace:*" }, "peerDependencies": { - "@modern-js/builder-doc": "workspace:^2.35.0" + "@modern-js/builder-doc": "workspace:^2.35.1" }, "devDependencies": { "@modern-js/builder-doc": "workspace:*", diff --git a/packages/document/module-doc/CHANGELOG.md b/packages/document/module-doc/CHANGELOG.md index 5b837d18527a..e45b6c58a0f5 100644 --- a/packages/document/module-doc/CHANGELOG.md +++ b/packages/document/module-doc/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/module-tools-docs +## 2.35.1 + ## 2.35.0 ## 2.34.0 diff --git a/packages/document/module-doc/package.json b/packages/document/module-doc/package.json index 44135cccff35..c1b5eef1e3b5 100644 --- a/packages/document/module-doc/package.json +++ b/packages/document/module-doc/package.json @@ -9,7 +9,7 @@ "directory": "packages/document/module-doc" }, "license": "MIT", - "version": "2.35.0", + "version": "2.35.1", "main": "index.js", "scripts": { "dev": "rspress dev", diff --git a/packages/generator/generator-cases/CHANGELOG.md b/packages/generator/generator-cases/CHANGELOG.md index a70324501f2e..ccf7b61f7f2b 100644 --- a/packages/generator/generator-cases/CHANGELOG.md +++ b/packages/generator/generator-cases/CHANGELOG.md @@ -1,5 +1,11 @@ # @modern-js/generator-cases +## 3.2.2 + +### Patch Changes + +- @modern-js/generator-common@3.2.2 + ## 3.2.1 ### Patch Changes diff --git a/packages/generator/generator-cases/package.json b/packages/generator/generator-cases/package.json index 488ff8736cfa..9f6f9e38ed48 100644 --- a/packages/generator/generator-cases/package.json +++ b/packages/generator/generator-cases/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/generator/generator-common/CHANGELOG.md b/packages/generator/generator-common/CHANGELOG.md index daced45f60ea..ca2b9f56c4b5 100644 --- a/packages/generator/generator-common/CHANGELOG.md +++ b/packages/generator/generator-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @modern-js/generator-common +## 3.2.2 + +### Patch Changes + +- @modern-js/plugin-i18n@2.35.1 + ## 3.2.1 ### Patch Changes diff --git a/packages/generator/generator-common/package.json b/packages/generator/generator-common/package.json index cfa5bb4d61aa..14476ba7b2b0 100644 --- a/packages/generator/generator-common/package.json +++ b/packages/generator/generator-common/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/generator/generator-plugin/CHANGELOG.md b/packages/generator/generator-plugin/CHANGELOG.md index 8380694b0c16..5fd6bb308d38 100644 --- a/packages/generator/generator-plugin/CHANGELOG.md +++ b/packages/generator/generator-plugin/CHANGELOG.md @@ -1,5 +1,19 @@ # @modern-js/generator-plugin +## 3.2.2 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin-i18n@2.35.1 + - @modern-js/generator-common@3.2.2 + - @modern-js/generator-utils@3.2.2 + - @modern-js/new-action@2.35.1 + ## 3.2.1 ### Patch Changes diff --git a/packages/generator/generator-plugin/package.json b/packages/generator/generator-plugin/package.json index 86693689c08c..324f91f24b77 100644 --- a/packages/generator/generator-plugin/package.json +++ b/packages/generator/generator-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/generator-plugin", - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/generator/generator-utils/CHANGELOG.md b/packages/generator/generator-utils/CHANGELOG.md index ee8ce5b0fdaf..f7f41c36d265 100644 --- a/packages/generator/generator-utils/CHANGELOG.md +++ b/packages/generator/generator-utils/CHANGELOG.md @@ -1,5 +1,17 @@ # @modern-js/generator-utils +## 3.2.2 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin-i18n@2.35.1 + - @modern-js/generator-common@3.2.2 + ## 3.2.1 ### Patch Changes diff --git a/packages/generator/generator-utils/package.json b/packages/generator/generator-utils/package.json index eb3637634d4c..6332a58f8078 100644 --- a/packages/generator/generator-utils/package.json +++ b/packages/generator/generator-utils/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/generator/generators/base-generator/CHANGELOG.md b/packages/generator/generators/base-generator/CHANGELOG.md index 43f0bb302911..a75d04fe37bf 100644 --- a/packages/generator/generators/base-generator/CHANGELOG.md +++ b/packages/generator/generators/base-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/base-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/base-generator/package.json b/packages/generator/generators/base-generator/package.json index 5edffede866a..aa4fa8b43fa9 100644 --- a/packages/generator/generators/base-generator/package.json +++ b/packages/generator/generators/base-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./src/index.ts", diff --git a/packages/generator/generators/bff-generator/CHANGELOG.md b/packages/generator/generators/bff-generator/CHANGELOG.md index 4fc7d3112f71..729fdb2e634b 100644 --- a/packages/generator/generators/bff-generator/CHANGELOG.md +++ b/packages/generator/generators/bff-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/bff-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/bff-generator/package.json b/packages/generator/generators/bff-generator/package.json index ed684f77049c..49a08ee7db58 100644 --- a/packages/generator/generators/bff-generator/package.json +++ b/packages/generator/generators/bff-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./src/index.ts", diff --git a/packages/generator/generators/changeset-generator/CHANGELOG.md b/packages/generator/generators/changeset-generator/CHANGELOG.md index 3f50581c40a2..80daff615f6e 100644 --- a/packages/generator/generators/changeset-generator/CHANGELOG.md +++ b/packages/generator/generators/changeset-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/changeset-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/changeset-generator/package.json b/packages/generator/generators/changeset-generator/package.json index 224a8e12b4ef..9ed887dfab6e 100644 --- a/packages/generator/generators/changeset-generator/package.json +++ b/packages/generator/generators/changeset-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/dependence-generator/CHANGELOG.md b/packages/generator/generators/dependence-generator/CHANGELOG.md index cdc192f70be7..786e641fec08 100644 --- a/packages/generator/generators/dependence-generator/CHANGELOG.md +++ b/packages/generator/generators/dependence-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/dependence-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/dependence-generator/package.json b/packages/generator/generators/dependence-generator/package.json index be8804edc5f6..d0ad7b104299 100644 --- a/packages/generator/generators/dependence-generator/package.json +++ b/packages/generator/generators/dependence-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/entry-generator/CHANGELOG.md b/packages/generator/generators/entry-generator/CHANGELOG.md index 3c1b724a4172..def74ce06ad2 100644 --- a/packages/generator/generators/entry-generator/CHANGELOG.md +++ b/packages/generator/generators/entry-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/entry-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/entry-generator/package.json b/packages/generator/generators/entry-generator/package.json index a13fb8898588..82f46c02b069 100644 --- a/packages/generator/generators/entry-generator/package.json +++ b/packages/generator/generators/entry-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/generator-generator/CHANGELOG.md b/packages/generator/generators/generator-generator/CHANGELOG.md index acdd264158da..057b06c420b2 100644 --- a/packages/generator/generators/generator-generator/CHANGELOG.md +++ b/packages/generator/generators/generator-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/generator-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/generator-generator/package.json b/packages/generator/generators/generator-generator/package.json index afbd07df9ced..338414db0ffc 100644 --- a/packages/generator/generators/generator-generator/package.json +++ b/packages/generator/generators/generator-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/module-generator/CHANGELOG.md b/packages/generator/generators/module-generator/CHANGELOG.md index 855d7a9df94b..b1d57b1d6e6f 100644 --- a/packages/generator/generators/module-generator/CHANGELOG.md +++ b/packages/generator/generators/module-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/module-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/module-generator/package.json b/packages/generator/generators/module-generator/package.json index 86a96b5bcb89..e6a15de5dee2 100644 --- a/packages/generator/generators/module-generator/package.json +++ b/packages/generator/generators/module-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/module-test-generator/CHANGELOG.md b/packages/generator/generators/module-test-generator/CHANGELOG.md index b77181ceefe6..3ee1d326f811 100644 --- a/packages/generator/generators/module-test-generator/CHANGELOG.md +++ b/packages/generator/generators/module-test-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/module-test-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/module-test-generator/package.json b/packages/generator/generators/module-test-generator/package.json index 324a474b1cf9..0f5c0b3c905e 100644 --- a/packages/generator/generators/module-test-generator/package.json +++ b/packages/generator/generators/module-test-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/monorepo-generator/CHANGELOG.md b/packages/generator/generators/monorepo-generator/CHANGELOG.md index 59cd4af10828..c933f6834520 100644 --- a/packages/generator/generators/monorepo-generator/CHANGELOG.md +++ b/packages/generator/generators/monorepo-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/monorepo-generator +## 3.2.2 + ## 3.2.1 ### Patch Changes diff --git a/packages/generator/generators/monorepo-generator/package.json b/packages/generator/generators/monorepo-generator/package.json index 3a62fdc0ff7f..e3f8b585bb14 100644 --- a/packages/generator/generators/monorepo-generator/package.json +++ b/packages/generator/generators/monorepo-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/mwa-generator/CHANGELOG.md b/packages/generator/generators/mwa-generator/CHANGELOG.md index 531c2bf75695..075addbd616e 100644 --- a/packages/generator/generators/mwa-generator/CHANGELOG.md +++ b/packages/generator/generators/mwa-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/mwa-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/mwa-generator/package.json b/packages/generator/generators/mwa-generator/package.json index 8e634c0eda41..7d2e25d90138 100644 --- a/packages/generator/generators/mwa-generator/package.json +++ b/packages/generator/generators/mwa-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/packages-generator/CHANGELOG.md b/packages/generator/generators/packages-generator/CHANGELOG.md index 487fa86a75ab..54545df566d9 100644 --- a/packages/generator/generators/packages-generator/CHANGELOG.md +++ b/packages/generator/generators/packages-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/packages-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/packages-generator/package.json b/packages/generator/generators/packages-generator/package.json index 0f54934b43a7..a42804e88884 100644 --- a/packages/generator/generators/packages-generator/package.json +++ b/packages/generator/generators/packages-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/repo-generator/CHANGELOG.md b/packages/generator/generators/repo-generator/CHANGELOG.md index 46c850cf9662..2ebce24b3138 100644 --- a/packages/generator/generators/repo-generator/CHANGELOG.md +++ b/packages/generator/generators/repo-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/repo-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/repo-generator/package.json b/packages/generator/generators/repo-generator/package.json index 63d9399ea5fe..5eb06759c1c3 100644 --- a/packages/generator/generators/repo-generator/package.json +++ b/packages/generator/generators/repo-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/router-v5-generator/CHANGELOG.md b/packages/generator/generators/router-v5-generator/CHANGELOG.md index 46a543999168..e631c9e5200a 100644 --- a/packages/generator/generators/router-v5-generator/CHANGELOG.md +++ b/packages/generator/generators/router-v5-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/router-v5-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/router-v5-generator/package.json b/packages/generator/generators/router-v5-generator/package.json index 8af7cf54f881..62b80db31597 100644 --- a/packages/generator/generators/router-v5-generator/package.json +++ b/packages/generator/generators/router-v5-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/rspack-generator/CHANGELOG.md b/packages/generator/generators/rspack-generator/CHANGELOG.md index 2c6e1cda7221..a5b4f7411582 100644 --- a/packages/generator/generators/rspack-generator/CHANGELOG.md +++ b/packages/generator/generators/rspack-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/rspack-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/rspack-generator/package.json b/packages/generator/generators/rspack-generator/package.json index 8b786a9355ac..e63452fd7abf 100644 --- a/packages/generator/generators/rspack-generator/package.json +++ b/packages/generator/generators/rspack-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/server-generator/CHANGELOG.md b/packages/generator/generators/server-generator/CHANGELOG.md index 6c1dd1b126d5..6571a5552ec4 100644 --- a/packages/generator/generators/server-generator/CHANGELOG.md +++ b/packages/generator/generators/server-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/server-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/server-generator/package.json b/packages/generator/generators/server-generator/package.json index d54210f41ae2..b0142b158868 100644 --- a/packages/generator/generators/server-generator/package.json +++ b/packages/generator/generators/server-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./src/index.ts", diff --git a/packages/generator/generators/ssg-generator/CHANGELOG.md b/packages/generator/generators/ssg-generator/CHANGELOG.md index 348895652bd3..81f388409287 100644 --- a/packages/generator/generators/ssg-generator/CHANGELOG.md +++ b/packages/generator/generators/ssg-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/ssg-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/ssg-generator/package.json b/packages/generator/generators/ssg-generator/package.json index 0cf8a75136ed..81f35747cf4e 100644 --- a/packages/generator/generators/ssg-generator/package.json +++ b/packages/generator/generators/ssg-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/storybook-generator/CHANGELOG.md b/packages/generator/generators/storybook-generator/CHANGELOG.md index b32478ea06bb..d0757bcb7dd6 100644 --- a/packages/generator/generators/storybook-generator/CHANGELOG.md +++ b/packages/generator/generators/storybook-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/storybook-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/storybook-generator/package.json b/packages/generator/generators/storybook-generator/package.json index 7b697c28d789..214db9f82a90 100644 --- a/packages/generator/generators/storybook-generator/package.json +++ b/packages/generator/generators/storybook-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/tailwindcss-generator/CHANGELOG.md b/packages/generator/generators/tailwindcss-generator/CHANGELOG.md index 2c52e1a0a5f1..ef9b03726a33 100644 --- a/packages/generator/generators/tailwindcss-generator/CHANGELOG.md +++ b/packages/generator/generators/tailwindcss-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/tailwindcss-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/tailwindcss-generator/package.json b/packages/generator/generators/tailwindcss-generator/package.json index 7e2f843756e9..0bdc0471385a 100644 --- a/packages/generator/generators/tailwindcss-generator/package.json +++ b/packages/generator/generators/tailwindcss-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/test-generator/CHANGELOG.md b/packages/generator/generators/test-generator/CHANGELOG.md index 8aa211508a65..dd3b368c4870 100644 --- a/packages/generator/generators/test-generator/CHANGELOG.md +++ b/packages/generator/generators/test-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/test-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/test-generator/package.json b/packages/generator/generators/test-generator/package.json index ae2f36e72600..a5b56199d138 100644 --- a/packages/generator/generators/test-generator/package.json +++ b/packages/generator/generators/test-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/generators/upgrade-generator/CHANGELOG.md b/packages/generator/generators/upgrade-generator/CHANGELOG.md index f5ba5fb5cc5f..bfff63e989a7 100644 --- a/packages/generator/generators/upgrade-generator/CHANGELOG.md +++ b/packages/generator/generators/upgrade-generator/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/upgrade-generator +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/generators/upgrade-generator/package.json b/packages/generator/generators/upgrade-generator/package.json index 430798e985af..3c1ab8f8b73d 100644 --- a/packages/generator/generators/upgrade-generator/package.json +++ b/packages/generator/generators/upgrade-generator/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/new-action/CHANGELOG.md b/packages/generator/new-action/CHANGELOG.md index ce5574f2e518..76527a00cd73 100644 --- a/packages/generator/new-action/CHANGELOG.md +++ b/packages/generator/new-action/CHANGELOG.md @@ -1,5 +1,17 @@ # @modern-js/new-action +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/generator-common@3.2.2 + - @modern-js/generator-utils@3.2.2 + ## 2.35.0 ### Patch Changes diff --git a/packages/generator/new-action/package.json b/packages/generator/new-action/package.json index 141aec526cea..3fdc98df8770 100644 --- a/packages/generator/new-action/package.json +++ b/packages/generator/new-action/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/generator/plugins/generator-plugin/CHANGELOG.md b/packages/generator/plugins/generator-plugin/CHANGELOG.md index 1962eb02faf5..af5f96f562c7 100644 --- a/packages/generator/plugins/generator-plugin/CHANGELOG.md +++ b/packages/generator/plugins/generator-plugin/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/generator-plugin-plugin +## 3.2.2 + ## 3.2.1 ## 3.2.0 diff --git a/packages/generator/plugins/generator-plugin/package.json b/packages/generator/plugins/generator-plugin/package.json index 6e2dafda39ec..75e5c8462ebb 100644 --- a/packages/generator/plugins/generator-plugin/package.json +++ b/packages/generator/plugins/generator-plugin/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "3.2.1", + "version": "3.2.2", "jsnext:source": "./src/index.ts", "main": "./src/index.ts", "files": [ diff --git a/packages/generator/sandpack-react/package.json b/packages/generator/sandpack-react/package.json index 206f11c5b897..4975670da947 100644 --- a/packages/generator/sandpack-react/package.json +++ b/packages/generator/sandpack-react/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/libuild/libuild-core/CHANGELOG.md b/packages/libuild/libuild-core/CHANGELOG.md index 1d511f51cffd..d80ed5a201e1 100644 --- a/packages/libuild/libuild-core/CHANGELOG.md +++ b/packages/libuild/libuild-core/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/libuild +## 2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/libuild/libuild-core/package.json b/packages/libuild/libuild-core/package.json index a8a122bb3f81..db94640de2b1 100644 --- a/packages/libuild/libuild-core/package.json +++ b/packages/libuild/libuild-core/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/libuild", - "version": "2.35.0", + "version": "2.35.1", "description": "A tool for building modern JavaScript libraries", "keywords": [ "modern", diff --git a/packages/libuild/libuild-plugin-babel/CHANGELOG.md b/packages/libuild/libuild-plugin-babel/CHANGELOG.md index 40cdeeb135aa..369dd2296528 100644 --- a/packages/libuild/libuild-plugin-babel/CHANGELOG.md +++ b/packages/libuild/libuild-plugin-babel/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/libuild-plugin-babel +## 2.35.1 + ## 2.35.0 ## 2.34.0 diff --git a/packages/libuild/libuild-plugin-babel/package.json b/packages/libuild/libuild-plugin-babel/package.json index 8e2880edaa07..13fdd7fbc196 100644 --- a/packages/libuild/libuild-plugin-babel/package.json +++ b/packages/libuild/libuild-plugin-babel/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/libuild-plugin-babel", - "version": "2.35.0", + "version": "2.35.1", "description": "A plugin for libuild to transform your code with babel", "keywords": [ "libuild", diff --git a/packages/libuild/libuild-plugin-node-polyfill/CHANGELOG.md b/packages/libuild/libuild-plugin-node-polyfill/CHANGELOG.md index b15f52f467d7..cc92d41f6152 100644 --- a/packages/libuild/libuild-plugin-node-polyfill/CHANGELOG.md +++ b/packages/libuild/libuild-plugin-node-polyfill/CHANGELOG.md @@ -1,5 +1,12 @@ # @modern-js/libuild-plugin-node-polyfill +## 2.35.1 + +### Patch Changes + +- 6893765: fix(libuild-plugin-node-polyfill): fix error resolve path + fix(libuild-plugin-node-polyfill): 修复错误的解析路径 + ## 2.35.0 ## 2.34.0 diff --git a/packages/libuild/libuild-plugin-node-polyfill/package.json b/packages/libuild/libuild-plugin-node-polyfill/package.json index f30f7a0d79ec..4a8745774f65 100644 --- a/packages/libuild/libuild-plugin-node-polyfill/package.json +++ b/packages/libuild/libuild-plugin-node-polyfill/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/libuild-plugin-node-polyfill", - "version": "2.35.0", + "version": "2.35.1", "description": "A plugin for libuild includes node polyfill", "keywords": [ "libuild", diff --git a/packages/libuild/libuild-plugin-svgr/CHANGELOG.md b/packages/libuild/libuild-plugin-svgr/CHANGELOG.md index 63d227c84d9e..731754cccf72 100644 --- a/packages/libuild/libuild-plugin-svgr/CHANGELOG.md +++ b/packages/libuild/libuild-plugin-svgr/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/libuild-plugin-svgr +## 2.35.1 + ## 2.35.0 ## 2.34.0 diff --git a/packages/libuild/libuild-plugin-svgr/package.json b/packages/libuild/libuild-plugin-svgr/package.json index 9d26a39e735f..c16413ad91c2 100644 --- a/packages/libuild/libuild-plugin-svgr/package.json +++ b/packages/libuild/libuild-plugin-svgr/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/libuild-plugin-svgr", - "version": "2.35.0", + "version": "2.35.1", "description": "A plugin for libuild to transform your svg to react component", "keywords": [ "libuild", diff --git a/packages/libuild/libuild-plugin-swc/CHANGELOG.md b/packages/libuild/libuild-plugin-swc/CHANGELOG.md index 0e0323accec7..000f981001d5 100644 --- a/packages/libuild/libuild-plugin-swc/CHANGELOG.md +++ b/packages/libuild/libuild-plugin-swc/CHANGELOG.md @@ -1,5 +1,13 @@ # @modern-js/libuild-plugin-swc +## 2.35.1 + +### Patch Changes + +- a45cc5b: fix(swc): update binding to reduce package size +- 14b0906: fix(swc): fix transform core-js-pure incorrectly, allow using new decorator for js + fix(swc): 修复误转换 core-js-pure,对 js 允许使用新 decorator + ## 2.35.0 ## 2.34.0 diff --git a/packages/libuild/libuild-plugin-swc/package.json b/packages/libuild/libuild-plugin-swc/package.json index 370c82f07a78..6a3a8680c671 100644 --- a/packages/libuild/libuild-plugin-swc/package.json +++ b/packages/libuild/libuild-plugin-swc/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/libuild-plugin-swc", - "version": "2.35.0", + "version": "2.35.1", "description": "A plugin for libuild to transform your code with swc", "keywords": [ "libuild", diff --git a/packages/libuild/libuild-utils/CHANGELOG.md b/packages/libuild/libuild-utils/CHANGELOG.md index e3efc9095efd..03941d5a12a0 100644 --- a/packages/libuild/libuild-utils/CHANGELOG.md +++ b/packages/libuild/libuild-utils/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/libuild-utils +## 2.35.1 + ## 2.35.0 ## 2.34.0 diff --git a/packages/libuild/libuild-utils/package.json b/packages/libuild/libuild-utils/package.json index 3df16e54cbf9..52fb8d2c7c5e 100644 --- a/packages/libuild/libuild-utils/package.json +++ b/packages/libuild/libuild-utils/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/libuild-utils", - "version": "2.35.0", + "version": "2.35.1", "description": "utils for libuild", "license": "MIT", "main": "dist/index.js", diff --git a/packages/module/plugin-module-babel/CHANGELOG.md b/packages/module/plugin-module-babel/CHANGELOG.md index 3f92d03e2f2b..5453393ae396 100644 --- a/packages/module/plugin-module-babel/CHANGELOG.md +++ b/packages/module/plugin-module-babel/CHANGELOG.md @@ -1,5 +1,13 @@ # @modern-js/plugin-module-babel +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] + - @modern-js/module-tools@2.35.1 + - @modern-js/libuild-plugin-babel@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/module/plugin-module-babel/package.json b/packages/module/plugin-module-babel/package.json index eb4a7865915b..a526e385f183 100644 --- a/packages/module/plugin-module-babel/package.json +++ b/packages/module/plugin-module-babel/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "types": "./src/index.ts", "main": "./dist/index.js", "scripts": { @@ -38,7 +38,7 @@ "@modern-js/module-tools": "workspace:*" }, "peerDependencies": { - "@modern-js/module-tools": "workspace:^2.35.0" + "@modern-js/module-tools": "workspace:^2.35.1" }, "sideEffects": false, "publishConfig": { diff --git a/packages/module/plugin-module-banner/CHANGELOG.md b/packages/module/plugin-module-banner/CHANGELOG.md index f8e4edd699cb..465d5c1bc08a 100644 --- a/packages/module/plugin-module-banner/CHANGELOG.md +++ b/packages/module/plugin-module-banner/CHANGELOG.md @@ -1,5 +1,12 @@ # @modern-js/plugin-module-banner +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] + - @modern-js/module-tools@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/module/plugin-module-banner/package.json b/packages/module/plugin-module-banner/package.json index a800181e05f5..9fdd619d7061 100644 --- a/packages/module/plugin-module-banner/package.json +++ b/packages/module/plugin-module-banner/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "types": "./src/index.ts", "main": "./dist/index.js", "exports": { @@ -44,7 +44,7 @@ "@modern-js/libuild": "workspace:*" }, "peerDependencies": { - "@modern-js/module-tools": "workspace:^2.35.0" + "@modern-js/module-tools": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/module-tools": { diff --git a/packages/module/plugin-module-import/CHANGELOG.md b/packages/module/plugin-module-import/CHANGELOG.md index 63251328559a..ecc25de5bd55 100644 --- a/packages/module/plugin-module-import/CHANGELOG.md +++ b/packages/module/plugin-module-import/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/plugin-module-import +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] +- Updated dependencies [a45cc5b] +- Updated dependencies [14b0906] + - @modern-js/module-tools@2.35.1 + - @modern-js/libuild-plugin-swc@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/module/plugin-module-import/package.json b/packages/module/plugin-module-import/package.json index ea6ceff1bf33..5c46ca935cdc 100644 --- a/packages/module/plugin-module-import/package.json +++ b/packages/module/plugin-module-import/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "types": "./src/index.ts", "main": "./dist/index.js", "exports": { @@ -48,7 +48,7 @@ "@modern-js/libuild": "workspace:*" }, "peerDependencies": { - "@modern-js/module-tools": "workspace:^2.35.0" + "@modern-js/module-tools": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/module-tools": { diff --git a/packages/module/plugin-module-main-fields/CHANGELOG.md b/packages/module/plugin-module-main-fields/CHANGELOG.md index 56cf23a3c52b..49c7c1119a51 100644 --- a/packages/module/plugin-module-main-fields/CHANGELOG.md +++ b/packages/module/plugin-module-main-fields/CHANGELOG.md @@ -1,5 +1,12 @@ # @modern-js/plugin-module-main-fields +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] + - @modern-js/module-tools@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/module/plugin-module-main-fields/package.json b/packages/module/plugin-module-main-fields/package.json index 4fef80b61169..9c0dcc4da7ad 100644 --- a/packages/module/plugin-module-main-fields/package.json +++ b/packages/module/plugin-module-main-fields/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "types": "./src/index.ts", "main": "./dist/index.js", "scripts": { @@ -35,7 +35,7 @@ "@modern-js/module-tools": "workspace:*" }, "peerDependencies": { - "@modern-js/module-tools": "workspace:^2.35.0" + "@modern-js/module-tools": "workspace:^2.35.1" }, "sideEffects": false, "publishConfig": { diff --git a/packages/module/plugin-module-node-polyfill/CHANGELOG.md b/packages/module/plugin-module-node-polyfill/CHANGELOG.md index 4175a934c9e1..51d38616214b 100644 --- a/packages/module/plugin-module-node-polyfill/CHANGELOG.md +++ b/packages/module/plugin-module-node-polyfill/CHANGELOG.md @@ -1,5 +1,14 @@ # @modern-js/plugin-module-node-polyfill +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] +- Updated dependencies [6893765] + - @modern-js/module-tools@2.35.1 + - @modern-js/libuild-plugin-node-polyfill@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/module/plugin-module-node-polyfill/package.json b/packages/module/plugin-module-node-polyfill/package.json index 155fca430493..f5a2c80d11ea 100644 --- a/packages/module/plugin-module-node-polyfill/package.json +++ b/packages/module/plugin-module-node-polyfill/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "types": "./src/index.ts", "main": "./dist/index.js", "scripts": { @@ -35,7 +35,7 @@ "@modern-js/module-tools": "workspace:*" }, "peerDependencies": { - "@modern-js/module-tools": "workspace:^2.35.0" + "@modern-js/module-tools": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/module-tools": { diff --git a/packages/module/plugin-module-polyfill/CHANGELOG.md b/packages/module/plugin-module-polyfill/CHANGELOG.md index 5cdf4bd57d2f..5f2fa459db76 100644 --- a/packages/module/plugin-module-polyfill/CHANGELOG.md +++ b/packages/module/plugin-module-polyfill/CHANGELOG.md @@ -1,5 +1,13 @@ # @modern-js/plugin-module-polyfill +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] + - @modern-js/module-tools@2.35.1 + - @modern-js/libuild-plugin-babel@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/module/plugin-module-polyfill/package.json b/packages/module/plugin-module-polyfill/package.json index 314dbadb7626..0eeb72ef049c 100644 --- a/packages/module/plugin-module-polyfill/package.json +++ b/packages/module/plugin-module-polyfill/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "types": "./src/index.ts", "main": "./dist/index.js", "scripts": { @@ -35,7 +35,7 @@ "@modern-js/module-tools": "workspace:*" }, "peerDependencies": { - "@modern-js/module-tools": "workspace:^2.35.0", + "@modern-js/module-tools": "workspace:^2.35.1", "core-js-pure": "^3.25.0" }, "dependencies": { diff --git a/packages/module/plugin-module-target/CHANGELOG.md b/packages/module/plugin-module-target/CHANGELOG.md index 44b00aca8273..7c93852937e6 100644 --- a/packages/module/plugin-module-target/CHANGELOG.md +++ b/packages/module/plugin-module-target/CHANGELOG.md @@ -1,5 +1,12 @@ # @modern-js/plugin-module-target +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ce24aad] + - @modern-js/module-tools@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/module/plugin-module-target/package.json b/packages/module/plugin-module-target/package.json index 94f62a346ad7..e4f46f91e5a2 100644 --- a/packages/module/plugin-module-target/package.json +++ b/packages/module/plugin-module-target/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "types": "./src/index.ts", "main": "./dist/index.js", "scripts": { @@ -35,7 +35,7 @@ "@modern-js/module-tools": "workspace:*" }, "peerDependencies": { - "@modern-js/module-tools": "workspace:^2.35.0" + "@modern-js/module-tools": "workspace:^2.35.1" }, "sideEffects": false, "publishConfig": { diff --git a/packages/review/eslint-config-app/CHANGELOG.md b/packages/review/eslint-config-app/CHANGELOG.md index 6f9ed1fc4708..d104682b524e 100644 --- a/packages/review/eslint-config-app/CHANGELOG.md +++ b/packages/review/eslint-config-app/CHANGELOG.md @@ -1,5 +1,11 @@ # @modern-js-app/eslint-config +## 2.35.1 + +### Patch Changes + +- @modern-js/babel-preset-app@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/review/eslint-config-app/package.json b/packages/review/eslint-config-app/package.json index 7116da5b6cab..2ca1bede7f87 100644 --- a/packages/review/eslint-config-app/package.json +++ b/packages/review/eslint-config-app/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js-app/eslint-config", - "version": "2.35.0", + "version": "2.35.1", "description": "A Progressive React Framework for modern web development.", "homepage": "https://modernjs.dev", "bugs": "https://github.com/web-infra-dev/modern.js/issues", diff --git a/packages/review/eslint-config/CHANGELOG.md b/packages/review/eslint-config/CHANGELOG.md index 8796ebbb96b4..316bc16cecaf 100644 --- a/packages/review/eslint-config/CHANGELOG.md +++ b/packages/review/eslint-config/CHANGELOG.md @@ -1,5 +1,11 @@ # @modern-js/eslint-config +## 2.35.1 + +### Patch Changes + +- @modern-js-app/eslint-config@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/review/eslint-config/package.json b/packages/review/eslint-config/package.json index 14b8cc5b8685..d735db235f71 100644 --- a/packages/review/eslint-config/package.json +++ b/packages/review/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/eslint-config", - "version": "2.35.0", + "version": "2.35.1", "description": "A Progressive React Framework for modern web development.", "homepage": "https://modernjs.dev", "bugs": "https://github.com/web-infra-dev/modern.js/issues", diff --git a/packages/review/tsconfig/CHANGELOG.md b/packages/review/tsconfig/CHANGELOG.md index 38a3331a3c5e..9c0ff9658c44 100644 --- a/packages/review/tsconfig/CHANGELOG.md +++ b/packages/review/tsconfig/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/tsconfig +## 2.35.1 + ## 2.35.0 ## 2.34.0 diff --git a/packages/review/tsconfig/package.json b/packages/review/tsconfig/package.json index 59efa18ccedb..07462b2e54fd 100644 --- a/packages/review/tsconfig/package.json +++ b/packages/review/tsconfig/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/tsconfig", - "version": "2.35.0", + "version": "2.35.1", "description": "A Progressive React Framework for modern web development.", "homepage": "https://modernjs.dev", "bugs": "https://github.com/web-infra-dev/modern.js/issues", diff --git a/packages/runtime/plugin-garfish/CHANGELOG.md b/packages/runtime/plugin-garfish/CHANGELOG.md index 0d2faf258378..a3f0b7b06a09 100644 --- a/packages/runtime/plugin-garfish/CHANGELOG.md +++ b/packages/runtime/plugin-garfish/CHANGELOG.md @@ -1,5 +1,18 @@ # @modern-js/plugin-garfish +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [85f877b] +- Updated dependencies [4980480] +- Updated dependencies [7bc7e9c] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/runtime@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/runtime/plugin-garfish/package.json b/packages/runtime/plugin-garfish/package.json index d155b65675ed..0f283dddc7dd 100644 --- a/packages/runtime/plugin-garfish/package.json +++ b/packages/runtime/plugin-garfish/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/cli/index.ts", "types": "./src/cli/index.ts", "typesVersions": { @@ -81,7 +81,7 @@ "@swc/helpers": "0.5.1" }, "peerDependencies": { - "@modern-js/runtime": "workspace:^2.35.0", + "@modern-js/runtime": "workspace:^2.35.1", "react": ">=17", "react-dom": ">=17" }, diff --git a/packages/runtime/plugin-router-v5/CHANGELOG.md b/packages/runtime/plugin-router-v5/CHANGELOG.md index ab17dc40be3a..3f1ca0df581f 100644 --- a/packages/runtime/plugin-router-v5/CHANGELOG.md +++ b/packages/runtime/plugin-router-v5/CHANGELOG.md @@ -1,5 +1,20 @@ # @modern-js/plugin-router-v5 +## 2.35.1 + +### Patch Changes + +- 6a1d46e: refactor: split runtime utils into a seperate package + refactor: runtime utils 单独拆分成一个包 +- Updated dependencies [ea3fe18] +- Updated dependencies [14f95cf] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/runtime/plugin-router-v5/package.json b/packages/runtime/plugin-router-v5/package.json index a82569e54a8b..5aa89b9aa379 100644 --- a/packages/runtime/plugin-router-v5/package.json +++ b/packages/runtime/plugin-router-v5/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/cli/index.ts", "main": "./dist/cjs/cli/index.js", diff --git a/packages/runtime/plugin-runtime/CHANGELOG.md b/packages/runtime/plugin-runtime/CHANGELOG.md index 6d7f1c685384..db7017f3b4d1 100644 --- a/packages/runtime/plugin-runtime/CHANGELOG.md +++ b/packages/runtime/plugin-runtime/CHANGELOG.md @@ -1,5 +1,25 @@ # @modern-js/runtime +## 2.35.1 + +### Patch Changes + +- 85f877b: fix: ssr style link should not add scriptLoading attrributes + fix: ssr style link 标签 不应该添加 scriptLoading 属性 +- 7bc7e9c: fix: ssr loadable-component inject repeat css link tag + fix: ssr loadable-component 注入重复的 css link 标签 +- 6a1d46e: refactor: split runtime utils into a seperate package + refactor: runtime utils 单独拆分成一个包 +- Updated dependencies [ea3fe18] +- Updated dependencies [14f95cf] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin@2.35.1 + - @modern-js/runtime-utils@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Minor Changes diff --git a/packages/runtime/plugin-runtime/package.json b/packages/runtime/plugin-runtime/package.json index 66f2b17c54d9..c753bcb357b2 100644 --- a/packages/runtime/plugin-runtime/package.json +++ b/packages/runtime/plugin-runtime/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "engines": { "node": ">=14.17.6" }, diff --git a/packages/runtime/plugin-testing/CHANGELOG.md b/packages/runtime/plugin-testing/CHANGELOG.md index 7d0f731b4959..a54a9992c597 100644 --- a/packages/runtime/plugin-testing/CHANGELOG.md +++ b/packages/runtime/plugin-testing/CHANGELOG.md @@ -1,5 +1,27 @@ # @modern-js/plugin-testing +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [14f95cf] +- Updated dependencies [bb97082] +- Updated dependencies [9dd3151] +- Updated dependencies [0db5680] +- Updated dependencies [411cea2] +- Updated dependencies [85f877b] +- Updated dependencies [4980480] +- Updated dependencies [7bc7e9c] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin@2.35.1 + - @modern-js/prod-server@2.35.1 + - @modern-js/runtime@2.35.1 + - @modern-js/babel-preset-app@2.35.1 + - @modern-js/babel-compiler@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/runtime/plugin-testing/package.json b/packages/runtime/plugin-testing/package.json index af44d2597976..cf9049148f4a 100644 --- a/packages/runtime/plugin-testing/package.json +++ b/packages/runtime/plugin-testing/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/cli/index.ts", "types": "./src/cli/index.ts", "main": "./dist/cjs/cli/index.js", @@ -146,7 +146,7 @@ "peerDependencies": { "react": ">=17", "react-dom": ">=17", - "@modern-js/runtime": "workspace:^2.35.0" + "@modern-js/runtime": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/runtime": { diff --git a/packages/server/babel-plugin-module-resolver/CHANGELOG.md b/packages/server/babel-plugin-module-resolver/CHANGELOG.md index c08799f38b73..1300e2620c49 100644 --- a/packages/server/babel-plugin-module-resolver/CHANGELOG.md +++ b/packages/server/babel-plugin-module-resolver/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/babel-plugin-module-resolver +## 2.35.1 + ## 2.35.0 ## 2.34.0 diff --git a/packages/server/babel-plugin-module-resolver/package.json b/packages/server/babel-plugin-module-resolver/package.json index fca8c75b6593..35672e12ec20 100644 --- a/packages/server/babel-plugin-module-resolver/package.json +++ b/packages/server/babel-plugin-module-resolver/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.js", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/server/bff-core/CHANGELOG.md b/packages/server/bff-core/CHANGELOG.md index 31ee8746f786..fd5afc8e9e8c 100644 --- a/packages/server/bff-core/CHANGELOG.md +++ b/packages/server/bff-core/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/bff-core +## 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 diff --git a/packages/server/bff-core/package.json b/packages/server/bff-core/package.json index f53a2503c66f..7a053eda02d9 100644 --- a/packages/server/bff-core/package.json +++ b/packages/server/bff-core/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./dist/types/index.d.ts", "main": "./dist/cjs/index.js", diff --git a/packages/server/bff-runtime/CHANGELOG.md b/packages/server/bff-runtime/CHANGELOG.md index 0147f2159622..a353e8240fda 100644 --- a/packages/server/bff-runtime/CHANGELOG.md +++ b/packages/server/bff-runtime/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/bff-runtime +## 2.35.1 + ## 2.35.0 ## 2.34.0 diff --git a/packages/server/bff-runtime/package.json b/packages/server/bff-runtime/package.json index 3ac9332c9c63..e8e92941df83 100644 --- a/packages/server/bff-runtime/package.json +++ b/packages/server/bff-runtime/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/server/core/CHANGELOG.md b/packages/server/core/CHANGELOG.md index 7b5aa8d4ca36..fa4c2a458aa0 100644 --- a/packages/server/core/CHANGELOG.md +++ b/packages/server/core/CHANGELOG.md @@ -1,5 +1,17 @@ # @modern-js/server-plugin +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [14f95cf] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/server/core/package.json b/packages/server/core/package.json index 743c14822c33..08682c4653e5 100644 --- a/packages/server/core/package.json +++ b/packages/server/core/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/server/create-request/CHANGELOG.md b/packages/server/create-request/CHANGELOG.md index 9f9417bf2cf2..169f06e56926 100644 --- a/packages/server/create-request/CHANGELOG.md +++ b/packages/server/create-request/CHANGELOG.md @@ -1,5 +1,18 @@ # @modern-js/create-request +## 2.35.1 + +### Patch Changes + +- 6a1d46e: refactor: split runtime utils into a seperate package + refactor: runtime utils 单独拆分成一个包 +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/runtime-utils@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/server/create-request/package.json b/packages/server/create-request/package.json index a9c8dfdd4394..681ca8681b08 100644 --- a/packages/server/create-request/package.json +++ b/packages/server/create-request/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/node.ts", "types": "./src/node.ts", "main": "./dist/cjs/node.js", diff --git a/packages/server/plugin-express/CHANGELOG.md b/packages/server/plugin-express/CHANGELOG.md index 6429aa405c10..e3433853184a 100644 --- a/packages/server/plugin-express/CHANGELOG.md +++ b/packages/server/plugin-express/CHANGELOG.md @@ -1,5 +1,18 @@ # @modern-js/plugin-express +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/bff-core@2.35.1 + - @modern-js/bff-runtime@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/server/plugin-express/package.json b/packages/server/plugin-express/package.json index 152afecf4dc6..2006626b6998 100644 --- a/packages/server/plugin-express/package.json +++ b/packages/server/plugin-express/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/cli", "main": "./dist/cjs/cli/index.js", diff --git a/packages/server/plugin-koa/CHANGELOG.md b/packages/server/plugin-koa/CHANGELOG.md index 4221fee3a805..e2eb1324c9ef 100644 --- a/packages/server/plugin-koa/CHANGELOG.md +++ b/packages/server/plugin-koa/CHANGELOG.md @@ -1,5 +1,18 @@ # @modern-js/plugin-koa +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/bff-core@2.35.1 + - @modern-js/bff-runtime@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/server/plugin-koa/package.json b/packages/server/plugin-koa/package.json index c608dd8a2e31..317f1a826516 100644 --- a/packages/server/plugin-koa/package.json +++ b/packages/server/plugin-koa/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/cli", "main": "./dist/cjs/cli/index.js", diff --git a/packages/server/plugin-polyfill/CHANGELOG.md b/packages/server/plugin-polyfill/CHANGELOG.md index af35160aa031..b2dc386d2303 100644 --- a/packages/server/plugin-polyfill/CHANGELOG.md +++ b/packages/server/plugin-polyfill/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/plugin-polyfill +## 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 diff --git a/packages/server/plugin-polyfill/package.json b/packages/server/plugin-polyfill/package.json index ae8eb184d680..5cf4785a95db 100644 --- a/packages/server/plugin-polyfill/package.json +++ b/packages/server/plugin-polyfill/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/cli.ts", "types": "./src/cli.ts", "main": "./dist/cjs/cli.js", diff --git a/packages/server/plugin-server/CHANGELOG.md b/packages/server/plugin-server/CHANGELOG.md index d1194debc963..af07349ec3f9 100644 --- a/packages/server/plugin-server/CHANGELOG.md +++ b/packages/server/plugin-server/CHANGELOG.md @@ -1,5 +1,16 @@ # @modern-js/plugin-server +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/server-utils@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/server/plugin-server/package.json b/packages/server/plugin-server/package.json index 165de38a909e..b762ab6fe063 100644 --- a/packages/server/plugin-server/package.json +++ b/packages/server/plugin-server/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "types": "./src/cli", "jsnext:source": "./src/cli", "main": "./dist/cjs/cli.js", diff --git a/packages/server/plugin-worker/CHANGELOG.md b/packages/server/plugin-worker/CHANGELOG.md index fd741fa25f25..26d623789672 100644 --- a/packages/server/plugin-worker/CHANGELOG.md +++ b/packages/server/plugin-worker/CHANGELOG.md @@ -1,5 +1,20 @@ # @modern-js/plugin-worker +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [bb97082] +- Updated dependencies [9dd3151] +- Updated dependencies [0db5680] +- Updated dependencies [411cea2] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/prod-server@2.35.1 + - @modern-js/server-utils@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/server/plugin-worker/package.json b/packages/server/plugin-worker/package.json index fc9b428381b7..434c378c13bb 100644 --- a/packages/server/plugin-worker/package.json +++ b/packages/server/plugin-worker/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "types": "./src", "jsnext:source": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/server/prod-server/CHANGELOG.md b/packages/server/prod-server/CHANGELOG.md index 4652a98a13c0..d9c650416ac1 100644 --- a/packages/server/prod-server/CHANGELOG.md +++ b/packages/server/prod-server/CHANGELOG.md @@ -1,5 +1,33 @@ # @modern-js/prod-server +## 2.35.1 + +### Patch Changes + +- bb97082: fix(prod-server): error header key in other metaName + fix(prod-server): 错误的 header key 在不同的 metaName +- 0db5680: fix(app-tools): failed to emit modern.config.json when distPath.root is absolute path + + fix(app-tools): 修复 distPath.root 为绝对路径时无法输出 modern.config.json 的问题 + +- 411cea2: fix(prod-server): the server need use headersSent without use flushHeader + fix(prod-server): 没有 flushHeader 时 server 应该使用 headersSent +- 4980480: chore(prod-server): remove duplicated logger module + + chore(prod-server): 移除重复的 logger 模块 + +- 6a1d46e: refactor: split runtime utils into a seperate package + refactor: runtime utils 单独拆分成一个包 +- Updated dependencies [ea3fe18] +- Updated dependencies [14f95cf] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin@2.35.1 + - @modern-js/runtime-utils@2.35.1 + - @modern-js/server-core@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/server/prod-server/package.json b/packages/server/prod-server/package.json index f4669f88e1cf..ea09e111ccdf 100644 --- a/packages/server/prod-server/package.json +++ b/packages/server/prod-server/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/server/server/CHANGELOG.md b/packages/server/server/CHANGELOG.md index 3e6aa1b74ade..b977fa5dc2ba 100644 --- a/packages/server/server/CHANGELOG.md +++ b/packages/server/server/CHANGELOG.md @@ -1,5 +1,24 @@ # @modern-js/server +## 2.35.1 + +### Patch Changes + +- 6a1d46e: refactor: split runtime utils into a seperate package + refactor: runtime utils 单独拆分成一个包 +- Updated dependencies [ea3fe18] +- Updated dependencies [bb97082] +- Updated dependencies [9dd3151] +- Updated dependencies [0db5680] +- Updated dependencies [411cea2] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/prod-server@2.35.1 + - @modern-js/runtime-utils@2.35.1 + - @modern-js/server-utils@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/server/server/package.json b/packages/server/server/package.json index 42d1a6f06303..98b2e977a3bd 100644 --- a/packages/server/server/package.json +++ b/packages/server/server/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/server/utils/CHANGELOG.md b/packages/server/utils/CHANGELOG.md index f1ee9d559ada..cd54cf6b0924 100644 --- a/packages/server/utils/CHANGELOG.md +++ b/packages/server/utils/CHANGELOG.md @@ -1,5 +1,18 @@ # @modern-js/server-utils +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/babel-preset-base@2.35.1 + - @modern-js/babel-compiler@2.35.1 + - @modern-js/babel-plugin-module-resolver@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/server/utils/package.json b/packages/server/utils/package.json index 54f755efe172..de54bd88dfeb 100644 --- a/packages/server/utils/package.json +++ b/packages/server/utils/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/solutions/app-tools/CHANGELOG.md b/packages/solutions/app-tools/CHANGELOG.md index b1268e48c4f8..392637276cf7 100644 --- a/packages/solutions/app-tools/CHANGELOG.md +++ b/packages/solutions/app-tools/CHANGELOG.md @@ -1,5 +1,65 @@ # @modern-js/app-tools +## 2.35.1 + +### Patch Changes + +- ea3fe18: feat(app-tools): make logs easier to read + + feat(app-tools): 让日志更容易阅读 + +- 9dd3151: chore(app-tools): add RouterPlugin name + chore(app-tools): 增加 RouterPlugin 名称 +- 0db5680: fix(app-tools): failed to emit modern.config.json when distPath.root is absolute path + + fix(app-tools): 修复 distPath.root 为绝对路径时无法输出 modern.config.json 的问题 + +- 24482a5: feat: support splat route config file + feat: 支持通配路由配置文件 +- 578f94f: chore(rspack): use DataURI module instead of rspack-plugin-virtual-module + + chore(rspack): 使用 DataURI module 替代 rspack-plugin-virtual-module + +- 6a1d46e: refactor: split runtime utils into a seperate package + refactor: runtime utils 单独拆分成一个包 +- Updated dependencies [ce24aad] +- Updated dependencies [ea3fe18] +- Updated dependencies [de9cdee] +- Updated dependencies [14f95cf] +- Updated dependencies [4b8cdd3] +- Updated dependencies [bb97082] +- Updated dependencies [9dd3151] +- Updated dependencies [bc1413d] +- Updated dependencies [0db5680] +- Updated dependencies [411cea2] +- Updated dependencies [0988b12] +- Updated dependencies [4980480] +- Updated dependencies [dc93952] +- Updated dependencies [843cb2c] +- Updated dependencies [6b03be8] +- Updated dependencies [578f94f] +- Updated dependencies [6a1d46e] +- Updated dependencies [fe8caeb] + - @modern-js/builder-shared@2.35.1 + - @modern-js/builder-webpack-provider@2.35.1 + - @modern-js/builder-rspack-provider@2.35.1 + - @modern-js/builder@2.35.1 + - @modern-js/utils@2.35.1 + - @modern-js/plugin@2.35.1 + - @modern-js/core@2.35.1 + - @modern-js/prod-server@2.35.1 + - @modern-js/plugin-data-loader@2.35.1 + - @modern-js/server@2.35.1 + - @modern-js/builder-plugin-esbuild@2.35.1 + - @modern-js/builder-plugin-node-polyfill@2.35.1 + - @modern-js/plugin-i18n@2.35.1 + - @modern-js/plugin-lint@2.35.1 + - @modern-js/new-action@2.35.1 + - @modern-js/server-core@2.35.1 + - @modern-js/node-bundle-require@2.35.1 + - @modern-js/upgrade@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/solutions/app-tools/package.json b/packages/solutions/app-tools/package.json index 07280f3c05da..51f8efe4def7 100644 --- a/packages/solutions/app-tools/package.json +++ b/packages/solutions/app-tools/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", @@ -111,7 +111,7 @@ "webpack": "^5.88.1" }, "peerDependencies": { - "@modern-js/builder-rspack-provider": "workspace:^2.35.0" + "@modern-js/builder-rspack-provider": "workspace:^2.35.1" }, "peerDependenciesMeta": { "@modern-js/builder-rspack-provider": { diff --git a/packages/solutions/module-tools/CHANGELOG.md b/packages/solutions/module-tools/CHANGELOG.md index 8db151384a6a..a7a967b7a01c 100644 --- a/packages/solutions/module-tools/CHANGELOG.md +++ b/packages/solutions/module-tools/CHANGELOG.md @@ -1,5 +1,35 @@ # @modern-js/module-tools +## 2.35.1 + +### Patch Changes + +- ce24aad: feat: bump postcss-nesting v12 to support latest CSS nesting syntax + + feat: 升级 postcss-nesting v12,支持最新的 CSS nesting 语法 + +- Updated dependencies [ea3fe18] +- Updated dependencies [a45cc5b] +- Updated dependencies [14f95cf] +- Updated dependencies [4b8cdd3] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [14b0906] +- Updated dependencies [843cb2c] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/libuild-plugin-swc@2.35.1 + - @modern-js/plugin@2.35.1 + - @modern-js/core@2.35.1 + - @modern-js/plugin-changeset@2.35.1 + - @modern-js/plugin-i18n@2.35.1 + - @modern-js/plugin-lint@2.35.1 + - @modern-js/new-action@2.35.1 + - @modern-js/upgrade@2.35.1 + - @modern-js/libuild-plugin-svgr@2.35.1 + - @modern-js/libuild@2.35.1 + - @modern-js/types@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/solutions/module-tools/package.json b/packages/solutions/module-tools/package.json index 6ab3af212316..2f6adbf98eed 100644 --- a/packages/solutions/module-tools/package.json +++ b/packages/solutions/module-tools/package.json @@ -15,7 +15,7 @@ "module-tools", "lib-tools" ], - "version": "2.35.0", + "version": "2.35.1", "bin": { "modern": "./bin/modern.js", "modern-module": "./bin/modern.js" diff --git a/packages/solutions/monorepo-tools/CHANGELOG.md b/packages/solutions/monorepo-tools/CHANGELOG.md index f5b811abdc2a..8fbcee2d6b09 100644 --- a/packages/solutions/monorepo-tools/CHANGELOG.md +++ b/packages/solutions/monorepo-tools/CHANGELOG.md @@ -1,5 +1,25 @@ # @modern-js/monorepo-tools +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [14f95cf] +- Updated dependencies [4b8cdd3] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [843cb2c] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin@2.35.1 + - @modern-js/core@2.35.1 + - @modern-js/plugin-changeset@2.35.1 + - @modern-js/plugin-i18n@2.35.1 + - @modern-js/plugin-lint@2.35.1 + - @modern-js/new-action@2.35.1 + - @modern-js/upgrade@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/solutions/monorepo-tools/package.json b/packages/solutions/monorepo-tools/package.json index a6065265c291..71b59f855de5 100644 --- a/packages/solutions/monorepo-tools/package.json +++ b/packages/solutions/monorepo-tools/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/toolkit/compiler/babel/CHANGELOG.md b/packages/toolkit/compiler/babel/CHANGELOG.md index c7110cfaf106..0433e6c0653a 100644 --- a/packages/toolkit/compiler/babel/CHANGELOG.md +++ b/packages/toolkit/compiler/babel/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/babel-compiler +## 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 diff --git a/packages/toolkit/compiler/babel/package.json b/packages/toolkit/compiler/babel/package.json index 94bee856213b..bbbe71857b4b 100644 --- a/packages/toolkit/compiler/babel/package.json +++ b/packages/toolkit/compiler/babel/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/toolkit/create/CHANGELOG.md b/packages/toolkit/create/CHANGELOG.md index 0ae4363033e1..2fcebdeb0e10 100644 --- a/packages/toolkit/create/CHANGELOG.md +++ b/packages/toolkit/create/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/create +## 2.35.1 + ## 2.35.0 ## 2.34.0 diff --git a/packages/toolkit/create/package.json b/packages/toolkit/create/package.json index 67e9865ab97e..e5f96a09af03 100644 --- a/packages/toolkit/create/package.json +++ b/packages/toolkit/create/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/toolkit/e2e/CHANGELOG.md b/packages/toolkit/e2e/CHANGELOG.md index 9846235ea826..b6425ae8a242 100644 --- a/packages/toolkit/e2e/CHANGELOG.md +++ b/packages/toolkit/e2e/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/e2e +## 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 diff --git a/packages/toolkit/e2e/package.json b/packages/toolkit/e2e/package.json index 06bdd9dce44a..d51140d473bf 100644 --- a/packages/toolkit/e2e/package.json +++ b/packages/toolkit/e2e/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@modern-js/e2e", - "version": "2.35.0", + "version": "2.35.1", "scripts": { "prepublishOnly": "only-allow-pnpm", "build": "modern-lib build", diff --git a/packages/toolkit/monorepo-utils/CHANGELOG.md b/packages/toolkit/monorepo-utils/CHANGELOG.md index 105f3b39c9e5..fd6cee57c1a3 100644 --- a/packages/toolkit/monorepo-utils/CHANGELOG.md +++ b/packages/toolkit/monorepo-utils/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/monorepo-utils +## 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 diff --git a/packages/toolkit/monorepo-utils/package.json b/packages/toolkit/monorepo-utils/package.json index c92b4ba0bd6c..2401fab55d93 100644 --- a/packages/toolkit/monorepo-utils/package.json +++ b/packages/toolkit/monorepo-utils/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/toolkit/node-bundle-require/CHANGELOG.md b/packages/toolkit/node-bundle-require/CHANGELOG.md index dbfd365428a2..42f14a077d60 100644 --- a/packages/toolkit/node-bundle-require/CHANGELOG.md +++ b/packages/toolkit/node-bundle-require/CHANGELOG.md @@ -1,5 +1,15 @@ # @modern-js/node-bundle-require +## 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 diff --git a/packages/toolkit/node-bundle-require/package.json b/packages/toolkit/node-bundle-require/package.json index 28ae31b50a85..7ba647af7b69 100644 --- a/packages/toolkit/node-bundle-require/package.json +++ b/packages/toolkit/node-bundle-require/package.json @@ -1,6 +1,6 @@ { "name": "@modern-js/node-bundle-require", - "version": "2.35.0", + "version": "2.35.1", "description": "A Progressive React Framework for modern web development.", "homepage": "https://modernjs.dev", "bugs": "https://github.com/web-infra-dev/modern.js/issues", diff --git a/packages/toolkit/plugin/CHANGELOG.md b/packages/toolkit/plugin/CHANGELOG.md index 127647914528..f79f03c9b1f7 100644 --- a/packages/toolkit/plugin/CHANGELOG.md +++ b/packages/toolkit/plugin/CHANGELOG.md @@ -1,5 +1,19 @@ # @modern-js/plugin +## 2.35.1 + +### Patch Changes + +- 14f95cf: fix(plugin): run async setup function in the correct order + + fix(plugin): 以正确的顺序执行异步的 setup 函数 + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/toolkit/plugin/package.json b/packages/toolkit/plugin/package.json index 122ad90615a8..26aebbed7b20 100644 --- a/packages/toolkit/plugin/package.json +++ b/packages/toolkit/plugin/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/packages/toolkit/runtime-utils/CHANGELOG.md b/packages/toolkit/runtime-utils/CHANGELOG.md index e69de29bb2d1..675140b22785 100644 --- a/packages/toolkit/runtime-utils/CHANGELOG.md +++ b/packages/toolkit/runtime-utils/CHANGELOG.md @@ -0,0 +1,13 @@ +# @modern-js/runtime-utils + +## 2.35.1 + +### Patch Changes + +- 6a1d46e: refactor: split runtime utils into a seperate package + refactor: runtime utils 单独拆分成一个包 +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 diff --git a/packages/toolkit/runtime-utils/package.json b/packages/toolkit/runtime-utils/package.json index 0ddd53719088..ee463fc26060 100644 --- a/packages/toolkit/runtime-utils/package.json +++ b/packages/toolkit/runtime-utils/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.34.0", + "version": "2.35.1", "_comment": "Provide ESM and CJS exports, ESM is used by runtime package, for treeshaking", "exports": { "./router": { diff --git a/packages/toolkit/types/CHANGELOG.md b/packages/toolkit/types/CHANGELOG.md index fb854bfb5f4d..3239d78e7a6f 100644 --- a/packages/toolkit/types/CHANGELOG.md +++ b/packages/toolkit/types/CHANGELOG.md @@ -1,5 +1,7 @@ # @modern-js/types +## 2.35.1 + ## 2.35.0 ## 2.34.0 diff --git a/packages/toolkit/types/package.json b/packages/toolkit/types/package.json index ec2feafffb0c..1c77f2ca7767 100644 --- a/packages/toolkit/types/package.json +++ b/packages/toolkit/types/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "types": "./index.d.ts", "exports": { ".": { diff --git a/packages/toolkit/upgrade/CHANGELOG.md b/packages/toolkit/upgrade/CHANGELOG.md index 4d109746bad1..ca78751c5bb1 100644 --- a/packages/toolkit/upgrade/CHANGELOG.md +++ b/packages/toolkit/upgrade/CHANGELOG.md @@ -1,5 +1,16 @@ # @modern-js/upgrade +## 2.35.1 + +### Patch Changes + +- Updated dependencies [ea3fe18] +- Updated dependencies [9dd3151] +- Updated dependencies [4980480] +- Updated dependencies [6a1d46e] + - @modern-js/utils@2.35.1 + - @modern-js/plugin-i18n@2.35.1 + ## 2.35.0 ### Patch Changes diff --git a/packages/toolkit/upgrade/package.json b/packages/toolkit/upgrade/package.json index a8bbe2f4b59d..2aedf3cfb553 100644 --- a/packages/toolkit/upgrade/package.json +++ b/packages/toolkit/upgrade/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/index.js", diff --git a/packages/toolkit/utils/CHANGELOG.md b/packages/toolkit/utils/CHANGELOG.md index 904dd4903ba6..4857e09c312e 100644 --- a/packages/toolkit/utils/CHANGELOG.md +++ b/packages/toolkit/utils/CHANGELOG.md @@ -1,5 +1,22 @@ # @modern-js/utils +## 2.35.1 + +### Patch Changes + +- ea3fe18: feat(app-tools): make logs easier to read + + feat(app-tools): 让日志更容易阅读 + +- 9dd3151: chore(app-tools): add RouterPlugin name + chore(app-tools): 增加 RouterPlugin 名称 +- 4980480: chore(prod-server): remove duplicated logger module + + chore(prod-server): 移除重复的 logger 模块 + +- 6a1d46e: refactor: split runtime utils into a seperate package + refactor: runtime utils 单独拆分成一个包 + ## 2.35.0 ### Patch Changes diff --git a/packages/toolkit/utils/package.json b/packages/toolkit/utils/package.json index dc9c9d035e11..a9accf951535 100644 --- a/packages/toolkit/utils/package.json +++ b/packages/toolkit/utils/package.json @@ -15,7 +15,7 @@ "modern", "modern.js" ], - "version": "2.35.0", + "version": "2.35.1", "jsnext:source": "./src/index.ts", "types": "./src/index.ts", "main": "./dist/cjs/index.js", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 218a7b10e333..57b24b04e936 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -122,10 +122,10 @@ importers: specifier: workspace:* version: link:../builder '@modern-js/builder-rspack-provider': - specifier: workspace:^2.35.0 + specifier: workspace:^2.35.1 version: link:../builder-rspack-provider '@modern-js/builder-webpack-provider': - specifier: workspace:^2.35.0 + specifier: workspace:^2.35.1 version: link:../builder-webpack-provider '@modern-js/utils': specifier: workspace:* @@ -1333,7 +1333,7 @@ importers: specifier: workspace:* version: link:../../builder/builder-webpack-provider '@modern-js/plugin-router-v5': - specifier: workspace:^2.35.0 + specifier: workspace:^2.35.1 version: link:../../runtime/plugin-router-v5 '@modern-js/utils': specifier: workspace:* diff --git a/scripts/build/package.json b/scripts/build/package.json index 7bcd528092b4..44baa78ff174 100644 --- a/scripts/build/package.json +++ b/scripts/build/package.json @@ -1,7 +1,7 @@ { "name": "@scripts/build", "private": true, - "version": "2.35.0", + "version": "2.35.1", "main": "./src/index.js", "types": "index.d.ts", "bin": { diff --git a/scripts/check-changeset/package.json b/scripts/check-changeset/package.json index 1dbb3a2e661b..15ce43986045 100644 --- a/scripts/check-changeset/package.json +++ b/scripts/check-changeset/package.json @@ -1,6 +1,6 @@ { "name": "@scripts/check-changeset", - "version": "2.35.0", + "version": "2.35.1", "private": true, "scripts": { "dev": "tsc --watch", diff --git a/scripts/jest-config/package.json b/scripts/jest-config/package.json index 23b10a79817f..5bad040f36a6 100644 --- a/scripts/jest-config/package.json +++ b/scripts/jest-config/package.json @@ -1,7 +1,7 @@ { "name": "@scripts/jest-config", "private": true, - "version": "2.35.0", + "version": "2.35.1", "main": "jest.config.js", "devDependencies": { "@swc/core": "1.3.42", diff --git a/scripts/lint-package-json/package.json b/scripts/lint-package-json/package.json index 3d75d3b9f96a..f1641d79f903 100644 --- a/scripts/lint-package-json/package.json +++ b/scripts/lint-package-json/package.json @@ -1,6 +1,6 @@ { "name": "@scripts/lint-package-json", - "version": "2.35.0", + "version": "2.35.1", "private": true, "scripts": { "dev": "tsc --watch", diff --git a/scripts/prebundle/package.json b/scripts/prebundle/package.json index a529c66cb67e..0776bd31e9a2 100644 --- a/scripts/prebundle/package.json +++ b/scripts/prebundle/package.json @@ -1,7 +1,7 @@ { "name": "@scripts/prebundle", "private": true, - "version": "2.35.0", + "version": "2.35.1", "main": "./dist/index.js", "scripts": { "dev": "tsc --watch", diff --git a/scripts/update-codesmith/package.json b/scripts/update-codesmith/package.json index 467c174f6f88..507794e654b2 100644 --- a/scripts/update-codesmith/package.json +++ b/scripts/update-codesmith/package.json @@ -1,6 +1,6 @@ { "name": "@scripts/update-codesmith", - "version": "2.35.0", + "version": "2.35.1", "private": true, "scripts": { "dev": "tsc --watch", diff --git a/scripts/update-rspress/package.json b/scripts/update-rspress/package.json index e5eb96028b6d..8200d6efe1fe 100644 --- a/scripts/update-rspress/package.json +++ b/scripts/update-rspress/package.json @@ -1,6 +1,6 @@ { "name": "@scripts/update-rspress", - "version": "2.35.0", + "version": "2.35.1", "private": true, "scripts": { "dev": "tsc --watch", diff --git a/scripts/vitest-config/package.json b/scripts/vitest-config/package.json index 9f90d871feea..bca56368d0e4 100644 --- a/scripts/vitest-config/package.json +++ b/scripts/vitest-config/package.json @@ -1,7 +1,7 @@ { "name": "@scripts/vitest-config", "private": true, - "version": "2.35.0", + "version": "2.35.1", "main": "dist/index.js", "typings": "dist/index.d.ts", "scripts": {