From 2340a06a375b72ddcea0ccdd69902d9cb5b2c785 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Mon, 8 Sep 2025 16:06:04 +0800 Subject: [PATCH 1/9] build(esbuild): migrate from rollup to rslib Replace Rollup with RSLib to simplify config and speed builds. - Switch Nx target to run rslib; add rslib.config.ts and @rslib/core - Remove rollup config and dependencies; update eslint ignore - Set tsconfig rootDir for esbuild - Improve runtime sourcemaps for debugging - Remove obsolete main.py and update lockfile --- main.py | 196 ----------------- packages/esbuild/.eslintrc.json | 3 +- packages/esbuild/.swcrc | 1 - packages/esbuild/package.json | 10 +- packages/esbuild/project.json | 37 +--- packages/esbuild/rollup.config.js | 46 ---- packages/esbuild/rslib.config.ts | 73 +++++++ packages/esbuild/tsconfig.lib.json | 2 +- packages/runtime/rollup.config.cjs | 10 + pnpm-lock.yaml | 325 ++++++++++++++++++++--------- 10 files changed, 320 insertions(+), 383 deletions(-) delete mode 100644 main.py delete mode 100644 packages/esbuild/rollup.config.js create mode 100644 packages/esbuild/rslib.config.ts diff --git a/main.py b/main.py deleted file mode 100644 index ba13a14937b..00000000000 --- a/main.py +++ /dev/null @@ -1,196 +0,0 @@ -# To run this script you need Python setup and installed chardet and beautifulsoup dependencies through pip install - - -import os -import chardet -from bs4 import BeautifulSoup - -# This is basic config - -INPUT_DIR = 'docs/index.html' # TypeDoc assinged docs dir, -OUTPUT_NAV_ADOC = 'apps/docs/src/en/modules/ROOT/nav.adoc' # Your desired nav file to put pages nav -OUTPUT_PAGES_DIR = 'apps/docs/src/en/modules/ROOT/pages' # Your desired location - -def process_code_tag(tag): - # Apply desired replacements to the HTML content - cleaned_html = ( - tag.decode_contents() - .replace(' ', '__') - .replace('
', '\n') - .replace('
', '\n') - .replace('', '') - ) - - # Convert the cleaned HTML to Beautiful Soup object - cleaned_soup = BeautifulSoup(cleaned_html, "html.parser") - - # Extract text content from the cleaned soup - code_text = cleaned_soup.get_text() - - return f"[source, javascript]\n----\n{code_text}\n----\n\n" - -def process_div_or_p_tag(tag): - # Apply desired replacements to the HTML content - cleaned_html = ( - tag.decode_contents() - .replace('', '`') - .replace('', '`') - .replace('', '*') - .replace('', '*') - ) - - for link in tag.find_all('a'): - xref = link.get("href") - link_text = link.get_text().strip() - cleaned_html = cleaned_html.replace('') + 3 - if len(cleaned_html) > end: - cleaned_html = cleaned_html[0: start:] + cleaned_html[end + 1::] - - # Convert the cleaned HTML to Beautiful Soup object - cleaned_soup = BeautifulSoup(cleaned_html, "html.parser") - - # Extract text content from the cleaned soup - content = cleaned_soup.get_text().strip() - - return f"{content}\n\n" - -def process_content_section(content_section, adoc_content): - for tag in content_section.find_all(): - if tag.name in {"h1", "h2", "h3", "h4"}: - heading_level = int(tag.name[1]) # Convert heading level to integer - heading_text = tag.get_text().strip() - adoc_content += f"{'=' * heading_level} {heading_text}\n\n" - - elif tag.name == "pre": - adoc_content += process_code_tag(tag).replace('__', ' ') - - elif tag.name == "ul": - for li in tag.find_all("li"): - li_text = li.get_text().strip() - adoc_content += f"* {li_text}\n" - adoc_content += "\n" - - elif tag.name == "div" or tag.name == "p": - adoc_content += process_div_or_p_tag(tag) - - return adoc_content - -def update_nav_adoc(antora_links): - # Find the position to replace '.Packages' section - # Append antora_output.adoc to nav.adoc and replace '.Packages' section - adoc_output_filename = OUTPUT_NAV_ADOC - with open(adoc_output_filename, "r", encoding="utf-8") as test_adoc_file: - nav_adoc_content = test_adoc_file.read() - - # Find the position to replace '.Packages' section - packages_start = nav_adoc_content.find(".Packages") - if packages_start != -1: - packages_end = nav_adoc_content.find("\n\n", packages_start) + 2 - if packages_end != -1: - new_nav_adoc_content = ( - nav_adoc_content[:packages_start] + - '.Packages\n' + - "\n".join(antora_links) + - "\n\n" + - nav_adoc_content[packages_end:] - ) - with open(adoc_output_filename, "w", encoding="utf-8") as new_nav_adoc_file: - new_nav_adoc_file.write(new_nav_adoc_content) - print(f"Updated {adoc_output_filename} with antora_output.adoc content.") - else: - print(".Packages end not found in nav.adoc.") - else: - print(".Packages section not found in nav.adoc.") - # Append content of antora_output.adoc to nav.adoc - with open(adoc_output_filename, "a", encoding="utf-8") as nav_adoc_file: - nav_adoc_file.write('.Packages\n' + "\n".join(antora_links) + "\n\n") - print(f"Appended content of antora_output.adoc to {adoc_output_filename}.") - -def update_pages_directory(): - # Move generated .adoc files to pages dir - output_directory = OUTPUT_PAGES_DIR - for generated_filename in os.listdir(): - if generated_filename.endswith(".adoc"): - generated_file_path = os.path.join(generated_filename) - destination_path = os.path.join(output_directory, generated_filename) - if os.path.exists(destination_path): - os.remove(destination_path) # Remove existing file - os.rename(generated_file_path, destination_path) - print(f"Moved {generated_filename} to {output_directory}.") - -def process_docs(ul_element): - antora_links = [] - - # Iterate through
  • elements inside
      - for li in ul_element.find_all("li"): - link = li.find("a") - if link: - href = link.get("href") - link_text = link.get_text().strip() - - # Remove '_' at position 0 and replace remaining underscores with hyphens - module_name = os.path.splitext(os.path.basename(href))[0] - module_name = module_name[1:].replace("_", "-") - - # Construct full path to the corresponding .html file - html_path = os.path.join("docs", href) - - # Check if the HTML file exists before reading and parsing - if os.path.exists(html_path): - # Read and parse the .html content - with open(html_path, "rb") as html_file: - html_content = html_file.read() - - # Parse the .html content using Beautiful Soup - html_soup = BeautifulSoup(html_content, "html.parser") - - # Find the content section - content_section = html_soup.find("section", class_="tsd-panel tsd-typography") - - if content_section: - # Convert tags to Antora code blocks while preserving other text - adoc_filename = f"{module_name}.adoc" - adoc_content = f"= {link_text}\n\n" - - adoc_content = process_content_section(content_section, adoc_content) - - # Create the .adoc file with UTF-8 encoding - with open(adoc_filename.replace("/", "-"), "w", encoding="utf-8") as adoc_file: - adoc_file.write(adoc_content) - - antora_link = f"* xref:{adoc_filename}[{link_text}]" - antora_links.append(antora_link) - else: - print(f"HTML file '{html_path}' does not exist.") - - return antora_links - - -if __name__ == '__main__': - # Read the HTML file in binary mode - with open(INPUT_DIR, "rb") as file: - html_content = file.read() - - # Detect the encoding of the HTML content - result = chardet.detect(html_content) - encoding = result["encoding"] - - # Parse the HTML content using Beautiful Soup - soup = BeautifulSoup(html_content.decode(encoding), "html.parser") - - # Find the
        element with the specified class - ul_element = soup.find("ul", class_="tsd-small-nested-navigation") - - if ul_element: - # Lists to store Antora links and individual HTML files - antora_links = process_docs(ul_element) - - update_nav_adoc(antora_links) - - update_pages_directory() - - print("All tasks completed.") - else: - print("UL element not found in the HTML.") diff --git a/packages/esbuild/.eslintrc.json b/packages/esbuild/.eslintrc.json index 2c7d3866f19..ffb430ed4ca 100644 --- a/packages/esbuild/.eslintrc.json +++ b/packages/esbuild/.eslintrc.json @@ -3,7 +3,8 @@ "ignorePatterns": [ "!**/*", "**/vite.config.*.timestamp*", - "**/vitest.config.*.timestamp*" + "**/vitest.config.*.timestamp*", + "rslib.config.ts" ], "overrides": [ { diff --git a/packages/esbuild/.swcrc b/packages/esbuild/.swcrc index dfc002837d9..9cbe592ae51 100644 --- a/packages/esbuild/.swcrc +++ b/packages/esbuild/.swcrc @@ -25,6 +25,5 @@ ".*\\.test.tsx?$", "./src/jest-setup.ts$", "./**/jest-setup.ts$" - // ".*.js$" ] } diff --git a/packages/esbuild/package.json b/packages/esbuild/package.json index 6be8fe5dc4c..e0af701a0b2 100644 --- a/packages/esbuild/package.json +++ b/packages/esbuild/package.json @@ -58,16 +58,14 @@ "@chialab/esbuild-plugin-commonjs": "^0.18.0", "@hyrious/esbuild-plugin-commonjs": "^0.2.4", "@module-federation/sdk": "workspace:*", - "@rollup/plugin-commonjs": "^28.0.0", - "@rollup/plugin-node-resolve": "^15.3.0", - "@rollup/plugin-replace": "^6.0.1", "cjs-module-lexer": "^1.3.1", "enhanced-resolve": "^5.16.1", "es-module-lexer": "^1.5.3", "esbuild": "^0.25.0", "json5": "^2.2.3", - "npmlog": "^7.0.1", - "rollup": "^4.24.0", - "rollup-plugin-node-externals": "^7.1.3" + "npmlog": "^7.0.1" + }, + "devDependencies": { + "@rslib/core": "^0.12.4" } } diff --git a/packages/esbuild/project.json b/packages/esbuild/project.json index b6b2ffa0f48..7ef5c7f549e 100644 --- a/packages/esbuild/project.json +++ b/packages/esbuild/project.json @@ -6,39 +6,11 @@ "tags": ["type:pkg"], "targets": { "build": { - "executor": "@nx/rollup:rollup", + "executor": "nx:run-commands", "outputs": ["{workspaceRoot}/packages/esbuild/dist"], "options": { - "parallel": false, - "outputPath": "packages/esbuild/dist", - "main": "packages/esbuild/src/index.ts", - "additionalEntryPoints": [ - "packages/esbuild/src/adapters/lib/plugin.ts", - "packages/esbuild/src/build.ts" - ], - "tsConfig": "packages/esbuild/tsconfig.lib.json", - "assets": ["packages/esbuild/src/resolve"], - "project": "packages/esbuild/package.json", - "compiler": "swc", - "rollupConfig": "packages/esbuild/rollup.config.js", - "format": ["cjs", "esm"], - "external": [ - "@chialab/cjs-to-esm", - "enhanced-resolve", - "cjs-module-lexer", - "es-module-lexer", - "@module-federation/*", - "pnpapi", - "esbuild", - "@rollup/*", - "rollup-plugin-node-externals", - "@chialab/esbuild-plugin-commonjs", - "@hyrious/esbuild-plugin-commonjs", - "rollup", - "../../resolve/esm-resolver.mjs" - ], - "generatePackageJson": false, - "useLegacyTypescriptPlugin": false + "command": "rslib build", + "cwd": "packages/esbuild" }, "dependsOn": [ { @@ -63,7 +35,8 @@ "parallel": false, "commands": [ { - "command": "FEDERATION_DEBUG=true nx run esbuild:build", + "command": "FEDERATION_DEBUG=true rslib build", + "cwd": "packages/esbuild", "forwardAllArgs": false } ] diff --git a/packages/esbuild/rollup.config.js b/packages/esbuild/rollup.config.js deleted file mode 100644 index 1c1c6ade3d1..00000000000 --- a/packages/esbuild/rollup.config.js +++ /dev/null @@ -1,46 +0,0 @@ -const replace = require('@rollup/plugin-replace'); -const copy = require('rollup-plugin-copy'); - -const FEDERATION_DEBUG = process.env.FEDERATION_DEBUG || ''; - -module.exports = (rollupConfig, projectOptions) => { - // rollupConfig.input = { - // index: 'packages/runtime/src/index.ts', - // types: 'packages/runtime/src/types.ts', - // helpers: 'packages/runtime/src/helpers.ts', - // }; - - const pkg = require('./package.json'); - - if (rollupConfig.output.format === 'esm' && FEDERATION_DEBUG) { - rollupConfig.output.format = 'iife'; - rollupConfig.output.inlineDynamicImports = true; - delete rollupConfig.external; - delete rollupConfig.input.type; - delete rollupConfig.input.helpers; - } - - // Add sourcemap configuration - if (Array.isArray(rollupConfig.output)) { - rollupConfig.output.forEach((output) => { - output.sourcemap = true; - }); - } else if (rollupConfig.output) { - rollupConfig.output.sourcemap = true; - } - - rollupConfig.plugins.push( - replace({ - preventAssignment: true, - __VERSION__: JSON.stringify(pkg.version), - FEDERATION_DEBUG: JSON.stringify(FEDERATION_DEBUG), - }), - copy({ - targets: [ - { src: 'packages/runtime/LICENSE', dest: 'packages/runtime/dist' }, - ], - }), - ); - - return rollupConfig; -}; diff --git a/packages/esbuild/rslib.config.ts b/packages/esbuild/rslib.config.ts new file mode 100644 index 00000000000..ba96fca912a --- /dev/null +++ b/packages/esbuild/rslib.config.ts @@ -0,0 +1,73 @@ +import { defineConfig } from '@rslib/core'; +import { readFileSync } from 'fs'; +import { join } from 'path'; + +// Read package.json to get version +const pkg = JSON.parse( + readFileSync(join(process.cwd(), 'package.json'), 'utf-8'), +); + +const FEDERATION_DEBUG = process.env.FEDERATION_DEBUG || ''; + +export default defineConfig({ + lib: [ + // ESM format + { + format: 'esm', + syntax: 'es2021', + bundle: true, + dts: { + distPath: './dist', + }, + }, + // CJS format + { + format: 'cjs', + syntax: 'es2021', + bundle: true, + dts: false, // Only generate types once for ESM + }, + ], + // Shared configurations + source: { + entry: { + index: './src/index.ts', + plugin: './src/adapters/lib/plugin.ts', + build: './src/build.ts', + }, + define: { + __VERSION__: JSON.stringify(pkg.version), + FEDERATION_DEBUG: JSON.stringify(FEDERATION_DEBUG), + }, + tsconfigPath: './tsconfig.lib.json', + }, + output: { + target: 'node', + distPath: { + root: './dist', + }, + externals: [ + // Module federation runtime packages that should remain external + '@module-federation/*', + // Optional dependency that may not be available + 'pnpapi', + ], + copy: [ + { + from: './src/resolve', + to: './resolve', + }, + ], + }, + tools: { + rspack: (config: any) => { + // Handle special debug mode for ESM format + if (FEDERATION_DEBUG && config.output?.library?.type === 'module') { + config.output.library.type = 'var'; + config.output.iife = true; + config.externals = undefined; + } + return config; + }, + }, +}); diff --git a/packages/esbuild/tsconfig.lib.json b/packages/esbuild/tsconfig.lib.json index a51e17924d1..881e8e00429 100644 --- a/packages/esbuild/tsconfig.lib.json +++ b/packages/esbuild/tsconfig.lib.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "rootDir": "./src", "declaration": true, "types": ["node"] }, diff --git a/packages/runtime/rollup.config.cjs b/packages/runtime/rollup.config.cjs index 9258294fd01..ba6e8707d63 100644 --- a/packages/runtime/rollup.config.cjs +++ b/packages/runtime/rollup.config.cjs @@ -27,6 +27,11 @@ module.exports = (rollupConfig, projectOptions) => { rollupConfig.output = rollupConfig.output.map((c) => ({ ...c, sourcemap: true, + sourcemapExcludeSources: false, + sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => { + // Ensure source paths are relative and properly formatted + return relativeSourcePath.replace(/^\.\.\//, ''); + }, manualChunks: (id) => { if (id.includes('@swc/helpers')) { return 'polyfills'; @@ -47,6 +52,11 @@ module.exports = (rollupConfig, projectOptions) => { rollupConfig.output = { ...rollupConfig.output, sourcemap: true, + sourcemapExcludeSources: false, + sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => { + // Ensure source paths are relative and properly formatted + return relativeSourcePath.replace(/^\.\.\//, ''); + }, manualChunks: (id) => { if (id.includes('@swc/helpers')) { return 'polyfills'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 89f54dcda91..178453b1d88 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3182,15 +3182,6 @@ importers: '@module-federation/sdk': specifier: workspace:* version: link:../sdk - '@rollup/plugin-commonjs': - specifier: ^28.0.0 - version: 28.0.0(rollup@4.24.0) - '@rollup/plugin-node-resolve': - specifier: ^15.3.0 - version: 15.3.0(rollup@4.24.0) - '@rollup/plugin-replace': - specifier: ^6.0.1 - version: 6.0.1(rollup@4.24.0) cjs-module-lexer: specifier: ^1.3.1 version: 1.4.1 @@ -3209,12 +3200,10 @@ importers: npmlog: specifier: ^7.0.1 version: 7.0.1 - rollup: - specifier: ^4.24.0 - version: 4.24.0 - rollup-plugin-node-externals: - specifier: ^7.1.3 - version: 7.1.3(rollup@4.24.0) + devDependencies: + '@rslib/core': + specifier: ^0.12.4 + version: 0.12.4(typescript@5.8.3) packages/managers: dependencies: @@ -9200,6 +9189,10 @@ packages: /@jridgewell/sourcemap-codec@1.5.4: resolution: {integrity: sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==} + /@jridgewell/sourcemap-codec@1.5.5: + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + dev: true + /@jridgewell/trace-mapping@0.3.25: resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} dependencies: @@ -11538,6 +11531,10 @@ packages: /@module-federation/error-codes@0.17.1: resolution: {integrity: sha512-n6Elm4qKSjwAPxLUGtwnl7qt4y1dxB8OpSgVvXBIzqI9p27a3ZXshLPLnumlpPg1Qudaj8sLnSnFtt9yGpt5yQ==} + /@module-federation/error-codes@0.18.0: + resolution: {integrity: sha512-Woonm8ehyVIUPXChmbu80Zj6uJkC0dD9SJUZ/wOPtO8iiz/m+dkrOugAuKgoiR6qH4F+yorWila954tBz4uKsQ==} + dev: true + /@module-federation/inject-external-runtime-core-plugin@0.15.0(@module-federation/runtime-tools@0.15.0): resolution: {integrity: sha512-D6+FO2oj2Gr6QpfWv3i9RI9VJM2IFCMiFQKg5zOpKw1qdrPRWb35fiXAXGjw9RrVgrZz0Z1b9OP4zC9hfbpnQQ==} peerDependencies: @@ -11782,6 +11779,13 @@ packages: '@module-federation/error-codes': 0.17.1 '@module-federation/sdk': 0.17.1 + /@module-federation/runtime-core@0.18.0: + resolution: {integrity: sha512-ZyYhrDyVAhUzriOsVfgL6vwd+5ebYm595Y13KeMf6TKDRoUHBMTLGQ8WM4TDj8JNsy7LigncK8C03fn97of0QQ==} + dependencies: + '@module-federation/error-codes': 0.18.0 + '@module-federation/sdk': 0.18.0 + dev: true + /@module-federation/runtime-tools@0.1.6: resolution: {integrity: sha512-7ILVnzMIa0Dlc0Blck5tVZG1tnk1MmLnuZpLOMpbdW+zl+N6wdMjjHMjEZFCUAJh2E5XJ3BREwfX8Ets0nIkLg==} dependencies: @@ -11821,6 +11825,13 @@ packages: '@module-federation/runtime': 0.17.1 '@module-federation/webpack-bundler-runtime': 0.17.1 + /@module-federation/runtime-tools@0.18.0: + resolution: {integrity: sha512-fSga9o4t1UfXNV/Kh6qFvRyZpPp3EHSPRISNeyT8ZoTpzDNiYzhtw0BPUSSD8m6C6XQh2s/11rI4g80UY+d+hA==} + dependencies: + '@module-federation/runtime': 0.18.0 + '@module-federation/webpack-bundler-runtime': 0.18.0 + dev: true + /@module-federation/runtime-tools@0.5.1: resolution: {integrity: sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg==} dependencies: @@ -11878,6 +11889,14 @@ packages: '@module-federation/runtime-core': 0.17.1 '@module-federation/sdk': 0.17.1 + /@module-federation/runtime@0.18.0: + resolution: {integrity: sha512-+C4YtoSztM7nHwNyZl6dQKGUVJdsPrUdaf3HIKReg/GQbrt9uvOlUWo2NXMZ8vDAnf/QRrpSYAwXHmWDn9Obaw==} + dependencies: + '@module-federation/error-codes': 0.18.0 + '@module-federation/runtime-core': 0.18.0 + '@module-federation/sdk': 0.18.0 + dev: true + /@module-federation/runtime@0.5.1: resolution: {integrity: sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ==} dependencies: @@ -11911,6 +11930,10 @@ packages: /@module-federation/sdk@0.17.1: resolution: {integrity: sha512-nlUcN6UTEi+3HWF+k8wPy7gH0yUOmCT+xNatihkIVR9REAnr7BUvHFGlPJmx7WEbLPL46+zJUbtQHvLzXwFhng==} + /@module-federation/sdk@0.18.0: + resolution: {integrity: sha512-Lo/Feq73tO2unjmpRfyyoUkTVoejhItXOk/h5C+4cistnHbTV8XHrW/13fD5e1Iu60heVdAhhelJd6F898Ve9A==} + dev: true + /@module-federation/sdk@0.5.1: resolution: {integrity: sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA==} dev: true @@ -11986,6 +12009,13 @@ packages: '@module-federation/runtime': 0.17.1 '@module-federation/sdk': 0.17.1 + /@module-federation/webpack-bundler-runtime@0.18.0: + resolution: {integrity: sha512-TEvErbF+YQ+6IFimhUYKK3a5wapD90d90sLsNpcu2kB3QGT7t4nIluE25duXuZDVUKLz86tEPrza/oaaCWTpvQ==} + dependencies: + '@module-federation/runtime': 0.18.0 + '@module-federation/sdk': 0.18.0 + dev: true + /@module-federation/webpack-bundler-runtime@0.5.1: resolution: {integrity: sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA==} dependencies: @@ -16048,25 +16078,6 @@ packages: rollup: 4.40.0 dev: true - /@rollup/plugin-commonjs@28.0.0(rollup@4.24.0): - resolution: {integrity: sha512-BJcu+a+Mpq476DMXG+hevgPSl56bkUoi88dKT8t3RyUp8kGuOh+2bU8Gs7zXDlu+fyZggnJ+iOBGrb/O1SorYg==} - engines: {node: '>=16.0.0 || 14 >= 14.17'} - peerDependencies: - rollup: ^2.68.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.24.0) - commondir: 1.0.1 - estree-walker: 2.0.2 - fdir: 6.4.0(picomatch@2.3.1) - is-reference: 1.2.1 - magic-string: 0.30.11 - picomatch: 2.3.1 - rollup: 4.24.0 - dev: false - /@rollup/plugin-image@3.0.3(rollup@4.40.0): resolution: {integrity: sha512-qXWQwsXpvD4trSb8PeFPFajp8JLpRtqqOeNYRUKnEQNHm7e5UP7fuSRcbjQAJ7wDZBbnJvSdY5ujNBQd9B1iFg==} engines: {node: '>=14.0.0'} @@ -16118,23 +16129,6 @@ packages: rollup: 2.79.2 dev: true - /@rollup/plugin-node-resolve@15.3.0(rollup@4.24.0): - resolution: {integrity: sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.78.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.24.0) - '@types/resolve': 1.20.2 - deepmerge: 4.3.1 - is-module: 1.0.0 - resolve: 1.22.8 - rollup: 4.24.0 - dev: false - /@rollup/plugin-node-resolve@15.3.0(rollup@4.40.0): resolution: {integrity: sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==} engines: {node: '>=14.0.0'} @@ -16162,20 +16156,6 @@ packages: rollup: 2.79.2 dev: true - /@rollup/plugin-replace@6.0.1(rollup@4.24.0): - resolution: {integrity: sha512-2sPh9b73dj5IxuMmDAsQWVFT7mR+yoHweBaXG2W/R8vQ+IWZlnaI7BR7J6EguVQUp1hd8Z7XuozpDjEKQAAC2Q==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.24.0) - magic-string: 0.30.11 - rollup: 4.24.0 - dev: false - /@rollup/plugin-replace@6.0.1(rollup@4.40.0): resolution: {integrity: sha512-2sPh9b73dj5IxuMmDAsQWVFT7mR+yoHweBaXG2W/R8vQ+IWZlnaI7BR7J6EguVQUp1hd8Z7XuozpDjEKQAAC2Q==} engines: {node: '>=14.0.0'} @@ -16229,21 +16209,6 @@ packages: estree-walker: 2.0.2 picomatch: 2.3.1 - /@rollup/pluginutils@5.1.2(rollup@4.24.0): - resolution: {integrity: sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.7 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 4.24.0 - dev: false - /@rollup/pluginutils@5.1.2(rollup@4.40.0): resolution: {integrity: sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==} engines: {node: '>=14.0.0'} @@ -16643,6 +16608,18 @@ packages: core-js: 3.43.0 jiti: 2.4.2 + /@rsbuild/core@1.5.4: + resolution: {integrity: sha512-iRzq4hEXawL4MVkPKhfGMJxS45XIfwkweAZXEHeaboq6vxbpg0dLRgkbaIuuFyF9hCwI0y3ant/xVXOqDghJNw==} + engines: {node: '>=18.12.0'} + hasBin: true + dependencies: + '@rspack/core': 1.5.2(@swc/helpers@0.5.17) + '@rspack/lite-tapable': 1.0.1 + '@swc/helpers': 0.5.17 + core-js: 3.45.1 + jiti: 2.5.1 + dev: true + /@rsbuild/plugin-assets-retry@1.3.0(@rsbuild/core@1.4.3): resolution: {integrity: sha512-qBo1dIiedkpeBSChB/sQmK8ZpVqrK7AoBqBeu/u+DoeiCct9z2BJ2UIFRCan3rFNtF7cU99ZGOYP+JxTo7ghqg==} peerDependencies: @@ -17455,6 +17432,25 @@ packages: typescript: 5.8.3 dev: true + /@rslib/core@0.12.4(typescript@5.8.3): + resolution: {integrity: sha512-GF+TIacQgtfvKK5r5g08IO795DnorpiHqcERsBua38iB0KsePpOGPAO+/E5YJncZ5regc72y1CByIELEeikgQA==} + engines: {node: '>=18.12.0'} + hasBin: true + peerDependencies: + '@microsoft/api-extractor': ^7 + typescript: ^5 + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + typescript: + optional: true + dependencies: + '@rsbuild/core': 1.5.4 + rsbuild-plugin-dts: 0.12.4(@rsbuild/core@1.5.4)(typescript@5.8.3) + tinyglobby: 0.2.14 + typescript: 5.8.3 + dev: true + /@rslib/core@0.9.0(typescript@5.8.3): resolution: {integrity: sha512-nWpST4+oPPTi/P4EfYqtmPLAu7AJxDevt8/+D3aULHwYkjZCVn5l3v1/tcvUJImEWsKnquknu3QIjUBNDwLzwg==} engines: {node: '>=16.7.0'} @@ -17561,6 +17557,14 @@ packages: requiresBuild: true optional: true + /@rspack/binding-darwin-arm64@1.5.2: + resolution: {integrity: sha512-aO76T6VQvAFt1LJNRA5aPOJ+szeTLlzC5wubsnxgWWjG53goP+Te35kFjDIDe+9VhKE/XqRId6iNAymaEsN+Uw==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@rspack/binding-darwin-x64@0.7.5: resolution: {integrity: sha512-teLK0TB1x0CsvaaiCopsFx4EvJe+/Hljwii6R7C9qOZs5zSOfbT/LQ202eA0sAGodCncARCGaXVrsekbrRYqeA==} cpu: [x64] @@ -17629,6 +17633,14 @@ packages: requiresBuild: true optional: true + /@rspack/binding-darwin-x64@1.5.2: + resolution: {integrity: sha512-XNSmUOwdGs2PEdCKTFCC0/vu/7U9nMhAlbHJKlmdt0V4iPvFyaNWxkNdFqzLc05jlJOfgDdwbwRb91y9IcIIFQ==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@rspack/binding-linux-arm64-gnu@0.7.5: resolution: {integrity: sha512-/24UytJXrK+7CsucDb30GCKYIJ8nG6ceqbJyOtsJv9zeArNLHkxrYGSyjHJIpQfwVN17BPP4RNOi+yIZ3ZgDyA==} cpu: [arm64] @@ -17697,6 +17709,14 @@ packages: requiresBuild: true optional: true + /@rspack/binding-linux-arm64-gnu@1.5.2: + resolution: {integrity: sha512-rNxRfgC5khlrhyEP6y93+45uQ4TI7CdtWqh5PKsaR6lPepG1rH4L8VE+etejSdhzXH6wQ76Rw4wzb96Hx+5vuQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@rspack/binding-linux-arm64-musl@0.7.5: resolution: {integrity: sha512-6RcxG42mLM01Pa6UYycACu/Nu9qusghAPUJumb8b8x5TRIDEtklYC5Ck6Rmagm+8E0ucMude2E/D4rMdIFcS3A==} cpu: [arm64] @@ -17765,6 +17785,14 @@ packages: requiresBuild: true optional: true + /@rspack/binding-linux-arm64-musl@1.5.2: + resolution: {integrity: sha512-kTFX+KsGgArWC5q+jJWz0K/8rfVqZOn1ojv1xpCCcz/ogWRC/qhDGSOva6Wandh157BiR93Vfoe1gMvgjpLe5g==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@rspack/binding-linux-x64-gnu@0.7.5: resolution: {integrity: sha512-R0Lu4CJN2nWMW7WzPBuCIju80cQPpcaqwKJDj/quwQySpJJZ6c5qGwB8mntqjxIzZDrNH6u0OkpiUTbvWZj8ww==} cpu: [x64] @@ -17833,6 +17861,14 @@ packages: requiresBuild: true optional: true + /@rspack/binding-linux-x64-gnu@1.5.2: + resolution: {integrity: sha512-Lh/6WZGq30lDV6RteQQu7Phw0RH2Z1f4kGR+MsplJ6X4JpnziDow+9oxKdu6FvFHWxHByncpveVeInusQPmL7Q==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@rspack/binding-linux-x64-musl@0.7.5: resolution: {integrity: sha512-dDgi/ThikMy1m4llxPeEXDCA2I8F8ezFS/eCPLZGU2/J1b4ALwDjuRsMmo+VXSlFCKgIt98V6h1woeg7nu96yg==} cpu: [x64] @@ -17901,6 +17937,14 @@ packages: requiresBuild: true optional: true + /@rspack/binding-linux-x64-musl@1.5.2: + resolution: {integrity: sha512-CsLC/SIOIFs6CBmusSAF0FECB62+J36alMdwl7j6TgN6nX3UQQapnL1aVWuQaxU6un/1Vpim0V/EZbUYIdJQ4g==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@rspack/binding-wasm32-wasi@1.4.11: resolution: {integrity: sha512-hiYxHZjaZ17wQtXyLCK0IdtOvMWreGVTiGsaHCxyeT+SldDG+r16bXNjmlqfZsjlfl1mkAqKz1dg+mMX28OTqw==} cpu: [wasm32] @@ -17917,6 +17961,15 @@ packages: '@napi-rs/wasm-runtime': 0.2.12 optional: true + /@rspack/binding-wasm32-wasi@1.5.2: + resolution: {integrity: sha512-cuVbGr1b4q0Z6AtEraI3becZraPMMgZtZPRaIsVLeDXCmxup/maSAR3T6UaGf4Q2SNcFfjw4neGz5UJxPK8uvA==} + cpu: [wasm32] + requiresBuild: true + dependencies: + '@napi-rs/wasm-runtime': 1.0.1 + dev: true + optional: true + /@rspack/binding-win32-arm64-msvc@0.7.5: resolution: {integrity: sha512-nEF4cUdLfgEK6FrgJSJhUlr2/7LY1tmqBNQCFsCjtDtUkQbJIEo1b8edT94G9tJcQoFE4cD+Re30yBYbQO2Thg==} cpu: [arm64] @@ -17985,6 +18038,14 @@ packages: requiresBuild: true optional: true + /@rspack/binding-win32-arm64-msvc@1.5.2: + resolution: {integrity: sha512-4vJQdzRTSuvmvL3vrOPuiA7f9v9frNc2RFWDxqg+GYt0YAjDStssp+lkVbRYyXnTYVJkARSuO6N+BOiI+kLdsQ==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@rspack/binding-win32-ia32-msvc@0.7.5: resolution: {integrity: sha512-hEcHRwJIzpZsePr+5x6V/7TGhrPXhSZYG4sIhsrem1za9W+qqCYYLZ7KzzbRODU07QaAH2RxjcA1bf8F2QDYAQ==} cpu: [ia32] @@ -18053,6 +18114,14 @@ packages: requiresBuild: true optional: true + /@rspack/binding-win32-ia32-msvc@1.5.2: + resolution: {integrity: sha512-zPbu3lx/NrNxdjZzTIjwD0mILUOpfhuPdUdXIFiOAO8RiWSeQpYOvyI061s/+bNOmr4A+Z0uM0dEoOClfkhUFg==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@rspack/binding-win32-x64-msvc@0.7.5: resolution: {integrity: sha512-PpVpP6J5/2b4T10hzSUwjLvmdpAOj3ozARl1Nrf/lsbYwhiXivoB8Gvoy/xe/Xpgr732Dk9VCeeW8rreWOOUVQ==} cpu: [x64] @@ -18121,6 +18190,14 @@ packages: requiresBuild: true optional: true + /@rspack/binding-win32-x64-msvc@1.5.2: + resolution: {integrity: sha512-duLNUTshX38xhC10/W9tpkPca7rOifP2begZjdb1ikw7C4AI0I7VnBnYt8qPSxGISoclmhOBxU/LuAhS8jMMlg==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@rspack/binding@0.7.5: resolution: {integrity: sha512-XcdOvaCz1mWWwr5vmEY9zncdInrjINEh60EWkYdqtCA67v7X7rB1fe6n4BeAI1+YLS2Eacj+lytlr+n7I+DYVg==} optionalDependencies: @@ -18245,6 +18322,21 @@ packages: '@rspack/binding-win32-ia32-msvc': 1.4.2 '@rspack/binding-win32-x64-msvc': 1.4.2 + /@rspack/binding@1.5.2: + resolution: {integrity: sha512-NKiBcsxmAzFDYRnK2ZHWbTtDFVT5/704eK4OfpgsDXPMkaMnBKijMKNgP5pbe18X4rUlz+8HnGm4+Xllo9EESw==} + optionalDependencies: + '@rspack/binding-darwin-arm64': 1.5.2 + '@rspack/binding-darwin-x64': 1.5.2 + '@rspack/binding-linux-arm64-gnu': 1.5.2 + '@rspack/binding-linux-arm64-musl': 1.5.2 + '@rspack/binding-linux-x64-gnu': 1.5.2 + '@rspack/binding-linux-x64-musl': 1.5.2 + '@rspack/binding-wasm32-wasi': 1.5.2 + '@rspack/binding-win32-arm64-msvc': 1.5.2 + '@rspack/binding-win32-ia32-msvc': 1.5.2 + '@rspack/binding-win32-x64-msvc': 1.5.2 + dev: true + /@rspack/core@0.7.5(@swc/helpers@0.5.13): resolution: {integrity: sha512-zVTe4WCyc3qsLPattosiDYZFeOzaJ32/BYukPP2I1VJtCVFa+PxGVRPVZhSoN6fXw5oy48yHg9W9v1T8CaEFhw==} engines: {node: '>=16.0.0'} @@ -18383,6 +18475,21 @@ packages: '@rspack/lite-tapable': 1.0.1 '@swc/helpers': 0.5.17 + /@rspack/core@1.5.2(@swc/helpers@0.5.17): + resolution: {integrity: sha512-ifjHqLczC81d1xjXPXCzxTFKNOFsEzuuLN44cMnyzQ/GWi4B48fyX7JHndWE7Lxd54cW1O9Ik7AdBN3Gq891EA==} + engines: {node: '>=18.12.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@module-federation/runtime-tools': 0.18.0 + '@rspack/binding': 1.5.2 + '@rspack/lite-tapable': 1.0.1 + '@swc/helpers': 0.5.17 + dev: true + /@rspack/dev-server@1.1.1(@rspack/core@1.3.9)(@types/express@4.17.21)(webpack-cli@5.1.4)(webpack@5.98.0): resolution: {integrity: sha512-9r7vOml2SrFA8cvbcJdSan9wHEo1TPXezF22+s5jvdyAAywg8w7HqDol6TPVv64NUonP1DOdyLxZ+6UW6WZiwg==} engines: {node: '>= 18.12.0'} @@ -21806,6 +21913,7 @@ packages: /@types/resolve@1.20.2: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + dev: true /@types/resolve@1.20.6: resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} @@ -26851,6 +26959,7 @@ packages: /commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + dev: true /compare-func@2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} @@ -27237,6 +27346,11 @@ packages: resolution: {integrity: sha512-aFCtd4l6GvAXwVEh3XbbVqJGHDJt0OZRa+5ePGx3LLwi12WfexqQxcsohb2wgsa/92xtl19Hd66G/L+TaAxDMw==} requiresBuild: true + /core-js@3.45.1: + resolution: {integrity: sha512-L4NPsJlCfZsPeXukyzHFlg/i7IIVwHSItR0wg0FLNqYClJ4MQYTYLbC7EkjKYRLZF2iof2MUgN0EGy7MdQFChg==} + requiresBuild: true + dev: true + /core-util-is@1.0.2: resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} @@ -31069,17 +31183,6 @@ packages: dependencies: pend: 1.2.0 - /fdir@6.4.0(picomatch@2.3.1): - resolution: {integrity: sha512-3oB133prH1o4j/L5lLW7uOCF1PlD+/It2L0eL/iAqWMB91RBbqTewABqxhj0ibBd90EEmWZq7ntIWzVaWcXTGQ==} - peerDependencies: - picomatch: ^3 || ^4 - peerDependenciesMeta: - picomatch: - optional: true - dependencies: - picomatch: 2.3.1 - dev: false - /fdir@6.4.4(picomatch@4.0.2): resolution: {integrity: sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==} peerDependencies: @@ -33851,6 +33954,7 @@ packages: /is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + dev: true /is-nan@1.3.2: resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} @@ -33954,6 +34058,7 @@ packages: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} dependencies: '@types/estree': 1.0.7 + dev: true /is-regex@1.2.1: resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} @@ -35914,12 +36019,19 @@ packages: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + dev: true /magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + /magic-string@0.30.18: + resolution: {integrity: sha512-yi8swmWbO17qHhwIBNeeZxTceJMeBvWJaId6dyvTSOwTipqeHhMhOrz6513r1sOKnpvQ7zkhlG8tPrpilwTxHQ==} + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + dev: true + /magicast@0.3.5: resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} dependencies: @@ -43940,15 +44052,6 @@ packages: is-plain-object: 3.0.1 dev: true - /rollup-plugin-node-externals@7.1.3(rollup@4.24.0): - resolution: {integrity: sha512-RM+7tJAejAoRsCf93TptTSdqUhRA8S78DleihMiu54Kac+uLkd9VIegLPhGnaW3ehZTXh56+R301mFH6j2A7vw==} - engines: {node: '>= 21 || ^20.6.0 || ^18.19.0'} - peerDependencies: - rollup: ^3.0.0 || ^4.0.0 - dependencies: - rollup: 4.24.0 - dev: false - /rollup-plugin-postcss@4.0.2(postcss@8.4.38)(ts-node@10.9.1): resolution: {integrity: sha512-05EaY6zvZdmvPUDi3uCcAQoESDcYnv8ogJJQRp6V5kZ6J6P7uAVJlrTZcaaA20wTH527YTnKfkAoPxWI/jPp4w==} engines: {node: '>=10'} @@ -44079,6 +44182,28 @@ packages: typescript: 5.8.3 dev: true + /rsbuild-plugin-dts@0.12.4(@rsbuild/core@1.5.4)(typescript@5.8.3): + resolution: {integrity: sha512-+T8/jVMneNZgHG7Mw4fjuL5lqa5+sDDKKY5cxNLxD9erYpNGIpVlU31MNE94lvjMmhlK4u5hW/g10u72Fl/FVw==} + engines: {node: '>=18.12.0'} + peerDependencies: + '@microsoft/api-extractor': ^7 + '@rsbuild/core': 1.x + typescript: ^5 + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + typescript: + optional: true + dependencies: + '@ast-grep/napi': 0.37.0 + '@rsbuild/core': 1.5.4 + magic-string: 0.30.18 + picocolors: 1.1.1 + tinyglobby: 0.2.14 + tsconfig-paths: 4.2.0 + typescript: 5.8.3 + dev: true + /rsbuild-plugin-dts@0.9.0(@rsbuild/core@1.3.21)(typescript@5.8.3): resolution: {integrity: sha512-cWlBxFWo2t2wVUFIa0nnGUkqaHsSEQuGr4/vh1W9aPtFxjuu3UYnDK8b6CYmbLpUbiRB1R4gkjARoaBx74gyTQ==} engines: {node: '>=16.7.0'} From 13815bef99c0e42e55d7c90fb460498b1a8e8f59 Mon Sep 17 00:00:00 2001 From: Zack Jackson <25274700+ScriptedAlchemy@users.noreply.github.com> Date: Fri, 12 Sep 2025 14:23:15 +0800 Subject: [PATCH 2/9] fix(esbuild): align exports with rslib output --- .changeset/strong-kings-act.md | 6 ++++++ packages/esbuild/package.json | 31 +++++++++++++------------------ 2 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 .changeset/strong-kings-act.md diff --git a/.changeset/strong-kings-act.md b/.changeset/strong-kings-act.md new file mode 100644 index 00000000000..774dfac9923 --- /dev/null +++ b/.changeset/strong-kings-act.md @@ -0,0 +1,6 @@ +--- +"@module-federation/esbuild": patch +"@module-federation/runtime": patch +--- + +build(esbuild): migrate from rollup to rslib diff --git a/packages/esbuild/package.json b/packages/esbuild/package.json index e0af701a0b2..b5ecbff26c6 100644 --- a/packages/esbuild/package.json +++ b/packages/esbuild/package.json @@ -2,8 +2,8 @@ "name": "@module-federation/esbuild", "version": "0.0.79", "author": "Zack Jackson (@ScriptedAlchemy)", - "main": "./dist/index.cjs.js", - "module": "./dist/index.esm.js", + "main": "./dist/index.js", + "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "license": "MIT", "repository": { @@ -21,23 +21,18 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./dist/index.esm.js", - "require": "./dist/index.cjs.js" + "import": "./dist/index.mjs", + "require": "./dist/index.js" }, "./plugin": { - "types": "./dist/esbuild.d.ts", - "import": "./dist/plugin.esm.js", - "require": "./dist/plugin.cjs.js" + "types": "./dist/adapters/lib/plugin.d.ts", + "import": "./dist/plugin.mjs", + "require": "./dist/plugin.js" }, "./build": { "types": "./dist/build.d.ts", - "import": "./dist/build.esm.js", - "require": "./dist/build.cjs.js" - }, - "./types": { - "types": "./dist/types.d.ts", - "import": "./dist/types.esm.js", - "require": "./dist/types.cjs.js" + "import": "./dist/build.mjs", + "require": "./dist/build.js" }, "./*": "./*" }, @@ -46,11 +41,11 @@ ".": [ "./dist/index.d.ts" ], - "helpers": [ - "./dist/helpers.d.ts" + "build": [ + "./dist/build.d.ts" ], - "types": [ - "./dist/types.d.ts" + "plugin": [ + "./dist/adapters/lib/plugin.d.ts" ] } }, From 467614b5c6b9f753a1a038d17261164edb2ee5ab Mon Sep 17 00:00:00 2001 From: Zack Jackson <25274700+ScriptedAlchemy@users.noreply.github.com> Date: Fri, 12 Sep 2025 17:09:15 +0800 Subject: [PATCH 3/9] build(runtime): remove sourcemap overrides in rollup config --- packages/runtime/rollup.config.cjs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/runtime/rollup.config.cjs b/packages/runtime/rollup.config.cjs index ba6e8707d63..9258294fd01 100644 --- a/packages/runtime/rollup.config.cjs +++ b/packages/runtime/rollup.config.cjs @@ -27,11 +27,6 @@ module.exports = (rollupConfig, projectOptions) => { rollupConfig.output = rollupConfig.output.map((c) => ({ ...c, sourcemap: true, - sourcemapExcludeSources: false, - sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => { - // Ensure source paths are relative and properly formatted - return relativeSourcePath.replace(/^\.\.\//, ''); - }, manualChunks: (id) => { if (id.includes('@swc/helpers')) { return 'polyfills'; @@ -52,11 +47,6 @@ module.exports = (rollupConfig, projectOptions) => { rollupConfig.output = { ...rollupConfig.output, sourcemap: true, - sourcemapExcludeSources: false, - sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => { - // Ensure source paths are relative and properly formatted - return relativeSourcePath.replace(/^\.\.\//, ''); - }, manualChunks: (id) => { if (id.includes('@swc/helpers')) { return 'polyfills'; From 957745aab850ab8279b8debf06fdca5684083a67 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Wed, 24 Sep 2025 15:59:39 -0700 Subject: [PATCH 4/9] ci: publint esbuild --- .github/workflows/build-and-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 6c82f98d9c8..7cb570e39bc 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -73,7 +73,6 @@ jobs: [ "$pkg" != "packages/assemble-release-plan" ] && \ [ "$pkg" != "packages/chrome-devtools" ] && \ [ "$pkg" != "packages/core" ] && \ - [ "$pkg" != "packages/esbuild" ] && \ [ "$pkg" != "packages/modernjs" ] && \ [ "$pkg" != "packages/utilities" ] && \ [ "$pkg" != "packages/metro-core" ] && \ From 471f2723dd70056ce0188ec7afa415dee32b8efb Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Wed, 24 Sep 2025 16:17:24 -0700 Subject: [PATCH 5/9] chore: scope esbuild changeset --- .changeset/strong-kings-act.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.changeset/strong-kings-act.md b/.changeset/strong-kings-act.md index 774dfac9923..c7a72ce9956 100644 --- a/.changeset/strong-kings-act.md +++ b/.changeset/strong-kings-act.md @@ -1,6 +1,5 @@ --- "@module-federation/esbuild": patch -"@module-federation/runtime": patch --- build(esbuild): migrate from rollup to rslib From dbcd82590902b3c170cf2afb16a027c517b718fc Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Wed, 24 Sep 2025 16:24:46 -0700 Subject: [PATCH 6/9] build(esbuild): externalize module federation deps --- packages/esbuild/rslib.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/esbuild/rslib.config.ts b/packages/esbuild/rslib.config.ts index ba96fca912a..37f861e2651 100644 --- a/packages/esbuild/rslib.config.ts +++ b/packages/esbuild/rslib.config.ts @@ -47,8 +47,8 @@ export default defineConfig({ root: './dist', }, externals: [ - // Module federation runtime packages that should remain external - '@module-federation/*', + // Keep all Module Federation packages (except this package) external + /^@module-federation\/(?!esbuild).*$/, // Optional dependency that may not be available 'pnpapi', ], From a7217e6329fbe834588f379d0f56e4b7893bff64 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Wed, 24 Sep 2025 16:36:11 -0700 Subject: [PATCH 7/9] build(esbuild): externalize all module federation deps --- packages/esbuild/rslib.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/esbuild/rslib.config.ts b/packages/esbuild/rslib.config.ts index 37f861e2651..ddea4e8c916 100644 --- a/packages/esbuild/rslib.config.ts +++ b/packages/esbuild/rslib.config.ts @@ -47,8 +47,8 @@ export default defineConfig({ root: './dist', }, externals: [ - // Keep all Module Federation packages (except this package) external - /^@module-federation\/(?!esbuild).*$/, + // Keep all Module Federation packages external + /^@module-federation\/.*$/, // Optional dependency that may not be available 'pnpapi', ], From f950b3330e91f58d45801105b64b89e6c7b199b7 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Wed, 24 Sep 2025 16:37:37 -0700 Subject: [PATCH 8/9] chore: externalize module federation deps --- packages/esbuild/rslib.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/esbuild/rslib.config.ts b/packages/esbuild/rslib.config.ts index ddea4e8c916..06d0424325d 100644 --- a/packages/esbuild/rslib.config.ts +++ b/packages/esbuild/rslib.config.ts @@ -48,7 +48,7 @@ export default defineConfig({ }, externals: [ // Keep all Module Federation packages external - /^@module-federation\/.*$/, + /@module-federation/, // Optional dependency that may not be available 'pnpapi', ], From 58aa9499188cc39f1f3370f027bad27c39fbd7df Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Wed, 24 Sep 2025 16:39:31 -0700 Subject: [PATCH 9/9] chore(esbuild): remove unused test configs --- packages/esbuild/jest.config.ts | 30 ------------------------------ packages/esbuild/project.json | 16 ---------------- packages/esbuild/vitest.config.ts | 19 ------------------- 3 files changed, 65 deletions(-) delete mode 100644 packages/esbuild/jest.config.ts delete mode 100644 packages/esbuild/vitest.config.ts diff --git a/packages/esbuild/jest.config.ts b/packages/esbuild/jest.config.ts deleted file mode 100644 index 68edd54f0a7..00000000000 --- a/packages/esbuild/jest.config.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* eslint-disable */ -import { readFileSync } from 'fs'; - -// Reading the SWC compilation config and remove the "exclude" -// for the test files to be compiled by SWC -const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8'), -); - -// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. -// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" -if (swcJestConfig.swcrc === undefined) { - swcJestConfig.swcrc = false; -} - -// Uncomment if using global setup/teardown files being transformed via swc -// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries -// jest needs EsModule Interop to find the default exported setup/teardown functions -// swcJestConfig.module.noInterop = false; - -export default { - displayName: 'runtime', - preset: '../../jest.preset.js', - transform: { - '^.+\\.[tj]s$': ['@swc/jest', swcJestConfig], - }, - moduleFileExtensions: ['ts', 'js', 'html'], - testEnvironment: 'node', - coverageDirectory: '../../coverage/packages/runtime', -}; diff --git a/packages/esbuild/project.json b/packages/esbuild/project.json index 7ef5c7f549e..57537b3492e 100644 --- a/packages/esbuild/project.json +++ b/packages/esbuild/project.json @@ -47,28 +47,12 @@ "options": { "parallel": false, "commands": [ - { - "command": "nx run esbuild:test", - "forwardAllArgs": false - }, { "command": "nx run esbuild:build", "forwardAllArgs": false } ] } - }, - "tesxt": { - "executor": "nx:run-commands", - "options": { - "parallel": false, - "commands": [ - { - "command": "vitest run -c packages/esbuild/vitest.config.ts", - "forwardAllArgs": false - } - ] - } } } } diff --git a/packages/esbuild/vitest.config.ts b/packages/esbuild/vitest.config.ts deleted file mode 100644 index 924d4384337..00000000000 --- a/packages/esbuild/vitest.config.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { defineConfig } from 'vitest/config'; -import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; -import path from 'path'; -export default defineConfig({ - define: { - __DEV__: true, - __TEST__: true, - __BROWSER__: false, - __VERSION__: '"unknow"', - }, - plugins: [nxViteTsPaths()], - test: { - environment: 'jsdom', - include: [path.resolve(__dirname, '__tests__/*.spec.ts')], - globals: true, - setupFiles: [path.resolve(__dirname, './__tests__/setup.ts')], - testTimeout: 10000, - }, -});