From 0dc5661e4611655f881f1ac6eebfd93305e5863b Mon Sep 17 00:00:00 2001 From: sebastien Date: Wed, 14 Aug 2024 13:39:47 +0200 Subject: [PATCH 01/56] Rspack POC --- packages/docusaurus-plugin-pwa/src/index.ts | 1 + .../docusaurus-theme-classic/src/index.ts | 5 + packages/docusaurus/package.json | 2 +- packages/docusaurus/src/client/docusaurus.ts | 26 ++-- packages/docusaurus/src/commands/build.ts | 2 + .../docusaurus/src/commands/start/webpack.ts | 6 +- packages/docusaurus/src/webpack/base.ts | 17 ++- packages/docusaurus/src/webpack/client.ts | 8 +- packages/docusaurus/src/webpack/configure.ts | 3 + .../src/webpack/plugins/ChunkAssetPlugin.ts | 3 + packages/docusaurus/src/webpack/utils.ts | 11 +- website/package.json | 6 +- yarn.lock | 111 +++++++++++++++++- 13 files changed, 172 insertions(+), 29 deletions(-) diff --git a/packages/docusaurus-plugin-pwa/src/index.ts b/packages/docusaurus-plugin-pwa/src/index.ts index 4c23cb38457d..f31d9a223216 100644 --- a/packages/docusaurus-plugin-pwa/src/index.ts +++ b/packages/docusaurus-plugin-pwa/src/index.ts @@ -177,6 +177,7 @@ export default function pluginPWA( }, }; + // @ts-expect-error: todo fix await compile([swWebpackConfig]); const swDest = path.resolve(props.outDir, 'sw.js'); diff --git a/packages/docusaurus-theme-classic/src/index.ts b/packages/docusaurus-theme-classic/src/index.ts index 9ffb4e3e87db..b37e15be150a 100644 --- a/packages/docusaurus-theme-classic/src/index.ts +++ b/packages/docusaurus-theme-classic/src/index.ts @@ -24,9 +24,11 @@ import type webpack from 'webpack'; const requireFromDocusaurusCore = createRequire( require.resolve('@docusaurus/core/package.json'), ); +/* const ContextReplacementPlugin = requireFromDocusaurusCore( 'webpack/lib/ContextReplacementPlugin', ) as typeof webpack.ContextReplacementPlugin; + */ function getInfimaCSSFile(direction: string) { return `infima/dist/css/default/default${ @@ -99,10 +101,13 @@ export default function themeClassic( // This allows better optimization by only bundling those components // that the user actually needs, because the modules are dynamically // required and can't be known during compile time. + /* + ContextReplacementPlugin is not supported yet, tracked here https://github.com/web-infra-dev/rspack/issues/7474 new ContextReplacementPlugin( /prismjs[\\/]components$/, new RegExp(`^./(${prismLanguages})$`), ), + */ ], }; }, diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index b65364c101e3..1f21e0b659d7 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -96,7 +96,7 @@ "tslib": "^2.6.0", "update-notifier": "^6.0.2", "url-loader": "^4.1.1", - "webpack": "^5.88.1", + "webpack": "npm:@rspack/core@1.0.0-beta.4", "webpack-bundle-analyzer": "^4.9.0", "webpack-dev-server": "^4.15.1", "webpack-merge": "^5.9.0", diff --git a/packages/docusaurus/src/client/docusaurus.ts b/packages/docusaurus/src/client/docusaurus.ts index 79bb4e21c779..50cf94471fd2 100644 --- a/packages/docusaurus/src/client/docusaurus.ts +++ b/packages/docusaurus/src/client/docusaurus.ts @@ -64,18 +64,20 @@ const prefetch: Docusaurus['prefetch'] = ( // Prefetch all webpack chunk assets file needed. return Promise.all( - chunkNamesNeeded.map((chunkName) => { - // "__webpack_require__.gca" is injected by ChunkAssetPlugin. Pass it - // the name of the chunk you want to load and it will return its URL. - // eslint-disable-next-line camelcase - const chunkAsset = __webpack_require__.gca(chunkName); - - // In some cases, webpack might decide to optimize further, leading to - // the chunk assets being merged to another chunk. In this case, we can - // safely filter it out and don't need to load it. - if (chunkAsset && !chunkAsset.includes('undefined')) { - return prefetchHelper(chunkAsset); - } + chunkNamesNeeded.map((/* chunkName */) => { + /* TODO ChunkAssetPlugin not working now + + // "__webpack_require__.gca" is injected by ChunkAssetPlugin. Pass it + // the name of the chunk you want to load and it will return its URL. + // eslint-disable-next-line camelcase + const chunkAsset = __webpack_require__.gca(chunkName); + // In some cases, webpack might decide to optimize further, leading to + // the chunk assets being merged to another chunk. In this case, we can + // safely filter it out and don't need to load it. + if (chunkAsset && !chunkAsset.includes('undefined')) { + return prefetchHelper(chunkAsset); + } + */ return Promise.resolve(); }), ); diff --git a/packages/docusaurus/src/commands/build.ts b/packages/docusaurus/src/commands/build.ts index dee3fc8869ea..3ddf4376d76a 100644 --- a/packages/docusaurus/src/commands/build.ts +++ b/packages/docusaurus/src/commands/build.ts @@ -353,6 +353,7 @@ async function getBuildClientConfig({ plugins, config, isServer: false, + // @ts-expect-error: todo fix jsLoader: props.siteConfig.webpack?.jsLoader, }); return {clientConfig: config, clientManifestPath: result.clientManifestPath}; @@ -368,6 +369,7 @@ async function getBuildServerConfig({props}: {props: Props}) { plugins, config, isServer: true, + // @ts-expect-error: todo fix jsLoader: props.siteConfig.webpack?.jsLoader, }); return {serverConfig: config, serverBundlePath: result.serverBundlePath}; diff --git a/packages/docusaurus/src/commands/start/webpack.ts b/packages/docusaurus/src/commands/start/webpack.ts index ddcd7abb2c35..de12fa475c99 100644 --- a/packages/docusaurus/src/commands/start/webpack.ts +++ b/packages/docusaurus/src/commands/start/webpack.ts @@ -7,7 +7,7 @@ import path from 'path'; import merge from 'webpack-merge'; -import webpack from 'webpack'; +import {rspack} from 'webpack'; import logger from '@docusaurus/logger'; import WebpackDevServer from 'webpack-dev-server'; import evalSourceMapMiddleware from 'react-dev-utils/evalSourceMapMiddleware'; @@ -139,6 +139,7 @@ async function getStartClientConfig({ plugins, config, isServer: false, + // @ts-expect-error: todo fix jsLoader: siteConfig.webpack?.jsLoader, }); return config; @@ -159,7 +160,7 @@ export async function createWebpackDevServer({ poll: cliOptions.poll, }); - const compiler = webpack(config); + const compiler = rspack(config); registerWebpackE2ETestHook(compiler); const defaultDevServerConfig = await createDevServerConfig({ @@ -174,5 +175,6 @@ export async function createWebpackDevServer({ [defaultDevServerConfig, config.devServer].filter(Boolean), ); + // @ts-expect-error: todo fix return new WebpackDevServer(devServerConfig, compiler); } diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index 872ed041cdd2..5ef4ab99d5bd 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -7,7 +7,9 @@ import fs from 'fs-extra'; import path from 'path'; -import MiniCssExtractPlugin from 'mini-css-extract-plugin'; +// import MiniCssExtractPlugin from 'mini-css-extract-plugin'; +import {CssExtractRspackPlugin as MiniCssExtractPlugin} from 'webpack'; + import {md5Hash, getFileLoaderUtils} from '@docusaurus/utils'; import { getCustomizableJSLoader, @@ -87,6 +89,7 @@ export async function createBaseConfig({ return { mode, name, + // @ts-expect-error: TODO fix this cache: { type: 'filesystem', // Can we share the same cache across locales? @@ -131,6 +134,7 @@ export async function createBaseConfig({ }, devtool: isProd ? undefined : 'eval-cheap-module-source-map', resolve: { + // @ts-expect-error: TODO fix this unsafeCache: false, // Not enabled, does not seem to improve perf much extensions: ['.wasm', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json'], symlinks: true, // See https://github.com/facebook/docusaurus/issues/3272 @@ -202,15 +206,21 @@ export async function createBaseConfig({ }, module: { rules: [ + // @ts-expect-error: TODO fix this fileLoaderUtils.rules.images(), + // @ts-expect-error: TODO fix this fileLoaderUtils.rules.fonts(), + // @ts-expect-error: TODO fix this fileLoaderUtils.rules.media(), + // @ts-expect-error: TODO fix this fileLoaderUtils.rules.svg(), + // @ts-expect-error: TODO fix this fileLoaderUtils.rules.otherAssets(), { test: /\.[jt]sx?$/i, exclude: excludeJS, use: [ + // @ts-expect-error: TODO fix this getCustomizableJSLoader(siteConfig.webpack?.jsLoader)({ isServer, babelOptions: await getCustomBabelConfigFilePath(siteDir), @@ -220,6 +230,7 @@ export async function createBaseConfig({ { test: CSS_REGEX, exclude: CSS_MODULE_REGEX, + // @ts-expect-error: TODO fix this use: getStyleLoaders(isServer, { importLoaders: 1, sourceMap: !isProd, @@ -229,6 +240,7 @@ export async function createBaseConfig({ // using the extension .module.css { test: CSS_MODULE_REGEX, + // @ts-expect-error: TODO fix this use: getStyleLoaders(isServer, { modules: { localIdentName: isProd @@ -242,6 +254,9 @@ export async function createBaseConfig({ }, ], }, + experiments: { + css: false, + }, plugins: [ new MiniCssExtractPlugin({ filename: isProd diff --git a/packages/docusaurus/src/webpack/client.ts b/packages/docusaurus/src/webpack/client.ts index 6a2e80899068..6f676f247b84 100644 --- a/packages/docusaurus/src/webpack/client.ts +++ b/packages/docusaurus/src/webpack/client.ts @@ -7,16 +7,16 @@ import path from 'path'; import merge from 'webpack-merge'; -import WebpackBar from 'webpackbar'; +// import WebpackBar from 'webpackbar'; import webpack from 'webpack'; import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer'; import ReactLoadableSSRAddon from 'react-loadable-ssr-addon-v5-slorber'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import {createBaseConfig} from './base'; -import ChunkAssetPlugin from './plugins/ChunkAssetPlugin'; +// import ChunkAssetPlugin from './plugins/ChunkAssetPlugin'; import CleanWebpackPlugin from './plugins/CleanWebpackPlugin'; import ForceTerminatePlugin from './plugins/ForceTerminatePlugin'; -import {createStaticDirectoriesCopyPlugin} from './plugins/StaticDirectoriesCopyPlugin'; +// import {createStaticDirectoriesCopyPlugin} from './plugins/StaticDirectoriesCopyPlugin'; import type {Props} from '@docusaurus/types'; import type {Configuration} from 'webpack'; @@ -45,12 +45,14 @@ async function createBaseClientConfig({ new webpack.DefinePlugin({ 'process.env.HYDRATE_CLIENT_ENTRY': JSON.stringify(hydrate), }), + /* new ChunkAssetPlugin(), // Show compilation progress bar and build time. new WebpackBar({ name: 'Client', }), await createStaticDirectoriesCopyPlugin({props}), + */ ].filter(Boolean), }); } diff --git a/packages/docusaurus/src/webpack/configure.ts b/packages/docusaurus/src/webpack/configure.ts index cf499645feca..db5d12c91b6b 100644 --- a/packages/docusaurus/src/webpack/configure.ts +++ b/packages/docusaurus/src/webpack/configure.ts @@ -38,11 +38,14 @@ export function applyConfigureWebpack( ): Configuration { // Export some utility functions const utils: ConfigureWebpackUtils = { + // @ts-expect-error: todo fix getStyleLoaders, + // @ts-expect-error: todo fix getJSLoader: getCustomizableJSLoader(jsLoader), }; if (typeof configureWebpack === 'function') { const {mergeStrategy, ...res} = + // @ts-expect-error: todo fix configureWebpack(config, isServer, utils, content) ?? {}; const customizeRules = mergeStrategy ?? {}; return mergeWithCustomize({ diff --git a/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts b/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts index b1eaf0f527eb..60e54b6f93a5 100644 --- a/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts +++ b/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts @@ -22,6 +22,7 @@ const pluginName = 'chunk-asset-plugin'; */ export default class ChunkAssetPlugin { apply(compiler: Compiler): void { + /* compiler.hooks.thisCompilation.tap(pluginName, ({mainTemplate}) => { mainTemplate.hooks.requireExtensions.tap(pluginName, (source, chunk) => { const chunkIdToName = chunk.getChunkMaps(false).name; @@ -51,5 +52,7 @@ export default class ChunkAssetPlugin { return webpack.Template.asString(buf); }); }); + + */ } } diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index 86a695ea79a1..fef13f8d2559 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -10,8 +10,13 @@ import path from 'path'; import crypto from 'crypto'; import logger from '@docusaurus/logger'; import {BABEL_CONFIG_FILE_NAME} from '@docusaurus/utils'; -import MiniCssExtractPlugin from 'mini-css-extract-plugin'; -import webpack, {type Configuration, type RuleSetRule} from 'webpack'; +// import MiniCssExtractPlugin from 'mini-css-extract-plugin'; +import webpack, { + rspack, + CssExtractRspackPlugin as MiniCssExtractPlugin, + type Configuration, + type RuleSetRule, +} from 'webpack'; import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages'; import type {TransformOptions} from '@babel/core'; @@ -179,7 +184,7 @@ declare global { export function compile(config: Configuration[]): Promise { return new Promise((resolve, reject) => { - const compiler = webpack(config); + const compiler = rspack(config); compiler.run((err, stats) => { if (err) { logger.error(err.stack ?? err); diff --git a/website/package.json b/website/package.json index 0d98f62a338f..a1a0b9e513be 100644 --- a/website/package.json +++ b/website/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "docusaurus": "docusaurus", - "start": "docusaurus start", - "build": "docusaurus build", + "start": "RSPACK_CONFIG_VALIDATE=loose-silent docusaurus start", + "build": "RSPACK_CONFIG_VALIDATE=loose-silent docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear && rimraf changelog && rimraf _dogfooding/_swizzle_theme_tests", @@ -21,7 +21,7 @@ "build:baseUrl": "cross-env BASE_URL='/build/' yarn build", "start:blogOnly": "cross-env yarn start --config=docusaurus.config-blog-only.js", "build:blogOnly": "cross-env yarn build --config=docusaurus.config-blog-only.js", - "build:fast": "cross-env BUILD_FAST=true yarn build --locale en", + "RSPACK_CONFIG_VALIDATE=loose-silent build:fast": "cross-env BUILD_FAST=true yarn build --locale en", "netlify:build:production": "yarn docusaurus write-translations && yarn netlify:crowdin:delay && yarn netlify:crowdin:uploadSources && yarn netlify:crowdin:downloadTranslations && yarn build && yarn test:css-order", "netlify:build:branchDeploy": "yarn build && yarn test:css-order", "netlify:build:deployPreview": "yarn build && yarn test:css-order", diff --git a/yarn.lock b/yarn.lock index 83f08094c2ab..f2253d2c57a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2164,6 +2164,34 @@ dependencies: "@types/mdx" "^2.0.0" +"@module-federation/runtime-tools@0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@module-federation/runtime-tools/-/runtime-tools-0.2.3.tgz#2701b6fbcea322b4c5523fca1456f0cae8df73cd" + integrity sha512-capN8CVTCEqNAjnl102girrkevczoQfnQYyiYC4WuyKsg7+LUqfirIe1Eiyv6VSE2UgvOTZDnqvervA6rBOlmg== + dependencies: + "@module-federation/runtime" "0.2.3" + "@module-federation/webpack-bundler-runtime" "0.2.3" + +"@module-federation/runtime@0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@module-federation/runtime/-/runtime-0.2.3.tgz#4ff46fe6de986aa9843a8e631b68a8e8dd416c0d" + integrity sha512-N+ZxBUb1mkmfO9XT1BwgYQgShtUTlijHbukqQ4afFka5lRAT+ayC7RKfHJLz0HbuexKPCmPBDfdmCnErR5WyTQ== + dependencies: + "@module-federation/sdk" "0.2.3" + +"@module-federation/sdk@0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@module-federation/sdk/-/sdk-0.2.3.tgz#b640830b299d2b9d27b48bced10d7126c15c1719" + integrity sha512-W9zrPchLocyCBc/B8CW21akcfJXLl++9xBe1L1EtgxZGfj/xwHt0GcBWE/y+QGvYTL2a1iZjwscbftbUhxgxXg== + +"@module-federation/webpack-bundler-runtime@0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.2.3.tgz#5d03070ede8c63d76c62043db17651f398bfb1ab" + integrity sha512-L/jt2uJ+8dwYiyn9GxryzDR6tr/Wk8rpgvelM2EBeLIhu7YxCHSmSjQYhw3BTux9zZIr47d1K9fGjBFsVRd/SQ== + dependencies: + "@module-federation/runtime" "0.2.3" + "@module-federation/sdk" "0.2.3" + "@netlify/functions@^1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@netlify/functions/-/functions-1.6.0.tgz#c373423e6fef0e6f7422ac0345e8bbf2cb692366" @@ -2686,6 +2714,71 @@ estree-walker "^1.0.1" picomatch "^2.2.2" +"@rspack/binding-darwin-arm64@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-beta.4.tgz#2ad5d6c4492ff3b0bee5bb582a6f421b81803aec" + integrity sha512-A5FLhVmvuz8E/r0C29UODXk44wNTZX/vcMerSSQ/V53rGndPOR5mU6jOTy1ziGZ5liDCKWfobmd7Xe7Qj+oR4g== + +"@rspack/binding-darwin-x64@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.0-beta.4.tgz#cf6c8c7a313cb667bf67f23f6944780ae2c33f5e" + integrity sha512-OARwlMyijkLTEfJq3ap23kU/KWpYq+HNhWC34vGbjS+uTmJyBBHG1J9tbg5Qg5VdXMUBGPuPUSEzv8+cHGdZjQ== + +"@rspack/binding-linux-arm64-gnu@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-beta.4.tgz#322d4e549f5918fcad5559b8918154c6491dfc3b" + integrity sha512-r++bMpRbyT6CqjW9bO4PW7oOo4Nf37Q0s/TJMXxmWX0jQZ5EzGUteB2b5sw631RBL1Y2JBNN9r1nKJOPnTplfQ== + +"@rspack/binding-linux-arm64-musl@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-beta.4.tgz#bf05a1b7486f05d17f8109d20c67913d2b5a4219" + integrity sha512-kVT9qujXoz415woKmGuM+aV0349aeMjEi5P/X1j6FMLmcZX+qmSLunPgn4wmRFxPCvg6kS1IK/HjuCPQ02nrxA== + +"@rspack/binding-linux-x64-gnu@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-beta.4.tgz#13e650e4fd9b28b4f24ba9a08879acc0f8811d16" + integrity sha512-xRnmFsY9yIqPVhA+71kJ1ACunyqO2rrWn15Dn1T7/79i14CsT++yCr1OiaxU3VUOUirzOF0QNg3EcChfxsn6NA== + +"@rspack/binding-linux-x64-musl@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-beta.4.tgz#bd5386fcf56387060cfe9384e546134728744279" + integrity sha512-Ho86q7ItvVFFQBP7dHY/MUZIXY6ymi/4dJ7cs5eFdWEi79bMXwPA3eU59N/oXRXjvGjbwQ1KYR9pcD+1PAnd4Q== + +"@rspack/binding-win32-arm64-msvc@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-beta.4.tgz#6a5f99f235b8c34d015e91d411f89666b3000670" + integrity sha512-f5NgYRJsmrXgT3wkSDeMH3avX/Zy78lYjy4nNnPJ/GOu4xkzcX8Y4a4j6filODDgMCxo05dQTY8/DP0wHTJmzg== + +"@rspack/binding-win32-ia32-msvc@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.0-beta.4.tgz#acf4d6f8a2646d19b4c8c3e920d5324ff86b45be" + integrity sha512-NIT4b/YMS/ysBpgriewiRRO7k0aPsoZ8961f2JQnS1nmzPYKau/Fnh/g+BUwtofGuHjqqDxOCN9UxJhdTPIXUg== + +"@rspack/binding-win32-x64-msvc@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-beta.4.tgz#55e94bf8dc24a07a92ff7c55a29ecac364f86cdd" + integrity sha512-ajJ5WzDqg4vy02sNJl71JpOKkc/f/cR3s37RJHR4njKMRCzc5roTEqXG9RiNMiBCXW0B0lmceCU+5kpaIZQ3vA== + +"@rspack/binding@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.0-beta.4.tgz#106a501d362637d4b78c76c2b518b0ddc95b3f58" + integrity sha512-LTv5hsyv1RVo15QnZq/eQYPHnsyQbjvEoWYtWHNUEAe4uMwpu2yvQlRVHjFjJvyPv03xqzi9vaaRknOVK4RAVA== + optionalDependencies: + "@rspack/binding-darwin-arm64" "1.0.0-beta.4" + "@rspack/binding-darwin-x64" "1.0.0-beta.4" + "@rspack/binding-linux-arm64-gnu" "1.0.0-beta.4" + "@rspack/binding-linux-arm64-musl" "1.0.0-beta.4" + "@rspack/binding-linux-x64-gnu" "1.0.0-beta.4" + "@rspack/binding-linux-x64-musl" "1.0.0-beta.4" + "@rspack/binding-win32-arm64-msvc" "1.0.0-beta.4" + "@rspack/binding-win32-ia32-msvc" "1.0.0-beta.4" + "@rspack/binding-win32-x64-msvc" "1.0.0-beta.4" + +"@rspack/lite-tapable@1.0.0-beta.5": + version "1.0.0-beta.5" + resolved "https://registry.yarnpkg.com/@rspack/lite-tapable/-/lite-tapable-1.0.0-beta.5.tgz#a8ad987c082f684cb4e65a70f9e8cca9882892d6" + integrity sha512-jTmLhUeZgR3u+cHp5Z46FuTWUg+6VWWwbWkIzgVvQoN7YK9ntFfm7k5+cImTEQ0qe1r6P43uV0qD606SoZspKg== + "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" @@ -5000,10 +5093,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599: - version "1.0.30001614" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001614.tgz#f894b4209376a0bf923d67d9c361d96b1dfebe39" - integrity sha512-jmZQ1VpmlRwHgdP1/uiKzgiAuGOfLEJsYFP4+GBou/QQ4U6IOJCB4NP1c+1p9RGLpwObcT94jA5/uO+F1vBbog== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599, caniuse-lite@^1.0.30001616: + version "1.0.30001651" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz#52de59529e8b02b1aedcaaf5c05d9e23c0c28138" + integrity sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg== ccount@^2.0.0: version "2.0.1" @@ -16797,6 +16890,16 @@ webpack@^5, webpack@^5.88.1: watchpack "^2.4.0" webpack-sources "^3.2.3" +"webpack@npm:@rspack/core@1.0.0-beta.4": + version "1.0.0-beta.4" + resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.0-beta.4.tgz#98eabffd5a7c216fe4c5cb79d5c9f1eab20edd98" + integrity sha512-FhHRhUX4+ob9vj/N2vl9mHHSFlygnTUKF1ztzcDjQesFWnmBKKjccSGExFWYd47nT7XUn7j3xziHZ4NKAs02LA== + dependencies: + "@module-federation/runtime-tools" "0.2.3" + "@rspack/binding" "1.0.0-beta.4" + "@rspack/lite-tapable" "1.0.0-beta.5" + caniuse-lite "^1.0.30001616" + webpackbar@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/webpackbar/-/webpackbar-5.0.2.tgz#d3dd466211c73852741dfc842b7556dcbc2b0570" From b1f4ae2354694b41d79b2db8c43d904522b18e64 Mon Sep 17 00:00:00 2001 From: sebastien Date: Wed, 14 Aug 2024 13:49:41 +0200 Subject: [PATCH 02/56] fix scripts --- website/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/package.json b/website/package.json index a1a0b9e513be..8edd26599875 100644 --- a/website/package.json +++ b/website/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "docusaurus": "docusaurus", - "start": "RSPACK_CONFIG_VALIDATE=loose-silent docusaurus start", - "build": "RSPACK_CONFIG_VALIDATE=loose-silent docusaurus build", + "start": "cross-env RSPACK_CONFIG_VALIDATE=loose-silent docusaurus start", + "build": "cross-env RSPACK_CONFIG_VALIDATE=loose-silent docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear && rimraf changelog && rimraf _dogfooding/_swizzle_theme_tests", @@ -21,7 +21,7 @@ "build:baseUrl": "cross-env BASE_URL='/build/' yarn build", "start:blogOnly": "cross-env yarn start --config=docusaurus.config-blog-only.js", "build:blogOnly": "cross-env yarn build --config=docusaurus.config-blog-only.js", - "RSPACK_CONFIG_VALIDATE=loose-silent build:fast": "cross-env BUILD_FAST=true yarn build --locale en", + "build:fast": "cross-env BUILD_FAST=true RSPACK_CONFIG_VALIDATE=loose-silent yarn build --locale en", "netlify:build:production": "yarn docusaurus write-translations && yarn netlify:crowdin:delay && yarn netlify:crowdin:uploadSources && yarn netlify:crowdin:downloadTranslations && yarn build && yarn test:css-order", "netlify:build:branchDeploy": "yarn build && yarn test:css-order", "netlify:build:deployPreview": "yarn build && yarn test:css-order", From ca7fefc5245160aecc6cad047107695c4a6b4c98 Mon Sep 17 00:00:00 2001 From: sebastien Date: Wed, 14 Aug 2024 17:51:13 +0200 Subject: [PATCH 03/56] temp remove DefinePlugin --- packages/docusaurus/src/webpack/client.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus/src/webpack/client.ts b/packages/docusaurus/src/webpack/client.ts index 6f676f247b84..be9d66293239 100644 --- a/packages/docusaurus/src/webpack/client.ts +++ b/packages/docusaurus/src/webpack/client.ts @@ -8,7 +8,7 @@ import path from 'path'; import merge from 'webpack-merge'; // import WebpackBar from 'webpackbar'; -import webpack from 'webpack'; +import webpack, {rspack} from 'webpack'; import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer'; import ReactLoadableSSRAddon from 'react-loadable-ssr-addon-v5-slorber'; import HtmlWebpackPlugin from 'html-webpack-plugin'; @@ -42,9 +42,11 @@ async function createBaseClientConfig({ runtimeChunk: true, }, plugins: [ - new webpack.DefinePlugin({ + /* + new rspack.DefinePlugin({ 'process.env.HYDRATE_CLIENT_ENTRY': JSON.stringify(hydrate), }), + /* new ChunkAssetPlugin(), // Show compilation progress bar and build time. From 127845d20eb22cf29a90197955ea58f782e7893f Mon Sep 17 00:00:00 2001 From: sebastien Date: Wed, 14 Aug 2024 18:30:25 +0200 Subject: [PATCH 04/56] fix pwa EnvironmentPlugin + CopyRspackPlugin --- packages/docusaurus-plugin-pwa/package.json | 2 +- packages/docusaurus-plugin-pwa/src/index.ts | 27 ++++++++++--------- packages/docusaurus/src/webpack/client.ts | 11 ++++---- .../plugins/StaticDirectoriesCopyPlugin.ts | 7 ++--- 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json index 39f2c9296ef9..666e2ddb6854 100644 --- a/packages/docusaurus-plugin-pwa/package.json +++ b/packages/docusaurus-plugin-pwa/package.json @@ -34,7 +34,7 @@ "core-js": "^3.31.1", "terser-webpack-plugin": "^5.3.9", "tslib": "^2.6.0", - "webpack": "^5.88.1", + "webpack": "npm:@rspack/core@1.0.0-beta.4", "webpack-merge": "^5.9.0", "webpackbar": "^5.0.2", "workbox-build": "^7.0.0", diff --git a/packages/docusaurus-plugin-pwa/src/index.ts b/packages/docusaurus-plugin-pwa/src/index.ts index f31d9a223216..2faa57935b98 100644 --- a/packages/docusaurus-plugin-pwa/src/index.ts +++ b/packages/docusaurus-plugin-pwa/src/index.ts @@ -6,7 +6,7 @@ */ import path from 'path'; -import webpack, {type Configuration} from 'webpack'; +import webpack, {rspack, type Configuration} from 'webpack'; import WebpackBar from 'webpackbar'; import Terser from 'terser-webpack-plugin'; import {injectManifest} from 'workbox-build'; @@ -89,18 +89,22 @@ export default function pluginPWA( }); }, + // @ts-expect-error: todo fix configureWebpack(config) { return { plugins: [ - new webpack.EnvironmentPlugin({ - PWA_DEBUG: debug, - PWA_SERVICE_WORKER_URL: path.posix.resolve( - `${(config.output?.publicPath as string) || '/'}`, - 'sw.js', - ), - PWA_OFFLINE_MODE_ACTIVATION_STRATEGIES: - offlineModeActivationStrategies, - }), + new rspack.EnvironmentPlugin( + // @ts-expect-error: todo fix + { + PWA_DEBUG: debug, + PWA_SERVICE_WORKER_URL: path.posix.resolve( + `${(config.output?.publicPath as string) || '/'}`, + 'sw.js', + ), + PWA_OFFLINE_MODE_ACTIVATION_STRATEGIES: + offlineModeActivationStrategies, + }, + ), ], }; }, @@ -157,7 +161,7 @@ export default function pluginPWA( ], }, plugins: [ - new webpack.EnvironmentPlugin({ + new rspack.EnvironmentPlugin({ // Fallback value required with Webpack 5 PWA_SW_CUSTOM: swCustom ?? '', }), @@ -177,7 +181,6 @@ export default function pluginPWA( }, }; - // @ts-expect-error: todo fix await compile([swWebpackConfig]); const swDest = path.resolve(props.outDir, 'sw.js'); diff --git a/packages/docusaurus/src/webpack/client.ts b/packages/docusaurus/src/webpack/client.ts index be9d66293239..10c81a3a3f89 100644 --- a/packages/docusaurus/src/webpack/client.ts +++ b/packages/docusaurus/src/webpack/client.ts @@ -7,7 +7,7 @@ import path from 'path'; import merge from 'webpack-merge'; -// import WebpackBar from 'webpackbar'; +import WebpackBar from 'webpackbar'; import webpack, {rspack} from 'webpack'; import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer'; import ReactLoadableSSRAddon from 'react-loadable-ssr-addon-v5-slorber'; @@ -16,7 +16,7 @@ import {createBaseConfig} from './base'; // import ChunkAssetPlugin from './plugins/ChunkAssetPlugin'; import CleanWebpackPlugin from './plugins/CleanWebpackPlugin'; import ForceTerminatePlugin from './plugins/ForceTerminatePlugin'; -// import {createStaticDirectoriesCopyPlugin} from './plugins/StaticDirectoriesCopyPlugin'; +import {createStaticDirectoriesCopyPlugin} from './plugins/StaticDirectoriesCopyPlugin'; import type {Props} from '@docusaurus/types'; import type {Configuration} from 'webpack'; @@ -42,19 +42,18 @@ async function createBaseClientConfig({ runtimeChunk: true, }, plugins: [ - /* new rspack.DefinePlugin({ 'process.env.HYDRATE_CLIENT_ENTRY': JSON.stringify(hydrate), }), - /* - new ChunkAssetPlugin(), + // new ChunkAssetPlugin(), + // Show compilation progress bar and build time. new WebpackBar({ name: 'Client', }), + await createStaticDirectoriesCopyPlugin({props}), - */ ].filter(Boolean), }); } diff --git a/packages/docusaurus/src/webpack/plugins/StaticDirectoriesCopyPlugin.ts b/packages/docusaurus/src/webpack/plugins/StaticDirectoriesCopyPlugin.ts index 8efaa2fd456c..d6b093071a62 100644 --- a/packages/docusaurus/src/webpack/plugins/StaticDirectoriesCopyPlugin.ts +++ b/packages/docusaurus/src/webpack/plugins/StaticDirectoriesCopyPlugin.ts @@ -7,14 +7,15 @@ import path from 'path'; import fs from 'fs-extra'; -import CopyWebpackPlugin from 'copy-webpack-plugin'; +// import CopyWebpackPlugin from 'copy-webpack-plugin'; +import {rspack} from 'webpack'; import type {Props} from '@docusaurus/types'; export async function createStaticDirectoriesCopyPlugin({ props, }: { props: Props; -}): Promise { +}): Promise { const { outDir, siteDir, @@ -44,7 +45,7 @@ export async function createStaticDirectoriesCopyPlugin({ return undefined; } - return new CopyWebpackPlugin({ + return new rspack.CopyRspackPlugin({ patterns: staticDirectories.map((dir) => ({ from: dir, to: outDir, From c13d987922ff8ae29edcc87ac6f26c1f251ba88b Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 15 Aug 2024 13:15:52 +0200 Subject: [PATCH 05/56] Add Rsdoctor plugin --- website/docusaurus.config.ts | 24 +- website/package.json | 5 +- yarn.lock | 447 +++++++++++++++++++++++++++++++++-- 3 files changed, 457 insertions(+), 19 deletions(-) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 8668adef3a26..640f2ee97580 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -8,6 +8,8 @@ import path from 'path'; import npm2yarn from '@docusaurus/remark-plugin-npm2yarn'; import remarkMath from 'remark-math'; import rehypeKatex from 'rehype-katex'; +import {RsdoctorRspackPlugin} from '@rsdoctor/rspack-plugin'; + import configTabs from './src/remark/configTabs'; import versions from './versions.json'; @@ -23,7 +25,8 @@ import ConfigLocalized from './docusaurus.config.localized.json'; import PrismLight from './src/utils/prismLight'; import PrismDark from './src/utils/prismDark'; -import type {Config, DocusaurusConfig} from '@docusaurus/types'; + +import type {Config, DocusaurusConfig, PluginConfig} from '@docusaurus/types'; import type * as Preset from '@docusaurus/preset-classic'; import type {Options as DocsOptions} from '@docusaurus/plugin-content-docs'; @@ -32,6 +35,22 @@ import type {Options as PageOptions} from '@docusaurus/plugin-content-pages'; import type {Options as IdealImageOptions} from '@docusaurus/plugin-ideal-image'; import type {Options as ClientRedirectsOptions} from '@docusaurus/plugin-client-redirects'; +const RsdoctorPlugin: PluginConfig = () => { + console.log('RsdoctorPlugin enabled'); + return { + name: 'docusaurus-rsdoctor-plugin', + configureWebpack: () => { + return { + plugins: [ + new RsdoctorRspackPlugin({ + // plugin options + }), + ], + }; + }, + }; +}; + const ArchivedVersionsDropdownItems = Object.entries(VersionsArchived).splice( 0, 5, @@ -270,6 +289,7 @@ export default async function createConfigAsync() { ], themes: ['live-codeblock', ...dogfoodingThemeInstances], plugins: [ + process.env.RSDOCTOR ? RsdoctorPlugin : null, [ './src/plugins/changelog/index.js', { @@ -417,7 +437,7 @@ export default async function createConfigAsync() { '@docusaurus/theme-mermaid', './src/plugins/featureRequests/FeatureRequestsPlugin.js', ...dogfoodingPluginInstances, - ], + ].filter(Boolean), presets: [ [ 'classic', diff --git a/website/package.json b/website/package.json index 8edd26599875..2b4f87a58f2c 100644 --- a/website/package.json +++ b/website/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "docusaurus": "docusaurus", - "start": "cross-env RSPACK_CONFIG_VALIDATE=loose-silent docusaurus start", - "build": "cross-env RSPACK_CONFIG_VALIDATE=loose-silent docusaurus build", + "start": "cross-env RSDOCTOR=true RSPACK_CONFIG_VALIDATE=loose-silent docusaurus start", + "build": "cross-env RSDOCTOR=true RSPACK_CONFIG_VALIDATE=loose-silent docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear && rimraf changelog && rimraf _dogfooding/_swizzle_theme_tests", @@ -84,6 +84,7 @@ "devDependencies": { "@docusaurus/eslint-plugin": "3.5.2", "@docusaurus/tsconfig": "3.5.2", + "@rsdoctor/rspack-plugin": "^0.3.11", "@types/color": "^3.0.4", "@types/jest": "^29.5.3", "cross-env": "^7.0.3", diff --git a/yarn.lock b/yarn.lock index f2253d2c57a0..ae1e4de3388a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -193,6 +193,14 @@ resolved "https://registry.yarnpkg.com/@argos-ci/util/-/util-1.2.1.tgz#ed1b4984b53e2eab62ee8728e9b520932e760c60" integrity sha512-/o7t0TcSED3BsBnnPrvXdmT+reThGMoGC9Lk+TTghrEE9GFlSKhjBmfYt4fUgXj5hQIe5tcdO01BVB2TsjjYSw== +"@babel/code-frame@7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2", "@babel/code-frame@^7.8.3": version "7.24.2" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" @@ -414,6 +422,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz#918b1a7fa23056603506370089bd990d8720db62" integrity sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + "@babel/helper-validator-option@^7.22.5", "@babel/helper-validator-option@^7.23.5": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" @@ -447,6 +460,16 @@ js-tokens "^4.0.0" picocolors "^1.0.0" +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.24.0", "@babel/parser@^7.24.5": version "7.24.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790" @@ -2669,6 +2692,11 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== +"@polka/url@^1.0.0-next.24": + version "1.0.0-next.25" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.25.tgz#f077fdc0b5d0078d30893396ff4827a13f99e817" + integrity sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ== + "@prettier/plugin-xml@^2.2.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@prettier/plugin-xml/-/plugin-xml-2.2.0.tgz#2bc2ae667aa817369fdb939aa7d36ea88105483d" @@ -2714,6 +2742,110 @@ estree-walker "^1.0.1" picomatch "^2.2.2" +"@rsdoctor/client@0.3.11": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@rsdoctor/client/-/client-0.3.11.tgz#010fe58c0872f05e2d327f8c83053ab43fc40c23" + integrity sha512-mqbatlzgBMlz2C40fXCH7+oHFzDLzOD7yCvvLpolQ6AGwDADJK16fXVtvpBPLP3kzRgw+G4mDwy+UiAmAaCGaQ== + +"@rsdoctor/core@0.3.11": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@rsdoctor/core/-/core-0.3.11.tgz#85730315425b9ececea6f64145ae04140c5bfdcd" + integrity sha512-+l9Kpjge+xpBKovc6aP7gtBPM6vGJRi475DOC6We5/AbnpI60Jt3wiJ0arEfgCZ7p8qNvTLsBYSY6CYJm4dDLw== + dependencies: + "@rsdoctor/graph" "0.3.11" + "@rsdoctor/sdk" "0.3.11" + "@rsdoctor/types" "0.3.11" + "@rsdoctor/utils" "0.3.11" + axios "^1.7.2" + enhanced-resolve "5.12.0" + filesize "^10.1.4" + fs-extra "^11.1.1" + loader-utils "^2.0.4" + lodash "^4.17.21" + path-browserify "1.0.1" + semver "^7.6.3" + source-map "^0.7.4" + webpack-bundle-analyzer "^4.10.2" + webpack-sources "^3.2.3" + +"@rsdoctor/graph@0.3.11": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@rsdoctor/graph/-/graph-0.3.11.tgz#b8d1a6452545e36b508285fc98b5776d074479f4" + integrity sha512-1WDLgwA0TWUS8NIPsV1eTbXH0UMNbLoYDLGSiaUVrwnl90cQsajaEUkwMcKu9VU3YVC4ayjwG6/RCrPlRqE4bw== + dependencies: + "@rsdoctor/types" "0.3.11" + "@rsdoctor/utils" "0.3.11" + lodash "^4.17.21" + socket.io "4.7.2" + source-map "^0.7.4" + +"@rsdoctor/rspack-plugin@^0.3.11": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@rsdoctor/rspack-plugin/-/rspack-plugin-0.3.11.tgz#4fe790731318370ffabe3d9081d14e2189130717" + integrity sha512-ZBgeNk4P7/tLvUlx4JW8T9LQk4L8eHYi0vQwBHDWbBnGwmTDunYjqcf36mZph/lP4AtCNE4I+zFQbXxkmMKsSQ== + dependencies: + "@rsdoctor/core" "0.3.11" + "@rsdoctor/graph" "0.3.11" + "@rsdoctor/sdk" "0.3.11" + "@rsdoctor/types" "0.3.11" + "@rsdoctor/utils" "0.3.11" + loader-utils "^2.0.4" + lodash "^4.17.21" + +"@rsdoctor/sdk@0.3.11": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@rsdoctor/sdk/-/sdk-0.3.11.tgz#58bb83b077ed167b5f29b6835ead9e78fbd718c3" + integrity sha512-ys9lTasYm9ecvj0oUbQuSpnULqImYq9QET1LUtoVBa5QIpQBbxOOegWnBmSsDlH7LlFQYhqLl5DR9FdJ7yTmcw== + dependencies: + "@rsdoctor/client" "0.3.11" + "@rsdoctor/graph" "0.3.11" + "@rsdoctor/types" "0.3.11" + "@rsdoctor/utils" "0.3.11" + body-parser "1.20.2" + cors "2.8.5" + dayjs "1.11.12" + lodash "^4.17.21" + open "^8.4.2" + serve-static "1.15.0" + socket.io "4.7.2" + source-map "^0.7.4" + tapable "2.2.1" + +"@rsdoctor/types@0.3.11": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@rsdoctor/types/-/types-0.3.11.tgz#d2a37650476bbf7a9d63d951bc0499c8a9b72ac4" + integrity sha512-BH+P5RekIQy3VqFswsTkSB5yeZBYTbMNIlVq1chHhIQcF0Hpd9fuUjFG59NJgBILZoL2vknUhBfhmiv2WEOYig== + dependencies: + "@types/connect" "3.4.38" + "@types/estree" "1.0.5" + "@types/tapable" "2.2.7" + "@types/webpack" "5.28.5" + source-map "^0.7.4" + +"@rsdoctor/utils@0.3.11": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@rsdoctor/utils/-/utils-0.3.11.tgz#650b2b8cf2c4d38a0f35d05f13625965c467d185" + integrity sha512-S1h/rG3wPFjHE9AffGjBGxPhP1j8X23KZKiyYnYHiOTCHxnYTyBqRJXUA0OvGewFY9zi7ucz800y+s0G1ujGyg== + dependencies: + "@babel/code-frame" "7.24.7" + "@rsdoctor/types" "0.3.11" + "@types/estree" "1.0.5" + acorn "^8.10.0" + acorn-import-assertions "1.9.0" + acorn-walk "8.3.3" + chalk "^4.1.2" + connect "3.7.0" + deep-eql "4.1.4" + envinfo "7.13.0" + filesize "^10.1.4" + fs-extra "^11.1.1" + get-port "5.1.1" + json-stream-stringify "3.0.1" + lines-and-columns "2.0.4" + lodash "^4.17.21" + rslog "^1.2.2" + strip-ansi "^6.0.1" + "@rspack/binding-darwin-arm64@1.0.0-beta.4": version "1.0.0-beta.4" resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-beta.4.tgz#2ad5d6c4492ff3b0bee5bb582a6f421b81803aec" @@ -2852,6 +2984,11 @@ micromark-util-character "^1.1.0" micromark-util-symbol "^1.0.1" +"@socket.io/component-emitter@~3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" + integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== + "@surma/rollup-plugin-off-main-thread@^2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz#ee34985952ca21558ab0d952f00298ad2190c053" @@ -3222,6 +3359,25 @@ dependencies: "@types/node" "*" +"@types/connect@3.4.38": + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + +"@types/cookie@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" + integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== + +"@types/cors@^2.8.12": + version "2.8.17" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.17.tgz#5d718a5e494a8166f569d986794e49c48b216b2b" + integrity sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA== + dependencies: + "@types/node" "*" + "@types/d3-scale-chromatic@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz#103124777e8cdec85b20b51fd3397c682ee1e954" @@ -3294,6 +3450,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== +"@types/estree@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + "@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": version "4.17.35" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz#c95dd4424f0d32e525d23812aa8ab8e4d3906c4f" @@ -3527,6 +3688,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.2.tgz#129cc9ae69f93824f92fac653eebfb4812ab4af9" integrity sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw== +"@types/node@>=10.0.0": + version "22.3.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.3.0.tgz#7f8da0e2b72c27c4f9bd3cb5ef805209d04d4f9e" + integrity sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g== + dependencies: + undici-types "~6.18.2" + "@types/node@^17.0.5": version "17.0.45" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" @@ -3762,6 +3930,13 @@ resolved "https://registry.yarnpkg.com/@types/supports-color/-/supports-color-8.1.1.tgz#1b44b1b096479273adf7f93c75fc4ecc40a61ee4" integrity sha512-dPWnWsf+kzIG140B8z2w3fr5D03TLWbOAFQl45xUpI3vcizeXriNR5VYkWZ+WTMsUHqZ9Xlt3hrxGNANFyNQfw== +"@types/tapable@2.2.7": + version "2.2.7" + resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-2.2.7.tgz#4b55aa23daca730d83f192dd0933409d5a0338e4" + integrity sha512-D6QzACV9vNX3r8HQQNTOnpG+Bv1rko+yEA82wKs3O9CQ5+XW7HI7TED17/UE7+5dIxyxZIWTxKbsBeF6uKFCwA== + dependencies: + tapable "^2.2.0" + "@types/tapable@^1": version "1.0.8" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.8.tgz#b94a4391c85666c7b73299fd3ad79d4faa435310" @@ -3831,6 +4006,15 @@ "@types/source-list-map" "*" source-map "^0.7.3" +"@types/webpack@5.28.5": + version "5.28.5" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-5.28.5.tgz#0e9d9a15efa09bbda2cef41356ca4ac2031ea9a2" + integrity sha512-wR87cgvxj3p6D0Crt1r5avwqffqPXUkNlnQ1mjU93G7gCuFjufZR4I6j8cz5g1F1tTYpfOOFvly+cmIQwL9wvw== + dependencies: + "@types/node" "*" + tapable "^2.2.0" + webpack "^5" + "@types/webpack@^4": version "4.41.33" resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.33.tgz#16164845a5be6a306bcbe554a8e67f9cac215ffc" @@ -4179,7 +4363,7 @@ acorn-globals@^7.0.0: acorn "^8.1.0" acorn-walk "^8.0.2" -acorn-import-assertions@^1.9.0: +acorn-import-assertions@1.9.0, acorn-import-assertions@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== @@ -4189,6 +4373,13 @@ acorn-jsx@^5.0.0, acorn-jsx@^5.0.1, acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== +acorn-walk@8.3.3: + version "8.3.3" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" + integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + dependencies: + acorn "^8.11.0" + acorn-walk@^8.0.0, acorn-walk@^8.0.2: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" @@ -4204,6 +4395,11 @@ acorn@^8.0.0, acorn@^8.0.4, acorn@^8.1.0, acorn@^8.7.1, acorn@^8.8.1, acorn@^8.8 resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +acorn@^8.10.0, acorn@^8.11.0: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -4583,6 +4779,15 @@ axios@^1, axios@^1.0.0, axios@^1.5.0: form-data "^4.0.0" proxy-from-env "^1.1.0" +axios@^1.7.2: + version "1.7.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.4.tgz#4c8ded1b43683c8dd362973c393f3ede24052aa2" + integrity sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + axobject-query@^3.1.1: version "3.2.1" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a" @@ -4729,6 +4934,11 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +base64id@2.0.0, base64id@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== + batch@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" @@ -5638,6 +5848,16 @@ connect-history-api-fallback@^2.0.0: resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== +connect@3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== + dependencies: + debug "2.6.9" + finalhandler "1.1.2" + parseurl "~1.3.3" + utils-merge "1.0.1" + consola@^2.15.3: version "2.15.3" resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550" @@ -5780,6 +6000,11 @@ cookie@0.6.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== +cookie@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + copy-text-to-clipboard@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz#0202b2d9bdae30a49a53f898626dcc3b49ad960b" @@ -5819,6 +6044,14 @@ core-util-is@^1.0.3, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== +cors@2.8.5, cors@~2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + cose-base@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-1.0.3.tgz#650334b41b869578a543358b80cda7e0abe0a60a" @@ -6535,11 +6768,21 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== +dayjs@1.11.12: + version "1.11.12" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.12.tgz#5245226cc7f40a15bf52e0b99fd2a04669ccac1d" + integrity sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg== + dayjs@^1.11.7: version "1.11.9" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.9.tgz#9ca491933fadd0a60a2c19f6c237c03517d71d1a" integrity sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA== +debounce@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" + integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== + debug@2.6.9, debug@^2.6.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -6561,6 +6804,13 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + dependencies: + ms "2.1.2" + decamelize-keys@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" @@ -6598,6 +6848,13 @@ dedent@0.7.0, dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +deep-eql@4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" + integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== + dependencies: + type-detect "^4.0.0" + deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -6986,6 +7243,35 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" +engine.io-parser@~5.2.1: + version "5.2.3" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.3.tgz#00dc5b97b1f233a23c9398d0209504cf5f94d92f" + integrity sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q== + +engine.io@~6.5.2: + version "6.5.5" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.5.tgz#430b80d8840caab91a50e9e23cb551455195fc93" + integrity sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA== + dependencies: + "@types/cookie" "^0.4.1" + "@types/cors" "^2.8.12" + "@types/node" ">=10.0.0" + accepts "~1.3.4" + base64id "2.0.0" + cookie "~0.4.1" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~5.2.1" + ws "~8.17.1" + +enhanced-resolve@5.12.0: + version "5.12.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" + integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + enhanced-resolve@^5.15.0: version "5.15.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" @@ -7016,6 +7302,11 @@ env-paths@^2.2.0, env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== +envinfo@7.13.0: + version "7.13.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" + integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== + envinfo@^7.7.4: version "7.10.0" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.10.0.tgz#55146e3909cc5fe63c22da63fb15b05aeac35b13" @@ -7794,6 +8085,11 @@ filelist@^1.0.4: dependencies: minimatch "^5.0.1" +filesize@^10.1.4: + version "10.1.4" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-10.1.4.tgz#184f256063a201f08b6e6b3cc47d21b60f5b8d89" + integrity sha512-ryBwPIIeErmxgPnm6cbESAzXjuEFubs+yKYLBZvg3CaiNcmkJChoOGcBSrZ6IwkMwPABwPpVXE6IlNdGJJrvEg== + filesize@^8.0.6: version "8.0.7" resolved "https://registry.yarnpkg.com/filesize/-/filesize-8.0.7.tgz#695e70d80f4e47012c132d57a059e80c6b580bd8" @@ -7806,6 +8102,19 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" +finalhandler@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + finalhandler@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" @@ -7889,7 +8198,7 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== -follow-redirects@^1.0.0, follow-redirects@^1.15.0: +follow-redirects@^1.0.0, follow-redirects@^1.15.0, follow-redirects@^1.15.6: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== @@ -8783,7 +9092,7 @@ html-entities@^2.3.2: resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.4.0.tgz#edd0cee70402584c8c76cc2c0556db09d1f45061" integrity sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ== -html-escaper@^2.0.0: +html-escaper@^2.0.0, html-escaper@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== @@ -10194,6 +10503,11 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +json-stream-stringify@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-stream-stringify/-/json-stream-stringify-3.0.1.tgz#e383df35f9845a400afa5c112b281821dc4ee017" + integrity sha512-vuxs3G1ocFDiAQ/SX0okcZbtqXwgj1g71qE9+vrjJ2EkjKQlEFDAcUNRxRU8O+GekV4v5cM2qXP0Wyt/EMDBiQ== + json-stringify-nice@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz#2c937962b80181d3f317dd39aa323e14f5a60a67" @@ -10479,6 +10793,11 @@ lilconfig@^3.1.1: resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.1.tgz#9d8a246fa753106cfc205fd2d77042faca56e5e3" integrity sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ== +lines-and-columns@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.4.tgz#d00318855905d2660d8c0822e3f5a4715855fc42" + integrity sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A== + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -10552,7 +10871,7 @@ loader-runner@^4.2.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== -loader-utils@^2.0.0: +loader-utils@^2.0.0, loader-utils@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== @@ -12102,6 +12421,11 @@ mrmime@^1.0.0: resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== +mrmime@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-2.0.0.tgz#151082a6e06e59a9a39b46b3e14d5cfe92b3abb4" + integrity sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -12603,7 +12927,7 @@ nx@15.9.4, "nx@>=15.5.2 < 16": "@nrwl/nx-win32-arm64-msvc" "15.9.4" "@nrwl/nx-win32-x64-msvc" "15.9.4" -object-assign@^4.0.1, object-assign@^4.1.1: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -12680,6 +13004,13 @@ on-finished@2.4.1: dependencies: ee-first "1.1.1" +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== + dependencies: + ee-first "1.1.1" + on-headers@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" @@ -12706,7 +13037,7 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" -open@^8.0.9, open@^8.4.0: +open@^8.0.9, open@^8.4.0, open@^8.4.2: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== @@ -13084,6 +13415,11 @@ pascal-case@^3.1.2: no-case "^3.0.4" tslib "^2.0.3" +path-browserify@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -14665,6 +15001,11 @@ rollup@^2.43.1: optionalDependencies: fsevents "~2.3.2" +rslog@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/rslog/-/rslog-1.2.2.tgz#057791013c1de27d1d8b0728a766688d11c13830" + integrity sha512-tZP8KjrI1nz6qOYCrFxAV7cfmfS2GV94jotU2zOmF/6ByO1zNvGR6/+0inylpjqyBjAdnnutTUW0m4th06bSTw== + rtl-detect@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/rtl-detect/-/rtl-detect-1.0.4.tgz#40ae0ea7302a150b96bc75af7d749607392ecac6" @@ -14877,6 +15218,11 @@ semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semve dependencies: lru-cache "^6.0.0" +semver@^7.6.3: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -15094,6 +15440,15 @@ sirv@^1.0.7: mrmime "^1.0.0" totalist "^1.0.0" +sirv@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.4.tgz#5dd9a725c578e34e449f332703eb2a74e46a29b0" + integrity sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ== + dependencies: + "@polka/url" "^1.0.0-next.24" + mrmime "^2.0.0" + totalist "^3.0.0" + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -15165,6 +15520,35 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" +socket.io-adapter@~2.5.2: + version "2.5.5" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz#c7a1f9c703d7756844751b6ff9abfc1780664082" + integrity sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg== + dependencies: + debug "~4.3.4" + ws "~8.17.1" + +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + +socket.io@4.7.2: + version "4.7.2" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.2.tgz#22557d76c3f3ca48f82e73d68b7add36a22df002" + integrity sha512-bvKVS29/I5fl2FGLNHuXlQaUH/BlzX1IN6S+NKLNZpBsPZIDH+90eQmCs2Railn4YUiww4SzUedJ6+uzwFnKLw== + dependencies: + accepts "~1.3.4" + base64id "~2.0.0" + cors "~2.8.5" + debug "~4.3.2" + engine.io "~6.5.2" + socket.io-adapter "~2.5.2" + socket.io-parser "~4.2.4" + sockjs@^0.3.24: version "0.3.24" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" @@ -15238,7 +15622,7 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.0, source-map@^0.7.3: +source-map@^0.7.0, source-map@^0.7.3, source-map@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== @@ -15366,7 +15750,7 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -"statuses@>= 1.4.0 < 2": +"statuses@>= 1.4.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== @@ -15764,16 +16148,16 @@ table@^6.8.1: string-width "^4.2.3" strip-ansi "^6.0.1" +tapable@2.2.1, tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + tapable@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - tar-fs@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" @@ -16026,6 +16410,11 @@ totalist@^1.0.0: resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== +totalist@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" + integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== + tough-cookie@^4.1.2: version "4.1.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" @@ -16163,6 +16552,11 @@ type-detect@4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-detect@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== + type-fest@^0.16.0: version "0.16.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860" @@ -16292,6 +16686,11 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +undici-types@~6.18.2: + version "6.18.2" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.18.2.tgz#8b678cf939d4fc9ec56be3c68ed69c619dee28b0" + integrity sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" @@ -16660,7 +17059,7 @@ value-equal@^1.0.1: resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== -vary@~1.1.2: +vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== @@ -16784,6 +17183,24 @@ webidl-conversions@^7.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== +webpack-bundle-analyzer@^4.10.2: + version "4.10.2" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz#633af2862c213730be3dbdf40456db171b60d5bd" + integrity sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw== + dependencies: + "@discoveryjs/json-ext" "0.5.7" + acorn "^8.0.4" + acorn-walk "^8.0.0" + commander "^7.2.0" + debounce "^1.2.1" + escape-string-regexp "^4.0.0" + gzip-size "^6.0.0" + html-escaper "^2.0.2" + opener "^1.5.2" + picocolors "^1.0.0" + sirv "^2.0.3" + ws "^7.3.1" + webpack-bundle-analyzer@^4.9.0: version "4.9.0" resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.9.0.tgz#fc093c4ab174fd3dcbd1c30b763f56d10141209d" @@ -17297,7 +17714,7 @@ ws@^7.3.1: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@^8.11.0, ws@^8.13.0: +ws@^8.11.0, ws@^8.13.0, ws@~8.17.1: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== From d08a46539dfe81c549423e77ddcbdb173483c94d Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 15 Aug 2024 18:39:32 +0200 Subject: [PATCH 06/56] remove RSDOCTOR by defaulkt --- website/package.json | 4 +- yarn.lock | 153 +++++++------------------------------------ 2 files changed, 24 insertions(+), 133 deletions(-) diff --git a/website/package.json b/website/package.json index 2b4f87a58f2c..ff8acc3b27c3 100644 --- a/website/package.json +++ b/website/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "docusaurus": "docusaurus", - "start": "cross-env RSDOCTOR=true RSPACK_CONFIG_VALIDATE=loose-silent docusaurus start", - "build": "cross-env RSDOCTOR=true RSPACK_CONFIG_VALIDATE=loose-silent docusaurus build", + "start": "cross-env RSPACK_CONFIG_VALIDATE=loose-silent docusaurus start", + "build": "cross-env RSPACK_CONFIG_VALIDATE=loose-silent docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear && rimraf changelog && rimraf _dogfooding/_swizzle_theme_tests", diff --git a/yarn.lock b/yarn.lock index ae1e4de3388a..10edb4119a50 100644 --- a/yarn.lock +++ b/yarn.lock @@ -193,7 +193,7 @@ resolved "https://registry.yarnpkg.com/@argos-ci/util/-/util-1.2.1.tgz#ed1b4984b53e2eab62ee8728e9b520932e760c60" integrity sha512-/o7t0TcSED3BsBnnPrvXdmT+reThGMoGC9Lk+TTghrEE9GFlSKhjBmfYt4fUgXj5hQIe5tcdO01BVB2TsjjYSw== -"@babel/code-frame@7.24.7": +"@babel/code-frame@7.24.7", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2", "@babel/code-frame@^7.8.3": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== @@ -201,14 +201,6 @@ "@babel/highlight" "^7.24.7" picocolors "^1.0.0" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2", "@babel/code-frame@^7.8.3": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" - integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== - dependencies: - "@babel/highlight" "^7.24.2" - picocolors "^1.0.0" - "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.23.5", "@babel/compat-data@^7.24.4": version "7.24.4" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.4.tgz#6f102372e9094f25d908ca0d34fc74c74606059a" @@ -417,12 +409,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz#f99c36d3593db9540705d0739a1f10b5e20c696e" integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== -"@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz#918b1a7fa23056603506370089bd990d8720db62" - integrity sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA== - -"@babel/helper-validator-identifier@^7.24.7": +"@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.24.5", "@babel/helper-validator-identifier@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== @@ -450,17 +437,7 @@ "@babel/traverse" "^7.24.5" "@babel/types" "^7.24.5" -"@babel/highlight@^7.24.2": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.5.tgz#bc0613f98e1dd0720e99b2a9ee3760194a704b6e" - integrity sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw== - dependencies: - "@babel/helper-validator-identifier" "^7.24.5" - chalk "^2.4.2" - js-tokens "^4.0.0" - picocolors "^1.0.0" - -"@babel/highlight@^7.24.7": +"@babel/highlight@^7.24.2", "@babel/highlight@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== @@ -2687,12 +2664,7 @@ "@pnpm/network.ca-file" "^1.0.1" config-chain "^1.1.11" -"@polka/url@^1.0.0-next.20": - version "1.0.0-next.21" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" - integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== - -"@polka/url@^1.0.0-next.24": +"@polka/url@^1.0.0-next.20", "@polka/url@^1.0.0-next.24": version "1.0.0-next.25" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.25.tgz#f077fdc0b5d0078d30893396ff4827a13f99e817" integrity sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ== @@ -3352,14 +3324,7 @@ "@types/express-serve-static-core" "*" "@types/node" "*" -"@types/connect@*": - version "3.4.35" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== - dependencies: - "@types/node" "*" - -"@types/connect@3.4.38": +"@types/connect@*", "@types/connect@3.4.38": version "3.4.38" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== @@ -3440,21 +3405,16 @@ dependencies: "@types/estree" "*" -"@types/estree@*", "@types/estree@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" - integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== +"@types/estree@*", "@types/estree@1.0.5", "@types/estree@^1.0.0": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== -"@types/estree@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" - integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== - "@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": version "4.17.35" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz#c95dd4424f0d32e525d23812aa8ab8e4d3906c4f" @@ -3683,12 +3643,7 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== -"@types/node@*": - version "20.4.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.2.tgz#129cc9ae69f93824f92fac653eebfb4812ab4af9" - integrity sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw== - -"@types/node@>=10.0.0": +"@types/node@*", "@types/node@>=10.0.0": version "22.3.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.3.0.tgz#7f8da0e2b72c27c4f9bd3cb5ef805209d04d4f9e" integrity sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g== @@ -4373,29 +4328,19 @@ acorn-jsx@^5.0.0, acorn-jsx@^5.0.1, acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@8.3.3: +acorn-walk@8.3.3, acorn-walk@^8.0.0, acorn-walk@^8.0.2: version "8.3.3" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== dependencies: acorn "^8.11.0" -acorn-walk@^8.0.0, acorn-walk@^8.0.2: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - acorn@^6.1.1: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== -acorn@^8.0.0, acorn@^8.0.4, acorn@^8.1.0, acorn@^8.7.1, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== - -acorn@^8.10.0, acorn@^8.11.0: +acorn@^8.0.0, acorn@^8.0.4, acorn@^8.1.0, acorn@^8.10.0, acorn@^8.11.0, acorn@^8.7.1, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: version "8.12.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== @@ -4770,16 +4715,7 @@ axe-core@^4.6.2: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.2.tgz#040a7342b20765cb18bb50b628394c21bccc17a0" integrity sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g== -axios@^1, axios@^1.0.0, axios@^1.5.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2" - integrity sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -axios@^1.7.2: +axios@^1, axios@^1.0.0, axios@^1.5.0, axios@^1.7.2: version "1.7.4" resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.4.tgz#4c8ded1b43683c8dd362973c393f3ede24052aa2" integrity sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw== @@ -6768,16 +6704,11 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -dayjs@1.11.12: +dayjs@1.11.12, dayjs@^1.11.7: version "1.11.12" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.12.tgz#5245226cc7f40a15bf52e0b99fd2a04669ccac1d" integrity sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg== -dayjs@^1.11.7: - version "1.11.9" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.9.tgz#9ca491933fadd0a60a2c19f6c237c03517d71d1a" - integrity sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA== - debounce@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" @@ -6790,10 +6721,10 @@ debug@2.6.9, debug@^2.6.0: dependencies: ms "2.0.0" -debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== +debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== dependencies: ms "2.1.2" @@ -6804,13 +6735,6 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" - integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== - dependencies: - ms "2.1.2" - decamelize-keys@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" @@ -7302,16 +7226,11 @@ env-paths@^2.2.0, env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== -envinfo@7.13.0: +envinfo@7.13.0, envinfo@^7.7.4: version "7.13.0" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== -envinfo@^7.7.4: - version "7.10.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.10.0.tgz#55146e3909cc5fe63c22da63fb15b05aeac35b13" - integrity sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw== - equals@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/equals/-/equals-1.0.5.tgz#212062dde5e1a510d955f13598efcc6a621b6ace" @@ -10793,7 +10712,7 @@ lilconfig@^3.1.1: resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.1.tgz#9d8a246fa753106cfc205fd2d77042faca56e5e3" integrity sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ== -lines-and-columns@2.0.4: +lines-and-columns@2.0.4, lines-and-columns@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.4.tgz#d00318855905d2660d8c0822e3f5a4715855fc42" integrity sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A== @@ -10803,11 +10722,6 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -lines-and-columns@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" - integrity sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w== - lint-staged@^13.2.3: version "13.2.3" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.2.3.tgz#f899aad6c093473467e9c9e316e3c2d8a28f87a7" @@ -15211,14 +15125,7 @@ semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: - version "7.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" - -semver@^7.6.3: +semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -17183,7 +17090,7 @@ webidl-conversions@^7.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== -webpack-bundle-analyzer@^4.10.2: +webpack-bundle-analyzer@^4.10.2, webpack-bundle-analyzer@^4.9.0: version "4.10.2" resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz#633af2862c213730be3dbdf40456db171b60d5bd" integrity sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw== @@ -17201,22 +17108,6 @@ webpack-bundle-analyzer@^4.10.2: sirv "^2.0.3" ws "^7.3.1" -webpack-bundle-analyzer@^4.9.0: - version "4.9.0" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.9.0.tgz#fc093c4ab174fd3dcbd1c30b763f56d10141209d" - integrity sha512-+bXGmO1LyiNx0i9enBu3H8mv42sj/BJWhZNFwjz92tVnBa9J3JMGo2an2IXlEleoDOPn/Hofl5hr/xCpObUDtw== - dependencies: - "@discoveryjs/json-ext" "0.5.7" - acorn "^8.0.4" - acorn-walk "^8.0.0" - chalk "^4.1.0" - commander "^7.2.0" - gzip-size "^6.0.0" - lodash "^4.17.20" - opener "^1.5.2" - sirv "^1.0.7" - ws "^7.3.1" - webpack-dev-middleware@^5.3.1: version "5.3.4" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz#eb7b39281cbce10e104eb2b8bf2b63fce49a3517" From 2cfe4cdf2d05c6192302101942791b0f268dd41c Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 15 Aug 2024 18:49:24 +0200 Subject: [PATCH 07/56] remove useless exit + use Rspack minifiers --- packages/docusaurus/src/commands/build.ts | 2 ++ packages/docusaurus/src/webpack/minification.ts | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/docusaurus/src/commands/build.ts b/packages/docusaurus/src/commands/build.ts index 3ddf4376d76a..744116fdcc19 100644 --- a/packages/docusaurus/src/commands/build.ts +++ b/packages/docusaurus/src/commands/build.ts @@ -104,10 +104,12 @@ export async function build( logger.info`Use code=${'npm run serve'} command to test your build locally.`; } + /* // TODO do we really need this historical forceTerminate exit??? if (forceTerminate && isLastLocale && !cliOptions.bundleAnalyzer) { process.exit(0); } + */ }), ); } diff --git a/packages/docusaurus/src/webpack/minification.ts b/packages/docusaurus/src/webpack/minification.ts index 5ea877d8e179..35c1f2194f4f 100644 --- a/packages/docusaurus/src/webpack/minification.ts +++ b/packages/docusaurus/src/webpack/minification.ts @@ -7,8 +7,8 @@ import TerserPlugin from 'terser-webpack-plugin'; import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'; +import {rspack, type WebpackPluginInstance} from 'webpack'; import type {CustomOptions, CssNanoOptions} from 'css-minimizer-webpack-plugin'; -import type {WebpackPluginInstance} from 'webpack'; // See https://github.com/webpack-contrib/terser-webpack-plugin#parallel function getTerserParallel() { @@ -86,17 +86,21 @@ function getAdvancedCssMinifier() { } export function getMinimizer(): WebpackPluginInstance[] { + const minimizer: WebpackPluginInstance[] = [ + new rspack.SwcJsMinimizerRspackPlugin(), + new rspack.SwcCssMinimizerRspackPlugin(), + ]; + + /* // This is an historical env variable to opt-out of the advanced minifier // Sometimes there's a bug in it and people are happy to disable it const useSimpleCssMinifier = process.env.USE_SIMPLE_CSS_MINIFIER === 'true'; - - const minimizer: WebpackPluginInstance[] = [getJsMinifierPlugin()]; - if (useSimpleCssMinifier) { minimizer.push(new CssMinimizerPlugin()); } else { minimizer.push(getAdvancedCssMinifier()); } + */ return minimizer; } From 8a2ab67ea6cd842f58e309374228b1e17084f1e0 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 15 Aug 2024 19:16:15 +0200 Subject: [PATCH 08/56] builtin:swc-loader --- packages/docusaurus/src/webpack/base.ts | 67 +++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index 5ef4ab99d5bd..513e6d72e678 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -216,6 +216,8 @@ export async function createBaseConfig({ fileLoaderUtils.rules.svg(), // @ts-expect-error: TODO fix this fileLoaderUtils.rules.otherAssets(), + + /* { test: /\.[jt]sx?$/i, exclude: excludeJS, @@ -227,6 +229,71 @@ export async function createBaseConfig({ }), ], }, + */ + + // TODO do we really need 3 different loaders for js, ts, tsx? + { + test: /\.jsx?$/, + exclude: excludeJS, + use: { + loader: 'builtin:swc-loader', + options: { + jsc: { + parser: { + syntax: 'ecmascript', + jsx: true, + }, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, + }, + }, + }, + + { + test: /\.tsx$/, + exclude: excludeJS, + use: { + loader: 'builtin:swc-loader', + options: { + jsc: { + parser: { + syntax: 'typescript', + tsx: true, + }, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, + }, + }, + }, + { + test: /\.ts$/, + exclude: excludeJS, + use: { + loader: 'builtin:swc-loader', + options: { + jsc: { + parser: { + syntax: 'typescript', + tsx: false, + }, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, + }, + }, + }, + { test: CSS_REGEX, exclude: CSS_MODULE_REGEX, From 6ec8d65a7d023ad46c5f830513a0a39fc75b7ff9 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 16 Aug 2024 12:48:23 +0200 Subject: [PATCH 09/56] remove alias CssExtractRspackPlugin as MiniCssExtractPlugin --- packages/docusaurus/src/webpack/base.ts | 6 +++--- packages/docusaurus/src/webpack/utils.ts | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index 513e6d72e678..e120c461c458 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -7,8 +7,7 @@ import fs from 'fs-extra'; import path from 'path'; -// import MiniCssExtractPlugin from 'mini-css-extract-plugin'; -import {CssExtractRspackPlugin as MiniCssExtractPlugin} from 'webpack'; +import {CssExtractRspackPlugin} from 'webpack'; import {md5Hash, getFileLoaderUtils} from '@docusaurus/utils'; import { @@ -303,6 +302,7 @@ export async function createBaseConfig({ sourceMap: !isProd, }), }, + // Adds support for CSS Modules (https://github.com/css-modules/css-modules) // using the extension .module.css { @@ -325,7 +325,7 @@ export async function createBaseConfig({ css: false, }, plugins: [ - new MiniCssExtractPlugin({ + new CssExtractRspackPlugin({ filename: isProd ? 'assets/css/[name].[contenthash:8].css' : '[name].css', diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index fef13f8d2559..7559d80b13bf 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -10,10 +10,9 @@ import path from 'path'; import crypto from 'crypto'; import logger from '@docusaurus/logger'; import {BABEL_CONFIG_FILE_NAME} from '@docusaurus/utils'; -// import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import webpack, { rspack, - CssExtractRspackPlugin as MiniCssExtractPlugin, + CssExtractRspackPlugin, type Configuration, type RuleSetRule, } from 'webpack'; @@ -68,7 +67,7 @@ export function getStyleLoaders( ] : [ { - loader: MiniCssExtractPlugin.loader, + loader: CssExtractRspackPlugin.loader, options: { // Don't emit CSS files for SSR (previously used null-loader) // See https://github.com/webpack-contrib/mini-css-extract-plugin/issues/90#issuecomment-811991738 @@ -84,7 +83,7 @@ export function getStyleLoaders( return [ { - loader: MiniCssExtractPlugin.loader, + loader: CssExtractRspackPlugin.loader, options: { esModule: true, }, @@ -93,6 +92,7 @@ export function getStyleLoaders( loader: require.resolve('css-loader'), options: cssOptions, }, + /* { // Options for PostCSS as we reference these options twice // Adds vendor prefixing based on your specified browser support in @@ -110,6 +110,7 @@ export function getStyleLoaders( }, }, }, + */ ]; } From 64fdfcfd7b7cf62e52cfab221d6c595c16efd59c Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 16 Aug 2024 12:54:29 +0200 Subject: [PATCH 10/56] remove alias CssExtractRspackPlugin as MiniCssExtractPlugin --- packages/docusaurus/src/webpack/utils.ts | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index 7559d80b13bf..4e9d7eeb58e6 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -60,10 +60,18 @@ export function getStyleLoaders( if (isServer) { return cssOptions.modules ? [ + { + loader: 'builtin:lightningcss-loader', + options: { + targets: 'ie 10', + }, + }, + /* { loader: require.resolve('css-loader'), options: cssOptions, }, + */ ] : [ { @@ -74,10 +82,18 @@ export function getStyleLoaders( emit: false, }, }, + { + loader: 'builtin:lightningcss-loader', + options: { + targets: 'ie 10', + }, + }, + /* { loader: require.resolve('css-loader'), options: cssOptions, }, + */ ]; } @@ -88,11 +104,17 @@ export function getStyleLoaders( esModule: true, }, }, + { + loader: 'builtin:lightningcss-loader', + options: { + targets: 'ie 10', + }, + }, + /* { loader: require.resolve('css-loader'), options: cssOptions, }, - /* { // Options for PostCSS as we reference these options twice // Adds vendor prefixing based on your specified browser support in From 4138492f70f7378dc6575a5886e37932c842b30c Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 16 Aug 2024 14:38:49 +0200 Subject: [PATCH 11/56] Revert "remove alias CssExtractRspackPlugin as MiniCssExtractPlugin" This reverts commit 64fdfcfd7b7cf62e52cfab221d6c595c16efd59c. --- packages/docusaurus/src/webpack/utils.ts | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index 4e9d7eeb58e6..7559d80b13bf 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -60,18 +60,10 @@ export function getStyleLoaders( if (isServer) { return cssOptions.modules ? [ - { - loader: 'builtin:lightningcss-loader', - options: { - targets: 'ie 10', - }, - }, - /* { loader: require.resolve('css-loader'), options: cssOptions, }, - */ ] : [ { @@ -82,18 +74,10 @@ export function getStyleLoaders( emit: false, }, }, - { - loader: 'builtin:lightningcss-loader', - options: { - targets: 'ie 10', - }, - }, - /* { loader: require.resolve('css-loader'), options: cssOptions, }, - */ ]; } @@ -104,17 +88,11 @@ export function getStyleLoaders( esModule: true, }, }, - { - loader: 'builtin:lightningcss-loader', - options: { - targets: 'ie 10', - }, - }, - /* { loader: require.resolve('css-loader'), options: cssOptions, }, + /* { // Options for PostCSS as we reference these options twice // Adds vendor prefixing based on your specified browser support in From 486ee811a787b51bc952f73c492c5acbefacdd97 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 16 Aug 2024 16:41:05 +0200 Subject: [PATCH 12/56] use LightningCssMinimizerRspackPlugin --- packages/docusaurus/src/webpack/minification.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus/src/webpack/minification.ts b/packages/docusaurus/src/webpack/minification.ts index 35c1f2194f4f..f3c140377367 100644 --- a/packages/docusaurus/src/webpack/minification.ts +++ b/packages/docusaurus/src/webpack/minification.ts @@ -88,7 +88,7 @@ function getAdvancedCssMinifier() { export function getMinimizer(): WebpackPluginInstance[] { const minimizer: WebpackPluginInstance[] = [ new rspack.SwcJsMinimizerRspackPlugin(), - new rspack.SwcCssMinimizerRspackPlugin(), + new rspack.LightningCssMinimizerRspackPlugin(), ]; /* From 69f7d433cefd0a194021b0c57716b3f0113b7f6b Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 22 Aug 2024 19:41:56 +0200 Subject: [PATCH 13/56] use RsdoctorRspackMultiplePlugin --- website/docusaurus.config.ts | 4 ++-- yarn.lock | 25 +++---------------------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 640f2ee97580..2a953609c72e 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -8,7 +8,7 @@ import path from 'path'; import npm2yarn from '@docusaurus/remark-plugin-npm2yarn'; import remarkMath from 'remark-math'; import rehypeKatex from 'rehype-katex'; -import {RsdoctorRspackPlugin} from '@rsdoctor/rspack-plugin'; +import {RsdoctorRspackMultiplePlugin} from '@rsdoctor/rspack-plugin'; import configTabs from './src/remark/configTabs'; @@ -42,7 +42,7 @@ const RsdoctorPlugin: PluginConfig = () => { configureWebpack: () => { return { plugins: [ - new RsdoctorRspackPlugin({ + new RsdoctorRspackMultiplePlugin({ // plugin options }), ], diff --git a/yarn.lock b/yarn.lock index 10edb4119a50..6f9306a12ebc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -437,7 +437,7 @@ "@babel/traverse" "^7.24.5" "@babel/types" "^7.24.5" -"@babel/highlight@^7.24.2", "@babel/highlight@^7.24.7": +"@babel/highlight@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== @@ -2664,7 +2664,7 @@ "@pnpm/network.ca-file" "^1.0.1" config-chain "^1.1.11" -"@polka/url@^1.0.0-next.20", "@polka/url@^1.0.0-next.24": +"@polka/url@^1.0.0-next.24": version "1.0.0-next.25" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.25.tgz#f077fdc0b5d0078d30893396ff4827a13f99e817" integrity sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ== @@ -8117,7 +8117,7 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== -follow-redirects@^1.0.0, follow-redirects@^1.15.0, follow-redirects@^1.15.6: +follow-redirects@^1.0.0, follow-redirects@^1.15.6: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== @@ -12330,11 +12330,6 @@ mri@^1.1.0: resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== -mrmime@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" - integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== - mrmime@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-2.0.0.tgz#151082a6e06e59a9a39b46b3e14d5cfe92b3abb4" @@ -15338,15 +15333,6 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sirv@^1.0.7: - version "1.0.19" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49" - integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ== - dependencies: - "@polka/url" "^1.0.0-next.20" - mrmime "^1.0.0" - totalist "^1.0.0" - sirv@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.4.tgz#5dd9a725c578e34e449f332703eb2a74e46a29b0" @@ -16312,11 +16298,6 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== -totalist@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" - integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== - totalist@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" From 2e27a8a2071f2902067cb64d20960da2c564716b Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Sep 2024 18:17:51 +0200 Subject: [PATCH 14/56] upgrade and fix Rsdoctor? --- website/package.json | 4 +- .../src/plugins/rsdoctor/RsdoctorPlugin.ts | 9 +- yarn.lock | 152 ++++++++++-------- 3 files changed, 90 insertions(+), 75 deletions(-) diff --git a/website/package.json b/website/package.json index 7bd36656f0b1..0f24cef06631 100644 --- a/website/package.json +++ b/website/package.json @@ -84,8 +84,8 @@ "devDependencies": { "@docusaurus/eslint-plugin": "3.5.2", "@docusaurus/tsconfig": "3.5.2", - "@rsdoctor/webpack-plugin": "^0.3.11", - "@rsdoctor/rspack-plugin": "^0.3.11", + "@rsdoctor/webpack-plugin": "^0.4.1", + "@rsdoctor/rspack-plugin": "^0.4.1", "@types/color": "^3.0.4", "@types/jest": "^29.5.3", "cross-env": "^7.0.3", diff --git a/website/src/plugins/rsdoctor/RsdoctorPlugin.ts b/website/src/plugins/rsdoctor/RsdoctorPlugin.ts index 0ffd46acaab0..74f06a3d7171 100644 --- a/website/src/plugins/rsdoctor/RsdoctorPlugin.ts +++ b/website/src/plugins/rsdoctor/RsdoctorPlugin.ts @@ -8,7 +8,7 @@ import {RsdoctorRspackMultiplePlugin} from '@rsdoctor/rspack-plugin'; import type {PluginConfig} from '@docusaurus/types'; -async function createRsdoctorBundlerPlugin() { +function createRsdoctorBundlerPlugin({isServer}: {isServer: boolean}) { // TODO Shitty workaround to bypass lib typechecking // package does not work will with skipLibCheck false // // eslint-disable-next-line @@ -16,6 +16,7 @@ async function createRsdoctorBundlerPlugin() { // return new RsdoctorWebpackMultiplePlugin({ return new RsdoctorRspackMultiplePlugin({ + name: isServer ? 'server' : 'client', disableTOSUpload: true, supports: { // https://rsdoctor.dev/config/options/options#generatetilegraph @@ -33,11 +34,13 @@ export default (async function RsdoctorPlugin() { if (!process.env.RSDOCTOR) { return null; } - const plugin = await createRsdoctorBundlerPlugin(); + const pluginClient = await createRsdoctorBundlerPlugin({isServer: false}); + const pluginServer = await createRsdoctorBundlerPlugin({isServer: true}); console.log('Rsdoctor plugin enabled'); return { name: 'rsdoctor-plugin', - configureWebpack: () => { + configureWebpack: (__config, isServer) => { + const plugin = isServer ? pluginServer : pluginClient; return { plugins: [plugin], }; diff --git a/yarn.lock b/yarn.lock index 24032915788b..da95dd04a8f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2702,20 +2702,20 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rsdoctor/client@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/client/-/client-0.3.11.tgz#010fe58c0872f05e2d327f8c83053ab43fc40c23" - integrity sha512-mqbatlzgBMlz2C40fXCH7+oHFzDLzOD7yCvvLpolQ6AGwDADJK16fXVtvpBPLP3kzRgw+G4mDwy+UiAmAaCGaQ== - -"@rsdoctor/core@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/core/-/core-0.3.11.tgz#85730315425b9ececea6f64145ae04140c5bfdcd" - integrity sha512-+l9Kpjge+xpBKovc6aP7gtBPM6vGJRi475DOC6We5/AbnpI60Jt3wiJ0arEfgCZ7p8qNvTLsBYSY6CYJm4dDLw== - dependencies: - "@rsdoctor/graph" "0.3.11" - "@rsdoctor/sdk" "0.3.11" - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" +"@rsdoctor/client@0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@rsdoctor/client/-/client-0.4.1.tgz#d71dc24d7dd58e60d595bc8aa48945090e8bf8d7" + integrity sha512-vExZ30sw+zHMyURdu4/devBuGa7927WRhIfYZ+jDNiBGs57YoNkvPB2gqN9BuoD/AC/YzJQtBPOfjd3HU2EqKw== + +"@rsdoctor/core@0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@rsdoctor/core/-/core-0.4.1.tgz#d566cc116fba64fed5f572d3519e6d1f527b0420" + integrity sha512-b+0EBXPH/qgVNlDxoKwytO3X06ZRatIq0sUEdesjPJZOHhk4X/qafK/nL4296QZoqNw4RZzM/cFNBHpbRHxF1A== + dependencies: + "@rsdoctor/graph" "0.4.1" + "@rsdoctor/sdk" "0.4.1" + "@rsdoctor/types" "0.4.1" + "@rsdoctor/utils" "0.4.1" axios "^1.7.2" enhanced-resolve "5.12.0" filesize "^10.1.4" @@ -2728,42 +2728,44 @@ webpack-bundle-analyzer "^4.10.2" webpack-sources "^3.2.3" -"@rsdoctor/graph@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/graph/-/graph-0.3.11.tgz#b8d1a6452545e36b508285fc98b5776d074479f4" - integrity sha512-1WDLgwA0TWUS8NIPsV1eTbXH0UMNbLoYDLGSiaUVrwnl90cQsajaEUkwMcKu9VU3YVC4ayjwG6/RCrPlRqE4bw== +"@rsdoctor/graph@0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@rsdoctor/graph/-/graph-0.4.1.tgz#6ec9a7d17f93145b40eb308da433cae9b54663f2" + integrity sha512-YehL+vys0XCvlxlLLulbcBz2+/o3iPKWY1DiB5Cri56kTLdHGyqW9Ue23gynVLN5HOp+lRztdAiEqn+2IBhEAQ== dependencies: - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" + "@rsdoctor/types" "0.4.1" + "@rsdoctor/utils" "0.4.1" lodash "^4.17.21" socket.io "4.7.2" source-map "^0.7.4" -"@rsdoctor/rspack-plugin@^0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/rspack-plugin/-/rspack-plugin-0.3.11.tgz#4fe790731318370ffabe3d9081d14e2189130717" - integrity sha512-ZBgeNk4P7/tLvUlx4JW8T9LQk4L8eHYi0vQwBHDWbBnGwmTDunYjqcf36mZph/lP4AtCNE4I+zFQbXxkmMKsSQ== - dependencies: - "@rsdoctor/core" "0.3.11" - "@rsdoctor/graph" "0.3.11" - "@rsdoctor/sdk" "0.3.11" - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" +"@rsdoctor/rspack-plugin@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@rsdoctor/rspack-plugin/-/rspack-plugin-0.4.1.tgz#0d3c63fddd3503dd7bc72c70daaaee42ff0cae89" + integrity sha512-JOEe5APl9nZRwE13bLOMcqq0SFGMb0wVSFJLdquo8mIU46Fx8b19WES0hBygQZFf5oyzbuGBXhJd0r34WTQf6Q== + dependencies: + "@rsdoctor/core" "0.4.1" + "@rsdoctor/graph" "0.4.1" + "@rsdoctor/sdk" "0.4.1" + "@rsdoctor/types" "0.4.1" + "@rsdoctor/utils" "0.4.1" loader-utils "^2.0.4" lodash "^4.17.21" -"@rsdoctor/sdk@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/sdk/-/sdk-0.3.11.tgz#58bb83b077ed167b5f29b6835ead9e78fbd718c3" - integrity sha512-ys9lTasYm9ecvj0oUbQuSpnULqImYq9QET1LUtoVBa5QIpQBbxOOegWnBmSsDlH7LlFQYhqLl5DR9FdJ7yTmcw== - dependencies: - "@rsdoctor/client" "0.3.11" - "@rsdoctor/graph" "0.3.11" - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" +"@rsdoctor/sdk@0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@rsdoctor/sdk/-/sdk-0.4.1.tgz#64d15fe6baa41093a0ea48b8b1626db184613f0f" + integrity sha512-cQb90xaHlaV30f01v3bDtHn150elbdqQ3E5lq6FvRrcuQPd9a3ZDMJ0RZSHpLoqjNQo2LUNbSW3wSvEya1nCRQ== + dependencies: + "@rsdoctor/client" "0.4.1" + "@rsdoctor/graph" "0.4.1" + "@rsdoctor/types" "0.4.1" + "@rsdoctor/utils" "0.4.1" + "@types/fs-extra" "^11.0.4" body-parser "1.20.2" cors "2.8.5" - dayjs "1.11.12" + dayjs "1.11.13" + fs-extra "^11.1.1" lodash "^4.17.21" open "^8.4.2" serve-static "1.15.0" @@ -2771,24 +2773,23 @@ source-map "^0.7.4" tapable "2.2.1" -"@rsdoctor/types@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/types/-/types-0.3.11.tgz#d2a37650476bbf7a9d63d951bc0499c8a9b72ac4" - integrity sha512-BH+P5RekIQy3VqFswsTkSB5yeZBYTbMNIlVq1chHhIQcF0Hpd9fuUjFG59NJgBILZoL2vknUhBfhmiv2WEOYig== +"@rsdoctor/types@0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@rsdoctor/types/-/types-0.4.1.tgz#e560ddd426ef03bb81a55c5cb8862b6f78aaf95f" + integrity sha512-HJ0YCv4WAgsQb/9lvpiV+Syac7de0pPXQrtP5Al4wsC0ELKz4DN5NAAv5o8KzF7pPpEYrL3zcnNFsT014CK1aw== dependencies: "@types/connect" "3.4.38" "@types/estree" "1.0.5" "@types/tapable" "2.2.7" - "@types/webpack" "5.28.5" source-map "^0.7.4" -"@rsdoctor/utils@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/utils/-/utils-0.3.11.tgz#650b2b8cf2c4d38a0f35d05f13625965c467d185" - integrity sha512-S1h/rG3wPFjHE9AffGjBGxPhP1j8X23KZKiyYnYHiOTCHxnYTyBqRJXUA0OvGewFY9zi7ucz800y+s0G1ujGyg== +"@rsdoctor/utils@0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@rsdoctor/utils/-/utils-0.4.1.tgz#f97b8273afce7a0f8cc248aabe98b2f44197c16f" + integrity sha512-R0hdKWmPdOUWlYl7Xg5Mfa3N5TDEtHGCVyM2tGS6lf7H1RsO8rnA9ksHSCbpCnTN7P2yTUcCtII7F9dQfBIjgw== dependencies: "@babel/code-frame" "7.24.7" - "@rsdoctor/types" "0.3.11" + "@rsdoctor/types" "0.4.1" "@types/estree" "1.0.5" acorn "^8.10.0" acorn-import-assertions "1.9.0" @@ -2806,16 +2807,16 @@ rslog "^1.2.2" strip-ansi "^6.0.1" -"@rsdoctor/webpack-plugin@^0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/webpack-plugin/-/webpack-plugin-0.3.11.tgz#b5f43b7c3c8c365e379dbd5a51bfae284aee61b4" - integrity sha512-Gqr5GMOhHkJl9rtsbnCZV5mXuvsfpRtg735cRie9eT1E/dMpHerIGZFRGRIMPNkLAd/lfe0KwrGRZknWX9M/zQ== - dependencies: - "@rsdoctor/core" "0.3.11" - "@rsdoctor/graph" "0.3.11" - "@rsdoctor/sdk" "0.3.11" - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" +"@rsdoctor/webpack-plugin@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@rsdoctor/webpack-plugin/-/webpack-plugin-0.4.1.tgz#89e1f701cf268fdf1dde15df93d611303eae4cec" + integrity sha512-kdRfQSq1jYqOecM22CHGYe/4XZY5DigMNFxrfZdbYFXU0N4ABy3jXnGw73mzmb3x1rf7qBI7NibUL1IsAMPYuQ== + dependencies: + "@rsdoctor/core" "0.4.1" + "@rsdoctor/graph" "0.4.1" + "@rsdoctor/sdk" "0.4.1" + "@rsdoctor/types" "0.4.1" + "@rsdoctor/utils" "0.4.1" fs-extra "^11.1.1" lodash "^4.17.21" @@ -3433,6 +3434,14 @@ dependencies: "@types/webpack" "^4" +"@types/fs-extra@^11.0.4": + version "11.0.4" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-11.0.4.tgz#e16a863bb8843fba8c5004362b5a73e17becca45" + integrity sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ== + dependencies: + "@types/jsonfile" "*" + "@types/node" "*" + "@types/fs-extra@^9.0.13": version "9.0.13" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" @@ -3568,6 +3577,13 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== +"@types/jsonfile@*": + version "6.1.4" + resolved "https://registry.yarnpkg.com/@types/jsonfile/-/jsonfile-6.1.4.tgz#614afec1a1164e7d670b4a7ad64df3e7beb7b702" + integrity sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ== + dependencies: + "@types/node" "*" + "@types/katex@^0.16.0": version "0.16.1" resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.16.1.tgz#e1faa29f131c241a7669e65bdf8ce470c9c4e3a9" @@ -3947,15 +3963,6 @@ "@types/source-list-map" "*" source-map "^0.7.3" -"@types/webpack@5.28.5": - version "5.28.5" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-5.28.5.tgz#0e9d9a15efa09bbda2cef41356ca4ac2031ea9a2" - integrity sha512-wR87cgvxj3p6D0Crt1r5avwqffqPXUkNlnQ1mjU93G7gCuFjufZR4I6j8cz5g1F1tTYpfOOFvly+cmIQwL9wvw== - dependencies: - "@types/node" "*" - tapable "^2.2.0" - webpack "^5" - "@types/webpack@^4": version "4.41.33" resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.33.tgz#16164845a5be6a306bcbe554a8e67f9cac215ffc" @@ -6701,7 +6708,12 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -dayjs@1.11.12, dayjs@^1.11.7: +dayjs@1.11.13: + version "1.11.13" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" + integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== + +dayjs@^1.11.7: version "1.11.12" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.12.tgz#5245226cc7f40a15bf52e0b99fd2a04669ccac1d" integrity sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg== From dacc090b574e137bb93838a161b0231f1169deda Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Sep 2024 18:55:44 +0200 Subject: [PATCH 15/56] upgrade Rspack to v1 stable --- packages/docusaurus-plugin-pwa/package.json | 2 +- packages/docusaurus/package.json | 2 +- yarn.lock | 189 ++++++++++---------- 3 files changed, 94 insertions(+), 99 deletions(-) diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json index 666e2ddb6854..bad196e63169 100644 --- a/packages/docusaurus-plugin-pwa/package.json +++ b/packages/docusaurus-plugin-pwa/package.json @@ -34,7 +34,7 @@ "core-js": "^3.31.1", "terser-webpack-plugin": "^5.3.9", "tslib": "^2.6.0", - "webpack": "npm:@rspack/core@1.0.0-beta.4", + "webpack": "npm:@rspack/core@1.0.3", "webpack-merge": "^5.9.0", "webpackbar": "^5.0.2", "workbox-build": "^7.0.0", diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index ee4189489cfb..cba29fbd4ea4 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -97,7 +97,7 @@ "tslib": "^2.6.0", "update-notifier": "^6.0.2", "url-loader": "^4.1.1", - "webpack": "npm:@rspack/core@1.0.0-beta.4", + "webpack": "npm:@rspack/core@1.0.3", "webpack-bundle-analyzer": "^4.9.0", "webpack-dev-server": "^4.15.1", "webpack-merge": "^5.9.0", diff --git a/yarn.lock b/yarn.lock index da95dd04a8f2..607a98e30706 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2152,33 +2152,33 @@ dependencies: "@types/mdx" "^2.0.0" -"@module-federation/runtime-tools@0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@module-federation/runtime-tools/-/runtime-tools-0.2.3.tgz#2701b6fbcea322b4c5523fca1456f0cae8df73cd" - integrity sha512-capN8CVTCEqNAjnl102girrkevczoQfnQYyiYC4WuyKsg7+LUqfirIe1Eiyv6VSE2UgvOTZDnqvervA6rBOlmg== +"@module-federation/runtime-tools@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/runtime-tools/-/runtime-tools-0.5.1.tgz#1b1f93837159a6bf0c0ba78730d589a5a8f74aa3" + integrity sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg== dependencies: - "@module-federation/runtime" "0.2.3" - "@module-federation/webpack-bundler-runtime" "0.2.3" + "@module-federation/runtime" "0.5.1" + "@module-federation/webpack-bundler-runtime" "0.5.1" -"@module-federation/runtime@0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@module-federation/runtime/-/runtime-0.2.3.tgz#4ff46fe6de986aa9843a8e631b68a8e8dd416c0d" - integrity sha512-N+ZxBUb1mkmfO9XT1BwgYQgShtUTlijHbukqQ4afFka5lRAT+ayC7RKfHJLz0HbuexKPCmPBDfdmCnErR5WyTQ== +"@module-federation/runtime@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/runtime/-/runtime-0.5.1.tgz#b548a75e2068952ff66ad717cbf73fc921edd5d7" + integrity sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ== dependencies: - "@module-federation/sdk" "0.2.3" + "@module-federation/sdk" "0.5.1" -"@module-federation/sdk@0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@module-federation/sdk/-/sdk-0.2.3.tgz#b640830b299d2b9d27b48bced10d7126c15c1719" - integrity sha512-W9zrPchLocyCBc/B8CW21akcfJXLl++9xBe1L1EtgxZGfj/xwHt0GcBWE/y+QGvYTL2a1iZjwscbftbUhxgxXg== +"@module-federation/sdk@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/sdk/-/sdk-0.5.1.tgz#6c0a4053c23fa84db7aae7e4736496c541de7191" + integrity sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA== -"@module-federation/webpack-bundler-runtime@0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.2.3.tgz#5d03070ede8c63d76c62043db17651f398bfb1ab" - integrity sha512-L/jt2uJ+8dwYiyn9GxryzDR6tr/Wk8rpgvelM2EBeLIhu7YxCHSmSjQYhw3BTux9zZIr47d1K9fGjBFsVRd/SQ== +"@module-federation/webpack-bundler-runtime@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.5.1.tgz#ef626af0d57e3568c474d66d7d3797366e09cafd" + integrity sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA== dependencies: - "@module-federation/runtime" "0.2.3" - "@module-federation/sdk" "0.2.3" + "@module-federation/runtime" "0.5.1" + "@module-federation/sdk" "0.5.1" "@netlify/functions@^1.6.0": version "1.6.0" @@ -2820,70 +2820,70 @@ fs-extra "^11.1.1" lodash "^4.17.21" -"@rspack/binding-darwin-arm64@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-beta.4.tgz#2ad5d6c4492ff3b0bee5bb582a6f421b81803aec" - integrity sha512-A5FLhVmvuz8E/r0C29UODXk44wNTZX/vcMerSSQ/V53rGndPOR5mU6jOTy1ziGZ5liDCKWfobmd7Xe7Qj+oR4g== - -"@rspack/binding-darwin-x64@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.0-beta.4.tgz#cf6c8c7a313cb667bf67f23f6944780ae2c33f5e" - integrity sha512-OARwlMyijkLTEfJq3ap23kU/KWpYq+HNhWC34vGbjS+uTmJyBBHG1J9tbg5Qg5VdXMUBGPuPUSEzv8+cHGdZjQ== - -"@rspack/binding-linux-arm64-gnu@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-beta.4.tgz#322d4e549f5918fcad5559b8918154c6491dfc3b" - integrity sha512-r++bMpRbyT6CqjW9bO4PW7oOo4Nf37Q0s/TJMXxmWX0jQZ5EzGUteB2b5sw631RBL1Y2JBNN9r1nKJOPnTplfQ== - -"@rspack/binding-linux-arm64-musl@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-beta.4.tgz#bf05a1b7486f05d17f8109d20c67913d2b5a4219" - integrity sha512-kVT9qujXoz415woKmGuM+aV0349aeMjEi5P/X1j6FMLmcZX+qmSLunPgn4wmRFxPCvg6kS1IK/HjuCPQ02nrxA== - -"@rspack/binding-linux-x64-gnu@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-beta.4.tgz#13e650e4fd9b28b4f24ba9a08879acc0f8811d16" - integrity sha512-xRnmFsY9yIqPVhA+71kJ1ACunyqO2rrWn15Dn1T7/79i14CsT++yCr1OiaxU3VUOUirzOF0QNg3EcChfxsn6NA== - -"@rspack/binding-linux-x64-musl@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-beta.4.tgz#bd5386fcf56387060cfe9384e546134728744279" - integrity sha512-Ho86q7ItvVFFQBP7dHY/MUZIXY6ymi/4dJ7cs5eFdWEi79bMXwPA3eU59N/oXRXjvGjbwQ1KYR9pcD+1PAnd4Q== - -"@rspack/binding-win32-arm64-msvc@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-beta.4.tgz#6a5f99f235b8c34d015e91d411f89666b3000670" - integrity sha512-f5NgYRJsmrXgT3wkSDeMH3avX/Zy78lYjy4nNnPJ/GOu4xkzcX8Y4a4j6filODDgMCxo05dQTY8/DP0wHTJmzg== - -"@rspack/binding-win32-ia32-msvc@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.0-beta.4.tgz#acf4d6f8a2646d19b4c8c3e920d5324ff86b45be" - integrity sha512-NIT4b/YMS/ysBpgriewiRRO7k0aPsoZ8961f2JQnS1nmzPYKau/Fnh/g+BUwtofGuHjqqDxOCN9UxJhdTPIXUg== - -"@rspack/binding-win32-x64-msvc@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-beta.4.tgz#55e94bf8dc24a07a92ff7c55a29ecac364f86cdd" - integrity sha512-ajJ5WzDqg4vy02sNJl71JpOKkc/f/cR3s37RJHR4njKMRCzc5roTEqXG9RiNMiBCXW0B0lmceCU+5kpaIZQ3vA== - -"@rspack/binding@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.0-beta.4.tgz#106a501d362637d4b78c76c2b518b0ddc95b3f58" - integrity sha512-LTv5hsyv1RVo15QnZq/eQYPHnsyQbjvEoWYtWHNUEAe4uMwpu2yvQlRVHjFjJvyPv03xqzi9vaaRknOVK4RAVA== +"@rspack/binding-darwin-arm64@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz#88eed0975fa05d9e73117feb4f64365ed1ba55eb" + integrity sha512-MZlQpDRJkjIJJqmYMiziwz9vLXi1KjORYW6hemC2umDfOzUmlkRPBUF8oEqXaUQ+zYLbjhk4iTSbFdrlqUR+6w== + +"@rspack/binding-darwin-x64@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz#c56b060c4ae0d45a4df22093a220b18c14225f76" + integrity sha512-Ke8Tw3+j5YFFIHjlqrEDnW5fbZU14s+l5LhLVaw6gVXH4yAAyFaZejaIViGi5fhKkdKmCXm0nVTK1KhhASZxAw== + +"@rspack/binding-linux-arm64-gnu@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz#ec10dfe94dba66f5eecea1807f9c9e05b4afbd6f" + integrity sha512-Ydm6rsBnPYlKfWtz6sPRgAgJ5fQ+zFSHplR4bFlARIOXeWPn7ckQvFZrmKexuR0ULjG3Z4sbfrU6udc2MAWvig== + +"@rspack/binding-linux-arm64-musl@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz#16104aef304f2882f2c5a5dcb61d0eba924d3290" + integrity sha512-2aS65Xne3W6qJJ5PN5oL/bMbkUeYpsQduT+ML6vY6hqvi6W6wYtkvHwscQ4HisxKQFWdB2bsE1+UT34XgHpijw== + +"@rspack/binding-linux-x64-gnu@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz#7070d775f4ce69b41b602229041424ce2666af0e" + integrity sha512-6UWii/GBkV0B98RSjJr9Za5Y8rvU1vQpE5+8vb26pvo3Sh3kvRfOmSeIFyqR3I92er5SQKmEp8uggb74st6QGQ== + +"@rspack/binding-linux-x64-musl@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz#b9d6c496bdf67b5926be347078a0eaa322c36314" + integrity sha512-tpKGPJEe6vkkH3bsDz+l7xndNrOGxDvbDVOXV0uSESnRr6Pef5253Bi5PNooGLSaWQlXVDdazhi6x1beVHI2eg== + +"@rspack/binding-win32-arm64-msvc@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz#c138fb270725c63f84c0c41b3a544e09d5e2b4ed" + integrity sha512-9FwP64T6yeq3cG1JQG0VagTMuJxJCT45G9LN5RTJ2kxJ4T28vL7uEc9usPpXOyd6xpbzTKXX0mVxL+c8x0EhZQ== + +"@rspack/binding-win32-ia32-msvc@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.3.tgz#ee71ddc313687cad46492d912f1e25c7ea34eac6" + integrity sha512-nXbeh0206bGiwV1vgY8UDk92sZ2yMvJenevnnLtGFSMTRQ46Z2f9n+mUO1GlvpanR1HAfhgPddlKasIncTJmPQ== + +"@rspack/binding-win32-x64-msvc@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz#efeb6de5455c48b52449c8857fc77b65c9a9306e" + integrity sha512-htBi4xt+iXD/NCEo/q4fYSg5YfXymK9P9zI36NFvfguQbhwqy4JgBx0IorjDFl5qvG70sdUzY7x98DJEseGScQ== + +"@rspack/binding@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.3.tgz#6f0bd8dfc724972d97cbff85133204dd0097cb19" + integrity sha512-wRLUDyi/6jFDDZJIov4uh9H9hJNk7JKDEhaMLM/5lJzzWsTLBB/q6JB1VAdIzOzBhYsU8iIMEVuG3Uih1H43uw== optionalDependencies: - "@rspack/binding-darwin-arm64" "1.0.0-beta.4" - "@rspack/binding-darwin-x64" "1.0.0-beta.4" - "@rspack/binding-linux-arm64-gnu" "1.0.0-beta.4" - "@rspack/binding-linux-arm64-musl" "1.0.0-beta.4" - "@rspack/binding-linux-x64-gnu" "1.0.0-beta.4" - "@rspack/binding-linux-x64-musl" "1.0.0-beta.4" - "@rspack/binding-win32-arm64-msvc" "1.0.0-beta.4" - "@rspack/binding-win32-ia32-msvc" "1.0.0-beta.4" - "@rspack/binding-win32-x64-msvc" "1.0.0-beta.4" - -"@rspack/lite-tapable@1.0.0-beta.5": - version "1.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@rspack/lite-tapable/-/lite-tapable-1.0.0-beta.5.tgz#a8ad987c082f684cb4e65a70f9e8cca9882892d6" - integrity sha512-jTmLhUeZgR3u+cHp5Z46FuTWUg+6VWWwbWkIzgVvQoN7YK9ntFfm7k5+cImTEQ0qe1r6P43uV0qD606SoZspKg== + "@rspack/binding-darwin-arm64" "1.0.3" + "@rspack/binding-darwin-x64" "1.0.3" + "@rspack/binding-linux-arm64-gnu" "1.0.3" + "@rspack/binding-linux-arm64-musl" "1.0.3" + "@rspack/binding-linux-x64-gnu" "1.0.3" + "@rspack/binding-linux-x64-musl" "1.0.3" + "@rspack/binding-win32-arm64-msvc" "1.0.3" + "@rspack/binding-win32-ia32-msvc" "1.0.3" + "@rspack/binding-win32-x64-msvc" "1.0.3" + +"@rspack/lite-tapable@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@rspack/lite-tapable/-/lite-tapable-1.0.0.tgz#160883693462f164d0e6ede22f32614673ef6429" + integrity sha512-7MZf4lburSUZoEenwazwUDKHhqyfnLCGnQ/tKcUtztfmVzfjZfRn/EaiT0AKkYGnL2U8AGsw89oUeVyvaOLVCw== "@sideway/address@^4.1.3": version "4.1.4" @@ -6708,16 +6708,11 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -dayjs@1.11.13: +dayjs@1.11.13, dayjs@^1.11.7: version "1.11.13" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== -dayjs@^1.11.7: - version "1.11.12" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.12.tgz#5245226cc7f40a15bf52e0b99fd2a04669ccac1d" - integrity sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg== - debounce@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" @@ -17210,14 +17205,14 @@ webpack@^5, webpack@^5.88.1: watchpack "^2.4.1" webpack-sources "^3.2.3" -"webpack@npm:@rspack/core@1.0.0-beta.4": - version "1.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.0-beta.4.tgz#98eabffd5a7c216fe4c5cb79d5c9f1eab20edd98" - integrity sha512-FhHRhUX4+ob9vj/N2vl9mHHSFlygnTUKF1ztzcDjQesFWnmBKKjccSGExFWYd47nT7XUn7j3xziHZ4NKAs02LA== +"webpack@npm:@rspack/core@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.3.tgz#b550fd2ed8466eed0930208f8b1457f415f9cbdc" + integrity sha512-BqyBSrcTtsm1EDI10TrK6tEfNsy5vEnVDnbI0HBuQBH1zhKblnvsu6Y2bbS9+OGmB+OPEr76CmuZtzb+7V3wrQ== dependencies: - "@module-federation/runtime-tools" "0.2.3" - "@rspack/binding" "1.0.0-beta.4" - "@rspack/lite-tapable" "1.0.0-beta.5" + "@module-federation/runtime-tools" "0.5.1" + "@rspack/binding" "1.0.3" + "@rspack/lite-tapable" "1.0.0" caniuse-lite "^1.0.30001616" webpackbar@^5.0.2: From fc9576b220e1b012798684594dcfa0dc120fb7ba Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Sep 2024 18:56:36 +0200 Subject: [PATCH 16/56] Try to restore ChunkAssetPlugin for preloading --- packages/docusaurus/src/client/docusaurus.ts | 26 +++++++++---------- packages/docusaurus/src/webpack/client.ts | 4 +-- .../src/webpack/plugins/ChunkAssetPlugin.ts | 16 +++++++++--- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/packages/docusaurus/src/client/docusaurus.ts b/packages/docusaurus/src/client/docusaurus.ts index 50cf94471fd2..da0a35133e96 100644 --- a/packages/docusaurus/src/client/docusaurus.ts +++ b/packages/docusaurus/src/client/docusaurus.ts @@ -64,20 +64,18 @@ const prefetch: Docusaurus['prefetch'] = ( // Prefetch all webpack chunk assets file needed. return Promise.all( - chunkNamesNeeded.map((/* chunkName */) => { - /* TODO ChunkAssetPlugin not working now - - // "__webpack_require__.gca" is injected by ChunkAssetPlugin. Pass it - // the name of the chunk you want to load and it will return its URL. - // eslint-disable-next-line camelcase - const chunkAsset = __webpack_require__.gca(chunkName); - // In some cases, webpack might decide to optimize further, leading to - // the chunk assets being merged to another chunk. In this case, we can - // safely filter it out and don't need to load it. - if (chunkAsset && !chunkAsset.includes('undefined')) { - return prefetchHelper(chunkAsset); - } - */ + chunkNamesNeeded.map((chunkName) => { + // "__webpack_require__.gca" is injected by ChunkAssetPlugin. Pass it + // the name of the chunk you want to load and it will return its URL. + // eslint-disable-next-line camelcase + const chunkAsset = __webpack_require__.gca(chunkName); + // In some cases, webpack might decide to optimize further, leading to + // the chunk assets being merged to another chunk. In this case, we can + // safely filter it out and don't need to load it. + if (chunkAsset && !chunkAsset.includes('undefined')) { + return prefetchHelper(chunkAsset); + } + return Promise.resolve(); }), ); diff --git a/packages/docusaurus/src/webpack/client.ts b/packages/docusaurus/src/webpack/client.ts index 9eb8240736f6..a7cc1788d6ec 100644 --- a/packages/docusaurus/src/webpack/client.ts +++ b/packages/docusaurus/src/webpack/client.ts @@ -13,7 +13,7 @@ import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer'; import ReactLoadableSSRAddon from 'react-loadable-ssr-addon-v5-slorber'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import {createBaseConfig} from './base'; -// import ChunkAssetPlugin from './plugins/ChunkAssetPlugin'; +import ChunkAssetPlugin from './plugins/ChunkAssetPlugin'; import CleanWebpackPlugin from './plugins/CleanWebpackPlugin'; import ForceTerminatePlugin from './plugins/ForceTerminatePlugin'; import {createStaticDirectoriesCopyPlugin} from './plugins/StaticDirectoriesCopyPlugin'; @@ -54,7 +54,7 @@ async function createBaseClientConfig({ 'process.env.HYDRATE_CLIENT_ENTRY': JSON.stringify(hydrate), }), - // new ChunkAssetPlugin(), + new ChunkAssetPlugin(), // Show compilation progress bar and build time. new WebpackBar({ diff --git a/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts b/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts index 60e54b6f93a5..979fc8a77c5e 100644 --- a/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts +++ b/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts @@ -22,8 +22,18 @@ const pluginName = 'chunk-asset-plugin'; */ export default class ChunkAssetPlugin { apply(compiler: Compiler): void { - /* - compiler.hooks.thisCompilation.tap(pluginName, ({mainTemplate}) => { + compiler.hooks.thisCompilation.tap(pluginName, (compilation) => { + // @ts-expect-error: fix this + const {mainTemplate} = compilation; + // TODO fix this bug + if (!mainTemplate) { + console.log( + 'ChunkAssetPlugin broken!\nRspack bug: not providing mainTemplate!', + ); + return; + } + + // @ts-expect-error: fix this mainTemplate.hooks.requireExtensions.tap(pluginName, (source, chunk) => { const chunkIdToName = chunk.getChunkMaps(false).name; const chunkNameToId = Object.fromEntries( @@ -52,7 +62,5 @@ export default class ChunkAssetPlugin { return webpack.Template.asString(buf); }); }); - - */ } } From b5c267adbd8e5f5739613f772d730a399fa62994 Mon Sep 17 00:00:00 2001 From: sebastien Date: Tue, 10 Sep 2024 17:21:27 +0200 Subject: [PATCH 17/56] Rspack 1.0.4 --- packages/docusaurus-plugin-pwa/package.json | 2 +- packages/docusaurus/package.json | 2 +- yarn.lock | 108 ++++++++++---------- 3 files changed, 56 insertions(+), 56 deletions(-) diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json index bad196e63169..efabeb9d54b6 100644 --- a/packages/docusaurus-plugin-pwa/package.json +++ b/packages/docusaurus-plugin-pwa/package.json @@ -34,7 +34,7 @@ "core-js": "^3.31.1", "terser-webpack-plugin": "^5.3.9", "tslib": "^2.6.0", - "webpack": "npm:@rspack/core@1.0.3", + "webpack": "npm:@rspack/core@1.0.4", "webpack-merge": "^5.9.0", "webpackbar": "^5.0.2", "workbox-build": "^7.0.0", diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index cba29fbd4ea4..51a83abaf0a7 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -97,7 +97,7 @@ "tslib": "^2.6.0", "update-notifier": "^6.0.2", "url-loader": "^4.1.1", - "webpack": "npm:@rspack/core@1.0.3", + "webpack": "npm:@rspack/core@1.0.4", "webpack-bundle-analyzer": "^4.9.0", "webpack-dev-server": "^4.15.1", "webpack-merge": "^5.9.0", diff --git a/yarn.lock b/yarn.lock index 72fdad2ef8c4..095a0e518d17 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2820,65 +2820,65 @@ fs-extra "^11.1.1" lodash "^4.17.21" -"@rspack/binding-darwin-arm64@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz#88eed0975fa05d9e73117feb4f64365ed1ba55eb" - integrity sha512-MZlQpDRJkjIJJqmYMiziwz9vLXi1KjORYW6hemC2umDfOzUmlkRPBUF8oEqXaUQ+zYLbjhk4iTSbFdrlqUR+6w== +"@rspack/binding-darwin-arm64@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.4.tgz#350cc7e471f85d97e6510392f889fcb2b663102f" + integrity sha512-HR4OVarDhLYAd3GRus26mGjaoEkvFGSdhRHWPXkTqPWT1QIx+cMTDe2dUnEb/CZyvpH0afLBlVHrxqUBNiLT/Q== -"@rspack/binding-darwin-x64@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz#c56b060c4ae0d45a4df22093a220b18c14225f76" - integrity sha512-Ke8Tw3+j5YFFIHjlqrEDnW5fbZU14s+l5LhLVaw6gVXH4yAAyFaZejaIViGi5fhKkdKmCXm0nVTK1KhhASZxAw== +"@rspack/binding-darwin-x64@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.4.tgz#9943f324e8d4a4de161774c2955d835356f88c65" + integrity sha512-3L/vrzrcBpg1h7SqD+9m7CB0UlkDt3aOyJGZc0vwLOQM8IezRsawEoidyN9KyYhpDzBZHzLAUnsva33BcbFJYQ== -"@rspack/binding-linux-arm64-gnu@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz#ec10dfe94dba66f5eecea1807f9c9e05b4afbd6f" - integrity sha512-Ydm6rsBnPYlKfWtz6sPRgAgJ5fQ+zFSHplR4bFlARIOXeWPn7ckQvFZrmKexuR0ULjG3Z4sbfrU6udc2MAWvig== +"@rspack/binding-linux-arm64-gnu@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.4.tgz#b69c7ddcaea16ac367082cd916613fa1f5cdaa21" + integrity sha512-Ggo2tLJKOFNsdcg9H3eYSUy03Wrq0PMVIlm50p/LLAMlfYm3kxBDNv7fP13fxlUe/oqXtFcVOlmMezbMH4oz8w== -"@rspack/binding-linux-arm64-musl@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz#16104aef304f2882f2c5a5dcb61d0eba924d3290" - integrity sha512-2aS65Xne3W6qJJ5PN5oL/bMbkUeYpsQduT+ML6vY6hqvi6W6wYtkvHwscQ4HisxKQFWdB2bsE1+UT34XgHpijw== +"@rspack/binding-linux-arm64-musl@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.4.tgz#15907dab7a4c574b8933359eeb3c21352db5c284" + integrity sha512-2FeDh8/THJTH2N4XpFC9oRvdDlkOw6bQ+vS8x1jLUXj+CDwqmUiECjh+78o4qwe1EH2egWDmkq84RQ+KoR37mQ== -"@rspack/binding-linux-x64-gnu@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz#7070d775f4ce69b41b602229041424ce2666af0e" - integrity sha512-6UWii/GBkV0B98RSjJr9Za5Y8rvU1vQpE5+8vb26pvo3Sh3kvRfOmSeIFyqR3I92er5SQKmEp8uggb74st6QGQ== +"@rspack/binding-linux-x64-gnu@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.4.tgz#0c0f9f9648eb995e6b8cd6b8291f9418052e3683" + integrity sha512-k2YQ579fDfXBw4KJMvZQQPShFUSln7wqtG59ltNLBejgFSxOtlMfLhY5oSuRvFCtsAS4SQUPOmUmfW/0dpCa7A== -"@rspack/binding-linux-x64-musl@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz#b9d6c496bdf67b5926be347078a0eaa322c36314" - integrity sha512-tpKGPJEe6vkkH3bsDz+l7xndNrOGxDvbDVOXV0uSESnRr6Pef5253Bi5PNooGLSaWQlXVDdazhi6x1beVHI2eg== +"@rspack/binding-linux-x64-musl@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.4.tgz#b2e3935fd4d8116bbdb1df17b5de3f71eb09dfab" + integrity sha512-1Pmuq3qnE45U7uhCJNtRbDiQVF+U4BXbsA+ISNd3Gp/MUZqpuOOgrND9OWw7d+xKRifzEMtd81DaPMkrcXyRvw== -"@rspack/binding-win32-arm64-msvc@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz#c138fb270725c63f84c0c41b3a544e09d5e2b4ed" - integrity sha512-9FwP64T6yeq3cG1JQG0VagTMuJxJCT45G9LN5RTJ2kxJ4T28vL7uEc9usPpXOyd6xpbzTKXX0mVxL+c8x0EhZQ== +"@rspack/binding-win32-arm64-msvc@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.4.tgz#6aff1cee1562e8a3858d5628f79dcf709bec1053" + integrity sha512-3tBP4xTAe8XRAlchMj2nlQXy2GOICA5StFK0kQMRId4V3xfgjlKDb/dMHMEHH4R1to1f9er9R0cRydUNP5AnbQ== -"@rspack/binding-win32-ia32-msvc@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.3.tgz#ee71ddc313687cad46492d912f1e25c7ea34eac6" - integrity sha512-nXbeh0206bGiwV1vgY8UDk92sZ2yMvJenevnnLtGFSMTRQ46Z2f9n+mUO1GlvpanR1HAfhgPddlKasIncTJmPQ== +"@rspack/binding-win32-ia32-msvc@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.4.tgz#c0cb7098047117df220139dc24aa8dba5254a24c" + integrity sha512-VCXXhOh9aWg31RfvJL87cvqIeL8h+gG2LPkXCJ8kzvQItLg6vlXABCGHf3NlaVUnDtAHnhsAT1sOHiD8G/kMfg== -"@rspack/binding-win32-x64-msvc@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz#efeb6de5455c48b52449c8857fc77b65c9a9306e" - integrity sha512-htBi4xt+iXD/NCEo/q4fYSg5YfXymK9P9zI36NFvfguQbhwqy4JgBx0IorjDFl5qvG70sdUzY7x98DJEseGScQ== +"@rspack/binding-win32-x64-msvc@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.4.tgz#3978cc7869c9b8651a4669f208d9c2610fb84d48" + integrity sha512-hlhAZVpL1MmGJUZ730JvOL6zc12BlfIIwRNnn0PkCrNSxNOYknkfKVix8CfPU9r8L2W8MOJfsbtjteCiJmJnQA== -"@rspack/binding@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.3.tgz#6f0bd8dfc724972d97cbff85133204dd0097cb19" - integrity sha512-wRLUDyi/6jFDDZJIov4uh9H9hJNk7JKDEhaMLM/5lJzzWsTLBB/q6JB1VAdIzOzBhYsU8iIMEVuG3Uih1H43uw== +"@rspack/binding@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.4.tgz#1ce9cebd4cf50dc0f60a5b700581529e3a82bd97" + integrity sha512-YbVyVWvYXCAqUqIyBPEwl+M0js4BqVAxqnsRiZG861MXrqNyYbGOMTcc3Pc6D0SW/gkcWugGWzQ5jgMjAIhHzw== optionalDependencies: - "@rspack/binding-darwin-arm64" "1.0.3" - "@rspack/binding-darwin-x64" "1.0.3" - "@rspack/binding-linux-arm64-gnu" "1.0.3" - "@rspack/binding-linux-arm64-musl" "1.0.3" - "@rspack/binding-linux-x64-gnu" "1.0.3" - "@rspack/binding-linux-x64-musl" "1.0.3" - "@rspack/binding-win32-arm64-msvc" "1.0.3" - "@rspack/binding-win32-ia32-msvc" "1.0.3" - "@rspack/binding-win32-x64-msvc" "1.0.3" + "@rspack/binding-darwin-arm64" "1.0.4" + "@rspack/binding-darwin-x64" "1.0.4" + "@rspack/binding-linux-arm64-gnu" "1.0.4" + "@rspack/binding-linux-arm64-musl" "1.0.4" + "@rspack/binding-linux-x64-gnu" "1.0.4" + "@rspack/binding-linux-x64-musl" "1.0.4" + "@rspack/binding-win32-arm64-msvc" "1.0.4" + "@rspack/binding-win32-ia32-msvc" "1.0.4" + "@rspack/binding-win32-x64-msvc" "1.0.4" "@rspack/lite-tapable@1.0.0": version "1.0.0" @@ -17212,13 +17212,13 @@ webpack@^5, webpack@^5.88.1: watchpack "^2.4.1" webpack-sources "^3.2.3" -"webpack@npm:@rspack/core@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.3.tgz#b550fd2ed8466eed0930208f8b1457f415f9cbdc" - integrity sha512-BqyBSrcTtsm1EDI10TrK6tEfNsy5vEnVDnbI0HBuQBH1zhKblnvsu6Y2bbS9+OGmB+OPEr76CmuZtzb+7V3wrQ== +"webpack@npm:@rspack/core@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.4.tgz#887b630ee9ca4bedf99507718e58b7ec3edf38ae" + integrity sha512-/R3JenF5wJSj3DPxiewyIPGzuZV336XpRORjUAOvbHPK6zea8Eeqcx6RopWM6TMikRYdZOHThKV99tyi4QLsMg== dependencies: "@module-federation/runtime-tools" "0.5.1" - "@rspack/binding" "1.0.3" + "@rspack/binding" "1.0.4" "@rspack/lite-tapable" "1.0.0" caniuse-lite "^1.0.30001616" From 2fff52fcf23fa747885fbd0364ff4b16f1dcc7f4 Mon Sep 17 00:00:00 2001 From: sebastien Date: Tue, 10 Sep 2024 17:30:44 +0200 Subject: [PATCH 18/56] damn, ChunkAssetPlugin still doesn't work --- .../docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts b/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts index 0d216e36e17c..88b3031958ef 100644 --- a/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts +++ b/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts @@ -18,7 +18,9 @@ const DocusaurusGetChunkAssetFn = '__webpack_require__.gca'; const PluginName = 'Docusaurus-ChunkAssetPlugin'; +// eslint-disable-next-line function generateGetChunkAssetRuntimeCode(chunk: webpack.Chunk): string { + // @ts-expect-error: fix const chunkIdToName = chunk.getChunkMaps(false).name; const chunkNameToId = Object.fromEntries( Object.entries(chunkIdToName).map(([chunkId, chunkName]) => [ @@ -59,8 +61,9 @@ export default class ChunkAssetPlugin { compiler.hooks.thisCompilation.tap(PluginName, (compilation) => { compilation.hooks.additionalTreeRuntimeRequirements.tap( PluginName, + // eslint-disable-next-line (chunk) => { - compilation.addRuntimeModule(chunk, new ChunkAssetRuntimeModule()); + // compilation.addRuntimeModule(chunk, new ChunkAssetRuntimeModule()); }, ); }); @@ -68,6 +71,7 @@ export default class ChunkAssetPlugin { } // Inspired by https://github.com/webpack/webpack/blob/v5.94.0/lib/runtime/CompatRuntimeModule.js +/* class ChunkAssetRuntimeModule extends webpack.RuntimeModule { constructor() { super('ChunkAssetRuntimeModule', webpack.RuntimeModule.STAGE_ATTACH); @@ -77,3 +81,4 @@ class ChunkAssetRuntimeModule extends webpack.RuntimeModule { return generateGetChunkAssetRuntimeCode(this.chunk!); } } + */ From 318c2df6cb89bc88f641ffa4ff60cafd6f35c7fe Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 12:29:10 +0200 Subject: [PATCH 19/56] fix merge issues --- packages/docusaurus-plugin-pwa/package.json | 2 +- packages/docusaurus-plugin-pwa/src/index.ts | 7 +- packages/docusaurus/package.json | 2 +- .../docusaurus/src/commands/start/webpack.ts | 6 +- packages/docusaurus/src/webpack/base.ts | 5 - .../docusaurus/src/webpack/minification.ts | 6 +- .../src/webpack/plugins/ChunkAssetPlugin.ts | 1 - yarn.lock | 105 +----------------- 8 files changed, 12 insertions(+), 122 deletions(-) diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json index efabeb9d54b6..39f2c9296ef9 100644 --- a/packages/docusaurus-plugin-pwa/package.json +++ b/packages/docusaurus-plugin-pwa/package.json @@ -34,7 +34,7 @@ "core-js": "^3.31.1", "terser-webpack-plugin": "^5.3.9", "tslib": "^2.6.0", - "webpack": "npm:@rspack/core@1.0.4", + "webpack": "^5.88.1", "webpack-merge": "^5.9.0", "webpackbar": "^5.0.2", "workbox-build": "^7.0.0", diff --git a/packages/docusaurus-plugin-pwa/src/index.ts b/packages/docusaurus-plugin-pwa/src/index.ts index 3284c2fe34b4..e08c02b7d977 100644 --- a/packages/docusaurus-plugin-pwa/src/index.ts +++ b/packages/docusaurus-plugin-pwa/src/index.ts @@ -6,7 +6,7 @@ */ import path from 'path'; -import {rspack, type Configuration} from 'webpack'; +import webpack, {type Configuration} from 'webpack'; import WebpackBar from 'webpackbar'; import Terser from 'terser-webpack-plugin'; import {injectManifest} from 'workbox-build'; @@ -89,11 +89,10 @@ export default function pluginPWA( }); }, - // @ts-expect-error: todo fix configureWebpack(config) { return { plugins: [ - new rspack.EnvironmentPlugin( + new webpack.EnvironmentPlugin( // See https://github.com/facebook/docusaurus/pull/10455#issuecomment-2317593528 // See https://github.com/webpack/webpack/commit/adf2a6b7c6077fd806ea0e378c1450cccecc9ed0#r145989788 // @ts-expect-error: bad Webpack type? @@ -163,7 +162,7 @@ export default function pluginPWA( ], }, plugins: [ - new rspack.EnvironmentPlugin({ + new webpack.EnvironmentPlugin({ // Fallback value required with Webpack 5 PWA_SW_CUSTOM: swCustom ?? '', }), diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 51a83abaf0a7..72bdb1e9376b 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -97,7 +97,7 @@ "tslib": "^2.6.0", "update-notifier": "^6.0.2", "url-loader": "^4.1.1", - "webpack": "npm:@rspack/core@1.0.4", + "webpack": "^5.88.1", "webpack-bundle-analyzer": "^4.9.0", "webpack-dev-server": "^4.15.1", "webpack-merge": "^5.9.0", diff --git a/packages/docusaurus/src/commands/start/webpack.ts b/packages/docusaurus/src/commands/start/webpack.ts index 309e333e2911..d95111f6efe4 100644 --- a/packages/docusaurus/src/commands/start/webpack.ts +++ b/packages/docusaurus/src/commands/start/webpack.ts @@ -7,7 +7,7 @@ import path from 'path'; import merge from 'webpack-merge'; -import {rspack} from 'webpack'; +import webpack from 'webpack'; import logger from '@docusaurus/logger'; import WebpackDevServer from 'webpack-dev-server'; import evalSourceMapMiddleware from 'react-dev-utils/evalSourceMapMiddleware'; @@ -171,7 +171,8 @@ export async function createWebpackDevServer({ configureWebpackUtils, }); - const compiler = rspack(config); + // TODO wire rspack + const compiler = webpack(config); registerWebpackE2ETestHook(compiler); const defaultDevServerConfig = await createDevServerConfig({ @@ -186,6 +187,5 @@ export async function createWebpackDevServer({ [defaultDevServerConfig, config.devServer].filter(Boolean), ); - // @ts-expect-error: todo fix return new WebpackDevServer(devServerConfig, compiler); } diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index ac7345f0dcb8..58a27837beef 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -8,11 +8,6 @@ import fs from 'fs-extra'; import path from 'path'; import {md5Hash, getFileLoaderUtils} from '@docusaurus/utils'; -import { - createJsLoaderFactory, - getStyleLoaders, - getCustomBabelConfigFilePath, -} from './utils'; import {getMinimizers} from './minification'; import {loadThemeAliases, loadDocusaurusAliases} from './aliases'; import {getCSSExtractPlugin} from './currentBundler'; diff --git a/packages/docusaurus/src/webpack/minification.ts b/packages/docusaurus/src/webpack/minification.ts index 86fcb2f8a5c8..4c1d39094454 100644 --- a/packages/docusaurus/src/webpack/minification.ts +++ b/packages/docusaurus/src/webpack/minification.ts @@ -7,7 +7,7 @@ import TerserPlugin from 'terser-webpack-plugin'; import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'; -import {rspack, type WebpackPluginInstance} from 'webpack'; +import webpack, {type WebpackPluginInstance} from 'webpack'; import {importSwcJsMinifierOptions} from '../faster'; import type {CustomOptions, CssNanoOptions} from 'css-minimizer-webpack-plugin'; import type {FasterConfig} from '@docusaurus/types'; @@ -117,8 +117,8 @@ export async function getMinimizers( // TODO wire option properly if (params) { return [ - new rspack.SwcJsMinimizerRspackPlugin(), - new rspack.LightningCssMinimizerRspackPlugin(), + // new rspack.SwcJsMinimizerRspackPlugin(), + // new rspack.LightningCssMinimizerRspackPlugin(), ]; } diff --git a/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts b/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts index 88b3031958ef..af7380e68a27 100644 --- a/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts +++ b/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts @@ -20,7 +20,6 @@ const PluginName = 'Docusaurus-ChunkAssetPlugin'; // eslint-disable-next-line function generateGetChunkAssetRuntimeCode(chunk: webpack.Chunk): string { - // @ts-expect-error: fix const chunkIdToName = chunk.getChunkMaps(false).name; const chunkNameToId = Object.fromEntries( Object.entries(chunkIdToName).map(([chunkId, chunkName]) => [ diff --git a/yarn.lock b/yarn.lock index 3ad3d72af545..28d3c7808e51 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2152,34 +2152,6 @@ dependencies: "@types/mdx" "^2.0.0" -"@module-federation/runtime-tools@0.5.1": - version "0.5.1" - resolved "https://registry.yarnpkg.com/@module-federation/runtime-tools/-/runtime-tools-0.5.1.tgz#1b1f93837159a6bf0c0ba78730d589a5a8f74aa3" - integrity sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg== - dependencies: - "@module-federation/runtime" "0.5.1" - "@module-federation/webpack-bundler-runtime" "0.5.1" - -"@module-federation/runtime@0.5.1": - version "0.5.1" - resolved "https://registry.yarnpkg.com/@module-federation/runtime/-/runtime-0.5.1.tgz#b548a75e2068952ff66ad717cbf73fc921edd5d7" - integrity sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ== - dependencies: - "@module-federation/sdk" "0.5.1" - -"@module-federation/sdk@0.5.1": - version "0.5.1" - resolved "https://registry.yarnpkg.com/@module-federation/sdk/-/sdk-0.5.1.tgz#6c0a4053c23fa84db7aae7e4736496c541de7191" - integrity sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA== - -"@module-federation/webpack-bundler-runtime@0.5.1": - version "0.5.1" - resolved "https://registry.yarnpkg.com/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.5.1.tgz#ef626af0d57e3568c474d66d7d3797366e09cafd" - integrity sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA== - dependencies: - "@module-federation/runtime" "0.5.1" - "@module-federation/sdk" "0.5.1" - "@netlify/functions@^1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@netlify/functions/-/functions-1.6.0.tgz#c373423e6fef0e6f7422ac0345e8bbf2cb692366" @@ -2820,71 +2792,6 @@ fs-extra "^11.1.1" lodash "^4.17.21" -"@rspack/binding-darwin-arm64@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.4.tgz#350cc7e471f85d97e6510392f889fcb2b663102f" - integrity sha512-HR4OVarDhLYAd3GRus26mGjaoEkvFGSdhRHWPXkTqPWT1QIx+cMTDe2dUnEb/CZyvpH0afLBlVHrxqUBNiLT/Q== - -"@rspack/binding-darwin-x64@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.4.tgz#9943f324e8d4a4de161774c2955d835356f88c65" - integrity sha512-3L/vrzrcBpg1h7SqD+9m7CB0UlkDt3aOyJGZc0vwLOQM8IezRsawEoidyN9KyYhpDzBZHzLAUnsva33BcbFJYQ== - -"@rspack/binding-linux-arm64-gnu@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.4.tgz#b69c7ddcaea16ac367082cd916613fa1f5cdaa21" - integrity sha512-Ggo2tLJKOFNsdcg9H3eYSUy03Wrq0PMVIlm50p/LLAMlfYm3kxBDNv7fP13fxlUe/oqXtFcVOlmMezbMH4oz8w== - -"@rspack/binding-linux-arm64-musl@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.4.tgz#15907dab7a4c574b8933359eeb3c21352db5c284" - integrity sha512-2FeDh8/THJTH2N4XpFC9oRvdDlkOw6bQ+vS8x1jLUXj+CDwqmUiECjh+78o4qwe1EH2egWDmkq84RQ+KoR37mQ== - -"@rspack/binding-linux-x64-gnu@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.4.tgz#0c0f9f9648eb995e6b8cd6b8291f9418052e3683" - integrity sha512-k2YQ579fDfXBw4KJMvZQQPShFUSln7wqtG59ltNLBejgFSxOtlMfLhY5oSuRvFCtsAS4SQUPOmUmfW/0dpCa7A== - -"@rspack/binding-linux-x64-musl@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.4.tgz#b2e3935fd4d8116bbdb1df17b5de3f71eb09dfab" - integrity sha512-1Pmuq3qnE45U7uhCJNtRbDiQVF+U4BXbsA+ISNd3Gp/MUZqpuOOgrND9OWw7d+xKRifzEMtd81DaPMkrcXyRvw== - -"@rspack/binding-win32-arm64-msvc@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.4.tgz#6aff1cee1562e8a3858d5628f79dcf709bec1053" - integrity sha512-3tBP4xTAe8XRAlchMj2nlQXy2GOICA5StFK0kQMRId4V3xfgjlKDb/dMHMEHH4R1to1f9er9R0cRydUNP5AnbQ== - -"@rspack/binding-win32-ia32-msvc@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.4.tgz#c0cb7098047117df220139dc24aa8dba5254a24c" - integrity sha512-VCXXhOh9aWg31RfvJL87cvqIeL8h+gG2LPkXCJ8kzvQItLg6vlXABCGHf3NlaVUnDtAHnhsAT1sOHiD8G/kMfg== - -"@rspack/binding-win32-x64-msvc@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.4.tgz#3978cc7869c9b8651a4669f208d9c2610fb84d48" - integrity sha512-hlhAZVpL1MmGJUZ730JvOL6zc12BlfIIwRNnn0PkCrNSxNOYknkfKVix8CfPU9r8L2W8MOJfsbtjteCiJmJnQA== - -"@rspack/binding@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.4.tgz#1ce9cebd4cf50dc0f60a5b700581529e3a82bd97" - integrity sha512-YbVyVWvYXCAqUqIyBPEwl+M0js4BqVAxqnsRiZG861MXrqNyYbGOMTcc3Pc6D0SW/gkcWugGWzQ5jgMjAIhHzw== - optionalDependencies: - "@rspack/binding-darwin-arm64" "1.0.4" - "@rspack/binding-darwin-x64" "1.0.4" - "@rspack/binding-linux-arm64-gnu" "1.0.4" - "@rspack/binding-linux-arm64-musl" "1.0.4" - "@rspack/binding-linux-x64-gnu" "1.0.4" - "@rspack/binding-linux-x64-musl" "1.0.4" - "@rspack/binding-win32-arm64-msvc" "1.0.4" - "@rspack/binding-win32-ia32-msvc" "1.0.4" - "@rspack/binding-win32-x64-msvc" "1.0.4" - -"@rspack/lite-tapable@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@rspack/lite-tapable/-/lite-tapable-1.0.0.tgz#160883693462f164d0e6ede22f32614673ef6429" - integrity sha512-7MZf4lburSUZoEenwazwUDKHhqyfnLCGnQ/tKcUtztfmVzfjZfRn/EaiT0AKkYGnL2U8AGsw89oUeVyvaOLVCw== - "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" @@ -5253,7 +5160,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001599, caniuse-lite@^1.0.30001616, caniuse-lite@^1.0.30001646: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001599, caniuse-lite@^1.0.30001646: version "1.0.30001658" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001658.tgz#b5f7be8ac748a049ab06aa1cf7a1408d83f074ec" integrity sha512-N2YVqWbJELVdrnsW5p+apoQyYt51aBMSsBZki1XZEfeBCexcM/sf4xiAHcXQBkuOwJBXtWF7aW1sYX6tKebPHw== @@ -17316,16 +17223,6 @@ webpack@^5, webpack@^5.88.1: watchpack "^2.4.1" webpack-sources "^3.2.3" -"webpack@npm:@rspack/core@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.4.tgz#887b630ee9ca4bedf99507718e58b7ec3edf38ae" - integrity sha512-/R3JenF5wJSj3DPxiewyIPGzuZV336XpRORjUAOvbHPK6zea8Eeqcx6RopWM6TMikRYdZOHThKV99tyi4QLsMg== - dependencies: - "@module-federation/runtime-tools" "0.5.1" - "@rspack/binding" "1.0.4" - "@rspack/lite-tapable" "1.0.0" - caniuse-lite "^1.0.30001616" - webpackbar@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/webpackbar/-/webpackbar-5.0.2.tgz#d3dd466211c73852741dfc842b7556dcbc2b0570" From 3b5dbe5d96b43cb362209c4805bb5214be53a714 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 13:26:19 +0200 Subject: [PATCH 20/56] try to fix Rspack build --- packages/docusaurus-faster/package.json | 5 +- packages/docusaurus-faster/src/index.ts | 5 + packages/docusaurus-plugin-pwa/package.json | 2 +- packages/docusaurus-plugin-pwa/src/deps.d.ts | 15 -- packages/docusaurus-plugin-pwa/src/index.ts | 15 +- packages/docusaurus/package.json | 2 +- packages/docusaurus/src/commands/build.ts | 13 +- .../docusaurus/src/commands/start/webpack.ts | 8 +- packages/docusaurus/src/deps.d.ts | 9 - packages/docusaurus/src/faster.ts | 6 + packages/docusaurus/src/webpack/client.ts | 13 +- .../docusaurus/src/webpack/currentBundler.ts | 38 ++++- packages/docusaurus/src/webpack/server.ts | 8 +- packages/docusaurus/src/webpack/utils.ts | 13 +- yarn.lock | 158 +++++++++++++++--- 15 files changed, 230 insertions(+), 80 deletions(-) delete mode 100644 packages/docusaurus-plugin-pwa/src/deps.d.ts diff --git a/packages/docusaurus-faster/package.json b/packages/docusaurus-faster/package.json index a25d313cdcfc..e367b3130106 100644 --- a/packages/docusaurus-faster/package.json +++ b/packages/docusaurus-faster/package.json @@ -18,9 +18,10 @@ }, "license": "MIT", "dependencies": { - "webpack": "^5.88.1", + "@rspack/core": "^1.0.5", "@swc/core": "^1.7.14", - "swc-loader": "^0.2.6" + "swc-loader": "^0.2.6", + "webpack": "^5.88.1" }, "engines": { "node": ">=18.0" diff --git a/packages/docusaurus-faster/src/index.ts b/packages/docusaurus-faster/src/index.ts index 0f079f68a5c6..ed33b69724a1 100644 --- a/packages/docusaurus-faster/src/index.ts +++ b/packages/docusaurus-faster/src/index.ts @@ -5,9 +5,14 @@ * LICENSE file in the root directory of this source tree. */ +import Rspack from '@rspack/core'; import type {RuleSetRule} from 'webpack'; import type {JsMinifyOptions} from '@swc/core'; +export function getRspack(): typeof Rspack { + return Rspack; +} + export function getSwcJsLoaderFactory({ isServer, }: { diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json index 39f2c9296ef9..a5d020d4a337 100644 --- a/packages/docusaurus-plugin-pwa/package.json +++ b/packages/docusaurus-plugin-pwa/package.json @@ -36,7 +36,7 @@ "tslib": "^2.6.0", "webpack": "^5.88.1", "webpack-merge": "^5.9.0", - "webpackbar": "^5.0.2", + "webpackbar": "^6.0.1", "workbox-build": "^7.0.0", "workbox-precaching": "^7.0.0", "workbox-window": "^7.0.0" diff --git a/packages/docusaurus-plugin-pwa/src/deps.d.ts b/packages/docusaurus-plugin-pwa/src/deps.d.ts deleted file mode 100644 index 104a45712162..000000000000 --- a/packages/docusaurus-plugin-pwa/src/deps.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// TODO incompatible declaration file: https://github.com/unjs/webpackbar/pull/108 -declare module 'webpackbar' { - import webpack from 'webpack'; - - export default class WebpackBarPlugin extends webpack.ProgressPlugin { - constructor(options: {name: string; color?: string}); - } -} diff --git a/packages/docusaurus-plugin-pwa/src/index.ts b/packages/docusaurus-plugin-pwa/src/index.ts index e08c02b7d977..32c58182ff32 100644 --- a/packages/docusaurus-plugin-pwa/src/index.ts +++ b/packages/docusaurus-plugin-pwa/src/index.ts @@ -89,10 +89,10 @@ export default function pluginPWA( }); }, - configureWebpack(config) { + configureWebpack(config, isServer, {currentBundler}) { return { plugins: [ - new webpack.EnvironmentPlugin( + new currentBundler.instance.EnvironmentPlugin( // See https://github.com/facebook/docusaurus/pull/10455#issuecomment-2317593528 // See https://github.com/webpack/webpack/commit/adf2a6b7c6077fd806ea0e378c1450cccecc9ed0#r145989788 // @ts-expect-error: bad Webpack type? @@ -162,6 +162,7 @@ export default function pluginPWA( ], }, plugins: [ + // TODO fix Rspack issue new webpack.EnvironmentPlugin({ // Fallback value required with Webpack 5 PWA_SW_CUSTOM: swCustom ?? '', @@ -182,7 +183,15 @@ export default function pluginPWA( }, }; - await compile([swWebpackConfig]); + await compile({ + configs: [swWebpackConfig], + + // TODO wire Rspack here + currentBundler: { + name: 'webpack', + instance: webpack, + }, + }); const swDest = path.resolve(props.outDir, 'sw.js'); diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 72bdb1e9376b..e031aabaa241 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -101,7 +101,7 @@ "webpack-bundle-analyzer": "^4.9.0", "webpack-dev-server": "^4.15.1", "webpack-merge": "^5.9.0", - "webpackbar": "^5.0.2" + "webpackbar": "^6.0.1" }, "devDependencies": { "@docusaurus/module-type-aliases": "3.5.2", diff --git a/packages/docusaurus/src/commands/build.ts b/packages/docusaurus/src/commands/build.ts index f06eba8c0c0a..61bdd947eeab 100644 --- a/packages/docusaurus/src/commands/build.ts +++ b/packages/docusaurus/src/commands/build.ts @@ -188,13 +188,14 @@ async function buildLocale({ ]), ); - // Run webpack to build JS bundle (client) and static html files (server). + // Run bundler to build the client bundle and server bundle (used for SSG) await PerfLogger.async('Bundling with Webpack', () => { - if (router === 'hash') { - return compile([clientConfig]); - } else { - return compile([clientConfig, serverConfig]); - } + return compile({ + configs: + // For hash router we don't do SSG and can skip the server bundle + router === 'hash' ? [clientConfig] : [clientConfig, serverConfig], + currentBundler: configureWebpackUtils.currentBundler, + }); }); const {collectedData} = await PerfLogger.async('SSG', () => diff --git a/packages/docusaurus/src/commands/start/webpack.ts b/packages/docusaurus/src/commands/start/webpack.ts index d95111f6efe4..66fb709d3e22 100644 --- a/packages/docusaurus/src/commands/start/webpack.ts +++ b/packages/docusaurus/src/commands/start/webpack.ts @@ -7,7 +7,6 @@ import path from 'path'; import merge from 'webpack-merge'; -import webpack from 'webpack'; import logger from '@docusaurus/logger'; import WebpackDevServer from 'webpack-dev-server'; import evalSourceMapMiddleware from 'react-dev-utils/evalSourceMapMiddleware'; @@ -22,6 +21,7 @@ import { executePluginsConfigureWebpack, } from '../../webpack/configure'; import {createStartClientConfig} from '../../webpack/client'; +import {getCurrentBundler} from '../../webpack/currentBundler'; import type {StartCLIOptions} from './start'; import type {ConfigureWebpackUtils, Props} from '@docusaurus/types'; import type {Compiler} from 'webpack'; @@ -171,8 +171,10 @@ export async function createWebpackDevServer({ configureWebpackUtils, }); - // TODO wire rspack - const compiler = webpack(config); + const currentBundler = await getCurrentBundler({ + siteConfig: props.siteConfig, + }); + const compiler = currentBundler.instance(config); registerWebpackE2ETestHook(compiler); const defaultDevServerConfig = await createDevServerConfig({ diff --git a/packages/docusaurus/src/deps.d.ts b/packages/docusaurus/src/deps.d.ts index 4cf9a6df98b9..e14603a3de88 100644 --- a/packages/docusaurus/src/deps.d.ts +++ b/packages/docusaurus/src/deps.d.ts @@ -38,15 +38,6 @@ declare module 'webpack/lib/HotModuleReplacementPlugin' { export default HotModuleReplacementPlugin; } -// TODO incompatible declaration file: https://github.com/unjs/webpackbar/pull/108 -declare module 'webpackbar' { - import webpack from 'webpack'; - - export default class WebpackBarPlugin extends webpack.ProgressPlugin { - constructor(options: {name: string; color?: string}); - } -} - // TODO incompatible declaration file declare module 'eta' { export const defaultConfig: object; diff --git a/packages/docusaurus/src/faster.ts b/packages/docusaurus/src/faster.ts index fcdf160f7a86..70f313a85c05 100644 --- a/packages/docusaurus/src/faster.ts +++ b/packages/docusaurus/src/faster.ts @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import type webpack from 'webpack'; import type {ConfigureWebpackUtils} from '@docusaurus/types'; import type {MinimizerOptions, CustomOptions} from 'terser-webpack-plugin'; @@ -23,6 +24,11 @@ async function ensureFaster() { } } +export async function importRspack(): Promise { + const faster = await ensureFaster(); + return faster.getRspack() as unknown as typeof webpack; +} + export async function importSwcJsLoaderFactory(): Promise< ConfigureWebpackUtils['getJSLoader'] > { diff --git a/packages/docusaurus/src/webpack/client.ts b/packages/docusaurus/src/webpack/client.ts index 4cebdbf0edc5..38233e81e571 100644 --- a/packages/docusaurus/src/webpack/client.ts +++ b/packages/docusaurus/src/webpack/client.ts @@ -7,8 +7,6 @@ import path from 'path'; import merge from 'webpack-merge'; -import WebpackBar from 'webpackbar'; -import webpack from 'webpack'; import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer'; import ReactLoadableSSRAddon from 'react-loadable-ssr-addon-v5-slorber'; import HtmlWebpackPlugin from 'html-webpack-plugin'; @@ -17,6 +15,7 @@ import ChunkAssetPlugin from './plugins/ChunkAssetPlugin'; import CleanWebpackPlugin from './plugins/CleanWebpackPlugin'; import ForceTerminatePlugin from './plugins/ForceTerminatePlugin'; import {createStaticDirectoriesCopyPlugin} from './plugins/StaticDirectoriesCopyPlugin'; +import {getProgressBarPlugin} from './currentBundler'; import type { ConfigureWebpackUtils, FasterConfig, @@ -45,6 +44,10 @@ async function createBaseClientConfig({ configureWebpackUtils, }); + const ProgressBarPlugin = await getProgressBarPlugin({ + currentBundler: configureWebpackUtils.currentBundler, + }); + return merge(baseConfig, { // Useless, disabled on purpose (errors on existing sites with no // browserslist config) @@ -56,12 +59,12 @@ async function createBaseClientConfig({ runtimeChunk: true, }, plugins: [ - new webpack.DefinePlugin({ + new configureWebpackUtils.currentBundler.instance.DefinePlugin({ 'process.env.HYDRATE_CLIENT_ENTRY': JSON.stringify(hydrate), }), new ChunkAssetPlugin(), // Show compilation progress bar and build time. - new WebpackBar({ + new ProgressBarPlugin({ name: 'Client', }), await createStaticDirectoriesCopyPlugin({ @@ -88,7 +91,7 @@ export async function createStartClientConfig({ }): Promise<{clientConfig: Configuration}> { const {siteConfig, headTags, preBodyTags, postBodyTags} = props; - const clientConfig: webpack.Configuration = merge( + const clientConfig = merge( await createBaseClientConfig({ props, minify, diff --git a/packages/docusaurus/src/webpack/currentBundler.ts b/packages/docusaurus/src/webpack/currentBundler.ts index d0089aeb05a0..98a020cced7e 100644 --- a/packages/docusaurus/src/webpack/currentBundler.ts +++ b/packages/docusaurus/src/webpack/currentBundler.ts @@ -6,9 +6,10 @@ */ import webpack from 'webpack'; +import WebpackBar from 'webpackbar'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; -import logger from '@docusaurus/logger'; +import {importRspack} from '../faster'; import type {CurrentBundler, DocusaurusConfig} from '@docusaurus/types'; // We inject a site config slice because the Rspack flag might change place @@ -31,10 +32,10 @@ export async function getCurrentBundler({ siteConfig: SiteConfigSlice; }): Promise { if (isRspack(siteConfig)) { - // TODO add support for Rspack - logger.error( - 'Rspack bundler is not supported yet, will use Webpack instead', - ); + return { + name: 'rspack', + instance: await importRspack(), + }; } return { name: 'webpack', @@ -48,7 +49,8 @@ export async function getCSSExtractPlugin({ currentBundler: CurrentBundler; }): Promise { if (currentBundler.name === 'rspack') { - throw new Error('Rspack bundler is not supported yet'); + // @ts-expect-error: this exists only in Rspack + return currentBundler.instance.CssExtractRspackPlugin; } return MiniCssExtractPlugin; } @@ -59,8 +61,28 @@ export async function getCopyPlugin({ currentBundler: CurrentBundler; }): Promise { if (currentBundler.name === 'rspack') { - throw new Error('Rspack bundler is not supported yet'); + // @ts-expect-error: this exists only in Rspack + return currentBundler.instance.CopyRspackPlugin; } - // https://github.com/webpack-contrib/copy-webpack-plugin return CopyWebpackPlugin; } + +export async function getProgressBarPlugin({ + currentBundler, +}: { + currentBundler: CurrentBundler; +}): Promise { + if (currentBundler.name === 'rspack') { + class CustomRspackProgressPlugin extends currentBundler.instance + .ProgressPlugin { + constructor({name}: {name: string}) { + // Unfortunately the rspack.ProgressPlugin does not have a name option + // See https://rspack.dev/plugins/webpack/progress-plugin + // @ts-expect-error: adapt Rspack ProgressPlugin constructor + super({prefix: name}); + } + } + return CustomRspackProgressPlugin as typeof WebpackBar; + } + return WebpackBar; +} diff --git a/packages/docusaurus/src/webpack/server.ts b/packages/docusaurus/src/webpack/server.ts index e8df2b485c23..7704f21aa9ee 100644 --- a/packages/docusaurus/src/webpack/server.ts +++ b/packages/docusaurus/src/webpack/server.ts @@ -8,8 +8,8 @@ import path from 'path'; import merge from 'webpack-merge'; import {NODE_MAJOR_VERSION, NODE_MINOR_VERSION} from '@docusaurus/utils'; -import WebpackBar from 'webpackbar'; import {createBaseConfig} from './base'; +import {getProgressBarPlugin} from './currentBundler'; import type {ConfigureWebpackUtils, Props} from '@docusaurus/types'; import type {Configuration} from 'webpack'; @@ -28,6 +28,10 @@ export default async function createServerConfig({ configureWebpackUtils, }); + const ProgressBarPlugin = await getProgressBarPlugin({ + currentBundler: configureWebpackUtils.currentBundler, + }); + const outputFilename = 'server.bundle.js'; const outputDir = path.join(props.outDir, '__server'); const serverBundlePath = path.join(outputDir, outputFilename); @@ -44,7 +48,7 @@ export default async function createServerConfig({ }, plugins: [ // Show compilation progress bar. - new WebpackBar({ + new ProgressBarPlugin({ name: 'Server', color: 'yellow', }), diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index 8711be52c544..3c6f83170214 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -10,10 +10,11 @@ import path from 'path'; import crypto from 'crypto'; import logger from '@docusaurus/logger'; import {BABEL_CONFIG_FILE_NAME} from '@docusaurus/utils'; -import webpack, {type Configuration} from 'webpack'; import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages'; import {importSwcJsLoaderFactory} from '../faster'; import {getCSSExtractPlugin} from './currentBundler'; +import type webpack from 'webpack'; +import type {Configuration} from 'webpack'; import type { ConfigureWebpackUtils, CurrentBundler, @@ -202,9 +203,15 @@ declare global { } } -export function compile(config: Configuration[]): Promise { +export function compile({ + configs, + currentBundler, +}: { + configs: Configuration[]; + currentBundler: CurrentBundler; +}): Promise { return new Promise((resolve, reject) => { - const compiler = webpack(config); + const compiler = currentBundler.instance(configs); compiler.run((err, stats) => { if (err) { logger.error(err.stack ?? err); diff --git a/yarn.lock b/yarn.lock index 28d3c7808e51..eccb4ef7a57b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2152,6 +2152,34 @@ dependencies: "@types/mdx" "^2.0.0" +"@module-federation/runtime-tools@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/runtime-tools/-/runtime-tools-0.5.1.tgz#1b1f93837159a6bf0c0ba78730d589a5a8f74aa3" + integrity sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg== + dependencies: + "@module-federation/runtime" "0.5.1" + "@module-federation/webpack-bundler-runtime" "0.5.1" + +"@module-federation/runtime@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/runtime/-/runtime-0.5.1.tgz#b548a75e2068952ff66ad717cbf73fc921edd5d7" + integrity sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ== + dependencies: + "@module-federation/sdk" "0.5.1" + +"@module-federation/sdk@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/sdk/-/sdk-0.5.1.tgz#6c0a4053c23fa84db7aae7e4736496c541de7191" + integrity sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA== + +"@module-federation/webpack-bundler-runtime@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.5.1.tgz#ef626af0d57e3568c474d66d7d3797366e09cafd" + integrity sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA== + dependencies: + "@module-federation/runtime" "0.5.1" + "@module-federation/sdk" "0.5.1" + "@netlify/functions@^1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@netlify/functions/-/functions-1.6.0.tgz#c373423e6fef0e6f7422ac0345e8bbf2cb692366" @@ -2792,6 +2820,81 @@ fs-extra "^11.1.1" lodash "^4.17.21" +"@rspack/binding-darwin-arm64@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.5.tgz#a3c48b6d067bfb7d48e53ce7dd97162a29a5cc0f" + integrity sha512-pEHj4AOluOa7FaR1DMACPUUZKO3qZI4/66xaTqk0BbclvMT7eheQAWtkmjdE9WJgeZ389TrwZeaMzzPdHhK/6Q== + +"@rspack/binding-darwin-x64@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.5.tgz#55289924ce792a45f0d495b0d3f179217fa2c2fe" + integrity sha512-xS5EDD9l3MHL54bnmxsndm61P9l3l7ZNuLSuPl2MbYJzDqPdnXhTdkIjdcDOLH2daFm8gfB634wa5knZhPGLOw== + +"@rspack/binding-linux-arm64-gnu@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.5.tgz#d7db02a0b4878e1fe49dd8dcd5735c5ee9883846" + integrity sha512-svPOFlem7s6T33tX8a28uD5Ngc7bdML96ioiH7Fhi0J/at+WAthor4GeUNwkwuzBQI/Nc9XCgiYPcE0pzP7c6w== + +"@rspack/binding-linux-arm64-musl@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.5.tgz#c30baaf36b676265ca13a52ec182d40a662b5a0a" + integrity sha512-cysqogEUNc0TgzzXcK9bkv12eoCjqhLzOvGXQU1zSEU9Hov7tuzMDl3Z6R3A7NgOCmWu84/wOnTrkSOI28caew== + +"@rspack/binding-linux-x64-gnu@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.5.tgz#7b4e427395c4e968a27f83dc2e78bc9e6beb76fd" + integrity sha512-qIEMsWOzTKpVm0Sg553gKkua49Kd/sElLD1rZcXjjxjAsD97uq8AiNncArMfYdDKgkKbtwtW/Fb3uVuafTLnZg== + +"@rspack/binding-linux-x64-musl@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.5.tgz#b3722faa8eb4744f840d8398a1939ec3ca649b0e" + integrity sha512-yulltMSQN3aBt3NMURYTmJcpAJBi4eEJ4i9qF0INE8f0885sJpI0j35/31POkCghG1ZOSZkYALFrheKKP9e8pg== + +"@rspack/binding-win32-arm64-msvc@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.5.tgz#2f4452a331fccaf36f188d5c2add4d80eb5e1c28" + integrity sha512-5oF/qN6TnUj28UAdaOgSIWKq7HG5QgI4p37zvQBBTXZHhrwN2kE6H+TaofWnSqWJynwmGIxJIx8bGo3lDfFbfA== + +"@rspack/binding-win32-ia32-msvc@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.5.tgz#bebf47374d5ba7cbf4e7482e514c55229a8f0a95" + integrity sha512-y16IPjd/z6L7+r6RXLu7J/jlZDUenSnJDqo10HnnxtLjOJ+vna+pljI8sHcwu1ao0c3J3uMvbkF34dTiev7Opg== + +"@rspack/binding-win32-x64-msvc@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.5.tgz#6ba95074e7619d8577f38b8e9b1f03a62ea3618c" + integrity sha512-PSBTbDSgT+ClYvyQTDtWBi/bxXW/xJmVjg9NOWe8KAEl5WNU+pToiCBLLPCGDSa+K7/zr2TDb6QakG/qYItPZw== + +"@rspack/binding@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.5.tgz#d1bd7568354de9ed0570653e52b9946b1b6a49f9" + integrity sha512-SnVrzRWeKSosJ0/1e5taAeqJ1ISst6NAE1N8YK4ZdUEVWmE26tC2V/yTvZHSsqatc/0Cf+A18IZJx0q6H/DlRw== + optionalDependencies: + "@rspack/binding-darwin-arm64" "1.0.5" + "@rspack/binding-darwin-x64" "1.0.5" + "@rspack/binding-linux-arm64-gnu" "1.0.5" + "@rspack/binding-linux-arm64-musl" "1.0.5" + "@rspack/binding-linux-x64-gnu" "1.0.5" + "@rspack/binding-linux-x64-musl" "1.0.5" + "@rspack/binding-win32-arm64-msvc" "1.0.5" + "@rspack/binding-win32-ia32-msvc" "1.0.5" + "@rspack/binding-win32-x64-msvc" "1.0.5" + +"@rspack/core@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.5.tgz#52527bda25901bd81ef2b7bc4e92e2fa2a248161" + integrity sha512-UlydS2VupZ6yBx3jCqCHpeEUQNWCrBkTQhPIezK0eCAk13i745byjqXX4tcfN6jR5Kjh/1CIb8r07k9DgGON1w== + dependencies: + "@module-federation/runtime-tools" "0.5.1" + "@rspack/binding" "1.0.5" + "@rspack/lite-tapable" "1.0.0" + caniuse-lite "^1.0.30001616" + +"@rspack/lite-tapable@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@rspack/lite-tapable/-/lite-tapable-1.0.0.tgz#160883693462f164d0e6ede22f32614673ef6429" + integrity sha512-7MZf4lburSUZoEenwazwUDKHhqyfnLCGnQ/tKcUtztfmVzfjZfRn/EaiT0AKkYGnL2U8AGsw89oUeVyvaOLVCw== + "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" @@ -4357,7 +4460,7 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: +ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -5160,10 +5263,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001599, caniuse-lite@^1.0.30001646: - version "1.0.30001658" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001658.tgz#b5f7be8ac748a049ab06aa1cf7a1408d83f074ec" - integrity sha512-N2YVqWbJELVdrnsW5p+apoQyYt51aBMSsBZki1XZEfeBCexcM/sf4xiAHcXQBkuOwJBXtWF7aW1sYX6tKebPHw== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001599, caniuse-lite@^1.0.30001616, caniuse-lite@^1.0.30001646: + version "1.0.30001660" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz#31218de3463fabb44d0b7607b652e56edf2e2355" + integrity sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg== ccount@^2.0.0: version "2.0.1" @@ -5715,10 +5818,10 @@ connect@3.7.0: parseurl "~1.3.3" utils-merge "1.0.1" -consola@^2.15.3: - version "2.15.3" - resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550" - integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== +consola@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" + integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== console-control-strings@^1.1.0: version "1.1.0" @@ -7920,7 +8023,7 @@ feed@^4.2.2: dependencies: xml-js "^1.6.11" -figures@3.2.0, figures@^3.0.0: +figures@3.2.0, figures@^3.0.0, figures@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== @@ -11063,6 +11166,13 @@ markdown-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/markdown-extensions/-/markdown-extensions-2.0.0.tgz#34bebc83e9938cae16e0e017e4a9814a8330d3c4" integrity sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q== +markdown-table@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-2.0.0.tgz#194a90ced26d31fe753d8b9434430214c011865b" + integrity sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A== + dependencies: + repeat-string "^1.0.0" + markdown-table@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.3.tgz#e6331d30e493127e031dd385488b5bd326e4a6bd" @@ -14754,7 +14864,7 @@ renderkid@^3.0.0: lodash "^4.17.21" strip-ansi "^6.0.1" -repeat-string@^1.6.1: +repeat-string@^1.0.0, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== @@ -15686,10 +15796,10 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -std-env@^3.0.1: - version "3.3.3" - resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.3.3.tgz#a54f06eb245fdcfef53d56f3c0251f1d5c3d01fe" - integrity sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg== +std-env@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== streamx@^2.15.0: version "2.15.0" @@ -17223,15 +17333,19 @@ webpack@^5, webpack@^5.88.1: watchpack "^2.4.1" webpack-sources "^3.2.3" -webpackbar@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/webpackbar/-/webpackbar-5.0.2.tgz#d3dd466211c73852741dfc842b7556dcbc2b0570" - integrity sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ== +webpackbar@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/webpackbar/-/webpackbar-6.0.1.tgz#5ef57d3bf7ced8b19025477bc7496ea9d502076b" + integrity sha512-TnErZpmuKdwWBdMoexjio3KKX6ZtoKHRVvLIU0A47R0VVBDtx3ZyOJDktgYixhoJokZTYTt1Z37OkO9pnGJa9Q== dependencies: - chalk "^4.1.0" - consola "^2.15.3" + ansi-escapes "^4.3.2" + chalk "^4.1.2" + consola "^3.2.3" + figures "^3.2.0" + markdown-table "^2.0.0" pretty-time "^1.1.0" - std-env "^3.0.1" + std-env "^3.7.0" + wrap-ansi "^7.0.0" websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" From 5e3fe5162577908aa00af931d069ea70669bc237 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 13:36:12 +0200 Subject: [PATCH 21/56] add todo --- packages/docusaurus/src/webpack/currentBundler.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docusaurus/src/webpack/currentBundler.ts b/packages/docusaurus/src/webpack/currentBundler.ts index 98a020cced7e..af2dfdf7cce1 100644 --- a/packages/docusaurus/src/webpack/currentBundler.ts +++ b/packages/docusaurus/src/webpack/currentBundler.ts @@ -76,6 +76,7 @@ export async function getProgressBarPlugin({ class CustomRspackProgressPlugin extends currentBundler.instance .ProgressPlugin { constructor({name}: {name: string}) { + // TODO add support for color // Unfortunately the rspack.ProgressPlugin does not have a name option // See https://rspack.dev/plugins/webpack/progress-plugin // @ts-expect-error: adapt Rspack ProgressPlugin constructor From 68b4bf6e6a0250735e36984505692b50fa4dd2e5 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 13:41:10 +0200 Subject: [PATCH 22/56] add todo + disable gca --- packages/docusaurus/src/client/docusaurus.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus/src/client/docusaurus.ts b/packages/docusaurus/src/client/docusaurus.ts index da0a35133e96..7e4ccda3dfc6 100644 --- a/packages/docusaurus/src/client/docusaurus.ts +++ b/packages/docusaurus/src/client/docusaurus.ts @@ -17,7 +17,7 @@ const loaded = new Set(); declare global { // eslint-disable-next-line camelcase, no-underscore-dangle - const __webpack_require__: {gca: (name: string) => string}; + const __webpack_require__: {gca?: (name: string) => string}; interface Navigator { connection?: {effectiveType: string; saveData: boolean}; } @@ -65,6 +65,11 @@ const prefetch: Docusaurus['prefetch'] = ( // Prefetch all webpack chunk assets file needed. return Promise.all( chunkNamesNeeded.map((chunkName) => { + // TODO + if (!__webpack_require__.gca) { + console.warn('Rspack bug to fix: unable to prefetch'); + return Promise.resolve(); + } // "__webpack_require__.gca" is injected by ChunkAssetPlugin. Pass it // the name of the chunk you want to load and it will return its URL. // eslint-disable-next-line camelcase From fc08c5d586ea024909541a54c85ac58f2a44ef79 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 14:57:23 +0200 Subject: [PATCH 23/56] make it work --- packages/docusaurus/src/webpack/currentBundler.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docusaurus/src/webpack/currentBundler.ts b/packages/docusaurus/src/webpack/currentBundler.ts index af2dfdf7cce1..b9a6461fa0b8 100644 --- a/packages/docusaurus/src/webpack/currentBundler.ts +++ b/packages/docusaurus/src/webpack/currentBundler.ts @@ -85,5 +85,6 @@ export async function getProgressBarPlugin({ } return CustomRspackProgressPlugin as typeof WebpackBar; } + return WebpackBar; } From e8272c456e616a65426087d2d6e1e3df4f41010f Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 17:46:33 +0200 Subject: [PATCH 24/56] build perf, log current bundler name --- packages/docusaurus/src/commands/build.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/docusaurus/src/commands/build.ts b/packages/docusaurus/src/commands/build.ts index 61bdd947eeab..3f13238660fd 100644 --- a/packages/docusaurus/src/commands/build.ts +++ b/packages/docusaurus/src/commands/build.ts @@ -174,7 +174,7 @@ async function buildLocale({ // We can build the 2 configs in parallel const [{clientConfig, clientManifestPath}, {serverConfig, serverBundlePath}] = - await PerfLogger.async('Creating webpack configs', () => + await PerfLogger.async('Creating bundler configs', () => Promise.all([ getBuildClientConfig({ props, @@ -189,14 +189,17 @@ async function buildLocale({ ); // Run bundler to build the client bundle and server bundle (used for SSG) - await PerfLogger.async('Bundling with Webpack', () => { - return compile({ - configs: - // For hash router we don't do SSG and can skip the server bundle - router === 'hash' ? [clientConfig] : [clientConfig, serverConfig], - currentBundler: configureWebpackUtils.currentBundler, - }); - }); + await PerfLogger.async( + `Bundling with ${configureWebpackUtils.currentBundler.name}`, + () => { + return compile({ + configs: + // For hash router we don't do SSG and can skip the server bundle + router === 'hash' ? [clientConfig] : [clientConfig, serverConfig], + currentBundler: configureWebpackUtils.currentBundler, + }); + }, + ); const {collectedData} = await PerfLogger.async('SSG', () => executeSSG({ From 0cee6bfb4856be2d003220b1856b144df9011d58 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 17:59:47 +0200 Subject: [PATCH 25/56] add RspackJsLoaderFactory --- packages/docusaurus/src/webpack/base.ts | 74 +-------------------- packages/docusaurus/src/webpack/utils.ts | 83 +++++++++++++++++++++++- 2 files changed, 83 insertions(+), 74 deletions(-) diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index 58a27837beef..4ca08a6d2977 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -11,6 +11,7 @@ import {md5Hash, getFileLoaderUtils} from '@docusaurus/utils'; import {getMinimizers} from './minification'; import {loadThemeAliases, loadDocusaurusAliases} from './aliases'; import {getCSSExtractPlugin} from './currentBundler'; +import {getCustomBabelConfigFilePath} from './utils'; import type {Configuration} from 'webpack'; import type { ConfigureWebpackUtils, @@ -87,8 +88,6 @@ export async function createBaseConfig({ const themeAliases = await loadThemeAliases({siteDir, plugins}); - // const createJsLoader = await createJsLoaderFactory({siteConfig}); - const CSSExtractPlugin = await getCSSExtractPlugin({ currentBundler: configureWebpackUtils.currentBundler, }); @@ -217,83 +216,16 @@ export async function createBaseConfig({ fileLoaderUtils.rules.svg(), fileLoaderUtils.rules.otherAssets(), - /* { test: /\.[jt]sx?$/i, exclude: excludeJS, - use: [ - // @ts-expect-error: TODO fix this - getCustomizableJSLoader(siteConfig.webpack?.jsLoader)({ - createJsLoader({ + oneOf: [ + configureWebpackUtils.getJSLoader({ isServer, babelOptions: await getCustomBabelConfigFilePath(siteDir), }), ], }, - */ - - // TODO do we really need 3 different loaders for js, ts, tsx? - { - test: /\.jsx?$/, - exclude: excludeJS, - use: { - loader: 'builtin:swc-loader', - options: { - jsc: { - parser: { - syntax: 'ecmascript', - jsx: true, - }, - transform: { - react: { - runtime: 'automatic', - }, - }, - }, - }, - }, - }, - - { - test: /\.tsx$/, - exclude: excludeJS, - use: { - loader: 'builtin:swc-loader', - options: { - jsc: { - parser: { - syntax: 'typescript', - tsx: true, - }, - transform: { - react: { - runtime: 'automatic', - }, - }, - }, - }, - }, - }, - { - test: /\.ts$/, - exclude: excludeJS, - use: { - loader: 'builtin:swc-loader', - options: { - jsc: { - parser: { - syntax: 'typescript', - tsx: false, - }, - transform: { - react: { - runtime: 'automatic', - }, - }, - }, - }, - }, - }, { test: CSS_REGEX, diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index 3c6f83170214..462100e10b79 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -12,7 +12,7 @@ import logger from '@docusaurus/logger'; import {BABEL_CONFIG_FILE_NAME} from '@docusaurus/utils'; import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages'; import {importSwcJsLoaderFactory} from '../faster'; -import {getCSSExtractPlugin} from './currentBundler'; +import {getCSSExtractPlugin, getCurrentBundler} from './currentBundler'; import type webpack from 'webpack'; import type {Configuration} from 'webpack'; import type { @@ -94,7 +94,7 @@ export async function createStyleLoadersFactory({ // TODO apart for configurePostCss(), do we really need this loader? // Note: using postcss here looks inefficient/duplicate - // But in practice, it's not a big deal because css-loader also uses postcss + // In practice, it's not a big deal because css-loader also uses postcss // and is able to reuse the parsed AST from postcss-loader // See https://github.com/webpack-contrib/css-loader/blob/master/src/index.js#L159 { @@ -162,6 +162,72 @@ const BabelJsLoaderFactory: ConfigureWebpackUtils['getJSLoader'] = ({ }; }; +const RspackJsLoaderFactory: ConfigureWebpackUtils['getJSLoader'] = () => { + return { + test: /\.[jt]sx?$/i, + oneOf: [ + // TODO do we really need 3 different loaders for js, ts, tsx? + { + test: /\.jsx?$/, + use: { + loader: 'builtin:swc-loader', + options: { + jsc: { + parser: { + syntax: 'ecmascript', + jsx: true, + }, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, + }, + }, + }, + { + test: /\.tsx$/, + use: { + loader: 'builtin:swc-loader', + options: { + jsc: { + parser: { + syntax: 'typescript', + tsx: true, + }, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, + }, + }, + }, + { + test: /\.ts$/, + use: { + loader: 'builtin:swc-loader', + options: { + jsc: { + parser: { + syntax: 'typescript', + tsx: false, + }, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, + }, + }, + }, + ], + }; +}; + // Confusing: function that creates a function that creates actual js loaders // This is done on purpose because the js loader factory is a public API // It is injected in configureWebpack plugin lifecycle for plugin authors @@ -170,11 +236,22 @@ export async function createJsLoaderFactory({ }: { siteConfig: { webpack?: DocusaurusConfig['webpack']; - future?: { + future: { experimental_faster: DocusaurusConfig['future']['experimental_faster']; }; }; }): Promise { + const currentBundler = await getCurrentBundler({siteConfig}); + const isSWCLoader = siteConfig.future.experimental_faster.swcJsLoader; + + if (currentBundler.name === 'rspack') { + if (!isSWCLoader) { + throw new Error( + 'When using Rspack bundler, it is required to enable swcJsLoader too', + ); + } + return RspackJsLoaderFactory; + } const jsLoader = siteConfig.webpack?.jsLoader ?? 'babel'; if ( jsLoader instanceof Function && From 6261ab5289bfa6c57fe080636fffda451763471e Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 18:40:56 +0200 Subject: [PATCH 26/56] simplify Rspack js loader --- packages/docusaurus/src/webpack/base.ts | 10 ++-- packages/docusaurus/src/webpack/utils.ts | 68 ++++-------------------- 2 files changed, 15 insertions(+), 63 deletions(-) diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index 4ca08a6d2977..b9a5e1edf56c 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -219,12 +219,10 @@ export async function createBaseConfig({ { test: /\.[jt]sx?$/i, exclude: excludeJS, - oneOf: [ - configureWebpackUtils.getJSLoader({ - isServer, - babelOptions: await getCustomBabelConfigFilePath(siteDir), - }), - ], + use: configureWebpackUtils.getJSLoader({ + isServer, + babelOptions: await getCustomBabelConfigFilePath(siteDir), + }), }, { diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index 462100e10b79..a42856f8c2d4 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -164,67 +164,21 @@ const BabelJsLoaderFactory: ConfigureWebpackUtils['getJSLoader'] = ({ const RspackJsLoaderFactory: ConfigureWebpackUtils['getJSLoader'] = () => { return { - test: /\.[jt]sx?$/i, - oneOf: [ - // TODO do we really need 3 different loaders for js, ts, tsx? - { - test: /\.jsx?$/, - use: { - loader: 'builtin:swc-loader', - options: { - jsc: { - parser: { - syntax: 'ecmascript', - jsx: true, - }, - transform: { - react: { - runtime: 'automatic', - }, - }, - }, - }, + loader: 'builtin:swc-loader', + options: { + jsc: { + parser: { + syntax: 'typescript', + jsx: true, + tsx: true, }, - }, - { - test: /\.tsx$/, - use: { - loader: 'builtin:swc-loader', - options: { - jsc: { - parser: { - syntax: 'typescript', - tsx: true, - }, - transform: { - react: { - runtime: 'automatic', - }, - }, - }, - }, - }, - }, - { - test: /\.ts$/, - use: { - loader: 'builtin:swc-loader', - options: { - jsc: { - parser: { - syntax: 'typescript', - tsx: false, - }, - transform: { - react: { - runtime: 'automatic', - }, - }, - }, + transform: { + react: { + runtime: 'automatic', }, }, }, - ], + }, }; }; From bf2ad515d4d5b856601b611b965332c0694f0a5e Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 18:49:22 +0200 Subject: [PATCH 27/56] simplify Rspack js loader --- packages/docusaurus/src/webpack/utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index a42856f8c2d4..daab226cae64 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -169,7 +169,6 @@ const RspackJsLoaderFactory: ConfigureWebpackUtils['getJSLoader'] = () => { jsc: { parser: { syntax: 'typescript', - jsx: true, tsx: true, }, transform: { From a06b194a1409aeb9aa3dc1b697348e937232df95 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 19:02:18 +0200 Subject: [PATCH 28/56] fix lint error + wire rspack minimizer properly --- .../docusaurus-theme-classic/package.json | 1 + .../docusaurus-theme-classic/src/index.ts | 17 ++++++---- .../docusaurus/src/webpack/minification.ts | 34 +++++++++++++------ 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/packages/docusaurus-theme-classic/package.json b/packages/docusaurus-theme-classic/package.json index ba3877ddc173..062e9a4d3055 100644 --- a/packages/docusaurus-theme-classic/package.json +++ b/packages/docusaurus-theme-classic/package.json @@ -21,6 +21,7 @@ }, "dependencies": { "@docusaurus/core": "3.5.2", + "@docusaurus/logger": "3.5.2", "@docusaurus/mdx-loader": "3.5.2", "@docusaurus/module-type-aliases": "3.5.2", "@docusaurus/plugin-content-blog": "3.5.2", diff --git a/packages/docusaurus-theme-classic/src/index.ts b/packages/docusaurus-theme-classic/src/index.ts index b37e15be150a..d8bf84d033a7 100644 --- a/packages/docusaurus-theme-classic/src/index.ts +++ b/packages/docusaurus-theme-classic/src/index.ts @@ -8,6 +8,7 @@ import path from 'path'; import {createRequire} from 'module'; import rtlcss from 'rtlcss'; +import logger from '@docusaurus/logger'; import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; import {getTranslationFiles, translateThemeConfig} from './translations'; import { @@ -24,11 +25,9 @@ import type webpack from 'webpack'; const requireFromDocusaurusCore = createRequire( require.resolve('@docusaurus/core/package.json'), ); -/* const ContextReplacementPlugin = requireFromDocusaurusCore( 'webpack/lib/ContextReplacementPlugin', ) as typeof webpack.ContextReplacementPlugin; - */ function getInfimaCSSFile(direction: string) { return `infima/dist/css/default/default${ @@ -91,7 +90,16 @@ export default function themeClassic( return modules; }, - configureWebpack() { + configureWebpack(config, __isServer, {currentBundler}) { + if (currentBundler.name === 'rspack') { + // ContextReplacementPlugin is not supported yet, tracked here https://github.com/web-infra-dev/rspack/issues/7474 + // TODO fix this + logger.warn( + 'Rspack does not support ContextReplacementPlugin, and Prism syntax highlighter will not be optimized', + ); + return config; + } + const prismLanguages = additionalLanguages .map((lang) => `prism-${lang}`) .join('|'); @@ -101,13 +109,10 @@ export default function themeClassic( // This allows better optimization by only bundling those components // that the user actually needs, because the modules are dynamically // required and can't be known during compile time. - /* - ContextReplacementPlugin is not supported yet, tracked here https://github.com/web-infra-dev/rspack/issues/7474 new ContextReplacementPlugin( /prismjs[\\/]components$/, new RegExp(`^./(${prismLanguages})$`), ), - */ ], }; }, diff --git a/packages/docusaurus/src/webpack/minification.ts b/packages/docusaurus/src/webpack/minification.ts index 4c1d39094454..5ddc605097f0 100644 --- a/packages/docusaurus/src/webpack/minification.ts +++ b/packages/docusaurus/src/webpack/minification.ts @@ -7,13 +7,14 @@ import TerserPlugin from 'terser-webpack-plugin'; import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'; -import webpack, {type WebpackPluginInstance} from 'webpack'; +import {type WebpackPluginInstance} from 'webpack'; import {importSwcJsMinifierOptions} from '../faster'; import type {CustomOptions, CssNanoOptions} from 'css-minimizer-webpack-plugin'; -import type {FasterConfig} from '@docusaurus/types'; +import type {CurrentBundler, FasterConfig} from '@docusaurus/types'; export type MinimizersConfig = { faster: Pick; + currentBundler: CurrentBundler; }; // See https://github.com/webpack-contrib/terser-webpack-plugin#parallel @@ -111,16 +112,27 @@ function getCssMinimizer(): WebpackPluginInstance { } } -export async function getMinimizers( +export async function getWebpackMinimizers( params: MinimizersConfig, ): Promise { - // TODO wire option properly - if (params) { - return [ - // new rspack.SwcJsMinimizerRspackPlugin(), - // new rspack.LightningCssMinimizerRspackPlugin(), - ]; - } - return Promise.all([getJsMinimizer(params), getCssMinimizer()]); } + +export async function getRspackMinimizers({ + currentBundler, +}: MinimizersConfig): Promise { + return [ + // @ts-expect-error: Rspack has this built-in + new currentBundler.instance.SwcJsMinimizerRspackPlugin(), + // @ts-expect-error: Rspack has this built-in + new currentBundler.instance.LightningCssMinimizerRspackPlugin(), + ]; +} + +export async function getMinimizers( + params: MinimizersConfig, +): Promise { + return params.currentBundler.name === 'rspack' + ? getRspackMinimizers(params) + : getWebpackMinimizers(params); +} From c8dc79519453f8d14aecff48535b7cfa1bbfa26b Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 19:08:33 +0200 Subject: [PATCH 29/56] fix minimizer --- packages/docusaurus/src/webpack/base.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index b9a5e1edf56c..f98a3b83a20b 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -77,6 +77,7 @@ export async function createBaseConfig({ siteMetadata, plugins, } = props; + const {currentBundler} = configureWebpackUtils; const totalPages = routesPaths.length; const isProd = process.env.NODE_ENV === 'production'; const minimizeEnabled = minify && isProd; @@ -89,7 +90,7 @@ export async function createBaseConfig({ const themeAliases = await loadThemeAliases({siteDir, plugins}); const CSSExtractPlugin = await getCSSExtractPlugin({ - currentBundler: configureWebpackUtils.currentBundler, + currentBundler, }); return { @@ -178,7 +179,9 @@ export async function createBaseConfig({ // Only minimize client bundle in production because server bundle is only // used for static site generation minimize: minimizeEnabled, - minimizer: minimizeEnabled ? await getMinimizers({faster}) : undefined, + minimizer: minimizeEnabled + ? await getMinimizers({faster, currentBundler}) + : undefined, splitChunks: isServer ? false : { From 3b6987dfc239d3348d5f1e56f8a04cc1c1dfd2c0 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 19:11:31 +0200 Subject: [PATCH 30/56] fix theme configureWebpack --- packages/docusaurus-theme-classic/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/index.ts b/packages/docusaurus-theme-classic/src/index.ts index d8bf84d033a7..4472639b731b 100644 --- a/packages/docusaurus-theme-classic/src/index.ts +++ b/packages/docusaurus-theme-classic/src/index.ts @@ -90,14 +90,16 @@ export default function themeClassic( return modules; }, - configureWebpack(config, __isServer, {currentBundler}) { + configureWebpack(config, isServer, {currentBundler}) { if (currentBundler.name === 'rspack') { // ContextReplacementPlugin is not supported yet, tracked here https://github.com/web-infra-dev/rspack/issues/7474 // TODO fix this logger.warn( 'Rspack does not support ContextReplacementPlugin, and Prism syntax highlighter will not be optimized', ); - return config; + + // TODO why can't we just return config? + return {}; } const prismLanguages = additionalLanguages From 200ced7c964e66999dc0fe77aa3de381e0452ab8 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 19:15:07 +0200 Subject: [PATCH 31/56] fix Prism bundle size increase --- .../src/theme/prism-include-languages.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts b/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts index a91d36bc3260..5f8ebee2038b 100644 --- a/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts +++ b/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts @@ -30,8 +30,10 @@ export default function prismIncludeLanguages( // eslint-disable-next-line global-require require('prismjs/components/prism-markup-templating.js'); } - // eslint-disable-next-line global-require, import/no-dynamic-require - require(`prismjs/components/prism-${lang}`); + + // TODO fix this for Rspack + + // require(`prismjs/components/prism-${lang}`); }); delete (globalThis as Optional).Prism; From b4469fe1e666c46fe2c381923a9a88be2dcc4900 Mon Sep 17 00:00:00 2001 From: slorber Date: Fri, 13 Sep 2024 17:19:56 +0000 Subject: [PATCH 32/56] refactor: apply lint autofix --- .../src/theme/prism-include-languages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts b/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts index 5f8ebee2038b..d7da9196fdf2 100644 --- a/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts +++ b/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts @@ -32,7 +32,7 @@ export default function prismIncludeLanguages( } // TODO fix this for Rspack - + // require(`prismjs/components/prism-${lang}`); }); From 0739fce229c16abeb0586721b3fa7a8fcca5ff3a Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Sep 2024 19:24:44 +0200 Subject: [PATCH 33/56] empty From 5de89ab9675b59b93b245266c08756b6a04b7cb8 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Sep 2024 12:11:23 +0200 Subject: [PATCH 34/56] handle merge conflicts --- .../docusaurus-bundler/src/currentBundler.ts | 2 +- .../src/loaders/jsLoader.ts | 33 +- yarn.lock | 329 +++++++++++------- 3 files changed, 241 insertions(+), 123 deletions(-) diff --git a/packages/docusaurus-bundler/src/currentBundler.ts b/packages/docusaurus-bundler/src/currentBundler.ts index b9a6461fa0b8..115828959eba 100644 --- a/packages/docusaurus-bundler/src/currentBundler.ts +++ b/packages/docusaurus-bundler/src/currentBundler.ts @@ -9,7 +9,7 @@ import webpack from 'webpack'; import WebpackBar from 'webpackbar'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; -import {importRspack} from '../faster'; +import {importRspack} from './importFaster'; import type {CurrentBundler, DocusaurusConfig} from '@docusaurus/types'; // We inject a site config slice because the Rspack flag might change place diff --git a/packages/docusaurus-bundler/src/loaders/jsLoader.ts b/packages/docusaurus-bundler/src/loaders/jsLoader.ts index 64c2c9ced976..1714558dbeb4 100644 --- a/packages/docusaurus-bundler/src/loaders/jsLoader.ts +++ b/packages/docusaurus-bundler/src/loaders/jsLoader.ts @@ -7,6 +7,7 @@ import {getBabelOptions} from '@docusaurus/babel'; import {importSwcJsLoaderFactory} from '../importFaster'; +import {getCurrentBundler} from '../currentBundler'; import type {ConfigureWebpackUtils, DocusaurusConfig} from '@docusaurus/types'; const BabelJsLoaderFactory: ConfigureWebpackUtils['getJSLoader'] = ({ @@ -19,6 +20,25 @@ const BabelJsLoaderFactory: ConfigureWebpackUtils['getJSLoader'] = ({ }; }; +const RspackJsLoaderFactory: ConfigureWebpackUtils['getJSLoader'] = () => { + return { + loader: 'builtin:swc-loader', + options: { + jsc: { + parser: { + syntax: 'typescript', + tsx: true, + }, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, + }, + }; +}; + // Confusing: function that creates a function that creates actual js loaders // This is done on purpose because the js loader factory is a public API // It is injected in configureWebpack plugin lifecycle for plugin authors @@ -27,11 +47,22 @@ export async function createJsLoaderFactory({ }: { siteConfig: { webpack?: DocusaurusConfig['webpack']; - future?: { + future: { experimental_faster: DocusaurusConfig['future']['experimental_faster']; }; }; }): Promise { + const currentBundler = await getCurrentBundler({siteConfig}); + const isSWCLoader = siteConfig.future.experimental_faster.swcJsLoader; + + if (currentBundler.name === 'rspack') { + if (!isSWCLoader) { + throw new Error( + 'When using Rspack bundler, it is required to enable swcJsLoader too', + ); + } + return RspackJsLoaderFactory; + } const jsLoader = siteConfig.webpack?.jsLoader ?? 'babel'; if ( jsLoader instanceof Function && diff --git a/yarn.lock b/yarn.lock index 08b0a1ef68d3..3bb5a0370afb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2222,6 +2222,34 @@ dependencies: langium "3.0.0" +"@module-federation/runtime-tools@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/runtime-tools/-/runtime-tools-0.5.1.tgz#1b1f93837159a6bf0c0ba78730d589a5a8f74aa3" + integrity sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg== + dependencies: + "@module-federation/runtime" "0.5.1" + "@module-federation/webpack-bundler-runtime" "0.5.1" + +"@module-federation/runtime@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/runtime/-/runtime-0.5.1.tgz#b548a75e2068952ff66ad717cbf73fc921edd5d7" + integrity sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ== + dependencies: + "@module-federation/sdk" "0.5.1" + +"@module-federation/sdk@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/sdk/-/sdk-0.5.1.tgz#6c0a4053c23fa84db7aae7e4736496c541de7191" + integrity sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA== + +"@module-federation/webpack-bundler-runtime@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.5.1.tgz#ef626af0d57e3568c474d66d7d3797366e09cafd" + integrity sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA== + dependencies: + "@module-federation/runtime" "0.5.1" + "@module-federation/sdk" "0.5.1" + "@netlify/functions@^1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@netlify/functions/-/functions-1.6.0.tgz#c373423e6fef0e6f7422ac0345e8bbf2cb692366" @@ -2744,110 +2772,196 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rsdoctor/client@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/client/-/client-0.3.11.tgz#010fe58c0872f05e2d327f8c83053ab43fc40c23" - integrity sha512-mqbatlzgBMlz2C40fXCH7+oHFzDLzOD7yCvvLpolQ6AGwDADJK16fXVtvpBPLP3kzRgw+G4mDwy+UiAmAaCGaQ== +"@rsdoctor/client@0.4.4": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@rsdoctor/client/-/client-0.4.4.tgz#b566a6577db0ef360ff7959a0cda8c3ebab63006" + integrity sha512-xMtOWtLR9qidnXhQTRaaMVHhNqPYApk3uN5cGQJwWJDzmNNmmVeB663sIpHPKXD8cmC/w0z4SDjWA4jue8LM2w== -"@rsdoctor/core@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/core/-/core-0.3.11.tgz#85730315425b9ececea6f64145ae04140c5bfdcd" - integrity sha512-+l9Kpjge+xpBKovc6aP7gtBPM6vGJRi475DOC6We5/AbnpI60Jt3wiJ0arEfgCZ7p8qNvTLsBYSY6CYJm4dDLw== +"@rsdoctor/core@0.4.4": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@rsdoctor/core/-/core-0.4.4.tgz#d2c9693b4ad20c396e3d571ec359cd58ed16bf96" + integrity sha512-cV1f9Fu/S9cjZ9F/oWhgIZHaX0qZJVNh2/DS9vh0gWBZJhBVPz5NBCKjA322W7hGT343sadVdys2PqIxjCHcOw== dependencies: - "@rsdoctor/graph" "0.3.11" - "@rsdoctor/sdk" "0.3.11" - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" + "@rsdoctor/graph" "0.4.4" + "@rsdoctor/sdk" "0.4.4" + "@rsdoctor/types" "0.4.4" + "@rsdoctor/utils" "0.4.4" axios "^1.7.2" enhanced-resolve "5.12.0" - filesize "^10.1.4" + filesize "^10.1.6" fs-extra "^11.1.1" - loader-utils "^2.0.4" lodash "^4.17.21" path-browserify "1.0.1" semver "^7.6.3" source-map "^0.7.4" webpack-bundle-analyzer "^4.10.2" - webpack-sources "^3.2.3" -"@rsdoctor/graph@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/graph/-/graph-0.3.11.tgz#b8d1a6452545e36b508285fc98b5776d074479f4" - integrity sha512-1WDLgwA0TWUS8NIPsV1eTbXH0UMNbLoYDLGSiaUVrwnl90cQsajaEUkwMcKu9VU3YVC4ayjwG6/RCrPlRqE4bw== +"@rsdoctor/graph@0.4.4": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@rsdoctor/graph/-/graph-0.4.4.tgz#d00f93bb1da93bb3379c5f3237d8629cfad1092b" + integrity sha512-ZcCRo9ydqyNI5otai+qUGxw4HZQAE0Rolb9tV4aadNudl7A2Mcm6FT6yECB4jlbNECqc8B5kHKZuz971WgFkLA== dependencies: - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" + "@rsdoctor/types" "0.4.4" + "@rsdoctor/utils" "0.4.4" lodash "^4.17.21" socket.io "4.7.2" source-map "^0.7.4" -"@rsdoctor/sdk@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/sdk/-/sdk-0.3.11.tgz#58bb83b077ed167b5f29b6835ead9e78fbd718c3" - integrity sha512-ys9lTasYm9ecvj0oUbQuSpnULqImYq9QET1LUtoVBa5QIpQBbxOOegWnBmSsDlH7LlFQYhqLl5DR9FdJ7yTmcw== - dependencies: - "@rsdoctor/client" "0.3.11" - "@rsdoctor/graph" "0.3.11" - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" - body-parser "1.20.2" +"@rsdoctor/rspack-plugin@^0.4.1": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@rsdoctor/rspack-plugin/-/rspack-plugin-0.4.4.tgz#fe04e124b06f2bafdcd07d7971d8627147887747" + integrity sha512-HwYnP82HqP5p6z8kdCJ5owULCHw1smNBd90sggElZlphzo2ihdR1SLjg8mcaE5ttDhRGqhYjaXcRCZFyaexTzQ== + dependencies: + "@rsdoctor/core" "0.4.4" + "@rsdoctor/graph" "0.4.4" + "@rsdoctor/sdk" "0.4.4" + "@rsdoctor/types" "0.4.4" + "@rsdoctor/utils" "0.4.4" + lodash "^4.17.21" + +"@rsdoctor/sdk@0.4.4": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@rsdoctor/sdk/-/sdk-0.4.4.tgz#1a8d48b69b25e4cc24dfc2f8ba0a63d6da458094" + integrity sha512-Y+ySVfrFAT0GVwI0xTU/BdEsufnC/+1eLYISWTEa19MdWU/RpcLqsIdglKNbDUbS6k0AELOvl7CUuOiI0go8gw== + dependencies: + "@rsdoctor/client" "0.4.4" + "@rsdoctor/graph" "0.4.4" + "@rsdoctor/types" "0.4.4" + "@rsdoctor/utils" "0.4.4" + "@types/fs-extra" "^11.0.4" + body-parser "1.20.3" cors "2.8.5" - dayjs "1.11.12" + dayjs "1.11.13" + fs-extra "^11.1.1" lodash "^4.17.21" open "^8.4.2" - serve-static "1.15.0" + serve-static "1.16.0" socket.io "4.7.2" source-map "^0.7.4" tapable "2.2.1" -"@rsdoctor/types@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/types/-/types-0.3.11.tgz#d2a37650476bbf7a9d63d951bc0499c8a9b72ac4" - integrity sha512-BH+P5RekIQy3VqFswsTkSB5yeZBYTbMNIlVq1chHhIQcF0Hpd9fuUjFG59NJgBILZoL2vknUhBfhmiv2WEOYig== +"@rsdoctor/types@0.4.4": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@rsdoctor/types/-/types-0.4.4.tgz#ec5d25a264c8ad6ec55402696c6193349548d6ef" + integrity sha512-Ltf03hd/gAazRTmrwz7SqNDqB+BHC0BBVwQi7wUVsF6MphvTaqSdAocNefTgWDeXj0WEP0Vy5wrj+aUPTbPWtg== dependencies: "@types/connect" "3.4.38" "@types/estree" "1.0.5" "@types/tapable" "2.2.7" - "@types/webpack" "5.28.5" source-map "^0.7.4" -"@rsdoctor/utils@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/utils/-/utils-0.3.11.tgz#650b2b8cf2c4d38a0f35d05f13625965c467d185" - integrity sha512-S1h/rG3wPFjHE9AffGjBGxPhP1j8X23KZKiyYnYHiOTCHxnYTyBqRJXUA0OvGewFY9zi7ucz800y+s0G1ujGyg== +"@rsdoctor/utils@0.4.4": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@rsdoctor/utils/-/utils-0.4.4.tgz#a80d7e2f3d4d4de3c4866f675cede3cc63103988" + integrity sha512-J61vLwKdNnuToeU7ZfCIy5rYH4biMH7LfinQG9m4ySveyT9hD8z/CyxbpOlr7vdmnzBVzZCy+0aHm9UbhUpjxQ== dependencies: "@babel/code-frame" "7.24.7" - "@rsdoctor/types" "0.3.11" + "@rsdoctor/types" "0.4.4" "@types/estree" "1.0.5" acorn "^8.10.0" acorn-import-assertions "1.9.0" - acorn-walk "8.3.3" + acorn-walk "8.3.4" chalk "^4.1.2" connect "3.7.0" deep-eql "4.1.4" - envinfo "7.13.0" - filesize "^10.1.4" + envinfo "7.14.0" + filesize "^10.1.6" fs-extra "^11.1.1" get-port "5.1.1" json-stream-stringify "3.0.1" lines-and-columns "2.0.4" lodash "^4.17.21" - rslog "^1.2.2" + rslog "^1.2.3" strip-ansi "^6.0.1" -"@rsdoctor/webpack-plugin@^0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/webpack-plugin/-/webpack-plugin-0.3.11.tgz#b5f43b7c3c8c365e379dbd5a51bfae284aee61b4" - integrity sha512-Gqr5GMOhHkJl9rtsbnCZV5mXuvsfpRtg735cRie9eT1E/dMpHerIGZFRGRIMPNkLAd/lfe0KwrGRZknWX9M/zQ== - dependencies: - "@rsdoctor/core" "0.3.11" - "@rsdoctor/graph" "0.3.11" - "@rsdoctor/sdk" "0.3.11" - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" +"@rsdoctor/webpack-plugin@^0.4.1": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@rsdoctor/webpack-plugin/-/webpack-plugin-0.4.4.tgz#7e64e9e5693c21035bbc7f8d4e2bc2eb9873ce76" + integrity sha512-lXUNQaX3jGx+V6TCzOnWV5jMJ6vsziPGBPrz9m4PEsW+4nDrzEJLieE6e7AwrxGEUi02GbxmCq6FXBJVBIWdqA== + dependencies: + "@rsdoctor/core" "0.4.4" + "@rsdoctor/graph" "0.4.4" + "@rsdoctor/sdk" "0.4.4" + "@rsdoctor/types" "0.4.4" + "@rsdoctor/utils" "0.4.4" fs-extra "^11.1.1" lodash "^4.17.21" +"@rspack/binding-darwin-arm64@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.7.tgz#22b2c1aad32f65eee6806cf95db2e62ced215ee7" + integrity sha512-VnkgTM2OJzWTJxiWxLeUpRGumDp0XAsjU9/DL1PBjw1W+1exyGc2QST8q+mxsgDPDl9u1rjJa6UN4oboBbl47Q== + +"@rspack/binding-darwin-x64@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.7.tgz#c4185bba4e2ed324063e19219217f5f13ff5b35d" + integrity sha512-43v660eofqzRVtTVddl28K5550E1gCeWIc8WRUAxJoL4QTzoo8M3iGnU8CquKG6phat5Iug8mJ0OIUfqHGK8YQ== + +"@rspack/binding-linux-arm64-gnu@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.7.tgz#909747e44f0ffc6426cb0b67ab4cb7f540d60368" + integrity sha512-FHS1cU5MzXijVKQ7xW2Rpp0wvtN0BQYbouT3Yx6DNrdtE3P4i/XHnol8zdHkpHeSCOP/p0bnyO+Q/BbXXr4XSw== + +"@rspack/binding-linux-arm64-musl@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.7.tgz#26c60907e2ff9997b243d6cadfad14b49f08dba7" + integrity sha512-WT+h3fpEWY+60UqiTcwTq6jq6NFhZdZW+Onb3QHQ9F9myWOemM5z5GF8rxWKTn6PHOMz01o/cF4ikMQRfC/sEA== + +"@rspack/binding-linux-x64-gnu@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.7.tgz#ad477d407310ca3d8566206cbc81a51f0658af68" + integrity sha512-l2ORrXY+dG7n/yog5tGwk3NZLLWh/jz88+74IQkVBX1wRViJt1cJZE9wDqoCLhT6dgCreIUZ1s5UghuAR6ymYQ== + +"@rspack/binding-linux-x64-musl@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.7.tgz#e25d52f87f17207dd0fb2383905981d775e1d702" + integrity sha512-k1qtanXpQiGk/h2UfVDxLqzkS/LHj5i4AlMTV6q/CIBUjTOrwO4yFWCCC8JLw4vK6rT/YK/Ib4nwy1XRyVY+dQ== + +"@rspack/binding-win32-arm64-msvc@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.7.tgz#1a55c1a50e2cf49d40fd4f21c0a8574be2de3ef9" + integrity sha512-WqdaSOo6uGy1c4AkmvcJTtjJT9F7/c5dNTUCTXWAFzh9V1k1X5tpPCxFFB/PpWov59esywkV2ZRIgDypBf3PLg== + +"@rspack/binding-win32-ia32-msvc@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.7.tgz#643d5f0705b74934823ab5a56733915e52336889" + integrity sha512-H9/U63KyIVlmmb34pRsX45Q0sdSqST22+za67dwEZicx5DjswGHQlkcdWZPmvsquACUG/ZyJf+tOzR3tm/sE5Q== + +"@rspack/binding-win32-x64-msvc@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.7.tgz#f26ce9f308d94b7c54cc107c0820273c6ece3528" + integrity sha512-T6E00hKhgfXLkWmkmzyxYl/jKWot0PE2U4/ciGlBVQtDyjc50WPWnRREyPAEv7ozgAqou+ugd5KN+O6SFz4NbQ== + +"@rspack/binding@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.7.tgz#355cf2e5eabe60648a58da9bc6c5eecdbb11608c" + integrity sha512-lSjxstfgtesIj1A0pk1W99iTIyDyfv/HXveyV3x+C+62pv0i0jj9tJUDmFM1gGwitKzm1LV9DgW/sOuzz3NtNw== + optionalDependencies: + "@rspack/binding-darwin-arm64" "1.0.7" + "@rspack/binding-darwin-x64" "1.0.7" + "@rspack/binding-linux-arm64-gnu" "1.0.7" + "@rspack/binding-linux-arm64-musl" "1.0.7" + "@rspack/binding-linux-x64-gnu" "1.0.7" + "@rspack/binding-linux-x64-musl" "1.0.7" + "@rspack/binding-win32-arm64-msvc" "1.0.7" + "@rspack/binding-win32-ia32-msvc" "1.0.7" + "@rspack/binding-win32-x64-msvc" "1.0.7" + +"@rspack/core@^1.0.5": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.7.tgz#7e9905841f9e9904678c3282f1f062ae1e98669f" + integrity sha512-L3O0GDKasMmLtDkZrbfJI8OFJ5hmlLannoJ2hDR3LMq8tC/q0jIXTL7YIo7rStsudecCkcD7CH/Smm00itZSzg== + dependencies: + "@module-federation/runtime-tools" "0.5.1" + "@rspack/binding" "1.0.7" + "@rspack/lite-tapable" "1.0.0" + caniuse-lite "^1.0.30001616" + +"@rspack/lite-tapable@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@rspack/lite-tapable/-/lite-tapable-1.0.0.tgz#160883693462f164d0e6ede22f32614673ef6429" + integrity sha512-7MZf4lburSUZoEenwazwUDKHhqyfnLCGnQ/tKcUtztfmVzfjZfRn/EaiT0AKkYGnL2U8AGsw89oUeVyvaOLVCw== + "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" @@ -3380,6 +3494,14 @@ dependencies: "@types/webpack" "^4" +"@types/fs-extra@^11.0.4": + version "11.0.4" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-11.0.4.tgz#e16a863bb8843fba8c5004362b5a73e17becca45" + integrity sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ== + dependencies: + "@types/jsonfile" "*" + "@types/node" "*" + "@types/fs-extra@^9.0.13": version "9.0.13" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" @@ -3515,6 +3637,13 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== +"@types/jsonfile@*": + version "6.1.4" + resolved "https://registry.yarnpkg.com/@types/jsonfile/-/jsonfile-6.1.4.tgz#614afec1a1164e7d670b4a7ad64df3e7beb7b702" + integrity sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ== + dependencies: + "@types/node" "*" + "@types/katex@^0.16.0": version "0.16.1" resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.16.1.tgz#e1faa29f131c241a7669e65bdf8ce470c9c4e3a9" @@ -3889,15 +4018,6 @@ "@types/source-list-map" "*" source-map "^0.7.3" -"@types/webpack@5.28.5": - version "5.28.5" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-5.28.5.tgz#0e9d9a15efa09bbda2cef41356ca4ac2031ea9a2" - integrity sha512-wR87cgvxj3p6D0Crt1r5avwqffqPXUkNlnQ1mjU93G7gCuFjufZR4I6j8cz5g1F1tTYpfOOFvly+cmIQwL9wvw== - dependencies: - "@types/node" "*" - tapable "^2.2.0" - webpack "^5" - "@types/webpack@^4": version "4.41.33" resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.33.tgz#16164845a5be6a306bcbe554a8e67f9cac215ffc" @@ -4254,10 +4374,10 @@ acorn-jsx@^5.0.0, acorn-jsx@^5.0.1, acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@8.3.3, acorn-walk@^8.0.0, acorn-walk@^8.0.2: - version "8.3.3" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" - integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== +acorn-walk@8.3.4, acorn-walk@^8.0.0, acorn-walk@^8.0.2: + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== dependencies: acorn "^8.11.0" @@ -4858,24 +4978,6 @@ bluebird@~3.4.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" integrity sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA== -body-parser@1.20.2: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - body-parser@1.20.3: version "1.20.3" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" @@ -5186,10 +5288,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001646: - version "1.0.30001651" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz#52de59529e8b02b1aedcaaf5c05d9e23c0c28138" - integrity sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001616, caniuse-lite@^1.0.30001646: + version "1.0.30001664" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz#d588d75c9682d3301956b05a3749652a80677df4" + integrity sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g== ccount@^2.0.0: version "2.0.1" @@ -6685,12 +6787,7 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -dayjs@1.11.12: - version "1.11.12" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.12.tgz#5245226cc7f40a15bf52e0b99fd2a04669ccac1d" - integrity sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg== - -dayjs@^1.11.10: +dayjs@1.11.13, dayjs@^1.11.10: version "1.11.13" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== @@ -7221,10 +7318,10 @@ env-paths@^2.2.0, env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== -envinfo@7.13.0, envinfo@^7.7.4: - version "7.13.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" - integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== +envinfo@7.14.0, envinfo@^7.7.4: + version "7.14.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.14.0.tgz#26dac5db54418f2a4c1159153a0b2ae980838aae" + integrity sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg== equals@^1.0.5: version "1.0.5" @@ -8003,10 +8100,10 @@ filelist@^1.0.4: dependencies: minimatch "^5.0.1" -filesize@^10.1.4: - version "10.1.4" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-10.1.4.tgz#184f256063a201f08b6e6b3cc47d21b60f5b8d89" - integrity sha512-ryBwPIIeErmxgPnm6cbESAzXjuEFubs+yKYLBZvg3CaiNcmkJChoOGcBSrZ6IwkMwPABwPpVXE6IlNdGJJrvEg== +filesize@^10.1.6: + version "10.1.6" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-10.1.6.tgz#31194da825ac58689c0bce3948f33ce83aabd361" + integrity sha512-sJslQKU2uM33qH5nqewAwVB2QgR6w1aMNsYUp3aN5rMRyXEwJGmZvaWzeJFNTOXWlHQyBFCWrdj3fV/fsTOX8w== filesize@^8.0.6: version "8.0.7" @@ -10820,7 +10917,7 @@ loader-runner@^4.2.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== -loader-utils@^2.0.0, loader-utils@^2.0.4: +loader-utils@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== @@ -14829,10 +14926,10 @@ roughjs@^4.6.6: points-on-curve "^0.2.0" points-on-path "^0.2.1" -rslog@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/rslog/-/rslog-1.2.2.tgz#057791013c1de27d1d8b0728a766688d11c13830" - integrity sha512-tZP8KjrI1nz6qOYCrFxAV7cfmfS2GV94jotU2zOmF/6ByO1zNvGR6/+0inylpjqyBjAdnnutTUW0m4th06bSTw== +rslog@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/rslog/-/rslog-1.2.3.tgz#9114d93056312fbe35c11b3fea3f2774a7debe56" + integrity sha512-antALPJaKBRPBU1X2q9t085K4htWDOOv/K1qhTUk7h0l1ePU/KbDqKJn19eKP0dk7PqMioeA0+fu3gyPXCsXxQ== rtl-detect@^1.0.4: version "1.0.4" @@ -15115,16 +15212,6 @@ serve-index@^1.9.1: mime-types "~2.1.17" parseurl "~1.3.2" -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - serve-static@1.16.0: version "1.16.0" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.0.tgz#2bf4ed49f8af311b519c46f272bf6ac3baf38a92" From d6b34a9a6a72bbad12a7e512ef4b69a21f8317fd Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Sep 2024 12:15:12 +0200 Subject: [PATCH 35/56] rspack 1.0.7 --- packages/docusaurus-faster/package.json | 4 +- yarn.lock | 80 ++++++++++++++++++++----- 2 files changed, 67 insertions(+), 17 deletions(-) diff --git a/packages/docusaurus-faster/package.json b/packages/docusaurus-faster/package.json index e367b3130106..5a53c36b8751 100644 --- a/packages/docusaurus-faster/package.json +++ b/packages/docusaurus-faster/package.json @@ -18,8 +18,8 @@ }, "license": "MIT", "dependencies": { - "@rspack/core": "^1.0.5", - "@swc/core": "^1.7.14", + "@rspack/core": "^1.0.7", + "@swc/core": "^1.7.28", "swc-loader": "^0.2.6", "webpack": "^5.88.1" }, diff --git a/yarn.lock b/yarn.lock index 3bb5a0370afb..6d0de2cd683f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2947,7 +2947,7 @@ "@rspack/binding-win32-ia32-msvc" "1.0.7" "@rspack/binding-win32-x64-msvc" "1.0.7" -"@rspack/core@^1.0.5": +"@rspack/core@^1.0.7": version "1.0.7" resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.7.tgz#7e9905841f9e9904678c3282f1f062ae1e98669f" integrity sha512-L3O0GDKasMmLtDkZrbfJI8OFJ5hmlLannoJ2hDR3LMq8tC/q0jIXTL7YIo7rStsudecCkcD7CH/Smm00itZSzg== @@ -3161,69 +3161,119 @@ resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.14.tgz#a4530ec755ea183802cc9dfe4900ab5f6a327fea" integrity sha512-V0OUXjOH+hdGxDYG8NkQzy25mKOpcNKFpqtZEzLe5V/CpLJPnpg1+pMz70m14s9ZFda9OxsjlvPbg1FLUwhgIQ== +"@swc/core-darwin-arm64@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.28.tgz#f4ff1c09443a0040a29c7e1e7615f5f5642b6945" + integrity sha512-BNkj6enHo2pdzOpCtQGKZbXT2A/qWIr0CVtbTM4WkJ3MCK/glbFsyO6X59p1r8+gfaZG4bWYnTTu+RuUAcsL5g== + "@swc/core-darwin-x64@1.7.14": version "1.7.14" resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.14.tgz#2c9c717fd28dd1dde9c21cf58b01f1cda7976b1a" integrity sha512-9iFvUnxG6FC3An5ogp5jbBfQuUmTTwy8KMB+ZddUoPB3NR1eV+Y9vOh/tfWcenSJbgOKDLgYC5D/b1mHAprsrQ== +"@swc/core-darwin-x64@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.28.tgz#ce0a6d559084a794517a81457cdadbf61a55c55d" + integrity sha512-96zQ+X5Fd6P/RNPkOyikTJgEc2M4TzznfYvjRd2hye5h22jhxCLL/csoauDgN7lYfd7mwsZ/sVXwJTMKl+vZSA== + "@swc/core-linux-arm-gnueabihf@1.7.14": version "1.7.14" resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.14.tgz#fed055c9c65347177c8df88720f8a51793a4df06" integrity sha512-zGJsef9qPivKSH8Vv4F/HiBXBTHZ5Hs3ZjVGo/UIdWPJF8fTL9OVADiRrl34Q7zOZEtGXRwEKLUW1SCQcbDvZA== +"@swc/core-linux-arm-gnueabihf@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.28.tgz#501375ac84c61dc718ed07239c7e44972f6c44e0" + integrity sha512-l2100Wx6LdXMOmOW3+KoHhBhyZrGdz8ylkygcVOC0QHp6YIATfuG+rRHksfyEWCSOdL3anM9MJZJX26KT/s+XQ== + "@swc/core-linux-arm64-gnu@1.7.14": version "1.7.14" resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.14.tgz#ca740c8ea26f041b2dc43ba87facec452052814f" integrity sha512-AxV3MPsoI7i4B8FXOew3dx3N8y00YoJYvIPfxelw07RegeCEH3aHp2U2DtgbP/NV1ugZMx0TL2Z2DEvocmA51g== +"@swc/core-linux-arm64-gnu@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.28.tgz#75e99da625939627f5b45d3004a6cfd8d6cbf46e" + integrity sha512-03m6iQ5Bv9u2VPnNRyaBmE8eHi056eE39L0gXcqGoo46GAGuoqYHt9pDz8wS6EgoN4t85iBMUZrkCNqFKkN6ZQ== + "@swc/core-linux-arm64-musl@1.7.14": version "1.7.14" resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.14.tgz#fbc6fed24f5ad58b948e5b7abe6cd1f07112bef1" integrity sha512-JDLdNjUj3zPehd4+DrQD8Ltb3B5lD8D05IwePyDWw+uR/YPc7w/TX1FUVci5h3giJnlMCJRvi1IQYV7K1n7KtQ== +"@swc/core-linux-arm64-musl@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.28.tgz#c737def355c0bf8db7d8e7bd87a3ae8bb3f9f8fc" + integrity sha512-vqVOpG/jc8mvTKQjaPBLhr7tnWyzuztOHsPnJqMWmg7zGcMeQC/2c5pU4uzRAfXMTp25iId6s4Y4wWfPS1EeDw== + "@swc/core-linux-x64-gnu@1.7.14": version "1.7.14" resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.14.tgz#509a37833e4fbf89506b9291d9bd131fa2017fca" integrity sha512-Siy5OvPCLLWmMdx4msnEs8HvEVUEigSn0+3pbLjv78iwzXd0qSBNHUPZyC1xeurVaUbpNDxZTpPRIwpqNE2+Og== +"@swc/core-linux-x64-gnu@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.28.tgz#eb612272ceb1331310eb79ef6094c5a6cc085d23" + integrity sha512-HGwpWuB83Kr+V0E+zT5UwIIY9OxiS8aLd0UVMRVWuO8SrQyKm9HKJ46+zoAb8tfJrpZftfxvbn2ayZWR7gqosA== + "@swc/core-linux-x64-musl@1.7.14": version "1.7.14" resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.14.tgz#81156cc6ff814ad4b8fcf6eb6658d3f247db0b57" integrity sha512-FtEGm9mwtRYQNK43WMtUIadxHs/ja2rnDurB99os0ZoFTGG2IHuht2zD97W0wB8JbqEabT1XwSG9Y5wmN+ciEQ== +"@swc/core-linux-x64-musl@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.28.tgz#a39749a71e690685aabeb7fd60141ccca2e62411" + integrity sha512-q2Y2T8y8EgFtIiRyInnAXNe94aaHX74F0ha1Bl9VdRxE0u1/So+3VLbPvtp4V3Z6pj5pOePfCQJKifnllgAQ9A== + "@swc/core-win32-arm64-msvc@1.7.14": version "1.7.14" resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.14.tgz#c605fa783b5fbe1fff784ace4c4bb074b8d6026d" integrity sha512-Jp8KDlfq7Ntt2/BXr0y344cYgB1zf0DaLzDZ1ZJR6rYlAzWYSccLYcxHa97VGnsYhhPspMpmCvHid97oe2hl4A== +"@swc/core-win32-arm64-msvc@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.28.tgz#93b22667b027e0a5060c91df7e0cc7406d27b01f" + integrity sha512-bCqh4uBT/59h3dWK1v91In6qzz8rKoWoFRxCtNQLIK4jP55K0U231ZK9oN7neZD6bzcOUeFvOGgcyMAgDfFWfA== + "@swc/core-win32-ia32-msvc@1.7.14": version "1.7.14" resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.14.tgz#3e15dc3b662c9fab851a38b3e271c8e2da4ba03a" integrity sha512-I+cFsXF0OU0J9J4zdWiQKKLURO5dvCujH9Jr8N0cErdy54l9d4gfIxdctfTF+7FyXtWKLTCkp+oby9BQhkFGWA== +"@swc/core-win32-ia32-msvc@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.28.tgz#4d7dbc43a1de79ac0c7cccf35bebf9fe887b2e24" + integrity sha512-XTHbHrksnrqK3JSJ2sbuMWvdJ6/G0roRpgyVTmNDfhTYPOwcVaL/mSrPGLwbksYUbq7ckwoKzrobhdxvQzPsDA== + "@swc/core-win32-x64-msvc@1.7.14": version "1.7.14" resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.14.tgz#83958d92e9f07865ec9365212111fbc295660f0d" integrity sha512-NNrprQCK6d28mG436jVo2TD+vACHseUECacEBGZ9Ef0qfOIWS1XIt2MisQKG0Oea2VvLFl6tF/V4Lnx/H0Sn3Q== -"@swc/core@^1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.7.14.tgz#d10492b5a4168cb1e73cf561a315e8b0f62255ed" - integrity sha512-9aeXeifnyuvc2pcuuhPQgVUwdpGEzZ+9nJu0W8/hNl/aESFsJGR5i9uQJRGu0atoNr01gK092fvmqMmQAPcKow== +"@swc/core-win32-x64-msvc@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.28.tgz#d00acea3339a90768279096e6e5f1540c599e6ce" + integrity sha512-jyXeoq6nX8abiCy2EpporsC5ywNENs4ocYuvxo1LSxDktWN1E2MTXq3cdJcEWB2Vydxq0rDcsGyzkRPMzFhkZw== + +"@swc/core@^1.7.14", "@swc/core@^1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.7.28.tgz#74aec7a31344da7cfd305a09f14f22420351d495" + integrity sha512-XapcMgsOS0cKh01AFEj+qXOk6KM4NZhp7a5vPicdhkRR8RzvjrCa7DTtijMxfotU8bqaEHguxmiIag2HUlT8QQ== dependencies: "@swc/counter" "^0.1.3" "@swc/types" "^0.1.12" optionalDependencies: - "@swc/core-darwin-arm64" "1.7.14" - "@swc/core-darwin-x64" "1.7.14" - "@swc/core-linux-arm-gnueabihf" "1.7.14" - "@swc/core-linux-arm64-gnu" "1.7.14" - "@swc/core-linux-arm64-musl" "1.7.14" - "@swc/core-linux-x64-gnu" "1.7.14" - "@swc/core-linux-x64-musl" "1.7.14" - "@swc/core-win32-arm64-msvc" "1.7.14" - "@swc/core-win32-ia32-msvc" "1.7.14" - "@swc/core-win32-x64-msvc" "1.7.14" + "@swc/core-darwin-arm64" "1.7.28" + "@swc/core-darwin-x64" "1.7.28" + "@swc/core-linux-arm-gnueabihf" "1.7.28" + "@swc/core-linux-arm64-gnu" "1.7.28" + "@swc/core-linux-arm64-musl" "1.7.28" + "@swc/core-linux-x64-gnu" "1.7.28" + "@swc/core-linux-x64-musl" "1.7.28" + "@swc/core-win32-arm64-msvc" "1.7.28" + "@swc/core-win32-ia32-msvc" "1.7.28" + "@swc/core-win32-x64-msvc" "1.7.28" "@swc/counter@^0.1.3": version "0.1.3" From c4881e75f0189877e3afb66c110e694c8a87643c Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Sep 2024 12:27:29 +0200 Subject: [PATCH 36/56] attempt to restore ChunkAssetPlugin --- .../docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts b/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts index af7380e68a27..86c004913dfb 100644 --- a/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts +++ b/packages/docusaurus/src/webpack/plugins/ChunkAssetPlugin.ts @@ -18,7 +18,6 @@ const DocusaurusGetChunkAssetFn = '__webpack_require__.gca'; const PluginName = 'Docusaurus-ChunkAssetPlugin'; -// eslint-disable-next-line function generateGetChunkAssetRuntimeCode(chunk: webpack.Chunk): string { const chunkIdToName = chunk.getChunkMaps(false).name; const chunkNameToId = Object.fromEntries( @@ -60,9 +59,8 @@ export default class ChunkAssetPlugin { compiler.hooks.thisCompilation.tap(PluginName, (compilation) => { compilation.hooks.additionalTreeRuntimeRequirements.tap( PluginName, - // eslint-disable-next-line (chunk) => { - // compilation.addRuntimeModule(chunk, new ChunkAssetRuntimeModule()); + compilation.addRuntimeModule(chunk, new ChunkAssetRuntimeModule()); }, ); }); @@ -70,7 +68,8 @@ export default class ChunkAssetPlugin { } // Inspired by https://github.com/webpack/webpack/blob/v5.94.0/lib/runtime/CompatRuntimeModule.js -/* +// See also https://rspack.dev/api/javascript-api/compilation#addruntimemodule +// See also https://rspack.dev/api/plugin-api/compilation-hooks#additionaltreeruntimerequirements class ChunkAssetRuntimeModule extends webpack.RuntimeModule { constructor() { super('ChunkAssetRuntimeModule', webpack.RuntimeModule.STAGE_ATTACH); @@ -80,4 +79,3 @@ class ChunkAssetRuntimeModule extends webpack.RuntimeModule { return generateGetChunkAssetRuntimeCode(this.chunk!); } } - */ From 402d3ef62052633c82028e4401c549857ca2721a Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Sep 2024 12:46:52 +0200 Subject: [PATCH 37/56] temp disable ChunkAssetPlugin --- packages/docusaurus/src/webpack/client.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus/src/webpack/client.ts b/packages/docusaurus/src/webpack/client.ts index 0c90c06ed68e..bd5ff9ece3b5 100644 --- a/packages/docusaurus/src/webpack/client.ts +++ b/packages/docusaurus/src/webpack/client.ts @@ -62,7 +62,10 @@ async function createBaseClientConfig({ new props.currentBundler.instance.DefinePlugin({ 'process.env.HYDRATE_CLIENT_ENTRY': JSON.stringify(hydrate), }), - new ChunkAssetPlugin(), + + // TODO restore plugin + true ? null : new ChunkAssetPlugin(), + new ProgressBarPlugin({ name: 'Client', }), From 74ddd14b1bdba5cf2d6fafeec39abba14e3e7d7f Mon Sep 17 00:00:00 2001 From: slorber Date: Thu, 26 Sep 2024 10:52:05 +0000 Subject: [PATCH 38/56] refactor: apply lint autofix --- yarn.lock | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6d0de2cd683f..19c83935b369 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3156,101 +3156,51 @@ "@svgr/plugin-jsx" "8.1.0" "@svgr/plugin-svgo" "8.1.0" -"@swc/core-darwin-arm64@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.14.tgz#a4530ec755ea183802cc9dfe4900ab5f6a327fea" - integrity sha512-V0OUXjOH+hdGxDYG8NkQzy25mKOpcNKFpqtZEzLe5V/CpLJPnpg1+pMz70m14s9ZFda9OxsjlvPbg1FLUwhgIQ== - "@swc/core-darwin-arm64@1.7.28": version "1.7.28" resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.28.tgz#f4ff1c09443a0040a29c7e1e7615f5f5642b6945" integrity sha512-BNkj6enHo2pdzOpCtQGKZbXT2A/qWIr0CVtbTM4WkJ3MCK/glbFsyO6X59p1r8+gfaZG4bWYnTTu+RuUAcsL5g== -"@swc/core-darwin-x64@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.14.tgz#2c9c717fd28dd1dde9c21cf58b01f1cda7976b1a" - integrity sha512-9iFvUnxG6FC3An5ogp5jbBfQuUmTTwy8KMB+ZddUoPB3NR1eV+Y9vOh/tfWcenSJbgOKDLgYC5D/b1mHAprsrQ== - "@swc/core-darwin-x64@1.7.28": version "1.7.28" resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.28.tgz#ce0a6d559084a794517a81457cdadbf61a55c55d" integrity sha512-96zQ+X5Fd6P/RNPkOyikTJgEc2M4TzznfYvjRd2hye5h22jhxCLL/csoauDgN7lYfd7mwsZ/sVXwJTMKl+vZSA== -"@swc/core-linux-arm-gnueabihf@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.14.tgz#fed055c9c65347177c8df88720f8a51793a4df06" - integrity sha512-zGJsef9qPivKSH8Vv4F/HiBXBTHZ5Hs3ZjVGo/UIdWPJF8fTL9OVADiRrl34Q7zOZEtGXRwEKLUW1SCQcbDvZA== - "@swc/core-linux-arm-gnueabihf@1.7.28": version "1.7.28" resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.28.tgz#501375ac84c61dc718ed07239c7e44972f6c44e0" integrity sha512-l2100Wx6LdXMOmOW3+KoHhBhyZrGdz8ylkygcVOC0QHp6YIATfuG+rRHksfyEWCSOdL3anM9MJZJX26KT/s+XQ== -"@swc/core-linux-arm64-gnu@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.14.tgz#ca740c8ea26f041b2dc43ba87facec452052814f" - integrity sha512-AxV3MPsoI7i4B8FXOew3dx3N8y00YoJYvIPfxelw07RegeCEH3aHp2U2DtgbP/NV1ugZMx0TL2Z2DEvocmA51g== - "@swc/core-linux-arm64-gnu@1.7.28": version "1.7.28" resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.28.tgz#75e99da625939627f5b45d3004a6cfd8d6cbf46e" integrity sha512-03m6iQ5Bv9u2VPnNRyaBmE8eHi056eE39L0gXcqGoo46GAGuoqYHt9pDz8wS6EgoN4t85iBMUZrkCNqFKkN6ZQ== -"@swc/core-linux-arm64-musl@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.14.tgz#fbc6fed24f5ad58b948e5b7abe6cd1f07112bef1" - integrity sha512-JDLdNjUj3zPehd4+DrQD8Ltb3B5lD8D05IwePyDWw+uR/YPc7w/TX1FUVci5h3giJnlMCJRvi1IQYV7K1n7KtQ== - "@swc/core-linux-arm64-musl@1.7.28": version "1.7.28" resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.28.tgz#c737def355c0bf8db7d8e7bd87a3ae8bb3f9f8fc" integrity sha512-vqVOpG/jc8mvTKQjaPBLhr7tnWyzuztOHsPnJqMWmg7zGcMeQC/2c5pU4uzRAfXMTp25iId6s4Y4wWfPS1EeDw== -"@swc/core-linux-x64-gnu@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.14.tgz#509a37833e4fbf89506b9291d9bd131fa2017fca" - integrity sha512-Siy5OvPCLLWmMdx4msnEs8HvEVUEigSn0+3pbLjv78iwzXd0qSBNHUPZyC1xeurVaUbpNDxZTpPRIwpqNE2+Og== - "@swc/core-linux-x64-gnu@1.7.28": version "1.7.28" resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.28.tgz#eb612272ceb1331310eb79ef6094c5a6cc085d23" integrity sha512-HGwpWuB83Kr+V0E+zT5UwIIY9OxiS8aLd0UVMRVWuO8SrQyKm9HKJ46+zoAb8tfJrpZftfxvbn2ayZWR7gqosA== -"@swc/core-linux-x64-musl@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.14.tgz#81156cc6ff814ad4b8fcf6eb6658d3f247db0b57" - integrity sha512-FtEGm9mwtRYQNK43WMtUIadxHs/ja2rnDurB99os0ZoFTGG2IHuht2zD97W0wB8JbqEabT1XwSG9Y5wmN+ciEQ== - "@swc/core-linux-x64-musl@1.7.28": version "1.7.28" resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.28.tgz#a39749a71e690685aabeb7fd60141ccca2e62411" integrity sha512-q2Y2T8y8EgFtIiRyInnAXNe94aaHX74F0ha1Bl9VdRxE0u1/So+3VLbPvtp4V3Z6pj5pOePfCQJKifnllgAQ9A== -"@swc/core-win32-arm64-msvc@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.14.tgz#c605fa783b5fbe1fff784ace4c4bb074b8d6026d" - integrity sha512-Jp8KDlfq7Ntt2/BXr0y344cYgB1zf0DaLzDZ1ZJR6rYlAzWYSccLYcxHa97VGnsYhhPspMpmCvHid97oe2hl4A== - "@swc/core-win32-arm64-msvc@1.7.28": version "1.7.28" resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.28.tgz#93b22667b027e0a5060c91df7e0cc7406d27b01f" integrity sha512-bCqh4uBT/59h3dWK1v91In6qzz8rKoWoFRxCtNQLIK4jP55K0U231ZK9oN7neZD6bzcOUeFvOGgcyMAgDfFWfA== -"@swc/core-win32-ia32-msvc@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.14.tgz#3e15dc3b662c9fab851a38b3e271c8e2da4ba03a" - integrity sha512-I+cFsXF0OU0J9J4zdWiQKKLURO5dvCujH9Jr8N0cErdy54l9d4gfIxdctfTF+7FyXtWKLTCkp+oby9BQhkFGWA== - "@swc/core-win32-ia32-msvc@1.7.28": version "1.7.28" resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.28.tgz#4d7dbc43a1de79ac0c7cccf35bebf9fe887b2e24" integrity sha512-XTHbHrksnrqK3JSJ2sbuMWvdJ6/G0roRpgyVTmNDfhTYPOwcVaL/mSrPGLwbksYUbq7ckwoKzrobhdxvQzPsDA== -"@swc/core-win32-x64-msvc@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.14.tgz#83958d92e9f07865ec9365212111fbc295660f0d" - integrity sha512-NNrprQCK6d28mG436jVo2TD+vACHseUECacEBGZ9Ef0qfOIWS1XIt2MisQKG0Oea2VvLFl6tF/V4Lnx/H0Sn3Q== - "@swc/core-win32-x64-msvc@1.7.28": version "1.7.28" resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.28.tgz#d00acea3339a90768279096e6e5f1540c599e6ce" From 628980eb070e4604b342486e72ae78b13e21d650 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Sep 2024 13:09:40 +0200 Subject: [PATCH 39/56] empty From c66bfb4e6d9c7620110426ea64ec5688bd16d2c8 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Sep 2024 13:17:48 +0200 Subject: [PATCH 40/56] fix createJsLoaderFactory test --- .../src/loaders/__tests__/jsLoader.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-bundler/src/loaders/__tests__/jsLoader.test.ts b/packages/docusaurus-bundler/src/loaders/__tests__/jsLoader.test.ts index 2ac34d425f40..22016169b883 100644 --- a/packages/docusaurus-bundler/src/loaders/__tests__/jsLoader.test.ts +++ b/packages/docusaurus-bundler/src/loaders/__tests__/jsLoader.test.ts @@ -5,14 +5,16 @@ * LICENSE file in the root directory of this source tree. */ -import {fromPartial} from '@total-typescript/shoehorn'; +import {fromPartial, type PartialDeep} from '@total-typescript/shoehorn'; import {createJsLoaderFactory} from '../jsLoader'; import type {RuleSetRule} from 'webpack'; describe('createJsLoaderFactory', () => { function testJsLoaderFactory( - siteConfig?: Parameters[0]['siteConfig'], + siteConfig?: PartialDeep< + Parameters[0]['siteConfig'] + >, ) { return createJsLoaderFactory({ siteConfig: { @@ -21,7 +23,12 @@ describe('createJsLoaderFactory', () => { jsLoader: 'babel', ...siteConfig?.webpack, }, - future: fromPartial(siteConfig?.future), + future: fromPartial({ + ...siteConfig?.future, + experimental_faster: fromPartial({ + ...siteConfig?.future?.experimental_faster, + }), + }), }, }); } From cb84db156bd3890837d21d84ee3481e7f75199ca Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Sep 2024 13:37:56 +0200 Subject: [PATCH 41/56] remove Rspack config validation errors --- packages/docusaurus/src/webpack/base.ts | 21 +++++++++++++++------ website/package.json | 4 ++-- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index a9d4adc05c96..40445ae7f905 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -98,10 +98,14 @@ export async function createBaseConfig({ currentBundler: props.currentBundler, }); - return { - mode, - name, - cache: { + function getCache(): Configuration['cache'] { + if (props.currentBundler.name === 'rspack') { + // TODO Rspack only supports memory cache (as of Sept 2024) + // TODO re-enable file persistent cache one Rspack supports it + // See also https://rspack.dev/config/cache#cache + return undefined; + } + return { type: 'filesystem', // Can we share the same cache across locales? // Exploring that question at https://github.com/webpack/webpack/issues/13034 @@ -127,7 +131,13 @@ export async function createBaseConfig({ siteConfigPath, ], }, - }, + }; + } + + return { + mode, + name, + cache: getCache(), output: { pathinfo: false, path: outDir, @@ -145,7 +155,6 @@ export async function createBaseConfig({ }, devtool: isProd ? undefined : 'eval-cheap-module-source-map', resolve: { - unsafeCache: false, // Not enabled, does not seem to improve perf much extensions: ['.wasm', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json'], symlinks: true, // See https://github.com/facebook/docusaurus/issues/3272 roots: [ diff --git a/website/package.json b/website/package.json index 0f24cef06631..78e37a21664c 100644 --- a/website/package.json +++ b/website/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "docusaurus": "docusaurus", - "start": "cross-env RSPACK_CONFIG_VALIDATE=loose-silent docusaurus start", - "build": "cross-env RSPACK_CONFIG_VALIDATE=loose-silent docusaurus build", + "start": "docusaurus start", + "build": "docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear && rimraf changelog && rimraf _dogfooding/_swizzle_theme_tests", From 3a202df2c9bf5879e04002302b962481c79228e0 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 26 Sep 2024 14:27:40 +0200 Subject: [PATCH 42/56] Use Rspack canary, restore ChunkAssetPlugin --- packages/docusaurus-faster/package.json | 2 +- packages/docusaurus/src/webpack/client.ts | 5 +- yarn.lock | 138 +++++++++++----------- 3 files changed, 71 insertions(+), 74 deletions(-) diff --git a/packages/docusaurus-faster/package.json b/packages/docusaurus-faster/package.json index 5a53c36b8751..1c7ae4811456 100644 --- a/packages/docusaurus-faster/package.json +++ b/packages/docusaurus-faster/package.json @@ -18,7 +18,7 @@ }, "license": "MIT", "dependencies": { - "@rspack/core": "^1.0.7", + "@rspack/core": "npm:@rspack/core-canary@1.0.8-canary-8286125d-20240926091417", "@swc/core": "^1.7.28", "swc-loader": "^0.2.6", "webpack": "^5.88.1" diff --git a/packages/docusaurus/src/webpack/client.ts b/packages/docusaurus/src/webpack/client.ts index bd5ff9ece3b5..0c90c06ed68e 100644 --- a/packages/docusaurus/src/webpack/client.ts +++ b/packages/docusaurus/src/webpack/client.ts @@ -62,10 +62,7 @@ async function createBaseClientConfig({ new props.currentBundler.instance.DefinePlugin({ 'process.env.HYDRATE_CLIENT_ENTRY': JSON.stringify(hydrate), }), - - // TODO restore plugin - true ? null : new ChunkAssetPlugin(), - + new ChunkAssetPlugin(), new ProgressBarPlugin({ name: 'Client', }), diff --git a/yarn.lock b/yarn.lock index 19c83935b369..63063917a8f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2887,80 +2887,80 @@ fs-extra "^11.1.1" lodash "^4.17.21" -"@rspack/binding-darwin-arm64@1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.7.tgz#22b2c1aad32f65eee6806cf95db2e62ced215ee7" - integrity sha512-VnkgTM2OJzWTJxiWxLeUpRGumDp0XAsjU9/DL1PBjw1W+1exyGc2QST8q+mxsgDPDl9u1rjJa6UN4oboBbl47Q== - -"@rspack/binding-darwin-x64@1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.7.tgz#c4185bba4e2ed324063e19219217f5f13ff5b35d" - integrity sha512-43v660eofqzRVtTVddl28K5550E1gCeWIc8WRUAxJoL4QTzoo8M3iGnU8CquKG6phat5Iug8mJ0OIUfqHGK8YQ== - -"@rspack/binding-linux-arm64-gnu@1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.7.tgz#909747e44f0ffc6426cb0b67ab4cb7f540d60368" - integrity sha512-FHS1cU5MzXijVKQ7xW2Rpp0wvtN0BQYbouT3Yx6DNrdtE3P4i/XHnol8zdHkpHeSCOP/p0bnyO+Q/BbXXr4XSw== - -"@rspack/binding-linux-arm64-musl@1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.7.tgz#26c60907e2ff9997b243d6cadfad14b49f08dba7" - integrity sha512-WT+h3fpEWY+60UqiTcwTq6jq6NFhZdZW+Onb3QHQ9F9myWOemM5z5GF8rxWKTn6PHOMz01o/cF4ikMQRfC/sEA== - -"@rspack/binding-linux-x64-gnu@1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.7.tgz#ad477d407310ca3d8566206cbc81a51f0658af68" - integrity sha512-l2ORrXY+dG7n/yog5tGwk3NZLLWh/jz88+74IQkVBX1wRViJt1cJZE9wDqoCLhT6dgCreIUZ1s5UghuAR6ymYQ== - -"@rspack/binding-linux-x64-musl@1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.7.tgz#e25d52f87f17207dd0fb2383905981d775e1d702" - integrity sha512-k1qtanXpQiGk/h2UfVDxLqzkS/LHj5i4AlMTV6q/CIBUjTOrwO4yFWCCC8JLw4vK6rT/YK/Ib4nwy1XRyVY+dQ== - -"@rspack/binding-win32-arm64-msvc@1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.7.tgz#1a55c1a50e2cf49d40fd4f21c0a8574be2de3ef9" - integrity sha512-WqdaSOo6uGy1c4AkmvcJTtjJT9F7/c5dNTUCTXWAFzh9V1k1X5tpPCxFFB/PpWov59esywkV2ZRIgDypBf3PLg== - -"@rspack/binding-win32-ia32-msvc@1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.7.tgz#643d5f0705b74934823ab5a56733915e52336889" - integrity sha512-H9/U63KyIVlmmb34pRsX45Q0sdSqST22+za67dwEZicx5DjswGHQlkcdWZPmvsquACUG/ZyJf+tOzR3tm/sE5Q== - -"@rspack/binding-win32-x64-msvc@1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.7.tgz#f26ce9f308d94b7c54cc107c0820273c6ece3528" - integrity sha512-T6E00hKhgfXLkWmkmzyxYl/jKWot0PE2U4/ciGlBVQtDyjc50WPWnRREyPAEv7ozgAqou+ugd5KN+O6SFz4NbQ== - -"@rspack/binding@1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.7.tgz#355cf2e5eabe60648a58da9bc6c5eecdbb11608c" - integrity sha512-lSjxstfgtesIj1A0pk1W99iTIyDyfv/HXveyV3x+C+62pv0i0jj9tJUDmFM1gGwitKzm1LV9DgW/sOuzz3NtNw== +"@rspack/binding-darwin-arm64@npm:@rspack/binding-darwin-arm64-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64-canary/-/binding-darwin-arm64-canary-1.0.8-canary-8286125d-20240926091417.tgz#82e9384e1691a1c5344f093489e9db1926ab008d" + integrity sha512-YnDDQi9LQLzu8DrF45dQ4QhihmPXXcZd+vuDQ1GNtcjfKYWBdJE9ylJ+Hq4KH+3BeU2RJQfiDEKYMpXv56v7/A== + +"@rspack/binding-darwin-x64@npm:@rspack/binding-darwin-x64-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64-canary/-/binding-darwin-x64-canary-1.0.8-canary-8286125d-20240926091417.tgz#22133e2a636cee9b2bcdbc48d9b47219a12f63bd" + integrity sha512-j7mlSCGStCmjEHhy5zcxeh2UJpVaf+O5nMR4PcO7r6I0JybZL2mEisJlPunSR/vi5KLwl65cRsH6/EEFYXMn3w== + +"@rspack/binding-linux-arm64-gnu@npm:@rspack/binding-linux-arm64-gnu-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu-canary/-/binding-linux-arm64-gnu-canary-1.0.8-canary-8286125d-20240926091417.tgz#b1a4b4f1ea01d3cbedc380dd22a4d03b09fdfab1" + integrity sha512-3PbiHHB60FRo251t85kTZGPQw44hWU2TptRbhjb3BXIKHxH4sU/githgKCClXGLKaJs7ZcwJnYpjJ7MI8erfbg== + +"@rspack/binding-linux-arm64-musl@npm:@rspack/binding-linux-arm64-musl-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl-canary/-/binding-linux-arm64-musl-canary-1.0.8-canary-8286125d-20240926091417.tgz#bc28e1dba6d32c795ea6a3a0a73e029a625444c7" + integrity sha512-aJZZDJIXOpDMubszDoG0aBF3b9xZbEL792JB6sinc1VX+Za2VTc9Fa8sf/OuCswM8LHaIkjyujubhrWyq0kw4A== + +"@rspack/binding-linux-x64-gnu@npm:@rspack/binding-linux-x64-gnu-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu-canary/-/binding-linux-x64-gnu-canary-1.0.8-canary-8286125d-20240926091417.tgz#ec5e9c7dcc4bfd51476da0177ad465554a1e3f92" + integrity sha512-/BkwwD/w60u8H77boKipxhwK+u887Lbw2W97vqfo82bHWmII93rxjwe3Hap+w5WxmDNqUI3vAZl+gIqv483nGg== + +"@rspack/binding-linux-x64-musl@npm:@rspack/binding-linux-x64-musl-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl-canary/-/binding-linux-x64-musl-canary-1.0.8-canary-8286125d-20240926091417.tgz#8d104dc3c1c947ecb1ddd00de62358c0f68b0b4a" + integrity sha512-MW7ZUtLVqzxz8/39e7fJ7qhi6RtrTZ3/R7ZjUWSGXPm+BGtG6ZfJB7Gn5UDwaG8agETuVnWZqpu/hYoldYbIMw== + +"@rspack/binding-win32-arm64-msvc@npm:@rspack/binding-win32-arm64-msvc-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc-canary/-/binding-win32-arm64-msvc-canary-1.0.8-canary-8286125d-20240926091417.tgz#06f98ceb92f496c94715ff4881216803fb55a440" + integrity sha512-1+ifQTv2nerxJHJQrYKSgUIEE7cRI+o00sVPTZGAdXEVq3sSO2e1zignHnO0lmDw2ZfxgXveGKAQMhwnc7Hr+A== + +"@rspack/binding-win32-ia32-msvc@npm:@rspack/binding-win32-ia32-msvc-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc-canary/-/binding-win32-ia32-msvc-canary-1.0.8-canary-8286125d-20240926091417.tgz#f29d3fa73322cfccc86eabf5b60ea19d0b168659" + integrity sha512-H+9+azOw0TxgLLqg+t+/qf1WngnBNYnroKOAv62xiNrCTk+iQkXCEeT89J/kuZzS3MMIE7j7Q0Zztw/m/LzTPw== + +"@rspack/binding-win32-x64-msvc@npm:@rspack/binding-win32-x64-msvc-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc-canary/-/binding-win32-x64-msvc-canary-1.0.8-canary-8286125d-20240926091417.tgz#d3e19539e9df4f1a92845016de93c93f33907eb3" + integrity sha512-fhYdSxW21TtEgWYic2MgtVjGvFSWJYTVkdmyS2ZyqQOFeoAh2oV/rUjYA4FBKheUSiTUfA1OnwrKMDQOFOLgNw== + +"@rspack/binding@npm:@rspack/binding-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-canary/-/binding-canary-1.0.8-canary-8286125d-20240926091417.tgz#75dc5de2d3fe0858b96872f58baa6249c1d1de1f" + integrity sha512-srH4BDpZxElJxEyu9AiiwNLqeBQRWAQEGNs+NQZVGEF2gqok5qsW8d4HtWyg8vJKHRNmroE2DYnYDJVKsOTpMg== optionalDependencies: - "@rspack/binding-darwin-arm64" "1.0.7" - "@rspack/binding-darwin-x64" "1.0.7" - "@rspack/binding-linux-arm64-gnu" "1.0.7" - "@rspack/binding-linux-arm64-musl" "1.0.7" - "@rspack/binding-linux-x64-gnu" "1.0.7" - "@rspack/binding-linux-x64-musl" "1.0.7" - "@rspack/binding-win32-arm64-msvc" "1.0.7" - "@rspack/binding-win32-ia32-msvc" "1.0.7" - "@rspack/binding-win32-x64-msvc" "1.0.7" - -"@rspack/core@^1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.7.tgz#7e9905841f9e9904678c3282f1f062ae1e98669f" - integrity sha512-L3O0GDKasMmLtDkZrbfJI8OFJ5hmlLannoJ2hDR3LMq8tC/q0jIXTL7YIo7rStsudecCkcD7CH/Smm00itZSzg== + "@rspack/binding-darwin-arm64" "npm:@rspack/binding-darwin-arm64-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-darwin-x64" "npm:@rspack/binding-darwin-x64-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-linux-arm64-gnu" "npm:@rspack/binding-linux-arm64-gnu-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-linux-arm64-musl" "npm:@rspack/binding-linux-arm64-musl-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-linux-x64-gnu" "npm:@rspack/binding-linux-x64-gnu-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-linux-x64-musl" "npm:@rspack/binding-linux-x64-musl-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-win32-arm64-msvc" "npm:@rspack/binding-win32-arm64-msvc-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-win32-ia32-msvc" "npm:@rspack/binding-win32-ia32-msvc-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-win32-x64-msvc" "npm:@rspack/binding-win32-x64-msvc-canary@1.0.8-canary-8286125d-20240926091417" + +"@rspack/core@npm:@rspack/core-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/core-canary/-/core-canary-1.0.8-canary-8286125d-20240926091417.tgz#476df71f1c00ec483f3642b1d97a2462c8543880" + integrity sha512-ENh43U/aWIm6+rOxdd7cIfM+nD1OQKLPPE9yZVykDLY/wYeDH4xuj1sxlwtpGtsch684sn7PYh7o0bYrPoinQA== dependencies: "@module-federation/runtime-tools" "0.5.1" - "@rspack/binding" "1.0.7" - "@rspack/lite-tapable" "1.0.0" + "@rspack/binding" "npm:@rspack/binding-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/lite-tapable" "1.0.1" caniuse-lite "^1.0.30001616" -"@rspack/lite-tapable@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@rspack/lite-tapable/-/lite-tapable-1.0.0.tgz#160883693462f164d0e6ede22f32614673ef6429" - integrity sha512-7MZf4lburSUZoEenwazwUDKHhqyfnLCGnQ/tKcUtztfmVzfjZfRn/EaiT0AKkYGnL2U8AGsw89oUeVyvaOLVCw== +"@rspack/lite-tapable@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@rspack/lite-tapable/-/lite-tapable-1.0.1.tgz#d4540a5d28bd6177164bc0ba0bee4bdec0458591" + integrity sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w== "@sideway/address@^4.1.3": version "4.1.4" From 5bb213ee9a7a5543df4af2fe942b8d71984dcbb3 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 27 Sep 2024 16:35:47 +0200 Subject: [PATCH 43/56] re-add missing rspack dep + fix lockfile --- packages/docusaurus-faster/package.json | 1 + yarn.lock | 471 ++++++++++++++---------- 2 files changed, 285 insertions(+), 187 deletions(-) diff --git a/packages/docusaurus-faster/package.json b/packages/docusaurus-faster/package.json index f03dabcee295..5c04cad107ef 100644 --- a/packages/docusaurus-faster/package.json +++ b/packages/docusaurus-faster/package.json @@ -18,6 +18,7 @@ }, "license": "MIT", "dependencies": { + "@rspack/core": "npm:@rspack/core-canary@1.0.8-canary-8286125d-20240926091417", "@swc/core": "^1.7.28", "browserslist": "^4.24.0", "lightningcss": "^1.27.0", diff --git a/yarn.lock b/yarn.lock index a2108d968687..71eccae64ddc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2222,6 +2222,34 @@ dependencies: langium "3.0.0" +"@module-federation/runtime-tools@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/runtime-tools/-/runtime-tools-0.5.1.tgz#1b1f93837159a6bf0c0ba78730d589a5a8f74aa3" + integrity sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg== + dependencies: + "@module-federation/runtime" "0.5.1" + "@module-federation/webpack-bundler-runtime" "0.5.1" + +"@module-federation/runtime@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/runtime/-/runtime-0.5.1.tgz#b548a75e2068952ff66ad717cbf73fc921edd5d7" + integrity sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ== + dependencies: + "@module-federation/sdk" "0.5.1" + +"@module-federation/sdk@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/sdk/-/sdk-0.5.1.tgz#6c0a4053c23fa84db7aae7e4736496c541de7191" + integrity sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA== + +"@module-federation/webpack-bundler-runtime@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.5.1.tgz#ef626af0d57e3568c474d66d7d3797366e09cafd" + integrity sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA== + dependencies: + "@module-federation/runtime" "0.5.1" + "@module-federation/sdk" "0.5.1" + "@netlify/functions@^1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@netlify/functions/-/functions-1.6.0.tgz#c373423e6fef0e6f7422ac0345e8bbf2cb692366" @@ -2744,110 +2772,196 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rsdoctor/client@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/client/-/client-0.3.11.tgz#010fe58c0872f05e2d327f8c83053ab43fc40c23" - integrity sha512-mqbatlzgBMlz2C40fXCH7+oHFzDLzOD7yCvvLpolQ6AGwDADJK16fXVtvpBPLP3kzRgw+G4mDwy+UiAmAaCGaQ== - -"@rsdoctor/core@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/core/-/core-0.3.11.tgz#85730315425b9ececea6f64145ae04140c5bfdcd" - integrity sha512-+l9Kpjge+xpBKovc6aP7gtBPM6vGJRi475DOC6We5/AbnpI60Jt3wiJ0arEfgCZ7p8qNvTLsBYSY6CYJm4dDLw== - dependencies: - "@rsdoctor/graph" "0.3.11" - "@rsdoctor/sdk" "0.3.11" - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" - axios "^1.7.2" +"@rsdoctor/client@0.4.5": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@rsdoctor/client/-/client-0.4.5.tgz#4cf012c509b210c3419be033870af0dd5d7609c0" + integrity sha512-JzTBH4UAI70ftV5GfwF+oCs6Hf9Jq2FXerg9AlRwQgPpQoLLdke0tJYwvuEzSVxuVqAWKB3Z1mQwRm/fwo08xg== + +"@rsdoctor/core@0.4.5": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@rsdoctor/core/-/core-0.4.5.tgz#aab0195ff00b569543242fb402745fc1b398492a" + integrity sha512-5KiDjIKK4psRRPeCwIcudKaTkR+rz854SezHqEhCnLAhsfOcFVDjfjyRFTyevdCaAnK6qnQgM3qNRuxiw+3kdw== + dependencies: + "@rsdoctor/graph" "0.4.5" + "@rsdoctor/sdk" "0.4.5" + "@rsdoctor/types" "0.4.5" + "@rsdoctor/utils" "0.4.5" + axios "^1.7.7" enhanced-resolve "5.12.0" - filesize "^10.1.4" + filesize "^10.1.6" fs-extra "^11.1.1" - loader-utils "^2.0.4" lodash "^4.17.21" path-browserify "1.0.1" semver "^7.6.3" source-map "^0.7.4" webpack-bundle-analyzer "^4.10.2" - webpack-sources "^3.2.3" -"@rsdoctor/graph@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/graph/-/graph-0.3.11.tgz#b8d1a6452545e36b508285fc98b5776d074479f4" - integrity sha512-1WDLgwA0TWUS8NIPsV1eTbXH0UMNbLoYDLGSiaUVrwnl90cQsajaEUkwMcKu9VU3YVC4ayjwG6/RCrPlRqE4bw== +"@rsdoctor/graph@0.4.5": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@rsdoctor/graph/-/graph-0.4.5.tgz#b730bdcb2f4fc340f32faa0e95215fac264c1306" + integrity sha512-ugDDVoWJZ1djlqE0F9tJPNmFXCA6j49oCPeL7fIhYcxayQlrMiQOCHmgqbD84QFCuOJoyCHm44w6y+BAs9nTgw== dependencies: - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" + "@rsdoctor/types" "0.4.5" + "@rsdoctor/utils" "0.4.5" lodash "^4.17.21" socket.io "4.7.2" source-map "^0.7.4" -"@rsdoctor/sdk@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/sdk/-/sdk-0.3.11.tgz#58bb83b077ed167b5f29b6835ead9e78fbd718c3" - integrity sha512-ys9lTasYm9ecvj0oUbQuSpnULqImYq9QET1LUtoVBa5QIpQBbxOOegWnBmSsDlH7LlFQYhqLl5DR9FdJ7yTmcw== +"@rsdoctor/rspack-plugin@^0.4.1": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@rsdoctor/rspack-plugin/-/rspack-plugin-0.4.5.tgz#c37b2bd340ae1bcc09bcd68f270b9271d89a21cd" + integrity sha512-pAKN2hS4s+47GXfolHwC+uAe8Dxh4Y/VWinMaxpZmnDt1LeUX2ynvz7Hy8r1Q5vaG1mC6FxdKMrEDGMB9Ck1WQ== dependencies: - "@rsdoctor/client" "0.3.11" - "@rsdoctor/graph" "0.3.11" - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" - body-parser "1.20.2" + "@rsdoctor/core" "0.4.5" + "@rsdoctor/graph" "0.4.5" + "@rsdoctor/sdk" "0.4.5" + "@rsdoctor/types" "0.4.5" + "@rsdoctor/utils" "0.4.5" + lodash "^4.17.21" + +"@rsdoctor/sdk@0.4.5": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@rsdoctor/sdk/-/sdk-0.4.5.tgz#63ae3c58ae3174bf065e759e09f278c42e595259" + integrity sha512-j5lQOJt0UOkLUU2fWyeL6kP/EZVZTavg/1p5hCBWlarYpUECl/iH2m/EDT1nxqrPf2tlxTaEfzTlGy9TH4Cm0w== + dependencies: + "@rsdoctor/client" "0.4.5" + "@rsdoctor/graph" "0.4.5" + "@rsdoctor/types" "0.4.5" + "@rsdoctor/utils" "0.4.5" + "@types/fs-extra" "^11.0.4" + body-parser "1.20.3" cors "2.8.5" - dayjs "1.11.12" + dayjs "1.11.13" + fs-extra "^11.1.1" lodash "^4.17.21" open "^8.4.2" - serve-static "1.15.0" + serve-static "1.16.2" socket.io "4.7.2" source-map "^0.7.4" tapable "2.2.1" -"@rsdoctor/types@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/types/-/types-0.3.11.tgz#d2a37650476bbf7a9d63d951bc0499c8a9b72ac4" - integrity sha512-BH+P5RekIQy3VqFswsTkSB5yeZBYTbMNIlVq1chHhIQcF0Hpd9fuUjFG59NJgBILZoL2vknUhBfhmiv2WEOYig== +"@rsdoctor/types@0.4.5": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@rsdoctor/types/-/types-0.4.5.tgz#c30ba651ec9c4edb72024340a20879eb2a9de49f" + integrity sha512-KZamdG7Vc7d26DkPizO5EKvSeI+OFR35UcyMxRfiswDAo3EJJxtuebKh8TsHDBDvYNhOgAWTT5DcvouhBYJRhg== dependencies: "@types/connect" "3.4.38" "@types/estree" "1.0.5" "@types/tapable" "2.2.7" - "@types/webpack" "5.28.5" source-map "^0.7.4" -"@rsdoctor/utils@0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/utils/-/utils-0.3.11.tgz#650b2b8cf2c4d38a0f35d05f13625965c467d185" - integrity sha512-S1h/rG3wPFjHE9AffGjBGxPhP1j8X23KZKiyYnYHiOTCHxnYTyBqRJXUA0OvGewFY9zi7ucz800y+s0G1ujGyg== +"@rsdoctor/utils@0.4.5": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@rsdoctor/utils/-/utils-0.4.5.tgz#269e6c8cd5aedeeed3387966c418373fce1a0b3c" + integrity sha512-ueEpGDRCufy2s60Q4mI83qYEroeaELFQr3QdxCCjC+BJylRNJiPYe9fb1o6gnSWHw2QKhCC/HUPLcz+twbMvyg== dependencies: "@babel/code-frame" "7.24.7" - "@rsdoctor/types" "0.3.11" + "@rsdoctor/types" "0.4.5" "@types/estree" "1.0.5" acorn "^8.10.0" acorn-import-assertions "1.9.0" - acorn-walk "8.3.3" + acorn-walk "8.3.4" chalk "^4.1.2" connect "3.7.0" deep-eql "4.1.4" - envinfo "7.13.0" - filesize "^10.1.4" + envinfo "7.14.0" + filesize "^10.1.6" fs-extra "^11.1.1" get-port "5.1.1" json-stream-stringify "3.0.1" lines-and-columns "2.0.4" lodash "^4.17.21" - rslog "^1.2.2" + rslog "^1.2.3" strip-ansi "^6.0.1" -"@rsdoctor/webpack-plugin@^0.3.11": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@rsdoctor/webpack-plugin/-/webpack-plugin-0.3.11.tgz#b5f43b7c3c8c365e379dbd5a51bfae284aee61b4" - integrity sha512-Gqr5GMOhHkJl9rtsbnCZV5mXuvsfpRtg735cRie9eT1E/dMpHerIGZFRGRIMPNkLAd/lfe0KwrGRZknWX9M/zQ== +"@rsdoctor/webpack-plugin@^0.4.1": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@rsdoctor/webpack-plugin/-/webpack-plugin-0.4.5.tgz#58084b2f254da615a60044d369f74f3a857f11c1" + integrity sha512-SFaLvi6I53KRfHwYnAomi5pU9ZnBtpmfQpEl7L8HzxyAtfNRNFGPl+WFOM4V6xiE6JguffJcm0j6DkClGF5TUQ== dependencies: - "@rsdoctor/core" "0.3.11" - "@rsdoctor/graph" "0.3.11" - "@rsdoctor/sdk" "0.3.11" - "@rsdoctor/types" "0.3.11" - "@rsdoctor/utils" "0.3.11" + "@rsdoctor/core" "0.4.5" + "@rsdoctor/graph" "0.4.5" + "@rsdoctor/sdk" "0.4.5" + "@rsdoctor/types" "0.4.5" + "@rsdoctor/utils" "0.4.5" fs-extra "^11.1.1" lodash "^4.17.21" +"@rspack/binding-darwin-arm64@npm:@rspack/binding-darwin-arm64-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64-canary/-/binding-darwin-arm64-canary-1.0.8-canary-8286125d-20240926091417.tgz#82e9384e1691a1c5344f093489e9db1926ab008d" + integrity sha512-YnDDQi9LQLzu8DrF45dQ4QhihmPXXcZd+vuDQ1GNtcjfKYWBdJE9ylJ+Hq4KH+3BeU2RJQfiDEKYMpXv56v7/A== + +"@rspack/binding-darwin-x64@npm:@rspack/binding-darwin-x64-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64-canary/-/binding-darwin-x64-canary-1.0.8-canary-8286125d-20240926091417.tgz#22133e2a636cee9b2bcdbc48d9b47219a12f63bd" + integrity sha512-j7mlSCGStCmjEHhy5zcxeh2UJpVaf+O5nMR4PcO7r6I0JybZL2mEisJlPunSR/vi5KLwl65cRsH6/EEFYXMn3w== + +"@rspack/binding-linux-arm64-gnu@npm:@rspack/binding-linux-arm64-gnu-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu-canary/-/binding-linux-arm64-gnu-canary-1.0.8-canary-8286125d-20240926091417.tgz#b1a4b4f1ea01d3cbedc380dd22a4d03b09fdfab1" + integrity sha512-3PbiHHB60FRo251t85kTZGPQw44hWU2TptRbhjb3BXIKHxH4sU/githgKCClXGLKaJs7ZcwJnYpjJ7MI8erfbg== + +"@rspack/binding-linux-arm64-musl@npm:@rspack/binding-linux-arm64-musl-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl-canary/-/binding-linux-arm64-musl-canary-1.0.8-canary-8286125d-20240926091417.tgz#bc28e1dba6d32c795ea6a3a0a73e029a625444c7" + integrity sha512-aJZZDJIXOpDMubszDoG0aBF3b9xZbEL792JB6sinc1VX+Za2VTc9Fa8sf/OuCswM8LHaIkjyujubhrWyq0kw4A== + +"@rspack/binding-linux-x64-gnu@npm:@rspack/binding-linux-x64-gnu-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu-canary/-/binding-linux-x64-gnu-canary-1.0.8-canary-8286125d-20240926091417.tgz#ec5e9c7dcc4bfd51476da0177ad465554a1e3f92" + integrity sha512-/BkwwD/w60u8H77boKipxhwK+u887Lbw2W97vqfo82bHWmII93rxjwe3Hap+w5WxmDNqUI3vAZl+gIqv483nGg== + +"@rspack/binding-linux-x64-musl@npm:@rspack/binding-linux-x64-musl-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl-canary/-/binding-linux-x64-musl-canary-1.0.8-canary-8286125d-20240926091417.tgz#8d104dc3c1c947ecb1ddd00de62358c0f68b0b4a" + integrity sha512-MW7ZUtLVqzxz8/39e7fJ7qhi6RtrTZ3/R7ZjUWSGXPm+BGtG6ZfJB7Gn5UDwaG8agETuVnWZqpu/hYoldYbIMw== + +"@rspack/binding-win32-arm64-msvc@npm:@rspack/binding-win32-arm64-msvc-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc-canary/-/binding-win32-arm64-msvc-canary-1.0.8-canary-8286125d-20240926091417.tgz#06f98ceb92f496c94715ff4881216803fb55a440" + integrity sha512-1+ifQTv2nerxJHJQrYKSgUIEE7cRI+o00sVPTZGAdXEVq3sSO2e1zignHnO0lmDw2ZfxgXveGKAQMhwnc7Hr+A== + +"@rspack/binding-win32-ia32-msvc@npm:@rspack/binding-win32-ia32-msvc-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc-canary/-/binding-win32-ia32-msvc-canary-1.0.8-canary-8286125d-20240926091417.tgz#f29d3fa73322cfccc86eabf5b60ea19d0b168659" + integrity sha512-H+9+azOw0TxgLLqg+t+/qf1WngnBNYnroKOAv62xiNrCTk+iQkXCEeT89J/kuZzS3MMIE7j7Q0Zztw/m/LzTPw== + +"@rspack/binding-win32-x64-msvc@npm:@rspack/binding-win32-x64-msvc-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc-canary/-/binding-win32-x64-msvc-canary-1.0.8-canary-8286125d-20240926091417.tgz#d3e19539e9df4f1a92845016de93c93f33907eb3" + integrity sha512-fhYdSxW21TtEgWYic2MgtVjGvFSWJYTVkdmyS2ZyqQOFeoAh2oV/rUjYA4FBKheUSiTUfA1OnwrKMDQOFOLgNw== + +"@rspack/binding@npm:@rspack/binding-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/binding-canary/-/binding-canary-1.0.8-canary-8286125d-20240926091417.tgz#75dc5de2d3fe0858b96872f58baa6249c1d1de1f" + integrity sha512-srH4BDpZxElJxEyu9AiiwNLqeBQRWAQEGNs+NQZVGEF2gqok5qsW8d4HtWyg8vJKHRNmroE2DYnYDJVKsOTpMg== + optionalDependencies: + "@rspack/binding-darwin-arm64" "npm:@rspack/binding-darwin-arm64-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-darwin-x64" "npm:@rspack/binding-darwin-x64-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-linux-arm64-gnu" "npm:@rspack/binding-linux-arm64-gnu-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-linux-arm64-musl" "npm:@rspack/binding-linux-arm64-musl-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-linux-x64-gnu" "npm:@rspack/binding-linux-x64-gnu-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-linux-x64-musl" "npm:@rspack/binding-linux-x64-musl-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-win32-arm64-msvc" "npm:@rspack/binding-win32-arm64-msvc-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-win32-ia32-msvc" "npm:@rspack/binding-win32-ia32-msvc-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding-win32-x64-msvc" "npm:@rspack/binding-win32-x64-msvc-canary@1.0.8-canary-8286125d-20240926091417" + +"@rspack/core@npm:@rspack/core-canary@1.0.8-canary-8286125d-20240926091417": + version "1.0.8-canary-8286125d-20240926091417" + resolved "https://registry.yarnpkg.com/@rspack/core-canary/-/core-canary-1.0.8-canary-8286125d-20240926091417.tgz#476df71f1c00ec483f3642b1d97a2462c8543880" + integrity sha512-ENh43U/aWIm6+rOxdd7cIfM+nD1OQKLPPE9yZVykDLY/wYeDH4xuj1sxlwtpGtsch684sn7PYh7o0bYrPoinQA== + dependencies: + "@module-federation/runtime-tools" "0.5.1" + "@rspack/binding" "npm:@rspack/binding-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/lite-tapable" "1.0.1" + caniuse-lite "^1.0.30001616" + +"@rspack/lite-tapable@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@rspack/lite-tapable/-/lite-tapable-1.0.1.tgz#d4540a5d28bd6177164bc0ba0bee4bdec0458591" + integrity sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w== + "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" @@ -3042,74 +3156,74 @@ "@svgr/plugin-jsx" "8.1.0" "@svgr/plugin-svgo" "8.1.0" -"@swc/core-darwin-arm64@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.14.tgz#a4530ec755ea183802cc9dfe4900ab5f6a327fea" - integrity sha512-V0OUXjOH+hdGxDYG8NkQzy25mKOpcNKFpqtZEzLe5V/CpLJPnpg1+pMz70m14s9ZFda9OxsjlvPbg1FLUwhgIQ== - -"@swc/core-darwin-x64@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.14.tgz#2c9c717fd28dd1dde9c21cf58b01f1cda7976b1a" - integrity sha512-9iFvUnxG6FC3An5ogp5jbBfQuUmTTwy8KMB+ZddUoPB3NR1eV+Y9vOh/tfWcenSJbgOKDLgYC5D/b1mHAprsrQ== - -"@swc/core-linux-arm-gnueabihf@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.14.tgz#fed055c9c65347177c8df88720f8a51793a4df06" - integrity sha512-zGJsef9qPivKSH8Vv4F/HiBXBTHZ5Hs3ZjVGo/UIdWPJF8fTL9OVADiRrl34Q7zOZEtGXRwEKLUW1SCQcbDvZA== - -"@swc/core-linux-arm64-gnu@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.14.tgz#ca740c8ea26f041b2dc43ba87facec452052814f" - integrity sha512-AxV3MPsoI7i4B8FXOew3dx3N8y00YoJYvIPfxelw07RegeCEH3aHp2U2DtgbP/NV1ugZMx0TL2Z2DEvocmA51g== - -"@swc/core-linux-arm64-musl@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.14.tgz#fbc6fed24f5ad58b948e5b7abe6cd1f07112bef1" - integrity sha512-JDLdNjUj3zPehd4+DrQD8Ltb3B5lD8D05IwePyDWw+uR/YPc7w/TX1FUVci5h3giJnlMCJRvi1IQYV7K1n7KtQ== - -"@swc/core-linux-x64-gnu@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.14.tgz#509a37833e4fbf89506b9291d9bd131fa2017fca" - integrity sha512-Siy5OvPCLLWmMdx4msnEs8HvEVUEigSn0+3pbLjv78iwzXd0qSBNHUPZyC1xeurVaUbpNDxZTpPRIwpqNE2+Og== - -"@swc/core-linux-x64-musl@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.14.tgz#81156cc6ff814ad4b8fcf6eb6658d3f247db0b57" - integrity sha512-FtEGm9mwtRYQNK43WMtUIadxHs/ja2rnDurB99os0ZoFTGG2IHuht2zD97W0wB8JbqEabT1XwSG9Y5wmN+ciEQ== - -"@swc/core-win32-arm64-msvc@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.14.tgz#c605fa783b5fbe1fff784ace4c4bb074b8d6026d" - integrity sha512-Jp8KDlfq7Ntt2/BXr0y344cYgB1zf0DaLzDZ1ZJR6rYlAzWYSccLYcxHa97VGnsYhhPspMpmCvHid97oe2hl4A== - -"@swc/core-win32-ia32-msvc@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.14.tgz#3e15dc3b662c9fab851a38b3e271c8e2da4ba03a" - integrity sha512-I+cFsXF0OU0J9J4zdWiQKKLURO5dvCujH9Jr8N0cErdy54l9d4gfIxdctfTF+7FyXtWKLTCkp+oby9BQhkFGWA== - -"@swc/core-win32-x64-msvc@1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.14.tgz#83958d92e9f07865ec9365212111fbc295660f0d" - integrity sha512-NNrprQCK6d28mG436jVo2TD+vACHseUECacEBGZ9Ef0qfOIWS1XIt2MisQKG0Oea2VvLFl6tF/V4Lnx/H0Sn3Q== - -"@swc/core@^1.7.14": - version "1.7.14" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.7.14.tgz#d10492b5a4168cb1e73cf561a315e8b0f62255ed" - integrity sha512-9aeXeifnyuvc2pcuuhPQgVUwdpGEzZ+9nJu0W8/hNl/aESFsJGR5i9uQJRGu0atoNr01gK092fvmqMmQAPcKow== +"@swc/core-darwin-arm64@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.28.tgz#f4ff1c09443a0040a29c7e1e7615f5f5642b6945" + integrity sha512-BNkj6enHo2pdzOpCtQGKZbXT2A/qWIr0CVtbTM4WkJ3MCK/glbFsyO6X59p1r8+gfaZG4bWYnTTu+RuUAcsL5g== + +"@swc/core-darwin-x64@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.28.tgz#ce0a6d559084a794517a81457cdadbf61a55c55d" + integrity sha512-96zQ+X5Fd6P/RNPkOyikTJgEc2M4TzznfYvjRd2hye5h22jhxCLL/csoauDgN7lYfd7mwsZ/sVXwJTMKl+vZSA== + +"@swc/core-linux-arm-gnueabihf@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.28.tgz#501375ac84c61dc718ed07239c7e44972f6c44e0" + integrity sha512-l2100Wx6LdXMOmOW3+KoHhBhyZrGdz8ylkygcVOC0QHp6YIATfuG+rRHksfyEWCSOdL3anM9MJZJX26KT/s+XQ== + +"@swc/core-linux-arm64-gnu@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.28.tgz#75e99da625939627f5b45d3004a6cfd8d6cbf46e" + integrity sha512-03m6iQ5Bv9u2VPnNRyaBmE8eHi056eE39L0gXcqGoo46GAGuoqYHt9pDz8wS6EgoN4t85iBMUZrkCNqFKkN6ZQ== + +"@swc/core-linux-arm64-musl@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.28.tgz#c737def355c0bf8db7d8e7bd87a3ae8bb3f9f8fc" + integrity sha512-vqVOpG/jc8mvTKQjaPBLhr7tnWyzuztOHsPnJqMWmg7zGcMeQC/2c5pU4uzRAfXMTp25iId6s4Y4wWfPS1EeDw== + +"@swc/core-linux-x64-gnu@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.28.tgz#eb612272ceb1331310eb79ef6094c5a6cc085d23" + integrity sha512-HGwpWuB83Kr+V0E+zT5UwIIY9OxiS8aLd0UVMRVWuO8SrQyKm9HKJ46+zoAb8tfJrpZftfxvbn2ayZWR7gqosA== + +"@swc/core-linux-x64-musl@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.28.tgz#a39749a71e690685aabeb7fd60141ccca2e62411" + integrity sha512-q2Y2T8y8EgFtIiRyInnAXNe94aaHX74F0ha1Bl9VdRxE0u1/So+3VLbPvtp4V3Z6pj5pOePfCQJKifnllgAQ9A== + +"@swc/core-win32-arm64-msvc@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.28.tgz#93b22667b027e0a5060c91df7e0cc7406d27b01f" + integrity sha512-bCqh4uBT/59h3dWK1v91In6qzz8rKoWoFRxCtNQLIK4jP55K0U231ZK9oN7neZD6bzcOUeFvOGgcyMAgDfFWfA== + +"@swc/core-win32-ia32-msvc@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.28.tgz#4d7dbc43a1de79ac0c7cccf35bebf9fe887b2e24" + integrity sha512-XTHbHrksnrqK3JSJ2sbuMWvdJ6/G0roRpgyVTmNDfhTYPOwcVaL/mSrPGLwbksYUbq7ckwoKzrobhdxvQzPsDA== + +"@swc/core-win32-x64-msvc@1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.28.tgz#d00acea3339a90768279096e6e5f1540c599e6ce" + integrity sha512-jyXeoq6nX8abiCy2EpporsC5ywNENs4ocYuvxo1LSxDktWN1E2MTXq3cdJcEWB2Vydxq0rDcsGyzkRPMzFhkZw== + +"@swc/core@^1.7.14", "@swc/core@^1.7.28": + version "1.7.28" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.7.28.tgz#74aec7a31344da7cfd305a09f14f22420351d495" + integrity sha512-XapcMgsOS0cKh01AFEj+qXOk6KM4NZhp7a5vPicdhkRR8RzvjrCa7DTtijMxfotU8bqaEHguxmiIag2HUlT8QQ== dependencies: "@swc/counter" "^0.1.3" "@swc/types" "^0.1.12" optionalDependencies: - "@swc/core-darwin-arm64" "1.7.14" - "@swc/core-darwin-x64" "1.7.14" - "@swc/core-linux-arm-gnueabihf" "1.7.14" - "@swc/core-linux-arm64-gnu" "1.7.14" - "@swc/core-linux-arm64-musl" "1.7.14" - "@swc/core-linux-x64-gnu" "1.7.14" - "@swc/core-linux-x64-musl" "1.7.14" - "@swc/core-win32-arm64-msvc" "1.7.14" - "@swc/core-win32-ia32-msvc" "1.7.14" - "@swc/core-win32-x64-msvc" "1.7.14" + "@swc/core-darwin-arm64" "1.7.28" + "@swc/core-darwin-x64" "1.7.28" + "@swc/core-linux-arm-gnueabihf" "1.7.28" + "@swc/core-linux-arm64-gnu" "1.7.28" + "@swc/core-linux-arm64-musl" "1.7.28" + "@swc/core-linux-x64-gnu" "1.7.28" + "@swc/core-linux-x64-musl" "1.7.28" + "@swc/core-win32-arm64-msvc" "1.7.28" + "@swc/core-win32-ia32-msvc" "1.7.28" + "@swc/core-win32-x64-msvc" "1.7.28" "@swc/counter@^0.1.3": version "0.1.3" @@ -3380,6 +3494,14 @@ dependencies: "@types/webpack" "^4" +"@types/fs-extra@^11.0.4": + version "11.0.4" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-11.0.4.tgz#e16a863bb8843fba8c5004362b5a73e17becca45" + integrity sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ== + dependencies: + "@types/jsonfile" "*" + "@types/node" "*" + "@types/fs-extra@^9.0.13": version "9.0.13" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" @@ -3515,6 +3637,13 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== +"@types/jsonfile@*": + version "6.1.4" + resolved "https://registry.yarnpkg.com/@types/jsonfile/-/jsonfile-6.1.4.tgz#614afec1a1164e7d670b4a7ad64df3e7beb7b702" + integrity sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ== + dependencies: + "@types/node" "*" + "@types/katex@^0.16.0": version "0.16.1" resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.16.1.tgz#e1faa29f131c241a7669e65bdf8ce470c9c4e3a9" @@ -3889,15 +4018,6 @@ "@types/source-list-map" "*" source-map "^0.7.3" -"@types/webpack@5.28.5": - version "5.28.5" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-5.28.5.tgz#0e9d9a15efa09bbda2cef41356ca4ac2031ea9a2" - integrity sha512-wR87cgvxj3p6D0Crt1r5avwqffqPXUkNlnQ1mjU93G7gCuFjufZR4I6j8cz5g1F1tTYpfOOFvly+cmIQwL9wvw== - dependencies: - "@types/node" "*" - tapable "^2.2.0" - webpack "^5" - "@types/webpack@^4": version "4.41.33" resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.33.tgz#16164845a5be6a306bcbe554a8e67f9cac215ffc" @@ -4254,10 +4374,10 @@ acorn-jsx@^5.0.0, acorn-jsx@^5.0.1, acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@8.3.3, acorn-walk@^8.0.0, acorn-walk@^8.0.2: - version "8.3.3" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" - integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== +acorn-walk@8.3.4, acorn-walk@^8.0.0, acorn-walk@^8.0.2: + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== dependencies: acorn "^8.11.0" @@ -4641,10 +4761,10 @@ axe-core@^4.6.2: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.2.tgz#040a7342b20765cb18bb50b628394c21bccc17a0" integrity sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g== -axios@^1, axios@^1.0.0, axios@^1.5.0, axios@^1.7.2: - version "1.7.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.4.tgz#4c8ded1b43683c8dd362973c393f3ede24052aa2" - integrity sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw== +axios@^1, axios@^1.0.0, axios@^1.5.0, axios@^1.7.7: + version "1.7.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" + integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -4858,24 +4978,6 @@ bluebird@~3.4.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" integrity sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA== -body-parser@1.20.2: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - body-parser@1.20.3: version "1.20.3" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" @@ -5186,7 +5288,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001646, caniuse-lite@^1.0.30001663: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001616, caniuse-lite@^1.0.30001646, caniuse-lite@^1.0.30001663: version "1.0.30001664" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz#d588d75c9682d3301956b05a3749652a80677df4" integrity sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g== @@ -6685,12 +6787,7 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -dayjs@1.11.12: - version "1.11.12" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.12.tgz#5245226cc7f40a15bf52e0b99fd2a04669ccac1d" - integrity sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg== - -dayjs@^1.11.10: +dayjs@1.11.13, dayjs@^1.11.10: version "1.11.13" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== @@ -7226,10 +7323,10 @@ env-paths@^2.2.0, env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== -envinfo@7.13.0, envinfo@^7.7.4: - version "7.13.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" - integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== +envinfo@7.14.0, envinfo@^7.7.4: + version "7.14.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.14.0.tgz#26dac5db54418f2a4c1159153a0b2ae980838aae" + integrity sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg== equals@^1.0.5: version "1.0.5" @@ -8008,10 +8105,10 @@ filelist@^1.0.4: dependencies: minimatch "^5.0.1" -filesize@^10.1.4: - version "10.1.4" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-10.1.4.tgz#184f256063a201f08b6e6b3cc47d21b60f5b8d89" - integrity sha512-ryBwPIIeErmxgPnm6cbESAzXjuEFubs+yKYLBZvg3CaiNcmkJChoOGcBSrZ6IwkMwPABwPpVXE6IlNdGJJrvEg== +filesize@^10.1.6: + version "10.1.6" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-10.1.6.tgz#31194da825ac58689c0bce3948f33ce83aabd361" + integrity sha512-sJslQKU2uM33qH5nqewAwVB2QgR6w1aMNsYUp3aN5rMRyXEwJGmZvaWzeJFNTOXWlHQyBFCWrdj3fV/fsTOX8w== filesize@^8.0.6: version "8.0.7" @@ -10893,7 +10990,7 @@ loader-runner@^4.2.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== -loader-utils@^2.0.0, loader-utils@^2.0.4: +loader-utils@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== @@ -14902,10 +14999,10 @@ roughjs@^4.6.6: points-on-curve "^0.2.0" points-on-path "^0.2.1" -rslog@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/rslog/-/rslog-1.2.2.tgz#057791013c1de27d1d8b0728a766688d11c13830" - integrity sha512-tZP8KjrI1nz6qOYCrFxAV7cfmfS2GV94jotU2zOmF/6ByO1zNvGR6/+0inylpjqyBjAdnnutTUW0m4th06bSTw== +rslog@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/rslog/-/rslog-1.2.3.tgz#9114d93056312fbe35c11b3fea3f2774a7debe56" + integrity sha512-antALPJaKBRPBU1X2q9t085K4htWDOOv/K1qhTUk7h0l1ePU/KbDqKJn19eKP0dk7PqMioeA0+fu3gyPXCsXxQ== rtl-detect@^1.0.4: version "1.0.4" @@ -15188,16 +15285,6 @@ serve-index@^1.9.1: mime-types "~2.1.17" parseurl "~1.3.2" -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - serve-static@1.16.0: version "1.16.0" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.0.tgz#2bf4ed49f8af311b519c46f272bf6ac3baf38a92" @@ -15208,6 +15295,16 @@ serve-static@1.16.0: parseurl "~1.3.3" send "0.18.0" +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== + dependencies: + encodeurl "~2.0.0" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.19.0" + server-only@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/server-only/-/server-only-0.0.1.tgz#0f366bb6afb618c37c9255a314535dc412cd1c9e" From 4eacf9fe07ab85df4b6c5e98b445e64af52fddf5 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 27 Sep 2024 19:18:18 +0200 Subject: [PATCH 44/56] Wire browserslist to LightningCSS built-in targets --- packages/docusaurus-bundler/src/importFaster.ts | 5 +++++ packages/docusaurus-bundler/src/minification.ts | 14 +++++++++++++- packages/docusaurus-faster/src/index.ts | 11 ++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-bundler/src/importFaster.ts b/packages/docusaurus-bundler/src/importFaster.ts index 1657d581aa8b..2c8c0635f468 100644 --- a/packages/docusaurus-bundler/src/importFaster.ts +++ b/packages/docusaurus-bundler/src/importFaster.ts @@ -47,6 +47,11 @@ export async function importSwcJsMinimizerOptions(): Promise< return faster.getSwcJsMinimizerOptions() as JsMinimizerOptions; } +export async function importBrowserslistQueries(): Promise { + const faster = await ensureFaster(); + return faster.getBrowserslistQueries(); +} + export async function importLightningCssMinimizerOptions(): Promise< CssMinimizerOptions > { diff --git a/packages/docusaurus-bundler/src/minification.ts b/packages/docusaurus-bundler/src/minification.ts index 44df4c090890..193608935513 100644 --- a/packages/docusaurus-bundler/src/minification.ts +++ b/packages/docusaurus-bundler/src/minification.ts @@ -10,6 +10,7 @@ import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'; import { importSwcJsMinimizerOptions, importLightningCssMinimizerOptions, + importBrowserslistQueries, } from './importFaster'; import type {CustomOptions, CssNanoOptions} from 'css-minimizer-webpack-plugin'; import type {WebpackPluginInstance} from 'webpack'; @@ -137,11 +138,22 @@ async function getWebpackMinimizers( async function getRspackMinimizers({ currentBundler, }: MinimizersConfig): Promise { + const browserslistQueries = await importBrowserslistQueries(); return [ // @ts-expect-error: Rspack has this built-in new currentBundler.instance.SwcJsMinimizerRspackPlugin(), // @ts-expect-error: Rspack has this built-in - new currentBundler.instance.LightningCssMinimizerRspackPlugin(), + new currentBundler.instance.LightningCssMinimizerRspackPlugin({ + minimizerOptions: { + ...(await importLightningCssMinimizerOptions()), + // Not sure why but Rspack takes browserslist queries directly + // While LightningCSS targets are normally not browserslist queries + // We have to override the option to avoid errors + // See https://rspack.dev/plugins/rspack/lightning-css-minimizer-rspack-plugin#minimizeroptions + // See https://lightningcss.dev/transpilation.html + targets: browserslistQueries, + }, + }), ]; } diff --git a/packages/docusaurus-faster/src/index.ts b/packages/docusaurus-faster/src/index.ts index a8e53c6f7684..667bf0e7f83e 100644 --- a/packages/docusaurus-faster/src/index.ts +++ b/packages/docusaurus-faster/src/index.ts @@ -63,6 +63,15 @@ export function getSwcJsMinimizerOptions(): JsMinifyOptions { }; } +export function getBrowserslistQueries(): string[] { + // Not sure why browserslist has no direct method to retrieve queries + const configFile = browserslist.findConfigFile(process.cwd()); + const queries = browserslist.loadConfig({path: configFile}) ?? [ + ...browserslist.defaults, + ]; + return queries; +} + // LightningCSS doesn't expose any type for css-minimizer-webpack-plugin setup // So we derive it ourselves // see https://lightningcss.dev/docs.html#with-webpack @@ -72,6 +81,6 @@ type LightningCssMinimizerOptions = Omit< >; export function getLightningCssMinimizerOptions(): LightningCssMinimizerOptions { - const queries = browserslist(); + const queries = browserslist(getBrowserslistQueries()); return {targets: lightningcss.browserslistToTargets(queries)}; } From e23b63ee2223edefb8f784255e5e0ef93bd80d40 Mon Sep 17 00:00:00 2001 From: sebastien Date: Mon, 30 Sep 2024 10:08:39 +0200 Subject: [PATCH 45/56] restore dynamic require usage --- .../src/theme/prism-include-languages.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts b/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts index d7da9196fdf2..a91d36bc3260 100644 --- a/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts +++ b/packages/docusaurus-theme-classic/src/theme/prism-include-languages.ts @@ -30,10 +30,8 @@ export default function prismIncludeLanguages( // eslint-disable-next-line global-require require('prismjs/components/prism-markup-templating.js'); } - - // TODO fix this for Rspack - - // require(`prismjs/components/prism-${lang}`); + // eslint-disable-next-line global-require, import/no-dynamic-require + require(`prismjs/components/prism-${lang}`); }); delete (globalThis as Optional).Prism; From 097ed540ccb93d873c22963146f346b62e6c4389 Mon Sep 17 00:00:00 2001 From: sebastien Date: Mon, 30 Sep 2024 10:13:03 +0200 Subject: [PATCH 46/56] Rspack 1.0.8 --- packages/docusaurus-faster/package.json | 2 +- yarn.lock | 128 ++++++++++++------------ 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/packages/docusaurus-faster/package.json b/packages/docusaurus-faster/package.json index 5c04cad107ef..be19b3a3c36d 100644 --- a/packages/docusaurus-faster/package.json +++ b/packages/docusaurus-faster/package.json @@ -18,7 +18,7 @@ }, "license": "MIT", "dependencies": { - "@rspack/core": "npm:@rspack/core-canary@1.0.8-canary-8286125d-20240926091417", + "@rspack/core": "^1.0.8", "@swc/core": "^1.7.28", "browserslist": "^4.24.0", "lightningcss": "^1.27.0", diff --git a/yarn.lock b/yarn.lock index 71eccae64ddc..db466850601b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2887,73 +2887,73 @@ fs-extra "^11.1.1" lodash "^4.17.21" -"@rspack/binding-darwin-arm64@npm:@rspack/binding-darwin-arm64-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64-canary/-/binding-darwin-arm64-canary-1.0.8-canary-8286125d-20240926091417.tgz#82e9384e1691a1c5344f093489e9db1926ab008d" - integrity sha512-YnDDQi9LQLzu8DrF45dQ4QhihmPXXcZd+vuDQ1GNtcjfKYWBdJE9ylJ+Hq4KH+3BeU2RJQfiDEKYMpXv56v7/A== - -"@rspack/binding-darwin-x64@npm:@rspack/binding-darwin-x64-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64-canary/-/binding-darwin-x64-canary-1.0.8-canary-8286125d-20240926091417.tgz#22133e2a636cee9b2bcdbc48d9b47219a12f63bd" - integrity sha512-j7mlSCGStCmjEHhy5zcxeh2UJpVaf+O5nMR4PcO7r6I0JybZL2mEisJlPunSR/vi5KLwl65cRsH6/EEFYXMn3w== - -"@rspack/binding-linux-arm64-gnu@npm:@rspack/binding-linux-arm64-gnu-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu-canary/-/binding-linux-arm64-gnu-canary-1.0.8-canary-8286125d-20240926091417.tgz#b1a4b4f1ea01d3cbedc380dd22a4d03b09fdfab1" - integrity sha512-3PbiHHB60FRo251t85kTZGPQw44hWU2TptRbhjb3BXIKHxH4sU/githgKCClXGLKaJs7ZcwJnYpjJ7MI8erfbg== - -"@rspack/binding-linux-arm64-musl@npm:@rspack/binding-linux-arm64-musl-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl-canary/-/binding-linux-arm64-musl-canary-1.0.8-canary-8286125d-20240926091417.tgz#bc28e1dba6d32c795ea6a3a0a73e029a625444c7" - integrity sha512-aJZZDJIXOpDMubszDoG0aBF3b9xZbEL792JB6sinc1VX+Za2VTc9Fa8sf/OuCswM8LHaIkjyujubhrWyq0kw4A== - -"@rspack/binding-linux-x64-gnu@npm:@rspack/binding-linux-x64-gnu-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu-canary/-/binding-linux-x64-gnu-canary-1.0.8-canary-8286125d-20240926091417.tgz#ec5e9c7dcc4bfd51476da0177ad465554a1e3f92" - integrity sha512-/BkwwD/w60u8H77boKipxhwK+u887Lbw2W97vqfo82bHWmII93rxjwe3Hap+w5WxmDNqUI3vAZl+gIqv483nGg== - -"@rspack/binding-linux-x64-musl@npm:@rspack/binding-linux-x64-musl-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl-canary/-/binding-linux-x64-musl-canary-1.0.8-canary-8286125d-20240926091417.tgz#8d104dc3c1c947ecb1ddd00de62358c0f68b0b4a" - integrity sha512-MW7ZUtLVqzxz8/39e7fJ7qhi6RtrTZ3/R7ZjUWSGXPm+BGtG6ZfJB7Gn5UDwaG8agETuVnWZqpu/hYoldYbIMw== - -"@rspack/binding-win32-arm64-msvc@npm:@rspack/binding-win32-arm64-msvc-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc-canary/-/binding-win32-arm64-msvc-canary-1.0.8-canary-8286125d-20240926091417.tgz#06f98ceb92f496c94715ff4881216803fb55a440" - integrity sha512-1+ifQTv2nerxJHJQrYKSgUIEE7cRI+o00sVPTZGAdXEVq3sSO2e1zignHnO0lmDw2ZfxgXveGKAQMhwnc7Hr+A== - -"@rspack/binding-win32-ia32-msvc@npm:@rspack/binding-win32-ia32-msvc-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc-canary/-/binding-win32-ia32-msvc-canary-1.0.8-canary-8286125d-20240926091417.tgz#f29d3fa73322cfccc86eabf5b60ea19d0b168659" - integrity sha512-H+9+azOw0TxgLLqg+t+/qf1WngnBNYnroKOAv62xiNrCTk+iQkXCEeT89J/kuZzS3MMIE7j7Q0Zztw/m/LzTPw== - -"@rspack/binding-win32-x64-msvc@npm:@rspack/binding-win32-x64-msvc-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc-canary/-/binding-win32-x64-msvc-canary-1.0.8-canary-8286125d-20240926091417.tgz#d3e19539e9df4f1a92845016de93c93f33907eb3" - integrity sha512-fhYdSxW21TtEgWYic2MgtVjGvFSWJYTVkdmyS2ZyqQOFeoAh2oV/rUjYA4FBKheUSiTUfA1OnwrKMDQOFOLgNw== - -"@rspack/binding@npm:@rspack/binding-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/binding-canary/-/binding-canary-1.0.8-canary-8286125d-20240926091417.tgz#75dc5de2d3fe0858b96872f58baa6249c1d1de1f" - integrity sha512-srH4BDpZxElJxEyu9AiiwNLqeBQRWAQEGNs+NQZVGEF2gqok5qsW8d4HtWyg8vJKHRNmroE2DYnYDJVKsOTpMg== +"@rspack/binding-darwin-arm64@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.8.tgz#ec66776dbad65f481b7dee93ad08a390fcbf7c17" + integrity sha512-1l8/eg3HNz53DHQO3fy5O5QKdYh8hSMZaWGtm3NR5IfdrTm2TaLL9tuR8oL2iHHtd87LEvVKHXdjlcuLV5IPNQ== + +"@rspack/binding-darwin-x64@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.8.tgz#85d27372dd62e933ddd236d1f85ee6a97243886f" + integrity sha512-7BbG8gXVWjtqJegDpsObzM/B90Eig1piEtcahvPdvlC92uZz3/IwtKPpMaywGBrf5RSI3U0nQMSekwz0cO1SOw== + +"@rspack/binding-linux-arm64-gnu@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.8.tgz#e958882680e6d95af19fbe73386d50f16ae524e6" + integrity sha512-QnqCL0wmwYqT/IFx5q0aw7DsIOr8oYUa4+7JI8iiqRf3RuuRJExesVW9VuWr0jS2UvChKgmb8PvRtDy/0tshFw== + +"@rspack/binding-linux-arm64-musl@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.8.tgz#7dc25acee1c414587d0fcad7f7a4cc08ceb442df" + integrity sha512-Ns9TsE7zdUjimW5HURRW08BaMyAh16MDh97PPsGEMeRPx9plnRO9aXvuUG6t+0gy4KwlQdeq3BvUsbBpIo5Tow== + +"@rspack/binding-linux-x64-gnu@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.8.tgz#86b81fe00c36fbb15123450dfc05dc202a49b910" + integrity sha512-lfqUuKCoyRN/gGeokhX/oNYqB6OpbtgQb57b0QuD8IaiH2a1ee0TtEVvRbyQNEDwht6lW4RTNg0RfMYu52LgXg== + +"@rspack/binding-linux-x64-musl@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.8.tgz#6778f9a646674902d129a5bfcab5a2a8dc04c1e3" + integrity sha512-MgbHJWV5utVa1/U9skrXClydZ/eZw001++v4B6nb8myU6Ck1D02aMl9ESefb/sSA8TatLLxEXQ2VENG9stnPwQ== + +"@rspack/binding-win32-arm64-msvc@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.8.tgz#b88bc3965d5ea508a571019dd5d497492f21bc67" + integrity sha512-3NN5VisnSOzhgqX77O/7NvcjPUueg1oIdMKoc5vElJCEu5FEXPqDhwZmr1PpBovaXshAcgExF3j54+20pwdg5g== + +"@rspack/binding-win32-ia32-msvc@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.8.tgz#dd4dbd02027af60b2d1ed514466a76da701cb632" + integrity sha512-17VQNC7PSygzsipSVoukDM/SOcVueVNsk9bZiB0Swl20BaqrlBts2Dvlmo+L+ZGsxOYI97WvA/zomMDv860usg== + +"@rspack/binding-win32-x64-msvc@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.8.tgz#c58a9471da64a9cadc5ddccbc9ed6aeb9a3a70fe" + integrity sha512-Vtjt74Soh09XUsV5Nw0YjZVSk/qtsjtPnzbSZluncSAVUs8l+X1ALcM6n1Jrt3TLTfcqf7a+VIsWOXAMqkCGUg== + +"@rspack/binding@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.8.tgz#d0e09342fa9411ca88195c7d3ff414191cdf2bee" + integrity sha512-abRirbrjobcllLAamyeiWxT6Rb0wELUnITynQdqRbSweWm2lvnhm9YBv4BcOjvJBzhJtvRJo5JBtbKXjDTarug== optionalDependencies: - "@rspack/binding-darwin-arm64" "npm:@rspack/binding-darwin-arm64-canary@1.0.8-canary-8286125d-20240926091417" - "@rspack/binding-darwin-x64" "npm:@rspack/binding-darwin-x64-canary@1.0.8-canary-8286125d-20240926091417" - "@rspack/binding-linux-arm64-gnu" "npm:@rspack/binding-linux-arm64-gnu-canary@1.0.8-canary-8286125d-20240926091417" - "@rspack/binding-linux-arm64-musl" "npm:@rspack/binding-linux-arm64-musl-canary@1.0.8-canary-8286125d-20240926091417" - "@rspack/binding-linux-x64-gnu" "npm:@rspack/binding-linux-x64-gnu-canary@1.0.8-canary-8286125d-20240926091417" - "@rspack/binding-linux-x64-musl" "npm:@rspack/binding-linux-x64-musl-canary@1.0.8-canary-8286125d-20240926091417" - "@rspack/binding-win32-arm64-msvc" "npm:@rspack/binding-win32-arm64-msvc-canary@1.0.8-canary-8286125d-20240926091417" - "@rspack/binding-win32-ia32-msvc" "npm:@rspack/binding-win32-ia32-msvc-canary@1.0.8-canary-8286125d-20240926091417" - "@rspack/binding-win32-x64-msvc" "npm:@rspack/binding-win32-x64-msvc-canary@1.0.8-canary-8286125d-20240926091417" - -"@rspack/core@npm:@rspack/core-canary@1.0.8-canary-8286125d-20240926091417": - version "1.0.8-canary-8286125d-20240926091417" - resolved "https://registry.yarnpkg.com/@rspack/core-canary/-/core-canary-1.0.8-canary-8286125d-20240926091417.tgz#476df71f1c00ec483f3642b1d97a2462c8543880" - integrity sha512-ENh43U/aWIm6+rOxdd7cIfM+nD1OQKLPPE9yZVykDLY/wYeDH4xuj1sxlwtpGtsch684sn7PYh7o0bYrPoinQA== + "@rspack/binding-darwin-arm64" "1.0.8" + "@rspack/binding-darwin-x64" "1.0.8" + "@rspack/binding-linux-arm64-gnu" "1.0.8" + "@rspack/binding-linux-arm64-musl" "1.0.8" + "@rspack/binding-linux-x64-gnu" "1.0.8" + "@rspack/binding-linux-x64-musl" "1.0.8" + "@rspack/binding-win32-arm64-msvc" "1.0.8" + "@rspack/binding-win32-ia32-msvc" "1.0.8" + "@rspack/binding-win32-x64-msvc" "1.0.8" + +"@rspack/core@^1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.8.tgz#49ea9d20427245b87a25188e60f820e256b202f4" + integrity sha512-pbXwXYb4WQwb0l35P5v3l/NpDJXy1WiVE4IcQ/6LxZYU5NyZuqtsK0trR88xIVRZb9qU0JUeCdQq7Xa6Q+c3Xw== dependencies: "@module-federation/runtime-tools" "0.5.1" - "@rspack/binding" "npm:@rspack/binding-canary@1.0.8-canary-8286125d-20240926091417" + "@rspack/binding" "1.0.8" "@rspack/lite-tapable" "1.0.1" caniuse-lite "^1.0.30001616" From 8093a2185f3517b16525087d1008269d7b5b95c2 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 3 Oct 2024 14:42:59 +0200 Subject: [PATCH 47/56] Add useful comment for getBrowserslistQueries --- packages/docusaurus-faster/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-faster/src/index.ts b/packages/docusaurus-faster/src/index.ts index 667bf0e7f83e..92966e961045 100644 --- a/packages/docusaurus-faster/src/index.ts +++ b/packages/docusaurus-faster/src/index.ts @@ -63,10 +63,10 @@ export function getSwcJsMinimizerOptions(): JsMinifyOptions { }; } +// We need this because of Rspack built-in LightningCSS integration +// See https://github.com/orgs/browserslist/discussions/846 export function getBrowserslistQueries(): string[] { - // Not sure why browserslist has no direct method to retrieve queries - const configFile = browserslist.findConfigFile(process.cwd()); - const queries = browserslist.loadConfig({path: configFile}) ?? [ + const queries = browserslist.loadConfig({path: process.cwd()}) ?? [ ...browserslist.defaults, ]; return queries; From 961a940945fd75d3e019e95ff4721fd22b8a8424 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 10 Oct 2024 17:15:14 +0200 Subject: [PATCH 48/56] Update Rspack --- packages/docusaurus-faster/package.json | 2 +- yarn.lock | 110 ++++++++++++------------ 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/packages/docusaurus-faster/package.json b/packages/docusaurus-faster/package.json index d157d2db2417..cacff72741e6 100644 --- a/packages/docusaurus-faster/package.json +++ b/packages/docusaurus-faster/package.json @@ -18,7 +18,7 @@ }, "license": "MIT", "dependencies": { - "@rspack/core": "^1.0.8", + "@rspack/core": "^1.0.9", "@swc/core": "^1.7.28", "@swc/html": "^1.7.28", "browserslist": "^4.24.0", diff --git a/yarn.lock b/yarn.lock index bd40f102ccff..e159687ed302 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2887,73 +2887,73 @@ fs-extra "^11.1.1" lodash "^4.17.21" -"@rspack/binding-darwin-arm64@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.8.tgz#ec66776dbad65f481b7dee93ad08a390fcbf7c17" - integrity sha512-1l8/eg3HNz53DHQO3fy5O5QKdYh8hSMZaWGtm3NR5IfdrTm2TaLL9tuR8oL2iHHtd87LEvVKHXdjlcuLV5IPNQ== +"@rspack/binding-darwin-arm64@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.9.tgz#c4483a5fa7053d46e70e96144bd6a04444d5f6b5" + integrity sha512-9CROBttbjfFcw78KGQHKGO6Im5uBLo0he2M8I+N4IOcTOCIqgtHSy0rjbpKxdpGlugokFafW/T5GBke+LW+J6A== -"@rspack/binding-darwin-x64@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.8.tgz#85d27372dd62e933ddd236d1f85ee6a97243886f" - integrity sha512-7BbG8gXVWjtqJegDpsObzM/B90Eig1piEtcahvPdvlC92uZz3/IwtKPpMaywGBrf5RSI3U0nQMSekwz0cO1SOw== +"@rspack/binding-darwin-x64@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.9.tgz#056dba555623f233505e27779a63dfa84072236c" + integrity sha512-o0WmrkVYxEO8LKeZvflERRv8z/VKBM/JyvhHOGSQF1kV5989Eob9Dqd3JbXiHpgXZb8syh0xq9J/C/KL2djClw== -"@rspack/binding-linux-arm64-gnu@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.8.tgz#e958882680e6d95af19fbe73386d50f16ae524e6" - integrity sha512-QnqCL0wmwYqT/IFx5q0aw7DsIOr8oYUa4+7JI8iiqRf3RuuRJExesVW9VuWr0jS2UvChKgmb8PvRtDy/0tshFw== +"@rspack/binding-linux-arm64-gnu@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.9.tgz#360dc04e71e97edb9a176c696e8604d46ce5273f" + integrity sha512-8lXgxL19HZSSzvlG7EsomACRYjdJKiSVsh5fMGO7nIF/elRsG0edMqtM/Vbm1srMN5o15/houvftb/kpK6giZg== -"@rspack/binding-linux-arm64-musl@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.8.tgz#7dc25acee1c414587d0fcad7f7a4cc08ceb442df" - integrity sha512-Ns9TsE7zdUjimW5HURRW08BaMyAh16MDh97PPsGEMeRPx9plnRO9aXvuUG6t+0gy4KwlQdeq3BvUsbBpIo5Tow== +"@rspack/binding-linux-arm64-musl@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.9.tgz#c8fc0520d1259cb403668ba9eb91479dad947b7d" + integrity sha512-nZus0toIKvHJcJCPGKPRnQYM1FXpagyVs53tr+AA/uxFA5mnHIrQ+RAP/PrdRT9+B6VOI+2Cs6nqwkrXtKg7qQ== -"@rspack/binding-linux-x64-gnu@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.8.tgz#86b81fe00c36fbb15123450dfc05dc202a49b910" - integrity sha512-lfqUuKCoyRN/gGeokhX/oNYqB6OpbtgQb57b0QuD8IaiH2a1ee0TtEVvRbyQNEDwht6lW4RTNg0RfMYu52LgXg== +"@rspack/binding-linux-x64-gnu@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.9.tgz#59c357fa2214f0df93f10d97e84118adbc52b3dc" + integrity sha512-3B54wWAhH4k3gJHYR4CUU8e82NWwZFIiBiCQzOOk0uh+rDkFtBt2xiOOZERQGLVvZmoz1K5JvNNPBBETVFKORg== -"@rspack/binding-linux-x64-musl@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.8.tgz#6778f9a646674902d129a5bfcab5a2a8dc04c1e3" - integrity sha512-MgbHJWV5utVa1/U9skrXClydZ/eZw001++v4B6nb8myU6Ck1D02aMl9ESefb/sSA8TatLLxEXQ2VENG9stnPwQ== +"@rspack/binding-linux-x64-musl@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.9.tgz#4417eb5c7dfa08a625ff3f480e52da230c4081f7" + integrity sha512-EF8T9VGQmCu+snhd6meexUWB7qQSdyqmGEMZNGTt2Qa+NC0x2W2owg6QzyyyTP1tTlTkIC5fWKKtN/4xP7dttA== -"@rspack/binding-win32-arm64-msvc@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.8.tgz#b88bc3965d5ea508a571019dd5d497492f21bc67" - integrity sha512-3NN5VisnSOzhgqX77O/7NvcjPUueg1oIdMKoc5vElJCEu5FEXPqDhwZmr1PpBovaXshAcgExF3j54+20pwdg5g== +"@rspack/binding-win32-arm64-msvc@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.9.tgz#4ece956b3adc3ac3a4d22691eff7839ec82534f1" + integrity sha512-TTXsOrpBgxcArTlOywFrThYZ4lNFQaowKaNf59QJhWm02fYb7ZezEbVzbJXhsqr4flLOaZcCuLPVaxhGaqZHYA== -"@rspack/binding-win32-ia32-msvc@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.8.tgz#dd4dbd02027af60b2d1ed514466a76da701cb632" - integrity sha512-17VQNC7PSygzsipSVoukDM/SOcVueVNsk9bZiB0Swl20BaqrlBts2Dvlmo+L+ZGsxOYI97WvA/zomMDv860usg== +"@rspack/binding-win32-ia32-msvc@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.9.tgz#1ff2a2a9c22b6b6d7a2d30db66b265b28478d404" + integrity sha512-/CJsa3D0+0/BkCTXpK8y7aYQRnrOlu8rboIx24LfCOK5wJB5WxvrvmXHT9XFUiUQt9zLYRQj6l5PdAj66Aoozg== -"@rspack/binding-win32-x64-msvc@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.8.tgz#c58a9471da64a9cadc5ddccbc9ed6aeb9a3a70fe" - integrity sha512-Vtjt74Soh09XUsV5Nw0YjZVSk/qtsjtPnzbSZluncSAVUs8l+X1ALcM6n1Jrt3TLTfcqf7a+VIsWOXAMqkCGUg== +"@rspack/binding-win32-x64-msvc@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.9.tgz#3f81a9878395a29b230a0a43f94cd40ae12f3b0e" + integrity sha512-euDrnVN2iFClu/7TpBErx99/4flhZCsvNcLBganbaCrM+NxWuCEa889Tmm6SosLoqvundk6pdsvPb9ubMqOEjg== -"@rspack/binding@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.8.tgz#d0e09342fa9411ca88195c7d3ff414191cdf2bee" - integrity sha512-abRirbrjobcllLAamyeiWxT6Rb0wELUnITynQdqRbSweWm2lvnhm9YBv4BcOjvJBzhJtvRJo5JBtbKXjDTarug== +"@rspack/binding@1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.0.9.tgz#8ace66b9534eab02fdded4a9782cb54c681de01d" + integrity sha512-QbhCVrnSMB1HyvRXhzGJK1J4AKZbckAUFlN1fTijH3oRbSYzUOK8bbL9DPt6BtIjkEWnfPv8rKqfl3Yo9OJbTA== optionalDependencies: - "@rspack/binding-darwin-arm64" "1.0.8" - "@rspack/binding-darwin-x64" "1.0.8" - "@rspack/binding-linux-arm64-gnu" "1.0.8" - "@rspack/binding-linux-arm64-musl" "1.0.8" - "@rspack/binding-linux-x64-gnu" "1.0.8" - "@rspack/binding-linux-x64-musl" "1.0.8" - "@rspack/binding-win32-arm64-msvc" "1.0.8" - "@rspack/binding-win32-ia32-msvc" "1.0.8" - "@rspack/binding-win32-x64-msvc" "1.0.8" - -"@rspack/core@^1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.8.tgz#49ea9d20427245b87a25188e60f820e256b202f4" - integrity sha512-pbXwXYb4WQwb0l35P5v3l/NpDJXy1WiVE4IcQ/6LxZYU5NyZuqtsK0trR88xIVRZb9qU0JUeCdQq7Xa6Q+c3Xw== + "@rspack/binding-darwin-arm64" "1.0.9" + "@rspack/binding-darwin-x64" "1.0.9" + "@rspack/binding-linux-arm64-gnu" "1.0.9" + "@rspack/binding-linux-arm64-musl" "1.0.9" + "@rspack/binding-linux-x64-gnu" "1.0.9" + "@rspack/binding-linux-x64-musl" "1.0.9" + "@rspack/binding-win32-arm64-msvc" "1.0.9" + "@rspack/binding-win32-ia32-msvc" "1.0.9" + "@rspack/binding-win32-x64-msvc" "1.0.9" + +"@rspack/core@^1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.0.9.tgz#566ae593d525627b0351f4c7789893b7f2eae41b" + integrity sha512-NqvMrB9sHsKn+xTyhNx+dF10eBmntVIWkzSZq89WaOASnCGYx5QWg8ZvZNGEr24T8mrbATsOkB3q8xPlpvHv4A== dependencies: "@module-federation/runtime-tools" "0.5.1" - "@rspack/binding" "1.0.8" + "@rspack/binding" "1.0.9" "@rspack/lite-tapable" "1.0.1" caniuse-lite "^1.0.30001616" From 2cdb41e480a4d7a1edec0f35c3addd9bb5d4fdf4 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 10 Oct 2024 17:23:25 +0200 Subject: [PATCH 49/56] Fix rsdoctor skipLibCheck issue --- website/src/plugins/rsdoctor/RsdoctorPlugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/src/plugins/rsdoctor/RsdoctorPlugin.ts b/website/src/plugins/rsdoctor/RsdoctorPlugin.ts index 74f06a3d7171..edad0cc00942 100644 --- a/website/src/plugins/rsdoctor/RsdoctorPlugin.ts +++ b/website/src/plugins/rsdoctor/RsdoctorPlugin.ts @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import {RsdoctorRspackMultiplePlugin} from '@rsdoctor/rspack-plugin'; import type {PluginConfig} from '@docusaurus/types'; function createRsdoctorBundlerPlugin({isServer}: {isServer: boolean}) { @@ -13,6 +12,8 @@ function createRsdoctorBundlerPlugin({isServer}: {isServer: boolean}) { // package does not work will with skipLibCheck false // // eslint-disable-next-line // const {RsdoctorWebpackMultiplePlugin} = require('@rsdoctor/webpack-plugin'); + // eslint-disable-next-line + const {RsdoctorRspackMultiplePlugin} = require('@rsdoctor/rspack-plugin'); // return new RsdoctorWebpackMultiplePlugin({ return new RsdoctorRspackMultiplePlugin({ From 901be766f5d630b15c26c1a3d21545064db1273e Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 10 Oct 2024 17:33:36 +0200 Subject: [PATCH 50/56] upgrade Rsdoctor --- website/package.json | 4 +- yarn.lock | 110 +++++++++++++++++++++---------------------- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/website/package.json b/website/package.json index 70e80a64c3a4..a631805ef5d3 100644 --- a/website/package.json +++ b/website/package.json @@ -84,8 +84,8 @@ "devDependencies": { "@docusaurus/eslint-plugin": "3.5.2", "@docusaurus/tsconfig": "3.5.2", - "@rsdoctor/webpack-plugin": "^0.4.1", - "@rsdoctor/rspack-plugin": "^0.4.1", + "@rsdoctor/webpack-plugin": "^0.4.6", + "@rsdoctor/rspack-plugin": "^0.4.6", "@types/color": "^3.0.4", "@types/jest": "^29.5.3", "cross-env": "^7.0.3", diff --git a/yarn.lock b/yarn.lock index e159687ed302..bf6eacb9ff77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2772,20 +2772,20 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rsdoctor/client@0.4.5": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@rsdoctor/client/-/client-0.4.5.tgz#4cf012c509b210c3419be033870af0dd5d7609c0" - integrity sha512-JzTBH4UAI70ftV5GfwF+oCs6Hf9Jq2FXerg9AlRwQgPpQoLLdke0tJYwvuEzSVxuVqAWKB3Z1mQwRm/fwo08xg== - -"@rsdoctor/core@0.4.5": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@rsdoctor/core/-/core-0.4.5.tgz#aab0195ff00b569543242fb402745fc1b398492a" - integrity sha512-5KiDjIKK4psRRPeCwIcudKaTkR+rz854SezHqEhCnLAhsfOcFVDjfjyRFTyevdCaAnK6qnQgM3qNRuxiw+3kdw== - dependencies: - "@rsdoctor/graph" "0.4.5" - "@rsdoctor/sdk" "0.4.5" - "@rsdoctor/types" "0.4.5" - "@rsdoctor/utils" "0.4.5" +"@rsdoctor/client@0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@rsdoctor/client/-/client-0.4.6.tgz#06bf2a13b5208bf1222154e1a9bf273ef8ce4517" + integrity sha512-ph10wCq7CRLssc83lMvk09HsInD5FpxboJxl6EF4M5vBp17DE7htbgVoq8ftGjDxF5Mzbk/MsOgjB4Ae52tpsw== + +"@rsdoctor/core@0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@rsdoctor/core/-/core-0.4.6.tgz#8563ee06c6a2968ded3c79cbbd41a4620996d52e" + integrity sha512-mYzKo5Mjl3Nhn8mOfJ1hVNP59fDL8zK/JrsHVfATQx9QsAgCFfbjMyRnOo8rTZuBjIS9LmDqLs31h7Dr3Lts6g== + dependencies: + "@rsdoctor/graph" "0.4.6" + "@rsdoctor/sdk" "0.4.6" + "@rsdoctor/types" "0.4.6" + "@rsdoctor/utils" "0.4.6" axios "^1.7.7" enhanced-resolve "5.12.0" filesize "^10.1.6" @@ -2796,38 +2796,38 @@ source-map "^0.7.4" webpack-bundle-analyzer "^4.10.2" -"@rsdoctor/graph@0.4.5": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@rsdoctor/graph/-/graph-0.4.5.tgz#b730bdcb2f4fc340f32faa0e95215fac264c1306" - integrity sha512-ugDDVoWJZ1djlqE0F9tJPNmFXCA6j49oCPeL7fIhYcxayQlrMiQOCHmgqbD84QFCuOJoyCHm44w6y+BAs9nTgw== +"@rsdoctor/graph@0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@rsdoctor/graph/-/graph-0.4.6.tgz#a9cee01b4b0a037816204ed6353c19b05f43e429" + integrity sha512-mn2cMKzyqqkc0WXN7Cr1OGNS7JhMAvlUsCyEV/pwJYiJ6OBqEE/g/xpZzA6QTT4nFqRNI2zneYsxgLNrFA4OvQ== dependencies: - "@rsdoctor/types" "0.4.5" - "@rsdoctor/utils" "0.4.5" + "@rsdoctor/types" "0.4.6" + "@rsdoctor/utils" "0.4.6" lodash "^4.17.21" socket.io "4.7.2" source-map "^0.7.4" -"@rsdoctor/rspack-plugin@^0.4.1": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@rsdoctor/rspack-plugin/-/rspack-plugin-0.4.5.tgz#c37b2bd340ae1bcc09bcd68f270b9271d89a21cd" - integrity sha512-pAKN2hS4s+47GXfolHwC+uAe8Dxh4Y/VWinMaxpZmnDt1LeUX2ynvz7Hy8r1Q5vaG1mC6FxdKMrEDGMB9Ck1WQ== +"@rsdoctor/rspack-plugin@^0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@rsdoctor/rspack-plugin/-/rspack-plugin-0.4.6.tgz#a25095f4928b8d6938da87833d083fc50c599200" + integrity sha512-Akq5ca0JoYSbm4aQfiGs3k56vNIeYBsaZu2x6uEql86PHyQT5zd1ygwCNEG8qZTZdiJMgVvWjstKGBKMQFu9cQ== dependencies: - "@rsdoctor/core" "0.4.5" - "@rsdoctor/graph" "0.4.5" - "@rsdoctor/sdk" "0.4.5" - "@rsdoctor/types" "0.4.5" - "@rsdoctor/utils" "0.4.5" + "@rsdoctor/core" "0.4.6" + "@rsdoctor/graph" "0.4.6" + "@rsdoctor/sdk" "0.4.6" + "@rsdoctor/types" "0.4.6" + "@rsdoctor/utils" "0.4.6" lodash "^4.17.21" -"@rsdoctor/sdk@0.4.5": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@rsdoctor/sdk/-/sdk-0.4.5.tgz#63ae3c58ae3174bf065e759e09f278c42e595259" - integrity sha512-j5lQOJt0UOkLUU2fWyeL6kP/EZVZTavg/1p5hCBWlarYpUECl/iH2m/EDT1nxqrPf2tlxTaEfzTlGy9TH4Cm0w== +"@rsdoctor/sdk@0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@rsdoctor/sdk/-/sdk-0.4.6.tgz#98a810c61cda7be87dd9eb3d823a0c57399d1468" + integrity sha512-DmpuMCCB+Uuoi6mCHKVop3F/ap6XpTrcrFWt8McuqOOUI3SaFwXc9YYnXjzssgcXvxXgJjQ3kwnLsxGpADUt0A== dependencies: - "@rsdoctor/client" "0.4.5" - "@rsdoctor/graph" "0.4.5" - "@rsdoctor/types" "0.4.5" - "@rsdoctor/utils" "0.4.5" + "@rsdoctor/client" "0.4.6" + "@rsdoctor/graph" "0.4.6" + "@rsdoctor/types" "0.4.6" + "@rsdoctor/utils" "0.4.6" "@types/fs-extra" "^11.0.4" body-parser "1.20.3" cors "2.8.5" @@ -2840,23 +2840,23 @@ source-map "^0.7.4" tapable "2.2.1" -"@rsdoctor/types@0.4.5": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@rsdoctor/types/-/types-0.4.5.tgz#c30ba651ec9c4edb72024340a20879eb2a9de49f" - integrity sha512-KZamdG7Vc7d26DkPizO5EKvSeI+OFR35UcyMxRfiswDAo3EJJxtuebKh8TsHDBDvYNhOgAWTT5DcvouhBYJRhg== +"@rsdoctor/types@0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@rsdoctor/types/-/types-0.4.6.tgz#f400b6a6da749eeeed7439945656cddcf66165a3" + integrity sha512-AoqUFliSgaHr73yFIooAggsMljkaUz+SGgVqG+jgHsVYll0BeIK4/MM0dlpWIGrN5/Hgl+OHNgPA8kt+4i5gfg== dependencies: "@types/connect" "3.4.38" "@types/estree" "1.0.5" "@types/tapable" "2.2.7" source-map "^0.7.4" -"@rsdoctor/utils@0.4.5": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@rsdoctor/utils/-/utils-0.4.5.tgz#269e6c8cd5aedeeed3387966c418373fce1a0b3c" - integrity sha512-ueEpGDRCufy2s60Q4mI83qYEroeaELFQr3QdxCCjC+BJylRNJiPYe9fb1o6gnSWHw2QKhCC/HUPLcz+twbMvyg== +"@rsdoctor/utils@0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@rsdoctor/utils/-/utils-0.4.6.tgz#852b2cd0643defa46bdec0ddba091d6d3998b301" + integrity sha512-/5Oqdip/HCCX9cAqaEF/F5mXacm1/lgw8bq5IUTkomrUfK4QVShUc4UJCqM4VOuec0vKUhXEfirsg3PgOj1chw== dependencies: "@babel/code-frame" "7.24.7" - "@rsdoctor/types" "0.4.5" + "@rsdoctor/types" "0.4.6" "@types/estree" "1.0.5" acorn "^8.10.0" acorn-import-assertions "1.9.0" @@ -2874,16 +2874,16 @@ rslog "^1.2.3" strip-ansi "^6.0.1" -"@rsdoctor/webpack-plugin@^0.4.1": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@rsdoctor/webpack-plugin/-/webpack-plugin-0.4.5.tgz#58084b2f254da615a60044d369f74f3a857f11c1" - integrity sha512-SFaLvi6I53KRfHwYnAomi5pU9ZnBtpmfQpEl7L8HzxyAtfNRNFGPl+WFOM4V6xiE6JguffJcm0j6DkClGF5TUQ== +"@rsdoctor/webpack-plugin@^0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@rsdoctor/webpack-plugin/-/webpack-plugin-0.4.6.tgz#3469d5997d9729ff6af4ad1d8f1a67a311015c3b" + integrity sha512-kSWugOcQVEWKs2CT+YovU5kQdrDYIHBuEP7eyWbrnxV8evIqRvS4Xu4TUiMP7QEcgljeFQwI/beeHLvgeEd49Q== dependencies: - "@rsdoctor/core" "0.4.5" - "@rsdoctor/graph" "0.4.5" - "@rsdoctor/sdk" "0.4.5" - "@rsdoctor/types" "0.4.5" - "@rsdoctor/utils" "0.4.5" + "@rsdoctor/core" "0.4.6" + "@rsdoctor/graph" "0.4.6" + "@rsdoctor/sdk" "0.4.6" + "@rsdoctor/types" "0.4.6" + "@rsdoctor/utils" "0.4.6" fs-extra "^11.1.1" lodash "^4.17.21" From ab0e85668938839fba5c2491090d1f322d45f921 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 10 Oct 2024 17:44:05 +0200 Subject: [PATCH 51/56] perf log --- packages/docusaurus/src/commands/build.ts | 26 ++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/packages/docusaurus/src/commands/build.ts b/packages/docusaurus/src/commands/build.ts index df8f962aac83..c886a0c8332d 100644 --- a/packages/docusaurus/src/commands/build.ts +++ b/packages/docusaurus/src/commands/build.ts @@ -174,18 +174,20 @@ async function buildLocale({ // We can build the 2 configs in parallel const [{clientConfig, clientManifestPath}, {serverConfig, serverBundlePath}] = - await PerfLogger.async('Creating bundler configs', () => - Promise.all([ - getBuildClientConfig({ - props, - cliOptions, - configureWebpackUtils, - }), - getBuildServerConfig({ - props, - configureWebpackUtils, - }), - ]), + await PerfLogger.async( + `Creating ${props.currentBundler.name} bundler configs`, + () => + Promise.all([ + getBuildClientConfig({ + props, + cliOptions, + configureWebpackUtils, + }), + getBuildServerConfig({ + props, + configureWebpackUtils, + }), + ]), ); // Run webpack to build JS bundle (client) and static html files (server). From c9d3afaf8223ab509e2e9cd978b33e0a9f120316 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 10 Oct 2024 17:45:51 +0200 Subject: [PATCH 52/56] remove temp gca() workaround --- packages/docusaurus/src/client/docusaurus.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/docusaurus/src/client/docusaurus.ts b/packages/docusaurus/src/client/docusaurus.ts index 7e4ccda3dfc6..4fbbac441940 100644 --- a/packages/docusaurus/src/client/docusaurus.ts +++ b/packages/docusaurus/src/client/docusaurus.ts @@ -17,7 +17,7 @@ const loaded = new Set(); declare global { // eslint-disable-next-line camelcase, no-underscore-dangle - const __webpack_require__: {gca?: (name: string) => string}; + const __webpack_require__: {gca: (name: string) => string}; interface Navigator { connection?: {effectiveType: string; saveData: boolean}; } @@ -65,11 +65,6 @@ const prefetch: Docusaurus['prefetch'] = ( // Prefetch all webpack chunk assets file needed. return Promise.all( chunkNamesNeeded.map((chunkName) => { - // TODO - if (!__webpack_require__.gca) { - console.warn('Rspack bug to fix: unable to prefetch'); - return Promise.resolve(); - } // "__webpack_require__.gca" is injected by ChunkAssetPlugin. Pass it // the name of the chunk you want to load and it will return its URL. // eslint-disable-next-line camelcase @@ -80,7 +75,6 @@ const prefetch: Docusaurus['prefetch'] = ( if (chunkAsset && !chunkAsset.includes('undefined')) { return prefetchHelper(chunkAsset); } - return Promise.resolve(); }), ); From b3392740e41fcf0b1114f4a4a388a2956315a4c9 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 10 Oct 2024 17:48:44 +0200 Subject: [PATCH 53/56] diff --- packages/docusaurus/src/client/docusaurus.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docusaurus/src/client/docusaurus.ts b/packages/docusaurus/src/client/docusaurus.ts index 4fbbac441940..79bb4e21c779 100644 --- a/packages/docusaurus/src/client/docusaurus.ts +++ b/packages/docusaurus/src/client/docusaurus.ts @@ -69,6 +69,7 @@ const prefetch: Docusaurus['prefetch'] = ( // the name of the chunk you want to load and it will return its URL. // eslint-disable-next-line camelcase const chunkAsset = __webpack_require__.gca(chunkName); + // In some cases, webpack might decide to optimize further, leading to // the chunk assets being merged to another chunk. In this case, we can // safely filter it out and don't need to load it. From d1df260a6bcdc28f92c8e83c425a98d0be002ebc Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 10 Oct 2024 18:54:46 +0200 Subject: [PATCH 54/56] add SwcJsMinimizerRspackPlugin config --- .../docusaurus-bundler/src/currentBundler.ts | 16 +++++++++- .../docusaurus-bundler/src/importFaster.ts | 7 ++--- .../docusaurus-bundler/src/minification.ts | 31 ++++++++++++++++--- packages/docusaurus-faster/src/index.ts | 4 +-- 4 files changed, 45 insertions(+), 13 deletions(-) diff --git a/packages/docusaurus-bundler/src/currentBundler.ts b/packages/docusaurus-bundler/src/currentBundler.ts index 115828959eba..ee804e71759b 100644 --- a/packages/docusaurus-bundler/src/currentBundler.ts +++ b/packages/docusaurus-bundler/src/currentBundler.ts @@ -10,6 +10,7 @@ import WebpackBar from 'webpackbar'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; import {importRspack} from './importFaster'; +import type {FasterModule} from './importFaster'; import type {CurrentBundler, DocusaurusConfig} from '@docusaurus/types'; // We inject a site config slice because the Rspack flag might change place @@ -34,7 +35,7 @@ export async function getCurrentBundler({ if (isRspack(siteConfig)) { return { name: 'rspack', - instance: await importRspack(), + instance: (await importRspack()) as unknown as typeof webpack, }; } return { @@ -43,6 +44,19 @@ export async function getCurrentBundler({ }; } +export function getCurrentBundlerAsRspack({ + currentBundler, +}: { + currentBundler: CurrentBundler; +}): FasterModule['rspack'] { + if (currentBundler.name !== 'rspack') { + throw new Error( + `Can't getCurrentBundlerAsRspack() because current bundler is ${currentBundler.name}`, + ); + } + return currentBundler.instance as unknown as FasterModule['rspack']; +} + export async function getCSSExtractPlugin({ currentBundler, }: { diff --git a/packages/docusaurus-bundler/src/importFaster.ts b/packages/docusaurus-bundler/src/importFaster.ts index 9bd4127074fd..d5943a882085 100644 --- a/packages/docusaurus-bundler/src/importFaster.ts +++ b/packages/docusaurus-bundler/src/importFaster.ts @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import type webpack from 'webpack'; import type {ConfigureWebpackUtils} from '@docusaurus/types'; import type { MinimizerOptions as JsMinimizerOptions, @@ -13,7 +12,7 @@ import type { } from 'terser-webpack-plugin'; import type {MinimizerOptions as CssMinimizerOptions} from 'css-minimizer-webpack-plugin'; -type FasterModule = Awaited; +export type FasterModule = Awaited; async function importFaster(): Promise { return import('@docusaurus/faster'); @@ -30,9 +29,9 @@ async function ensureFaster(): Promise { } } -export async function importRspack(): Promise { +export async function importRspack(): Promise { const faster = await ensureFaster(); - return faster.getRspack() as unknown as typeof webpack; + return faster.rspack; } export async function importSwcJsLoaderFactory(): Promise< diff --git a/packages/docusaurus-bundler/src/minification.ts b/packages/docusaurus-bundler/src/minification.ts index 193608935513..1ff754cbf6c6 100644 --- a/packages/docusaurus-bundler/src/minification.ts +++ b/packages/docusaurus-bundler/src/minification.ts @@ -12,6 +12,7 @@ import { importLightningCssMinimizerOptions, importBrowserslistQueries, } from './importFaster'; +import {getCurrentBundlerAsRspack} from './currentBundler'; import type {CustomOptions, CssNanoOptions} from 'css-minimizer-webpack-plugin'; import type {WebpackPluginInstance} from 'webpack'; import type {CurrentBundler, FasterConfig} from '@docusaurus/types'; @@ -49,6 +50,7 @@ async function getJsMinimizer({ return new TerserPlugin({ parallel: getTerserParallel(), + // See https://terser.org/docs/options/ terserOptions: { parse: { // We want uglify-js to parse ecma 8 code. However, we don't want it @@ -138,12 +140,31 @@ async function getWebpackMinimizers( async function getRspackMinimizers({ currentBundler, }: MinimizersConfig): Promise { + const rspack = getCurrentBundlerAsRspack({currentBundler}); const browserslistQueries = await importBrowserslistQueries(); return [ - // @ts-expect-error: Rspack has this built-in - new currentBundler.instance.SwcJsMinimizerRspackPlugin(), - // @ts-expect-error: Rspack has this built-in - new currentBundler.instance.LightningCssMinimizerRspackPlugin({ + // See https://rspack.dev/plugins/rspack/swc-js-minimizer-rspack-plugin + // See https://swc.rs/docs/configuration/minification + new rspack.SwcJsMinimizerRspackPlugin({ + minimizerOptions: { + minify: true, + compress: { + ecma: 6, + unsafe_arrows: true, + }, + mangle: { + safari10: true, + }, + format: { + ecma: 6, + // Turned on because emoji and regex is not minified properly using + // default. See https://github.com/facebook/create-react-app/issues/2488 + ascii_only: true, + comments: false, + }, + }, + }), + new rspack.LightningCssMinimizerRspackPlugin({ minimizerOptions: { ...(await importLightningCssMinimizerOptions()), // Not sure why but Rspack takes browserslist queries directly @@ -154,7 +175,7 @@ async function getRspackMinimizers({ targets: browserslistQueries, }, }), - ]; + ] as unknown as WebpackPluginInstance[]; } export async function getMinimizers( diff --git a/packages/docusaurus-faster/src/index.ts b/packages/docusaurus-faster/src/index.ts index 9cc07ab779a4..fd8435536b24 100644 --- a/packages/docusaurus-faster/src/index.ts +++ b/packages/docusaurus-faster/src/index.ts @@ -12,9 +12,7 @@ import {minify as swcHtmlMinifier} from '@swc/html'; import type {RuleSetRule} from 'webpack'; import type {JsMinifyOptions} from '@swc/core'; -export function getRspack(): typeof Rspack { - return Rspack; -} +export const rspack = Rspack; export function getSwcHtmlMinifier(): typeof swcHtmlMinifier { return swcHtmlMinifier; From b913a175e7fede678f73cba2226f94156127b4d5 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 10 Oct 2024 18:58:15 +0200 Subject: [PATCH 55/56] comment --- packages/docusaurus-bundler/src/minification.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docusaurus-bundler/src/minification.ts b/packages/docusaurus-bundler/src/minification.ts index 1ff754cbf6c6..5d06baf58840 100644 --- a/packages/docusaurus-bundler/src/minification.ts +++ b/packages/docusaurus-bundler/src/minification.ts @@ -150,6 +150,7 @@ async function getRspackMinimizers({ minify: true, compress: { ecma: 6, + // to minimize function to arrow, like Terser did before unsafe_arrows: true, }, mangle: { From b02fb3ec59ee4b67fb5d10ba1d6a525a38dc24f3 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 11 Oct 2024 10:00:10 +0200 Subject: [PATCH 56/56] use shared conservative swc minifier options --- packages/docusaurus-bundler/src/minification.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/packages/docusaurus-bundler/src/minification.ts b/packages/docusaurus-bundler/src/minification.ts index 5d06baf58840..b1d77c03a077 100644 --- a/packages/docusaurus-bundler/src/minification.ts +++ b/packages/docusaurus-bundler/src/minification.ts @@ -142,27 +142,14 @@ async function getRspackMinimizers({ }: MinimizersConfig): Promise { const rspack = getCurrentBundlerAsRspack({currentBundler}); const browserslistQueries = await importBrowserslistQueries(); + const swcJsMinimizerOptions = await importSwcJsMinimizerOptions(); return [ // See https://rspack.dev/plugins/rspack/swc-js-minimizer-rspack-plugin // See https://swc.rs/docs/configuration/minification new rspack.SwcJsMinimizerRspackPlugin({ minimizerOptions: { minify: true, - compress: { - ecma: 6, - // to minimize function to arrow, like Terser did before - unsafe_arrows: true, - }, - mangle: { - safari10: true, - }, - format: { - ecma: 6, - // Turned on because emoji and regex is not minified properly using - // default. See https://github.com/facebook/create-react-app/issues/2488 - ascii_only: true, - comments: false, - }, + ...swcJsMinimizerOptions, }, }), new rspack.LightningCssMinimizerRspackPlugin({