From f1752813f5d43c6e4a479193f30fbb21b955aef6 Mon Sep 17 00:00:00 2001 From: easy1090 <752355956@qq.com> Date: Wed, 10 Jan 2024 22:58:51 +0800 Subject: [PATCH 1/4] feat(bundle): rspack mode add bundle analysis by rspack's hooks and add rules scan. --- examples/rsbuild-minimal/package.json | 7 +- examples/rsbuild-minimal/rsbuild.config.ts | 3 +- examples/rsbuild-minimal/src/App.tsx | 3 +- examples/rsbuild-minimal/src/semver.ts | 11 ++ examples/rsbuild-minimal/src/semver7.ts | 11 ++ packages/client/rsbuild.config.ts | 1 + .../src/components/Alert/package-relation.tsx | 5 +- .../src/components/CodeViewer/hightlight.tsx | 4 +- .../src/pages/BundleSize/components/asset.tsx | 7 +- packages/core/package.json | 4 +- .../build/module-graph/webpack/transform.ts | 14 +- .../src/inner-plugins}/plugins/bundle.ts | 28 +++- .../plugins/ensureModulesChunkGraph.ts | 114 ++++++++++++++ .../core/src/inner-plugins/plugins/index.ts | 3 + .../src/inner-plugins}/plugins/rules.ts | 15 +- .../loader-performance-optimization/index.ts | 6 +- packages/rspack-plugin/src/plugin.ts | 31 ++-- packages/types/src/plugin/baseStats.ts | 4 + packages/webpack-plugin/src/index.ts | 1 - packages/webpack-plugin/src/plugin.ts | 149 +----------------- pnpm-lock.yaml | 22 ++- 21 files changed, 249 insertions(+), 194 deletions(-) create mode 100644 examples/rsbuild-minimal/src/semver.ts create mode 100644 examples/rsbuild-minimal/src/semver7.ts rename packages/{webpack-plugin/src => core/src/inner-plugins}/plugins/bundle.ts (67%) create mode 100644 packages/core/src/inner-plugins/plugins/ensureModulesChunkGraph.ts rename packages/{webpack-plugin/src => core/src/inner-plugins}/plugins/rules.ts (79%) diff --git a/examples/rsbuild-minimal/package.json b/examples/rsbuild-minimal/package.json index 216ec2f4..eb999c95 100644 --- a/examples/rsbuild-minimal/package.json +++ b/examples/rsbuild-minimal/package.json @@ -16,14 +16,17 @@ "license": "MIT", "dependencies": { "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "semver6": "npm:semver@6.3.1", + "semver7": "npm:semver@7.5.4" }, "devDependencies": { "@rsbuild/core": "0.2.15", - "@rsbuild/plugin-react": "0.2.15", + "@rsbuild/plugin-react": "0.2.15", "@rsdoctor/rspack-plugin": "workspace:*", "@types/react": "^18", "@types/react-dom": "^18", + "@types/semver6": "npm:@types/semver@7.5.6", "typescript": "^5.3.0" } } diff --git a/examples/rsbuild-minimal/rsbuild.config.ts b/examples/rsbuild-minimal/rsbuild.config.ts index c6e32162..be54878a 100644 --- a/examples/rsbuild-minimal/rsbuild.config.ts +++ b/examples/rsbuild-minimal/rsbuild.config.ts @@ -15,6 +15,7 @@ export default defineConfig({ } }, output: { - disableMinimize: false + disableFilenameHash: true, + disableMinimize: true } }); diff --git a/examples/rsbuild-minimal/src/App.tsx b/examples/rsbuild-minimal/src/App.tsx index 04175a84..5dacbbe0 100644 --- a/examples/rsbuild-minimal/src/App.tsx +++ b/examples/rsbuild-minimal/src/App.tsx @@ -1,5 +1,6 @@ import './App.css'; -import './button.css'; +import './semver'; +import './semver7'; const App = () => { return ( diff --git a/examples/rsbuild-minimal/src/semver.ts b/examples/rsbuild-minimal/src/semver.ts new file mode 100644 index 00000000..64cc0e34 --- /dev/null +++ b/examples/rsbuild-minimal/src/semver.ts @@ -0,0 +1,11 @@ +import semver from 'semver6'; + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' \ No newline at end of file diff --git a/examples/rsbuild-minimal/src/semver7.ts b/examples/rsbuild-minimal/src/semver7.ts new file mode 100644 index 00000000..ac4da1c3 --- /dev/null +++ b/examples/rsbuild-minimal/src/semver7.ts @@ -0,0 +1,11 @@ +import semver from 'semver7'; + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' \ No newline at end of file diff --git a/packages/client/rsbuild.config.ts b/packages/client/rsbuild.config.ts index 5346358d..b96f8646 100644 --- a/packages/client/rsbuild.config.ts +++ b/packages/client/rsbuild.config.ts @@ -66,6 +66,7 @@ export default defineConfig((env) => { }, performance: { + buildCache: false, chunkSplit: { strategy: 'custom', splitChunks: { diff --git a/packages/components/src/components/Alert/package-relation.tsx b/packages/components/src/components/Alert/package-relation.tsx index 810ae3d5..87140b73 100644 --- a/packages/components/src/components/Alert/package-relation.tsx +++ b/packages/components/src/components/Alert/package-relation.tsx @@ -44,9 +44,10 @@ export const PackageRelationReasons: React.FC<{ {data.map((e, i) => { const { dependency, module, relativePath } = e!; const { statements } = dependency; - const { start } = module.isPreferSource + const { start } = statements?.[0]?.position ? module.isPreferSource ? statements[0].position.source! - : statements[0].position.transformed; + : statements[0].position.transformed + : { start:{ line:0, column: 0 } }; const text = `${relativePath}:${start.line}:${start.column || 1}`; return ( diff --git a/packages/components/src/components/CodeViewer/hightlight.tsx b/packages/components/src/components/CodeViewer/hightlight.tsx index 9c4d470e..6d638dd1 100644 --- a/packages/components/src/components/CodeViewer/hightlight.tsx +++ b/packages/components/src/components/CodeViewer/hightlight.tsx @@ -21,8 +21,8 @@ export const FileHightLightViewer: React.FC = ({ depe if (!dependency) return null; const { statements } = dependency; - const hasSourceRange = Boolean(statements[0].position.source); - const { start, end } = hasSourceRange ? statements[0].position.source! : statements[0].position.transformed; + const hasSourceRange = Boolean(statements?.[0]?.position?.source); + const { start, end } = statements?.[0]?.position ? hasSourceRange ? statements[0].position.source! : statements[0].position.transformed : { start: { line: 0, column: 0 }, end: { line: 0, column: 0 } } ; const content = hasSourceRange ? moduleCode?.source : moduleCode?.transformed; const modulePath = module.path; diff --git a/packages/components/src/pages/BundleSize/components/asset.tsx b/packages/components/src/pages/BundleSize/components/asset.tsx index 1ee9a531..9e49e5e5 100644 --- a/packages/components/src/pages/BundleSize/components/asset.tsx +++ b/packages/components/src/pages/BundleSize/components/asset.tsx @@ -30,7 +30,7 @@ const tagStyle = { }; export const ModuleCodeViewer: React.FC<{ data: SDK.ModuleData }> = ({ data }) => { - const [tab, setTab] = useState('parsedSource'); + const [tab, setTab] = useState('source'); const { t } = useI18n(); const TAB_LAB_MAP: Record = { @@ -60,19 +60,18 @@ export const ModuleCodeViewer: React.FC<{ data: SDK.ModuleData }> = ({ data }) = {(source) => { return ( <> - { !source['source'] && !source['parsedSource'] ? + { !source['source'] && !source['parsedSource'] && !source['transformed'] ? : !s)).map(k => ({ 'tab': k })).map((e) => ({ + tabList={Object.keys(omitBy(source, (s) => !s)).map(k => ({ tab: k })).map((e) => ({ ...e, tab: TAB_LAB_MAP[e.tab], key: e.tab, }) )} - activeTabKey={tab} onTabChange={(v) => setTab(v)} tabBarExtraContent={ ; @@ -173,12 +174,12 @@ async function appendModuleData( ? '' : module.getSource().transformed.length > 0 ? module.getSource().transformed - : origin.originalSource?.()?.source().toString() ?? ''; + : isFunction(origin?.originalSource) ? origin.originalSource()?.source()?.toString() : ''; const transformedSize = isExternalModule(origin) ? 0 : module.getSize().transformedSize > 0 ? module.getSize().transformedSize - : Buffer.from(transformed).byteLength; + : Buffer.from(transformed as string).byteLength; // TODO:: rspack module.setSource({ transformed, @@ -216,7 +217,7 @@ async function appendModuleData( origin.buildMeta?.strictHarmonyModule ?? false; module.meta.packageData = packageData; - if (!features?.lite) { + if (!features?.lite && origin?.dependencies) { // lite bundle Mode don't have dependency; // Record dependent data. Array.from(origin.dependencies) @@ -244,13 +245,6 @@ export async function appendModuleGraphByCompilation( context?: TransformContext, ) { try { - // Rspack does not follow webpack graph logic, which affects tree-shaking analysis - if ( - 'rspackVersion' in compilation.compiler && - compilation.compiler.rspackVersion - ) { - return graph; - } // Only webpack will execute the following logic. const { moduleGraph: webpackGraph, fileSystemInfo } = diff --git a/packages/webpack-plugin/src/plugins/bundle.ts b/packages/core/src/inner-plugins/plugins/bundle.ts similarity index 67% rename from packages/webpack-plugin/src/plugins/bundle.ts rename to packages/core/src/inner-plugins/plugins/bundle.ts index 29e3494b..922e2d59 100644 --- a/packages/webpack-plugin/src/plugins/bundle.ts +++ b/packages/core/src/inner-plugins/plugins/bundle.ts @@ -1,10 +1,11 @@ -import { Chunks } from '@rsdoctor/core/common-utils'; -import { InternalBasePlugin } from '@rsdoctor/core/plugins'; -import { Manifest } from '@rsdoctor/types'; -import type { Compilation, Compiler } from 'webpack'; + +import { Manifest, Plugin } from '@rsdoctor/types'; +import { InternalBasePlugin } from './base'; +import { Chunks } from '@/build-utils/common'; + export class InternalBundlePlugin< - T extends Compiler, + T extends Plugin.BaseCompiler, > extends InternalBasePlugin { public readonly name = 'bundle'; @@ -25,11 +26,11 @@ export class InternalBundlePlugin< return v; } - public thisCompilation = (compilation: Compilation) => { + public thisCompilation = (compilation: Plugin.BaseCompilation) => { // save asset content to map if ( compilation.hooks.processAssets && - compilation.hooks.afterOptimizeAssets + 'afterOptimizeAssets' in compilation.hooks ) { compilation.hooks.afterOptimizeAssets.tap( this.tapPostOptions, @@ -40,7 +41,18 @@ export class InternalBundlePlugin< }); }, ); - } else { + } else if (compilation.hooks.processAssets) { + // This is for rspack hooks. + compilation.hooks.processAssets.tap( // TODO:: change to afterProcessAssets hook. + this.tapPostOptions, + () => { + Object.keys(compilation.assets).forEach((file) => { + const v = this.ensureAssetContent(file); + v.content = compilation.assets[file].source().toString(); + }); + }, + ); + } else if ('afterOptimizeChunkAssets' in compilation.hooks) { compilation.hooks.afterOptimizeChunkAssets.tap( this.tapPostOptions, (chunks) => { diff --git a/packages/core/src/inner-plugins/plugins/ensureModulesChunkGraph.ts b/packages/core/src/inner-plugins/plugins/ensureModulesChunkGraph.ts new file mode 100644 index 00000000..b0d9c79a --- /dev/null +++ b/packages/core/src/inner-plugins/plugins/ensureModulesChunkGraph.ts @@ -0,0 +1,114 @@ + +import { Linter, Plugin } from '@rsdoctor/types'; +import { debug } from '@rsdoctor/utils/logger'; +import { Process } from '@rsdoctor/utils/build'; +import { + Chunks as ChunksBuildUtils, + ModuleGraph as ModuleGraphBuildUtils, +} from '../../build-utils/build'; +import { + Chunks as ChunksUtils, +} from '../../build-utils/common'; +import fse from 'fs-extra'; +import { internalPluginTapPreOptions } from '../constants'; +import { DoctorPluginInstance } from '@/types'; +import { ModuleGraph } from '@rsdoctor/graph'; + + /** + * @description Generate ModuleGraph and ChunkGraph from stats and webpack module apis; + * @param {Compiler} compiler + * @return {*} + * @memberof DoctorWebpackPlugin + */ + export const ensureModulesChunksGraphFn = (compiler: Plugin.BaseCompiler, _this: DoctorPluginInstance) => { + if (_this._modulesGraphApplied) return; + _this._modulesGraphApplied = true; + + const context: Required = { + astCache: new Map(), + packagePathMap: new Map(), + getSourceMap: (file: string) => { + return _this.sdk.getSourceMap(file); + }, + }; + + compiler.hooks.done.tapPromise( + internalPluginTapPreOptions('moduleGraph'), + async (_stats) => { + const stats = _stats as Plugin.Stats; + const statsJson = stats.toJson(); + + debug(Process.getMemoryUsageMessage, '[Before Generate ModuleGraph]'); + + _this.chunkGraph = ChunksBuildUtils.chunkTransform(new Map(), statsJson); + + /** generate module graph */ + _this.modulesGraph = await ModuleGraphBuildUtils.getModuleGraphByStats( + stats.compilation, + statsJson, + process.cwd(), + _this.chunkGraph, + _this.options.features, + context, + ); + + debug(Process.getMemoryUsageMessage, '[After Generate ModuleGraph]'); + + + /** transform modules graph */ + await getModulesInfosByStats( + compiler, + statsJson, + _this.modulesGraph, + ); + + debug(Process.getMemoryUsageMessage, '[After Transform ModuleGraph]'); + + _this.modulesGraph && + (await _this.sdk.reportModuleGraph(_this.modulesGraph)); + await _this.sdk.reportChunkGraph(_this.chunkGraph); + + /** Generate webpack-bundle-analyzer tile graph */ + const reportFilePath = await ChunksBuildUtils.generateTileGraph( + statsJson as Plugin.BaseStats, + { + reportFilename: ChunksBuildUtils.TileGraphReportName, + reportTitle: 'bundle-analyzer', + }, + compiler.outputPath, + ); + + reportFilePath && + (await _this.sdk.reportTileHtml( + fse.readFileSync(reportFilePath, 'utf-8'), + )); + }, + ); + } + + /** + * @protected + * @description This function to get module parsed code and size; + * @param {Compiler} compiler + * @param {StatsCompilation} stats + * @param {ModuleGraph} moduleGraph + * @return {*} + * @memberof DoctorWebpackPlugin + */ + async function getModulesInfosByStats( + compiler: Plugin.BaseCompiler, + stats: Plugin.StatsCompilation, + moduleGraph: ModuleGraph, + ) { + if (!moduleGraph) { + return; + } + try { + const parsedModulesData = + (await ChunksBuildUtils.getAssetsModulesData( + stats, + compiler.outputPath, + )) || {}; + ChunksUtils.transformAssetsModulesData(parsedModulesData, moduleGraph); + } catch (e) {} + } \ No newline at end of file diff --git a/packages/core/src/inner-plugins/plugins/index.ts b/packages/core/src/inner-plugins/plugins/index.ts index 6bb3b304..5fe8f52a 100644 --- a/packages/core/src/inner-plugins/plugins/index.ts +++ b/packages/core/src/inner-plugins/plugins/index.ts @@ -4,3 +4,6 @@ export * from './errors'; export * from './progress'; export * from './summary'; export * from './base'; +export * from './bundle'; +export * from './ensureModulesChunkGraph'; +export * from './rules'; \ No newline at end of file diff --git a/packages/webpack-plugin/src/plugins/rules.ts b/packages/core/src/inner-plugins/plugins/rules.ts similarity index 79% rename from packages/webpack-plugin/src/plugins/rules.ts rename to packages/core/src/inner-plugins/plugins/rules.ts index 3b438881..89f63b88 100644 --- a/packages/webpack-plugin/src/plugins/rules.ts +++ b/packages/core/src/inner-plugins/plugins/rules.ts @@ -1,21 +1,22 @@ -import { InternalBasePlugin } from '@rsdoctor/core/plugins'; -import { Linter } from '@rsdoctor/core/rules'; +import { InternalBasePlugin } from '../plugins'; +import { Linter } from '../../rules'; import { DevToolError } from '@rsdoctor/utils/error'; import { isArray, pull } from 'lodash'; -import type { Compilation, Compiler, Stats, WebpackError } from 'webpack'; +import { Plugin } from '@rsdoctor/types' +import { WebpackError } from 'webpack'; -export class InternalRulesPlugin extends InternalBasePlugin { +export class InternalRulesPlugin extends InternalBasePlugin { public readonly name = 'rules'; - public apply(compiler: Compiler) { + public apply(compiler: Plugin.BaseCompiler) { compiler.hooks.done.tapPromise(this.tapPreOptions, this.done); } - public done = async (stats: Stats): Promise => { + public done = async (stats: Plugin.BaseStats): Promise => { await this.lint(stats.compilation); }; - protected async lint(compilation: Compilation) { + protected async lint(compilation: Plugin.BaseCompilation) { const options = this.options ?? {}; const linter = new Linter(options.linter); const result = await linter.validate(this.sdk.getRuleContext({})); diff --git a/packages/core/src/rules/rules/loader-performance-optimization/index.ts b/packages/core/src/rules/rules/loader-performance-optimization/index.ts index 73c5352b..c4d242d5 100644 --- a/packages/core/src/rules/rules/loader-performance-optimization/index.ts +++ b/packages/core/src/rules/rules/loader-performance-optimization/index.ts @@ -27,8 +27,12 @@ export const rule = defineRule(() => { if (extensions.length === 0) return; if (loader.length === 0) return; + + const { config } = configs.find((e) => e.name === 'webpack')! || { config: undefined } ; - const { config } = configs.find((e) => e.name === 'webpack')!; + if (!config) { + return + } const cwd = config.context || root; const nodeModulesPathRegexp = /\/node_modules\//; diff --git a/packages/rspack-plugin/src/plugin.ts b/packages/rspack-plugin/src/plugin.ts index 571aea75..b608b3a0 100644 --- a/packages/rspack-plugin/src/plugin.ts +++ b/packages/rspack-plugin/src/plugin.ts @@ -10,6 +10,9 @@ import { makeRulesSerializable, normalizeUserConfig, setSDK, + ensureModulesChunksGraphFn, + InternalBundlePlugin, + InternalRulesPlugin, } from '@rsdoctor/core/plugins'; import type { DoctorPluginInstance, @@ -24,7 +27,6 @@ import { SDK, } from '@rsdoctor/types'; import path from 'path'; -import { TransUtils } from '@rsdoctor/core/common-utils'; import { pluginTapName, pluginTapPostOptions } from './constants'; import { cloneDeep } from 'lodash'; @@ -83,6 +85,23 @@ export class RsdoctorRspackPlugin if (this.options.features.plugins) { new InternalPluginsPlugin(this).apply(compiler); } + + if (this.options.features.bundle) { + new InternalBundlePlugin(this).apply(compiler); + } + + new InternalRulesPlugin(this).apply(compiler); + } + + + /** + * @description Generate ModuleGraph and ChunkGraph from stats and webpack module apis; + * @param {Compiler} compiler + * @return {*} + * @memberof DoctorWebpackPlugin + */ + public ensureModulesChunksGraphApplied(compiler: Compiler) { + ensureModulesChunksGraphFn(compiler, this) } public done = async (compiler: Compiler): Promise => { @@ -99,17 +118,13 @@ export class RsdoctorRspackPlugin builtAt: true, chunkRelations: true, }) as Plugin.StatsCompilation; // TODO: if this type can compatible? - const { chunkGraph, moduleGraph } = await TransUtils.transStats(json); this.getRspackConfig(compiler, json.rspackVersion || ''); await this.sdk.bootstrap(); - this.sdk.reportChunkGraph(chunkGraph); - this.sdk.reportModuleGraph(moduleGraph); + this.sdk.addClientRoutes([ ManifestType.DoctorManifestClientRoutes.Overall, - ManifestType.DoctorManifestClientRoutes.BundleSize, - ManifestType.DoctorManifestClientRoutes.ModuleGraph, ]); /** Generate rspack-bundle-analyzer tile graph */ @@ -165,8 +180,4 @@ export class RsdoctorRspackPlugin this.sdk.setName(configuration.name); } } - - public ensureModulesChunksGraphApplied() { - // empty functions - } } diff --git a/packages/types/src/plugin/baseStats.ts b/packages/types/src/plugin/baseStats.ts index e36e8be3..15204b42 100644 --- a/packages/types/src/plugin/baseStats.ts +++ b/packages/types/src/plugin/baseStats.ts @@ -1,3 +1,5 @@ +import { BaseCompilation } from "./baseCompiler"; + interface StatsOptionsObj { all?: boolean; preset?: 'normal' | 'none' | 'verbose' | 'errors-only' | 'errors-warnings'; @@ -115,6 +117,8 @@ interface StatsChunk { export declare class Stats { constructor(statsJson: any); + compilation: BaseCompilation; + hasErrors(): boolean; hasWarnings(): boolean; diff --git a/packages/webpack-plugin/src/index.ts b/packages/webpack-plugin/src/index.ts index 37406f7a..f674664f 100644 --- a/packages/webpack-plugin/src/index.ts +++ b/packages/webpack-plugin/src/index.ts @@ -1,5 +1,4 @@ export * from './plugin'; export * from './multiple'; -export * from './plugins/bundle'; export { defineRule, LinterType } from '@rsdoctor/core/rules'; diff --git a/packages/webpack-plugin/src/plugin.ts b/packages/webpack-plugin/src/plugin.ts index c2e129dc..7f2b6682 100644 --- a/packages/webpack-plugin/src/plugin.ts +++ b/packages/webpack-plugin/src/plugin.ts @@ -1,15 +1,11 @@ -import { - Chunks as ChunksBuildUtils, - ModuleGraph as ModuleGraphBuildUtils, - Types, -} from '@rsdoctor/core/build-utils'; -import { Chunks as ChunkUtils } from '@rsdoctor/core/common-utils'; import { InternalErrorReporterPlugin, InternalLoaderPlugin, InternalPluginsPlugin, InternalProgressPlugin, InternalSummaryPlugin, + InternalRulesPlugin, + InternalBundlePlugin, makeRulesSerializable, normalizeUserConfig, setSDK, @@ -21,30 +17,23 @@ import type { } from '@rsdoctor/core/types'; import { ChunkGraph, ModuleGraph } from '@rsdoctor/graph'; import { DoctorWebpackSDK } from '@rsdoctor/sdk'; -import { Constants, Linter, Manifest, Plugin } from '@rsdoctor/types'; +import { Constants, Linter} from '@rsdoctor/types'; import { Process } from '@rsdoctor/utils/build'; import { debug } from '@rsdoctor/utils/logger'; -import type { Node } from '@rsdoctor/utils/ruleUtils'; -import fse from 'fs-extra'; import { cloneDeep } from 'lodash'; import path from 'path'; import { Compiler, Configuration, - ParserState, RuleSetRule, - StatsCompilation, } from 'webpack'; import { - internalPluginTapPostOptions, - internalPluginTapPreOptions, pluginTapName, pluginTapPostOptions, - pluginTapPreOptions, } from './constants'; -import { InternalBundlePlugin } from './plugins/bundle'; + import { InternalResolverPlugin } from './plugins/resolver'; -import { InternalRulesPlugin } from './plugins/rules'; +import { ensureModulesChunksGraphFn } from '@rsdoctor/core/plugins'; export class RsdoctorWebpackPlugin implements DoctorPluginInstance @@ -176,8 +165,6 @@ export class RsdoctorWebpackPlugin }); }; - private _modulesGraphApplied = false; - /** * @description Generate ModuleGraph and ChunkGraph from stats and webpack module apis; * @param {Compiler} compiler @@ -185,104 +172,7 @@ export class RsdoctorWebpackPlugin * @memberof DoctorWebpackPlugin */ public ensureModulesChunksGraphApplied(compiler: Compiler) { - if (this._modulesGraphApplied) return; - this._modulesGraphApplied = true; - - const context: Required = { - astCache: new Map(), - packagePathMap: new Map(), - getSourceMap: (file: string) => { - return this.sdk.getSourceMap(file); - }, - }; - - compiler.hooks.normalModuleFactory.tap( - internalPluginTapPostOptions('moduleGraph'), - (factory: Types.NormalModuleFactory) => { - const record = (parser: ParserState) => { - parser.hooks.program.tap(pluginTapPreOptions, (ast: Node.Program) => { - context.astCache!.set(parser.state.current, ast); - }); - }; - - factory.hooks.parser - .for('javascript/auto') - .tap(pluginTapPostOptions, record); - factory.hooks.parser - .for('javascript/dynamic') - .tap(pluginTapPostOptions, record); - factory.hooks.parser - .for('javascript/esm') - .tap(pluginTapPostOptions, record); - }, - ); - - compiler.hooks.done.tapPromise( - internalPluginTapPreOptions('moduleGraph'), - async (stats) => { - const statsJson = stats.toJson(); - - debug(Process.getMemoryUsageMessage, '[Before Generate ModuleGraph]'); - - this.chunkGraph = ChunksBuildUtils.chunkTransform(new Map(), statsJson); - - /** generate module graph */ - this.modulesGraph = await ModuleGraphBuildUtils.getModuleGraphByStats( - stats.compilation, - statsJson, - process.cwd(), - this.chunkGraph, - this.options.features, - context, - ); - - debug(Process.getMemoryUsageMessage, '[After Generate ModuleGraph]'); - - /** Tree Shaking */ - if (this.options.features.treeShaking) { - this.modulesGraph = ModuleGraphBuildUtils.appendTreeShaking( - this.modulesGraph, - stats.compilation, - ); - this.sdk.addClientRoutes([ - Manifest.DoctorManifestClientRoutes.TreeShaking, - ]); - - debug( - Process.getMemoryUsageMessage, - '[After AppendTreeShaking to ModuleGraph]', - ); - } - - /** transform modules graph */ - await this.getModulesInfosByStats( - compiler, - statsJson, - this.modulesGraph, - ); - - debug(Process.getMemoryUsageMessage, '[After Transform ModuleGraph]'); - - this.modulesGraph && - (await this.sdk.reportModuleGraph(this.modulesGraph)); - await this.sdk.reportChunkGraph(this.chunkGraph); - - /** Generate webpack-bundle-analyzer tile graph */ - const reportFilePath = await ChunksBuildUtils.generateTileGraph( - statsJson as Plugin.BaseStats, - { - reportFilename: ChunksBuildUtils.TileGraphReportName, - reportTitle: 'bundle-analyzer', - }, - compiler.outputPath, - ); - - reportFilePath && - (await this.sdk.reportTileHtml( - fse.readFileSync(reportFilePath, 'utf-8'), - )); - }, - ); + ensureModulesChunksGraphFn(compiler, this) } public done = async (): Promise => { @@ -298,31 +188,4 @@ export class RsdoctorWebpackPlugin } } catch (e) {} }; - - /** - * @protected - * @description This function to get module parsed code and size; - * @param {Compiler} compiler - * @param {StatsCompilation} stats - * @param {ModuleGraph} moduleGraph - * @return {*} - * @memberof DoctorWebpackPlugin - */ - protected async getModulesInfosByStats( - compiler: Compiler, - stats: StatsCompilation, - moduleGraph: ModuleGraph, - ) { - if (!moduleGraph) { - return; - } - try { - const parsedModulesData = - (await ChunksBuildUtils.getAssetsModulesData( - stats, - compiler.outputPath, - )) || {}; - ChunkUtils.transformAssetsModulesData(parsedModulesData, moduleGraph); - } catch (e) {} - } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34cf9ddb..558d6d5f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -215,6 +215,12 @@ importers: react-dom: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) + semver6: + specifier: npm:semver@6.3.1 + version: /semver@6.3.1 + semver7: + specifier: npm:semver@7.5.4 + version: /semver@7.5.4 devDependencies: '@rsbuild/core': specifier: 0.2.15 @@ -231,6 +237,9 @@ importers: '@types/react-dom': specifier: ^18 version: 18.2.17 + '@types/semver6': + specifier: npm:@types/semver@7.5.6 + version: /@types/semver@7.5.6 typescript: specifier: ^5.3.0 version: 5.3.3 @@ -518,6 +527,9 @@ importers: enhanced-resolve: specifier: 5.12.0 version: 5.12.0 + fs-extra: + specifier: ^11.1.1 + version: 11.2.0 loader-utils: specifier: ^2.0.4 version: 2.0.4 @@ -543,6 +555,9 @@ importers: '@types/bytes': specifier: 3.1.1 version: 3.1.1 + '@types/fs-extra': + specifier: ^11.0.2 + version: 11.0.4 '@types/loader-utils': specifier: ^2.0.5 version: 2.0.6 @@ -6932,6 +6947,10 @@ packages: resolution: {integrity: sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==} dev: true + /@types/semver@7.5.6: + resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} + dev: true + /@types/send@0.17.4: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: @@ -10798,6 +10817,7 @@ packages: graceful-fs: 4.2.11 jsonfile: 6.1.0 universalify: 2.0.0 + dev: false /fs-extra@11.2.0: resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} @@ -13875,7 +13895,7 @@ packages: enquirer: 2.3.6 figures: 3.2.0 flat: 5.0.2 - fs-extra: 11.1.1 + fs-extra: 11.2.0 glob: 7.1.4 ignore: 5.2.4 jest-diff: 29.7.0 From 1e4b7e15b18b430f1b87551472990428e308c190 Mon Sep 17 00:00:00 2001 From: easy1090 <752355956@qq.com> Date: Wed, 10 Jan 2024 22:59:21 +0800 Subject: [PATCH 2/4] feat(bundle): rspack mode add bundle analysis by rspack's hooks and add rules scan. --- .changeset/stale-tools-bow.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changeset/stale-tools-bow.md diff --git a/.changeset/stale-tools-bow.md b/.changeset/stale-tools-bow.md new file mode 100644 index 00000000..672dec5c --- /dev/null +++ b/.changeset/stale-tools-bow.md @@ -0,0 +1,10 @@ +--- +'@rsdoctor/webpack-plugin': patch +'@rsdoctor/rspack-plugin': patch +'@rsdoctor/components': patch +'@rsdoctor/client': patch +'@rsdoctor/types': patch +'@rsdoctor/core': patch +--- + +feat(bundle): rspack mode add bundle analysis by rspack's hooks and add rules scan. From 741bb5da7ed3754b15417dbc4bc28746cea5e714 Mon Sep 17 00:00:00 2001 From: easy1090 <752355956@qq.com> Date: Thu, 11 Jan 2024 12:04:51 +0800 Subject: [PATCH 3/4] eat(bundle): rspack mode add bundle analysis by rspack's hooks and add rules scan. --- e2e/package.json | 2 +- examples/rsbuild-minimal/package.json | 4 +- examples/rspack-minimal/package.json | 6 +- packages/core/package.json | 2 +- .../core/src/inner-plugins/plugins/bundle.ts | 7 +- packages/rspack-plugin/package.json | 2 +- packages/test-helper/package.json | 2 +- packages/types/package.json | 2 +- pnpm-lock.yaml | 518 ++++-------------- 9 files changed, 131 insertions(+), 414 deletions(-) diff --git a/e2e/package.json b/e2e/package.json index c8b8c557..a5c5285e 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -21,7 +21,7 @@ "@rsdoctor/types": "workspace:*", "@rsdoctor/utils": "workspace:*", "@rsdoctor/webpack-plugin": "workspace:*", - "@rspack/core": "0.4.1", + "@rspack/core": "0.5.0", "@types/lodash": "^4.14.200", "@types/node": "^16", "@types/react": "^18", diff --git a/examples/rsbuild-minimal/package.json b/examples/rsbuild-minimal/package.json index eb999c95..54a20e66 100644 --- a/examples/rsbuild-minimal/package.json +++ b/examples/rsbuild-minimal/package.json @@ -21,8 +21,8 @@ "semver7": "npm:semver@7.5.4" }, "devDependencies": { - "@rsbuild/core": "0.2.15", - "@rsbuild/plugin-react": "0.2.15", + "@rsbuild/core": "0.3.0", + "@rsbuild/plugin-react": "0.3.0", "@rsdoctor/rspack-plugin": "workspace:*", "@types/react": "^18", "@types/react-dom": "^18", diff --git a/examples/rspack-minimal/package.json b/examples/rspack-minimal/package.json index 84190358..e1631df0 100644 --- a/examples/rspack-minimal/package.json +++ b/examples/rspack-minimal/package.json @@ -18,9 +18,9 @@ }, "devDependencies": { "@rsdoctor/rspack-plugin": "workspace:*", - "@rspack/cli": "0.4.5", - "@rspack/core": "0.4.5", - "@rspack/plugin-react-refresh": "0.4.5", + "@rspack/plugin-react-refresh": "0.5.0", + "@rspack/cli": "0.5.0", + "@rspack/core": "0.5.0", "@types/react": "^18.0.25", "@types/react-dom": "^18.0.8", "web-vitals": "^2.1.4" diff --git a/packages/core/package.json b/packages/core/package.json index 406f7e05..169a85e6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -50,7 +50,7 @@ "@rsdoctor/sdk": "workspace:*", "@rsdoctor/types": "workspace:*", "@rsdoctor/utils": "workspace:*", - "@rspack/core": "0.3.14", + "@rspack/core": "0.5.0", "axios": "^1.6.1", "bytes": "3.1.2", "enhanced-resolve": "5.12.0", diff --git a/packages/core/src/inner-plugins/plugins/bundle.ts b/packages/core/src/inner-plugins/plugins/bundle.ts index 922e2d59..e3dda329 100644 --- a/packages/core/src/inner-plugins/plugins/bundle.ts +++ b/packages/core/src/inner-plugins/plugins/bundle.ts @@ -41,9 +41,12 @@ export class InternalBundlePlugin< }); }, ); - } else if (compilation.hooks.processAssets) { + } else if ( + compilation.hooks.processAssets && + 'afterProcessAssets' in compilation.hooks + ) { // This is for rspack hooks. - compilation.hooks.processAssets.tap( // TODO:: change to afterProcessAssets hook. + compilation.hooks.afterProcessAssets.tap( this.tapPostOptions, () => { Object.keys(compilation.assets).forEach((file) => { diff --git a/packages/rspack-plugin/package.json b/packages/rspack-plugin/package.json index 9d78d5d5..3bbf27a0 100644 --- a/packages/rspack-plugin/package.json +++ b/packages/rspack-plugin/package.json @@ -22,7 +22,7 @@ "@rsdoctor/core": "workspace:*", "@rsdoctor/sdk": "workspace:*", "@rsdoctor/graph": "workspace:*", - "@rspack/core": "0.3.14", + "@rspack/core": "0.5.0", "lodash": "^4.17.21" }, "devDependencies": { diff --git a/packages/test-helper/package.json b/packages/test-helper/package.json index 1a3fd2be..a701ebf7 100644 --- a/packages/test-helper/package.json +++ b/packages/test-helper/package.json @@ -24,7 +24,7 @@ "dev": "modern build --watch" }, "dependencies": { - "@rspack/core": "0.3.14", + "@rspack/core": "0.5.0", "@types/lodash": "^4.14.200", "@types/node": "^16", "lodash": "^4.17.21", diff --git a/packages/types/package.json b/packages/types/package.json index 36fe7eb9..fe0545f1 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -18,7 +18,7 @@ "start": "npm run build -- -w" }, "dependencies": { - "@rspack/core": "0.3.14", + "@rspack/core": "0.5.0", "@types/connect": "3.4.35", "@types/estree": "1.0.0", "@types/tapable": "2.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 558d6d5f..f0f4a4bf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -131,8 +131,8 @@ importers: specifier: workspace:* version: link:../packages/webpack-plugin '@rspack/core': - specifier: 0.4.1 - version: 0.4.1 + specifier: 0.5.0 + version: 0.5.0(@swc/helpers@0.5.3) '@types/lodash': specifier: ^4.14.200 version: 4.14.202 @@ -223,11 +223,11 @@ importers: version: /semver@7.5.4 devDependencies: '@rsbuild/core': - specifier: 0.2.15 - version: 0.2.15 + specifier: 0.3.0 + version: 0.3.0 '@rsbuild/plugin-react': - specifier: 0.2.15 - version: 0.2.15 + specifier: 0.3.0 + version: 0.3.0(@swc/helpers@0.5.3) '@rsdoctor/rspack-plugin': specifier: workspace:* version: link:../../packages/rspack-plugin @@ -272,14 +272,14 @@ importers: specifier: workspace:* version: link:../../packages/rspack-plugin '@rspack/cli': - specifier: 0.4.5 - version: 0.4.5(@rspack/core@0.4.5) + specifier: 0.5.0 + version: 0.5.0(@rspack/core@0.5.0) '@rspack/core': - specifier: 0.4.5 - version: 0.4.5 + specifier: 0.5.0 + version: 0.5.0(@swc/helpers@0.5.3) '@rspack/plugin-react-refresh': - specifier: 0.4.5 - version: 0.4.5(react-refresh@0.14.0) + specifier: 0.5.0 + version: 0.5.0(react-refresh@0.14.0) '@types/react': specifier: ^18.0.25 version: 18.2.39 @@ -516,8 +516,8 @@ importers: specifier: workspace:* version: link:../utils '@rspack/core': - specifier: 0.3.14 - version: 0.3.14 + specifier: 0.5.0 + version: 0.5.0(@swc/helpers@0.5.3) axios: specifier: ^1.6.1 version: 1.6.1 @@ -650,8 +650,8 @@ importers: specifier: workspace:* version: link:../sdk '@rspack/core': - specifier: 0.3.14 - version: 0.3.14 + specifier: 0.5.0 + version: 0.5.0(@swc/helpers@0.5.3) lodash: specifier: ^4.17.21 version: 4.17.21 @@ -742,8 +742,8 @@ importers: packages/test-helper: dependencies: '@rspack/core': - specifier: 0.3.14 - version: 0.3.14 + specifier: 0.5.0 + version: 0.5.0(@swc/helpers@0.5.3) '@types/lodash': specifier: ^4.14.200 version: 4.14.202 @@ -769,8 +769,8 @@ importers: packages/types: dependencies: '@rspack/core': - specifier: 0.3.14 - version: 0.3.14 + specifier: 0.5.0 + version: 0.5.0(@swc/helpers@0.5.3) '@types/connect': specifier: 3.4.35 version: 3.4.35 @@ -4672,29 +4672,25 @@ packages: rslog: 1.1.1 dev: false - /@module-federation/runtime-tools@0.0.0-next-20231225095220: - resolution: {integrity: sha512-Rn4ntKEWR5FdT3IA2gd5vw71GhXiYbNev2F54iBiWHsF0z+J41lHQhNDXDAoTeNmJs64e9dsPhBM2U0VZKo8uA==} + /@module-federation/runtime-tools@0.0.8: + resolution: {integrity: sha512-tqx3wlVHnpWLk+vn22c0x9Nv1BqdZnoS6vdMb53IsVpbQIFP70nhhvymHUyFuPkoLzMFidS7GpG58DYT/4lvCw==} dependencies: - '@module-federation/runtime': 0.0.0-next-20231225095220 - '@module-federation/webpack-bundler-runtime': 0.0.0-next-20231225095220 - dev: true + '@module-federation/runtime': 0.0.8 + '@module-federation/webpack-bundler-runtime': 0.0.8 - /@module-federation/runtime@0.0.0-next-20231225095220: - resolution: {integrity: sha512-tsST3igVpXKclGpqq2NNm1wzROks29PGte7GCgSPhoaFVNg076Nl8XzFNPGflCF6g/z13oFw/vahYpBAHkEZgQ==} + /@module-federation/runtime@0.0.8: + resolution: {integrity: sha512-Hi9g10aHxHdQ7CbchSvke07YegYwkf162XPOmixNmJr5Oy4wVa2d9yIVSrsWFhBRbbvM5iJP6GrSuEq6HFO3ug==} dependencies: - '@module-federation/sdk': 0.0.0-next-20231225095220 - dev: true + '@module-federation/sdk': 0.0.8 - /@module-federation/sdk@0.0.0-next-20231225095220: - resolution: {integrity: sha512-0vS5UXCkbKyotZIXAsF+mrL8PQ+xKmKfaDYHdBxXR4kyGSRjSRRokSKkXZNVfPEhy1f1z/oAgUo5AZoOisrrQA==} - dev: true + /@module-federation/sdk@0.0.8: + resolution: {integrity: sha512-lkasywBItjUTNT0T0IskonDE2E/2tXE9UhUCPVoDL3NteDUSFGg4tpkF+cey1pD8mHh0XJcGrCuOW7s96peeAg==} - /@module-federation/webpack-bundler-runtime@0.0.0-next-20231225095220: - resolution: {integrity: sha512-xzz2FUvj+/TMl2ua/EcFaiYmH54XedH5fU7zQ1/EBZDrt26uJR4vabmvPx3Eb06KfDEcGB2/zkzZNzcT8572CQ==} + /@module-federation/webpack-bundler-runtime@0.0.8: + resolution: {integrity: sha512-ULwrTVzF47+6XnWybt6SIq97viEYJRv4P/DByw5h7PSX9PxSGyMm5pHfXdhcb7tno7VknL0t2V8F48fetVL9kA==} dependencies: - '@module-federation/runtime': 0.0.0-next-20231225095220 - '@module-federation/sdk': 0.0.0-next-20231225095220 - dev: true + '@module-federation/runtime': 0.0.8 + '@module-federation/sdk': 0.0.8 /@monaco-editor/loader@1.4.0(monaco-editor@0.34.1): resolution: {integrity: sha512-00ioBig0x642hytVspPl7DbQyaSWRaolYie/UFNjoTdvoKPzo6xrXLhTk9ixgIKcLH5b5vDOjVNiGyY+uDCUlg==} @@ -5254,13 +5250,14 @@ packages: postcss: 8.4.31 dev: false - /@rsbuild/core@0.2.15: - resolution: {integrity: sha512-NvaFXtccQRhrnJo0QNwFG4cbuteSx8jJOcuu8kxI4z01YbOFIFUB1T/3vRNhq5Zp6rZBXOl/GyperIKKjY63pg==} + /@rsbuild/core@0.3.0: + resolution: {integrity: sha512-FS0IKH2p9MpRAA3ibmle8kYKAV+pzsgFfNAaeZwahALB5+447UUmgW1UAK3BnYoH8ONc276S/zlYzSMDjsfMHg==} engines: {node: '>=14.0.0'} hasBin: true dependencies: - '@rsbuild/shared': 0.2.15 - '@rspack/core': 0.4.5 + '@rsbuild/shared': 0.3.0(@swc/helpers@0.5.3) + '@rspack/core': 0.5.0(@swc/helpers@0.5.3) + '@swc/helpers': 0.5.3 core-js: 3.32.2 html-webpack-plugin: /html-rspack-plugin@5.5.7 postcss: 8.4.31 @@ -5302,12 +5299,14 @@ packages: semver: 7.5.4 dev: false - /@rsbuild/plugin-react@0.2.15: - resolution: {integrity: sha512-Emc95ZcPHmhV9lR+irhxIsJzxa/wy2btsqInn5EbzlbbNmHwmfBjGI/VYmIO+qVZrknpYXQDHZ+AsBWZsOqrQw==} + /@rsbuild/plugin-react@0.3.0(@swc/helpers@0.5.3): + resolution: {integrity: sha512-ixQrzjuP93bauW/+UCNjDaI/cqkwV36pkVAZdj3KVt01qpSh5nNbUBQ2ueZ5QfsFRiXkmMAIE2NRti6NLMFa6w==} dependencies: - '@rsbuild/shared': 0.2.15 - '@rspack/plugin-react-refresh': 0.4.5(react-refresh@0.14.0) + '@rsbuild/shared': 0.3.0(@swc/helpers@0.5.3) + '@rspack/plugin-react-refresh': 0.5.0(react-refresh@0.14.0) react-refresh: 0.14.0 + transitivePeerDependencies: + - '@swc/helpers' dev: true /@rsbuild/plugin-svgr@0.2.1(typescript@5.3.3)(webpack@5.89.0): @@ -5374,13 +5373,15 @@ packages: postcss: 8.4.31 dev: false - /@rsbuild/shared@0.2.15: - resolution: {integrity: sha512-gg8Ccw9hAefQrmYQWSgdCvO30pEKj0q6y3d+DCoZeasOjPRSkC5Xlaxb9YLzxjWA472NwV5M5KliFGr9EnSc3g==} + /@rsbuild/shared@0.3.0(@swc/helpers@0.5.3): + resolution: {integrity: sha512-gwP0lFMwUYUCIzQ4706pjBA+r5Tu7mVAUuEFp6ZkncPImSXkP1MzEtqBcc/g8St0+whf3L8Rdc0GJfHoJvl8KQ==} dependencies: - '@rspack/core': 0.4.5 + '@rspack/core': 0.5.0(@swc/helpers@0.5.3) caniuse-lite: 1.0.30001566 lodash: 4.17.21 postcss: 8.4.31 + transitivePeerDependencies: + - '@swc/helpers' dev: true /@rsbuild/test-helper@0.1.5: @@ -5403,14 +5404,6 @@ packages: - webpack-cli dev: true - /@rspack/binding-darwin-arm64@0.3.14: - resolution: {integrity: sha512-mUljW63ljx7gDn8ZFov+7AHTbQ6afU7CGwQFdpyoBW8XKFdHz6DPBllpMq5mMv2gDhQdpJUhdU0b/fNDl7d9QQ==} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - /@rspack/binding-darwin-arm64@0.4.1: resolution: {integrity: sha512-oGosukPLEycihtFq+sfx4NOCYJW6+LBbdwlj9hNW8s7mqSshkKBTEkzGgEA+tsyQODOD13Qvg9R4dhUkXnMFJg==} cpu: [arm64] @@ -5427,20 +5420,11 @@ packages: dev: false optional: true - /@rspack/binding-darwin-arm64@0.4.5: - resolution: {integrity: sha512-H7RaSPN9VEzZf4URZpVV0Is4I1mgOHCzYVxDUZ/9G5vMkTW5baktCxFwbmBPYKcZ8Zoj/hy/DE8fmt1L200NmQ==} + /@rspack/binding-darwin-arm64@0.5.0: + resolution: {integrity: sha512-zRx4efhn2eCjdhHt6avhdkKur6FZvYy1TgPhNKpWbTg7fnrvtNGzcVQCAOnPUUPkJjnss3veOhZlWJ3paX0EDQ==} cpu: [arm64] os: [darwin] requiresBuild: true - dev: true - optional: true - - /@rspack/binding-darwin-x64@0.3.14: - resolution: {integrity: sha512-3/TplaFuUfukvR+50xHdAkRRAjZWuT4+V4xn8puel22Qx53gGi2Bh6pdAKXDDeoSEvF2bozrOeKZm04lPaAQOQ==} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: false optional: true /@rspack/binding-darwin-x64@0.4.1: @@ -5459,20 +5443,11 @@ packages: dev: false optional: true - /@rspack/binding-darwin-x64@0.4.5: - resolution: {integrity: sha512-K5HgE4nHwVWizCr2pBLA8N3LXfn1lQCSV5sR+6xQQrVdvRJ5zBhPMwjPOzP+AdmGhrD14zz1j9mktzCvA7FUtg==} + /@rspack/binding-darwin-x64@0.5.0: + resolution: {integrity: sha512-d6SvBURfKow3WcKxTrjJPBkp+NLsuCPoIMaS8/bM4gHwgjVs2zuOsTQ9+l36dypOkjnu6QLkOIykTdiUKJ0eQg==} cpu: [x64] os: [darwin] requiresBuild: true - dev: true - optional: true - - /@rspack/binding-linux-arm64-gnu@0.3.14: - resolution: {integrity: sha512-HPTWqZZlPsjS489ByX8RtgYoodn4IcSFrdTdi8gyLCKNfq7hf7uwWP5/dJQK/EW+wVch8HkrOJECxdXHRCDFIg==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: false optional: true /@rspack/binding-linux-arm64-gnu@0.4.1: @@ -5491,20 +5466,11 @@ packages: dev: false optional: true - /@rspack/binding-linux-arm64-gnu@0.4.5: - resolution: {integrity: sha512-JvESc3imqKbqwal5WesxlV3ix8eIO/07XCj+pkaZWaf4nj/ui02NGtLaeLVxwc1fxHekdLc+ROQrxpdOLhQ1jw==} + /@rspack/binding-linux-arm64-gnu@0.5.0: + resolution: {integrity: sha512-97xFbF7RjJc2VvX+0Hvb7Jzsk+eEE8oEUcc5Dnb7OIwGZulWKk6cLNcRkNfmL/F9kk1QEKlUTNC/VQI7ljf2tA==} cpu: [arm64] os: [linux] requiresBuild: true - dev: true - optional: true - - /@rspack/binding-linux-arm64-musl@0.3.14: - resolution: {integrity: sha512-8d0VFLlUatZJp/Z/udpV7kW3g3Uyrenr5bu6w5oETIv7Bv1T6IR3as7R0s2dONa7JkuAw4gQB0c1k9X44SxoBQ==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: false optional: true /@rspack/binding-linux-arm64-musl@0.4.1: @@ -5523,20 +5489,11 @@ packages: dev: false optional: true - /@rspack/binding-linux-arm64-musl@0.4.5: - resolution: {integrity: sha512-ziYGYEoLsPEyC0pEAj5clU8XOFr3+r7IExm9/sq2gp+M1as/yTzouEuzO3D8kI0xVfub1WmiEktTBlgjS13CSA==} + /@rspack/binding-linux-arm64-musl@0.5.0: + resolution: {integrity: sha512-lk0IomCy276EoynmksoBwg0IcHvvVXuZPMeq7OgRPTvs33mdTExSzSTPtrGzx/D00bX1ybUqLQwJhcgGt6erPQ==} cpu: [arm64] os: [linux] requiresBuild: true - dev: true - optional: true - - /@rspack/binding-linux-x64-gnu@0.3.14: - resolution: {integrity: sha512-Hy7z+orffDzQ5Jt3CSF9kncCPPGWyDS6Bs4FgSbYiOgoB314tdpgBSkdrh6wiG5inXLbOFI5Mc3Gct5hK0ok/w==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: false optional: true /@rspack/binding-linux-x64-gnu@0.4.1: @@ -5555,20 +5512,11 @@ packages: dev: false optional: true - /@rspack/binding-linux-x64-gnu@0.4.5: - resolution: {integrity: sha512-9cXOIswpSZYhEXeuIWdsQNrgpjHTD4I3v0NPm75cL6cdBtJMHOa/qejO5mdTLzoDdE7waGZAb4uSMfrJOEkwqQ==} + /@rspack/binding-linux-x64-gnu@0.5.0: + resolution: {integrity: sha512-r15ddpse0S/8wHtfL85uJrVotvPVIMnQX06KlXyGUSw1jWrjxV+NXFDJ4xXnHCvk/YV6lCFTotAssk4wJEE0Fw==} cpu: [x64] os: [linux] requiresBuild: true - dev: true - optional: true - - /@rspack/binding-linux-x64-musl@0.3.14: - resolution: {integrity: sha512-m/DEip/dJhUuFCLZggOllBAHsRtBmUfRk/YyzxaHLNEImR7/ZV2SIEU1krnicNsz5pO8pQ7mjPeFpio/XsHciQ==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: false optional: true /@rspack/binding-linux-x64-musl@0.4.1: @@ -5587,20 +5535,11 @@ packages: dev: false optional: true - /@rspack/binding-linux-x64-musl@0.4.5: - resolution: {integrity: sha512-wClTj9mbVKprHIWsLEVJg+ZXT5slF93JsyAALIhAFkNMmn5z0B2NPD7+Oaii62edKMk2nS3dpoHu1JCLDmP0cw==} + /@rspack/binding-linux-x64-musl@0.5.0: + resolution: {integrity: sha512-lB9Dn1bi4xyzEe6Bf/GQ7Ktlrq4Kmt1LHwN+t0m6iVYH3Vb/3g8uQGDSkwnjP8NmlAtldK1cmvRMhR7flUrgZA==} cpu: [x64] os: [linux] requiresBuild: true - dev: true - optional: true - - /@rspack/binding-win32-arm64-msvc@0.3.14: - resolution: {integrity: sha512-Mpj5on9HWHcQ2BnAXWm/OhwbrEtNYSr3Ab1v/0sGxFdufcqI5u7xRjFlLbgEUDmDb4Cfr4/VoWMvAKCIsilc6A==} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: false optional: true /@rspack/binding-win32-arm64-msvc@0.4.1: @@ -5619,20 +5558,11 @@ packages: dev: false optional: true - /@rspack/binding-win32-arm64-msvc@0.4.5: - resolution: {integrity: sha512-8LNITZqPMKO69nc8hwdcweBXcAS4yAL5W/kZ6zKeb6Ly+X5SBZk7l0WPL7lPMib/vHFkjJjp1buGhzymLU0bzA==} + /@rspack/binding-win32-arm64-msvc@0.5.0: + resolution: {integrity: sha512-aDoF13puU8LxST/qKZndtXzlJbnbnxY2Bxyj0fu7UDh8nHJD4A2HQfWRN6BZFHaVSqM6Bnli410dJrIWeTNhZQ==} cpu: [arm64] os: [win32] requiresBuild: true - dev: true - optional: true - - /@rspack/binding-win32-ia32-msvc@0.3.14: - resolution: {integrity: sha512-JwMCL+l2UicDPgQG6GCtDfxjahcCIMyWc+CCvFH9BeI4/XWU6O6m1kXbJfx0qLXRWAZQhALlpW9o8BE8Sr73dg==} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: false optional: true /@rspack/binding-win32-ia32-msvc@0.4.1: @@ -5651,20 +5581,11 @@ packages: dev: false optional: true - /@rspack/binding-win32-ia32-msvc@0.4.5: - resolution: {integrity: sha512-dndiXygG1ZmSO3unuZ9Mc+7IvqBtFqwvjFZGKUdIcufFr2CjZDL/KR1zJGTmFIzwHKMV2hEH4cZpa2TwisXvGQ==} + /@rspack/binding-win32-ia32-msvc@0.5.0: + resolution: {integrity: sha512-EYGeH4YKX5v4gtTL8mBAWnsKSkF+clsKu0z1hgWgSV/vnntNlqJQZUCb5CMdg5VqadNm+lUNDYYHeHNa3+Jp3w==} cpu: [ia32] os: [win32] requiresBuild: true - dev: true - optional: true - - /@rspack/binding-win32-x64-msvc@0.3.14: - resolution: {integrity: sha512-QqcPv2II8YTRybuhMCnJXlz7xIvknwyaIlhflDcC2hNBGIo8H866A66cMY/r3bDVcrrVpgx79yFeJ+a/pyjdHQ==} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: false optional: true /@rspack/binding-win32-x64-msvc@0.4.1: @@ -5683,28 +5604,13 @@ packages: dev: false optional: true - /@rspack/binding-win32-x64-msvc@0.4.5: - resolution: {integrity: sha512-SEu8+pQsnGP7A0/XX5vawsccR825UCOzK5phJ8INSC7Mse8FKzkZpv2Af3PsHl2+N17M0PRgBxTghXR35PXkiw==} + /@rspack/binding-win32-x64-msvc@0.5.0: + resolution: {integrity: sha512-RCECFW6otUrFiPbWQyOvLZOMNV/OL6AyAKMDbX9ejjk0TjLMrHjnhmI5X8EoA/SUc1/vEbgsJzDVLKTfn138cg==} cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true - /@rspack/binding@0.3.14: - resolution: {integrity: sha512-kcbhfvrXqxf2NQsidnRxZ4ab/Vvxm2timNZIWu5BgXi8hPAXayG+JyDEQMVC0xj5qlDrJid+z7J4U0IIHi5RrQ==} - optionalDependencies: - '@rspack/binding-darwin-arm64': 0.3.14 - '@rspack/binding-darwin-x64': 0.3.14 - '@rspack/binding-linux-arm64-gnu': 0.3.14 - '@rspack/binding-linux-arm64-musl': 0.3.14 - '@rspack/binding-linux-x64-gnu': 0.3.14 - '@rspack/binding-linux-x64-musl': 0.3.14 - '@rspack/binding-win32-arm64-msvc': 0.3.14 - '@rspack/binding-win32-ia32-msvc': 0.3.14 - '@rspack/binding-win32-x64-msvc': 0.3.14 - dev: false - /@rspack/binding@0.4.1: resolution: {integrity: sha512-tPETZWbP9VYzmdCIKmaxWWx0z2c//acd5eV2kgKOSWt29MH2wo+EFySfvWKWVCTwjBkuVrqaULUxcIJB3vUCTg==} optionalDependencies: @@ -5733,29 +5639,28 @@ packages: '@rspack/binding-win32-x64-msvc': 0.4.2 dev: false - /@rspack/binding@0.4.5: - resolution: {integrity: sha512-XmSlt9ucpfebhkWI4guPEym0F+8JZGr8UyBVAtHN2/7SQRI8TL8G1BUQGVgmc7+UKA5RM1Qfps1QmtHYzjARBQ==} + /@rspack/binding@0.5.0: + resolution: {integrity: sha512-+v1elZMn6lKBqbXQzhcfeCaPzztFNGEkNDEcQ7weako6yQPsBihGCRzveMMzZkja4RyB9GRHjWRE+THm8V8+3w==} optionalDependencies: - '@rspack/binding-darwin-arm64': 0.4.5 - '@rspack/binding-darwin-x64': 0.4.5 - '@rspack/binding-linux-arm64-gnu': 0.4.5 - '@rspack/binding-linux-arm64-musl': 0.4.5 - '@rspack/binding-linux-x64-gnu': 0.4.5 - '@rspack/binding-linux-x64-musl': 0.4.5 - '@rspack/binding-win32-arm64-msvc': 0.4.5 - '@rspack/binding-win32-ia32-msvc': 0.4.5 - '@rspack/binding-win32-x64-msvc': 0.4.5 - dev: true - - /@rspack/cli@0.4.5(@rspack/core@0.4.5): - resolution: {integrity: sha512-YQuAQwpVGOrlcKlocUOK4ByCgB409ogEZeYlXUkh+MhVu/q0gvhvxojLHLHki7MgtNBNUJT6g3b4TiU9JSS85g==} + '@rspack/binding-darwin-arm64': 0.5.0 + '@rspack/binding-darwin-x64': 0.5.0 + '@rspack/binding-linux-arm64-gnu': 0.5.0 + '@rspack/binding-linux-arm64-musl': 0.5.0 + '@rspack/binding-linux-x64-gnu': 0.5.0 + '@rspack/binding-linux-x64-musl': 0.5.0 + '@rspack/binding-win32-arm64-msvc': 0.5.0 + '@rspack/binding-win32-ia32-msvc': 0.5.0 + '@rspack/binding-win32-x64-msvc': 0.5.0 + + /@rspack/cli@0.5.0(@rspack/core@0.5.0): + resolution: {integrity: sha512-69D4mK/KcGQ0yv7orR76ephyTgct/ttuu0PBeh8rdfcvUG8gyzPaWOPm2yG+pCIyqK22pugk+G90vxU8/e4O9w==} hasBin: true peerDependencies: '@rspack/core': '>=0.4.0' dependencies: '@discoveryjs/json-ext': 0.5.7 - '@rspack/core': 0.4.5 - '@rspack/dev-server': 0.4.5(@rspack/core@0.4.5) + '@rspack/core': 0.5.0(@swc/helpers@0.5.3) + '@rspack/dev-server': 0.5.0(@rspack/core@0.5.0) colorette: 2.0.19 exit-hook: 3.2.0 interpret: 3.1.1 @@ -5776,27 +5681,6 @@ packages: - webpack-cli dev: true - /@rspack/core@0.3.14: - resolution: {integrity: sha512-B76vRdbKXMi/Xjd8Q0f/4xrlqp4mFELH2w+6ROoAscGVgS8eDsWmJHa7ddIB3FELizzDvI3BjGfBeGftZjSg3g==} - dependencies: - '@rspack/binding': 0.3.14 - '@swc/helpers': 0.5.1 - browserslist: 4.22.1 - compare-versions: 6.0.0-rc.1 - enhanced-resolve: 5.12.0 - fast-querystring: 1.1.2 - graceful-fs: 4.2.10 - json-parse-even-better-errors: 3.0.1 - neo-async: 2.6.2 - react-refresh: 0.14.0 - tapable: 2.2.1 - terminal-link: 2.1.1 - watchpack: 2.4.0 - webpack-sources: 3.2.3 - zod: 3.22.4 - zod-validation-error: 1.2.0(zod@3.22.4) - dev: false - /@rspack/core@0.4.1: resolution: {integrity: sha512-g502i0fHMj0lCr1Y/Bh5iwsEGB1BTiN+H06Oc39qEgs4bwQqnkGg/iQSBoR7q1886lAK8yIIDQeyCxF/6qI7EA==} engines: {node: '>=16.0.0'} @@ -5841,43 +5725,45 @@ packages: zod-validation-error: 1.3.1(zod@3.22.4) dev: false - /@rspack/core@0.4.5: - resolution: {integrity: sha512-X29fvCqTJH9OYN5pqa2lYP9hBLGICGVugtpTIAyLtMxC7gqvjvZkG/qisaVsjPyg4p2eB0NvmosnHkRv0GJ4sg==} + /@rspack/core@0.5.0(@swc/helpers@0.5.3): + resolution: {integrity: sha512-/Bpujdtx28qYir7AK9VVSbY35GBFEcZ1NTJZBx/WIzZGZWLCxhlVYfjH8cj44y4RvXa0Y26tnj/q7VJ4U3sHug==} engines: {node: '>=16.0.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true dependencies: - '@module-federation/runtime-tools': 0.0.0-next-20231225095220 - '@rspack/binding': 0.4.5 - '@swc/helpers': 0.5.1 + '@module-federation/runtime-tools': 0.0.8 + '@rspack/binding': 0.5.0 + '@swc/helpers': 0.5.3 browserslist: 4.22.2 - compare-versions: 6.0.0-rc.1 enhanced-resolve: 5.12.0 graceful-fs: 4.2.10 json-parse-even-better-errors: 3.0.1 neo-async: 2.6.2 - react-refresh: 0.14.0 tapable: 2.2.1 terminal-link: 2.1.1 watchpack: 2.4.0 webpack-sources: 3.2.3 zod: 3.22.4 zod-validation-error: 1.3.1(zod@3.22.4) - dev: true - /@rspack/dev-server@0.4.5(@rspack/core@0.4.5): - resolution: {integrity: sha512-g9FxWfII5gr/Z6Tav235RMYeqbJiTS89dBmD+CE5xedJ1EmOiAV5jlDQnpaTpecwwjjDV8Bq+rk7wtOOHzstSg==} + /@rspack/dev-server@0.5.0(@rspack/core@0.5.0): + resolution: {integrity: sha512-3TIBoi17h/d99v5zdGoeODds4vWAGlPnjqS1IKYSDwjqDfnneYbCB8TqGfwdoS4qZOHjCSl75BS1SspwKe69yw==} peerDependencies: '@rspack/core': '*' dependencies: - '@rspack/core': 0.4.5 - '@rspack/plugin-react-refresh': 0.4.5(react-refresh@0.14.0) + '@rspack/core': 0.5.0(@swc/helpers@0.5.3) + '@rspack/plugin-react-refresh': 0.5.0(react-refresh@0.14.0) chokidar: 3.5.3 connect-history-api-fallback: 2.0.0 express: 4.18.1 http-proxy-middleware: 2.0.6(@types/express@4.17.21) mime-types: 2.1.35 - webpack: 5.76.0 - webpack-dev-middleware: 6.0.2(webpack@5.76.0) - webpack-dev-server: 4.13.1(webpack@5.76.0) + webpack: 5.89.0(webpack-cli@5.0.0) + webpack-dev-middleware: 6.0.2(webpack@5.89.0) + webpack-dev-server: 4.13.1(webpack@5.89.0) ws: 8.8.1 transitivePeerDependencies: - '@swc/core' @@ -5914,8 +5800,8 @@ packages: react-refresh: 0.14.0 dev: false - /@rspack/plugin-react-refresh@0.4.5(react-refresh@0.14.0): - resolution: {integrity: sha512-VGauW5J2r8zX+y2DlX1oPHPlruEHM9O+8faLfWWOJF0Gylra+WGD9STWbR+XcYJsCnDzbTzIL5gOq4cQbINcYg==} + /@rspack/plugin-react-refresh@0.5.0(react-refresh@0.14.0): + resolution: {integrity: sha512-Tas91XaFgRmgdLFzgeei/LybMFvnYBicMf4Y7Yt9lZHRHfgONrGbmqSVeS+nWWTW9U8Q31K9uiM2Z2a02hq2Vw==} peerDependencies: react-refresh: '>=0.10.0 <1.0.0' peerDependenciesMeta: @@ -6508,7 +6394,7 @@ packages: /@swc/helpers@0.5.3: resolution: {integrity: sha512-FaruWX6KdudYloq1AHD/4nU+UsMTdNE8CKyrseXWEcgjDAbvkwJg2QGPAnfIJLIWsjZOSPLOAykK6fuYp4vp4A==} dependencies: - tslib: 2.6.2 + tslib: 2.4.1 /@szmarczak/http-timer@1.1.2: resolution: {integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==} @@ -6652,10 +6538,6 @@ packages: dependencies: '@types/estree': 1.0.0 - /@types/estree@0.0.51: - resolution: {integrity: sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==} - dev: true - /@types/estree@1.0.0: resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} @@ -7199,48 +7081,21 @@ packages: resolution: {integrity: sha512-BEO6al7BYqcnfX15W2cnGR+Q566ACXAT9UQykORCWW80lmkpWsnEob6zJS1ZVBKsSJC8+7vJkHwlp+lXG1UCdw==} dev: true - /@webassemblyjs/ast@1.11.1: - resolution: {integrity: sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==} - dependencies: - '@webassemblyjs/helper-numbers': 1.11.1 - '@webassemblyjs/helper-wasm-bytecode': 1.11.1 - dev: true - /@webassemblyjs/ast@1.11.6: resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: '@webassemblyjs/helper-numbers': 1.11.6 '@webassemblyjs/helper-wasm-bytecode': 1.11.6 - /@webassemblyjs/floating-point-hex-parser@1.11.1: - resolution: {integrity: sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==} - dev: true - /@webassemblyjs/floating-point-hex-parser@1.11.6: resolution: {integrity: sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==} - /@webassemblyjs/helper-api-error@1.11.1: - resolution: {integrity: sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==} - dev: true - /@webassemblyjs/helper-api-error@1.11.6: resolution: {integrity: sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==} - /@webassemblyjs/helper-buffer@1.11.1: - resolution: {integrity: sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==} - dev: true - /@webassemblyjs/helper-buffer@1.11.6: resolution: {integrity: sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==} - /@webassemblyjs/helper-numbers@1.11.1: - resolution: {integrity: sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==} - dependencies: - '@webassemblyjs/floating-point-hex-parser': 1.11.1 - '@webassemblyjs/helper-api-error': 1.11.1 - '@xtuc/long': 4.2.2 - dev: true - /@webassemblyjs/helper-numbers@1.11.6: resolution: {integrity: sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==} dependencies: @@ -7248,22 +7103,9 @@ packages: '@webassemblyjs/helper-api-error': 1.11.6 '@xtuc/long': 4.2.2 - /@webassemblyjs/helper-wasm-bytecode@1.11.1: - resolution: {integrity: sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==} - dev: true - /@webassemblyjs/helper-wasm-bytecode@1.11.6: resolution: {integrity: sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==} - /@webassemblyjs/helper-wasm-section@1.11.1: - resolution: {integrity: sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==} - dependencies: - '@webassemblyjs/ast': 1.11.1 - '@webassemblyjs/helper-buffer': 1.11.1 - '@webassemblyjs/helper-wasm-bytecode': 1.11.1 - '@webassemblyjs/wasm-gen': 1.11.1 - dev: true - /@webassemblyjs/helper-wasm-section@1.11.6: resolution: {integrity: sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==} dependencies: @@ -7272,48 +7114,19 @@ packages: '@webassemblyjs/helper-wasm-bytecode': 1.11.6 '@webassemblyjs/wasm-gen': 1.11.6 - /@webassemblyjs/ieee754@1.11.1: - resolution: {integrity: sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==} - dependencies: - '@xtuc/ieee754': 1.2.0 - dev: true - /@webassemblyjs/ieee754@1.11.6: resolution: {integrity: sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==} dependencies: '@xtuc/ieee754': 1.2.0 - /@webassemblyjs/leb128@1.11.1: - resolution: {integrity: sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==} - dependencies: - '@xtuc/long': 4.2.2 - dev: true - /@webassemblyjs/leb128@1.11.6: resolution: {integrity: sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==} dependencies: '@xtuc/long': 4.2.2 - /@webassemblyjs/utf8@1.11.1: - resolution: {integrity: sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==} - dev: true - /@webassemblyjs/utf8@1.11.6: resolution: {integrity: sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==} - /@webassemblyjs/wasm-edit@1.11.1: - resolution: {integrity: sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==} - dependencies: - '@webassemblyjs/ast': 1.11.1 - '@webassemblyjs/helper-buffer': 1.11.1 - '@webassemblyjs/helper-wasm-bytecode': 1.11.1 - '@webassemblyjs/helper-wasm-section': 1.11.1 - '@webassemblyjs/wasm-gen': 1.11.1 - '@webassemblyjs/wasm-opt': 1.11.1 - '@webassemblyjs/wasm-parser': 1.11.1 - '@webassemblyjs/wast-printer': 1.11.1 - dev: true - /@webassemblyjs/wasm-edit@1.11.6: resolution: {integrity: sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==} dependencies: @@ -7326,16 +7139,6 @@ packages: '@webassemblyjs/wasm-parser': 1.11.6 '@webassemblyjs/wast-printer': 1.11.6 - /@webassemblyjs/wasm-gen@1.11.1: - resolution: {integrity: sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==} - dependencies: - '@webassemblyjs/ast': 1.11.1 - '@webassemblyjs/helper-wasm-bytecode': 1.11.1 - '@webassemblyjs/ieee754': 1.11.1 - '@webassemblyjs/leb128': 1.11.1 - '@webassemblyjs/utf8': 1.11.1 - dev: true - /@webassemblyjs/wasm-gen@1.11.6: resolution: {integrity: sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==} dependencies: @@ -7345,15 +7148,6 @@ packages: '@webassemblyjs/leb128': 1.11.6 '@webassemblyjs/utf8': 1.11.6 - /@webassemblyjs/wasm-opt@1.11.1: - resolution: {integrity: sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==} - dependencies: - '@webassemblyjs/ast': 1.11.1 - '@webassemblyjs/helper-buffer': 1.11.1 - '@webassemblyjs/wasm-gen': 1.11.1 - '@webassemblyjs/wasm-parser': 1.11.1 - dev: true - /@webassemblyjs/wasm-opt@1.11.6: resolution: {integrity: sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==} dependencies: @@ -7362,17 +7156,6 @@ packages: '@webassemblyjs/wasm-gen': 1.11.6 '@webassemblyjs/wasm-parser': 1.11.6 - /@webassemblyjs/wasm-parser@1.11.1: - resolution: {integrity: sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==} - dependencies: - '@webassemblyjs/ast': 1.11.1 - '@webassemblyjs/helper-api-error': 1.11.1 - '@webassemblyjs/helper-wasm-bytecode': 1.11.1 - '@webassemblyjs/ieee754': 1.11.1 - '@webassemblyjs/leb128': 1.11.1 - '@webassemblyjs/utf8': 1.11.1 - dev: true - /@webassemblyjs/wasm-parser@1.11.6: resolution: {integrity: sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==} dependencies: @@ -7383,13 +7166,6 @@ packages: '@webassemblyjs/leb128': 1.11.6 '@webassemblyjs/utf8': 1.11.6 - /@webassemblyjs/wast-printer@1.11.1: - resolution: {integrity: sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==} - dependencies: - '@webassemblyjs/ast': 1.11.1 - '@xtuc/long': 4.2.2 - dev: true - /@webassemblyjs/wast-printer@1.11.6: resolution: {integrity: sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==} dependencies: @@ -7480,6 +7256,7 @@ packages: acorn: ^8 dependencies: acorn: 8.10.0 + dev: false /acorn-import-assertions@1.9.0(acorn@8.10.0): resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} @@ -8211,6 +7988,7 @@ packages: electron-to-chromium: 1.4.559 node-releases: 2.0.13 update-browserslist-db: 1.0.13(browserslist@4.22.1) + dev: true /browserslist@4.22.2: resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} @@ -9554,6 +9332,7 @@ packages: /electron-to-chromium@1.4.559: resolution: {integrity: sha512-iS7KhLYCSJbdo3rUSkhDTVuFNCV34RKs2UaB9Ecr7VlqzjjWW//0nfsFF5dtDmyXlZQaDYYtID5fjtC/6lpRug==} + dev: true /electron-to-chromium@1.4.605: resolution: {integrity: sha512-V52j+P5z6cdRqTjPR/bYNxx7ETCHIkm5VIGuyCy3CMrfSnbEpIlLnk5oHmZo7gYvDfh2TfHeanB6rawyQ23ktg==} @@ -9750,10 +9529,6 @@ packages: which-typed-array: 1.1.11 dev: true - /es-module-lexer@0.9.3: - resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==} - dev: true - /es-module-lexer@1.4.1: resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==} @@ -13822,6 +13597,7 @@ packages: /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + dev: true /node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} @@ -17843,30 +17619,6 @@ packages: webpack: 5.89.0(esbuild@0.17.19) dev: true - /terser-webpack-plugin@5.3.9(webpack@5.76.0): - resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} - engines: {node: '>= 10.13.0'} - peerDependencies: - '@swc/core': '*' - esbuild: '*' - uglify-js: '*' - webpack: ^5.1.0 - peerDependenciesMeta: - '@swc/core': - optional: true - esbuild: - optional: true - uglify-js: - optional: true - dependencies: - '@jridgewell/trace-mapping': 0.3.20 - jest-worker: 27.5.1 - schema-utils: 3.3.0 - serialize-javascript: 6.0.1 - terser: 5.26.0 - webpack: 5.76.0 - dev: true - /terser-webpack-plugin@5.3.9(webpack@5.89.0): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} engines: {node: '>= 10.13.0'} @@ -18498,6 +18250,7 @@ packages: browserslist: 4.22.1 escalade: 3.1.1 picocolors: 1.0.0 + dev: true /update-browserslist-db@1.0.13(browserslist@4.22.2): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} @@ -19032,7 +18785,7 @@ packages: webpack: 5.89.0(webpack-cli@5.0.0) webpack-merge: 5.10.0 - /webpack-dev-middleware@5.3.3(webpack@5.76.0): + /webpack-dev-middleware@5.3.3(webpack@5.89.0): resolution: {integrity: sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==} engines: {node: '>= 12.13.0'} peerDependencies: @@ -19043,10 +18796,10 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.76.0 + webpack: 5.89.0(webpack-cli@5.0.0) dev: true - /webpack-dev-middleware@6.0.2(webpack@5.76.0): + /webpack-dev-middleware@6.0.2(webpack@5.89.0): resolution: {integrity: sha512-iOddiJzPcQC6lwOIu60vscbGWth8PCRcWRCwoQcTQf9RMoOWBHg5EyzpGdtSmGMrSPd5vHEfFXmVErQEmkRngQ==} engines: {node: '>= 14.15.0'} peerDependencies: @@ -19060,10 +18813,10 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.76.0 + webpack: 5.89.0(webpack-cli@5.0.0) dev: true - /webpack-dev-server@4.13.1(webpack@5.76.0): + /webpack-dev-server@4.13.1(webpack@5.89.0): resolution: {integrity: sha512-5tWg00bnWbYgkN+pd5yISQKDejRBYGEw15RaEEslH+zdbNDxxaZvEAO2WulaSaFKb5n3YG8JXsGaDsut1D0xdA==} engines: {node: '>= 12.13.0'} hasBin: true @@ -19104,8 +18857,8 @@ packages: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack: 5.76.0 - webpack-dev-middleware: 5.3.3(webpack@5.76.0) + webpack: 5.89.0(webpack-cli@5.0.0) + webpack-dev-middleware: 5.3.3(webpack@5.89.0) ws: 8.14.2 transitivePeerDependencies: - bufferutil @@ -19141,46 +18894,6 @@ packages: webpack: 5.89.0(esbuild@0.17.19) dev: true - /webpack@5.76.0: - resolution: {integrity: sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==} - engines: {node: '>=10.13.0'} - hasBin: true - peerDependencies: - webpack-cli: '*' - peerDependenciesMeta: - webpack-cli: - optional: true - dependencies: - '@types/eslint-scope': 3.7.7 - '@types/estree': 0.0.51 - '@webassemblyjs/ast': 1.11.1 - '@webassemblyjs/wasm-edit': 1.11.1 - '@webassemblyjs/wasm-parser': 1.11.1 - acorn: 8.10.0 - acorn-import-assertions: 1.8.0(acorn@8.10.0) - browserslist: 4.22.2 - chrome-trace-event: 1.0.3 - enhanced-resolve: 5.12.0 - es-module-lexer: 0.9.3 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - json-parse-even-better-errors: 2.3.1 - loader-runner: 4.3.0 - mime-types: 2.1.35 - neo-async: 2.6.2 - schema-utils: 3.3.0 - tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(webpack@5.76.0) - watchpack: 2.4.0 - webpack-sources: 3.2.3 - transitivePeerDependencies: - - '@swc/core' - - esbuild - - uglify-js - dev: true - /webpack@5.89.0(esbuild@0.17.19): resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==} engines: {node: '>=10.13.0'} @@ -19572,6 +19285,7 @@ packages: zod: ^3.18.0 dependencies: zod: 3.22.4 + dev: true /zod-validation-error@1.3.1(zod@3.22.4): resolution: {integrity: sha512-cNEXpla+tREtNdAnNKY4xKY1SGOn2yzyuZMu4O0RQylX9apRpUjNcPkEc3uHIAr5Ct7LenjZt6RzjEH6+JsqVQ==} From 5b56ed0caf8780f3d3518bce509ab69c58ebf331 Mon Sep 17 00:00:00 2001 From: easy1090 <752355956@qq.com> Date: Tue, 16 Jan 2024 15:00:21 +0800 Subject: [PATCH 4/4] feat(bundle): rspack mode add bundle analysis by rspack's hooks and add rules scan. --- e2e/package.json | 2 +- examples/rspack-minimal/package.json | 8 +- examples/rspack-minimal/rspack.config.js | 6 +- packages/core/package.json | 2 +- packages/rspack-plugin/package.json | 2 +- packages/test-helper/package.json | 2 +- packages/types/package.json | 2 +- pnpm-lock.yaml | 177 ++++++++++++++++++++--- 8 files changed, 166 insertions(+), 35 deletions(-) diff --git a/e2e/package.json b/e2e/package.json index a5c5285e..dcb9737d 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -21,7 +21,7 @@ "@rsdoctor/types": "workspace:*", "@rsdoctor/utils": "workspace:*", "@rsdoctor/webpack-plugin": "workspace:*", - "@rspack/core": "0.5.0", + "@rspack/core": "0.5.1", "@types/lodash": "^4.14.200", "@types/node": "^16", "@types/react": "^18", diff --git a/examples/rspack-minimal/package.json b/examples/rspack-minimal/package.json index e1631df0..90d203da 100644 --- a/examples/rspack-minimal/package.json +++ b/examples/rspack-minimal/package.json @@ -10,6 +10,7 @@ "dependencies": { "@arco-design/web-react": "^2.58.3", "@svgr/webpack": "^8.1.0", + "@swc/helpers": "^0.5.3", "classnames": "^2.5.1", "css-loader": "^6.9.0", "less-loader": "^11.1.4", @@ -18,11 +19,12 @@ }, "devDependencies": { "@rsdoctor/rspack-plugin": "workspace:*", - "@rspack/plugin-react-refresh": "0.5.0", - "@rspack/cli": "0.5.0", - "@rspack/core": "0.5.0", + "@rspack/cli": "0.5.1", + "@rspack/core": "0.5.1", + "@rspack/plugin-react-refresh": "0.5.1", "@types/react": "^18.0.25", "@types/react-dom": "^18.0.8", + "react-refresh": "^0.14.0", "web-vitals": "^2.1.4" }, "browserslist": { diff --git a/examples/rspack-minimal/rspack.config.js b/examples/rspack-minimal/rspack.config.js index 5ef9056d..6ba0d1a3 100644 --- a/examples/rspack-minimal/rspack.config.js +++ b/examples/rspack-minimal/rspack.config.js @@ -71,9 +71,9 @@ const config = { } ] }, - optimization: { - minimize: false // Disabling minification because it takes too long on CI - }, + resolve: { + extensions: ['...', '.tsx', '.ts', '.jsx'], // "..." means to extend from the default extensions + }, plugins: [ new ReactRefreshPlugin(), new RsdoctorRspackPlugin({ diff --git a/packages/core/package.json b/packages/core/package.json index 169a85e6..d9caa3ac 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -50,7 +50,7 @@ "@rsdoctor/sdk": "workspace:*", "@rsdoctor/types": "workspace:*", "@rsdoctor/utils": "workspace:*", - "@rspack/core": "0.5.0", + "@rspack/core": "0.5.1", "axios": "^1.6.1", "bytes": "3.1.2", "enhanced-resolve": "5.12.0", diff --git a/packages/rspack-plugin/package.json b/packages/rspack-plugin/package.json index 3bbf27a0..ecb16825 100644 --- a/packages/rspack-plugin/package.json +++ b/packages/rspack-plugin/package.json @@ -22,7 +22,7 @@ "@rsdoctor/core": "workspace:*", "@rsdoctor/sdk": "workspace:*", "@rsdoctor/graph": "workspace:*", - "@rspack/core": "0.5.0", + "@rspack/core": "0.5.1", "lodash": "^4.17.21" }, "devDependencies": { diff --git a/packages/test-helper/package.json b/packages/test-helper/package.json index a701ebf7..9e3467ad 100644 --- a/packages/test-helper/package.json +++ b/packages/test-helper/package.json @@ -24,7 +24,7 @@ "dev": "modern build --watch" }, "dependencies": { - "@rspack/core": "0.5.0", + "@rspack/core": "0.5.1", "@types/lodash": "^4.14.200", "@types/node": "^16", "lodash": "^4.17.21", diff --git a/packages/types/package.json b/packages/types/package.json index fe0545f1..54a13637 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -18,7 +18,7 @@ "start": "npm run build -- -w" }, "dependencies": { - "@rspack/core": "0.5.0", + "@rspack/core": "0.5.1", "@types/connect": "3.4.35", "@types/estree": "1.0.0", "@types/tapable": "2.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f0f4a4bf..b3f14a68 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -131,8 +131,8 @@ importers: specifier: workspace:* version: link:../packages/webpack-plugin '@rspack/core': - specifier: 0.5.0 - version: 0.5.0(@swc/helpers@0.5.3) + specifier: 0.5.1 + version: 0.5.1(@swc/helpers@0.5.3) '@types/lodash': specifier: ^4.14.200 version: 4.14.202 @@ -252,6 +252,9 @@ importers: '@svgr/webpack': specifier: ^8.1.0 version: 8.1.0(typescript@5.3.3) + '@swc/helpers': + specifier: ^0.5.3 + version: 0.5.3 classnames: specifier: ^2.5.1 version: 2.5.1 @@ -272,20 +275,23 @@ importers: specifier: workspace:* version: link:../../packages/rspack-plugin '@rspack/cli': - specifier: 0.5.0 - version: 0.5.0(@rspack/core@0.5.0) + specifier: 0.5.1 + version: 0.5.1(@rspack/core@0.5.1)(react-refresh@0.14.0) '@rspack/core': - specifier: 0.5.0 - version: 0.5.0(@swc/helpers@0.5.3) + specifier: 0.5.1 + version: 0.5.1(@swc/helpers@0.5.3) '@rspack/plugin-react-refresh': - specifier: 0.5.0 - version: 0.5.0(react-refresh@0.14.0) + specifier: 0.5.1 + version: 0.5.1(react-refresh@0.14.0) '@types/react': specifier: ^18.0.25 version: 18.2.39 '@types/react-dom': specifier: ^18.0.8 version: 18.2.17 + react-refresh: + specifier: ^0.14.0 + version: 0.14.0 web-vitals: specifier: ^2.1.4 version: 2.1.4 @@ -516,8 +522,8 @@ importers: specifier: workspace:* version: link:../utils '@rspack/core': - specifier: 0.5.0 - version: 0.5.0(@swc/helpers@0.5.3) + specifier: 0.5.1 + version: 0.5.1(@swc/helpers@0.5.3) axios: specifier: ^1.6.1 version: 1.6.1 @@ -650,8 +656,8 @@ importers: specifier: workspace:* version: link:../sdk '@rspack/core': - specifier: 0.5.0 - version: 0.5.0(@swc/helpers@0.5.3) + specifier: 0.5.1 + version: 0.5.1(@swc/helpers@0.5.3) lodash: specifier: ^4.17.21 version: 4.17.21 @@ -742,8 +748,8 @@ importers: packages/test-helper: dependencies: '@rspack/core': - specifier: 0.5.0 - version: 0.5.0(@swc/helpers@0.5.3) + specifier: 0.5.1 + version: 0.5.1(@swc/helpers@0.5.3) '@types/lodash': specifier: ^4.14.200 version: 4.14.202 @@ -769,8 +775,8 @@ importers: packages/types: dependencies: '@rspack/core': - specifier: 0.5.0 - version: 0.5.0(@swc/helpers@0.5.3) + specifier: 0.5.1 + version: 0.5.1(@swc/helpers@0.5.3) '@types/connect': specifier: 3.4.35 version: 3.4.35 @@ -5425,6 +5431,14 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true + optional: true + + /@rspack/binding-darwin-arm64@0.5.1: + resolution: {integrity: sha512-Kc0b94ZN1ecUu2Gyj20kGLWzOrdJbeN1JUTMKZx6jlLa3m7uJ+FhRjnsqFmZ5kdK2zx722ejoKr7xkrl7hOkuw==} + cpu: [arm64] + os: [darwin] + requiresBuild: true optional: true /@rspack/binding-darwin-x64@0.4.1: @@ -5448,6 +5462,14 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true + optional: true + + /@rspack/binding-darwin-x64@0.5.1: + resolution: {integrity: sha512-iqt+3gKLBwXDsscOrwWTRrr4bTjKvNlOUIeuCIEgpvyvsq/Ez7mZl1hDpPhgqIih2X34zgFdiXuo31IsbXQWGQ==} + cpu: [x64] + os: [darwin] + requiresBuild: true optional: true /@rspack/binding-linux-arm64-gnu@0.4.1: @@ -5471,6 +5493,14 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true + optional: true + + /@rspack/binding-linux-arm64-gnu@0.5.1: + resolution: {integrity: sha512-H7DV7bJat2UVTVA9BkuXTAulmY1Ysn5X7KcfIVi3Vi34C1xJja2iA7MSqozFNvkm7XrJFcTMI0trwSel9mMnNw==} + cpu: [arm64] + os: [linux] + requiresBuild: true optional: true /@rspack/binding-linux-arm64-musl@0.4.1: @@ -5494,6 +5524,14 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true + optional: true + + /@rspack/binding-linux-arm64-musl@0.5.1: + resolution: {integrity: sha512-iRyskxvtY5QpBrkcB3nBZaErQQRRP5ActQ0qkmhHx82PUfmGgyE9Q6ww9G+CwZuOuLpd1TFQhg80TV7e2EW1uw==} + cpu: [arm64] + os: [linux] + requiresBuild: true optional: true /@rspack/binding-linux-x64-gnu@0.4.1: @@ -5517,6 +5555,14 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true + optional: true + + /@rspack/binding-linux-x64-gnu@0.5.1: + resolution: {integrity: sha512-P047gkIshhSDNP2HRODJlYilJ+r5rh8G86wUmZmx5tnQMqYZZZYvvH0C+pOP9F23oprwsLIrR6v/nM5U7bMIVQ==} + cpu: [x64] + os: [linux] + requiresBuild: true optional: true /@rspack/binding-linux-x64-musl@0.4.1: @@ -5540,6 +5586,14 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true + optional: true + + /@rspack/binding-linux-x64-musl@0.5.1: + resolution: {integrity: sha512-frFHfBnEjeNNtg7OBvxDeMVtahb+ZreVrXjFp8ZMBCx7Qa9+CT1K8nUzDLQZ3wVc5shikZi1Ddts6h3BathRqA==} + cpu: [x64] + os: [linux] + requiresBuild: true optional: true /@rspack/binding-win32-arm64-msvc@0.4.1: @@ -5563,6 +5617,14 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true + optional: true + + /@rspack/binding-win32-arm64-msvc@0.5.1: + resolution: {integrity: sha512-rGDS2QIPZIYGds1GWWTIBNzvnU72CjKWKKBNQx+skFywVvs50cZ1cB78Vj4wXWzAs2hS6NPTP65mrito//hvIQ==} + cpu: [arm64] + os: [win32] + requiresBuild: true optional: true /@rspack/binding-win32-ia32-msvc@0.4.1: @@ -5586,6 +5648,14 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true + optional: true + + /@rspack/binding-win32-ia32-msvc@0.5.1: + resolution: {integrity: sha512-t7Cfz7V8y9DdlVd3XtUJduSXrmjst28+kqprCw9PecpOcdi0nnhmY23FjAGv7yTyhniLc4Kl3YJfk7lIHX8x9g==} + cpu: [ia32] + os: [win32] + requiresBuild: true optional: true /@rspack/binding-win32-x64-msvc@0.4.1: @@ -5609,6 +5679,14 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true + optional: true + + /@rspack/binding-win32-x64-msvc@0.5.1: + resolution: {integrity: sha512-7ruRf8oiK9u6Klwwdtcg96A4+QaJCUBd8qQOD0wcFF77Rr0JndZxngUWAU/MUKmy3VoibzFEyk019AVhCC4cXA==} + cpu: [x64] + os: [win32] + requiresBuild: true optional: true /@rspack/binding@0.4.1: @@ -5651,16 +5729,30 @@ packages: '@rspack/binding-win32-arm64-msvc': 0.5.0 '@rspack/binding-win32-ia32-msvc': 0.5.0 '@rspack/binding-win32-x64-msvc': 0.5.0 + dev: true - /@rspack/cli@0.5.0(@rspack/core@0.5.0): - resolution: {integrity: sha512-69D4mK/KcGQ0yv7orR76ephyTgct/ttuu0PBeh8rdfcvUG8gyzPaWOPm2yG+pCIyqK22pugk+G90vxU8/e4O9w==} + /@rspack/binding@0.5.1: + resolution: {integrity: sha512-2CMZ0oVBEgs+/v2nNzIEDqKS01Al//biWl0aDclh8ypeEIM9tkI/gvhjrovsnyib9oxsO3xCM4tCNCND+nx1CA==} + optionalDependencies: + '@rspack/binding-darwin-arm64': 0.5.1 + '@rspack/binding-darwin-x64': 0.5.1 + '@rspack/binding-linux-arm64-gnu': 0.5.1 + '@rspack/binding-linux-arm64-musl': 0.5.1 + '@rspack/binding-linux-x64-gnu': 0.5.1 + '@rspack/binding-linux-x64-musl': 0.5.1 + '@rspack/binding-win32-arm64-msvc': 0.5.1 + '@rspack/binding-win32-ia32-msvc': 0.5.1 + '@rspack/binding-win32-x64-msvc': 0.5.1 + + /@rspack/cli@0.5.1(@rspack/core@0.5.1)(react-refresh@0.14.0): + resolution: {integrity: sha512-CLLtV/MY447TE1CzGp8+J+2Db1AYJgQtXx5TCo8YZBdPknX0wYj4od4aoaHQFVrWTD39KesdXOTEIB00GY4W1g==} hasBin: true peerDependencies: '@rspack/core': '>=0.4.0' dependencies: '@discoveryjs/json-ext': 0.5.7 - '@rspack/core': 0.5.0(@swc/helpers@0.5.3) - '@rspack/dev-server': 0.5.0(@rspack/core@0.5.0) + '@rspack/core': 0.5.1(@swc/helpers@0.5.3) + '@rspack/dev-server': 0.5.1(@rspack/core@0.5.1)(react-refresh@0.14.0) colorette: 2.0.19 exit-hook: 3.2.0 interpret: 3.1.1 @@ -5748,14 +5840,39 @@ packages: webpack-sources: 3.2.3 zod: 3.22.4 zod-validation-error: 1.3.1(zod@3.22.4) + dev: true + + /@rspack/core@0.5.1(@swc/helpers@0.5.3): + resolution: {integrity: sha512-fsUKPhnBCV7UOE31W03GBfqp7lSRZBcRuvLwrUt1bmTAvl9SRrR0HuWhJAs4O8LvrjKgxRzXPM8Fpysqerfo4w==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@module-federation/runtime-tools': 0.0.8 + '@rspack/binding': 0.5.1 + '@swc/helpers': 0.5.3 + browserslist: 4.22.2 + enhanced-resolve: 5.12.0 + graceful-fs: 4.2.10 + json-parse-even-better-errors: 3.0.1 + neo-async: 2.6.2 + tapable: 2.2.1 + terminal-link: 2.1.1 + watchpack: 2.4.0 + webpack-sources: 3.2.3 + zod: 3.22.4 + zod-validation-error: 1.3.1(zod@3.22.4) - /@rspack/dev-server@0.5.0(@rspack/core@0.5.0): - resolution: {integrity: sha512-3TIBoi17h/d99v5zdGoeODds4vWAGlPnjqS1IKYSDwjqDfnneYbCB8TqGfwdoS4qZOHjCSl75BS1SspwKe69yw==} + /@rspack/dev-server@0.5.1(@rspack/core@0.5.1)(react-refresh@0.14.0): + resolution: {integrity: sha512-DDy85op9F6spSldIJSFExU93o3bl0PVwq4NvtcG0/jO0jlRk/ERN+daaW2607/iC5W1BOL9vWnPSvyWRqc2GlA==} peerDependencies: '@rspack/core': '*' dependencies: - '@rspack/core': 0.5.0(@swc/helpers@0.5.3) - '@rspack/plugin-react-refresh': 0.5.0(react-refresh@0.14.0) + '@rspack/core': 0.5.1(@swc/helpers@0.5.3) + '@rspack/plugin-react-refresh': 0.5.1(react-refresh@0.14.0) chokidar: 3.5.3 connect-history-api-fallback: 2.0.0 express: 4.18.1 @@ -5811,6 +5928,17 @@ packages: react-refresh: 0.14.0 dev: true + /@rspack/plugin-react-refresh@0.5.1(react-refresh@0.14.0): + resolution: {integrity: sha512-7wZ7i/aQcTU8wrV6+U7VwaBhtsUp6f/W4wiLXbz7EkflGsVEnfkZWgKsJneIfPyRkAldcmZqWzwCnF+7f0DvSA==} + peerDependencies: + react-refresh: '>=0.10.0 <1.0.0' + peerDependenciesMeta: + react-refresh: + optional: true + dependencies: + react-refresh: 0.14.0 + dev: true + /@rspress/core@1.9.2(typescript@5.3.3)(webpack@5.89.0): resolution: {integrity: sha512-XU4apPz3k/iTRLQ3AAuH6UG2TVTLwL4addP0BCcrVK1fnwLM6BoUu/h3iCJKcTClCi1uJHZMecgNqEP0XIMbGA==} engines: {node: '>=14.17.6'} @@ -17920,6 +18048,7 @@ packages: /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: true /tsm@2.3.0: resolution: {integrity: sha512-++0HFnmmR+gMpDtKTnW3XJ4yv9kVGi20n+NfyQWB9qwJvTaIWY9kBmzek2YUQK5APTQ/1DTrXmm4QtFPmW9Rzw==}