From 780927a9e900d878579bf68150185048987a2614 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 4 Nov 2024 17:59:43 +0800 Subject: [PATCH 01/23] docs: update Rslib description (#370) --- README.md | 2 +- packages/core/README.md | 2 +- packages/core/package.json | 2 +- packages/create-rslib/README.md | 2 +- packages/plugin-dts/README.md | 2 +- website/docs/en/guide/start/index.mdx | 2 +- website/docs/en/index.mdx | 2 +- website/i18n.json | 8 ++++---- website/rspress.config.ts | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 8f9b65c11..0422fd974 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ license

-Rslib is a library build tool that leverages the well-designed configurations and plugins of [Rsbuild](https://rsbuild.dev), empowering library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack. +Rslib is a library development tool that leverages the well-designed configurations and plugins of [Rsbuild](https://rsbuild.dev), empowering library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack. Rslib provides a comprehensive set of build features for library development, including: diff --git a/packages/core/README.md b/packages/core/README.md index 98de17e74..9d0e1055a 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -4,7 +4,7 @@ # Rslib -Rslib is a library build tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack. +Rslib is a library development tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack. ## Documentation diff --git a/packages/core/package.json b/packages/core/package.json index 6d617c13d..6776990eb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@rslib/core", "version": "0.0.16", - "description": "The Rspack-based library build tool.", + "description": "The Rsbuild-based library development tool.", "homepage": "https://lib.rsbuild.dev", "bugs": { "url": "https://github.com/web-infra-dev/rslib/issues" diff --git a/packages/create-rslib/README.md b/packages/create-rslib/README.md index 98de17e74..9d0e1055a 100644 --- a/packages/create-rslib/README.md +++ b/packages/create-rslib/README.md @@ -4,7 +4,7 @@ # Rslib -Rslib is a library build tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack. +Rslib is a library development tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack. ## Documentation diff --git a/packages/plugin-dts/README.md b/packages/plugin-dts/README.md index 98de17e74..9d0e1055a 100644 --- a/packages/plugin-dts/README.md +++ b/packages/plugin-dts/README.md @@ -4,7 +4,7 @@ # Rslib -Rslib is a library build tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack. +Rslib is a library development tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack. ## Documentation diff --git a/website/docs/en/guide/start/index.mdx b/website/docs/en/guide/start/index.mdx index 7dfd9c1af..131e2619e 100644 --- a/website/docs/en/guide/start/index.mdx +++ b/website/docs/en/guide/start/index.mdx @@ -1,6 +1,6 @@ # Introduction -Rslib is a library build tool that leverages the well-designed configurations and plugins of [Rsbuild](https://rsbuild.dev), empowering library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack. +Rslib is a library development tool that leverages the well-designed configurations and plugins of [Rsbuild](https://rsbuild.dev), empowering library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack. Rslib provides a comprehensive set of build features for library development, including: diff --git a/website/docs/en/index.mdx b/website/docs/en/index.mdx index 521c6bd65..5e3b08c25 100644 --- a/website/docs/en/index.mdx +++ b/website/docs/en/index.mdx @@ -1,4 +1,4 @@ --- pageType: home -titleSuffix: ' - Rsbuild-based library build tool' +titleSuffix: ' - Rsbuild-based library development tool' --- diff --git a/website/i18n.json b/website/i18n.json index 6fc079a83..722fa5439 100644 --- a/website/i18n.json +++ b/website/i18n.json @@ -8,12 +8,12 @@ "zh": "快速上手" }, "subtitle": { - "en": "The Rsbuild-based Library Build Tool", - "zh": "基于 Rsbuild 的库构建工具" + "en": "Rsbuild-based Library Development Tool", + "zh": "基于 Rsbuild 的 Library 开发工具" }, "slogan": { - "en": "Leverage the knowledge and ecosystem of webpack and Rspack", - "zh": "复用 webpack 和 Rspack 的知识和生态" + "en": "Create JavaScript libraries in a simple and intuitive way", + "zh": "以简单直观的方式创建 JavaScript 库" }, "toolStackTitle": { "en": "Tool Stack", diff --git a/website/rspress.config.ts b/website/rspress.config.ts index f72965dfa..f4b57772b 100644 --- a/website/rspress.config.ts +++ b/website/rspress.config.ts @@ -46,7 +46,7 @@ export default defineConfig({ lang: 'en', label: 'English', title: 'Rslib', - description: 'The Rsbuild-based library build tool', + description: 'The Rsbuild-based library development tool', editLink: { docRepoBaseUrl: 'https://github.com/web-infra-dev/rslib/tree/main/website/docs', From 406396de8ca017b8c3c6aaaa9687019b22de525f Mon Sep 17 00:00:00 2001 From: Wei Date: Mon, 4 Nov 2024 18:58:55 +0800 Subject: [PATCH 02/23] docs: update structure / format / 3rd deps / glossary / TS (#357) --- packages/core/src/types/config/index.ts | 1 + packages/create-rslib/src/index.ts | 20 +-- scripts/dictionary.txt | 1 + website/docs/en/guide/advanced/_meta.json | 1 - website/docs/en/guide/advanced/templates.mdx | 1 - .../en/guide/advanced/third-party-deps.mdx | 80 +++++++++++ website/docs/en/guide/basic/_meta.json | 7 +- website/docs/en/guide/basic/bundle-mode.mdx | 1 - website/docs/en/guide/basic/cjs-esm.mdx | 1 - website/docs/en/guide/basic/output-files.mdx | 1 - website/docs/en/guide/basic/output-format.mdx | 126 ++++++++++++++++++ .../docs/en/guide/basic/output-structure.mdx | 20 +++ .../docs/en/guide/basic/typescript-usage.mdx | 1 - website/docs/en/guide/basic/typescript.mdx | 46 +++++++ .../docs/en/guide/start/components/CJS.mdx | 1 + .../docs/en/guide/start/components/ESM.mdx | 1 + .../docs/en/guide/start/components/UMD.mdx | 1 + website/docs/en/guide/start/glossary.mdx | 24 ++++ website/docs/en/guide/start/quick-start.mdx | 37 +++-- 19 files changed, 342 insertions(+), 29 deletions(-) delete mode 100644 website/docs/en/guide/advanced/templates.mdx delete mode 100644 website/docs/en/guide/basic/bundle-mode.mdx delete mode 100644 website/docs/en/guide/basic/cjs-esm.mdx delete mode 100644 website/docs/en/guide/basic/output-files.mdx create mode 100644 website/docs/en/guide/basic/output-format.mdx create mode 100644 website/docs/en/guide/basic/output-structure.mdx delete mode 100644 website/docs/en/guide/basic/typescript-usage.mdx create mode 100644 website/docs/en/guide/basic/typescript.mdx create mode 100644 website/docs/en/guide/start/components/CJS.mdx create mode 100644 website/docs/en/guide/start/components/ESM.mdx create mode 100644 website/docs/en/guide/start/components/UMD.mdx diff --git a/packages/core/src/types/config/index.ts b/packages/core/src/types/config/index.ts index 7b159240d..f2bb4800b 100644 --- a/packages/core/src/types/config/index.ts +++ b/packages/core/src/types/config/index.ts @@ -41,6 +41,7 @@ export type AutoExternal = | boolean | { dependencies?: boolean; + optionalDependencies?: boolean; devDependencies?: boolean; peerDependencies?: boolean; }; diff --git a/packages/create-rslib/src/index.ts b/packages/create-rslib/src/index.ts index 87000b7c7..81345e4ae 100644 --- a/packages/create-rslib/src/index.ts +++ b/packages/create-rslib/src/index.ts @@ -37,6 +37,16 @@ async function getTemplateName({ template }: Argv) { }), ); + const language = checkCancel( + await select({ + message: 'Select language', + options: [ + { value: 'ts', label: 'TypeScript' }, + { value: 'js', label: 'JavaScript' }, + ], + }), + ); + const supportStorybook = templateName === 'react'; type ExcludesFalse = (x: T | false) => x is T; @@ -56,16 +66,6 @@ async function getTemplateName({ template }: Argv) { }), ); - const language = checkCancel( - await select({ - message: 'Select language', - options: [ - { value: 'ts', label: 'TypeScript' }, - { value: 'js', label: 'JavaScript' }, - ], - }), - ); - return composeTemplateName({ template: templateName, lang: language as Lang, diff --git a/scripts/dictionary.txt b/scripts/dictionary.txt index 0846173cf..bdd78a973 100644 --- a/scripts/dictionary.txt +++ b/scripts/dictionary.txt @@ -131,6 +131,7 @@ unencapsulated unocss unpatch unplugin +unpredictibly unshift upath vitest diff --git a/website/docs/en/guide/advanced/_meta.json b/website/docs/en/guide/advanced/_meta.json index 7a91340c9..88c595ea9 100644 --- a/website/docs/en/guide/advanced/_meta.json +++ b/website/docs/en/guide/advanced/_meta.json @@ -1,6 +1,5 @@ [ "package-json", - "templates", "third-party-deps", "polyfill", "css", diff --git a/website/docs/en/guide/advanced/templates.mdx b/website/docs/en/guide/advanced/templates.mdx deleted file mode 100644 index 684234ff4..000000000 --- a/website/docs/en/guide/advanced/templates.mdx +++ /dev/null @@ -1 +0,0 @@ -# Templates diff --git a/website/docs/en/guide/advanced/third-party-deps.mdx b/website/docs/en/guide/advanced/third-party-deps.mdx index 40af82a4b..3c1edaaa5 100644 --- a/website/docs/en/guide/advanced/third-party-deps.mdx +++ b/website/docs/en/guide/advanced/third-party-deps.mdx @@ -1 +1,81 @@ # Handle Third-party Dependencies + +Generally, third-party dependencies required by a project can be installed via the `install` command in the package manager. After the third-party dependencies are successfully installed, they will generally appear under `dependencies` and `devDependencies` in the project `package.json`. + +```json title="package.json" +{ + "dependencies": {}, + "devDependencies": {} +} +``` + +Dependencies under `"dependencies"` are generally related to project code and builds, and if these third-party dependencies are declared under `"devDependencies"`, then there will be missing dependencies in production runtime. + +In addition to `"dependencies"`, `"peerDependencies"`can also declare dependencies that are needed in the production environment, but it puts more emphasis on the existence of these dependencies declared by `"peerDependencies"` in the project's runtime environment, similar to the plugin mechanism. + +## Default handling of third-party dependencies + +By default, **third-party dependencies under `"dependencies"`, `"optionalDependencies"` and `"peerDependencies"` are not bundled by Rslib**. + +This is because when the npm package is installed, its `"dependencies"` will also be installed. By not packaging `"dependencies"`, you can reduce the size of the package product. + +If you need to package some dependencies, it is recommended to move them from `"dependencies"` to `"devDependencies"`, which is equivalent to **prebundle** the dependencies and reduces the size of the dependency installation. + +### Example + +If the project has a dependency on `react`. + +```json title="package.json" +{ + "dependencies": { + "react": "^18" + }, + // or + "peerDependencies": { + "react": "^18" + } +} +``` + +When a `react` dependency is used in the source code: + +```tsx title="src/index.ts" +import React from 'react'; +console.info(React); +``` + +The `react` code will not be bundled into the output: + +```js title="dist/index.js" +import * as __WEBPACK_EXTERNAL_MODULE_react__ from 'react'; +console.info(__WEBPACK_EXTERNAL_MODULE_react__['default']); +``` + +If you want to modify the default processing, you can use the following API. + +- [`lib.autoExternal`](/config/lib/auto-external) + +## Exclude specified third-party dependencies + +We previously introduced the use of [`lib.autoExternal`](/config/lib/auto-external). This configuration lets you manage third-party dependencies more precisely. + +For example, when we need to leave only certain dependencies unbundled, we can configure it as follows. + +:::tip +In this case, some dependencies may not be suitable for bundling. If so, you can handle it as follows. +::: + +```ts +export default defineConfig({ + lib: [ + { + // ... + autoExternal: true, + output: { + externals: ['pkg-1', /pkg-2/], + }, + // ... + }, + ], +}); +``` diff --git a/website/docs/en/guide/basic/_meta.json b/website/docs/en/guide/basic/_meta.json index bcf7b076a..78cafde6d 100644 --- a/website/docs/en/guide/basic/_meta.json +++ b/website/docs/en/guide/basic/_meta.json @@ -1,10 +1,9 @@ [ "cli", "configure-rslib", - "typescript-usage", - "output-files", - "bundle-mode", + "typescript", + "output-format", + "output-structure", "upgrade-rslib", - "cjs-esm", "umd" ] diff --git a/website/docs/en/guide/basic/bundle-mode.mdx b/website/docs/en/guide/basic/bundle-mode.mdx deleted file mode 100644 index 7c13536c9..000000000 --- a/website/docs/en/guide/basic/bundle-mode.mdx +++ /dev/null @@ -1 +0,0 @@ -# Select Bundle Mode diff --git a/website/docs/en/guide/basic/cjs-esm.mdx b/website/docs/en/guide/basic/cjs-esm.mdx deleted file mode 100644 index cfa881420..000000000 --- a/website/docs/en/guide/basic/cjs-esm.mdx +++ /dev/null @@ -1 +0,0 @@ -# CJS and ESM diff --git a/website/docs/en/guide/basic/output-files.mdx b/website/docs/en/guide/basic/output-files.mdx deleted file mode 100644 index 0132e16c0..000000000 --- a/website/docs/en/guide/basic/output-files.mdx +++ /dev/null @@ -1 +0,0 @@ -# Output Files diff --git a/website/docs/en/guide/basic/output-format.mdx b/website/docs/en/guide/basic/output-format.mdx new file mode 100644 index 000000000..b5e4e97b2 --- /dev/null +++ b/website/docs/en/guide/basic/output-format.mdx @@ -0,0 +1,126 @@ +import ESM from '../start/components/ESM.mdx'; +import CJS from '../start/components/CJS.mdx'; +import UMD from '../start/components/UMD.mdx'; + +# Output Format + +This sets the output format for the generated JavaScript files. There are three supported values now: `esm`, `cjs`, and `umd`. In this guide, we will discuss the differences between these formats and how to choose the right one for your library. + +## ESM / CJS + +Library authors need to carefully consider which module formats to support. Let's understand ESM (ECMAScript Modules) and CJS (CommonJS) and when to use them. + +### What are ESM and CJS? + + + +- **ESM**: ESM is + +- **CommonJS**: [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules) is + +### What is the dilemma of esm / cjs + +> The following references are from [Node Modules at War: Why CommonJS and ES Modules Can't Get Along](https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1). + +1. You can't `require()` ESM scripts; you can only import ESM scripts, like this: `import {foo} from 'foo'` +2. CJS scripts can't use static `import` statements like the one above. +3. ESM scripts can `import` CJS scripts, but only by using the “default import” syntax `import _ from 'lodash'`, not the “named import” syntax `import {shuffle} from 'lodash'`, which is a hassle if the CJS script uses named exports. (Except, sometimes, unpredictibly, Node can figure out what you meant!) +4. ESM scripts can `require()` CJS scripts, even with named exports, but it's typically not worth the trouble, because it requires even more boilerplate, and, worst of all, bundlers like Webpack and Rollup don't/won't know how to work with ESM scripts that use `require()`. +5. CJS is the default; you have to opt-in to ESM mode. You can opt-in to ESM mode by renaming your script from `.js` to `.mjs`. Alternately, you can set `"type": "module"` in `package.json`, and then you can opt-out of ESM by renaming scripts from `.js` to `.cjs`. (You can even tweak just an individual subdirectory by putting a one-line `{"type": "module"}` `package.json` file in there.) + +### When to support which format? + +For different shapes of libraries, the choice of module format may vary. Here are two common scenarios: + +#### ship [pure ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) package. + +shipping only ESM is the best choice for libraries that are intended to be used in modern environments, such as browser applications or Node.js applications that support ESM. However, if the upstream library is in format of CJS, they only can import pure ESM by using dynamic import like `const pureEsmLib = await import('pure-esm-lib')`. + +- **Pros:** + - ESM is the official JavaScript standard, making it more future-proof and widely supported across environments. + - ESM enables static analysis, which facilitates optimizations like tree-shaking to remove unused code. + - The syntax is cleaner and more intuitive, with import and export statements that are easier to read compared to CommonJS. + - ESM allows for better compatibility across both browser and server environments, making it ideal for isomorphic or universal JavaScript applications. +- **Cons:** + - ESM modules are loaded asynchronously, which can complicate conditional imports and lazy loading in some cases. + - Some Node.js tools and libraries still have limited or incomplete support for ESM, requiring workarounds or additional configuration. + - You must explicitly include file extensions in import paths, which can be cumbersome, especially when working with TypeScript or other transpiled languages. + +#### ship [ESM & CJS (dual)](https://antfu.me/posts/publish-esm-and-cjs#compatibility) package. + +The community is migrating to ESM, but there are still many projects using CJS. If you want to support both ESM and CJS, you can publish a dual package. For most library authors, offering dual formats is a safer and smoother way to access the best of both worlds. You could read antfu' blog post [Publish ESM and CJS packages](https://antfu.me/posts/publish-esm-and-cjs) for more details. + +- **Pros:** + + - Wider compatibility: Dual packages support both modern ESM environments and legacy CJS environments, ensuring broader usage across different ecosystems. + - Gradual migration: Developers can gradually transition from CJS to ESM without breaking existing projects, allowing for smoother adoption of the new standard. + - Flexibility for consumers: Users of the package can choose which module system best fits their project, providing flexibility in different build tools and environments. + - Cross-runtime support: Dual packages can work in multiple runtimes, such as Node.js and browsers, without requiring additional bundling or transpilation. + +- **Cons:** + + - Increased complexity: Maintaining two module formats adds complexity to the build process, requiring additional configuration and testing to ensure both versions work correctly14. + - Dual package hazard: Mixing ESM and CJS can lead to issues such as broken instanceof checks or unexpected behavior when dependencies are loaded in different formats13. + +## UMD + + + +### When to use UMD? + +If you are building a library that needs to be used in both the browser and Node.js environments, UMD is a good choice. UMD can be used as a standalone script tag in the browser or as a CommonJS module in Node.js. + +A detailed answer from StackOverflow: [What is the Universal Module Definition (UMD)?](https://stackoverflow.com/a/77284527/8063488) + +> However, for frontend libraries, you still offer a single file for convenience, that users can download (from a CDN) and directly embed in their web pages. This still commonly employs a UMD pattern, it's just no longer written/copied by the library author into their source code, but added automatically by the transpiler/bundler. +> +> And similarly, for backend/universal libraries that are supposed to work in +> node.js, you still also distribute a commonjs module build via npm to support +> all the users who still use a legacy version of node.js (and don't want/need +> to employ a transpiler themselves). This is less common nowadays for new +> libraries, but existing ones try hard to stay backwards-compatible and not +> cause applications to break. + +### How to build a UMD library? + +- Set the `output.format` to `umd` in the Rslib configuration file. +- If the library need to be exported with a name, set `output.umdName` to the name of the UMD library. +- Use `output.externals` to specify the external dependencies that the UMD library depends on, `lib.autoExtension` is enabled by default for UMD. + +### Examples + +The following Rslib config is an example to build a UMD library. + +- `output.format: 'umd'`: instruct Rslib to build in UMD format. +- `output.umdName: 'RslibUmdExample'`: set the export name of the UMD library. +- `output.externals.react: 'React'`: specify the external dependency `react` could be accessed by `window.React`. +- `runtime: 'classic'`: use the classic runtime of React to support applications that using React version under 18. + +```ts title="rslib.config.ts" {7-12,22} +import { pluginReact } from '@rsbuild/plugin-react'; +import { defineConfig } from '@rslib/core'; + +export default defineConfig({ + lib: [ + { + format: 'umd', + umdName: 'RslibUmdExample', + output: { + externals: { + react: 'React', + }, + distPath: { + root: './dist/umd', + }, + }, + }, + ], + plugins: [ + pluginReact({ + swcReactOptions: { + runtime: 'classic', + }, + }), + ], +}); +``` diff --git a/website/docs/en/guide/basic/output-structure.mdx b/website/docs/en/guide/basic/output-structure.mdx new file mode 100644 index 000000000..7627a9a91 --- /dev/null +++ b/website/docs/en/guide/basic/output-structure.mdx @@ -0,0 +1,20 @@ +# Output Structure + +## bundle / bundleless + +So first let's understand bundle and bundleless. + +A bundle is a package of build artifacts, which may be a single file or multiple files based on a certain [code splitting strategy](https://esbuild.github.io/api/#splitting). + +bundleless, on the other hand, means that each source file is compiled and built separately, but not bundled together. Each output file can be found with its corresponding source code file. The process of **bundleless build can also be understood as the process of code conversion of source files only**. + +They have their own benefits. + +- bundle can reduce the size of build artifacts and also pre-package dependencies to reduce the size of installed dependencies. Packaging libraries in advance can speed up application project builds. +- bundleless maintains the original file structure and is more conducive to debugging and tree shaking. + +:::warning +bundleless is a single-file compilation mode, so for referencing and exporting types, you need to add the `type` keyword. For example, `import type { A } from './types'`. Please refer to [TypeScript - isolatedModules](/guide/basic/typescript#isolatedmodules) for more information. +::: + +You can specify whether to bundle using the [bundle](/config/lib/bundle) option, which is set to `true` by default. diff --git a/website/docs/en/guide/basic/typescript-usage.mdx b/website/docs/en/guide/basic/typescript-usage.mdx deleted file mode 100644 index e7452683b..000000000 --- a/website/docs/en/guide/basic/typescript-usage.mdx +++ /dev/null @@ -1 +0,0 @@ -# Use Typescript diff --git a/website/docs/en/guide/basic/typescript.mdx b/website/docs/en/guide/basic/typescript.mdx new file mode 100644 index 000000000..c59369d51 --- /dev/null +++ b/website/docs/en/guide/basic/typescript.mdx @@ -0,0 +1,46 @@ +# Use Typescript + +Rslib supports TypeScript by default, allowing you to directly use `.ts` and `.tsx` files in your projects. + +## TypeScript Transpilation + +Rslib uses SWC by default for transpiling TypeScript code, and it also supports switching to Babel for transpilation. + +### isolatedModules + +Unlike the native TypeScript compiler, tools like SWC and Babel compile each file separately and cannot determine whether an imported name is a type or a value. Therefore, when using TypeScript in Rslib, you need to enable the [isolatedModules](https://typescriptlang.org/tsconfig/#isolatedModules) option in your `tsconfig.json` file: + +```json title="tsconfig.json" +{ + "compilerOptions": { + "isolatedModules": true + } +} +``` + +This option can help you avoid using certain syntax that cannot be correctly compiled by SWC and Babel, such as cross-file type references. It will guide you to correct the corresponding usage: + +```ts +// Wrong +export { SomeType } from './types'; + +// Correct +export type { SomeType } from './types'; +``` + +> See [SWC - Migrating from tsc](https://swc.rs/docs/migrating-from-tsc) for more details about the differences between SWC and tsc. + +## tsconfig.json Path + +Rslib by default reads the `tsconfig.json` file from the root directory. You can use [source.tsconfigPath](https://rsbuild.dev/config/source/tsconfig-path) to configure a custom tsconfig.json file path. + +```ts +export default { + lib: [ + // ... + ], + source: { + tsconfigPath: './tsconfig.custom.json', + }, +}; +``` diff --git a/website/docs/en/guide/start/components/CJS.mdx b/website/docs/en/guide/start/components/CJS.mdx new file mode 100644 index 000000000..6914198b9 --- /dev/null +++ b/website/docs/en/guide/start/components/CJS.mdx @@ -0,0 +1 @@ +a module system used in JavaScript, particularly in server-side environments like Node.js. It was created to allow JavaScript to be used outside of the browser by providing a way to manage modules and dependencies. diff --git a/website/docs/en/guide/start/components/ESM.mdx b/website/docs/en/guide/start/components/ESM.mdx new file mode 100644 index 000000000..8774f4bc9 --- /dev/null +++ b/website/docs/en/guide/start/components/ESM.mdx @@ -0,0 +1 @@ +a modern module system introduced in ES2015 that allows JavaScript code to be organized into reusable, self-contained modules. ESM is now the standard for both [browser](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and [Node.js](https://nodejs.org/api/esm.html) environments, replacing older module systems like [CommonJS (CJS)](https://nodejs.org/api/modules.html) and [AMD](https://requirejs.org/docs/whyamd.html). diff --git a/website/docs/en/guide/start/components/UMD.mdx b/website/docs/en/guide/start/components/UMD.mdx new file mode 100644 index 000000000..14851f7aa --- /dev/null +++ b/website/docs/en/guide/start/components/UMD.mdx @@ -0,0 +1 @@ +UMD stands for [Universal Module Definition](https://github.com/umdjs/umd), a pattern for writing JavaScript modules that can work universally across different environments, such as both the browser and Node.js. Its primary goal is to ensure compatibility with the most popular module systems, including AMD (Asynchronous Module Definition), CommonJS (CJS), and browser globals. diff --git a/website/docs/en/guide/start/glossary.mdx b/website/docs/en/guide/start/glossary.mdx index ca3c82769..ddc5d38d4 100644 --- a/website/docs/en/guide/start/glossary.mdx +++ b/website/docs/en/guide/start/glossary.mdx @@ -1 +1,25 @@ +import ESM from './components/ESM.mdx'; +import CJS from './components/CJS.mdx'; +import UMD from './components/UMD.mdx'; + # Glossary + +## ESM + +ESM stands for ECMAScript Modules, + +## CJS + +CJS stands for [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules), + +## UMD + + + +## Bundleless + +Bundleless refers to a development approach that avoids the traditional practice of bundling multiple JavaScript / TypeScript files into a single or fewer output files before serving them to the client. Instead, it aims to serve individual modules directly. + +## More + +See more glossary in [Rsbuild - Glossary](https://rsbuild.dev/guide/start/glossary) and [Rspack - Glossary](https://rspack.dev/misc/glossary). diff --git a/website/docs/en/guide/start/quick-start.mdx b/website/docs/en/guide/start/quick-start.mdx index f7f818712..2bd7d0bcc 100644 --- a/website/docs/en/guide/start/quick-start.mdx +++ b/website/docs/en/guide/start/quick-start.mdx @@ -23,7 +23,7 @@ nvm use --lts ## Creating an Rslib Project -You can use the `create-rslib` to create a new Rslib project. Run the following command: +You can use the [`create-rslib`](https://www.npmjs.com/package/create-rslib) to create a new Rslib project. Run the following command: import { PackageManagerTabs } from '@theme'; @@ -40,18 +40,37 @@ Then follow the prompts to complete the operation. ### Templates -When creating a project, you can choose from the following templates provided by `create-rslib`: +`create-rslib` is a tool for quickly creating Rslib projects. When creating a project, you can choose from the following templates: -| Template | Description | -| ------------ | -------------------------------------------------- | -| node-dual-js | Node.js dual ESM/CJS package | -| node-dual-ts | Node.js dual ESM/CJS package written in TypeScript | -| node-esm-js | Node.js pure ESM package | -| node-esm-ts | Node.js pure ESM package written in TypeScript | +| Template | Description | +| ---------------------------- | ---------------------------- | +| Node.js dual ESM/CJS package | Node.js dual ESM/CJS package | +| Node.js pure ESM package | Node.js pure ESM package | +| React | React component library | + +Each template supports both JavaScript and TypeScript, along with optional development tools, formatters, and linters. + +:::info +We're working to provide templates for more frameworks (such as Vue). +::: + +### Development Tools + +`create-rslib` can help you set up some commonly used development linter tools, including [Vitest](https://vitest.dev/), [Storybook](https://storybook.js.org/). You can use the arrow keys and the space bar to make your selections. If you don't need these tools, you can simply press Enter to skip. + +- Vitest is available for all templates, it will be adapted based on the template's selection. +- Storybook is available for web targeted templates (React), it will be adapted based on the template's selection. + +```text +◆ Select development tools (Use to select, to continue) +│ ◻ Storybook +│ ◻ Vitest +└ +``` ### Optional Tools -`create-rslib` can help you set up some commonly used tools, including [Biome](https://github.com/biomejs/biome), [ESLint](https://github.com/eslint/eslint), and [prettier](https://github.com/prettier/prettier). You can use the arrow keys and the space bar to make your selections. If you don't need these tools, you can simply press Enter to skip. +`create-rslib` can help you set up some commonly used formatter and linter tools, including [Biome](https://biomejs.dev/), [ESLint](https://eslint.org/), and [prettier](https://prettier.io/). You can use the arrow keys and the space bar to make your selections. If you don't need these tools, you can simply press Enter to skip. ```text ◆ Select additional tools (Use to select, to continue) From 103902b33d89518be4a872472c6d6a7984f9a612 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 4 Nov 2024 19:44:59 +0800 Subject: [PATCH 03/23] docs: add basic description and JSDoc for lib options (#372) --- packages/core/src/types/config/index.ts | 62 ++++++++++++++++++- website/docs/en/config/lib/auto-extension.mdx | 2 + website/docs/en/config/lib/auto-external.mdx | 2 + website/docs/en/config/lib/banner.mdx | 2 + website/docs/en/config/lib/bundle.mdx | 2 + website/docs/en/config/lib/dts.mdx | 2 + .../docs/en/config/lib/external-helpers.mdx | 2 + website/docs/en/config/lib/footer.mdx | 2 + website/docs/en/config/lib/format.mdx | 2 + website/docs/en/config/lib/redirect.mdx | 2 + website/docs/en/config/lib/syntax.mdx | 2 + website/docs/en/config/lib/umd-name.mdx | 2 + 12 files changed, 83 insertions(+), 1 deletion(-) diff --git a/packages/core/src/types/config/index.ts b/packages/core/src/types/config/index.ts index f2bb4800b..1c18042f4 100644 --- a/packages/core/src/types/config/index.ts +++ b/packages/core/src/types/config/index.ts @@ -72,18 +72,78 @@ export type Redirect = { }; export interface LibConfig extends RsbuildConfig { + /** + * Whether to bundle the library. + * @default true + */ bundle?: boolean; + /** + * Output format for the generated JavaScript files. + * @default undefined + */ format?: Format; + /** + * Whether to automatically set the file extension based on the `format` option in the JS and DTS output files. + * @default true + */ autoExtension?: boolean; + /** + * Whether to automatically externalize dependencies and do not bundle them. + * @default true + */ autoExternal?: AutoExternal; + /** + * Configure the redirect of the import paths. + * @default {} + */ redirect?: Redirect; - /** Support esX and browserslist query */ + /** + * Support esX and browserslist query + * @default 'esnext' + */ syntax?: Syntax; + /** + * Whether to import SWC helper functions from `@swc/helpers` instead of inlining them. + * @default false + */ externalHelpers?: boolean; + /** + * Inject content into the top of each JS, CSS or DTS file. + * @default {} + */ banner?: BannerAndFooter; + /** + * Inject content into the bottom of each JS, CSS or DTS file. + * @default {} + */ footer?: BannerAndFooter; + /** + * Configure the shims for CommonJS and ESM output. + * + * @default + * ```js + * const defaultShims = { + * cjs: { + * 'import.meta.url': true, + * }, + * esm: { + * __filename: false, + * __dirname: false, + * require: false, + * }, + * }; + * ``` + */ shims?: Shims; + /** + * Configure the generation of the TypeScript declaration files. + * @default false + */ dts?: Dts; + /** + * The export name of the UMD bundle. + * @default undefined + */ umdName?: string; } diff --git a/website/docs/en/config/lib/auto-extension.mdx b/website/docs/en/config/lib/auto-extension.mdx index b83b0e4fa..851df34bb 100644 --- a/website/docs/en/config/lib/auto-extension.mdx +++ b/website/docs/en/config/lib/auto-extension.mdx @@ -2,3 +2,5 @@ - **Type:** `boolean` - **Default:** `true` + +Whether to automatically set the file extension based on the `format` option in the JS and DTS output files. diff --git a/website/docs/en/config/lib/auto-external.mdx b/website/docs/en/config/lib/auto-external.mdx index b08d6e9b3..15f6b94c2 100644 --- a/website/docs/en/config/lib/auto-external.mdx +++ b/website/docs/en/config/lib/auto-external.mdx @@ -2,3 +2,5 @@ - **Type:** `boolean` - **Default:** `true` + +Whether to automatically externalize dependencies and do not bundle them. diff --git a/website/docs/en/config/lib/banner.mdx b/website/docs/en/config/lib/banner.mdx index 8e7f846f0..2ec15a83c 100644 --- a/website/docs/en/config/lib/banner.mdx +++ b/website/docs/en/config/lib/banner.mdx @@ -11,3 +11,5 @@ type Banner = { ``` - **Default:** `{}` + +Inject content into the top of each JS, CSS or DTS file. diff --git a/website/docs/en/config/lib/bundle.mdx b/website/docs/en/config/lib/bundle.mdx index be149608a..7b1ee3825 100644 --- a/website/docs/en/config/lib/bundle.mdx +++ b/website/docs/en/config/lib/bundle.mdx @@ -2,3 +2,5 @@ - **Type:** `boolean` - **Default:** `true` + +Whether to bundle the library. diff --git a/website/docs/en/config/lib/dts.mdx b/website/docs/en/config/lib/dts.mdx index d9b3bac90..2d5594da4 100644 --- a/website/docs/en/config/lib/dts.mdx +++ b/website/docs/en/config/lib/dts.mdx @@ -15,3 +15,5 @@ type Dts = ``` - **Default:** `undefined` + +Configure the generation of the TypeScript declaration files. diff --git a/website/docs/en/config/lib/external-helpers.mdx b/website/docs/en/config/lib/external-helpers.mdx index 8ba583282..2255aebaf 100644 --- a/website/docs/en/config/lib/external-helpers.mdx +++ b/website/docs/en/config/lib/external-helpers.mdx @@ -2,3 +2,5 @@ - **Type:** `boolean` - **Default:** `false` + +Whether to import SWC helper functions from `@swc/helpers` instead of inlining them. diff --git a/website/docs/en/config/lib/footer.mdx b/website/docs/en/config/lib/footer.mdx index 3f6066c7c..d0b016d9b 100644 --- a/website/docs/en/config/lib/footer.mdx +++ b/website/docs/en/config/lib/footer.mdx @@ -11,3 +11,5 @@ type Footer = { ``` - **Default:** `{}` + +Inject content into the bottom of each JS, CSS or DTS file. diff --git a/website/docs/en/config/lib/format.mdx b/website/docs/en/config/lib/format.mdx index 5171bb30b..4d5b6beb0 100644 --- a/website/docs/en/config/lib/format.mdx +++ b/website/docs/en/config/lib/format.mdx @@ -2,3 +2,5 @@ - **Type:** `string` - **Default:** `undefined` + +Output format for the generated JavaScript files. diff --git a/website/docs/en/config/lib/redirect.mdx b/website/docs/en/config/lib/redirect.mdx index 6413610cc..124252e88 100644 --- a/website/docs/en/config/lib/redirect.mdx +++ b/website/docs/en/config/lib/redirect.mdx @@ -9,3 +9,5 @@ type Redirect = { ``` - **Default:** `{}` + +Configure the redirect of the import paths. diff --git a/website/docs/en/config/lib/syntax.mdx b/website/docs/en/config/lib/syntax.mdx index 7326592b9..ed261f76b 100644 --- a/website/docs/en/config/lib/syntax.mdx +++ b/website/docs/en/config/lib/syntax.mdx @@ -20,3 +20,5 @@ type EcmaScriptVersion = type Syntax = EcmaScriptVersion | string[]; ``` + +- **Default:** `'esnext'` diff --git a/website/docs/en/config/lib/umd-name.mdx b/website/docs/en/config/lib/umd-name.mdx index 08395a4ee..016507d84 100644 --- a/website/docs/en/config/lib/umd-name.mdx +++ b/website/docs/en/config/lib/umd-name.mdx @@ -2,3 +2,5 @@ - **Type:** `string` - **Default:** `undefined` + +The export name of the UMD bundle. From 462cb4c0da632d6d12bc4b53ff5a55ee6ce8c87c Mon Sep 17 00:00:00 2001 From: Wei Date: Tue, 5 Nov 2024 00:07:31 +0800 Subject: [PATCH 04/23] docs: update storybook / upgrade-rslib (#373) --- website/docs/en/guide/_meta.json | 4 +- website/docs/en/guide/advanced/storybook.mdx | 94 +++++++++++++++++++ website/docs/en/guide/basic/_meta.json | 3 +- website/docs/en/guide/basic/umd.mdx | 49 ---------- website/docs/en/guide/basic/upgrade-rslib.mdx | 67 +++++++++++++ website/docs/en/guide/solution.mdx | 1 + .../guide/{framework => solution}/_meta.json | 0 .../guide/{framework => solution}/react.mdx | 0 .../{framework => solution}/typescript.mdx | 0 .../en/guide/{framework => solution}/vue.mdx | 0 website/docs/en/guide/start/glossary.mdx | 6 ++ 11 files changed, 171 insertions(+), 53 deletions(-) delete mode 100644 website/docs/en/guide/basic/umd.mdx create mode 100644 website/docs/en/guide/solution.mdx rename website/docs/en/guide/{framework => solution}/_meta.json (100%) rename website/docs/en/guide/{framework => solution}/react.mdx (100%) rename website/docs/en/guide/{framework => solution}/typescript.mdx (100%) rename website/docs/en/guide/{framework => solution}/vue.mdx (100%) diff --git a/website/docs/en/guide/_meta.json b/website/docs/en/guide/_meta.json index 6977ee7b5..019ad6c47 100644 --- a/website/docs/en/guide/_meta.json +++ b/website/docs/en/guide/_meta.json @@ -6,8 +6,8 @@ }, { "type": "dir", - "name": "framework", - "label": "Framework" + "name": "solution", + "label": "Solution" }, { "type": "dir", diff --git a/website/docs/en/guide/advanced/storybook.mdx b/website/docs/en/guide/advanced/storybook.mdx index c1a98bb27..baf52b342 100644 --- a/website/docs/en/guide/advanced/storybook.mdx +++ b/website/docs/en/guide/advanced/storybook.mdx @@ -1 +1,95 @@ +import { PackageManagerTabs } from '@theme'; + # Use Storybook + +[Storybook](https://storybook.js.org/) is a powerful tool for developing UI components in isolation for React, Vue, and other frameworks. It enables you to build and test components independently, which can accelerate both development and testing. + +[storybook-rsbuild](https://github.com/rspack-contrib/storybook-rsbuild) is the Rsbuild powered Storybook builder, and provided the framework integration for React, Vue3 and vanilla JavaScript. The coherent Rsbuild system could make Storybook use an unified configuration with Rslib. + +:::tip +You can create a new project with Storybook by using [create-rslib](/guide/start/quick-start#creating-an-rslib-project). +::: + +## Getting Started + +### Setup a Rslib project + +This is the prerequisite for setting up Storybook. You need to have a Rslib project with components that you want to showcase in Storybook, check out [Solution](/guide/solution) to setup a Rslib project. + +### Add Storybook to project + +Set up a Storybook project with an existing Rslib project. To use React, Vue 3, vanilla JavaScript, or other frameworks, you must first install the appropriate Storybook framework package. For installation instructions, refer to the [Storybook Rsbuild documentation](https://storybook.rsbuild.dev/guide/framework.html). + +Using React as an example, at this step you need to: + +1. Install the dependencies for Storybook Rsbuild React framework. The essential ones include + + - [storybook](https://www.npmjs.com/package/@storybook/addon-essentials): The Storybook core. + - [@storybook/addon-essentials](https://www.npmjs.com/package/@storybook/addon-essentials): a curated collection of addons to bring out the best of Storybook. + - [@rsbuild/core](https://www.npmjs.com/package/@rsbuild/core): Storybook builder. + - [storybook-addon-rslib](https://www.npmjs.com/package/storybook-addon-rslib): This addon will make Storybook Rsbuild could derive Rsbuild configuration from Rslib config file. + The addon will automatically read the Rslib configuration and apply it to Storybook Rsbuild, ensuring that the configuration is unified. You can check the [storybook-addon-rslib](https://storybook.rsbuild.dev/guide/integrations/rslib.html) documentation for available options. + + + + The dependencies may vary for each framework, please refer to the [Storybook Rsbuild documentation](https://storybook.rsbuild.dev/guide/framework.html) for details. In this React example, we will install [storybook-rsbuild-react](https://www.npmjs.com/package/storybook-react-rsbuild) as the framework integration. + +2. Configure the Storybook configuration file `.storybook/main.js`, specify the stories and addons, and set the framework with corresponding framework integration. + + ```js title=".storybook/main.js" + export default { + stories: [ + '../stories/**/*.mdx', + '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)', + ], + addons: ['@storybook/addon-essentials', 'storybook-addon-rslib'], + framework: 'storybook-react-rsbuild', // storybook-react-rsbuild for example + }; + ``` + + 3. Add a simple story to the `stories` directory. For example, create a `Button.stories.js` file with the following content: + + ```js title="stories/Button.stories.js" + import { Button } from '../src/Button'; + + const meta = { + title: 'Example/Button', + component: Button, + }; + + export default meta; + + export const Primary = { + args: { + primary: true, + label: 'Button', + }, + }; + ``` + +:::tip +In case you are using [Yarn Plug-n-Play](https://yarnpkg.com/features/pnp) or your project is set up within a mono repository environment, you might run into issues with module resolution. In such cases, you can add an `getAbsolutePath('storybook-addon-rslib')` function to resolve the addon. Check the [Storybook's FAQ](https://storybook.js.org/docs/faq#how-do-i-fix-module-resolution-in-special-environments) for more information. +::: + +There you go, you could start and build the Storybook server with the following command: + +```bash +npx storybook dev // development mode +npx storybook build // build static files +``` + +Check out more details in the [Storybook Rsbuild documentation](https://storybook.rsbuild.dev/) and the [Storybook documentation](https://storybook.js.org/docs/react/get-started/introduction). + +{/* TODO: */} +{/* ## Module Federation */} + +## Example + +- [React component library + Rslib + Storybook](https://github.com/rspack-contrib/storybook-rsbuild/tree/main/sandboxes/rslib-react-component) diff --git a/website/docs/en/guide/basic/_meta.json b/website/docs/en/guide/basic/_meta.json index 78cafde6d..84caefa98 100644 --- a/website/docs/en/guide/basic/_meta.json +++ b/website/docs/en/guide/basic/_meta.json @@ -4,6 +4,5 @@ "typescript", "output-format", "output-structure", - "upgrade-rslib", - "umd" + "upgrade-rslib" ] diff --git a/website/docs/en/guide/basic/umd.mdx b/website/docs/en/guide/basic/umd.mdx deleted file mode 100644 index 4cfe5fea9..000000000 --- a/website/docs/en/guide/basic/umd.mdx +++ /dev/null @@ -1,49 +0,0 @@ -# UMD - -## Introduction - -UMD is a library that can be used in both the browser and Node.js environments. It is a combination of CommonJS and AMD. - -## How to build a UMD library? - -- Set the `output.format` to `umd` in the Rslib configuration file. -- If the library need to be exported with a name, set `output.umdName` to the name of the UMD library. -- Use `output.externals` to specify the external dependencies that the UMD library depends on, `lib.autoExtension` is enabled by default for UMD. - -## Examples - -The following Rslib config is an example to build a UMD library. - -- `output.format: 'umd'`: instruct Rslib to build in UMD format. -- `output.umdName: 'RslibUmdExample'`: set the export name of the UMD library. -- `output.externals.react: 'React'`: specify the external dependency `react` could be accessed by `window.React`. -- `runtime: 'classic'`: use the classic runtime of React to support applications that using React version under 18. - -```ts title="rslib.config.ts" {7-12,22} -import { pluginReact } from '@rsbuild/plugin-react'; -import { defineConfig } from '@rslib/core'; - -export default defineConfig({ - lib: [ - { - format: 'umd', - umdName: 'RslibUmdExample', - output: { - externals: { - react: 'React', - }, - distPath: { - root: './dist/umd', - }, - }, - }, - ], - plugins: [ - pluginReact({ - swcReactOptions: { - runtime: 'classic', - }, - }), - ], -}); -``` diff --git a/website/docs/en/guide/basic/upgrade-rslib.mdx b/website/docs/en/guide/basic/upgrade-rslib.mdx index 990dcbe0b..af779e7c3 100644 --- a/website/docs/en/guide/basic/upgrade-rslib.mdx +++ b/website/docs/en/guide/basic/upgrade-rslib.mdx @@ -1 +1,68 @@ # Upgrade Rslib + +This section explains how to upgrade the project's Rslib dependencies to the latest version. + +{/* TODO */} +{/* > Please see [Releases](/community/releases/index) to understand the Rsbuild release strategy. */} + +:::info +Rslib is still in the early stages of development, and the API may change frequently. We recommend upgrading to the latest version to access new features and bug fixes. We plan to release version 0.1.0 in the fourth quarter of 2024. +::: + +## Using Taze + +We recommend using [Taze](https://github.com/antfu-collective/taze) to upgrade the Rslib version. Taze is a CLI tool for updating npm dependencies. + +### Usage + +Run the following command to upgrade all dependencies that include `rslib` and `rsbuild` in their names: + +```bash +npx taze major --include "/(rsbuild|rslib)/" -w +``` + +:::tip +Rslib has not yet reached version 0.1.0, so you need to add the `major` parameter when updating. +::: + +The result will look similar to: + +```bash +rslib - 2 major, 1 patch + + @rsbuild/plugin-react dev ~2mo ^1.0.1 → ^1.0.6 + @rslib/core dev ~7d ^0.0.15 → ^0.0.16 + rsbuild-plugin-dts dev ~7d ^0.0.15 → ^0.0.16 + +ℹ changes written to package.json, run npm i to install updates. +``` + +You can also adjust the `include` pattern to match specific packages, for example, to upgrade only packages under the `@rslib` scope: + +```bash +npx taze --include /@rslib/ -w +``` + +### Options + +Here are some examples of using taze options. + +- In a monorepo, you can add the `-r` option to upgrade recursively: + +```bash +npx taze --include /(rsbuild|rslib)/ -w -r +``` + +- Add `-l` to upgrade locked versions: + +```bash +npx taze --include /(rsbuild|rslib)/ -w -l +``` + +- To upgrade to a major version: + +```bash +npx taze major --include /(rsbuild|rslib)/ -w +``` + +> For more options, please refer to the [taze documentation](https://github.com/antfu-collective/taze). diff --git a/website/docs/en/guide/solution.mdx b/website/docs/en/guide/solution.mdx new file mode 100644 index 000000000..a6700350a --- /dev/null +++ b/website/docs/en/guide/solution.mdx @@ -0,0 +1 @@ +# Solution diff --git a/website/docs/en/guide/framework/_meta.json b/website/docs/en/guide/solution/_meta.json similarity index 100% rename from website/docs/en/guide/framework/_meta.json rename to website/docs/en/guide/solution/_meta.json diff --git a/website/docs/en/guide/framework/react.mdx b/website/docs/en/guide/solution/react.mdx similarity index 100% rename from website/docs/en/guide/framework/react.mdx rename to website/docs/en/guide/solution/react.mdx diff --git a/website/docs/en/guide/framework/typescript.mdx b/website/docs/en/guide/solution/typescript.mdx similarity index 100% rename from website/docs/en/guide/framework/typescript.mdx rename to website/docs/en/guide/solution/typescript.mdx diff --git a/website/docs/en/guide/framework/vue.mdx b/website/docs/en/guide/solution/vue.mdx similarity index 100% rename from website/docs/en/guide/framework/vue.mdx rename to website/docs/en/guide/solution/vue.mdx diff --git a/website/docs/en/guide/start/glossary.mdx b/website/docs/en/guide/start/glossary.mdx index ddc5d38d4..f9675607b 100644 --- a/website/docs/en/guide/start/glossary.mdx +++ b/website/docs/en/guide/start/glossary.mdx @@ -20,6 +20,12 @@ CJS stands for [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-m Bundleless refers to a development approach that avoids the traditional practice of bundling multiple JavaScript / TypeScript files into a single or fewer output files before serving them to the client. Instead, it aims to serve individual modules directly. +## Module Federation + +Module Federation is an architectural pattern for JavaScript application decomposition (similar to microservices on the server-side), allowing you to share code and resources between multiple JavaScript applications (or micro-frontends). + +See [Module Federation](https://rsbuild.dev/guide/advanced/module-federation) for more details. + ## More See more glossary in [Rsbuild - Glossary](https://rsbuild.dev/guide/start/glossary) and [Rspack - Glossary](https://rspack.dev/misc/glossary). From 8f658120e0a47f0eb912ea2f258ecefaef0d8135 Mon Sep 17 00:00:00 2001 From: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> Date: Tue, 5 Nov 2024 13:19:54 +0800 Subject: [PATCH 05/23] docs: add lib.bundle/format/autoExtension doc (#371) --- packages/core/src/types/config/index.ts | 12 +- website/docs/en/config/_meta.json | 4 +- website/docs/en/config/lib.mdx | 31 +++- website/docs/en/config/lib/_meta.json | 2 +- website/docs/en/config/lib/auto-extension.mdx | 48 +++++- website/docs/en/config/lib/bundle.mdx | 144 +++++++++++++++++- website/docs/en/config/lib/format.mdx | 15 +- website/docs/en/config/rsbuild.mdx | 2 +- .../docs/en/guide/basic/configure-rslib.mdx | 4 +- website/docs/en/guide/basic/output-format.mdx | 8 +- 10 files changed, 249 insertions(+), 21 deletions(-) diff --git a/packages/core/src/types/config/index.ts b/packages/core/src/types/config/index.ts index 1c18042f4..e9d9c3997 100644 --- a/packages/core/src/types/config/index.ts +++ b/packages/core/src/types/config/index.ts @@ -72,18 +72,18 @@ export type Redirect = { }; export interface LibConfig extends RsbuildConfig { - /** - * Whether to bundle the library. - * @default true - */ - bundle?: boolean; /** * Output format for the generated JavaScript files. * @default undefined */ format?: Format; /** - * Whether to automatically set the file extension based on the `format` option in the JS and DTS output files. + * Whether to bundle the library. + * @default true + */ + bundle?: boolean; + /** + * Whether to automatically set the file extension based on the `format` option in the JavaScript output files. * @default true */ autoExtension?: boolean; diff --git a/website/docs/en/config/_meta.json b/website/docs/en/config/_meta.json index 4a47e771a..57a840dbf 100644 --- a/website/docs/en/config/_meta.json +++ b/website/docs/en/config/_meta.json @@ -7,11 +7,11 @@ { "type": "dir", "name": "lib", - "label": "Lib" + "label": "Lib Configurations" }, { "type": "dir", "name": "rsbuild", - "label": "Rsbuild Config" + "label": "Rsbuild Configurations" } ] diff --git a/website/docs/en/config/lib.mdx b/website/docs/en/config/lib.mdx index e61353ed6..48fb0254a 100644 --- a/website/docs/en/config/lib.mdx +++ b/website/docs/en/config/lib.mdx @@ -1 +1,30 @@ -# Lib +# Lib Configurations + +- **Type:** + +```ts +interface LibConfig extends RsbuildConfig { + format?: Format; + bundle?: boolean; + autoExtension?: boolean; + autoExternal?: AutoExternal; + redirect?: Redirect; + syntax?: Syntax; + externalHelpers?: boolean; + banner?: BannerAndFooter; + footer?: BannerAndFooter; + shims?: Shims; + dts?: Dts; + umdName?: string; +} + +interface RslibConfig extends RsbuildConfig { + lib: LibConfig[]; +} +``` + +- **Default:** `undefined` + +- **Required:** `true` + +The `lib` configuration is an array of objects, each representing a distinct set of configurations. These include all Rsbuild configurations as well as Rslib-specific configurations, designed to generate different outputs. diff --git a/website/docs/en/config/lib/_meta.json b/website/docs/en/config/lib/_meta.json index 194457734..5dce7050e 100644 --- a/website/docs/en/config/lib/_meta.json +++ b/website/docs/en/config/lib/_meta.json @@ -1,6 +1,6 @@ [ - "bundle", "format", + "bundle", "auto-extension", "auto-external", "redirect", diff --git a/website/docs/en/config/lib/auto-extension.mdx b/website/docs/en/config/lib/auto-extension.mdx index 851df34bb..345bf06de 100644 --- a/website/docs/en/config/lib/auto-extension.mdx +++ b/website/docs/en/config/lib/auto-extension.mdx @@ -3,4 +3,50 @@ - **Type:** `boolean` - **Default:** `true` -Whether to automatically set the file extension based on the `format` option in the JS and DTS output files. +Whether to automatically set the file extension based on the [`format`](/config/lib/format) option in the JavaScript output files. + +## Default Extension + +By default that when `autoExtension` is set to `true`, the file extension will be: + +- `.js` with `esm` format and `.cjs` with `cjs` format when `type: module` in `package.json`. + +- `.js` with `cjs` format and `.mjs` with `esm` format when `type: commonjs` or no `type` field in `package.json`. + +:::warning + +When [bundle](/config/lib/bundle) is set to `false` that as known as bundleless mode, you should write full path instead of ignoring directory indexes (e.g. `'./foo/index.js'`) in source code. + +For example, if `foo` is a folder, you need to rewrite `import * from './foo'` to `import * from './foo/index'`. + +::: + +When `autoExtension` is set to `false`, the file extension will be default to `.js`. + +## Customize Extension + +You can set `autoExtension` to `false` and use [output.filename](https://rsbuild.dev/config/output/filename) to customize the JavaScript output files. + +```ts title="rslib.config.ts" +export default defineConfig({ + lib: [ + { + format: 'cjs', + autoExtension: false, + output: { + filename: { + js: '[name].cjs', + }, + }, + }, + { + format: 'esm', + output: { + filename: { + js: '[name].mjs', + }, + }, + }, + ], +}); +``` diff --git a/website/docs/en/config/lib/bundle.mdx b/website/docs/en/config/lib/bundle.mdx index 7b1ee3825..847fe7458 100644 --- a/website/docs/en/config/lib/bundle.mdx +++ b/website/docs/en/config/lib/bundle.mdx @@ -3,4 +3,146 @@ - **Type:** `boolean` - **Default:** `true` -Whether to bundle the library. +Specify whether to bundle the library, which is known as bundle mode when `bundle` is set to `true`, and bundleless mode when set to `false`. + +See [bundle / bundleless](/guide/basic/output-structure#bundle--bundleless) for more details. + +::: warning + +The bundleless mode is not fully supported yet, and some features like [assets](/guide/advanced/assets) may not work properly. + +::: + +## Set Entry + +We should specify the entry file for the build. + +### bundle: true + +When `bundle` is set to `true`, the entry should be set to the entry file. The default entry is `src/index.(ts|js|tsx|jsx|mjs|cjs)`. You should make sure that the entry file exists, or customize entry through the [source.entry](https://rsbuild.dev/config/source/entry) configuration. + +```ts title="rslib.config.ts" +export default { + lib: [ + { + format: 'cjs', + bundle: true, + }, + ], + source: { + entry: { + index: './foo/index.ts', + }, + }, +}; +``` + +### bundle: false + +When `bundle` is set to `false`, the entry should be set a [glob pattern](https://github.com/micromatch/picomatch#globbing-features) to include all the files. + +```ts title="rslib.config.ts" +export default { + lib: [ + { + format: 'cjs', + bundle: false, + }, + ], + source: { + entry: { + index: './src/**', + }, + }, +}; +``` + +You can also use with an exclamation mark to exclude some files. + +```ts title="rslib.config.ts" +export default { + lib: [ + { + format: 'cjs', + bundle: false, + }, + ], + source: { + entry: { + index: ['./src/**', '!**/foo.*'], + }, + }, +}; +``` + +## Example + +For below file structure of source code: + +``` +. +├── src +│ ├── index.ts +│ ├── foo.ts +│ └── bar.ts +└── package.json +``` + +### bundle: true + +```ts title="rslib.config.ts" +export default defineConfig({ + lib: [ + { + format: 'cjs', + bundle: true, + }, + ], +}); +``` + +When `bundle` is set to `true`, as known as bundle mode, Rslib will bundle the library into a single file. + +```diff + . ++ ├── dist ++ │ └── index.js + ├── src + │ ├── index.ts + │ ├── foo.ts + │ └── bar.ts + └── package.json +``` + +### bundle: false + +```ts title="rslib.config.ts" +export default defineConfig({ + lib: [ + { + format: 'cjs', + bundle: false, + }, + ], + source: { + entry: { + index: ['./src/**'], + }, + }, +}); +``` + +When `bundle` is set to `false`, as known as bundleless mode, Rslib will only transform the code into multiple files. + +```diff + . ++ ├── dist ++ │ ├── index.js ++ │ ├── foo.js ++ │ └── bar.js + ├── src + │ ├── index.ts + │ ├── foo.ts + │ └── bar.ts + └── package.json +``` diff --git a/website/docs/en/config/lib/format.mdx b/website/docs/en/config/lib/format.mdx index 4d5b6beb0..2247767ce 100644 --- a/website/docs/en/config/lib/format.mdx +++ b/website/docs/en/config/lib/format.mdx @@ -1,6 +1,17 @@ # lib.format -- **Type:** `string` +- **Type:** `'esm' | 'cjs' | 'umd' | 'mf'` + - **Default:** `undefined` -Output format for the generated JavaScript files. +- **Required**: true + +Specify the output format for the generated JavaScript files. + +See [Output Format](/guide/basic/output-format) and [Module Federation](/guide/advanced/module-federation) for more details. + +::: note + +The `umd` format only works when [bundle](/config/lib/bundle) is set to `true`. + +::: diff --git a/website/docs/en/config/rsbuild.mdx b/website/docs/en/config/rsbuild.mdx index ed5be03f0..6fd48eb33 100644 --- a/website/docs/en/config/rsbuild.mdx +++ b/website/docs/en/config/rsbuild.mdx @@ -1 +1 @@ -# Rsbuild Configuration +# Rsbuild Configurations diff --git a/website/docs/en/guide/basic/configure-rslib.mdx b/website/docs/en/guide/basic/configure-rslib.mdx index 066eb899a..980bee706 100644 --- a/website/docs/en/guide/basic/configure-rslib.mdx +++ b/website/docs/en/guide/basic/configure-rslib.mdx @@ -82,9 +82,9 @@ export default { The configuration file exports a default object that includes a `lib` array and shared Rsbuild configuration options. You can find detailed descriptions of all configs on the [Configure Overview](/config/) page. -- **[Lib configurations](/config/lib) (at least one object is required)**: The `lib` array contains multiple objects, each representing a set of independent configurations that will generate different outputs. Each object within the `lib` array can specify unique configurations, which is a superset of Rsbuild +- **[Lib Configurations](/config/lib) (at least one object is required)**: The `lib` array contains multiple objects, each representing a set of independent configurations that will generate different outputs. Each object within the `lib` array can specify unique configurations, which is a superset of Rsbuild configurations along with Rslib's specific configurations. -- **Shared [Rsbuild configurations](/config/rsbuild) (optional)**: Outside the `lib` array, there are shared Rsbuild configuration options that will be deep merged with independent Rsbuild configuration of each `lib` configuration object. +- **Shared [Rsbuild Configurations](/config/rsbuild) (optional)**: Outside the `lib` array, there are shared Rsbuild configuration options that will be deep merged with independent Rsbuild configuration of each `lib` configuration object. Rslib generates corresponding Rsbuild [environments](https://rsbuild.dev/guide/advanced/environments) configurations based on the multiple build configurations of different output formats. You can view the final generated configurations through the [configuration debug](#configuration-debug) documentation. diff --git a/website/docs/en/guide/basic/output-format.mdx b/website/docs/en/guide/basic/output-format.mdx index b5e4e97b2..9a4cd86ae 100644 --- a/website/docs/en/guide/basic/output-format.mdx +++ b/website/docs/en/guide/basic/output-format.mdx @@ -83,16 +83,16 @@ A detailed answer from StackOverflow: [What is the Universal Module Definition ( ### How to build a UMD library? -- Set the `output.format` to `umd` in the Rslib configuration file. -- If the library need to be exported with a name, set `output.umdName` to the name of the UMD library. +- Set the `lib.format` to `umd` in the Rslib configuration file. +- If the library need to be exported with a name, set `lib.umdName` to the name of the UMD library. - Use `output.externals` to specify the external dependencies that the UMD library depends on, `lib.autoExtension` is enabled by default for UMD. ### Examples The following Rslib config is an example to build a UMD library. -- `output.format: 'umd'`: instruct Rslib to build in UMD format. -- `output.umdName: 'RslibUmdExample'`: set the export name of the UMD library. +- `lib.format: 'umd'`: instruct Rslib to build in UMD format. +- `lib.umdName: 'RslibUmdExample'`: set the export name of the UMD library. - `output.externals.react: 'React'`: specify the external dependency `react` could be accessed by `window.React`. - `runtime: 'classic'`: use the classic runtime of React to support applications that using React version under 18. From 7deda98bb35faf530abeca17c4f9ba4ce9407d09 Mon Sep 17 00:00:00 2001 From: Wei Date: Tue, 5 Nov 2024 17:01:29 +0800 Subject: [PATCH 06/23] docs(solution): add react and node.js (#374) --- packages/create-rslib/src/index.ts | 2 +- website/docs/en/guide/solution/_meta.json | 2 +- website/docs/en/guide/solution/nodejs.mdx | 72 +++++++++++++ website/docs/en/guide/solution/react.mdx | 101 ++++++++++++++++++ website/docs/en/guide/solution/typescript.mdx | 1 - website/docs/en/guide/solution/vue.mdx | 1 - 6 files changed, 175 insertions(+), 4 deletions(-) create mode 100644 website/docs/en/guide/solution/nodejs.mdx delete mode 100644 website/docs/en/guide/solution/typescript.mdx delete mode 100644 website/docs/en/guide/solution/vue.mdx diff --git a/packages/create-rslib/src/index.ts b/packages/create-rslib/src/index.ts index 81345e4ae..b84a06558 100644 --- a/packages/create-rslib/src/index.ts +++ b/packages/create-rslib/src/index.ts @@ -27,7 +27,7 @@ async function getTemplateName({ template }: Argv) { const templateName = checkCancel( await select({ - message: 'Select templates', + message: 'Select template', options: [ { value: 'node-dual', label: 'Node.js dual ESM/CJS package' }, { value: 'node-esm', label: 'Node.js pure ESM package' }, diff --git a/website/docs/en/guide/solution/_meta.json b/website/docs/en/guide/solution/_meta.json index 67337ce6c..d81e0c779 100644 --- a/website/docs/en/guide/solution/_meta.json +++ b/website/docs/en/guide/solution/_meta.json @@ -1 +1 @@ -["react"] +["nodejs", "react"] diff --git a/website/docs/en/guide/solution/nodejs.mdx b/website/docs/en/guide/solution/nodejs.mdx new file mode 100644 index 000000000..e8da9be41 --- /dev/null +++ b/website/docs/en/guide/solution/nodejs.mdx @@ -0,0 +1,72 @@ +# Node.js + +In this document, you will learn how to build a Node.js library using Rslib. + +## Create Node.js Project + +You can use `create-rslib` to create a project with Rslib + Node.js. Just execute the following command: + +import { PackageManagerTabs } from '@theme'; + + + +Then select `Node.js` when prompted to "Select template". + +## Use Rslib in an existing project + +To development an Node.js library, you need to set [target](/config/rsbuild/output#target) to `"node"` in `rslib.config.ts`. This is crucial because when the `target` is set to `"node"`, Rslib automatically adjusts many configurations for Node.js. For example, [output.externals](/config/rsbuild/output#target) will exclude built-in Node.js modules, and [shims](/config/lib/shims) will add a shim for `import.meta.url` in CJS output by default. + +For example, in `rsbuild.config.ts`: + +```ts title="rslib.config.ts" +import { defineConfig } from '@rslib/core'; + +export default defineConfig({ + lib: [ + { + format: 'esm', + output: { + distPath: { + root: './dist/esm', + }, + }, + }, + { + format: 'cjs', + output: { + distPath: { + root: './dist/cjs', + }, + }, + }, + ], + output: { + target: 'node', + }, +}); +``` + +## Target for Node.js + +When [target](/config/rsbuild/output#target) is set to `"node"`, Rslib will automatically adjust the following configurations: + +### Externals + +All Node.js [built-in modules](https://nodejs.org/docs/latest/api/) are externalized by default. + +### Shims + +- `global`: leave it as it is, while it's recommended to use [globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) instead. +- `__filename`: When outputting in ESM format, replace `__filename` with the result of `fileURLToPath(import.meta.url)`. +- `__dirname`: When outputting in ESM format, replace `__dirname` with the result of `dirname(fileURLToPath(import.meta.url))`. + +{/* TODO: Rspack doesn't support createRequire now */} +{/* ### createRequire */} +{/* Requiring module with [createRequire](https://nodejs.org/api/module.html#modulecreaterequirefilename) will also works in ESM format. */} diff --git a/website/docs/en/guide/solution/react.mdx b/website/docs/en/guide/solution/react.mdx index 4a55d1124..472ac3324 100644 --- a/website/docs/en/guide/solution/react.mdx +++ b/website/docs/en/guide/solution/react.mdx @@ -1 +1,102 @@ # React + +In this document, you will learn how to build a React component library with Rslib. + +## Create React Project + +You can use `create-rslib` to create a project with Rslib + React. Just execute the following command: + +import { PackageManagerTabs } from '@theme'; + + + +Then select `React` when prompted to "Select template". + +## Use Rslib in an Existing Project + +To compile React (JSX and TSX), you need to register the Rsbuild [React Plugin](https://rsbuild.dev/plugins/list/plugin-react). The plugin will automatically add the necessary configuration for React builds. + +For example, register in `rslib.config.ts`: + +```ts title="rslib.config.ts" {2,8} +import { defineConfig } from '@rslib/core'; +import { pluginReact } from '@rsbuild/plugin-react'; + +export default defineConfig({ + lib: [ + // ... + ], + plugins: [pluginReact(/** options here */)], +}); +``` + +## JSX Transform + +- **Type**: `'automatic' | 'classic'` +- **Default**: `'automatic'` + +React introduced a [new JSX transform](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) in version 17. This new transform removes the need to import `React` when using JSX. + +By default, Rsbuild uses the new JSX transform, which is `runtime: 'automatic'`. It requires at least React `16.14.0` or higher. The peer dependency for React should be declared as above `16.14.0`. + +To change the JSX transform, you can pass the [swcReactOptions](https://rsbuild.dev/plugins/list/plugin-react#swcreactoptionsruntime) option to the React plugin. For example, to use the classic runtime: + +```ts title="rslib.config.ts" {10-12} +import { pluginReact } from '@rsbuild/plugin-react'; +import { defineConfig } from '@rslib/core'; + +export default defineConfig({ + lib: [ + // ... + ], + plugins: [ + pluginReact({ + swcReactOptions: { + runtime: 'classic', + }, + }), + ], +}); +``` + +## JSX Import Source + +- **Type**: `string` +- **Default**: `'react'` + +When `runtime` is `'automatic'`, you can specify the import path of the JSX transform through `importSource`. + +For example, when using [Emotion](https://emotion.sh/), you can set `importSource` to `'@emotion/react'`: + +```ts title="rslib.config.ts" {10-12} +import { pluginReact } from '@rsbuild/plugin-react'; +import { defineConfig } from '@rslib/core'; + +export default defineConfig({ + lib: [ + // ... + ], + plugins: [ + pluginReact({ + swcReactOptions: { + importSource: '@emotion/react', + }, + }), + ], +}); +``` + +{/* TODO */} +{/* ## SVGR */} + +## Further Reading + +- [Rsbuild React Plugin](https://rsbuild.dev/plugins/list/plugin-react#swcreactoptionsruntime) +- [SWC Compilation - jsc.transform.react](https://swc.rs/docs/configuration/compilation#jsctransformreact) diff --git a/website/docs/en/guide/solution/typescript.mdx b/website/docs/en/guide/solution/typescript.mdx deleted file mode 100644 index 42c977580..000000000 --- a/website/docs/en/guide/solution/typescript.mdx +++ /dev/null @@ -1 +0,0 @@ -# Typescript diff --git a/website/docs/en/guide/solution/vue.mdx b/website/docs/en/guide/solution/vue.mdx deleted file mode 100644 index 9d38c2e9d..000000000 --- a/website/docs/en/guide/solution/vue.mdx +++ /dev/null @@ -1 +0,0 @@ -# Vue From 4f736f461c4671d626a7d9b10909f4216805245d Mon Sep 17 00:00:00 2001 From: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> Date: Tue, 5 Nov 2024 20:42:24 +0800 Subject: [PATCH 07/23] docs: lib.autoExternal (#375) --- website/docs/en/config/lib/auto-external.mdx | 109 +++++++++++++++++- .../en/guide/advanced/third-party-deps.mdx | 2 +- 2 files changed, 109 insertions(+), 2 deletions(-) diff --git a/website/docs/en/config/lib/auto-external.mdx b/website/docs/en/config/lib/auto-external.mdx index 15f6b94c2..a977304ab 100644 --- a/website/docs/en/config/lib/auto-external.mdx +++ b/website/docs/en/config/lib/auto-external.mdx @@ -1,6 +1,113 @@ # lib.autoExternal -- **Type:** `boolean` +- **Type:** + +```ts +type AutoExternal = + | boolean + | { + dependencies?: boolean; + optionalDependencies?: boolean; + devDependencies?: boolean; + peerDependencies?: boolean; + }; +``` + - **Default:** `true` Whether to automatically externalize dependencies and do not bundle them. + +## autoExternal.dependencies + +- **Type:** `boolean` +- **Default:** `true` + +Whether to externalize dependencies of type `dependencies`. + +## autoExternal.optionalDependencies + +- **Type:** `boolean` +- **Default:** `true` + +Whether to externalize dependencies of type `optionalDependencies`. + +## autoExternal.peerDependencies + +- **Type:** `boolean` +- **Default:** `true` + +Whether to externalize dependencies of type `peerDependencies`. + +## autoExternal.devDependencies + +- **Type:** `boolean` +- **Default:** `false` + +Whether to bundle dependencies of type `devDependencies`. + +## Default Value + +The default value of `autoExternal` is `true`, which means the following dependency types will **not be bundled**: + +- `dependencies` +- `optionalDependencies` +- `peerDependencies` + +And the following dependency types will be **bundled**: + +- `devDependencies` + +It is equivalent to the following configuration: + +```ts +export default { + lib: [ + { + format: 'esm', + autoExternal: { + dependencies: true, + optionalDependencies: true, + peerDependencies: true, + devDependencies: false, + }, + }, + ], +}; +``` + +## Example + +### Customize Externalized Dependency Types + +To disable the processing of a specific type of dependency, you can configure `autoExternal` as an object like this: + +```ts title="rslib.config.ts" +export default { + lib: [ + { + format: 'esm', + autoExternal: { + dependencies: false, + peerDependencies: false, + }, + }, + ], +}; +``` + +### Disable Default Behavior + +If you want to disable the default behavior, you can set `autoExternal` to `false`: + +```ts title="rslib.config.ts" +export default { + lib: [ + { + format: 'esm', + autoExternal: false, + }, + ], +}; +``` + +For more details about handling third-party dependencies, please refer to [Handle Third-party Dependencies](/guide/advanced/third-party-deps). diff --git a/website/docs/en/guide/advanced/third-party-deps.mdx b/website/docs/en/guide/advanced/third-party-deps.mdx index 3c1edaaa5..814598828 100644 --- a/website/docs/en/guide/advanced/third-party-deps.mdx +++ b/website/docs/en/guide/advanced/third-party-deps.mdx @@ -53,7 +53,7 @@ console.info(__WEBPACK_EXTERNAL_MODULE_react__['default']); If you want to modify the default processing, you can use the following API. -- [`lib.autoExternal`](/config/lib/auto-external) +- [lib.autoExternal](/config/lib/auto-external) ## Exclude specified third-party dependencies From 415b8681d4645f1177130d7222275c04b8eeda41 Mon Sep 17 00:00:00 2001 From: Wei Date: Wed, 6 Nov 2024 20:36:41 +0800 Subject: [PATCH 08/23] docs: solutions overview / output compatibility (#376) Co-authored-by: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> --- website/docs/en/guide/advanced/_meta.json | 6 ++-- website/docs/en/guide/advanced/css.mdx | 14 ++++++++ ...-polyfill.mdx => output-compatibility.mdx} | 35 +++++++++++++------ .../docs/en/guide/advanced/package-json.mdx | 1 - website/docs/en/guide/advanced/polyfill.mdx | 1 - .../en/guide/advanced/third-party-deps.mdx | 2 +- website/docs/en/guide/basic/output-format.mdx | 15 ++++++++ website/docs/en/guide/solution.mdx | 26 ++++++++++++++ website/docs/en/guide/solution/preact.mdx | 1 + website/docs/en/guide/start/components/MF.mdx | 1 + website/docs/en/guide/start/glossary.mdx | 3 +- 11 files changed, 87 insertions(+), 18 deletions(-) rename website/docs/en/guide/advanced/{node-polyfill.mdx => output-compatibility.mdx} (61%) delete mode 100644 website/docs/en/guide/advanced/package-json.mdx delete mode 100644 website/docs/en/guide/advanced/polyfill.mdx create mode 100644 website/docs/en/guide/solution/preact.mdx create mode 100644 website/docs/en/guide/start/components/MF.mdx diff --git a/website/docs/en/guide/advanced/_meta.json b/website/docs/en/guide/advanced/_meta.json index 88c595ea9..bf6f98a42 100644 --- a/website/docs/en/guide/advanced/_meta.json +++ b/website/docs/en/guide/advanced/_meta.json @@ -1,11 +1,9 @@ [ - "package-json", "third-party-deps", - "polyfill", + "output-compatibility", + "dts", "css", "assets", - "dts", "module-federation", - "node-polyfill", "storybook" ] diff --git a/website/docs/en/guide/advanced/css.mdx b/website/docs/en/guide/advanced/css.mdx index 1167bf8c0..a76e8a4ba 100644 --- a/website/docs/en/guide/advanced/css.mdx +++ b/website/docs/en/guide/advanced/css.mdx @@ -1 +1,15 @@ # CSS + +## CSS Modules + +## Pre-processors + +### Sass + +### Less + +### Stylus + +## PostCSS + +## Tailwind CSS diff --git a/website/docs/en/guide/advanced/node-polyfill.mdx b/website/docs/en/guide/advanced/output-compatibility.mdx similarity index 61% rename from website/docs/en/guide/advanced/node-polyfill.mdx rename to website/docs/en/guide/advanced/output-compatibility.mdx index 741d660ce..06ab09746 100644 --- a/website/docs/en/guide/advanced/node-polyfill.mdx +++ b/website/docs/en/guide/advanced/output-compatibility.mdx @@ -1,7 +1,28 @@ import { Steps, SourceCode } from '@theme'; import { PackageManagerTabs } from '@theme'; -# Node Polyfill +# Output Compatibility + +This chapter introduces how to specify which target environment should be supported. + +## Syntax Downgrade + +By setting [lib.syntax](/config/lib/syntax), you can choose the syntax to which JavaScript and CSS will be downgraded. You can use the query syntax from [Browserslist](https://browsersl.ist/). Rslib also supports common ECMAScript version numbers, such as `ES2015`. + +Rslib also supports using a [.browserslistrc](https://github.com/browserslist/browserslist#config-file) file to specify settings. Note that [lib.syntax](/config/lib/syntax) takes precedence over `.browserslistrc`. If both are present, `lib.syntax` will be used. + +By default, the syntax is set to `ESNext`, which will only supports only the latest version of mainstream browsers (Chrome / Firefox / Edge / macOS Safari / iOS Safari) or Node.js according to [output.target](/config/rsbuild/output#target). + +## Polyfill + +Before dealing with compatibility issues, it is recommended that you understand the following background knowledge to better handle related issues. Check out the background knowledge on [syntax transpilation and API polyfill](https://rsbuild.dev/guide/advanced/browser-compatibility#syntax-downgrade-and-api-downgrade). + +### Browser + +{/* TODO */} +{/* Implement a Rsbuild polyfill plugin by using core-js-pure */} + +### Node.js :::tip About Node Polyfill Normally, we don't need to use Node libs on the browser side. However, it is possible to use some Node libs when the code will run on both the Node side and the browser side, and Node Polyfill provides browser versions of polyfills for these Node libs. @@ -9,19 +30,15 @@ Normally, we don't need to use Node libs on the browser side. However, it is pos By using [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill), Node core libs polyfills are automatically injected into the browser-side, allowing you to use these modules on the browser side with confidence. -## Getting Started - -### Install plugin +#### Set up Rslib uses [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill) to provide the Node Polyfill feature. -### Register plugin - Then add the plugin into the plugins field. -```ts +```ts title="rslib.config.ts" import { defineConfig } from '@rslib/core'; import { pluginNodePolyfill } from '@rsbuild/plugin-node-polyfill'; @@ -31,7 +48,7 @@ export default defineConfig({ }); ``` -### Setup +#### Configurations - For projects with `bundle` enabled, the Node Polyfill will be injected and included in the output. - For projects with `bundle` disabled, polyfills are not injected into the output by default. To avoid inlining the polyfill in every module. The modules are externalized and need to be added to dependencies manually, follow these steps: @@ -41,6 +58,4 @@ export default defineConfig({ With the following steps, every usage of the polyfill module will be replaced by the corresponding module in the `externals` field. Checkout the of the example for more details. -## Configurations - Check out the documentation of [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill), all the configurations are applicable for Rslib. diff --git a/website/docs/en/guide/advanced/package-json.mdx b/website/docs/en/guide/advanced/package-json.mdx deleted file mode 100644 index 3cc262d59..000000000 --- a/website/docs/en/guide/advanced/package-json.mdx +++ /dev/null @@ -1 +0,0 @@ -# Write package.json diff --git a/website/docs/en/guide/advanced/polyfill.mdx b/website/docs/en/guide/advanced/polyfill.mdx deleted file mode 100644 index b7c0b37fe..000000000 --- a/website/docs/en/guide/advanced/polyfill.mdx +++ /dev/null @@ -1 +0,0 @@ -# Target and Polyfill diff --git a/website/docs/en/guide/advanced/third-party-deps.mdx b/website/docs/en/guide/advanced/third-party-deps.mdx index 814598828..82af2795e 100644 --- a/website/docs/en/guide/advanced/third-party-deps.mdx +++ b/website/docs/en/guide/advanced/third-party-deps.mdx @@ -1,4 +1,4 @@ -# Handle Third-party Dependencies +# Handle Third-Party Dependencies Generally, third-party dependencies required by a project can be installed via the `install` command in the package manager. After the third-party dependencies are successfully installed, they will generally appear under `dependencies` and `devDependencies` in the project `package.json`. diff --git a/website/docs/en/guide/basic/output-format.mdx b/website/docs/en/guide/basic/output-format.mdx index 9a4cd86ae..a15d037f4 100644 --- a/website/docs/en/guide/basic/output-format.mdx +++ b/website/docs/en/guide/basic/output-format.mdx @@ -1,6 +1,7 @@ import ESM from '../start/components/ESM.mdx'; import CJS from '../start/components/CJS.mdx'; import UMD from '../start/components/UMD.mdx'; +import MF from '../start/components/MF.mdx'; # Output Format @@ -64,6 +65,8 @@ The community is migrating to ESM, but there are still many projects using CJS. ## UMD +### What is UMD? + ### When to use UMD? @@ -124,3 +127,15 @@ export default defineConfig({ ], }); ``` + +## MF + +### What is MF? + +MF stands for Module Federation. + +### When to use MF? + +### How to build a MF library? + +Check out [Advanced - Module Federation](/guide/advanced/module-federation) chapter for more details. diff --git a/website/docs/en/guide/solution.mdx b/website/docs/en/guide/solution.mdx index a6700350a..d23d4f6b9 100644 --- a/website/docs/en/guide/solution.mdx +++ b/website/docs/en/guide/solution.mdx @@ -1 +1,27 @@ # Solution + +In this chapter, we will introduce how to use Rslib to development libraries for browser and Node.js. We will also cover how to create libraries for different UI frameworks. + +## Browser Target + +Rslib outputs code for the browser by default, so no additional configuration is necessary to get started. + +When developing a library that runs in the browser, you can package it in both [ESM](/guide/basic/output-format#esm--cjs) and [CJS](/guide/basic/output-format#esm--cjs) formats for integration with application bundlers. Configuring the package [conditional exports](https://nodejs.org/api/packages.html#conditional-exports) to ESM output allows for better tree shaking. Additionally, you can create [UMD](/guide/basic/output-format#umd) format output for direct browser use and even generate [Module Federation ](/guide/advanced/module-federation) formats for dynamic loading by other applications. Configure [Browserslist](/config/rsbuild/output#browserslist) according to the target browser support to determine the downgrade syntax of the output, or adding [polyfill](/guide/advanced/output-compatibility) for API compatibility. + +When publishing to npm, you can choose not to [minify](/config/rsbuild/output#minify) your code or to minify it while providing a [sourcemap](/config/rsbuild/output#sourcemap) to enhance the debugging experience for users of your library. For styling, you can use [CSS](/guide/advanced/css), or [CSS pre-processors](/guide/advanced/css#preprocessors) like Sass, Less, or Stylus, or apply [PostCSS](/guide/advanced/css#postcss) for CSS post-processing. Tools like [Tailwind CSS](/guide/advanced/css#tailwind-css) can also help in building your styles. Using [CSS modules](/guide/advanced/css#css-modules) to create CSS modules is another option. + +In terms of resource management, Rslib handles [static assets](/guide/advanced/assets) used in your code, such as SVG and PNG files. You can also build a component library of [React](/guide/solution/react), [Preact](/guide/solution/preact), or other frameworks, using [Storybook](/guide/advanced/storybook) for UI component development and testing. + +Refer to the solutions in this chapter to learn how to use Rslib to develop browser libraries for different frameworks. + +{/* TODO: Clarify default behavior */} +{/* ### Default Behavior */} + +## Node.js Target + +By setting set [target](/config/rsbuild/output#target) to `"node"` to development libraries for Node.js. + +You can create a [pure ESM](/guide/basic/output-format#esm--cjs) package or a [dual package](/guide/basic/output-format#esm--cjs) that supports both ESM and CJS as needed. In CJS output, `import.meta.url` will be automatically [shimmed](/config/lib/shims) for compatibility and `__dirname` and `__filename` got an optional ESM shims to ensure proper use across different module system. Node.js's built-in packages will be [externalized by default](/guide/advanced/third-party-deps), simplifying the configuration. + +{/* TODO: Clarify default behavior */} +{/* ### Default Behavior */} diff --git a/website/docs/en/guide/solution/preact.mdx b/website/docs/en/guide/solution/preact.mdx new file mode 100644 index 000000000..9cec8c678 --- /dev/null +++ b/website/docs/en/guide/solution/preact.mdx @@ -0,0 +1 @@ +# Preact diff --git a/website/docs/en/guide/start/components/MF.mdx b/website/docs/en/guide/start/components/MF.mdx new file mode 100644 index 000000000..f717324cf --- /dev/null +++ b/website/docs/en/guide/start/components/MF.mdx @@ -0,0 +1 @@ +Module Federation is an architectural pattern for JavaScript application decomposition (similar to microservices on the server-side), allowing you to share code and resources between multiple JavaScript applications (or micro-frontends). diff --git a/website/docs/en/guide/start/glossary.mdx b/website/docs/en/guide/start/glossary.mdx index f9675607b..69715f152 100644 --- a/website/docs/en/guide/start/glossary.mdx +++ b/website/docs/en/guide/start/glossary.mdx @@ -1,6 +1,7 @@ import ESM from './components/ESM.mdx'; import CJS from './components/CJS.mdx'; import UMD from './components/UMD.mdx'; +import MF from './components/MF.mdx'; # Glossary @@ -22,7 +23,7 @@ Bundleless refers to a development approach that avoids the traditional practice ## Module Federation -Module Federation is an architectural pattern for JavaScript application decomposition (similar to microservices on the server-side), allowing you to share code and resources between multiple JavaScript applications (or micro-frontends). + See [Module Federation](https://rsbuild.dev/guide/advanced/module-federation) for more details. From eaa07c8199a6ebc1eacc8f910b9b0bc7ee31a524 Mon Sep 17 00:00:00 2001 From: Yannik Peschke Date: Thu, 7 Nov 2024 08:36:32 +0100 Subject: [PATCH 09/23] docs: add Modern.js Module migration docs (#378) Co-authored-by: yannik.peschke Co-authored-by: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> --- .../en/guide/migration/modernjs-module.mdx | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) diff --git a/website/docs/en/guide/migration/modernjs-module.mdx b/website/docs/en/guide/migration/modernjs-module.mdx index e435abd7f..67dd58fc6 100644 --- a/website/docs/en/guide/migration/modernjs-module.mdx +++ b/website/docs/en/guide/migration/modernjs-module.mdx @@ -1 +1,167 @@ # Modern.js Module + +The migration path from `Modern.js Module` to `Rslib` is straightforward. The reason for it is the same underlying `Rsbuild` configuration. + +## Adapt package.json + +`Rslib` has a minimal dependency footprint. For the basic functionality you only need the package `@rslib/core`. Let's update your `package.json` file. + +- Remove the fields `main`, `lint-staged`, `simple-git-hooks`, `sideEffects` and `publishConfig` +- Change the `types` field from `./dist/types/index.d.ts` to `./dist/index.d.ts` +- Change the `module` field from `./dist/es/index.js` to `./dist/index.js` +- Remove the scripts fields `prepare`, `build:watch`, `reset`, `change`, `bump`, `pre`, `change-status`, `gen-release-note`, `release`, `new`, `upgrade` +- Change the script `build` from `modern build` to `rslib build` +- Change the script `lint` name to `check` and keep the value +- Add a new script `format` with the value `biome format --write` +- Change the script `dev` from `modern dev` to `rslib build --watch` +- Add the script `test` with the value `vitest run` +- Add the field `exports` (object) + - Add the field `"."` (object) + - Add the fields `"types": "./dist/index.d.ts"` and `"import": "./dist/index.js"` +- Add the field `files` with the value `["dist"]` +- Depending on your configuration and use-case the `devDependencies` can vary + - It is important to replace `"@modern-js/module-tools"` with `"@rslib/core"` + - We do not need `rimraf`, `lint-staged` and `simple-git-hooks` anymore for starters +- Copy over your required `dependencies` and `peerDependencies` if needed + +Your `package.json` should look something like this: + +```json title="package.json" +{ + "name": "rslib", + "version": "1.0.0", + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + } + }, + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": ["dist"], + "scripts": { + "build": "rslib build", + "check": "biome check --write", + "dev": "rslib build --watch", + "format": "biome format --write", + "test": "vitest run" + }, + "devDependencies": { + "@biomejs/biome": "^1.9.3", + "@rslib/core": "^0.0.16", + "typescript": "^5.6.3" + }, + "peerDependencies": {}, + "dependencies": {} +} +``` + +## Adapt bundler config + +Now we have a clean slate to work with. We will continue with the `Rslib` configuration. It follows the same pattern as all `Rs*` projects. Since this step is very unique for every environment, we will only touch the basics here: +Replace your `modern.config.ts` with a `rslib.config.ts`: + +```js title="rslib.config.ts" +import { defineConfig } from '@rslib/core'; + +export default defineConfig({ + source: { + entry: { + index: ['./src/**'], + }, + }, + lib: [ + { + bundle: false, + dts: true, + format: 'esm', + }, + ], +}); +``` + +## Typescript + +If you use Typescript in your `Modern.js Module`, add the following changes: + +```js title="rslib.config.ts" +import { defineConfig } from '@rslib/core'; + +export default defineConfig({ + //... + lib: [ + { + //... + dts: true, + }, + ], +}); +``` + +## React + +If you use React in your `Modern.js Module`, add the following changes: + +```js title="rslib.config.ts" +import { defineConfig } from '@rslib/core'; +// Quick tip: You can use all Rsbuild plugins here since they are compatible with Rslib +import { pluginReact } from '@rsbuild/plugin-react'; + +export default defineConfig({ + //... + plugins: [pluginReact()], +}); +``` + +In addition, you have to install the `@rsbuild/plugin-react` package as devDependency + +## Sass + +If you use Sass in your `Modern.js Module`, add the following changes: + +```js title="rslib.config.ts" +import { defineConfig } from '@rslib/core'; +// Quick tip: You can use all Rsbuild plugins here since they are compatible with Rslib +import { pluginSass } from '@rsbuild/plugin-sass'; + +export default defineConfig({ + //... + plugins: [pluginSass()], +}); +``` + +In addition, you have to install the `@rsbuild/plugin-sass` package as devDependency. + +If you run Typescript together with Sass, you might run into DTS generation errors. This can be resolved by adding a `global.d.ts` file in your `/src` directory. + +```ts title="global.d.ts" +declare module '*.scss' { + const content: { [className: string]: string }; + export default content; +} +``` + +## css-modules + +If you use css-modules in your `Modern.js Module`, add the following changes: + +```js title="rslib.config.ts" +import { defineConfig } from '@rslib/core'; +import { pluginSass } from '@rsbuild/plugin-sass'; + +export default defineConfig({ + lib: [ + { + //... + output: { + cssModules: { + // the css-modules options are 1:1 the same as in the official "css-modules" package + localIdentName: '[local]--[hash:base64:5]', + }, + }, + }, + ], + plugins: [pluginSass()], +}); +``` From c5fc73176f1f00844222f6279145447f0cf603a9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:14:16 +0800 Subject: [PATCH 10/23] chore(deps): update all patch dependencies (#386) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../module-federation/mf-host/package.json | 2 +- .../mf-react-component/package.json | 2 +- .../module-federation/mf-remote/package.json | 2 +- .../react-component-bundle-false/package.json | 2 +- examples/react-component-bundle/package.json | 2 +- examples/react-component-umd/package.json | 2 +- package.json | 2 +- packages/core/package.json | 2 +- .../fragments/base/react-js/package.json | 2 +- .../fragments/base/react-ts/package.json | 2 +- .../tools/storybook-react-js/package.json | 4 +- .../tools/storybook-react-ts/package.json | 4 +- packages/create-rslib/package.json | 2 +- .../template-[react]-[]-js/package.json | 2 +- .../template-[react]-[]-ts/package.json | 2 +- .../package.json | 6 +- .../package.json | 6 +- .../package.json | 6 +- .../package.json | 6 +- .../template-[react]-[vitest]-js/package.json | 2 +- .../template-[react]-[vitest]-ts/package.json | 2 +- packages/plugin-dts/package.json | 2 +- pnpm-lock.yaml | 309 ++++++++++-------- tests/integration/asset/name/package.json | 2 +- tests/integration/asset/svgr/package.json | 2 +- .../bundle-false/svgr/package.json | 2 +- tests/package.json | 2 +- website/package.json | 4 +- 28 files changed, 206 insertions(+), 179 deletions(-) diff --git a/examples/module-federation/mf-host/package.json b/examples/module-federation/mf-host/package.json index d2271d5e9..28762ab29 100644 --- a/examples/module-federation/mf-host/package.json +++ b/examples/module-federation/mf-host/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@module-federation/rsbuild-plugin": "^0.6.15", "@rsbuild/core": "~1.0.19", - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "typescript": "^5.6.3" diff --git a/examples/module-federation/mf-react-component/package.json b/examples/module-federation/mf-react-component/package.json index c0fdf18c5..18a3b2eeb 100644 --- a/examples/module-federation/mf-react-component/package.json +++ b/examples/module-federation/mf-react-component/package.json @@ -18,7 +18,7 @@ "devDependencies": { "@module-federation/enhanced": "^0.6.15", "@module-federation/rsbuild-plugin": "^0.6.15", - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@types/react": "^18.3.12", "http-server": "^14.1.1", diff --git a/examples/module-federation/mf-remote/package.json b/examples/module-federation/mf-remote/package.json index 785dbdfd7..bb772bfbc 100644 --- a/examples/module-federation/mf-remote/package.json +++ b/examples/module-federation/mf-remote/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@module-federation/rsbuild-plugin": "^0.6.15", "@rsbuild/core": "~1.0.19", - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "typescript": "^5.6.3" diff --git a/examples/react-component-bundle-false/package.json b/examples/react-component-bundle-false/package.json index 46fce9de2..64d79eb28 100644 --- a/examples/react-component-bundle-false/package.json +++ b/examples/react-component-bundle-false/package.json @@ -8,7 +8,7 @@ "build": "rslib build" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rsbuild/plugin-sass": "^1.1.0", "@rslib/core": "workspace:*", "@types/react": "^18.3.12", diff --git a/examples/react-component-bundle/package.json b/examples/react-component-bundle/package.json index f0145353b..c84eef174 100644 --- a/examples/react-component-bundle/package.json +++ b/examples/react-component-bundle/package.json @@ -8,7 +8,7 @@ "build": "rslib build" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rsbuild/plugin-sass": "^1.1.0", "@rslib/core": "workspace:*", "@types/react": "^18.3.12", diff --git a/examples/react-component-umd/package.json b/examples/react-component-umd/package.json index 7ee49b5ae..9d7a3d692 100644 --- a/examples/react-component-umd/package.json +++ b/examples/react-component-umd/package.json @@ -7,7 +7,7 @@ "build": "rslib build" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rsbuild/plugin-sass": "^1.1.0", "@rslib/core": "workspace:*", "@types/react": "^18.3.12", diff --git a/package.json b/package.json index 6a105f8c3..28dea7665 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "cspell-ban-words": "^0.0.4", "fs-extra": "^11.2.0", "nano-staged": "^0.8.0", - "nx": "^20.0.8", + "nx": "^20.0.11", "prettier": "^3.3.3", "prettier-plugin-packagejson": "^2.5.3", "simple-git-hooks": "^2.11.1", diff --git a/packages/core/package.json b/packages/core/package.json index 6776990eb..3c2a2759c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -50,7 +50,7 @@ "memfs": "^4.14.0", "picocolors": "1.1.1", "prebundle": "1.2.5", - "rslib": "npm:@rslib/core@0.0.15", + "rslib": "npm:@rslib/core@0.0.16", "rslog": "^1.2.3", "tsconfck": "3.1.4", "typescript": "^5.6.3" diff --git a/packages/create-rslib/fragments/base/react-js/package.json b/packages/create-rslib/fragments/base/react-js/package.json index fa4d0d856..6cce58521 100644 --- a/packages/create-rslib/fragments/base/react-js/package.json +++ b/packages/create-rslib/fragments/base/react-js/package.json @@ -16,7 +16,7 @@ "dev": "rslib build --watch" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "react": "^18.3.1" }, diff --git a/packages/create-rslib/fragments/base/react-ts/package.json b/packages/create-rslib/fragments/base/react-ts/package.json index c08cd6ff7..8d3f2d335 100644 --- a/packages/create-rslib/fragments/base/react-ts/package.json +++ b/packages/create-rslib/fragments/base/react-ts/package.json @@ -18,7 +18,7 @@ "dev": "rslib build --watch" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@types/react": "^18.3.12", "react": "^18.3.1", diff --git a/packages/create-rslib/fragments/tools/storybook-react-js/package.json b/packages/create-rslib/fragments/tools/storybook-react-js/package.json index ce9b1f77d..8f6c275b3 100644 --- a/packages/create-rslib/fragments/tools/storybook-react-js/package.json +++ b/packages/create-rslib/fragments/tools/storybook-react-js/package.json @@ -13,7 +13,7 @@ "@storybook/react": "^8.3.6", "@storybook/test": "^8.3.6", "storybook": "^8.3.6", - "storybook-addon-rslib": "^0.1.2", - "storybook-react-rsbuild": "^0.1.2" + "storybook-addon-rslib": "^0.1.3", + "storybook-react-rsbuild": "^0.1.3" } } diff --git a/packages/create-rslib/fragments/tools/storybook-react-ts/package.json b/packages/create-rslib/fragments/tools/storybook-react-ts/package.json index ce9b1f77d..8f6c275b3 100644 --- a/packages/create-rslib/fragments/tools/storybook-react-ts/package.json +++ b/packages/create-rslib/fragments/tools/storybook-react-ts/package.json @@ -13,7 +13,7 @@ "@storybook/react": "^8.3.6", "@storybook/test": "^8.3.6", "storybook": "^8.3.6", - "storybook-addon-rslib": "^0.1.2", - "storybook-react-rsbuild": "^0.1.2" + "storybook-addon-rslib": "^0.1.3", + "storybook-react-rsbuild": "^0.1.3" } } diff --git a/packages/create-rslib/package.json b/packages/create-rslib/package.json index 7277a0b73..9f20f635d 100644 --- a/packages/create-rslib/package.json +++ b/packages/create-rslib/package.json @@ -38,7 +38,7 @@ "@types/fs-extra": "^11.0.4", "@types/node": "^22.8.1", "fs-extra": "^11.2.0", - "rslib": "npm:@rslib/core@0.0.15", + "rslib": "npm:@rslib/core@0.0.16", "tsx": "^4.19.2", "typescript": "^5.6.3" }, diff --git a/packages/create-rslib/template-[react]-[]-js/package.json b/packages/create-rslib/template-[react]-[]-js/package.json index fa4d0d856..6cce58521 100644 --- a/packages/create-rslib/template-[react]-[]-js/package.json +++ b/packages/create-rslib/template-[react]-[]-js/package.json @@ -16,7 +16,7 @@ "dev": "rslib build --watch" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "react": "^18.3.1" }, diff --git a/packages/create-rslib/template-[react]-[]-ts/package.json b/packages/create-rslib/template-[react]-[]-ts/package.json index c08cd6ff7..8d3f2d335 100644 --- a/packages/create-rslib/template-[react]-[]-ts/package.json +++ b/packages/create-rslib/template-[react]-[]-ts/package.json @@ -18,7 +18,7 @@ "dev": "rslib build --watch" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@types/react": "^18.3.12", "react": "^18.3.1", diff --git a/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json b/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json index 182f1b944..7d303f737 100644 --- a/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json +++ b/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@rsbuild/core": "~1.0.19", - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.3.6", "@storybook/addon-interactions": "^8.3.6", @@ -34,8 +34,8 @@ "jsdom": "^25.0.1", "react": "^18.3.1", "storybook": "^8.3.6", - "storybook-addon-rslib": "^0.1.2", - "storybook-react-rsbuild": "^0.1.2", + "storybook-addon-rslib": "^0.1.3", + "storybook-react-rsbuild": "^0.1.3", "vitest": "^2.1.4" }, "peerDependencies": { diff --git a/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json b/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json index f4fb5a050..2538c4962 100644 --- a/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json +++ b/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@rsbuild/core": "~1.0.19", - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.3.6", "@storybook/addon-interactions": "^8.3.6", @@ -37,8 +37,8 @@ "jsdom": "^25.0.1", "react": "^18.3.1", "storybook": "^8.3.6", - "storybook-addon-rslib": "^0.1.2", - "storybook-react-rsbuild": "^0.1.2", + "storybook-addon-rslib": "^0.1.3", + "storybook-react-rsbuild": "^0.1.3", "typescript": "^5.6.3", "vitest": "^2.1.4" }, diff --git a/packages/create-rslib/template-[react]-[storybook]-js/package.json b/packages/create-rslib/template-[react]-[storybook]-js/package.json index c67cfa38f..6942462d7 100644 --- a/packages/create-rslib/template-[react]-[storybook]-js/package.json +++ b/packages/create-rslib/template-[react]-[storybook]-js/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "@rsbuild/core": "~1.0.19", - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.3.6", "@storybook/addon-interactions": "^8.3.6", @@ -30,8 +30,8 @@ "@storybook/test": "^8.3.6", "react": "^18.3.1", "storybook": "^8.3.6", - "storybook-addon-rslib": "^0.1.2", - "storybook-react-rsbuild": "^0.1.2" + "storybook-addon-rslib": "^0.1.3", + "storybook-react-rsbuild": "^0.1.3" }, "peerDependencies": { "react": ">=16.9.0", diff --git a/packages/create-rslib/template-[react]-[storybook]-ts/package.json b/packages/create-rslib/template-[react]-[storybook]-ts/package.json index 8628ab430..85e19dc2f 100644 --- a/packages/create-rslib/template-[react]-[storybook]-ts/package.json +++ b/packages/create-rslib/template-[react]-[storybook]-ts/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@rsbuild/core": "~1.0.19", - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.3.6", "@storybook/addon-interactions": "^8.3.6", @@ -33,8 +33,8 @@ "@types/react": "^18.3.12", "react": "^18.3.1", "storybook": "^8.3.6", - "storybook-addon-rslib": "^0.1.2", - "storybook-react-rsbuild": "^0.1.2", + "storybook-addon-rslib": "^0.1.3", + "storybook-react-rsbuild": "^0.1.3", "typescript": "^5.6.3" }, "peerDependencies": { diff --git a/packages/create-rslib/template-[react]-[vitest]-js/package.json b/packages/create-rslib/template-[react]-[vitest]-js/package.json index 757707188..c9c5eef2c 100644 --- a/packages/create-rslib/template-[react]-[vitest]-js/package.json +++ b/packages/create-rslib/template-[react]-[vitest]-js/package.json @@ -17,7 +17,7 @@ "test": "vitest run" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.0.1", diff --git a/packages/create-rslib/template-[react]-[vitest]-ts/package.json b/packages/create-rslib/template-[react]-[vitest]-ts/package.json index fe7bd2e12..a9625987e 100644 --- a/packages/create-rslib/template-[react]-[vitest]-ts/package.json +++ b/packages/create-rslib/template-[react]-[vitest]-ts/package.json @@ -19,7 +19,7 @@ "test": "vitest run" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.0.1", diff --git a/packages/plugin-dts/package.json b/packages/plugin-dts/package.json index 589d9fee4..13b1febe5 100644 --- a/packages/plugin-dts/package.json +++ b/packages/plugin-dts/package.json @@ -37,7 +37,7 @@ "@microsoft/api-extractor": "^7.47.11", "@rsbuild/core": "~1.0.19", "@rslib/tsconfig": "workspace:*", - "rslib": "npm:@rslib/core@0.0.15", + "rslib": "npm:@rslib/core@0.0.16", "typescript": "^5.6.3" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 914ae5d3f..4142f9909 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: ^0.8.0 version: 0.8.0 nx: - specifier: ^20.0.8 - version: 20.0.8 + specifier: ^20.0.11 + version: 20.0.11 prettier: specifier: ^3.3.3 version: 3.3.3 @@ -93,8 +93,8 @@ importers: specifier: ~1.0.19 version: 1.0.19 '@rsbuild/plugin-react': - specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.0.19) + specifier: ^1.0.7 + version: 1.0.7(@rsbuild/core@1.0.19) '@types/react': specifier: ^18.3.12 version: 18.3.12 @@ -114,8 +114,8 @@ importers: specifier: ^0.6.15 version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.0.19) '@rsbuild/plugin-react': - specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.0.19) + specifier: ^1.0.7 + version: 1.0.7(@rsbuild/core@1.0.19) '@rslib/core': specifier: workspace:* version: link:../../../packages/core @@ -148,8 +148,8 @@ importers: specifier: ~1.0.19 version: 1.0.19 '@rsbuild/plugin-react': - specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.0.19) + specifier: ^1.0.7 + version: 1.0.7(@rsbuild/core@1.0.19) '@types/react': specifier: ^18.3.12 version: 18.3.12 @@ -163,8 +163,8 @@ importers: examples/react-component-bundle: devDependencies: '@rsbuild/plugin-react': - specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.0.19) + specifier: ^1.0.7 + version: 1.0.7(@rsbuild/core@1.0.19) '@rsbuild/plugin-sass': specifier: ^1.1.0 version: 1.1.0(@rsbuild/core@1.0.19) @@ -181,8 +181,8 @@ importers: examples/react-component-bundle-false: devDependencies: '@rsbuild/plugin-react': - specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.0.19) + specifier: ^1.0.7 + version: 1.0.7(@rsbuild/core@1.0.19) '@rsbuild/plugin-sass': specifier: ^1.1.0 version: 1.1.0(@rsbuild/core@1.0.19) @@ -199,8 +199,8 @@ importers: examples/react-component-umd: devDependencies: '@rsbuild/plugin-react': - specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.0.19) + specifier: ^1.0.7 + version: 1.0.7(@rsbuild/core@1.0.19) '@rsbuild/plugin-sass': specifier: ^1.1.0 version: 1.1.0(@rsbuild/core@1.0.19) @@ -254,8 +254,8 @@ importers: specifier: 1.2.5 version: 1.2.5(typescript@5.6.3) rslib: - specifier: npm:@rslib/core@0.0.15 - version: '@rslib/core@0.0.15(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(typescript@5.6.3)' + specifier: npm:@rslib/core@0.0.16 + version: '@rslib/core@0.0.16(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(typescript@5.6.3)' rslog: specifier: ^1.2.3 version: 1.2.3 @@ -288,8 +288,8 @@ importers: specifier: ^11.2.0 version: 11.2.0 rslib: - specifier: npm:@rslib/core@0.0.15 - version: '@rslib/core@0.0.15(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(typescript@5.6.3)' + specifier: npm:@rslib/core@0.0.16 + version: '@rslib/core@0.0.16(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(typescript@5.6.3)' tsx: specifier: ^4.19.2 version: 4.19.2 @@ -319,8 +319,8 @@ importers: specifier: workspace:* version: link:../../scripts/tsconfig rslib: - specifier: npm:@rslib/core@0.0.15 - version: '@rslib/core@0.0.15(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(typescript@5.6.3)' + specifier: npm:@rslib/core@0.0.16 + version: '@rslib/core@0.0.16(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(typescript@5.6.3)' typescript: specifier: ^5.6.3 version: 5.6.3 @@ -352,8 +352,8 @@ importers: specifier: ^1.1.0 version: 1.1.0(@rsbuild/core@1.0.19) '@rsbuild/plugin-react': - specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.0.19) + specifier: ^1.0.7 + version: 1.0.7(@rsbuild/core@1.0.19) '@rsbuild/plugin-sass': specifier: ^1.1.0 version: 1.1.0(@rsbuild/core@1.0.19) @@ -414,8 +414,8 @@ importers: version: 18.3.1 devDependencies: '@rsbuild/plugin-react': - specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.0.19) + specifier: ^1.0.7 + version: 1.0.7(@rsbuild/core@1.0.19) tests/integration/asset/path: {} @@ -428,8 +428,8 @@ importers: version: 18.3.1 devDependencies: '@rsbuild/plugin-react': - specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.0.19) + specifier: ^1.0.7 + version: 1.0.7(@rsbuild/core@1.0.19) '@rsbuild/plugin-svgr': specifier: ^1.0.5 version: 1.0.5(@rsbuild/core@1.0.19)(typescript@5.6.3) @@ -501,8 +501,8 @@ importers: version: 18.3.1 devDependencies: '@rsbuild/plugin-react': - specifier: ^1.0.6 - version: 1.0.6(@rsbuild/core@1.0.19) + specifier: ^1.0.7 + version: 1.0.7(@rsbuild/core@1.0.19) '@rsbuild/plugin-svgr': specifier: ^1.0.5 version: 1.0.5(@rsbuild/core@1.0.19)(typescript@5.6.3) @@ -739,8 +739,8 @@ importers: specifier: workspace:* version: link:../scripts/tsconfig '@rstack-dev/doc-ui': - specifier: 1.5.2 - version: 1.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 1.5.3 + version: 1.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/node': specifier: ^22.8.1 version: 22.8.1 @@ -760,8 +760,8 @@ importers: specifier: 1.0.3 version: 1.0.3(@rsbuild/core@1.0.19) rspress: - specifier: 1.35.3 - version: 1.35.3(webpack@5.94.0) + specifier: 1.35.4 + version: 1.35.4(webpack@5.94.0) rspress-plugin-font-open-sans: specifier: 1.0.0 version: 1.0.0 @@ -1457,62 +1457,62 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@nx/nx-darwin-arm64@20.0.8': - resolution: {integrity: sha512-tDoafq5YUyOwxR1Y796WXA6j49OLJRO7TA/Fym52SSuD3AULbgo3/X5XeY6oL2PWM044CuUVrp3V4cIDUtyJpA==} + '@nx/nx-darwin-arm64@20.0.11': + resolution: {integrity: sha512-SEHM9L9LZpvDisRMZr2YIiXQNeE5fkn7GvUGE8cOCZeAaw56pOrm01bqRhxY/6YBvAIiZIRD+YfZynkFMqjT0Q==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@nx/nx-darwin-x64@20.0.8': - resolution: {integrity: sha512-bvfZ6VhSvOpPV00veaJDO1a4X+f0dn8S1A73/2ThbGZrZLAQIFrA8v+ysax+bfCGRHNdtlAL+f7TG2buh/4BRg==} + '@nx/nx-darwin-x64@20.0.11': + resolution: {integrity: sha512-eWRk4uXR22mFDaA5uQBJRrvU2JZdF/TowXUVXvANfz2LU0Wg1qHRz/SIrB2hnj6b8UX7xHXY9eRunnOU66tLZg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@nx/nx-freebsd-x64@20.0.8': - resolution: {integrity: sha512-AdOme0o/pTFy+TutIOAamuGTqbh6nOLrkNEX8f4ogfDRH+k/WvjRQ4z4ne58wf/2EVXua4jKTIEipIZAP/Ad1w==} + '@nx/nx-freebsd-x64@20.0.11': + resolution: {integrity: sha512-e1cKZdQP9j6Tqq9PFO3dDfNE4Dj9DECiuHa7Lym4xuTPqs7zrPqzbMAgg0S9McoYjuvtaemBE7ppmIGnQvnivw==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@nx/nx-linux-arm-gnueabihf@20.0.8': - resolution: {integrity: sha512-PYf7Z30A1TCZq9HVUP6JjT3ghTLYkaBpR6vDwiGWUV/exuNmhUgfYW6TiTpiSArXwnAgSIbaoGe537iEvYzA7A==} + '@nx/nx-linux-arm-gnueabihf@20.0.11': + resolution: {integrity: sha512-3Pfm+c53u20lWeTmiH+iOKNJRslagOA/6rgujJmTwzvYY20Ny4ivMnkd1Y0D/dm78dVMj9zdKdxPCV/aE5L4TA==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@nx/nx-linux-arm64-gnu@20.0.8': - resolution: {integrity: sha512-3VpvhjmNR78HVxGzpWiwqZsG5sNvLUv2Qfohtxyc3561o8VU41R9Onf/LJmbbZvmdDaPvvXQp3rs0OXT4i7T1g==} + '@nx/nx-linux-arm64-gnu@20.0.11': + resolution: {integrity: sha512-z0KN2OghBoipBuDOJWj5l4tz7YIdEHtHYVk5Gnm6r3zwSJ78obvFsiUXBHQVrK1sLFbsaLRKi63mXP58axDL+A==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@nx/nx-linux-arm64-musl@20.0.8': - resolution: {integrity: sha512-3Z7fTJGG8h4VCHhD8Ix0zr6eFMfa1y3YDlzm8Clxu4Enzz0pEsUrT+ph6qrsArnIyUgiCowSi8+xgHFg7V/F1Q==} + '@nx/nx-linux-arm64-musl@20.0.11': + resolution: {integrity: sha512-e/QwogKNOdiALEG+9uHW1QbKr4POfvqgo02fuV2pumL38y06ooj9iIjBRDVLqpjIbxMi+kmGhvpLs2wwRbyTmA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@nx/nx-linux-x64-gnu@20.0.8': - resolution: {integrity: sha512-Uttl1RHzWpjZgdzowCUNjC6/b3YhZR31wyXWgVF4PDWpDVgy4EigGc19tdrvv8pUVKQFuj0uaSTPUklguN7c3A==} + '@nx/nx-linux-x64-gnu@20.0.11': + resolution: {integrity: sha512-LxQIHy/wEV75ZWf+4vgEOo4KkfzSRo/i1QvUsVFyqXjvpbrobXtpP+vreljTfx+QR90zad3vymFtnTNfPswSVg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@nx/nx-linux-x64-musl@20.0.8': - resolution: {integrity: sha512-llc6ywSPaOWQzEzD73USyAXd/y3Slu+GHS02IsQqZeA23EIOEzhvEeeeKgs4F8LKuFW/TpV6T5IhvSHw9/mvBg==} + '@nx/nx-linux-x64-musl@20.0.11': + resolution: {integrity: sha512-LtxFGVykk81enIqHkQSvs3fAd/La0sLMuR3Gqb0Ia6M9yq26Yadka0R5XZK/xGR3dnahB3Qu8mFANv6BJ7PLig==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@nx/nx-win32-arm64-msvc@20.0.8': - resolution: {integrity: sha512-GhPVVNrL0QcQ3B6r0P0Dta3TIesJz7uso7iI5rCZ/oOGa02UsT4NkQBpIhxYQZ4TnHYNy84g4rHtYHrSlpDlEw==} + '@nx/nx-win32-arm64-msvc@20.0.11': + resolution: {integrity: sha512-dA/Oa2641ixZFSiwY8YBgy/vLwWEvp5To63Fa2NaflQGSkRUAX6N9qcljAwns2KKJwVwQcbzQBiqHo0IL8JnxQ==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@nx/nx-win32-x64-msvc@20.0.8': - resolution: {integrity: sha512-yLlcgM0zFdmsExdLv8O2g5FWQ6d2vyN5OynKV+F5BrWHC4LvrqyYJ99y++5bLFoEi19RYIK6sLnzGIRSF6dHGg==} + '@nx/nx-win32-x64-msvc@20.0.11': + resolution: {integrity: sha512-24wKBB4nbvyYweeBG+AkhHyekZGOPJNI1xYuhwN2TQP5m+JueBfr16PaFjFB339MS0ujy5+1kO649ACJh0cqzQ==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1642,6 +1642,11 @@ packages: peerDependencies: '@rsbuild/core': 1.x + '@rsbuild/plugin-react@1.0.7': + resolution: {integrity: sha512-t7T/GqDwodusTAnxGpqVRnQ/G+HYh98zk71qIg19WkjVJJGv57AC1Ppx0/6zzbZAbxU60bfK8TeEEXjhXCdSxA==} + peerDependencies: + '@rsbuild/core': 1.x + '@rsbuild/plugin-sass@1.0.4': resolution: {integrity: sha512-0eTVOgglTBf440ykuZWJQmh44S3hj/MT95K+P5XwEU8gU72MrEGTrQlZciOqFW8tVkEVmtUlHPx7YEipXhplSQ==} peerDependencies: @@ -1657,8 +1662,8 @@ packages: peerDependencies: '@rsbuild/core': 1.x - '@rslib/core@0.0.15': - resolution: {integrity: sha512-E44MHKIsEHB62CLH5UuhnUXlpdwW5aDYvEAvezJPhjqViI5odL5itTzAiKtVdHzBS4K3UZoP+o+pZRJ9vID0rQ==} + '@rslib/core@0.0.16': + resolution: {integrity: sha512-g6IFUZW0K7DDKK/27kF7DOKhP5JIqZoIVAU0c9DZffRE3Pw9sWTyEyVN/kaEnp5k3gaeQTBpcV9nSW+41B2slQ==} engines: {node: '>=16.0.0'} hasBin: true peerDependencies: @@ -1796,8 +1801,8 @@ packages: react-refresh: optional: true - '@rspress/core@1.35.3': - resolution: {integrity: sha512-sT+0t2UJ/qxahPDlFVDKl/n8ACZvmxL5r57AZF923VvKpdkgE729bZ8xlZQku5sl9KCcwo4+87V7AOUIEC4JHw==} + '@rspress/core@1.35.4': + resolution: {integrity: sha512-tGMUYxBN3qZKkwjRKcNG4lQY4KFIoA7HCEy9mQbwV6EVK8pNZAUdGkqCaviKrVTDXF4tmLy5Qoaplz8diYQmmw==} engines: {node: '>=14.17.6'} '@rspress/mdx-rs-darwin-arm64@0.6.1': @@ -1852,37 +1857,37 @@ packages: resolution: {integrity: sha512-hAZH2dZPueRACh2dL6EuKzNSxPShq0zd0BCat1IaOpJ8mX73IRvTAQib/26gTM1IRikjMY7R7Bs6/RDZrjM+dQ==} engines: {node: '>= 10'} - '@rspress/plugin-auto-nav-sidebar@1.35.3': - resolution: {integrity: sha512-ooLJzhkRSx8BKTcG9WLxuV7eXtqs/RG5IAew3wWK0D5ogy36/JYG2DZssmmrvPWN4wTySjlJCYpEyJWAwaGOBg==} + '@rspress/plugin-auto-nav-sidebar@1.35.4': + resolution: {integrity: sha512-qh4r44/GOtWTc+oOOQROF2zu5mw/NPW5PWYO93EbMIYczbjkMXsqmKCSPcWbAMsJvn7DJPXUdZCe0DS0Xmn5+w==} engines: {node: '>=14.17.6'} - '@rspress/plugin-container-syntax@1.35.3': - resolution: {integrity: sha512-YPtnBfvlAfbwlOKtR2vj4SwV7Kk04Kt2cWkjnKQRZph1Sj6fHWgaT620ES6gbkYLz7pLmQtpFc/VSLZurDkDvw==} + '@rspress/plugin-container-syntax@1.35.4': + resolution: {integrity: sha512-cIwxtSkQyFMFGL2CdnnXi5SVjDhM9FWiavsaYanjPqeneY6ztWwpJ+ppKcrzgArCiCrt9DTU+G7diEVPqXjYJA==} engines: {node: '>=14.17.6'} - '@rspress/plugin-last-updated@1.35.3': - resolution: {integrity: sha512-yPUTGLC9e+4Vz0GsX2gobKcR7qYyoe/dcood4dSi8ByO29qLSxnbiO8kb3e0jc7aBHeoUQyjswRaPzftcgcZUA==} + '@rspress/plugin-last-updated@1.35.4': + resolution: {integrity: sha512-rIGtS4Pjk5r57EAcQ9XCJJQmwLL+UpRCmGE6MAom1UAudabT2zQwt7iLEQhQH8EK6lOcBrAiQLREMdi0/lNjfQ==} engines: {node: '>=14.17.6'} - '@rspress/plugin-medium-zoom@1.35.3': - resolution: {integrity: sha512-IBM0CH5/SjPEjd0sBgqxhjmCJwurSvwVfwvmZG/3OFkMx65MoejII+PWJColSarKDKwU+VN9CMrULkNDw+a8gg==} + '@rspress/plugin-medium-zoom@1.35.4': + resolution: {integrity: sha512-0q4ShCSQI3nL1v13pUnKjV+u6KX3QO8KB/MXyWH97sIMj3TBtsPhrDnMe+JD1FsH0/rhVo61vi2cYDCa24c3oA==} engines: {node: '>=14.17.6'} peerDependencies: - '@rspress/runtime': ^1.35.3 + '@rspress/runtime': ^1.35.4 - '@rspress/runtime@1.35.3': - resolution: {integrity: sha512-JyjQuiV4E2l2BpGbh8Gkoc3tb/OO5Y6xYd7yff/14tFvsWwxpPp7VbAMH7CcV4zz/D6VSpr5nlZloyTfC9arhA==} + '@rspress/runtime@1.35.4': + resolution: {integrity: sha512-nGKU/43wYNJZE31nniw0KQq7KqHkm/RaNxRi2i1/eHLYBI5VStqZ5bwwXGr8WXfA9I+d/L51gczjXHgy8Dje+A==} engines: {node: '>=14.17.6'} - '@rspress/shared@1.35.3': - resolution: {integrity: sha512-vrcM/CP/Ji2qf4Of+JQMLr9pwygtjcICdtVRL+ch97CaFCoX9JfqY3hHMuCHFsZ7FNenWxOolJeLW06sYBcPdQ==} + '@rspress/shared@1.35.4': + resolution: {integrity: sha512-hZdSQuTN+OCwv6hM9WL1zqGoyg5zDNXSbgoMDQCWhppVcmKMLe+5g+wr6gqegrzBWhhAnbf0WvgHksVArpW1HA==} - '@rspress/theme-default@1.35.3': - resolution: {integrity: sha512-VfHmr6IzJ0JR17w/Fv6f6vPXS6VCMjx1oq7SJ8qkpQyhhCXeMOLRZ9QevvDqrOISREKZBR0XWe0nVT5d8FbgPA==} + '@rspress/theme-default@1.35.4': + resolution: {integrity: sha512-654JQddPAdjr7oGua2Yj7bjtOum2nNEQvFQTRV5osb7oV1j/YNeQuLDvJfbog9GVGzjlXatoMNhhmwZxQ5FN+w==} engines: {node: '>=14.17.6'} - '@rstack-dev/doc-ui@1.5.2': - resolution: {integrity: sha512-LPJNTRhv0eVxhsu6GR9zVK5szQwLgLmBHcOjrYkxhy6tHmDr++0ZXG9c61iAOH8A5gEbygXAmnLDsxbHD9Hosw==} + '@rstack-dev/doc-ui@1.5.3': + resolution: {integrity: sha512-Pyf2N9GA75b0O76AfeC4Eipp9GbaIQBXCtovofThpR5/VIQ4//Xmi6AyaaP+zh4S8fh7TejecvduMXDG++3Njg==} '@rushstack/node-core-library@5.9.0': resolution: {integrity: sha512-MMsshEWkTbXqxqFxD4gcIUWQOCeBChlGczdZbHfqmNZQFLHB3yWxDFSMHFUdu2/OB9NUk7Awn5qRL+rws4HQNg==} @@ -2185,9 +2190,9 @@ packages: '@yarnpkg/lockfile@1.1.0': resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} - '@yarnpkg/parsers@3.0.0-rc.46': - resolution: {integrity: sha512-aiATs7pSutzda/rq8fnuPwTglyVwjM22bNnK2ZgjrpAjQHSSl3lztd2f9evst1W/qnC58DRz7T7QndUDumAR4Q==} - engines: {node: '>=14.15.0'} + '@yarnpkg/parsers@3.0.2': + resolution: {integrity: sha512-/HcYgtUSiJiot/XWGLOlGxPYUG65+/31V8oqk17vZLW1xlCoR4PampyePljOxY2n8/3jz9+tIFzICsyGujJZoA==} + engines: {node: '>=18.12.0'} '@zkochan/js-yaml@0.0.7': resolution: {integrity: sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==} @@ -3444,6 +3449,9 @@ packages: highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} + highlightjs-vue@1.0.0: + resolution: {integrity: sha512-PDEfEF102G23vHmPhLyPboFCD+BkMGu+GuJe2d9/eH4FsCwvgBpnc9n0pGE+ffKdph38s6foEZiEjdgHdzp+IA==} + hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} @@ -3478,6 +3486,9 @@ packages: htmlparser2@8.0.2: resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + htmlparser2@9.1.0: + resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} + htmr@1.0.2: resolution: {integrity: sha512-7T9babEHZwECQ2/ouxNPow1uGcKbj/BcbslPGPRxBKIOLNiIrFKq6ELzor7mc4HiexZzdb3izQQLl16bhPR9jw==} peerDependencies: @@ -4238,8 +4249,8 @@ packages: number-precision@1.6.0: resolution: {integrity: sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ==} - nx@20.0.8: - resolution: {integrity: sha512-cMtb+u5Eji7Xm9xMHZkRXMcO8GH6FFqS2+nMgtLUZ/+ZmquEgoV8mbsKVw1u1sJ6osOpWAu9OwXcilwtvSOoBw==} + nx@20.0.11: + resolution: {integrity: sha512-g22/gNg6RCfOKd47cFunGgMY4wm3okoG7hmlqe21HkdpuRf1Yos/YGNdPmrrS04+IKUz7utdBl6bDGfw8QbZAw==} hasBin: true peerDependencies: '@swc-node/register': ^1.8.0 @@ -4683,8 +4694,8 @@ packages: peerDependencies: react: '>=16.8' - react-syntax-highlighter@15.5.0: - resolution: {integrity: sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==} + react-syntax-highlighter@15.6.1: + resolution: {integrity: sha512-OqJ2/vL7lEeV5zTJyG7kmARppUjiB9h9udl4qHQjjgEos66z00Ia0OckwYfRxCSFrW8RJIBnsBwQsHZbVPspqg==} peerDependencies: react: '>= 0.14.0' @@ -4823,8 +4834,8 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - rsbuild-plugin-dts@0.0.15: - resolution: {integrity: sha512-KtM3BpyT7eXyLwVWHIRR4mGDUOoG3D/X4etRfZU6Wt+Qpd3ptwMHkcy2srY9MLQj2/cE7sOEPLuhDi3VQLtorw==} + rsbuild-plugin-dts@0.0.16: + resolution: {integrity: sha512-Yfc7h1cTTp55baLgS6DVa3mlLaFlNfoUVmcX7hCH1BT1fNbMabnngvXDtfqJpP62QyXcfrXNmcW0fznTYKgKmA==} engines: {node: '>=16.0.0'} peerDependencies: '@microsoft/api-extractor': ^7 @@ -4854,8 +4865,8 @@ packages: rspress-plugin-font-open-sans@1.0.0: resolution: {integrity: sha512-4GP0pd7h3W8EWdqE0VkA62nzUJZNy4ZnYK7be8+lOKHQKsQ5nZ+22A/VurNssi1eZFx3kjwbmIuoAkgb5W8S9Q==} - rspress@1.35.3: - resolution: {integrity: sha512-yaPWVsSB5ULxi3AGZANE9CowCnVe53d8Ga6Ia3IDyIgfeqCQ4tyOVZkrKevXY/TGzuKurBizRzLgw3vilwqvyg==} + rspress@1.35.4: + resolution: {integrity: sha512-vaUx16imcqJJMyQj0NbTkIthh73A/9sNWfQnRd5JJZBf/T3FHO9PMzvqivMOYE6kpUy/LMzvUBTmRWfQkM+Wgg==} hasBin: true run-parallel@1.2.0: @@ -6572,34 +6583,34 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@nx/nx-darwin-arm64@20.0.8': + '@nx/nx-darwin-arm64@20.0.11': optional: true - '@nx/nx-darwin-x64@20.0.8': + '@nx/nx-darwin-x64@20.0.11': optional: true - '@nx/nx-freebsd-x64@20.0.8': + '@nx/nx-freebsd-x64@20.0.11': optional: true - '@nx/nx-linux-arm-gnueabihf@20.0.8': + '@nx/nx-linux-arm-gnueabihf@20.0.11': optional: true - '@nx/nx-linux-arm64-gnu@20.0.8': + '@nx/nx-linux-arm64-gnu@20.0.11': optional: true - '@nx/nx-linux-arm64-musl@20.0.8': + '@nx/nx-linux-arm64-musl@20.0.11': optional: true - '@nx/nx-linux-x64-gnu@20.0.8': + '@nx/nx-linux-x64-gnu@20.0.11': optional: true - '@nx/nx-linux-x64-musl@20.0.8': + '@nx/nx-linux-x64-musl@20.0.11': optional: true - '@nx/nx-win32-arm64-msvc@20.0.8': + '@nx/nx-win32-arm64-msvc@20.0.11': optional: true - '@nx/nx-win32-x64-msvc@20.0.8': + '@nx/nx-win32-x64-msvc@20.0.11': optional: true '@pkgjs/parseargs@0.11.0': @@ -6716,6 +6727,12 @@ snapshots: '@rspack/plugin-react-refresh': 1.0.0(react-refresh@0.14.2) react-refresh: 0.14.2 + '@rsbuild/plugin-react@1.0.7(@rsbuild/core@1.0.19)': + dependencies: + '@rsbuild/core': 1.0.19 + '@rspack/plugin-react-refresh': 1.0.0(react-refresh@0.14.2) + react-refresh: 0.14.2 + '@rsbuild/plugin-sass@1.0.4(@rsbuild/core@1.0.19)': dependencies: '@rsbuild/core': 1.0.19 @@ -6747,10 +6764,10 @@ snapshots: - supports-color - typescript - '@rslib/core@0.0.15(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(typescript@5.6.3)': + '@rslib/core@0.0.16(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(typescript@5.6.3)': dependencies: '@rsbuild/core': 1.0.19 - rsbuild-plugin-dts: 0.0.15(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(@rsbuild/core@1.0.19)(typescript@5.6.3) + rsbuild-plugin-dts: 0.0.16(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(@rsbuild/core@1.0.19)(typescript@5.6.3) tinyglobby: 0.2.10 optionalDependencies: '@microsoft/api-extractor': 7.47.11(@types/node@22.8.1) @@ -6861,7 +6878,7 @@ snapshots: optionalDependencies: react-refresh: 0.14.2 - '@rspress/core@1.35.3(webpack@5.94.0)': + '@rspress/core@1.35.4(webpack@5.94.0)': dependencies: '@loadable/component': 5.16.4(react@18.3.1) '@mdx-js/loader': 2.3.0(webpack@5.94.0) @@ -6870,16 +6887,16 @@ snapshots: '@modern-js/utils': 2.60.6 '@rsbuild/core': 1.0.19 '@rsbuild/plugin-less': 1.0.3(@rsbuild/core@1.0.19) - '@rsbuild/plugin-react': 1.0.6(@rsbuild/core@1.0.19) + '@rsbuild/plugin-react': 1.0.7(@rsbuild/core@1.0.19) '@rsbuild/plugin-sass': 1.0.4(@rsbuild/core@1.0.19) '@rspress/mdx-rs': 0.6.1 - '@rspress/plugin-auto-nav-sidebar': 1.35.3 - '@rspress/plugin-container-syntax': 1.35.3 - '@rspress/plugin-last-updated': 1.35.3 - '@rspress/plugin-medium-zoom': 1.35.3(@rspress/runtime@1.35.3) - '@rspress/runtime': 1.35.3 - '@rspress/shared': 1.35.3 - '@rspress/theme-default': 1.35.3 + '@rspress/plugin-auto-nav-sidebar': 1.35.4 + '@rspress/plugin-container-syntax': 1.35.4 + '@rspress/plugin-last-updated': 1.35.4 + '@rspress/plugin-medium-zoom': 1.35.4(@rspress/runtime@1.35.4) + '@rspress/runtime': 1.35.4 + '@rspress/shared': 1.35.4 + '@rspress/theme-default': 1.35.4 body-scroll-lock: 4.0.0-beta.0 copy-to-clipboard: 3.3.3 enhanced-resolve: 5.17.1 @@ -6898,7 +6915,7 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-helmet-async: 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-lazy-with-preload: 2.2.1 - react-syntax-highlighter: 15.5.0(react@18.3.1) + react-syntax-highlighter: 15.6.1(react@18.3.1) rehype-external-links: 2.1.0 rehype-stringify: 9.0.4 remark: 14.0.3 @@ -6951,32 +6968,32 @@ snapshots: '@rspress/mdx-rs-win32-arm64-msvc': 0.6.1 '@rspress/mdx-rs-win32-x64-msvc': 0.6.1 - '@rspress/plugin-auto-nav-sidebar@1.35.3': + '@rspress/plugin-auto-nav-sidebar@1.35.4': dependencies: - '@rspress/shared': 1.35.3 + '@rspress/shared': 1.35.4 - '@rspress/plugin-container-syntax@1.35.3': + '@rspress/plugin-container-syntax@1.35.4': dependencies: - '@rspress/shared': 1.35.3 + '@rspress/shared': 1.35.4 - '@rspress/plugin-last-updated@1.35.3': + '@rspress/plugin-last-updated@1.35.4': dependencies: - '@rspress/shared': 1.35.3 + '@rspress/shared': 1.35.4 - '@rspress/plugin-medium-zoom@1.35.3(@rspress/runtime@1.35.3)': + '@rspress/plugin-medium-zoom@1.35.4(@rspress/runtime@1.35.4)': dependencies: - '@rspress/runtime': 1.35.3 + '@rspress/runtime': 1.35.4 medium-zoom: 1.1.0 - '@rspress/runtime@1.35.3': + '@rspress/runtime@1.35.4': dependencies: - '@rspress/shared': 1.35.3 + '@rspress/shared': 1.35.4 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-helmet-async: 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-router-dom: 6.27.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@rspress/shared@1.35.3': + '@rspress/shared@1.35.4': dependencies: '@rsbuild/core': 1.0.19 chalk: 5.3.0 @@ -6985,29 +7002,29 @@ snapshots: gray-matter: 4.0.3 unified: 10.1.2 - '@rspress/theme-default@1.35.3': + '@rspress/theme-default@1.35.4': dependencies: '@mdx-js/react': 2.3.0(react@18.3.1) - '@rspress/runtime': 1.35.3 - '@rspress/shared': 1.35.3 + '@rspress/runtime': 1.35.4 + '@rspress/shared': 1.35.4 body-scroll-lock: 4.0.0-beta.0 copy-to-clipboard: 3.3.3 flexsearch: 0.7.43 github-slugger: 2.0.0 hast-util-from-html: 2.0.3 html-to-text: 9.0.5 + htmlparser2: 9.1.0 htmr: 1.0.2(react@18.3.1) - is-html: 3.1.0 lodash-es: 4.17.21 nprogress: 0.2.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-helmet-async: 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react-syntax-highlighter: 15.5.0(react@18.3.1) + react-syntax-highlighter: 15.6.1(react@18.3.1) react-transition-group: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) rspack-plugin-virtual-module: 0.1.13 - '@rstack-dev/doc-ui@1.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@rstack-dev/doc-ui@1.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: framer-motion: 11.5.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) transitivePeerDependencies: @@ -7383,7 +7400,7 @@ snapshots: '@yarnpkg/lockfile@1.1.0': {} - '@yarnpkg/parsers@3.0.0-rc.46': + '@yarnpkg/parsers@3.0.2': dependencies: js-yaml: 3.14.1 tslib: 2.6.3 @@ -8796,6 +8813,8 @@ snapshots: highlight.js@10.7.3: {} + highlightjs-vue@1.0.0: {} + hmac-drbg@1.0.1: dependencies: hash.js: 1.1.7 @@ -8842,6 +8861,13 @@ snapshots: domutils: 3.1.0 entities: 4.5.0 + htmlparser2@9.1.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + entities: 4.5.0 + htmr@1.0.2(react@18.3.1): dependencies: html-entities: 2.5.2 @@ -9814,11 +9840,11 @@ snapshots: number-precision@1.6.0: {} - nx@20.0.8: + nx@20.0.11: dependencies: '@napi-rs/wasm-runtime': 0.2.4 '@yarnpkg/lockfile': 1.1.0 - '@yarnpkg/parsers': 3.0.0-rc.46 + '@yarnpkg/parsers': 3.0.2 '@zkochan/js-yaml': 0.0.7 axios: 1.7.7 chalk: 4.1.2 @@ -9849,16 +9875,16 @@ snapshots: yargs: 17.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@nx/nx-darwin-arm64': 20.0.8 - '@nx/nx-darwin-x64': 20.0.8 - '@nx/nx-freebsd-x64': 20.0.8 - '@nx/nx-linux-arm-gnueabihf': 20.0.8 - '@nx/nx-linux-arm64-gnu': 20.0.8 - '@nx/nx-linux-arm64-musl': 20.0.8 - '@nx/nx-linux-x64-gnu': 20.0.8 - '@nx/nx-linux-x64-musl': 20.0.8 - '@nx/nx-win32-arm64-msvc': 20.0.8 - '@nx/nx-win32-x64-msvc': 20.0.8 + '@nx/nx-darwin-arm64': 20.0.11 + '@nx/nx-darwin-x64': 20.0.11 + '@nx/nx-freebsd-x64': 20.0.11 + '@nx/nx-linux-arm-gnueabihf': 20.0.11 + '@nx/nx-linux-arm64-gnu': 20.0.11 + '@nx/nx-linux-arm64-musl': 20.0.11 + '@nx/nx-linux-x64-gnu': 20.0.11 + '@nx/nx-linux-x64-musl': 20.0.11 + '@nx/nx-win32-arm64-msvc': 20.0.11 + '@nx/nx-win32-x64-msvc': 20.0.11 transitivePeerDependencies: - debug @@ -10296,10 +10322,11 @@ snapshots: '@remix-run/router': 1.20.0 react: 18.3.1 - react-syntax-highlighter@15.5.0(react@18.3.1): + react-syntax-highlighter@15.6.1(react@18.3.1): dependencies: '@babel/runtime': 7.24.8 highlight.js: 10.7.3 + highlightjs-vue: 1.0.0 lowlight: 1.20.0 prismjs: 1.29.0 react: 18.3.1 @@ -10517,7 +10544,7 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.18.1 fsevents: 2.3.3 - rsbuild-plugin-dts@0.0.15(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(@rsbuild/core@1.0.19)(typescript@5.6.3): + rsbuild-plugin-dts@0.0.16(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(@rsbuild/core@1.0.19)(typescript@5.6.3): dependencies: '@rsbuild/core': 1.0.19 magic-string: 0.30.12 @@ -10539,11 +10566,11 @@ snapshots: rspress-plugin-font-open-sans@1.0.0: {} - rspress@1.35.3(webpack@5.94.0): + rspress@1.35.4(webpack@5.94.0): dependencies: '@rsbuild/core': 1.0.19 - '@rspress/core': 1.35.3(webpack@5.94.0) - '@rspress/shared': 1.35.3 + '@rspress/core': 1.35.4(webpack@5.94.0) + '@rspress/shared': 1.35.4 cac: 6.7.14 chalk: 5.3.0 chokidar: 3.6.0 diff --git a/tests/integration/asset/name/package.json b/tests/integration/asset/name/package.json index 45dc2bcf9..42b9ceb52 100644 --- a/tests/integration/asset/name/package.json +++ b/tests/integration/asset/name/package.json @@ -7,6 +7,6 @@ "react": "^18.3.1" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6" + "@rsbuild/plugin-react": "^1.0.7" } } diff --git a/tests/integration/asset/svgr/package.json b/tests/integration/asset/svgr/package.json index 5671f1819..610c2c2a4 100644 --- a/tests/integration/asset/svgr/package.json +++ b/tests/integration/asset/svgr/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rsbuild/plugin-svgr": "^1.0.5" }, "peerDependencies": { diff --git a/tests/integration/bundle-false/svgr/package.json b/tests/integration/bundle-false/svgr/package.json index 09f26b6a3..29d9daab1 100644 --- a/tests/integration/bundle-false/svgr/package.json +++ b/tests/integration/bundle-false/svgr/package.json @@ -7,7 +7,7 @@ "react": "^18.3.1" }, "devDependencies": { - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rsbuild/plugin-svgr": "^1.0.5" } } diff --git a/tests/package.json b/tests/package.json index df4976088..7a7f99a85 100644 --- a/tests/package.json +++ b/tests/package.json @@ -16,7 +16,7 @@ "@playwright/test": "1.48.2", "@rsbuild/core": "~1.0.19", "@rsbuild/plugin-less": "^1.1.0", - "@rsbuild/plugin-react": "^1.0.6", + "@rsbuild/plugin-react": "^1.0.7", "@rsbuild/plugin-sass": "^1.1.0", "@rslib/core": "workspace:*", "@rslib/tsconfig": "workspace:*", diff --git a/website/package.json b/website/package.json index 26dc83f83..32ad08f84 100644 --- a/website/package.json +++ b/website/package.json @@ -11,14 +11,14 @@ "devDependencies": { "@rsbuild/core": "~1.0.19", "@rslib/tsconfig": "workspace:*", - "@rstack-dev/doc-ui": "1.5.2", + "@rstack-dev/doc-ui": "1.5.3", "@types/node": "^22.8.1", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "react": "^18.3.1", "react-dom": "^18.3.1", "rsbuild-plugin-google-analytics": "1.0.3", - "rspress": "1.35.3", + "rspress": "1.35.4", "rspress-plugin-font-open-sans": "1.0.0" } } From 3f0c8cf068c7966f384d578128772616660855f8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 16:59:04 +0800 Subject: [PATCH 11/23] chore(deps): update dependency @rsbuild/core to ~1.1.0 (#387) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../module-federation/mf-host/package.json | 2 +- .../module-federation/mf-remote/package.json | 2 +- packages/core/package.json | 2 +- .../tools/storybook-react-js/package.json | 2 +- .../tools/storybook-react-ts/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- packages/plugin-dts/package.json | 2 +- pnpm-lock.yaml | 232 ++++++++++++++---- tests/package.json | 2 +- website/package.json | 2 +- 13 files changed, 193 insertions(+), 63 deletions(-) diff --git a/examples/module-federation/mf-host/package.json b/examples/module-federation/mf-host/package.json index 28762ab29..14a34014c 100644 --- a/examples/module-federation/mf-host/package.json +++ b/examples/module-federation/mf-host/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@module-federation/rsbuild-plugin": "^0.6.15", - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", diff --git a/examples/module-federation/mf-remote/package.json b/examples/module-federation/mf-remote/package.json index bb772bfbc..1b219f0ce 100644 --- a/examples/module-federation/mf-remote/package.json +++ b/examples/module-federation/mf-remote/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@module-federation/rsbuild-plugin": "^0.6.15", - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", diff --git a/packages/core/package.json b/packages/core/package.json index 3c2a2759c..596991949 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -37,7 +37,7 @@ "prebundle": "prebundle" }, "dependencies": { - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "rsbuild-plugin-dts": "workspace:*", "tinyglobby": "^0.2.10" }, diff --git a/packages/create-rslib/fragments/tools/storybook-react-js/package.json b/packages/create-rslib/fragments/tools/storybook-react-js/package.json index 8f6c275b3..c05a230e2 100644 --- a/packages/create-rslib/fragments/tools/storybook-react-js/package.json +++ b/packages/create-rslib/fragments/tools/storybook-react-js/package.json @@ -4,7 +4,7 @@ "storybook": "storybook dev" }, "devDependencies": { - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@storybook/addon-essentials": "^8.3.6", "@storybook/addon-interactions": "^8.3.6", "@storybook/addon-links": "^8.3.6", diff --git a/packages/create-rslib/fragments/tools/storybook-react-ts/package.json b/packages/create-rslib/fragments/tools/storybook-react-ts/package.json index 8f6c275b3..c05a230e2 100644 --- a/packages/create-rslib/fragments/tools/storybook-react-ts/package.json +++ b/packages/create-rslib/fragments/tools/storybook-react-ts/package.json @@ -4,7 +4,7 @@ "storybook": "storybook dev" }, "devDependencies": { - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@storybook/addon-essentials": "^8.3.6", "@storybook/addon-interactions": "^8.3.6", "@storybook/addon-links": "^8.3.6", diff --git a/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json b/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json index 7d303f737..fca709d62 100644 --- a/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json +++ b/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json @@ -19,7 +19,7 @@ "test": "vitest run" }, "devDependencies": { - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.3.6", diff --git a/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json b/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json index 2538c4962..81b3e567d 100644 --- a/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json +++ b/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json @@ -21,7 +21,7 @@ "test": "vitest run" }, "devDependencies": { - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.3.6", diff --git a/packages/create-rslib/template-[react]-[storybook]-js/package.json b/packages/create-rslib/template-[react]-[storybook]-js/package.json index 6942462d7..02bc64607 100644 --- a/packages/create-rslib/template-[react]-[storybook]-js/package.json +++ b/packages/create-rslib/template-[react]-[storybook]-js/package.json @@ -18,7 +18,7 @@ "storybook": "storybook dev" }, "devDependencies": { - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.3.6", diff --git a/packages/create-rslib/template-[react]-[storybook]-ts/package.json b/packages/create-rslib/template-[react]-[storybook]-ts/package.json index 85e19dc2f..9364321b9 100644 --- a/packages/create-rslib/template-[react]-[storybook]-ts/package.json +++ b/packages/create-rslib/template-[react]-[storybook]-ts/package.json @@ -20,7 +20,7 @@ "storybook": "storybook dev" }, "devDependencies": { - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@storybook/addon-essentials": "^8.3.6", diff --git a/packages/plugin-dts/package.json b/packages/plugin-dts/package.json index 13b1febe5..f0166f676 100644 --- a/packages/plugin-dts/package.json +++ b/packages/plugin-dts/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@microsoft/api-extractor": "^7.47.11", - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@rslib/tsconfig": "workspace:*", "rslib": "npm:@rslib/core@0.0.16", "typescript": "^5.6.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4142f9909..681b5c43e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -88,13 +88,13 @@ importers: devDependencies: '@module-federation/rsbuild-plugin': specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.0.19) + version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@rsbuild/core': - specifier: ~1.0.19 - version: 1.0.19 + specifier: ~1.1.0 + version: 1.1.0 '@rsbuild/plugin-react': specifier: ^1.0.7 - version: 1.0.7(@rsbuild/core@1.0.19) + version: 1.0.7(@rsbuild/core@1.1.0) '@types/react': specifier: ^18.3.12 version: 18.3.12 @@ -112,10 +112,10 @@ importers: version: 0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0) '@module-federation/rsbuild-plugin': specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.0.19) + version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@rsbuild/plugin-react': specifier: ^1.0.7 - version: 1.0.7(@rsbuild/core@1.0.19) + version: 1.0.7(@rsbuild/core@1.1.0) '@rslib/core': specifier: workspace:* version: link:../../../packages/core @@ -143,13 +143,13 @@ importers: devDependencies: '@module-federation/rsbuild-plugin': specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.0.19) + version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@rsbuild/core': - specifier: ~1.0.19 - version: 1.0.19 + specifier: ~1.1.0 + version: 1.1.0 '@rsbuild/plugin-react': specifier: ^1.0.7 - version: 1.0.7(@rsbuild/core@1.0.19) + version: 1.0.7(@rsbuild/core@1.1.0) '@types/react': specifier: ^18.3.12 version: 18.3.12 @@ -164,10 +164,10 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.0.7 - version: 1.0.7(@rsbuild/core@1.0.19) + version: 1.0.7(@rsbuild/core@1.1.0) '@rsbuild/plugin-sass': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.0.19) + version: 1.1.0(@rsbuild/core@1.1.0) '@rslib/core': specifier: workspace:* version: link:../../packages/core @@ -182,10 +182,10 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.0.7 - version: 1.0.7(@rsbuild/core@1.0.19) + version: 1.0.7(@rsbuild/core@1.1.0) '@rsbuild/plugin-sass': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.0.19) + version: 1.1.0(@rsbuild/core@1.1.0) '@rslib/core': specifier: workspace:* version: link:../../packages/core @@ -200,10 +200,10 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.0.7 - version: 1.0.7(@rsbuild/core@1.0.19) + version: 1.0.7(@rsbuild/core@1.1.0) '@rsbuild/plugin-sass': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.0.19) + version: 1.1.0(@rsbuild/core@1.1.0) '@rslib/core': specifier: workspace:* version: link:../../packages/core @@ -220,8 +220,8 @@ importers: specifier: ^7 version: 7.47.11(@types/node@22.8.1) '@rsbuild/core': - specifier: ~1.0.19 - version: 1.0.19 + specifier: ~1.1.0 + version: 1.1.0 rsbuild-plugin-dts: specifier: workspace:* version: link:../plugin-dts @@ -313,8 +313,8 @@ importers: specifier: ^7.47.11 version: 7.47.11(@types/node@22.8.1) '@rsbuild/core': - specifier: ~1.0.19 - version: 1.0.19 + specifier: ~1.1.0 + version: 1.1.0 '@rslib/tsconfig': specifier: workspace:* version: link:../../scripts/tsconfig @@ -341,22 +341,22 @@ importers: version: 3.1.1(vite@5.3.3(@types/node@22.8.1)(terser@5.31.6))(vitest@2.1.4(@types/node@22.8.1)(terser@5.31.6)) '@module-federation/rsbuild-plugin': specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.0.19) + version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@playwright/test': specifier: 1.48.2 version: 1.48.2 '@rsbuild/core': - specifier: ~1.0.19 - version: 1.0.19 + specifier: ~1.1.0 + version: 1.1.0 '@rsbuild/plugin-less': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.0.19) + version: 1.1.0(@rsbuild/core@1.1.0) '@rsbuild/plugin-react': specifier: ^1.0.7 - version: 1.0.7(@rsbuild/core@1.0.19) + version: 1.0.7(@rsbuild/core@1.1.0) '@rsbuild/plugin-sass': specifier: ^1.1.0 - version: 1.1.0(@rsbuild/core@1.0.19) + version: 1.1.0(@rsbuild/core@1.1.0) '@rslib/core': specifier: workspace:* version: link:../packages/core @@ -415,7 +415,7 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.0.7 - version: 1.0.7(@rsbuild/core@1.0.19) + version: 1.0.7(@rsbuild/core@1.1.0) tests/integration/asset/path: {} @@ -429,10 +429,10 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.0.7 - version: 1.0.7(@rsbuild/core@1.0.19) + version: 1.0.7(@rsbuild/core@1.1.0) '@rsbuild/plugin-svgr': specifier: ^1.0.5 - version: 1.0.5(@rsbuild/core@1.0.19)(typescript@5.6.3) + version: 1.0.5(@rsbuild/core@1.1.0)(typescript@5.6.3) tests/integration/async-chunks/default: {} @@ -502,10 +502,10 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^1.0.7 - version: 1.0.7(@rsbuild/core@1.0.19) + version: 1.0.7(@rsbuild/core@1.1.0) '@rsbuild/plugin-svgr': specifier: ^1.0.5 - version: 1.0.5(@rsbuild/core@1.0.19)(typescript@5.6.3) + version: 1.0.5(@rsbuild/core@1.1.0)(typescript@5.6.3) tests/integration/cli: {} @@ -599,7 +599,7 @@ importers: devDependencies: '@rsbuild/plugin-node-polyfill': specifier: ^1.2.0 - version: 1.2.0(@rsbuild/core@1.0.19) + version: 1.2.0(@rsbuild/core@1.1.0) tests/integration/node-polyfill/bundle-false: dependencies: @@ -609,7 +609,7 @@ importers: devDependencies: '@rsbuild/plugin-node-polyfill': specifier: ^1.2.0 - version: 1.2.0(@rsbuild/core@1.0.19) + version: 1.2.0(@rsbuild/core@1.1.0) tests/integration/require/import-dynamic: {} @@ -733,8 +733,8 @@ importers: website: devDependencies: '@rsbuild/core': - specifier: ~1.0.19 - version: 1.0.19 + specifier: ~1.1.0 + version: 1.1.0 '@rslib/tsconfig': specifier: workspace:* version: link:../scripts/tsconfig @@ -758,7 +758,7 @@ importers: version: 18.3.1(react@18.3.1) rsbuild-plugin-google-analytics: specifier: 1.0.3 - version: 1.0.3(@rsbuild/core@1.0.19) + version: 1.0.3(@rsbuild/core@1.1.0) rspress: specifier: 1.35.4 version: 1.35.4(webpack@5.94.0) @@ -1619,6 +1619,11 @@ packages: engines: {node: '>=16.7.0'} hasBin: true + '@rsbuild/core@1.1.0': + resolution: {integrity: sha512-SyQlJjWgR1VwLt4nuiY0g6L9INv2koH232TeDZuopvNgbRytskD3kJ8bbGWBBXsQjZjtqBEh5ishqf8CIfF8dQ==} + engines: {node: '>=16.7.0'} + hasBin: true + '@rsbuild/plugin-less@1.0.3': resolution: {integrity: sha512-lz/u0C7Cj/sUO0WuwxJR976BLUxFy/mzT9fZOK/G6ceTuhUd1rEQw4FAPuOefhgkDxfqpJ4ZjliVfpm+n4CjyQ==} peerDependencies: @@ -1685,6 +1690,11 @@ packages: cpu: [arm64] os: [darwin] + '@rspack/binding-darwin-arm64@1.1.0': + resolution: {integrity: sha512-02YmzmtKMNHCSMzVT5sgbJuPDn+HunkrtWq0D95Fh9sGKYap9cs0JOpzTfyAL3KXJ9JzVfOAZA3VgVQOBaQNWQ==} + cpu: [arm64] + os: [darwin] + '@rspack/binding-darwin-x64@1.0.14': resolution: {integrity: sha512-q4Da1Bn/4xTLhhnOkT+fjP2STsSCfp4z03/J/h8tCVG/UYz56Ud3q1UEOK33c5Fxw1C4GlhEh5yYOlSAdxFQLQ==} cpu: [x64] @@ -1695,6 +1705,11 @@ packages: cpu: [x64] os: [darwin] + '@rspack/binding-darwin-x64@1.1.0': + resolution: {integrity: sha512-HtBh8p6hml7BWNtZaqWFtGbOFP/tvFDn1uPWmA3R32WTILUXNRWXIsLDY95U3Z2U1Gt3SL58SOpJjXlFIb6wZg==} + cpu: [x64] + os: [darwin] + '@rspack/binding-linux-arm64-gnu@1.0.14': resolution: {integrity: sha512-JogYtL3VQS9wJ3p3FNhDqinm7avrMsdwz4erP7YCjD7idob93GYAE7dPrHUzSNVnCBYXRaHJYZHDQs7lKVcYZw==} cpu: [arm64] @@ -1705,6 +1720,11 @@ packages: cpu: [arm64] os: [linux] + '@rspack/binding-linux-arm64-gnu@1.1.0': + resolution: {integrity: sha512-Q/i50Pieii3akdv5Q6my6QelV5Dpc8O/Ir4udpjYl0pbSdKamdI8M85fxrMxGAGcoNSD+X52fDvxJujXWMcP0w==} + cpu: [arm64] + os: [linux] + '@rspack/binding-linux-arm64-musl@1.0.14': resolution: {integrity: sha512-qgybhxI/nnoa8CUz7zKTC0Oh37NZt9uRxsSV7+ZYrfxqbrVCoNVuutPpY724uUHy1M6W34kVEm1uT1N4Ka5cZg==} cpu: [arm64] @@ -1715,6 +1735,11 @@ packages: cpu: [arm64] os: [linux] + '@rspack/binding-linux-arm64-musl@1.1.0': + resolution: {integrity: sha512-H7Eu3xC7LWPpxrI47n8X361eEGGpQOjZIWTz8tLdn4oNS2D9kqsBYES7LsuuLTTH4ueHTDuEtDdfZpBsE+qesw==} + cpu: [arm64] + os: [linux] + '@rspack/binding-linux-x64-gnu@1.0.14': resolution: {integrity: sha512-5vzaDRw3/sGKo3ax/1cU3/cxqNjajwlt2LU288vXNe1/n8oe/pcDfYcTugpOe/A1DqzadanudJszLpFcKsaFtQ==} cpu: [x64] @@ -1725,6 +1750,11 @@ packages: cpu: [x64] os: [linux] + '@rspack/binding-linux-x64-gnu@1.1.0': + resolution: {integrity: sha512-dIZSutPo2z/OaO2f6SVlcYA6lGBH+4TrRtWmMyPshpTNPrkCGGfDhC43fZ4jCiUj2PO/Hcn8jyKhci4leBsVBA==} + cpu: [x64] + os: [linux] + '@rspack/binding-linux-x64-musl@1.0.14': resolution: {integrity: sha512-4U6QD9xVS1eGme52DuJr6Fg/KdcUfJ+iKwH49Up460dZ/fLvGylnVGA+V0mzPlKi8gfy7NwFuYXZdu3Pwi1YYg==} cpu: [x64] @@ -1735,6 +1765,11 @@ packages: cpu: [x64] os: [linux] + '@rspack/binding-linux-x64-musl@1.1.0': + resolution: {integrity: sha512-f6L2JWgbG9PKWnVw2YNZdntjzia1V2w2Xq458HkCQUDwhnEipWXaZ2zhfD9jcb4UYoMP8/2uD3B96sSFFNTdrQ==} + cpu: [x64] + os: [linux] + '@rspack/binding-win32-arm64-msvc@1.0.14': resolution: {integrity: sha512-SjeYw7qqRHYZ5RPClu+ffKZsShQdU3amA1OwC3M0AS6dbfEcji8482St3Y8Z+QSzYRapCEZij9LMM/9ypEhISg==} cpu: [arm64] @@ -1745,6 +1780,11 @@ packages: cpu: [arm64] os: [win32] + '@rspack/binding-win32-arm64-msvc@1.1.0': + resolution: {integrity: sha512-opo6XR4iXh/QkHiauVQBlU2xR2JyjDmSwgkION27oszu81nr+IajTSXQX96x5I6Bq48GQLU4rItHse/doctQDA==} + cpu: [arm64] + os: [win32] + '@rspack/binding-win32-ia32-msvc@1.0.14': resolution: {integrity: sha512-m1gUiVyz3Z3VYIK/Ayo5CVHBjnEeRk9a+KIpKSsq1yhZItnMgjtr4bKabU9vjxalO4UoaSmVzODJI8lJBlnn5Q==} cpu: [ia32] @@ -1755,6 +1795,11 @@ packages: cpu: [ia32] os: [win32] + '@rspack/binding-win32-ia32-msvc@1.1.0': + resolution: {integrity: sha512-FBcG+OPJokSE3nPi1+ZamLK2V4IWdNC+GMr0z7LUrBiKc5lO70y5VkldfyPV1Z+doSuroVINlhK+lRHdQgGwYg==} + cpu: [ia32] + os: [win32] + '@rspack/binding-win32-x64-msvc@1.0.14': resolution: {integrity: sha512-Gbeg+bayMF9VP9xmlxySL/TC2XrS6/LZM/pqcNOTLHx6LMG/VXCcmKB0rOZo8MzLXEt8D/lQmQ/B6g7pSaAw0g==} cpu: [x64] @@ -1765,12 +1810,20 @@ packages: cpu: [x64] os: [win32] + '@rspack/binding-win32-x64-msvc@1.1.0': + resolution: {integrity: sha512-H/6Glp1nZvxWAD5+2hRrp1kBs9f+pLb/un2TdFSUNd2tyXq5GyHCe70+N9psbe/jjGxD8e1vPNQtN/VvkuR0Zg==} + cpu: [x64] + os: [win32] + '@rspack/binding@1.0.14': resolution: {integrity: sha512-0wWqFvr9hkF4LgNPgWfkTU0hhkZAMvOytoCs2p+wDX1Up1E/SgJ1U1JAsCxsl1XtUKm7mRvdWHzJmHbza3y89Q==} '@rspack/binding@1.0.8': resolution: {integrity: sha512-abRirbrjobcllLAamyeiWxT6Rb0wELUnITynQdqRbSweWm2lvnhm9YBv4BcOjvJBzhJtvRJo5JBtbKXjDTarug==} + '@rspack/binding@1.1.0': + resolution: {integrity: sha512-zLduWacrw/bBYiFvhjN70f+AJxXnTzevywXp54vso8d0Nz7z4KIycdz/Ua5AGRUkG2ZuQw6waypN5pXf48EBcA==} + '@rspack/core@1.0.14': resolution: {integrity: sha512-xHl23lxJZNjItGc5YuE9alz3yjb56y7EgJmAcBMPHMqgjtUt8rBu4xd/cSUjbr9/lLF9N4hdyoJiPJOFs9LEjw==} engines: {node: '>=16.0.0'} @@ -1789,6 +1842,15 @@ packages: '@swc/helpers': optional: true + '@rspack/core@1.1.0': + resolution: {integrity: sha512-+IYWSe9D3wB97VVBfaojuWLv3wGIBe9pfJkxNObkorN60Nj3UHYzBLuACrHn4hW2mZjAWrv06ReHXJUEGzQqaQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true + '@rspack/lite-tapable@1.0.1': resolution: {integrity: sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==} engines: {node: '>=16.0.0'} @@ -2682,6 +2744,9 @@ packages: core-js@3.38.1: resolution: {integrity: sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==} + core-js@3.39.0: + resolution: {integrity: sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==} + core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} @@ -6503,11 +6568,11 @@ snapshots: - utf-8-validate - vue-tsc - '@module-federation/rsbuild-plugin@0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.0.19)': + '@module-federation/rsbuild-plugin@0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0)': dependencies: '@module-federation/enhanced': 0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0) '@module-federation/sdk': 0.6.15 - '@rsbuild/core': 1.0.19 + '@rsbuild/core': 1.1.0 '@module-federation/rspack@0.6.15(typescript@5.6.3)': dependencies: @@ -6681,19 +6746,28 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + '@rsbuild/core@1.1.0': + dependencies: + '@rspack/core': 1.1.0(@swc/helpers@0.5.13) + '@rspack/lite-tapable': 1.0.1 + '@swc/helpers': 0.5.13 + core-js: 3.39.0 + optionalDependencies: + fsevents: 2.3.3 + '@rsbuild/plugin-less@1.0.3(@rsbuild/core@1.0.19)': dependencies: '@rsbuild/core': 1.0.19 deepmerge: 4.3.1 reduce-configs: 1.0.0 - '@rsbuild/plugin-less@1.1.0(@rsbuild/core@1.0.19)': + '@rsbuild/plugin-less@1.1.0(@rsbuild/core@1.1.0)': dependencies: - '@rsbuild/core': 1.0.19 + '@rsbuild/core': 1.1.0 deepmerge: 4.3.1 reduce-configs: 1.0.0 - '@rsbuild/plugin-node-polyfill@1.2.0(@rsbuild/core@1.0.19)': + '@rsbuild/plugin-node-polyfill@1.2.0(@rsbuild/core@1.1.0)': dependencies: assert: 2.1.0 browserify-zlib: 0.2.0 @@ -6719,11 +6793,11 @@ snapshots: util: 0.12.5 vm-browserify: 1.1.2 optionalDependencies: - '@rsbuild/core': 1.0.19 + '@rsbuild/core': 1.1.0 - '@rsbuild/plugin-react@1.0.6(@rsbuild/core@1.0.19)': + '@rsbuild/plugin-react@1.0.6(@rsbuild/core@1.1.0)': dependencies: - '@rsbuild/core': 1.0.19 + '@rsbuild/core': 1.1.0 '@rspack/plugin-react-refresh': 1.0.0(react-refresh@0.14.2) react-refresh: 0.14.2 @@ -6733,6 +6807,12 @@ snapshots: '@rspack/plugin-react-refresh': 1.0.0(react-refresh@0.14.2) react-refresh: 0.14.2 + '@rsbuild/plugin-react@1.0.7(@rsbuild/core@1.1.0)': + dependencies: + '@rsbuild/core': 1.1.0 + '@rspack/plugin-react-refresh': 1.0.0(react-refresh@0.14.2) + react-refresh: 0.14.2 + '@rsbuild/plugin-sass@1.0.4(@rsbuild/core@1.0.19)': dependencies: '@rsbuild/core': 1.0.19 @@ -6742,19 +6822,19 @@ snapshots: reduce-configs: 1.0.0 sass-embedded: 1.80.5 - '@rsbuild/plugin-sass@1.1.0(@rsbuild/core@1.0.19)': + '@rsbuild/plugin-sass@1.1.0(@rsbuild/core@1.1.0)': dependencies: - '@rsbuild/core': 1.0.19 + '@rsbuild/core': 1.1.0 deepmerge: 4.3.1 loader-utils: 2.0.4 postcss: 8.4.47 reduce-configs: 1.0.0 sass-embedded: 1.80.5 - '@rsbuild/plugin-svgr@1.0.5(@rsbuild/core@1.0.19)(typescript@5.6.3)': + '@rsbuild/plugin-svgr@1.0.5(@rsbuild/core@1.1.0)(typescript@5.6.3)': dependencies: - '@rsbuild/core': 1.0.19 - '@rsbuild/plugin-react': 1.0.6(@rsbuild/core@1.0.19) + '@rsbuild/core': 1.1.0 + '@rsbuild/plugin-react': 1.0.6(@rsbuild/core@1.1.0) '@svgr/core': 8.1.0(typescript@5.6.3) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.6.3)) '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.6.3))(typescript@5.6.3) @@ -6779,54 +6859,81 @@ snapshots: '@rspack/binding-darwin-arm64@1.0.8': optional: true + '@rspack/binding-darwin-arm64@1.1.0': + optional: true + '@rspack/binding-darwin-x64@1.0.14': optional: true '@rspack/binding-darwin-x64@1.0.8': optional: true + '@rspack/binding-darwin-x64@1.1.0': + optional: true + '@rspack/binding-linux-arm64-gnu@1.0.14': optional: true '@rspack/binding-linux-arm64-gnu@1.0.8': optional: true + '@rspack/binding-linux-arm64-gnu@1.1.0': + optional: true + '@rspack/binding-linux-arm64-musl@1.0.14': optional: true '@rspack/binding-linux-arm64-musl@1.0.8': optional: true + '@rspack/binding-linux-arm64-musl@1.1.0': + optional: true + '@rspack/binding-linux-x64-gnu@1.0.14': optional: true '@rspack/binding-linux-x64-gnu@1.0.8': optional: true + '@rspack/binding-linux-x64-gnu@1.1.0': + optional: true + '@rspack/binding-linux-x64-musl@1.0.14': optional: true '@rspack/binding-linux-x64-musl@1.0.8': optional: true + '@rspack/binding-linux-x64-musl@1.1.0': + optional: true + '@rspack/binding-win32-arm64-msvc@1.0.14': optional: true '@rspack/binding-win32-arm64-msvc@1.0.8': optional: true + '@rspack/binding-win32-arm64-msvc@1.1.0': + optional: true + '@rspack/binding-win32-ia32-msvc@1.0.14': optional: true '@rspack/binding-win32-ia32-msvc@1.0.8': optional: true + '@rspack/binding-win32-ia32-msvc@1.1.0': + optional: true + '@rspack/binding-win32-x64-msvc@1.0.14': optional: true '@rspack/binding-win32-x64-msvc@1.0.8': optional: true + '@rspack/binding-win32-x64-msvc@1.1.0': + optional: true + '@rspack/binding@1.0.14': optionalDependencies: '@rspack/binding-darwin-arm64': 1.0.14 @@ -6851,6 +6958,18 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 1.0.8 '@rspack/binding-win32-x64-msvc': 1.0.8 + '@rspack/binding@1.1.0': + optionalDependencies: + '@rspack/binding-darwin-arm64': 1.1.0 + '@rspack/binding-darwin-x64': 1.1.0 + '@rspack/binding-linux-arm64-gnu': 1.1.0 + '@rspack/binding-linux-arm64-musl': 1.1.0 + '@rspack/binding-linux-x64-gnu': 1.1.0 + '@rspack/binding-linux-x64-musl': 1.1.0 + '@rspack/binding-win32-arm64-msvc': 1.1.0 + '@rspack/binding-win32-ia32-msvc': 1.1.0 + '@rspack/binding-win32-x64-msvc': 1.1.0 + '@rspack/core@1.0.14(@swc/helpers@0.5.13)': dependencies: '@module-federation/runtime-tools': 0.5.1 @@ -6869,6 +6988,15 @@ snapshots: optionalDependencies: '@swc/helpers': 0.5.13 + '@rspack/core@1.1.0(@swc/helpers@0.5.13)': + dependencies: + '@module-federation/runtime-tools': 0.5.1 + '@rspack/binding': 1.1.0 + '@rspack/lite-tapable': 1.0.1 + caniuse-lite: 1.0.30001663 + optionalDependencies: + '@swc/helpers': 0.5.13 + '@rspack/lite-tapable@1.0.1': {} '@rspack/plugin-react-refresh@1.0.0(react-refresh@0.14.2)': @@ -7890,6 +8018,8 @@ snapshots: core-js@3.38.1: {} + core-js@3.39.0: {} + core-util-is@1.0.3: {} corser@2.0.1: {} @@ -10554,9 +10684,9 @@ snapshots: '@microsoft/api-extractor': 7.47.11(@types/node@22.8.1) typescript: 5.6.3 - rsbuild-plugin-google-analytics@1.0.3(@rsbuild/core@1.0.19): + rsbuild-plugin-google-analytics@1.0.3(@rsbuild/core@1.1.0): optionalDependencies: - '@rsbuild/core': 1.0.19 + '@rsbuild/core': 1.1.0 rslog@1.2.3: {} diff --git a/tests/package.json b/tests/package.json index 7a7f99a85..5aba48f4c 100644 --- a/tests/package.json +++ b/tests/package.json @@ -14,7 +14,7 @@ "@codspeed/vitest-plugin": "^3.1.1", "@module-federation/rsbuild-plugin": "^0.6.15", "@playwright/test": "1.48.2", - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-less": "^1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@rsbuild/plugin-sass": "^1.1.0", diff --git a/website/package.json b/website/package.json index 32ad08f84..e0dd2f772 100644 --- a/website/package.json +++ b/website/package.json @@ -9,7 +9,7 @@ "preview": "rspress preview" }, "devDependencies": { - "@rsbuild/core": "~1.0.19", + "@rsbuild/core": "~1.1.0", "@rslib/tsconfig": "workspace:*", "@rstack-dev/doc-ui": "1.5.3", "@types/node": "^22.8.1", From ce4dea9c12b70c58b2cc0dd75f6b19933e2d1339 Mon Sep 17 00:00:00 2001 From: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> Date: Fri, 8 Nov 2024 17:34:58 +0800 Subject: [PATCH 12/23] docs: add redirect/syntax/externalHelpers/banner/footer/umdName lib config (#383) --- packages/core/src/types/config/index.ts | 7 +- website/docs/en/config/lib/auto-external.mdx | 14 ++- website/docs/en/config/lib/banner.mdx | 59 ++++++++++ .../docs/en/config/lib/external-helpers.mdx | 106 +++++++++++++++++- website/docs/en/config/lib/footer.mdx | 60 ++++++++++ website/docs/en/config/lib/redirect.mdx | 38 ++++++- website/docs/en/config/lib/shims.mdx | 10 +- website/docs/en/config/lib/syntax.mdx | 43 +++++++ website/docs/en/config/lib/umd-name.mdx | 23 +++- 9 files changed, 343 insertions(+), 17 deletions(-) diff --git a/packages/core/src/types/config/index.ts b/packages/core/src/types/config/index.ts index e9d9c3997..8aafb14ae 100644 --- a/packages/core/src/types/config/index.ts +++ b/packages/core/src/types/config/index.ts @@ -88,17 +88,18 @@ export interface LibConfig extends RsbuildConfig { */ autoExtension?: boolean; /** - * Whether to automatically externalize dependencies and do not bundle them. + * Whether to automatically externalize dependencies of different dependency types and do not bundle them. * @default true */ autoExternal?: AutoExternal; /** - * Configure the redirect of the import paths. + * Configure the redirect of the import paths, applicable when `bundle: false`. * @default {} */ redirect?: Redirect; /** - * Support esX and browserslist query + * Configure the syntax to which JavaScript and CSS will be downgraded. + * Support ECMAScript version and browserslist query. * @default 'esnext' */ syntax?: Syntax; diff --git a/website/docs/en/config/lib/auto-external.mdx b/website/docs/en/config/lib/auto-external.mdx index a977304ab..a2f78b924 100644 --- a/website/docs/en/config/lib/auto-external.mdx +++ b/website/docs/en/config/lib/auto-external.mdx @@ -15,30 +15,32 @@ type AutoExternal = - **Default:** `true` -Whether to automatically externalize dependencies and do not bundle them. +Whether to automatically externalize dependencies of different dependency types and do not bundle them. -## autoExternal.dependencies +## Object Type + +### autoExternal.dependencies - **Type:** `boolean` - **Default:** `true` Whether to externalize dependencies of type `dependencies`. -## autoExternal.optionalDependencies +### autoExternal.optionalDependencies - **Type:** `boolean` - **Default:** `true` Whether to externalize dependencies of type `optionalDependencies`. -## autoExternal.peerDependencies +### autoExternal.peerDependencies - **Type:** `boolean` - **Default:** `true` Whether to externalize dependencies of type `peerDependencies`. -## autoExternal.devDependencies +### autoExternal.devDependencies - **Type:** `boolean` - **Default:** `false` @@ -57,7 +59,7 @@ And the following dependency types will be **bundled**: - `devDependencies` -It is equivalent to the following configuration: +This configuration is equivalent to the following object type: ```ts export default { diff --git a/website/docs/en/config/lib/banner.mdx b/website/docs/en/config/lib/banner.mdx index 2ec15a83c..04832d619 100644 --- a/website/docs/en/config/lib/banner.mdx +++ b/website/docs/en/config/lib/banner.mdx @@ -13,3 +13,62 @@ type Banner = { - **Default:** `{}` Inject content into the top of each JS, CSS or DTS file. + +## Object Type + +### banner.js + +- **Type:** `string` +- **Default:** `undefined` + +Inject content into the top of each JS file. + +### banner.css + +- **Type:** `string` +- **Default:** `undefined` + +Inject content into the top of each CSS file. + +### banner.dts + +- **Type:** `string` +- **Default:** `undefined` + +Inject content into the top of each DTS file. + +## Notice + +The banner content in JS/CSS file is based on the [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) of Rspack. You should notice the following points: + +- `raw: true` is enabled by default, so the banner content will be injected as a raw string instead of wrapping in a comment. So if you want to inject a comment, you should add `/*` and `*/` or other comment syntax by yourself. +- The `stage` option is set to the stage after the JavaScript and CSS files are optimized, thus preventing the banner content from being optimized away. + +## Customize Banner Content + +If the above default settings cannot meet your requirements, you can customize the banner content through `tools.rspack.plugins` to add a [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) instance with the corresponding options. + +```ts title="rslib.config.ts" +export default { + lib: [ + { + // ... + tools: { + rspack: { + plugins: [ + new rspack.BannerPlugin({ + // ... options + }), + ], + }, + }, + }, + ], +}; +``` + +:::warning + +The banner content in DTS files is handled differently from JS/CSS files. It is written directly using the file system API, so setting `BannerPlugin` will not affect it. + +::: diff --git a/website/docs/en/config/lib/external-helpers.mdx b/website/docs/en/config/lib/external-helpers.mdx index 2255aebaf..776137f30 100644 --- a/website/docs/en/config/lib/external-helpers.mdx +++ b/website/docs/en/config/lib/external-helpers.mdx @@ -3,4 +3,108 @@ - **Type:** `boolean` - **Default:** `false` -Whether to import SWC helper functions from `@swc/helpers` instead of inlining them. +Whether to import SWC helper functions from [@swc/helpers](https://www.npmjs.com/package/@swc/helpers) instead of inlining them. + +By default, the output JavaScript file may depend on helper functions to support the target environment or output format, and these helper functions will be inlined in the file that requires it. + +When `externalHelpers` set to `true`, the output JavaScript will import helper functions from the external module `@swc/helpers`. + +::: note + +Make sure to declare the `@swc/helpers` in `dependencies` field of `package.json`. + +::: + +## Example + +Take the following code as an example: + +```ts title="index.ts" +export default class FOO { + get bar() { + return; + } +} +``` + +When `externalHelpers` is disabled, the output JavaScript will inline helper functions. + +```ts title="rslib.config.ts" {6} +export default { + lib: [ + // ... + syntax: 'es5' + ], + externalHelpers: false, +}; +``` + +Below is the output JavaScript file: + +```js title="index.js" +function _class_call_check(instance, Constructor) { + if (!(instance instanceof Constructor)) + throw new TypeError('Cannot call a class as a function'); +} +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function _create_class(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} +var src_FOO = /*#__PURE__*/ (function () { + 'use strict'; + function FOO() { + _class_call_check(this, FOO); + } + _create_class(FOO, [ + { + key: 'bar', + get: function () {}, + }, + ]); + return FOO; +})(); +export { src_FOO as default }; +``` + +When `externalHelpers` is enabled, the output JavaScript will import helper functions from the external module `@swc/helpers`. + +```ts title="rslib.config.ts" {6} +export default { + lib: [ + // ... + syntax: 'es5' + ], + externalHelpers: true, +}; +``` + +Below is the output JavaScript file: + +```js title="index.js" {1-2} +import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check__ from '@swc/helpers/_/_class_call_check'; +import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class__ from '@swc/helpers/_/_create_class'; +var src_FOO = /*#__PURE__*/ (function () { + 'use strict'; + function FOO() { + (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check__._)(this, FOO); + } + (0, __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class__._)(FOO, [ + { + key: 'bar', + get: function () {}, + }, + ]); + return FOO; +})(); +export { src_FOO as default }; +``` diff --git a/website/docs/en/config/lib/footer.mdx b/website/docs/en/config/lib/footer.mdx index d0b016d9b..33f8f059e 100644 --- a/website/docs/en/config/lib/footer.mdx +++ b/website/docs/en/config/lib/footer.mdx @@ -13,3 +13,63 @@ type Footer = { - **Default:** `{}` Inject content into the bottom of each JS, CSS or DTS file. + +## Object Type + +### footer.js + +- **Type:** `string` +- **Default:** `undefined` + +Inject content into the bottom of each JS file. + +### footer.css + +- **Type:** `string` +- **Default:** `undefined` + +Inject content into the bottom of each CSS file. + +### footer.dts + +- **Type:** `string` +- **Default:** `undefined` + +Inject content into the bottom of each DTS file. + +## Notice + +The footer content in JS/CSS file is based on the [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) of Rspack. You should notice the following points: + +- `raw: true` is enabled by default, so the footer content will be injected as a raw string instead of wrapping in a comment. So if you want to inject a comment, you should add `/*` and `*/` or other comment syntax by yourself. +- The `stage` option is set to the stage after the JavaScript and CSS files are optimized, thus preventing the footer content from being optimized away. + +## Customize Footer Content + +If the above default settings cannot meet your requirements, you can customize the footer content through `tools.rspack.plugins` to add a [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) instance with the corresponding options. + +```ts title="rslib.config.ts" +export default { + lib: [ + { + // ... + tools: { + rspack: { + plugins: [ + new rspack.BannerPlugin({ + footer: true, + // ... options + }), + ], + }, + }, + }, + ], +}; +``` + +:::warning + +The footer content in DTS files is handled differently from JS/CSS files. It is written directly using the file system API, so setting `BannerPlugin` will not affect it. + +::: diff --git a/website/docs/en/config/lib/redirect.mdx b/website/docs/en/config/lib/redirect.mdx index 124252e88..5b1ebdc58 100644 --- a/website/docs/en/config/lib/redirect.mdx +++ b/website/docs/en/config/lib/redirect.mdx @@ -8,6 +8,42 @@ type Redirect = { }; ``` -- **Default:** `{}` +- **Default:** + +```ts +const defaultRedirect = { + style: true, +}; +``` Configure the redirect of the import paths. + +When `bundle: false`, the import path is redirected to ensure that it points to the correct output. + +:::note + +As bundleless mode is still under development, additional redirect configurations will be introduced in the future. + +::: + +If you don't need these redirects, you can turn it off, and its import path will not be changed. + +```ts title="rslib.config.ts" +export default { + lib: [ + // .. + ], + redirect: { + style: false, // Turn off the redirect of the style file + }, +}; +``` + +## redirect.style + +- **Type:** `boolean` +- **Default:** `true` + +Whether to redirect the import path of the style file. For example: + +- `import './index.less'` will be rewritten to `import './index.css'` diff --git a/website/docs/en/config/lib/shims.mdx b/website/docs/en/config/lib/shims.mdx index 344840f3c..bd4994d02 100644 --- a/website/docs/en/config/lib/shims.mdx +++ b/website/docs/en/config/lib/shims.mdx @@ -34,7 +34,7 @@ const defaultShims = { }; ``` -Used to configure the shims for CommonJS and ESM output. +Configure the shims for CommonJS and ESM output. ## shims.cjs @@ -46,7 +46,7 @@ Set the fields to `true` to enable the corresponding shims for CommonJS output. Options: -- `true`: when `format` is `cjs`, the `import.meta.url` in source code will be replaced with the URL of the current module. +- `true`: when [format](/config/lib/format) is `cjs`, the `import.meta.url` in source code will be replaced with the URL of the current module. For example, given the following source code: @@ -88,7 +88,7 @@ Whether to shim the global `__filename` of CommonJS in ESM output. Options: -- `true`: when `format` is `esm`, the `__filename` in source code will be replaced with the filename of the current module. +- `true`: when [format](/config/lib/format) is `esm`, the `__filename` in source code will be replaced with the filename of the current module. For example, given the following source code: @@ -118,7 +118,7 @@ Whether to shim the global `__dirname` of CommonJS in ESM output. Options: -- `true`: when `format` is `esm`, the `__dirname` in source code will be replaced with the directory name of the current module. +- `true`: when [format](/config/lib/format) is `esm`, the `__dirname` in source code will be replaced with the directory name of the current module. For example, given the following source code: @@ -147,7 +147,7 @@ Whether to shim the global `require` of CommonJS in ESM output. Options: -- `true`: when `format` is `esm`, there will be a `require` that created by `createRequire` at the beginning of the output which can be accessed in source code like the global `require` like CommonJS. +- `true`: when [format](/config/lib/format) is `esm`, there will be a `require` that created by `createRequire` at the beginning of the output which can be accessed in source code like the global `require` like CommonJS. For example, given the following source code: diff --git a/website/docs/en/config/lib/syntax.mdx b/website/docs/en/config/lib/syntax.mdx index ed261f76b..fff84631c 100644 --- a/website/docs/en/config/lib/syntax.mdx +++ b/website/docs/en/config/lib/syntax.mdx @@ -22,3 +22,46 @@ type Syntax = EcmaScriptVersion | string[]; ``` - **Default:** `'esnext'` + +Configure the syntax to which JavaScript and CSS will be downgraded. + +See [Output Compatibility - Syntax Downgrade](/guide/advanced/output-compatibility) for more details. + +## Set ECMAScript Version + +You can set the ECMAScript version directly, such as `es2015`, `es2022`, etc. + +```ts title="rslib.config.ts" +export default { + lib: [ + // ... + ], + syntax: 'es2015', +}; +``` + +## Set Browserslist Query + +You can also set the Browserslist query, such as `last 2 versions`, `> 1%`, `node >= 16`, `chrome >= 80`, etc. + +```ts title="rslib.config.ts" +export default { + lib: [ + // ... + ], + syntax: ['last 2 versions', '> 1%'], +}; +``` + +## Mix ECMAScript Version and Browserslist Query + +You can also mix ECMAScript version and Browserslist query, such as `es2015` and `node 20`. We will turn ECMAScript Version into Browserslist query, and then merge them together. + +```ts title="rslib.config.ts" +export default { + lib: [ + // ... + ], + syntax: ['es2015', 'node 20'], +}; +``` diff --git a/website/docs/en/config/lib/umd-name.mdx b/website/docs/en/config/lib/umd-name.mdx index 016507d84..103a76e08 100644 --- a/website/docs/en/config/lib/umd-name.mdx +++ b/website/docs/en/config/lib/umd-name.mdx @@ -3,4 +3,25 @@ - **Type:** `string` - **Default:** `undefined` -The export name of the UMD bundle. +The export name of the [UMD](/guide/basic/output-format#umd) bundle. + +:::tip + +The module name of the UMD bundle must not conflict with the global variable name. + +::: + +## Example + +The UMD bundle will be mounted to `global.MyLibrary`. + +```ts title="rslib.config.ts" {5} +export default { + lib: [ + { + format: 'umd', + umdName: 'MyLibrary', + }, + ], +}; +``` From 8bee0650b4ddf4ac5185969073081dadd05a7ce6 Mon Sep 17 00:00:00 2001 From: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> Date: Fri, 8 Nov 2024 22:38:49 +0800 Subject: [PATCH 13/23] fix: rootDir calculation should ignore declaration files (#389) --- packages/plugin-dts/src/dts.ts | 10 ++++- pnpm-lock.yaml | 38 +++++++++++++++++ scripts/dictionary.txt | 1 + .../dts/__snapshots__/index.test.ts.snap | 41 +++++++++++++++++++ .../dts/bundle/rootdir/package.json | 9 ++++ .../dts/bundle/rootdir/rslib.config.ts | 22 ++++++++++ .../dts/bundle/rootdir/tsconfig.json | 4 ++ tests/integration/dts/index.test.ts | 22 ++++++++++ 8 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 tests/integration/dts/bundle/rootdir/package.json create mode 100644 tests/integration/dts/bundle/rootdir/rslib.config.ts create mode 100644 tests/integration/dts/bundle/rootdir/tsconfig.json diff --git a/packages/plugin-dts/src/dts.ts b/packages/plugin-dts/src/dts.ts index 4759c0b46..32893d4ce 100644 --- a/packages/plugin-dts/src/dts.ts +++ b/packages/plugin-dts/src/dts.ts @@ -133,9 +133,17 @@ export async function generateDts(data: DtsGenOptions): Promise { throw new Error(); } const { options: rawCompilerOptions, fileNames } = loadTsconfig(configPath); + + // The longest common path of all non-declaration input files. + // If composite is set, the default is instead the directory containing the tsconfig.json file. + // see https://www.typescriptlang.org/tsconfig/#rootDir const rootDir = rawCompilerOptions.rootDir ?? - (await calcLongestCommonPath(fileNames)) ?? + (rawCompilerOptions.composite + ? dirname(configPath) + : await calcLongestCommonPath( + fileNames.filter((fileName) => !/\.d\.(ts|mts|cts)$/.test(fileName)), + )) ?? dirname(configPath); const outDir = distPath diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 681b5c43e..f0e0ae3d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -543,6 +543,12 @@ importers: tests/integration/dts/bundle/false: {} + tests/integration/dts/bundle/rootdir: + devDependencies: + '@types/chromecast-caf-sender': + specifier: ^1.0.10 + version: 1.0.10 + tests/integration/dts/bundle/true: {} tests/integration/dts/composite/__references__: {} @@ -2072,6 +2078,12 @@ packages: '@types/body-parser@1.19.5': resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} + '@types/chrome@0.0.280': + resolution: {integrity: sha512-AotSmZrL9bcZDDmSI1D9dE7PGbhOur5L0cKxXd7IqbVizQWCY4gcvupPUVsQ4FfDj3V2tt/iOpomT9EY0s+w1g==} + + '@types/chromecast-caf-sender@1.0.10': + resolution: {integrity: sha512-B4iO+T4kMonmvIV+9xyWeIjxNWYVh6RyIQlFUeLk9fgQuXzHtFLnbnVwY7no5qshdUk9szKy0qbCWEMAjMkj4w==} + '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} @@ -2090,9 +2102,18 @@ packages: '@types/express@5.0.0': resolution: {integrity: sha512-DvZriSMehGHL1ZNLzi6MidnsDhUZM/x2pRdDIKdwbUNqqwHxMlRdkxtn6/EPKyqKpHqTl/4nRZsRNLpZxZRpPQ==} + '@types/filesystem@0.0.36': + resolution: {integrity: sha512-vPDXOZuannb9FZdxgHnqSwAG/jvdGM8Wq+6N4D/d80z+D4HWH+bItqsZaVRQykAn6WEVeEkLm2oQigyHtgb0RA==} + + '@types/filewriter@0.0.33': + resolution: {integrity: sha512-xFU8ZXTw4gd358lb2jw25nxY9QAgqn2+bKKjKOYfNCzN4DKCFetK7sPtrlpg66Ywe3vWY9FNxprZawAh9wfJ3g==} + '@types/fs-extra@11.0.4': resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} + '@types/har-format@1.2.16': + resolution: {integrity: sha512-fluxdy7ryD3MV6h8pTfTYpy/xQzCFC7m89nOH9y94cNqJ1mDIDPut7MnRHI3F6qRmh/cT2fUjG1MLdCNb4hE9A==} + '@types/hast@2.3.10': resolution: {integrity: sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==} @@ -7301,6 +7322,15 @@ snapshots: '@types/connect': 3.4.38 '@types/node': 22.8.1 + '@types/chrome@0.0.280': + dependencies: + '@types/filesystem': 0.0.36 + '@types/har-format': 1.2.16 + + '@types/chromecast-caf-sender@1.0.10': + dependencies: + '@types/chrome': 0.0.280 + '@types/connect@3.4.38': dependencies: '@types/node': 22.8.1 @@ -7329,11 +7359,19 @@ snapshots: '@types/qs': 6.9.15 '@types/serve-static': 1.15.7 + '@types/filesystem@0.0.36': + dependencies: + '@types/filewriter': 0.0.33 + + '@types/filewriter@0.0.33': {} + '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 '@types/node': 22.8.1 + '@types/har-format@1.2.16': {} + '@types/hast@2.3.10': dependencies: '@types/unist': 2.0.11 diff --git a/scripts/dictionary.txt b/scripts/dictionary.txt index bdd78a973..a9514ae11 100644 --- a/scripts/dictionary.txt +++ b/scripts/dictionary.txt @@ -93,6 +93,7 @@ pxtorem quxx rebranded rolldown +rootdir rsbuild rsdoctor rsfamily diff --git a/tests/integration/dts/__snapshots__/index.test.ts.snap b/tests/integration/dts/__snapshots__/index.test.ts.snap index a8f914170..4aca4680f 100644 --- a/tests/integration/dts/__snapshots__/index.test.ts.snap +++ b/tests/integration/dts/__snapshots__/index.test.ts.snap @@ -60,3 +60,44 @@ export { } ", } `; + +exports[`dts when bundle: true > rootdir calculation should ignore declaration files 3`] = ` +{ + "cjs": "export declare const num1 = 1; + +export declare const num2 = 2; + +export declare const num3 = 3; + +export declare const numSum: number; + +export declare const str1 = "str1"; + +export declare const str2 = "str2"; + +export declare const str3 = "str3"; + +export declare const strSum: string; + +export { } +", + "esm": "export declare const num1 = 1; + +export declare const num2 = 2; + +export declare const num3 = 3; + +export declare const numSum: number; + +export declare const str1 = "str1"; + +export declare const str2 = "str2"; + +export declare const str3 = "str3"; + +export declare const strSum: string; + +export { } +", +} +`; diff --git a/tests/integration/dts/bundle/rootdir/package.json b/tests/integration/dts/bundle/rootdir/package.json new file mode 100644 index 000000000..fb5370e73 --- /dev/null +++ b/tests/integration/dts/bundle/rootdir/package.json @@ -0,0 +1,9 @@ +{ + "name": "dts-bundle-rootdir-test", + "version": "1.0.0", + "private": true, + "type": "module", + "devDependencies": { + "@types/chromecast-caf-sender": "^1.0.10" + } +} diff --git a/tests/integration/dts/bundle/rootdir/rslib.config.ts b/tests/integration/dts/bundle/rootdir/rslib.config.ts new file mode 100644 index 000000000..5369c099b --- /dev/null +++ b/tests/integration/dts/bundle/rootdir/rslib.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from '@rslib/core'; +import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper'; + +export default defineConfig({ + lib: [ + generateBundleEsmConfig({ + dts: { + bundle: true, + }, + }), + generateBundleCjsConfig({ + dts: { + bundle: true, + }, + }), + ], + source: { + entry: { + index: '../__fixtures__/src/index.ts', + }, + }, +}); diff --git a/tests/integration/dts/bundle/rootdir/tsconfig.json b/tests/integration/dts/bundle/rootdir/tsconfig.json new file mode 100644 index 000000000..46e1f344f --- /dev/null +++ b/tests/integration/dts/bundle/rootdir/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@rslib/tsconfig/base", + "include": ["../__fixtures__/src", "node_modules/@types"] +} diff --git a/tests/integration/dts/index.test.ts b/tests/integration/dts/index.test.ts index ce46cc55e..ea7e4cb63 100644 --- a/tests/integration/dts/index.test.ts +++ b/tests/integration/dts/index.test.ts @@ -221,6 +221,28 @@ describe('dts when bundle: true', () => { `, ); }); + + test('rootdir calculation should ignore declaration files', async () => { + const fixturePath = join(__dirname, 'bundle', 'rootdir'); + const { files, entries } = await buildAndGetResults({ + fixturePath, + type: 'dts', + }); + + expect(files.esm).toMatchInlineSnapshot(` + [ + "/tests/integration/dts/bundle/rootdir/dist/esm/index.d.ts", + ] + `); + + expect(files.cjs).toMatchInlineSnapshot(` + [ + "/tests/integration/dts/bundle/rootdir/dist/cjs/index.d.ts", + ] + `); + + expect(entries).toMatchSnapshot(); + }); }); describe('dts when build: true', () => { From 522a1d7120f6e4056cfc3acc329c46855d434cda Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:39:27 +0800 Subject: [PATCH 14/23] chore(deps): update dependency @module-federation/enhanced to ^0.7.1 (#393) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../mf-react-component/package.json | 2 +- pnpm-lock.yaml | 160 ++++++++++-------- 2 files changed, 91 insertions(+), 71 deletions(-) diff --git a/examples/module-federation/mf-react-component/package.json b/examples/module-federation/mf-react-component/package.json index 18a3b2eeb..ff76933dc 100644 --- a/examples/module-federation/mf-react-component/package.json +++ b/examples/module-federation/mf-react-component/package.json @@ -16,7 +16,7 @@ "serve": "pnpm build && http-server -p 3001 ./dist/ --cors" }, "devDependencies": { - "@module-federation/enhanced": "^0.6.15", + "@module-federation/enhanced": "^0.7.1", "@module-federation/rsbuild-plugin": "^0.6.15", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f0e0ae3d2..4e5df4df1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -88,7 +88,7 @@ importers: devDependencies: '@module-federation/rsbuild-plugin': specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) + version: 0.6.15(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@rsbuild/core': specifier: ~1.1.0 version: 1.1.0 @@ -108,11 +108,11 @@ importers: examples/module-federation/mf-react-component: devDependencies: '@module-federation/enhanced': - specifier: ^0.6.15 - version: 0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0) + specifier: ^0.7.1 + version: 0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0) '@module-federation/rsbuild-plugin': specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) + version: 0.6.15(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@rsbuild/plugin-react': specifier: ^1.0.7 version: 1.0.7(@rsbuild/core@1.1.0) @@ -143,7 +143,7 @@ importers: devDependencies: '@module-federation/rsbuild-plugin': specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) + version: 0.6.15(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@rsbuild/core': specifier: ~1.1.0 version: 1.1.0 @@ -341,7 +341,7 @@ importers: version: 3.1.1(vite@5.3.3(@types/node@22.8.1)(terser@5.31.6))(vitest@2.1.4(@types/node@22.8.1)(terser@5.31.6)) '@module-federation/rsbuild-plugin': specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) + version: 0.6.15(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@playwright/test': specifier: 1.48.2 version: 1.48.2 @@ -1365,17 +1365,17 @@ packages: '@modern-js/utils@2.60.6': resolution: {integrity: sha512-rAeqAHiUUnStwBTkP1tdQSz29o/Qtoc2OUfz6TEAtEPoAxcFSc44+hwux7mQkSxXSzBjkbev5RMkwVwuM2FWtw==} - '@module-federation/bridge-react-webpack-plugin@0.6.15': - resolution: {integrity: sha512-CDts14VFEEhZPe0jVpxfBAdUqo0KV4ZRjmLnoLTg1seDHMPhbkuikx8yKRt24U5GB6WujcnaYxEFdvbItP886Q==} + '@module-federation/bridge-react-webpack-plugin@0.7.1': + resolution: {integrity: sha512-LTDm2xxd70zYtpe9h6iyEgmMtc2MJdHBoFKRCcDmbcojHAoxEJBQnWuXT6QdPM+uKCqobcPIqGAciPc6xymaaA==} - '@module-federation/data-prefetch@0.6.15': - resolution: {integrity: sha512-FzyCWeOHZUd6RTegQ2YWCmXp2gpBbAIxvHuKFtfvb+KtHy21Tr7lnCGamqZAQJsdLpyo6V8oV0i1W/zF/WsSKA==} + '@module-federation/data-prefetch@0.7.1': + resolution: {integrity: sha512-RaA1kkE5zRcAC3iYeFUzh+33nHxircOo9eALGaDHK7gQhLf8vv3b1lAiy8IQPkpPgiKbg5ItfsY9A8bSJUxgeQ==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' - '@module-federation/dts-plugin@0.6.15': - resolution: {integrity: sha512-JSzAifMXi+hshbRKu/6fDo788iqLap6RGpy0IAAgSquMTs0oXEq6wj+g9BYepzYjzDKHPfT79Guc/rq0KWUYNg==} + '@module-federation/dts-plugin@0.7.1': + resolution: {integrity: sha512-QdKY6/byhmr5Yw3eJcjROWDnDlT71O2eTbdu00qAT7F31llFoEogoq74aSgbN7aoOpo/paYR/2Du9zszGdJ/1w==} peerDependencies: typescript: ^4.9.0 || ^5.0.0 vue-tsc: '>=1.0.24' @@ -1383,8 +1383,8 @@ packages: vue-tsc: optional: true - '@module-federation/enhanced@0.6.15': - resolution: {integrity: sha512-ZxOijwH6wZh0yeLA6KX0Xpdo2ddOUGsKnxuRn0L4Mo5McvPGVUwXlbi6XWdHh9Dg4Kld06yMHroXm1HoqkV4Cw==} + '@module-federation/enhanced@0.7.1': + resolution: {integrity: sha512-cTBnRRcyWW+jdh+Z0PK44o1ZDy3prOL/8iGWZ8BQK7ePjwU/5+hZMxAG9r/fIpwSblfMq2SgbGslHm+ZZzMoJw==} peerDependencies: typescript: ^4.9.0 || ^5.0.0 vue-tsc: '>=1.0.24' @@ -1397,11 +1397,14 @@ packages: webpack: optional: true - '@module-federation/managers@0.6.15': - resolution: {integrity: sha512-VLAlkpBxl1Dhue08AzFJ7uIUy3WlnklMaXFpuzH9rV5UwhLiGfL/QxfAYx/bPJjceMkr7uJlmZaQO+EYZni07A==} + '@module-federation/error-codes@0.7.1': + resolution: {integrity: sha512-sQAjRXbjWMS7be0PthLtCl6N2AjjfdC1yn06KluO1hZ/DA3i+qT8x56xOh4DQ7ugPtn/7+8qiV8NAiqdxePvSQ==} + + '@module-federation/managers@0.7.1': + resolution: {integrity: sha512-raqmlygPVm7P+wD8upVVasQvMfzpquRQSOonh7oVzgs0q8Y3ifTJn6GJnaF7YoBh30sO68kKr29Vxm8MOeC4sw==} - '@module-federation/manifest@0.6.15': - resolution: {integrity: sha512-veog9+VMYNe3JcI1zLAPTuqIbb/ufJ7ezOuXNAsj09Jf1/+Ca2XA+i3ZsaAJfRYqaOXNmpL4Xh0pp48uVaRDaw==} + '@module-federation/manifest@0.7.1': + resolution: {integrity: sha512-ugZz6y1ltxIrO7EVUthHyog/+dydizgFKc+MFxqyO9SE1xkN1wtsJpw+s0C8ASG6oB5ADhpnIn5zgmRwB3EKIA==} '@module-federation/rsbuild-plugin@0.6.15': resolution: {integrity: sha512-/VCcud4Wq7DNVbH7vH5sZk2ms5oBhpCkNCyhN37Rf/+Kv1wkjqhNm9DQjGnW+G/M2N7RcrrpNIizCkJd2/Mt+A==} @@ -1410,8 +1413,8 @@ packages: '@module-federation/enhanced': 0.6.15 '@rsbuild/core': 1.x - '@module-federation/rspack@0.6.15': - resolution: {integrity: sha512-TDmOH8Uzf1ntHIkplsv3Flv1JmJgwlGpEAWLkYdMaZbb4mVS3wlK++93MLOxXKJTfIcXld3yF09IsimaYYjYhw==} + '@module-federation/rspack@0.7.1': + resolution: {integrity: sha512-lTL7biXR4GKQRfbt+U5JMluXESq+x2Q7m502g4wi7SN3xNm/n12Fs6Ohdy+QV6j+rJWDMrcCyi7vn9cSZZcLUw==} peerDependencies: typescript: ^4.9.0 || ^5.0.0 vue-tsc: '>=1.0.24' @@ -1424,14 +1427,14 @@ packages: '@module-federation/runtime-tools@0.5.1': resolution: {integrity: sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg==} - '@module-federation/runtime-tools@0.6.15': - resolution: {integrity: sha512-Ps60oVVR6DWHU9zPUJ7EeTYguhMd5C4p0/2QK6WXkeT0gorzc1a3z3KLM5qY09AipiRYp4OzowiKRu2rD6Z5xg==} + '@module-federation/runtime-tools@0.7.1': + resolution: {integrity: sha512-psJfcZUU648XpaoOPYwdarG/EPu5HANmQ7PdaNqYjYCxTRTcNmhXLtyScPUbBWvJ+0bTjfZQ32HgQqXVBcxQzQ==} '@module-federation/runtime@0.5.1': resolution: {integrity: sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ==} - '@module-federation/runtime@0.6.15': - resolution: {integrity: sha512-1HHHWwS3cIqGKqGXY5s/Xp0AKd6L4/VefxidD9P/LHxf6GtPWsy9u9BvZulpHP03s02YLAtmWNoSfjyOq/MvCA==} + '@module-federation/runtime@0.7.1': + resolution: {integrity: sha512-CONUmPTq4LywV3dJB9UQIMhC2+Vrv8XxLTQMsUf3pZDvsDAcH7MWvxzY09049rvBqE4xyhsg4U0OeGhEVbMwVQ==} '@module-federation/sdk@0.5.1': resolution: {integrity: sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA==} @@ -1439,14 +1442,17 @@ packages: '@module-federation/sdk@0.6.15': resolution: {integrity: sha512-2hRCwigHmSWy0wjd23YZVxt8jL1Ael4xElDTTyyOn1JpBy0qDbZvT6tZYvpyGIMw/0OWCwq1fHLFYwwhkfIbTw==} - '@module-federation/third-party-dts-extractor@0.6.15': - resolution: {integrity: sha512-njUb3Fzx1Ws73Ln1dGy7cfMWf10rgSm5atZiUs+/T8c+OFf1esIV+8NK+DrWwP7QjqM9GVkNVbFLM6fvauzkbg==} + '@module-federation/sdk@0.7.1': + resolution: {integrity: sha512-fcjJoxdi8YHYAU9gcFC2hoDPoE4rbpfpJyVE/RNbnAP+nhYNVU4WDm9PO4HohDMZ5a/4Xr0z6WSh4ZqdFn7+AA==} + + '@module-federation/third-party-dts-extractor@0.7.1': + resolution: {integrity: sha512-njWiqb6G3GWi9nm928ssVHQJgJTM9yxc2eeybFI5GvPo3Qg0XdkLzFz/ALKl5Esl8PdtUTrblIa6H4ch17iJxw==} '@module-federation/webpack-bundler-runtime@0.5.1': resolution: {integrity: sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA==} - '@module-federation/webpack-bundler-runtime@0.6.15': - resolution: {integrity: sha512-yKk0ac7uWit+aEugx7UZt78MPxlZkzT2+FVC0Y583m1HG/HvgfrU/jsM9yTFUQx8ch2HyP3gH/SA0hA/Me0MmA==} + '@module-federation/webpack-bundler-runtime@0.7.1': + resolution: {integrity: sha512-Xmt/0v/XroOQGktjg6617qkOWk5dHQeMoBOwxHRYKczN6wtusj2AOxWMtFMpR+AWIurFY4vUtuAfoKIF+QWioQ==} '@napi-rs/wasm-runtime@0.2.4': resolution: {integrity: sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==} @@ -3817,6 +3823,10 @@ packages: resolution: {integrity: sha512-KwROYmorP1F97yiPCRENbvJRshPiWFLzU73CSzqO8jUVGiGK8d3RqrKBSTmSLc7MKse69LyYydTq6Xy0xBFE0g==} engines: {node: '>=14.17.6'} + isomorphic-rslog@0.0.6: + resolution: {integrity: sha512-HM0q6XqQ93psDlqvuViNs/Ea3hAyGDkIdVAHlrEocjjAwGrs1fZ+EdQjS9eUPacnYB7Y8SoDdSY3H8p3ce205A==} + engines: {node: '>=14.17.6'} + isomorphic-ws@5.0.0: resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} peerDependencies: @@ -6507,25 +6517,26 @@ snapshots: lodash: 4.17.21 rslog: 1.2.3 - '@module-federation/bridge-react-webpack-plugin@0.6.15': + '@module-federation/bridge-react-webpack-plugin@0.7.1': dependencies: - '@module-federation/sdk': 0.6.15 + '@module-federation/sdk': 0.7.1 '@types/semver': 7.5.8 semver: 7.6.3 - '@module-federation/data-prefetch@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@module-federation/data-prefetch@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@module-federation/runtime': 0.6.15 - '@module-federation/sdk': 0.6.15 + '@module-federation/runtime': 0.7.1 + '@module-federation/sdk': 0.7.1 fs-extra: 9.1.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@module-federation/dts-plugin@0.6.15(typescript@5.6.3)': + '@module-federation/dts-plugin@0.7.1(typescript@5.6.3)': dependencies: - '@module-federation/managers': 0.6.15 - '@module-federation/sdk': 0.6.15 - '@module-federation/third-party-dts-extractor': 0.6.15 + '@module-federation/error-codes': 0.7.1 + '@module-federation/managers': 0.7.1 + '@module-federation/sdk': 0.7.1 + '@module-federation/third-party-dts-extractor': 0.7.1 adm-zip: 0.5.16 ansi-colors: 4.1.3 axios: 1.7.7 @@ -6545,16 +6556,16 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0)': + '@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0)': dependencies: - '@module-federation/bridge-react-webpack-plugin': 0.6.15 - '@module-federation/data-prefetch': 0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@module-federation/dts-plugin': 0.6.15(typescript@5.6.3) - '@module-federation/managers': 0.6.15 - '@module-federation/manifest': 0.6.15(typescript@5.6.3) - '@module-federation/rspack': 0.6.15(typescript@5.6.3) - '@module-federation/runtime-tools': 0.6.15 - '@module-federation/sdk': 0.6.15 + '@module-federation/bridge-react-webpack-plugin': 0.7.1 + '@module-federation/data-prefetch': 0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@module-federation/dts-plugin': 0.7.1(typescript@5.6.3) + '@module-federation/managers': 0.7.1 + '@module-federation/manifest': 0.7.1(typescript@5.6.3) + '@module-federation/rspack': 0.7.1(typescript@5.6.3) + '@module-federation/runtime-tools': 0.7.1 + '@module-federation/sdk': 0.7.1 btoa: 1.2.1 upath: 2.0.1 optionalDependencies: @@ -6568,17 +6579,19 @@ snapshots: - supports-color - utf-8-validate - '@module-federation/managers@0.6.15': + '@module-federation/error-codes@0.7.1': {} + + '@module-federation/managers@0.7.1': dependencies: - '@module-federation/sdk': 0.6.15 + '@module-federation/sdk': 0.7.1 find-pkg: 2.0.0 fs-extra: 9.1.0 - '@module-federation/manifest@0.6.15(typescript@5.6.3)': + '@module-federation/manifest@0.7.1(typescript@5.6.3)': dependencies: - '@module-federation/dts-plugin': 0.6.15(typescript@5.6.3) - '@module-federation/managers': 0.6.15 - '@module-federation/sdk': 0.6.15 + '@module-federation/dts-plugin': 0.7.1(typescript@5.6.3) + '@module-federation/managers': 0.7.1 + '@module-federation/sdk': 0.7.1 chalk: 3.0.0 find-pkg: 2.0.0 transitivePeerDependencies: @@ -6589,20 +6602,20 @@ snapshots: - utf-8-validate - vue-tsc - '@module-federation/rsbuild-plugin@0.6.15(@module-federation/enhanced@0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0)': + '@module-federation/rsbuild-plugin@0.6.15(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0)': dependencies: - '@module-federation/enhanced': 0.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0) + '@module-federation/enhanced': 0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0) '@module-federation/sdk': 0.6.15 '@rsbuild/core': 1.1.0 - '@module-federation/rspack@0.6.15(typescript@5.6.3)': + '@module-federation/rspack@0.7.1(typescript@5.6.3)': dependencies: - '@module-federation/bridge-react-webpack-plugin': 0.6.15 - '@module-federation/dts-plugin': 0.6.15(typescript@5.6.3) - '@module-federation/managers': 0.6.15 - '@module-federation/manifest': 0.6.15(typescript@5.6.3) - '@module-federation/runtime-tools': 0.6.15 - '@module-federation/sdk': 0.6.15 + '@module-federation/bridge-react-webpack-plugin': 0.7.1 + '@module-federation/dts-plugin': 0.7.1(typescript@5.6.3) + '@module-federation/managers': 0.7.1 + '@module-federation/manifest': 0.7.1(typescript@5.6.3) + '@module-federation/runtime-tools': 0.7.1 + '@module-federation/sdk': 0.7.1 optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -6616,18 +6629,19 @@ snapshots: '@module-federation/runtime': 0.5.1 '@module-federation/webpack-bundler-runtime': 0.5.1 - '@module-federation/runtime-tools@0.6.15': + '@module-federation/runtime-tools@0.7.1': dependencies: - '@module-federation/runtime': 0.6.15 - '@module-federation/webpack-bundler-runtime': 0.6.15 + '@module-federation/runtime': 0.7.1 + '@module-federation/webpack-bundler-runtime': 0.7.1 '@module-federation/runtime@0.5.1': dependencies: '@module-federation/sdk': 0.5.1 - '@module-federation/runtime@0.6.15': + '@module-federation/runtime@0.7.1': dependencies: - '@module-federation/sdk': 0.6.15 + '@module-federation/error-codes': 0.7.1 + '@module-federation/sdk': 0.7.1 '@module-federation/sdk@0.5.1': {} @@ -6635,7 +6649,11 @@ snapshots: dependencies: isomorphic-rslog: 0.0.4 - '@module-federation/third-party-dts-extractor@0.6.15': + '@module-federation/sdk@0.7.1': + dependencies: + isomorphic-rslog: 0.0.6 + + '@module-federation/third-party-dts-extractor@0.7.1': dependencies: find-pkg: 2.0.0 fs-extra: 9.1.0 @@ -6646,10 +6664,10 @@ snapshots: '@module-federation/runtime': 0.5.1 '@module-federation/sdk': 0.5.1 - '@module-federation/webpack-bundler-runtime@0.6.15': + '@module-federation/webpack-bundler-runtime@0.7.1': dependencies: - '@module-federation/runtime': 0.6.15 - '@module-federation/sdk': 0.6.15 + '@module-federation/runtime': 0.7.1 + '@module-federation/sdk': 0.7.1 '@napi-rs/wasm-runtime@0.2.4': dependencies: @@ -9249,6 +9267,8 @@ snapshots: isomorphic-rslog@0.0.4: {} + isomorphic-rslog@0.0.6: {} + isomorphic-ws@5.0.0(ws@8.18.0): dependencies: ws: 8.18.0 From 081136c3ea8fdaf0e2e018d9f2af09f25f594617 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:41:24 +0800 Subject: [PATCH 15/23] chore(deps): update storybook monorepo to ^8.4.2 (#395) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../tools/storybook-react-js/package.json | 16 ++++++++-------- .../tools/storybook-react-ts/package.json | 16 ++++++++-------- .../package.json | 16 ++++++++-------- .../package.json | 16 ++++++++-------- .../template-[react]-[storybook]-js/package.json | 16 ++++++++-------- .../template-[react]-[storybook]-ts/package.json | 16 ++++++++-------- 6 files changed, 48 insertions(+), 48 deletions(-) diff --git a/packages/create-rslib/fragments/tools/storybook-react-js/package.json b/packages/create-rslib/fragments/tools/storybook-react-js/package.json index c05a230e2..9ee47a664 100644 --- a/packages/create-rslib/fragments/tools/storybook-react-js/package.json +++ b/packages/create-rslib/fragments/tools/storybook-react-js/package.json @@ -5,14 +5,14 @@ }, "devDependencies": { "@rsbuild/core": "~1.1.0", - "@storybook/addon-essentials": "^8.3.6", - "@storybook/addon-interactions": "^8.3.6", - "@storybook/addon-links": "^8.3.6", - "@storybook/addon-onboarding": "^8.3.6", - "@storybook/blocks": "^8.3.6", - "@storybook/react": "^8.3.6", - "@storybook/test": "^8.3.6", - "storybook": "^8.3.6", + "@storybook/addon-essentials": "^8.4.2", + "@storybook/addon-interactions": "^8.4.2", + "@storybook/addon-links": "^8.4.2", + "@storybook/addon-onboarding": "^8.4.2", + "@storybook/blocks": "^8.4.2", + "@storybook/react": "^8.4.2", + "@storybook/test": "^8.4.2", + "storybook": "^8.4.2", "storybook-addon-rslib": "^0.1.3", "storybook-react-rsbuild": "^0.1.3" } diff --git a/packages/create-rslib/fragments/tools/storybook-react-ts/package.json b/packages/create-rslib/fragments/tools/storybook-react-ts/package.json index c05a230e2..9ee47a664 100644 --- a/packages/create-rslib/fragments/tools/storybook-react-ts/package.json +++ b/packages/create-rslib/fragments/tools/storybook-react-ts/package.json @@ -5,14 +5,14 @@ }, "devDependencies": { "@rsbuild/core": "~1.1.0", - "@storybook/addon-essentials": "^8.3.6", - "@storybook/addon-interactions": "^8.3.6", - "@storybook/addon-links": "^8.3.6", - "@storybook/addon-onboarding": "^8.3.6", - "@storybook/blocks": "^8.3.6", - "@storybook/react": "^8.3.6", - "@storybook/test": "^8.3.6", - "storybook": "^8.3.6", + "@storybook/addon-essentials": "^8.4.2", + "@storybook/addon-interactions": "^8.4.2", + "@storybook/addon-links": "^8.4.2", + "@storybook/addon-onboarding": "^8.4.2", + "@storybook/blocks": "^8.4.2", + "@storybook/react": "^8.4.2", + "@storybook/test": "^8.4.2", + "storybook": "^8.4.2", "storybook-addon-rslib": "^0.1.3", "storybook-react-rsbuild": "^0.1.3" } diff --git a/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json b/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json index fca709d62..5d21b278e 100644 --- a/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json +++ b/packages/create-rslib/template-[react]-[storybook,vitest]-js/package.json @@ -22,18 +22,18 @@ "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", - "@storybook/addon-essentials": "^8.3.6", - "@storybook/addon-interactions": "^8.3.6", - "@storybook/addon-links": "^8.3.6", - "@storybook/addon-onboarding": "^8.3.6", - "@storybook/blocks": "^8.3.6", - "@storybook/react": "^8.3.6", - "@storybook/test": "^8.3.6", + "@storybook/addon-essentials": "^8.4.2", + "@storybook/addon-interactions": "^8.4.2", + "@storybook/addon-links": "^8.4.2", + "@storybook/addon-onboarding": "^8.4.2", + "@storybook/blocks": "^8.4.2", + "@storybook/react": "^8.4.2", + "@storybook/test": "^8.4.2", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.0.1", "jsdom": "^25.0.1", "react": "^18.3.1", - "storybook": "^8.3.6", + "storybook": "^8.4.2", "storybook-addon-rslib": "^0.1.3", "storybook-react-rsbuild": "^0.1.3", "vitest": "^2.1.4" diff --git a/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json b/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json index 81b3e567d..c1a320012 100644 --- a/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json +++ b/packages/create-rslib/template-[react]-[storybook,vitest]-ts/package.json @@ -24,19 +24,19 @@ "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", - "@storybook/addon-essentials": "^8.3.6", - "@storybook/addon-interactions": "^8.3.6", - "@storybook/addon-links": "^8.3.6", - "@storybook/addon-onboarding": "^8.3.6", - "@storybook/blocks": "^8.3.6", - "@storybook/react": "^8.3.6", - "@storybook/test": "^8.3.6", + "@storybook/addon-essentials": "^8.4.2", + "@storybook/addon-interactions": "^8.4.2", + "@storybook/addon-links": "^8.4.2", + "@storybook/addon-onboarding": "^8.4.2", + "@storybook/blocks": "^8.4.2", + "@storybook/react": "^8.4.2", + "@storybook/test": "^8.4.2", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.0.1", "@types/react": "^18.3.12", "jsdom": "^25.0.1", "react": "^18.3.1", - "storybook": "^8.3.6", + "storybook": "^8.4.2", "storybook-addon-rslib": "^0.1.3", "storybook-react-rsbuild": "^0.1.3", "typescript": "^5.6.3", diff --git a/packages/create-rslib/template-[react]-[storybook]-js/package.json b/packages/create-rslib/template-[react]-[storybook]-js/package.json index 02bc64607..f83d858e1 100644 --- a/packages/create-rslib/template-[react]-[storybook]-js/package.json +++ b/packages/create-rslib/template-[react]-[storybook]-js/package.json @@ -21,15 +21,15 @@ "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", - "@storybook/addon-essentials": "^8.3.6", - "@storybook/addon-interactions": "^8.3.6", - "@storybook/addon-links": "^8.3.6", - "@storybook/addon-onboarding": "^8.3.6", - "@storybook/blocks": "^8.3.6", - "@storybook/react": "^8.3.6", - "@storybook/test": "^8.3.6", + "@storybook/addon-essentials": "^8.4.2", + "@storybook/addon-interactions": "^8.4.2", + "@storybook/addon-links": "^8.4.2", + "@storybook/addon-onboarding": "^8.4.2", + "@storybook/blocks": "^8.4.2", + "@storybook/react": "^8.4.2", + "@storybook/test": "^8.4.2", "react": "^18.3.1", - "storybook": "^8.3.6", + "storybook": "^8.4.2", "storybook-addon-rslib": "^0.1.3", "storybook-react-rsbuild": "^0.1.3" }, diff --git a/packages/create-rslib/template-[react]-[storybook]-ts/package.json b/packages/create-rslib/template-[react]-[storybook]-ts/package.json index 9364321b9..832ff3131 100644 --- a/packages/create-rslib/template-[react]-[storybook]-ts/package.json +++ b/packages/create-rslib/template-[react]-[storybook]-ts/package.json @@ -23,16 +23,16 @@ "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", - "@storybook/addon-essentials": "^8.3.6", - "@storybook/addon-interactions": "^8.3.6", - "@storybook/addon-links": "^8.3.6", - "@storybook/addon-onboarding": "^8.3.6", - "@storybook/blocks": "^8.3.6", - "@storybook/react": "^8.3.6", - "@storybook/test": "^8.3.6", + "@storybook/addon-essentials": "^8.4.2", + "@storybook/addon-interactions": "^8.4.2", + "@storybook/addon-links": "^8.4.2", + "@storybook/addon-onboarding": "^8.4.2", + "@storybook/blocks": "^8.4.2", + "@storybook/react": "^8.4.2", + "@storybook/test": "^8.4.2", "@types/react": "^18.3.12", "react": "^18.3.1", - "storybook": "^8.3.6", + "storybook": "^8.4.2", "storybook-addon-rslib": "^0.1.3", "storybook-react-rsbuild": "^0.1.3", "typescript": "^5.6.3" From 570d0cc56d1c28fbeca4c83831689c405991b5e3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:41:57 +0800 Subject: [PATCH 16/23] chore(deps): update all patch dependencies (#392) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 211 +++++++++--------- .../config-override/package.json | 2 +- .../external-helpers/true/package.json | 2 +- 4 files changed, 113 insertions(+), 106 deletions(-) diff --git a/package.json b/package.json index 28dea7665..e26e6aaf2 100644 --- a/package.json +++ b/package.json @@ -49,13 +49,13 @@ "cspell-ban-words": "^0.0.4", "fs-extra": "^11.2.0", "nano-staged": "^0.8.0", - "nx": "^20.0.11", + "nx": "^20.0.12", "prettier": "^3.3.3", "prettier-plugin-packagejson": "^2.5.3", "simple-git-hooks": "^2.11.1", "typescript": "^5.6.3", "vitest": "^2.1.4", - "zx": "^8.2.0" + "zx": "^8.2.1" }, "packageManager": "pnpm@9.12.1", "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4e5df4df1..da74ec8ea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: ^0.8.0 version: 0.8.0 nx: - specifier: ^20.0.11 - version: 20.0.11 + specifier: ^20.0.12 + version: 20.0.12 prettier: specifier: ^3.3.3 version: 3.3.3 @@ -57,8 +57,8 @@ importers: specifier: ^2.1.4 version: 2.1.4(@types/node@22.8.1)(terser@5.31.6) zx: - specifier: ^8.2.0 - version: 8.2.0 + specifier: ^8.2.1 + version: 8.2.1 examples/express-plugin: devDependencies: @@ -234,7 +234,7 @@ importers: version: link:../../scripts/tsconfig '@rspack/core': specifier: 1.0.8 - version: 1.0.8(@swc/helpers@0.5.13) + version: 1.0.8(@swc/helpers@0.5.15) '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 @@ -574,8 +574,8 @@ importers: tests/integration/external-helpers/config-override: dependencies: '@swc/helpers': - specifier: 0.5.13 - version: 0.5.13 + specifier: 0.5.15 + version: 0.5.15 tests/integration/external-helpers/default: {} @@ -584,8 +584,8 @@ importers: tests/integration/external-helpers/true: dependencies: '@swc/helpers': - specifier: 0.5.13 - version: 0.5.13 + specifier: 0.5.15 + version: 0.5.15 tests/integration/externals/browser: {} @@ -1469,62 +1469,62 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@nx/nx-darwin-arm64@20.0.11': - resolution: {integrity: sha512-SEHM9L9LZpvDisRMZr2YIiXQNeE5fkn7GvUGE8cOCZeAaw56pOrm01bqRhxY/6YBvAIiZIRD+YfZynkFMqjT0Q==} + '@nx/nx-darwin-arm64@20.0.12': + resolution: {integrity: sha512-iwEDUTKx0n2S6Nz9gc9ShrfBw0MG87U0YIu2x/09tKOSkcsw90QKy54qN/6WNoFIE41Kt3U+dYtWi+NdLRE9kw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@nx/nx-darwin-x64@20.0.11': - resolution: {integrity: sha512-eWRk4uXR22mFDaA5uQBJRrvU2JZdF/TowXUVXvANfz2LU0Wg1qHRz/SIrB2hnj6b8UX7xHXY9eRunnOU66tLZg==} + '@nx/nx-darwin-x64@20.0.12': + resolution: {integrity: sha512-JYFNf0yPReejaooQAAIMsjWDGENT777wDXj45e7JQUMM4t6NOMpGBj4qUFyc6a/jXT+/bCGEj4N7VDZDZiogGA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@nx/nx-freebsd-x64@20.0.11': - resolution: {integrity: sha512-e1cKZdQP9j6Tqq9PFO3dDfNE4Dj9DECiuHa7Lym4xuTPqs7zrPqzbMAgg0S9McoYjuvtaemBE7ppmIGnQvnivw==} + '@nx/nx-freebsd-x64@20.0.12': + resolution: {integrity: sha512-892n8o7vxdmE7pol3ggV78YHlP25p6Y/Z2x69nnC3BBTpWmesyd6lbEmamANofD5KcKCmT1HquC3m6rCT7akHw==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@nx/nx-linux-arm-gnueabihf@20.0.11': - resolution: {integrity: sha512-3Pfm+c53u20lWeTmiH+iOKNJRslagOA/6rgujJmTwzvYY20Ny4ivMnkd1Y0D/dm78dVMj9zdKdxPCV/aE5L4TA==} + '@nx/nx-linux-arm-gnueabihf@20.0.12': + resolution: {integrity: sha512-ZPcdYIVAc5JMtmvroJOloI9CJgtwBOGr7E7mO1eT44zs5av0j/QMIj6GSDdvJ7fx+I7TmT4mDiu3s6rLO+/JjA==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@nx/nx-linux-arm64-gnu@20.0.11': - resolution: {integrity: sha512-z0KN2OghBoipBuDOJWj5l4tz7YIdEHtHYVk5Gnm6r3zwSJ78obvFsiUXBHQVrK1sLFbsaLRKi63mXP58axDL+A==} + '@nx/nx-linux-arm64-gnu@20.0.12': + resolution: {integrity: sha512-TadGwwUKS5WQg2YOMb2WuuVG1k14miSdB9qJOcAX5MGdOiQ1fpV00ph+kMWZSsCCo6N7sKxmvXXXdsUUFSDGjg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@nx/nx-linux-arm64-musl@20.0.11': - resolution: {integrity: sha512-e/QwogKNOdiALEG+9uHW1QbKr4POfvqgo02fuV2pumL38y06ooj9iIjBRDVLqpjIbxMi+kmGhvpLs2wwRbyTmA==} + '@nx/nx-linux-arm64-musl@20.0.12': + resolution: {integrity: sha512-EE2HQjgY87/s9+PQ27vbYyDEXFZ4Qot+O8ThVDVuMI/2dosmWs6C4+YEm3VYG+CT31MVwe/vHKXbDlZgkROMuA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@nx/nx-linux-x64-gnu@20.0.11': - resolution: {integrity: sha512-LxQIHy/wEV75ZWf+4vgEOo4KkfzSRo/i1QvUsVFyqXjvpbrobXtpP+vreljTfx+QR90zad3vymFtnTNfPswSVg==} + '@nx/nx-linux-x64-gnu@20.0.12': + resolution: {integrity: sha512-gITJ2g6dH2qvGrI2CHHRyd3soVrJyQQGkqtJnWq04ge+YDy/KniXR2ThQ93LI/QLAxKrKOe3qmIIaNdcdDYnjA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@nx/nx-linux-x64-musl@20.0.11': - resolution: {integrity: sha512-LtxFGVykk81enIqHkQSvs3fAd/La0sLMuR3Gqb0Ia6M9yq26Yadka0R5XZK/xGR3dnahB3Qu8mFANv6BJ7PLig==} + '@nx/nx-linux-x64-musl@20.0.12': + resolution: {integrity: sha512-vOoCrjL44nFZ5N8a4UAIYELnf/tq1dRaLEhSV+P0hKTEtwONj4k8crfU/2HifG1iU7p3AWJLEyaddMoINhB/2g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@nx/nx-win32-arm64-msvc@20.0.11': - resolution: {integrity: sha512-dA/Oa2641ixZFSiwY8YBgy/vLwWEvp5To63Fa2NaflQGSkRUAX6N9qcljAwns2KKJwVwQcbzQBiqHo0IL8JnxQ==} + '@nx/nx-win32-arm64-msvc@20.0.12': + resolution: {integrity: sha512-gKdaul23bdRnh493iAd6pSLPSW54VBuEv2zPL86cgprLOcEZiGM5BLJWQguKHCib6dYKaIP4CUIs7i7vhEID+A==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@nx/nx-win32-x64-msvc@20.0.11': - resolution: {integrity: sha512-24wKBB4nbvyYweeBG+AkhHyekZGOPJNI1xYuhwN2TQP5m+JueBfr16PaFjFB339MS0ujy5+1kO649ACJh0cqzQ==} + '@nx/nx-win32-x64-msvc@20.0.12': + resolution: {integrity: sha512-R1pz4kAG0Ok0EDxXhHwKM3ZZcK2nLycuR9SDrq2Ldp2knvbFf4quSjWyAQaiofJXo179+noa7o5tZDZbNjBYMw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -2068,6 +2068,9 @@ packages: '@swc/helpers@0.5.13': resolution: {integrity: sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==} + '@swc/helpers@0.5.15': + resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@trysound/sax@0.2.0': resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} @@ -4345,8 +4348,8 @@ packages: number-precision@1.6.0: resolution: {integrity: sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ==} - nx@20.0.11: - resolution: {integrity: sha512-g22/gNg6RCfOKd47cFunGgMY4wm3okoG7hmlqe21HkdpuRf1Yos/YGNdPmrrS04+IKUz7utdBl6bDGfw8QbZAw==} + nx@20.0.12: + resolution: {integrity: sha512-pQ7Rwb2Qlhr+fEamd0qc4VsL/aKjVJ0MXPsosuhdZobLJQOKHefe+nXSSZ1Jy19VM3RRpxUKFneD/V2jvs3qDA==} hasBin: true peerDependencies: '@swc-node/register': ^1.8.0 @@ -5513,8 +5516,8 @@ packages: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} - tslib@2.6.3: - resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} tsscmp@1.0.6: resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} @@ -5860,8 +5863,8 @@ packages: zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - zx@8.2.0: - resolution: {integrity: sha512-ec7Z1Ki9h4CsKqbMjZ8H7G1PbbZYErscxT314LF66Ljx1YRENisqa5m9IN2VjbYgOKxdv5t0MbVd3Hf+II3e7w==} + zx@8.2.1: + resolution: {integrity: sha512-E3TZRg76QC14RXU8LLKGCnsd8omfM220TJKU4O4R1YuitE4IzDB3cmX6+tF2iffJ8JtlWxBo35YS1TCmpINuaQ==} engines: {node: '>= 12.17.0'} hasBin: true @@ -6214,15 +6217,15 @@ snapshots: '@emnapi/core@1.2.0': dependencies: '@emnapi/wasi-threads': 1.0.1 - tslib: 2.6.3 + tslib: 2.8.1 '@emnapi/runtime@1.2.0': dependencies: - tslib: 2.6.3 + tslib: 2.8.1 '@emnapi/wasi-threads@1.0.1': dependencies: - tslib: 2.6.3 + tslib: 2.8.1 '@esbuild/aix-ppc64@0.21.5': optional: true @@ -6400,21 +6403,21 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@jsonjoy.com/base64@1.1.2(tslib@2.6.3)': + '@jsonjoy.com/base64@1.1.2(tslib@2.8.1)': dependencies: - tslib: 2.6.3 + tslib: 2.8.1 - '@jsonjoy.com/json-pack@1.0.4(tslib@2.6.3)': + '@jsonjoy.com/json-pack@1.0.4(tslib@2.8.1)': dependencies: - '@jsonjoy.com/base64': 1.1.2(tslib@2.6.3) - '@jsonjoy.com/util': 1.3.0(tslib@2.6.3) + '@jsonjoy.com/base64': 1.1.2(tslib@2.8.1) + '@jsonjoy.com/util': 1.3.0(tslib@2.8.1) hyperdyperid: 1.2.0 - thingies: 1.21.0(tslib@2.6.3) - tslib: 2.6.3 + thingies: 1.21.0(tslib@2.8.1) + tslib: 2.8.1 - '@jsonjoy.com/util@1.3.0(tslib@2.6.3)': + '@jsonjoy.com/util@1.3.0(tslib@2.8.1)': dependencies: - tslib: 2.6.3 + tslib: 2.8.1 '@loadable/component@5.16.4(react@18.3.1)': dependencies: @@ -6687,34 +6690,34 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@nx/nx-darwin-arm64@20.0.11': + '@nx/nx-darwin-arm64@20.0.12': optional: true - '@nx/nx-darwin-x64@20.0.11': + '@nx/nx-darwin-x64@20.0.12': optional: true - '@nx/nx-freebsd-x64@20.0.11': + '@nx/nx-freebsd-x64@20.0.12': optional: true - '@nx/nx-linux-arm-gnueabihf@20.0.11': + '@nx/nx-linux-arm-gnueabihf@20.0.12': optional: true - '@nx/nx-linux-arm64-gnu@20.0.11': + '@nx/nx-linux-arm64-gnu@20.0.12': optional: true - '@nx/nx-linux-arm64-musl@20.0.11': + '@nx/nx-linux-arm64-musl@20.0.12': optional: true - '@nx/nx-linux-x64-gnu@20.0.11': + '@nx/nx-linux-x64-gnu@20.0.12': optional: true - '@nx/nx-linux-x64-musl@20.0.11': + '@nx/nx-linux-x64-musl@20.0.12': optional: true - '@nx/nx-win32-arm64-msvc@20.0.11': + '@nx/nx-win32-arm64-msvc@20.0.12': optional: true - '@nx/nx-win32-x64-msvc@20.0.11': + '@nx/nx-win32-x64-msvc@20.0.12': optional: true '@pkgjs/parseargs@0.11.0': @@ -6778,18 +6781,18 @@ snapshots: '@rsbuild/core@1.0.19': dependencies: - '@rspack/core': 1.0.14(@swc/helpers@0.5.13) + '@rspack/core': 1.0.14(@swc/helpers@0.5.15) '@rspack/lite-tapable': 1.0.1 - '@swc/helpers': 0.5.13 + '@swc/helpers': 0.5.15 core-js: 3.38.1 optionalDependencies: fsevents: 2.3.3 '@rsbuild/core@1.1.0': dependencies: - '@rspack/core': 1.1.0(@swc/helpers@0.5.13) + '@rspack/core': 1.1.0(@swc/helpers@0.5.15) '@rspack/lite-tapable': 1.0.1 - '@swc/helpers': 0.5.13 + '@swc/helpers': 0.5.15 core-js: 3.39.0 optionalDependencies: fsevents: 2.3.3 @@ -7009,32 +7012,32 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 1.1.0 '@rspack/binding-win32-x64-msvc': 1.1.0 - '@rspack/core@1.0.14(@swc/helpers@0.5.13)': + '@rspack/core@1.0.14(@swc/helpers@0.5.15)': dependencies: '@module-federation/runtime-tools': 0.5.1 '@rspack/binding': 1.0.14 '@rspack/lite-tapable': 1.0.1 caniuse-lite: 1.0.30001663 optionalDependencies: - '@swc/helpers': 0.5.13 + '@swc/helpers': 0.5.15 - '@rspack/core@1.0.8(@swc/helpers@0.5.13)': + '@rspack/core@1.0.8(@swc/helpers@0.5.15)': dependencies: '@module-federation/runtime-tools': 0.5.1 '@rspack/binding': 1.0.8 '@rspack/lite-tapable': 1.0.1 caniuse-lite: 1.0.30001663 optionalDependencies: - '@swc/helpers': 0.5.13 + '@swc/helpers': 0.5.15 - '@rspack/core@1.1.0(@swc/helpers@0.5.13)': + '@rspack/core@1.1.0(@swc/helpers@0.5.15)': dependencies: '@module-federation/runtime-tools': 0.5.1 '@rspack/binding': 1.1.0 '@rspack/lite-tapable': 1.0.1 caniuse-lite: 1.0.30001663 optionalDependencies: - '@swc/helpers': 0.5.13 + '@swc/helpers': 0.5.15 '@rspack/lite-tapable@1.0.1': {} @@ -7321,13 +7324,17 @@ snapshots: '@swc/helpers@0.5.13': dependencies: - tslib: 2.6.3 + tslib: 2.8.1 + + '@swc/helpers@0.5.15': + dependencies: + tslib: 2.8.1 '@trysound/sax@0.2.0': {} '@tybys/wasm-util@0.9.0': dependencies: - tslib: 2.6.3 + tslib: 2.8.1 '@types/acorn@4.0.6': dependencies: @@ -7587,7 +7594,7 @@ snapshots: '@yarnpkg/parsers@3.0.2': dependencies: js-yaml: 3.14.1 - tslib: 2.6.3 + tslib: 2.8.1 '@zkochan/js-yaml@0.0.7': dependencies: @@ -8314,7 +8321,7 @@ snapshots: dot-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.6.3 + tslib: 2.8.1 dotenv-expand@11.0.6: dependencies: @@ -8657,7 +8664,7 @@ snapshots: focus-lock@1.3.5: dependencies: - tslib: 2.6.3 + tslib: 2.8.1 follow-redirects@1.15.6: {} @@ -8686,7 +8693,7 @@ snapshots: framer-motion@11.5.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - tslib: 2.6.3 + tslib: 2.8.1 optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -9444,7 +9451,7 @@ snapshots: lower-case@2.0.2: dependencies: - tslib: 2.6.3 + tslib: 2.8.1 lowlight@1.20.0: dependencies: @@ -9644,10 +9651,10 @@ snapshots: memfs@4.14.0: dependencies: - '@jsonjoy.com/json-pack': 1.0.4(tslib@2.6.3) - '@jsonjoy.com/util': 1.3.0(tslib@2.6.3) - tree-dump: 1.0.2(tslib@2.6.3) - tslib: 2.6.3 + '@jsonjoy.com/json-pack': 1.0.4(tslib@2.8.1) + '@jsonjoy.com/util': 1.3.0(tslib@2.8.1) + tree-dump: 1.0.2(tslib@2.8.1) + tslib: 2.8.1 merge-descriptors@1.0.3: {} @@ -9992,7 +9999,7 @@ snapshots: no-case@3.0.4: dependencies: lower-case: 2.0.2 - tslib: 2.6.3 + tslib: 2.8.1 node-domexception@1.0.0: {} @@ -10028,7 +10035,7 @@ snapshots: number-precision@1.6.0: {} - nx@20.0.11: + nx@20.0.12: dependencies: '@napi-rs/wasm-runtime': 0.2.4 '@yarnpkg/lockfile': 1.1.0 @@ -10059,20 +10066,20 @@ snapshots: tar-stream: 2.2.0 tmp: 0.2.3 tsconfig-paths: 4.2.0 - tslib: 2.6.3 + tslib: 2.8.1 yargs: 17.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@nx/nx-darwin-arm64': 20.0.11 - '@nx/nx-darwin-x64': 20.0.11 - '@nx/nx-freebsd-x64': 20.0.11 - '@nx/nx-linux-arm-gnueabihf': 20.0.11 - '@nx/nx-linux-arm64-gnu': 20.0.11 - '@nx/nx-linux-arm64-musl': 20.0.11 - '@nx/nx-linux-x64-gnu': 20.0.11 - '@nx/nx-linux-x64-musl': 20.0.11 - '@nx/nx-win32-arm64-msvc': 20.0.11 - '@nx/nx-win32-x64-msvc': 20.0.11 + '@nx/nx-darwin-arm64': 20.0.12 + '@nx/nx-darwin-x64': 20.0.12 + '@nx/nx-freebsd-x64': 20.0.12 + '@nx/nx-linux-arm-gnueabihf': 20.0.12 + '@nx/nx-linux-arm64-gnu': 20.0.12 + '@nx/nx-linux-arm64-musl': 20.0.12 + '@nx/nx-linux-x64-gnu': 20.0.12 + '@nx/nx-linux-x64-musl': 20.0.12 + '@nx/nx-win32-arm64-msvc': 20.0.12 + '@nx/nx-win32-x64-msvc': 20.0.12 transitivePeerDependencies: - debug @@ -10772,7 +10779,7 @@ snapshots: rxjs@7.8.1: dependencies: - tslib: 2.6.3 + tslib: 2.8.1 sade@1.8.1: dependencies: @@ -11008,7 +11015,7 @@ snapshots: snake-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.6.3 + tslib: 2.8.1 sort-object-keys@1.1.3: {} @@ -11171,7 +11178,7 @@ snapshots: synckit@0.9.2: dependencies: '@pkgr/core': 0.1.1 - tslib: 2.6.3 + tslib: 2.8.1 table@6.8.2: dependencies: @@ -11244,9 +11251,9 @@ snapshots: dependencies: any-promise: 1.3.0 - thingies@1.21.0(tslib@2.6.3): + thingies@1.21.0(tslib@2.8.1): dependencies: - tslib: 2.6.3 + tslib: 2.8.1 timers-browserify@2.0.12: dependencies: @@ -11283,9 +11290,9 @@ snapshots: toidentifier@1.0.1: {} - tree-dump@1.0.2(tslib@2.6.3): + tree-dump@1.0.2(tslib@2.8.1): dependencies: - tslib: 2.6.3 + tslib: 2.8.1 trim-lines@3.0.1: {} @@ -11303,7 +11310,7 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tslib@2.6.3: {} + tslib@2.8.1: {} tsscmp@1.0.6: {} @@ -11413,7 +11420,7 @@ snapshots: use-callback-ref@1.3.2(@types/react@18.3.12)(react@18.3.1): dependencies: react: 18.3.1 - tslib: 2.6.3 + tslib: 2.8.1 optionalDependencies: '@types/react': 18.3.12 @@ -11421,7 +11428,7 @@ snapshots: dependencies: detect-node-es: 1.1.0 react: 18.3.1 - tslib: 2.6.3 + tslib: 2.8.1 optionalDependencies: '@types/react': 18.3.12 @@ -11665,6 +11672,6 @@ snapshots: zwitch@2.0.4: {} - zx@8.2.0: + zx@8.2.1: optionalDependencies: '@types/fs-extra': 11.0.4 diff --git a/tests/integration/external-helpers/config-override/package.json b/tests/integration/external-helpers/config-override/package.json index 1f22e7189..c3ce51edd 100644 --- a/tests/integration/external-helpers/config-override/package.json +++ b/tests/integration/external-helpers/config-override/package.json @@ -4,6 +4,6 @@ "private": true, "type": "module", "dependencies": { - "@swc/helpers": "0.5.13" + "@swc/helpers": "0.5.15" } } diff --git a/tests/integration/external-helpers/true/package.json b/tests/integration/external-helpers/true/package.json index 5beaa15a6..a87cd537d 100644 --- a/tests/integration/external-helpers/true/package.json +++ b/tests/integration/external-helpers/true/package.json @@ -4,6 +4,6 @@ "private": true, "type": "module", "dependencies": { - "@swc/helpers": "0.5.13" + "@swc/helpers": "0.5.15" } } From c42383aa2f36f9adee686e0f18269f3144f6e498 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 05:46:22 +0000 Subject: [PATCH 17/23] chore(deps): update dependency @module-federation/rsbuild-plugin to ^0.7.1 (#394) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../module-federation/mf-host/package.json | 2 +- .../mf-react-component/package.json | 2 +- .../module-federation/mf-remote/package.json | 2 +- pnpm-lock.yaml | 39 +++++++------------ tests/package.json | 2 +- 5 files changed, 17 insertions(+), 30 deletions(-) diff --git a/examples/module-federation/mf-host/package.json b/examples/module-federation/mf-host/package.json index 14a34014c..97404841a 100644 --- a/examples/module-federation/mf-host/package.json +++ b/examples/module-federation/mf-host/package.json @@ -12,7 +12,7 @@ "react-dom": "^18.3.1" }, "devDependencies": { - "@module-federation/rsbuild-plugin": "^0.6.15", + "@module-federation/rsbuild-plugin": "^0.7.1", "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@types/react": "^18.3.12", diff --git a/examples/module-federation/mf-react-component/package.json b/examples/module-federation/mf-react-component/package.json index ff76933dc..092f015f3 100644 --- a/examples/module-federation/mf-react-component/package.json +++ b/examples/module-federation/mf-react-component/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@module-federation/enhanced": "^0.7.1", - "@module-federation/rsbuild-plugin": "^0.6.15", + "@module-federation/rsbuild-plugin": "^0.7.1", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@types/react": "^18.3.12", diff --git a/examples/module-federation/mf-remote/package.json b/examples/module-federation/mf-remote/package.json index 1b219f0ce..25e6fc43a 100644 --- a/examples/module-federation/mf-remote/package.json +++ b/examples/module-federation/mf-remote/package.json @@ -12,7 +12,7 @@ "react-dom": "^18.3.1" }, "devDependencies": { - "@module-federation/rsbuild-plugin": "^0.6.15", + "@module-federation/rsbuild-plugin": "^0.7.1", "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-react": "^1.0.7", "@types/react": "^18.3.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da74ec8ea..4978a1418 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -87,8 +87,8 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@module-federation/rsbuild-plugin': - specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) + specifier: ^0.7.1 + version: 0.7.1(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@rsbuild/core': specifier: ~1.1.0 version: 1.1.0 @@ -111,8 +111,8 @@ importers: specifier: ^0.7.1 version: 0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0) '@module-federation/rsbuild-plugin': - specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) + specifier: ^0.7.1 + version: 0.7.1(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@rsbuild/plugin-react': specifier: ^1.0.7 version: 1.0.7(@rsbuild/core@1.1.0) @@ -142,8 +142,8 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@module-federation/rsbuild-plugin': - specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) + specifier: ^0.7.1 + version: 0.7.1(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@rsbuild/core': specifier: ~1.1.0 version: 1.1.0 @@ -340,8 +340,8 @@ importers: specifier: ^3.1.1 version: 3.1.1(vite@5.3.3(@types/node@22.8.1)(terser@5.31.6))(vitest@2.1.4(@types/node@22.8.1)(terser@5.31.6)) '@module-federation/rsbuild-plugin': - specifier: ^0.6.15 - version: 0.6.15(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) + specifier: ^0.7.1 + version: 0.7.1(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) '@playwright/test': specifier: 1.48.2 version: 1.48.2 @@ -1406,11 +1406,11 @@ packages: '@module-federation/manifest@0.7.1': resolution: {integrity: sha512-ugZz6y1ltxIrO7EVUthHyog/+dydizgFKc+MFxqyO9SE1xkN1wtsJpw+s0C8ASG6oB5ADhpnIn5zgmRwB3EKIA==} - '@module-federation/rsbuild-plugin@0.6.15': - resolution: {integrity: sha512-/VCcud4Wq7DNVbH7vH5sZk2ms5oBhpCkNCyhN37Rf/+Kv1wkjqhNm9DQjGnW+G/M2N7RcrrpNIizCkJd2/Mt+A==} + '@module-federation/rsbuild-plugin@0.7.1': + resolution: {integrity: sha512-iPZ2ztIPLzK6Dp7ZACYT8Fqi5kkzxkESZfqyeAMMsftEqYGNf2c6YcH7P3rBAM1hD9UWbTSZQdBFkM7nP4Hw0w==} engines: {node: '>=16.0.0'} peerDependencies: - '@module-federation/enhanced': 0.6.15 + '@module-federation/enhanced': 0.7.1 '@rsbuild/core': 1.x '@module-federation/rspack@0.7.1': @@ -1439,9 +1439,6 @@ packages: '@module-federation/sdk@0.5.1': resolution: {integrity: sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA==} - '@module-federation/sdk@0.6.15': - resolution: {integrity: sha512-2hRCwigHmSWy0wjd23YZVxt8jL1Ael4xElDTTyyOn1JpBy0qDbZvT6tZYvpyGIMw/0OWCwq1fHLFYwwhkfIbTw==} - '@module-federation/sdk@0.7.1': resolution: {integrity: sha512-fcjJoxdi8YHYAU9gcFC2hoDPoE4rbpfpJyVE/RNbnAP+nhYNVU4WDm9PO4HohDMZ5a/4Xr0z6WSh4ZqdFn7+AA==} @@ -3822,10 +3819,6 @@ packages: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} - isomorphic-rslog@0.0.4: - resolution: {integrity: sha512-KwROYmorP1F97yiPCRENbvJRshPiWFLzU73CSzqO8jUVGiGK8d3RqrKBSTmSLc7MKse69LyYydTq6Xy0xBFE0g==} - engines: {node: '>=14.17.6'} - isomorphic-rslog@0.0.6: resolution: {integrity: sha512-HM0q6XqQ93psDlqvuViNs/Ea3hAyGDkIdVAHlrEocjjAwGrs1fZ+EdQjS9eUPacnYB7Y8SoDdSY3H8p3ce205A==} engines: {node: '>=14.17.6'} @@ -6605,10 +6598,10 @@ snapshots: - utf-8-validate - vue-tsc - '@module-federation/rsbuild-plugin@0.6.15(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0)': + '@module-federation/rsbuild-plugin@0.7.1(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0)': dependencies: '@module-federation/enhanced': 0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0) - '@module-federation/sdk': 0.6.15 + '@module-federation/sdk': 0.7.1 '@rsbuild/core': 1.1.0 '@module-federation/rspack@0.7.1(typescript@5.6.3)': @@ -6648,10 +6641,6 @@ snapshots: '@module-federation/sdk@0.5.1': {} - '@module-federation/sdk@0.6.15': - dependencies: - isomorphic-rslog: 0.0.4 - '@module-federation/sdk@0.7.1': dependencies: isomorphic-rslog: 0.0.6 @@ -9272,8 +9261,6 @@ snapshots: isobject@3.0.1: {} - isomorphic-rslog@0.0.4: {} - isomorphic-rslog@0.0.6: {} isomorphic-ws@5.0.0(ws@8.18.0): diff --git a/tests/package.json b/tests/package.json index 5aba48f4c..03fc82b5b 100644 --- a/tests/package.json +++ b/tests/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@codspeed/vitest-plugin": "^3.1.1", - "@module-federation/rsbuild-plugin": "^0.6.15", + "@module-federation/rsbuild-plugin": "^0.7.1", "@playwright/test": "1.48.2", "@rsbuild/core": "~1.1.0", "@rsbuild/plugin-less": "^1.1.0", From 30b0ec1ad856629f06d4f4c9707bb231c0eb6171 Mon Sep 17 00:00:00 2001 From: Wei Date: Mon, 11 Nov 2024 13:51:03 +0800 Subject: [PATCH 18/23] feat(command): support --lib arguments (#390) --- packages/core/src/build.ts | 11 +++- packages/core/src/cli/commands.ts | 30 ++++++++- packages/core/src/config.ts | 26 +++++--- tests/integration/cli/build.test.ts | 54 +++++++++++++++ tests/integration/cli/index.test.ts | 40 ----------- tests/integration/cli/inspect.test.ts | 95 +++++++++++++++++++++++++++ tests/integration/cli/src/index.ts | 1 + website/docs/en/guide/basic/cli.mdx | 2 + 8 files changed, 204 insertions(+), 55 deletions(-) create mode 100644 tests/integration/cli/build.test.ts delete mode 100644 tests/integration/cli/index.test.ts create mode 100644 tests/integration/cli/inspect.test.ts create mode 100644 tests/integration/cli/src/index.ts diff --git a/packages/core/src/build.ts b/packages/core/src/build.ts index a4894f95b..d689cb65b 100644 --- a/packages/core/src/build.ts +++ b/packages/core/src/build.ts @@ -1,13 +1,18 @@ -import type { RsbuildInstance } from '@rsbuild/core'; +import { type RsbuildInstance, createRsbuild } from '@rsbuild/core'; import type { BuildOptions } from './cli/commands'; -import { initRsbuild } from './config'; +import { composeRsbuildEnvironments, pruneEnvironments } from './config'; import type { RslibConfig } from './types/config'; export async function build( config: RslibConfig, options?: BuildOptions, ): Promise { - const rsbuildInstance = await initRsbuild(config); + const environments = await composeRsbuildEnvironments(config); + const rsbuildInstance = await createRsbuild({ + rsbuildConfig: { + environments: pruneEnvironments(environments, options?.lib), + }, + }); await rsbuildInstance.build({ watch: options?.watch, diff --git a/packages/core/src/cli/commands.ts b/packages/core/src/cli/commands.ts index 49c10f7e6..3c0df6209 100644 --- a/packages/core/src/cli/commands.ts +++ b/packages/core/src/cli/commands.ts @@ -1,12 +1,17 @@ -import type { RsbuildMode } from '@rsbuild/core'; +import { type RsbuildMode, createRsbuild } from '@rsbuild/core'; import { type Command, program } from 'commander'; import { build } from '../build'; -import { initRsbuild, loadConfig } from '../config'; +import { + composeRsbuildEnvironments, + loadConfig, + pruneEnvironments, +} from '../config'; import { logger } from '../utils/logger'; export type CommonOptions = { config?: string; envMode?: string; + lib?: string[]; }; export type BuildOptions = CommonOptions & { @@ -31,6 +36,10 @@ const applyCommonOptions = (command: Command) => { ); }; +const repeatableOption = (value: string, previous: string[]) => { + return (previous ?? []).concat([value]); +}; + export function runCli(): void { program.name('rslib').usage(' [options]').version(RSLIB_VERSION); @@ -40,6 +49,11 @@ export function runCli(): void { [buildCommand, inspectCommand].forEach(applyCommonOptions); buildCommand + .option( + '--lib ', + 'build the specified library (may be repeated)', + repeatableOption, + ) .option('-w --watch', 'turn on watch mode, watch for changes and rebuild') .description('build the library for production') .action(async (options: BuildOptions) => { @@ -58,6 +72,11 @@ export function runCli(): void { inspectCommand .description('inspect the Rsbuild / Rspack configs of Rslib projects') + .option( + '--lib ', + 'inspect the specified library (may be repeated)', + repeatableOption, + ) .option( '--output ', 'specify inspect content output path', @@ -71,7 +90,12 @@ export function runCli(): void { path: options.config, envMode: options.envMode, }); - const rsbuildInstance = await initRsbuild(rslibConfig); + const environments = await composeRsbuildEnvironments(rslibConfig); + const rsbuildInstance = await createRsbuild({ + rsbuildConfig: { + environments: pruneEnvironments(environments, options.lib), + }, + }); await rsbuildInstance.inspectConfig({ mode: options.mode, verbose: options.verbose, diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index ac109619a..a0d57763f 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -1,9 +1,8 @@ import fs from 'node:fs'; import path, { dirname, extname, isAbsolute, join } from 'node:path'; import { + type EnvironmentConfig, type RsbuildConfig, - type RsbuildInstance, - createRsbuild, defineConfig as defineRsbuildConfig, loadConfig as loadRsbuildConfig, mergeRsbuildConfig, @@ -1191,9 +1190,9 @@ export async function composeCreateRsbuildConfig( return composedRsbuildConfig; } -export async function initRsbuild( +export async function composeRsbuildEnvironments( rslibConfig: RslibConfig, -): Promise { +): Promise> { const rsbuildConfigObject = await composeCreateRsbuildConfig(rslibConfig); const environments: RsbuildConfig['environments'] = {}; const formatCount: Record = rsbuildConfigObject.reduce( @@ -1220,9 +1219,18 @@ export async function initRsbuild( ] = config; } - return createRsbuild({ - rsbuildConfig: { - environments, - }, - }); + return environments; } + +export const pruneEnvironments = ( + environments: Record, + libs?: string[], +): Record => { + if (!libs) { + return environments; + } + + return Object.fromEntries( + Object.entries(environments).filter(([name]) => libs.includes(name)), + ); +}; diff --git a/tests/integration/cli/build.test.ts b/tests/integration/cli/build.test.ts new file mode 100644 index 000000000..3ff9ba998 --- /dev/null +++ b/tests/integration/cli/build.test.ts @@ -0,0 +1,54 @@ +import { execSync } from 'node:child_process'; +import path from 'node:path'; +import fse from 'fs-extra'; +import { globContentJSON } from 'test-helper'; +import { describe, expect, test } from 'vitest'; + +describe('build command', async () => { + test('basic', async () => { + await fse.remove(path.join(__dirname, 'dist')); + execSync('npx rslib build', { + cwd: __dirname, + }); + + const files = await globContentJSON(path.join(__dirname, 'dist')); + const fileNames = Object.keys(files).sort(); + expect(fileNames).toMatchInlineSnapshot(` + [ + "/tests/integration/cli/dist/cjs/index.cjs", + "/tests/integration/cli/dist/esm/index.js", + ] + `); + }); + + test('--lib', async () => { + await fse.remove(path.join(__dirname, 'dist')); + execSync('npx rslib build --lib esm', { + cwd: __dirname, + }); + + const files = await globContentJSON(path.join(__dirname, 'dist')); + const fileNames = Object.keys(files).sort(); + expect(fileNames).toMatchInlineSnapshot(` + [ + "/tests/integration/cli/dist/esm/index.js", + ] + `); + }); + + test('--lib multiple', async () => { + await fse.remove(path.join(__dirname, 'dist')); + execSync('npx rslib build --lib esm --lib cjs', { + cwd: __dirname, + }); + + const files = await globContentJSON(path.join(__dirname, 'dist')); + const fileNames = Object.keys(files).sort(); + expect(fileNames).toMatchInlineSnapshot(` + [ + "/tests/integration/cli/dist/cjs/index.cjs", + "/tests/integration/cli/dist/esm/index.js", + ] + `); + }); +}); diff --git a/tests/integration/cli/index.test.ts b/tests/integration/cli/index.test.ts deleted file mode 100644 index b9abc7555..000000000 --- a/tests/integration/cli/index.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { execSync } from 'node:child_process'; -import path from 'node:path'; -import fse from 'fs-extra'; -import { globContentJSON } from 'test-helper'; -import { expect, test } from 'vitest'; - -test.todo('build command', async () => {}); - -test('inspect command', async () => { - await fse.remove(path.join(__dirname, 'dist')); - execSync('npx rslib inspect', { - cwd: __dirname, - }); - - const files = await globContentJSON(path.join(__dirname, 'dist/.rsbuild')); - const fileNames = Object.keys(files).sort(); - - expect(fileNames).toMatchInlineSnapshot(` - [ - "/tests/integration/cli/dist/.rsbuild/rsbuild.config.cjs.mjs", - "/tests/integration/cli/dist/.rsbuild/rsbuild.config.esm.mjs", - "/tests/integration/cli/dist/.rsbuild/rspack.config.cjs.mjs", - "/tests/integration/cli/dist/.rsbuild/rspack.config.esm.mjs", - ] - `); - - // esm rsbuild config - const rsbuildConfigEsm = fileNames.find((item) => - item.includes('rsbuild.config.esm.mjs'), - ); - expect(rsbuildConfigEsm).toBeTruthy(); - expect(files[rsbuildConfigEsm!]).toContain("type: 'modern-module'"); - - // esm rspack config - const rspackConfigEsm = fileNames.find((item) => - item.includes('rspack.config.esm.mjs'), - ); - expect(rspackConfigEsm).toBeTruthy(); - expect(files[rspackConfigEsm!]).toContain("type: 'modern-module'"); -}); diff --git a/tests/integration/cli/inspect.test.ts b/tests/integration/cli/inspect.test.ts new file mode 100644 index 000000000..88b2a71dc --- /dev/null +++ b/tests/integration/cli/inspect.test.ts @@ -0,0 +1,95 @@ +import { execSync } from 'node:child_process'; +import path from 'node:path'; +import { describe } from 'node:test'; +import fse from 'fs-extra'; +import { globContentJSON } from 'test-helper'; +import { expect, test } from 'vitest'; + +describe('inspect command', async () => { + test('basic', async () => { + await fse.remove(path.join(__dirname, 'dist')); + execSync('npx rslib inspect', { + cwd: __dirname, + }); + + const files = await globContentJSON(path.join(__dirname, 'dist/.rsbuild')); + const fileNames = Object.keys(files).sort(); + + expect(fileNames).toMatchInlineSnapshot(` + [ + "/tests/integration/cli/dist/.rsbuild/rsbuild.config.cjs.mjs", + "/tests/integration/cli/dist/.rsbuild/rsbuild.config.esm.mjs", + "/tests/integration/cli/dist/.rsbuild/rspack.config.cjs.mjs", + "/tests/integration/cli/dist/.rsbuild/rspack.config.esm.mjs", + ] + `); + + // esm rsbuild config + const rsbuildConfigEsm = fileNames.find((item) => + item.includes('rsbuild.config.esm.mjs'), + ); + expect(rsbuildConfigEsm).toBeTruthy(); + expect(files[rsbuildConfigEsm!]).toContain("type: 'modern-module'"); + + // esm rspack config + const rspackConfigEsm = fileNames.find((item) => + item.includes('rspack.config.esm.mjs'), + ); + expect(rspackConfigEsm).toBeTruthy(); + expect(files[rspackConfigEsm!]).toContain("type: 'modern-module'"); + }); + + test('--lib', async () => { + await fse.remove(path.join(__dirname, 'dist')); + execSync('npx rslib inspect --lib esm', { + cwd: __dirname, + }); + + const files = await globContentJSON( + path.join(__dirname, 'dist/esm/.rsbuild'), + ); + const fileNames = Object.keys(files).sort(); + + // Rsbuild will emit dump files to `dist/esm` if only one environment is specified. + expect(fileNames).toMatchInlineSnapshot(` + [ + "/tests/integration/cli/dist/esm/.rsbuild/rsbuild.config.mjs", + "/tests/integration/cli/dist/esm/.rsbuild/rspack.config.esm.mjs", + ] + `); + + // esm rsbuild config + const rsbuildConfigEsm = fileNames.find((item) => + item.includes('rsbuild.config.mjs'), + ); + expect(rsbuildConfigEsm).toBeTruthy(); + expect(files[rsbuildConfigEsm!]).toContain("type: 'modern-module'"); + + // esm rspack config + const rspackConfigEsm = fileNames.find((item) => + item.includes('rspack.config.esm.mjs'), + ); + expect(rspackConfigEsm).toBeTruthy(); + expect(files[rspackConfigEsm!]).toContain("type: 'modern-module'"); + }); + + test('--lib multiple', async () => { + await fse.remove(path.join(__dirname, 'dist')); + execSync('npx rslib inspect --lib esm --lib cjs', { + cwd: __dirname, + }); + + const files = await globContentJSON(path.join(__dirname, 'dist/.rsbuild')); + const fileNames = Object.keys(files).sort(); + + // Rsbuild will emit dump files to `dist/esm` if only one environment is specified. + expect(fileNames).toMatchInlineSnapshot(` + [ + "/tests/integration/cli/dist/.rsbuild/rsbuild.config.cjs.mjs", + "/tests/integration/cli/dist/.rsbuild/rsbuild.config.esm.mjs", + "/tests/integration/cli/dist/.rsbuild/rspack.config.cjs.mjs", + "/tests/integration/cli/dist/.rsbuild/rspack.config.esm.mjs", + ] + `); + }); +}); diff --git a/tests/integration/cli/src/index.ts b/tests/integration/cli/src/index.ts new file mode 100644 index 000000000..3329a7d97 --- /dev/null +++ b/tests/integration/cli/src/index.ts @@ -0,0 +1 @@ +export const foo = 'foo'; diff --git a/website/docs/en/guide/basic/cli.mdx b/website/docs/en/guide/basic/cli.mdx index ba89de945..c455f6c30 100644 --- a/website/docs/en/guide/basic/cli.mdx +++ b/website/docs/en/guide/basic/cli.mdx @@ -37,6 +37,7 @@ build the library for production Options: -c --config specify the configuration file, can be a relative or absolute path --env-mode specify the env mode to load the `.env.[mode]` file + --lib build the specified library (may be repeated) -w --watch turn on watch mode, watch for changes and rebuild -h, --help display help for command ``` @@ -58,6 +59,7 @@ inspect the Rsbuild / Rspack configs of Rslib projects Options: -c --config specify the configuration file, can be a relative or absolute path --env-mode specify the env mode to load the `.env.[mode]` file + --lib build the specified library (may be repeated) --output specify inspect content output path (default: ".rsbuild") --verbose show full function definitions in output -h, --help display help for command From 95e11798aeaa8cc58a8d322328d6654d25455ccf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:28:50 +0800 Subject: [PATCH 19/23] chore(deps): update dependency rspress to v1.36.0 (#396) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 172 +++++++++++++++++++++---------------------- website/package.json | 2 +- 2 files changed, 87 insertions(+), 87 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4978a1418..8b5bcb948 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -766,8 +766,8 @@ importers: specifier: 1.0.3 version: 1.0.3(@rsbuild/core@1.1.0) rspress: - specifier: 1.35.4 - version: 1.35.4(webpack@5.94.0) + specifier: 1.36.0 + version: 1.36.0(webpack@5.94.0) rspress-plugin-font-open-sans: specifier: 1.0.0 version: 1.0.0 @@ -1362,8 +1362,8 @@ packages: '@microsoft/tsdoc@0.15.0': resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} - '@modern-js/utils@2.60.6': - resolution: {integrity: sha512-rAeqAHiUUnStwBTkP1tdQSz29o/Qtoc2OUfz6TEAtEPoAxcFSc44+hwux7mQkSxXSzBjkbev5RMkwVwuM2FWtw==} + '@modern-js/utils@2.61.0': + resolution: {integrity: sha512-p0AvefKHLX96Oea1I8mKCDhuDHkGT61dcWbVomZ0LKyJnDY/0YFiOX1kVeWJBfuka+2qdgH6wXE905K2uB7wEQ==} '@module-federation/bridge-react-webpack-plugin@0.7.1': resolution: {integrity: sha512-LTDm2xxd70zYtpe9h6iyEgmMtc2MJdHBoFKRCcDmbcojHAoxEJBQnWuXT6QdPM+uKCqobcPIqGAciPc6xymaaA==} @@ -1872,89 +1872,89 @@ packages: react-refresh: optional: true - '@rspress/core@1.35.4': - resolution: {integrity: sha512-tGMUYxBN3qZKkwjRKcNG4lQY4KFIoA7HCEy9mQbwV6EVK8pNZAUdGkqCaviKrVTDXF4tmLy5Qoaplz8diYQmmw==} + '@rspress/core@1.36.0': + resolution: {integrity: sha512-V0Fgwx1FepkIbyZUlICNSYIJR/H20fwEkDEAFIFC1m21ku8ZPy69+NM3aBaLbBIWwVHjX8Bl2ifMlAqNG3sE7Q==} engines: {node: '>=14.17.6'} - '@rspress/mdx-rs-darwin-arm64@0.6.1': - resolution: {integrity: sha512-XV/meKCyAbuhv4u1iC2Y0l6bwspiqAwmSA55wG5r1L88DG5kD1sntiIB5seKkr7oUXcDJ/QbRy76GZuHuYdBzA==} + '@rspress/mdx-rs-darwin-arm64@0.6.3': + resolution: {integrity: sha512-kVEEezCAIOh22ag5xtXk36uHyjmo20eDSWz7xiM4CqwTvnZhZRW14fI2z9DN8EiZlbBi6U3A3aoI+LUOHToXUw==} engines: {node: '>=14.12'} cpu: [arm64] os: [darwin] - '@rspress/mdx-rs-darwin-x64@0.6.1': - resolution: {integrity: sha512-29G3RfWSyfQOuNLnI4XC6uOwCf6tFtigcBDYFFY+JmYltUetRNRBCnn9xOyLd3RUKFaoc97oKRzwWBzpKougYw==} + '@rspress/mdx-rs-darwin-x64@0.6.3': + resolution: {integrity: sha512-E/e/BSOHc3lvQVbrclqJZQg7SYgVjfQB6TTiOx3BzyaO+nz9znn/Gz+qn4bUT+ncxV6X+wiR/DiIEkg5xPmxlw==} engines: {node: '>=14.12'} cpu: [x64] os: [darwin] - '@rspress/mdx-rs-linux-arm64-gnu@0.6.1': - resolution: {integrity: sha512-SHPlnghHBBx+yU+HyP1pZEeC6aKtx654kfKXx9YMauGvmA2XbTU7FRIio8rYK+e310F67vAZH7SRcTeczhSlyA==} + '@rspress/mdx-rs-linux-arm64-gnu@0.6.3': + resolution: {integrity: sha512-jocoifBbrFn/lZZsYnQs9nO+fCdgO2XH2HJiHh9FmA02yl3dbjlqh+xiWvZmUukcWgR5SkD+f2AEAkC1zje3Rw==} engines: {node: '>=14.12'} cpu: [arm64] os: [linux] - '@rspress/mdx-rs-linux-arm64-musl@0.6.1': - resolution: {integrity: sha512-8o+V3LZ/OvT/0kky56GVM9uqCWbfi5m/RlCE2pS7DqZYvQZcMVeZc14eEWLtLcZd2dsZlqmT/fekbEkoP+pu5Q==} + '@rspress/mdx-rs-linux-arm64-musl@0.6.3': + resolution: {integrity: sha512-1a4o2Iieinc36LEUAzOuRe78O4Z2rqY6BOBhJCzeE37GFVThvJIRz6vz5+UKhQS77E8RwjXs0RlI1Hhub3XeZg==} engines: {node: '>=14.12'} cpu: [arm64] os: [linux] - '@rspress/mdx-rs-linux-x64-gnu@0.6.1': - resolution: {integrity: sha512-v4ZIscNR7AyeQE/8Hcy5Sceh2sbc481GfAUV7LMTcaAiAdHvVQXdWxeoUA/x23uAXmfP+dveZcmhfoGMe/y4rQ==} + '@rspress/mdx-rs-linux-x64-gnu@0.6.3': + resolution: {integrity: sha512-46oR4DgDXPPg3yfz+ty5gTwhdMsECbgiR1uPiwiHYOdNvmLABl4EEXyfr5FP38DsaERBjenr4mFz0rgAsm6bgg==} engines: {node: '>=14.12'} cpu: [x64] os: [linux] - '@rspress/mdx-rs-linux-x64-musl@0.6.1': - resolution: {integrity: sha512-cbBIf6q73n/aB/0ctIW0FHkpBxSUXFazwXJ3nv4YISZP5/1ytE1RXsOPo47Zko3Ta41bNxLYvi5PLOz8cdIejw==} + '@rspress/mdx-rs-linux-x64-musl@0.6.3': + resolution: {integrity: sha512-+/2ATbYahVj2c16nAnarFRDB6IuN/CdR5uJ8ZhhEAyYuQn+s0hNlxhNTtZ81r/VAUHqdxgojerUPVpljobCAkg==} engines: {node: '>=14.12'} cpu: [x64] os: [linux] - '@rspress/mdx-rs-win32-arm64-msvc@0.6.1': - resolution: {integrity: sha512-x3kujsuzl3kzsL9kBQy/5QdEO6Ga9+nyG3+lbLbGHKfberT0+ZbgOMTwpQ8hetv0qs/bFZWcMhNbZ6+KwKSUYg==} + '@rspress/mdx-rs-win32-arm64-msvc@0.6.3': + resolution: {integrity: sha512-iOnTKM3zGNlJl60a7ENm+EvfhOlLE8pJlOoNfo/aQi+NjD5AWvwq8vzwI85J4lvurTC3BX5v4c3watUwzWFdNA==} engines: {node: '>=14.12'} cpu: [arm64] os: [win32] - '@rspress/mdx-rs-win32-x64-msvc@0.6.1': - resolution: {integrity: sha512-14YQOlV8YBHYNEzNZ4tXuSCWvnWpwuGI2WgXJMEBvhAFLOEpDAzof3KrcfExvBF0gxlUsC/loIorBT4RzoFn4g==} + '@rspress/mdx-rs-win32-x64-msvc@0.6.3': + resolution: {integrity: sha512-Rr7DemsbLzi+pe4HuKayty2iLuXPlHpW3lZ4Yh8Yc8k/iAX8j1BKJKFP8C/tX8n9jXCRRrr5haYsHVrvq32ySA==} engines: {node: '>=14.12'} cpu: [x64] os: [win32] - '@rspress/mdx-rs@0.6.1': - resolution: {integrity: sha512-hAZH2dZPueRACh2dL6EuKzNSxPShq0zd0BCat1IaOpJ8mX73IRvTAQib/26gTM1IRikjMY7R7Bs6/RDZrjM+dQ==} + '@rspress/mdx-rs@0.6.3': + resolution: {integrity: sha512-mljyb42a7jk/TU46VwtTopuabWV8hRHjDWEeajn/Zo1s9WcBK4TDneUogEH8TXHgrTQLheQG25vO8LoVQxuqCQ==} engines: {node: '>= 10'} - '@rspress/plugin-auto-nav-sidebar@1.35.4': - resolution: {integrity: sha512-qh4r44/GOtWTc+oOOQROF2zu5mw/NPW5PWYO93EbMIYczbjkMXsqmKCSPcWbAMsJvn7DJPXUdZCe0DS0Xmn5+w==} + '@rspress/plugin-auto-nav-sidebar@1.36.0': + resolution: {integrity: sha512-oG3uN7N9EqCdo+XwVvtCFt06BdDNT8i2OT5g3YiZsg61pXc8MHd/ADjYKsXXmGy10vronjdjSuzHsBRrt4vbTg==} engines: {node: '>=14.17.6'} - '@rspress/plugin-container-syntax@1.35.4': - resolution: {integrity: sha512-cIwxtSkQyFMFGL2CdnnXi5SVjDhM9FWiavsaYanjPqeneY6ztWwpJ+ppKcrzgArCiCrt9DTU+G7diEVPqXjYJA==} + '@rspress/plugin-container-syntax@1.36.0': + resolution: {integrity: sha512-3H/GPBkZ/6G2i/LbiGYTAx2FKPwAi29vcB5YYFdNAvTcAmdvSHFLoc3gKpemPYon1ne78AnfR9NRvfW1tqHc6A==} engines: {node: '>=14.17.6'} - '@rspress/plugin-last-updated@1.35.4': - resolution: {integrity: sha512-rIGtS4Pjk5r57EAcQ9XCJJQmwLL+UpRCmGE6MAom1UAudabT2zQwt7iLEQhQH8EK6lOcBrAiQLREMdi0/lNjfQ==} + '@rspress/plugin-last-updated@1.36.0': + resolution: {integrity: sha512-Isx5l/VZDGDhduXXg24W5froYCSOCAbWbIU+ief7XNfJvafkQb7hWaBpQuG8gHRO2hTdhnKrQ/6DNZJtEa3LeQ==} engines: {node: '>=14.17.6'} - '@rspress/plugin-medium-zoom@1.35.4': - resolution: {integrity: sha512-0q4ShCSQI3nL1v13pUnKjV+u6KX3QO8KB/MXyWH97sIMj3TBtsPhrDnMe+JD1FsH0/rhVo61vi2cYDCa24c3oA==} + '@rspress/plugin-medium-zoom@1.36.0': + resolution: {integrity: sha512-KlU0FnI+uHMmJ+TKhw2ij+jal2MvBE5aoRcoP+TIwKx1OgUvkndMxaTwfbPChO9K+fYgFNifzW88iHJ3TBqehA==} engines: {node: '>=14.17.6'} peerDependencies: - '@rspress/runtime': ^1.35.4 + '@rspress/runtime': ^1.36.0 - '@rspress/runtime@1.35.4': - resolution: {integrity: sha512-nGKU/43wYNJZE31nniw0KQq7KqHkm/RaNxRi2i1/eHLYBI5VStqZ5bwwXGr8WXfA9I+d/L51gczjXHgy8Dje+A==} + '@rspress/runtime@1.36.0': + resolution: {integrity: sha512-ShsIsGBY84xUhOq8zptaBh7Qezr63F0H5+vS+lhfS6efdao1wspxogJHdF0ljZmAY76HE9vktDq8TZsvdJq4VA==} engines: {node: '>=14.17.6'} - '@rspress/shared@1.35.4': - resolution: {integrity: sha512-hZdSQuTN+OCwv6hM9WL1zqGoyg5zDNXSbgoMDQCWhppVcmKMLe+5g+wr6gqegrzBWhhAnbf0WvgHksVArpW1HA==} + '@rspress/shared@1.36.0': + resolution: {integrity: sha512-aL7jwOZwPnrdzTrixmvPOaz4HzM4mH1ySU15CxIozew8RuW/heT/2Hem6zK7MobSWVnNWAT4/XzodBcYjQAsiA==} - '@rspress/theme-default@1.35.4': - resolution: {integrity: sha512-654JQddPAdjr7oGua2Yj7bjtOum2nNEQvFQTRV5osb7oV1j/YNeQuLDvJfbog9GVGzjlXatoMNhhmwZxQ5FN+w==} + '@rspress/theme-default@1.36.0': + resolution: {integrity: sha512-6wP/AgselPLCHblBGYx5p5bUz8tD30O1+q1Rw3To0swO4AVeocNUM6n4PONzABsb76EyE6VytAN0BVvNi5laOw==} engines: {node: '>=14.17.6'} '@rstack-dev/doc-ui@1.5.3': @@ -4957,8 +4957,8 @@ packages: rspress-plugin-font-open-sans@1.0.0: resolution: {integrity: sha512-4GP0pd7h3W8EWdqE0VkA62nzUJZNy4ZnYK7be8+lOKHQKsQ5nZ+22A/VurNssi1eZFx3kjwbmIuoAkgb5W8S9Q==} - rspress@1.35.4: - resolution: {integrity: sha512-vaUx16imcqJJMyQj0NbTkIthh73A/9sNWfQnRd5JJZBf/T3FHO9PMzvqivMOYE6kpUy/LMzvUBTmRWfQkM+Wgg==} + rspress@1.36.0: + resolution: {integrity: sha512-2CHqRoR+edgmPL6mwCFpxLHHqgr5zUGcHYgM6BkwA0QHFi8C3C3AhxW2UMuR1SB3L4DE7G50yU7DogFNGXrT7g==} hasBin: true run-parallel@1.2.0: @@ -6506,7 +6506,7 @@ snapshots: '@microsoft/tsdoc@0.15.0': {} - '@modern-js/utils@2.60.6': + '@modern-js/utils@2.61.0': dependencies: '@swc/helpers': 0.5.13 caniuse-lite: 1.0.30001663 @@ -7037,25 +7037,25 @@ snapshots: optionalDependencies: react-refresh: 0.14.2 - '@rspress/core@1.35.4(webpack@5.94.0)': + '@rspress/core@1.36.0(webpack@5.94.0)': dependencies: '@loadable/component': 5.16.4(react@18.3.1) '@mdx-js/loader': 2.3.0(webpack@5.94.0) '@mdx-js/mdx': 2.3.0 '@mdx-js/react': 2.3.0(react@18.3.1) - '@modern-js/utils': 2.60.6 + '@modern-js/utils': 2.61.0 '@rsbuild/core': 1.0.19 '@rsbuild/plugin-less': 1.0.3(@rsbuild/core@1.0.19) '@rsbuild/plugin-react': 1.0.7(@rsbuild/core@1.0.19) '@rsbuild/plugin-sass': 1.0.4(@rsbuild/core@1.0.19) - '@rspress/mdx-rs': 0.6.1 - '@rspress/plugin-auto-nav-sidebar': 1.35.4 - '@rspress/plugin-container-syntax': 1.35.4 - '@rspress/plugin-last-updated': 1.35.4 - '@rspress/plugin-medium-zoom': 1.35.4(@rspress/runtime@1.35.4) - '@rspress/runtime': 1.35.4 - '@rspress/shared': 1.35.4 - '@rspress/theme-default': 1.35.4 + '@rspress/mdx-rs': 0.6.3 + '@rspress/plugin-auto-nav-sidebar': 1.36.0 + '@rspress/plugin-container-syntax': 1.36.0 + '@rspress/plugin-last-updated': 1.36.0 + '@rspress/plugin-medium-zoom': 1.36.0(@rspress/runtime@1.36.0) + '@rspress/runtime': 1.36.0 + '@rspress/shared': 1.36.0 + '@rspress/theme-default': 1.36.0 body-scroll-lock: 4.0.0-beta.0 copy-to-clipboard: 3.3.3 enhanced-resolve: 5.17.1 @@ -7092,67 +7092,67 @@ snapshots: - supports-color - webpack - '@rspress/mdx-rs-darwin-arm64@0.6.1': + '@rspress/mdx-rs-darwin-arm64@0.6.3': optional: true - '@rspress/mdx-rs-darwin-x64@0.6.1': + '@rspress/mdx-rs-darwin-x64@0.6.3': optional: true - '@rspress/mdx-rs-linux-arm64-gnu@0.6.1': + '@rspress/mdx-rs-linux-arm64-gnu@0.6.3': optional: true - '@rspress/mdx-rs-linux-arm64-musl@0.6.1': + '@rspress/mdx-rs-linux-arm64-musl@0.6.3': optional: true - '@rspress/mdx-rs-linux-x64-gnu@0.6.1': + '@rspress/mdx-rs-linux-x64-gnu@0.6.3': optional: true - '@rspress/mdx-rs-linux-x64-musl@0.6.1': + '@rspress/mdx-rs-linux-x64-musl@0.6.3': optional: true - '@rspress/mdx-rs-win32-arm64-msvc@0.6.1': + '@rspress/mdx-rs-win32-arm64-msvc@0.6.3': optional: true - '@rspress/mdx-rs-win32-x64-msvc@0.6.1': + '@rspress/mdx-rs-win32-x64-msvc@0.6.3': optional: true - '@rspress/mdx-rs@0.6.1': + '@rspress/mdx-rs@0.6.3': optionalDependencies: - '@rspress/mdx-rs-darwin-arm64': 0.6.1 - '@rspress/mdx-rs-darwin-x64': 0.6.1 - '@rspress/mdx-rs-linux-arm64-gnu': 0.6.1 - '@rspress/mdx-rs-linux-arm64-musl': 0.6.1 - '@rspress/mdx-rs-linux-x64-gnu': 0.6.1 - '@rspress/mdx-rs-linux-x64-musl': 0.6.1 - '@rspress/mdx-rs-win32-arm64-msvc': 0.6.1 - '@rspress/mdx-rs-win32-x64-msvc': 0.6.1 + '@rspress/mdx-rs-darwin-arm64': 0.6.3 + '@rspress/mdx-rs-darwin-x64': 0.6.3 + '@rspress/mdx-rs-linux-arm64-gnu': 0.6.3 + '@rspress/mdx-rs-linux-arm64-musl': 0.6.3 + '@rspress/mdx-rs-linux-x64-gnu': 0.6.3 + '@rspress/mdx-rs-linux-x64-musl': 0.6.3 + '@rspress/mdx-rs-win32-arm64-msvc': 0.6.3 + '@rspress/mdx-rs-win32-x64-msvc': 0.6.3 - '@rspress/plugin-auto-nav-sidebar@1.35.4': + '@rspress/plugin-auto-nav-sidebar@1.36.0': dependencies: - '@rspress/shared': 1.35.4 + '@rspress/shared': 1.36.0 - '@rspress/plugin-container-syntax@1.35.4': + '@rspress/plugin-container-syntax@1.36.0': dependencies: - '@rspress/shared': 1.35.4 + '@rspress/shared': 1.36.0 - '@rspress/plugin-last-updated@1.35.4': + '@rspress/plugin-last-updated@1.36.0': dependencies: - '@rspress/shared': 1.35.4 + '@rspress/shared': 1.36.0 - '@rspress/plugin-medium-zoom@1.35.4(@rspress/runtime@1.35.4)': + '@rspress/plugin-medium-zoom@1.36.0(@rspress/runtime@1.36.0)': dependencies: - '@rspress/runtime': 1.35.4 + '@rspress/runtime': 1.36.0 medium-zoom: 1.1.0 - '@rspress/runtime@1.35.4': + '@rspress/runtime@1.36.0': dependencies: - '@rspress/shared': 1.35.4 + '@rspress/shared': 1.36.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-helmet-async: 1.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-router-dom: 6.27.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@rspress/shared@1.35.4': + '@rspress/shared@1.36.0': dependencies: '@rsbuild/core': 1.0.19 chalk: 5.3.0 @@ -7161,11 +7161,11 @@ snapshots: gray-matter: 4.0.3 unified: 10.1.2 - '@rspress/theme-default@1.35.4': + '@rspress/theme-default@1.36.0': dependencies: '@mdx-js/react': 2.3.0(react@18.3.1) - '@rspress/runtime': 1.35.4 - '@rspress/shared': 1.35.4 + '@rspress/runtime': 1.36.0 + '@rspress/shared': 1.36.0 body-scroll-lock: 4.0.0-beta.0 copy-to-clipboard: 3.3.3 flexsearch: 0.7.43 @@ -10748,11 +10748,11 @@ snapshots: rspress-plugin-font-open-sans@1.0.0: {} - rspress@1.35.4(webpack@5.94.0): + rspress@1.36.0(webpack@5.94.0): dependencies: '@rsbuild/core': 1.0.19 - '@rspress/core': 1.35.4(webpack@5.94.0) - '@rspress/shared': 1.35.4 + '@rspress/core': 1.36.0(webpack@5.94.0) + '@rspress/shared': 1.36.0 cac: 6.7.14 chalk: 5.3.0 chokidar: 3.6.0 diff --git a/website/package.json b/website/package.json index e0dd2f772..0ee431400 100644 --- a/website/package.json +++ b/website/package.json @@ -18,7 +18,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "rsbuild-plugin-google-analytics": "1.0.3", - "rspress": "1.35.4", + "rspress": "1.36.0", "rspress-plugin-font-open-sans": "1.0.0" } } From b82137094bbf80de8fe8e0bef88236b214f53902 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 11 Nov 2024 16:04:21 +0800 Subject: [PATCH 20/23] docs: tsup migration guide (#397) Co-authored-by: Wei --- website/docs/en/guide/migration/_meta.json | 2 +- website/docs/en/guide/migration/tsup.mdx | 88 ++++++++++++++++++++- website/docs/en/guide/start/quick-start.mdx | 7 ++ 3 files changed, 95 insertions(+), 2 deletions(-) diff --git a/website/docs/en/guide/migration/_meta.json b/website/docs/en/guide/migration/_meta.json index a38904881..d841f9470 100644 --- a/website/docs/en/guide/migration/_meta.json +++ b/website/docs/en/guide/migration/_meta.json @@ -1 +1 @@ -["modernjs-module"] +["modernjs-module", "tsup"] diff --git a/website/docs/en/guide/migration/tsup.mdx b/website/docs/en/guide/migration/tsup.mdx index d514e9899..2f814b6cf 100644 --- a/website/docs/en/guide/migration/tsup.mdx +++ b/website/docs/en/guide/migration/tsup.mdx @@ -1 +1,87 @@ -# tsup +# Tsup + +This section introduces how to migrate a project using tsup to Rslib. + +## Installing Dependencies + +First, you need to replace the npm dependencies of tsup with Rslib's dependencies. + +import { PackageManagerTabs } from '@theme'; + +- Remove tsup: + + + +- Install Rslib: + + + +## Updating npm scripts + +Next, you need to update the npm scripts in your package.json to use Rslib's CLI commands. + +```diff title="package.json" +{ + "scripts": { +- "build": "tsup", +- "build:watch": "tsup --watch", ++ "build": "rslib build", ++ "build:watch": "rslib build --watch" + } +} +``` + +## Create Configuration File + +Create a Rslib configuration file `rslib.config.ts` in the same directory as package.json, and add the following content: + +```ts title="rslib.config.ts" +import { defineConfig } from '@rslib/core'; + +export default defineConfig({}); +``` + +## Configuration Migration + +Here is the corresponding Rslib configuration for tsup configuration: + +| tsup | Rslib | +| ------------- | ------------------------------------------------------------------------------------------ | +| banner | [lib.banner](/config/lib/banner) | +| bundle | [lib.bundle](/config/lib/bundle) | +| clean | [output.cleanDistPath](/config/rsbuild/output) | +| define | [source.define](/config/rsbuild/source) | +| dts | [lib.dts](/config/lib/dts) | +| entry | [source.entry](/config/rsbuild/source) | +| external | [output.externals](/config/rsbuild/output) / [lib.autoExternal](/config/lib/auto-external) | +| format | [lib.format](/config/lib/format) | +| footer | [lib.footer](/config/lib/footer) | +| minify | [output.minify](/config/rsbuild/output) | +| platform | [output.target](/config/rsbuild/output) | +| plugins | [plugins](/config/rsbuild/plugins) | +| sourcemap | [output.sourceMap](/config/rsbuild/output) | +| shims | [lib.shims](/config/lib/shims) | +| terserOptions | [output.minify](/config/rsbuild/output) | +| tsconfig | [source.tsconfigPath](/config/rsbuild/source) | + +## Platform + +For `platform`, tsup defaults to `node` while Rslib defaults to `web` (the same as tsup's `browser`). + +If your target platform is `node`, you can set `output.target` to `node`: + +```ts title="rslib.config.ts" +import { defineConfig } from '@rslib/core'; + +export default defineConfig({ + output: { + target: 'node', + }, +}); +``` + +## Contents Supplement + +The current document only covers part of the migration process. If you find suitable content to add, feel free to contribute to the documentation via pull request 🤝. + +> The documentation for Rslib can be found in the [rslib/website](https://github.com/web-infra-dev/rslib/tree/main/website) directory. diff --git a/website/docs/en/guide/start/quick-start.mdx b/website/docs/en/guide/start/quick-start.mdx index 2bd7d0bcc..783607712 100644 --- a/website/docs/en/guide/start/quick-start.mdx +++ b/website/docs/en/guide/start/quick-start.mdx @@ -124,3 +124,10 @@ Options: --tools select additional tools (biome, eslint, prettier) --override override files in target directory ``` + +## Migration + +If you need to migrate from an existing project to Rslib, you can refer to the following guides: + +- [Migrating from tsup](/guide/migration/tsup) +- [Migrating from Modern.js Module](/guide/migration/modernjs-module) From 7dd9a485e68292ff3f37caf3fd9d3cbfd5b24723 Mon Sep 17 00:00:00 2001 From: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> Date: Mon, 11 Nov 2024 18:05:22 +0800 Subject: [PATCH 21/23] feat!: target default to `node` (#398) --- examples/express-plugin/rslib.config.ts | 3 - .../mf-react-component/rslib.config.ts | 3 + .../rslib.config.ts | 3 + .../react-component-bundle/rslib.config.ts | 3 + examples/react-component-umd/rslib.config.ts | 3 + packages/core/rslib.config.ts | 1 + packages/core/src/config.ts | 48 +++-- packages/core/src/utils/syntax.ts | 6 +- .../tests/__snapshots__/config.test.ts.snap | 199 ++++++++++++++++-- packages/core/tests/config.test.ts | 6 - .../base/node-dual-js/rslib.config.mjs | 1 - .../base/node-dual-ts/rslib.config.ts | 1 - .../base/node-esm-js/rslib.config.mjs | 1 - .../base/node-esm-ts/rslib.config.ts | 1 - .../fragments/base/react-js/rslib.config.mjs | 3 + .../fragments/base/react-ts/rslib.config.ts | 3 + packages/create-rslib/rslib.config.ts | 1 + .../rslib.config.mjs | 1 - .../rslib.config.ts | 1 - .../rslib.config.mjs | 1 - .../rslib.config.ts | 1 - .../rslib.config.mjs | 1 - .../template-[node-esm]-[]-ts/rslib.config.ts | 1 - .../rslib.config.mjs | 1 - .../rslib.config.ts | 1 - .../template-[react]-[]-js/rslib.config.mjs | 3 + .../template-[react]-[]-ts/rslib.config.ts | 3 + .../rslib.config.mjs | 3 + .../rslib.config.ts | 3 + .../rslib.config.mjs | 3 + .../rslib.config.ts | 3 + .../rslib.config.mjs | 3 + .../rslib.config.ts | 3 + packages/plugin-dts/rslib.config.ts | 1 + tests/e2e/react-component/rsbuild.config.ts | 3 + tests/integration/asset/limit/rslib.config.ts | 3 + tests/integration/asset/name/rslib.config.ts | 3 + tests/integration/asset/path/rslib.config.ts | 3 + .../asset/public-path/rslib.config.ts | 3 + tests/integration/asset/svgr/rslib.config.ts | 3 + .../bundle-false/svgr/rslib.config.ts | 3 + .../externals/browser/rslib.config.ts | 1 + .../externals/node/rslib.config.ts | 3 +- .../integration/minify/config/rslib.config.ts | 1 - .../minify/default/rslib.config.ts | 3 - .../minify/mf/config/rslib.config.ts | 1 + .../minify/mf/default/rslib.config.ts | 3 + .../bundle-false/rslib.config.ts | 3 + .../node-polyfill/bundle/rslib.config.ts | 3 + .../require/import-dynamic/rslib.config.ts | 3 - .../require-as-expression/rslib.config.ts | 3 - .../require/require-dynamic/rslib.config.ts | 3 - .../require/require-resolve/rslib.config.ts | 3 - .../resolve/node-protocol/rslib.config.ts | 3 - .../with-condition-exports/rslib.config.ts | 2 +- .../resolve/with-main-fields/rslib.config.ts | 1 - tests/integration/shims/cjs/rslib.config.ts | 1 - tests/integration/shims/esm/rslib.config.ts | 3 - .../bundle-false-auto/rslib.config.ts | 1 + .../css-modules/bundle-false/rslib.config.ts | 3 + .../style/css-modules/bundle/rslib.config.ts | 3 + .../style/css/bundle-false/rslib.config.ts | 3 + .../style/css/bundle/rslib.config.ts | 3 + .../style/less/bundle-false/rslib.config.ts | 1 + .../style/less/bundle-import/rslib.config.ts | 3 + .../style/less/bundle/rslib.config.ts | 3 + .../lightningcss/bundle-false/rslib.config.ts | 3 + .../style/lightningcss/bundle/rslib.config.ts | 3 + .../postcss/bundle-false/rslib.config.ts | 3 + .../style/postcss/bundle/rslib.config.ts | 3 + .../redirect-style-false/rslib.config.ts | 1 + .../style/sass/bundle-false/rslib.config.ts | 11 +- .../style/sass/bundle/rslib.config.ts | 11 +- .../style/style-inject/bundle/rslib.config.ts | 1 + .../style/tailwindcss/bundle/rslib.config.ts | 3 + .../umd-library-name/rslib.config.ts | 3 + .../en/guide/advanced/module-federation.mdx | 3 + .../guide/advanced/output-compatibility.mdx | 2 +- website/docs/en/guide/basic/output-format.mdx | 3 + .../en/guide/migration/modernjs-module.mdx | 3 + website/docs/en/guide/migration/tsup.mdx | 16 -- website/docs/en/guide/solution/nodejs.mdx | 9 +- website/docs/en/guide/solution/react.mdx | 17 +- 83 files changed, 366 insertions(+), 129 deletions(-) diff --git a/examples/express-plugin/rslib.config.ts b/examples/express-plugin/rslib.config.ts index 3452d9301..5ef8af604 100644 --- a/examples/express-plugin/rslib.config.ts +++ b/examples/express-plugin/rslib.config.ts @@ -27,7 +27,4 @@ export default defineConfig({ }, }, ], - output: { - target: 'node', - }, }); diff --git a/examples/module-federation/mf-react-component/rslib.config.ts b/examples/module-federation/mf-react-component/rslib.config.ts index 8eb13c332..ced53fbfe 100644 --- a/examples/module-federation/mf-react-component/rslib.config.ts +++ b/examples/module-federation/mf-react-component/rslib.config.ts @@ -55,5 +55,8 @@ export default defineConfig({ ], }, ], + output: { + target: 'web', + }, plugins: [pluginReact()], }); diff --git a/examples/react-component-bundle-false/rslib.config.ts b/examples/react-component-bundle-false/rslib.config.ts index 7dd310a6f..a5a3fccd3 100644 --- a/examples/react-component-bundle-false/rslib.config.ts +++ b/examples/react-component-bundle-false/rslib.config.ts @@ -35,6 +35,9 @@ export default defineConfig({ }, }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/examples/react-component-bundle/rslib.config.ts b/examples/react-component-bundle/rslib.config.ts index 941177741..237965aed 100644 --- a/examples/react-component-bundle/rslib.config.ts +++ b/examples/react-component-bundle/rslib.config.ts @@ -33,6 +33,9 @@ export default defineConfig({ }, }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/examples/react-component-umd/rslib.config.ts b/examples/react-component-umd/rslib.config.ts index 97c1f0ebd..b5e4971bf 100644 --- a/examples/react-component-umd/rslib.config.ts +++ b/examples/react-component-umd/rslib.config.ts @@ -17,6 +17,9 @@ export default defineConfig({ }, }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/core/rslib.config.ts b/packages/core/rslib.config.ts index 4f725b59e..b894ac69b 100644 --- a/packages/core/rslib.config.ts +++ b/packages/core/rslib.config.ts @@ -21,6 +21,7 @@ export default defineConfig({ }, }, output: { + // TODO: Remove this after bumping Rslib target: 'node', externals: { picocolors: '../compiled/picocolors/index.js', diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index a0d57763f..2c9114ce4 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -453,6 +453,7 @@ export async function createConstantRsbuildConfig(): Promise { }, }, output: { + target: 'node', filenameHash: false, distPath: { js: './', @@ -558,7 +559,6 @@ const composeFormatConfig = ({ }, output: { asyncChunks: false, - library: umdName ? { type: 'umd', @@ -713,8 +713,8 @@ const composeAutoExtensionConfig = ( }; const composeSyntaxConfig = ( + target: RsbuildConfigOutputTarget, syntax?: Syntax, - target?: RsbuildConfigOutputTarget, ): RsbuildConfig => { // Defaults to ESNext, Rslib will assume all of the latest JavaScript and CSS features are supported. if (syntax) { @@ -941,31 +941,40 @@ const composeDtsConfig = async ( }; const composeTargetConfig = ( - target: RsbuildConfigOutputTarget = 'web', -): RsbuildConfig => { + target: RsbuildConfigOutputTarget = 'node', +): { + config: RsbuildConfig; + target: RsbuildConfigOutputTarget; +} => { switch (target) { case 'web': return { - tools: { - rspack: { - target: ['web'], + config: { + tools: { + rspack: { + target: ['web'], + }, }, }, + target: 'web', }; case 'node': return { - tools: { - rspack: { - target: ['node'], + config: { + tools: { + rspack: { + target: ['node'], + }, + }, + output: { + // When output.target is 'node', Node.js's built-in will be treated as externals of type `node-commonjs`. + // Simply override the built-in modules to make them external. + // https://github.com/webpack/webpack/blob/dd44b206a9c50f4b4cb4d134e1a0bd0387b159a3/lib/node/NodeTargetPlugin.js#L81 + externals: nodeBuiltInModules, + target: 'node', }, }, - output: { - // When output.target is 'node', Node.js's built-in will be treated as externals of type `node-commonjs`. - // Simply override the built-in modules to make them external. - // https://github.com/webpack/webpack/blob/dd44b206a9c50f4b4cb4d134e1a0bd0387b159a3/lib/node/NodeTargetPlugin.js#L81 - externals: nodeBuiltInModules, - target: 'node', - }, + target: 'node', }; // TODO: Support `neutral` target, however Rsbuild don't list it as an option in the target field. // case 'neutral': @@ -1067,11 +1076,10 @@ async function composeLibRsbuildConfig(config: LibConfig, configPath: string) { cssModulesAuto, bundle, ); - const targetConfig = composeTargetConfig(config.output?.target); - const syntaxConfig = composeSyntaxConfig( - config?.syntax, + const { config: targetConfig, target } = composeTargetConfig( config.output?.target, ); + const syntaxConfig = composeSyntaxConfig(target, config?.syntax); const autoExternalConfig = composeAutoExternalConfig({ autoExternal, pkgJson, diff --git a/packages/core/src/utils/syntax.ts b/packages/core/src/utils/syntax.ts index a62c93612..7ab9aa0c9 100644 --- a/packages/core/src/utils/syntax.ts +++ b/packages/core/src/utils/syntax.ts @@ -26,10 +26,6 @@ export const LATEST_TARGET_VERSIONS: Record< }; const calcEsnextBrowserslistByTarget = (target: RsbuildConfigOutputTarget) => { - if (!target) { - return [...LATEST_TARGET_VERSIONS.node, ...LATEST_TARGET_VERSIONS.web]; - } - if (target === 'node') { return LATEST_TARGET_VERSIONS.node; } @@ -195,7 +191,7 @@ export function transformSyntaxToRspackTarget( export function transformSyntaxToBrowserslist( syntax: Syntax, - target?: NonNullable['target'], + target: NonNullable['target'], ): NonNullable['overrideBrowserslist']> { const handleSyntaxItem = ( syntaxItem: EcmaScriptVersion | string, diff --git a/packages/core/tests/__snapshots__/config.test.ts.snap b/packages/core/tests/__snapshots__/config.test.ts.snap index e24313b11..085442d24 100644 --- a/packages/core/tests/__snapshots__/config.test.ts.snap +++ b/packages/core/tests/__snapshots__/config.test.ts.snap @@ -14,6 +14,62 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 }, "externals": [ [Function], + "assert", + "assert/strict", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "diagnostics_channel", + "dns", + "dns/promises", + "domain", + "events", + "fs", + "fs/promises", + "http", + "http2", + "https", + "inspector", + "inspector/promises", + "module", + "net", + "os", + "path", + "path/posix", + "path/win32", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "readline/promises", + "repl", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "sys", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "util/types", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib", + /\\^node:/, + "pnpapi", ], "filename": { "js": "[name].js", @@ -40,13 +96,8 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 }, "overrideBrowserslist": [ "last 1 node versions", - "last 1 Chrome versions", - "last 1 Firefox versions", - "last 1 Edge versions", - "last 1 Safari versions", - "last 1 ios_saf versions", - "not dead", ], + "target": "node", }, "performance": { "chunkSplit": { @@ -141,7 +192,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 [Function], { "target": [ - "web", + "node", ], }, { @@ -174,6 +225,64 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "distPath": { "js": "./", }, + "externals": [ + "assert", + "assert/strict", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "diagnostics_channel", + "dns", + "dns/promises", + "domain", + "events", + "fs", + "fs/promises", + "http", + "http2", + "https", + "inspector", + "inspector/promises", + "module", + "net", + "os", + "path", + "path/posix", + "path/win32", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "readline/promises", + "repl", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "sys", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "util/types", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib", + /\\^node:/, + "pnpapi", + ], "filename": { "js": "[name].js", }, @@ -199,13 +308,8 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 }, "overrideBrowserslist": [ "last 1 node versions", - "last 1 Chrome versions", - "last 1 Firefox versions", - "last 1 Edge versions", - "last 1 Safari versions", - "last 1 ios_saf versions", - "not dead", ], + "target": "node", }, "performance": { "chunkSplit": { @@ -298,7 +402,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 [Function], { "target": [ - "web", + "node", ], }, { @@ -331,6 +435,64 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "distPath": { "js": "./", }, + "externals": [ + "assert", + "assert/strict", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "diagnostics_channel", + "dns", + "dns/promises", + "domain", + "events", + "fs", + "fs/promises", + "http", + "http2", + "https", + "inspector", + "inspector/promises", + "module", + "net", + "os", + "path", + "path/posix", + "path/win32", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "readline/promises", + "repl", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "sys", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "util/types", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib", + /\\^node:/, + "pnpapi", + ], "filename": { "js": "[name].js", }, @@ -356,13 +518,8 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 }, "overrideBrowserslist": [ "last 1 node versions", - "last 1 Chrome versions", - "last 1 Firefox versions", - "last 1 Edge versions", - "last 1 Safari versions", - "last 1 ios_saf versions", - "not dead", ], + "target": "node", }, "performance": { "chunkSplit": { @@ -437,7 +594,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 [Function], { "target": [ - "web", + "node", ], }, { diff --git a/packages/core/tests/config.test.ts b/packages/core/tests/config.test.ts index 7ad92da72..d766030e9 100644 --- a/packages/core/tests/config.test.ts +++ b/packages/core/tests/config.test.ts @@ -217,12 +217,6 @@ describe('syntax', () => { ).toMatchInlineSnapshot(` [ "last 1 node versions", - "last 1 Chrome versions", - "last 1 Firefox versions", - "last 1 Edge versions", - "last 1 Safari versions", - "last 1 ios_saf versions", - "not dead", ] `); }); diff --git a/packages/create-rslib/fragments/base/node-dual-js/rslib.config.mjs b/packages/create-rslib/fragments/base/node-dual-js/rslib.config.mjs index 2e440385b..31c250f4d 100644 --- a/packages/create-rslib/fragments/base/node-dual-js/rslib.config.mjs +++ b/packages/create-rslib/fragments/base/node-dual-js/rslib.config.mjs @@ -11,5 +11,4 @@ export default defineConfig({ syntax: 'es2021', }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/fragments/base/node-dual-ts/rslib.config.ts b/packages/create-rslib/fragments/base/node-dual-ts/rslib.config.ts index cfac2795e..e9397a12f 100644 --- a/packages/create-rslib/fragments/base/node-dual-ts/rslib.config.ts +++ b/packages/create-rslib/fragments/base/node-dual-ts/rslib.config.ts @@ -12,5 +12,4 @@ export default defineConfig({ syntax: 'es2021', }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/fragments/base/node-esm-js/rslib.config.mjs b/packages/create-rslib/fragments/base/node-esm-js/rslib.config.mjs index 5b320ba49..1f7f7569e 100644 --- a/packages/create-rslib/fragments/base/node-esm-js/rslib.config.mjs +++ b/packages/create-rslib/fragments/base/node-esm-js/rslib.config.mjs @@ -7,5 +7,4 @@ export default defineConfig({ syntax: 'es2021', }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/fragments/base/node-esm-ts/rslib.config.ts b/packages/create-rslib/fragments/base/node-esm-ts/rslib.config.ts index 88195290c..9b69a2951 100644 --- a/packages/create-rslib/fragments/base/node-esm-ts/rslib.config.ts +++ b/packages/create-rslib/fragments/base/node-esm-ts/rslib.config.ts @@ -8,5 +8,4 @@ export default defineConfig({ dts: true, }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/fragments/base/react-js/rslib.config.mjs b/packages/create-rslib/fragments/base/react-js/rslib.config.mjs index 7717aff12..ea02edfa7 100644 --- a/packages/create-rslib/fragments/base/react-js/rslib.config.mjs +++ b/packages/create-rslib/fragments/base/react-js/rslib.config.mjs @@ -13,6 +13,9 @@ export default defineConfig({ format: 'esm', }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/create-rslib/fragments/base/react-ts/rslib.config.ts b/packages/create-rslib/fragments/base/react-ts/rslib.config.ts index 5ae8d4675..03bb9f7a5 100644 --- a/packages/create-rslib/fragments/base/react-ts/rslib.config.ts +++ b/packages/create-rslib/fragments/base/react-ts/rslib.config.ts @@ -14,6 +14,9 @@ export default defineConfig({ format: 'esm', }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/create-rslib/rslib.config.ts b/packages/create-rslib/rslib.config.ts index 65d00bf22..b74aaa0ed 100644 --- a/packages/create-rslib/rslib.config.ts +++ b/packages/create-rslib/rslib.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from 'rslib'; export default defineConfig({ lib: [{ format: 'esm' }], + // TODO: Remove this after bumping Rslib output: { target: 'node', }, diff --git a/packages/create-rslib/template-[node-dual]-[]-js/rslib.config.mjs b/packages/create-rslib/template-[node-dual]-[]-js/rslib.config.mjs index 2e440385b..31c250f4d 100644 --- a/packages/create-rslib/template-[node-dual]-[]-js/rslib.config.mjs +++ b/packages/create-rslib/template-[node-dual]-[]-js/rslib.config.mjs @@ -11,5 +11,4 @@ export default defineConfig({ syntax: 'es2021', }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/template-[node-dual]-[]-ts/rslib.config.ts b/packages/create-rslib/template-[node-dual]-[]-ts/rslib.config.ts index cfac2795e..e9397a12f 100644 --- a/packages/create-rslib/template-[node-dual]-[]-ts/rslib.config.ts +++ b/packages/create-rslib/template-[node-dual]-[]-ts/rslib.config.ts @@ -12,5 +12,4 @@ export default defineConfig({ syntax: 'es2021', }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/template-[node-dual]-[vitest]-js/rslib.config.mjs b/packages/create-rslib/template-[node-dual]-[vitest]-js/rslib.config.mjs index 2e440385b..31c250f4d 100644 --- a/packages/create-rslib/template-[node-dual]-[vitest]-js/rslib.config.mjs +++ b/packages/create-rslib/template-[node-dual]-[vitest]-js/rslib.config.mjs @@ -11,5 +11,4 @@ export default defineConfig({ syntax: 'es2021', }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/template-[node-dual]-[vitest]-ts/rslib.config.ts b/packages/create-rslib/template-[node-dual]-[vitest]-ts/rslib.config.ts index cfac2795e..e9397a12f 100644 --- a/packages/create-rslib/template-[node-dual]-[vitest]-ts/rslib.config.ts +++ b/packages/create-rslib/template-[node-dual]-[vitest]-ts/rslib.config.ts @@ -12,5 +12,4 @@ export default defineConfig({ syntax: 'es2021', }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/template-[node-esm]-[]-js/rslib.config.mjs b/packages/create-rslib/template-[node-esm]-[]-js/rslib.config.mjs index 5b320ba49..1f7f7569e 100644 --- a/packages/create-rslib/template-[node-esm]-[]-js/rslib.config.mjs +++ b/packages/create-rslib/template-[node-esm]-[]-js/rslib.config.mjs @@ -7,5 +7,4 @@ export default defineConfig({ syntax: 'es2021', }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/template-[node-esm]-[]-ts/rslib.config.ts b/packages/create-rslib/template-[node-esm]-[]-ts/rslib.config.ts index 88195290c..9b69a2951 100644 --- a/packages/create-rslib/template-[node-esm]-[]-ts/rslib.config.ts +++ b/packages/create-rslib/template-[node-esm]-[]-ts/rslib.config.ts @@ -8,5 +8,4 @@ export default defineConfig({ dts: true, }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/template-[node-esm]-[vitest]-js/rslib.config.mjs b/packages/create-rslib/template-[node-esm]-[vitest]-js/rslib.config.mjs index 5b320ba49..1f7f7569e 100644 --- a/packages/create-rslib/template-[node-esm]-[vitest]-js/rslib.config.mjs +++ b/packages/create-rslib/template-[node-esm]-[vitest]-js/rslib.config.mjs @@ -7,5 +7,4 @@ export default defineConfig({ syntax: 'es2021', }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/template-[node-esm]-[vitest]-ts/rslib.config.ts b/packages/create-rslib/template-[node-esm]-[vitest]-ts/rslib.config.ts index 88195290c..9b69a2951 100644 --- a/packages/create-rslib/template-[node-esm]-[vitest]-ts/rslib.config.ts +++ b/packages/create-rslib/template-[node-esm]-[vitest]-ts/rslib.config.ts @@ -8,5 +8,4 @@ export default defineConfig({ dts: true, }, ], - output: { target: 'node' }, }); diff --git a/packages/create-rslib/template-[react]-[]-js/rslib.config.mjs b/packages/create-rslib/template-[react]-[]-js/rslib.config.mjs index 7717aff12..ea02edfa7 100644 --- a/packages/create-rslib/template-[react]-[]-js/rslib.config.mjs +++ b/packages/create-rslib/template-[react]-[]-js/rslib.config.mjs @@ -13,6 +13,9 @@ export default defineConfig({ format: 'esm', }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/create-rslib/template-[react]-[]-ts/rslib.config.ts b/packages/create-rslib/template-[react]-[]-ts/rslib.config.ts index 5ae8d4675..03bb9f7a5 100644 --- a/packages/create-rslib/template-[react]-[]-ts/rslib.config.ts +++ b/packages/create-rslib/template-[react]-[]-ts/rslib.config.ts @@ -14,6 +14,9 @@ export default defineConfig({ format: 'esm', }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/create-rslib/template-[react]-[storybook,vitest]-js/rslib.config.mjs b/packages/create-rslib/template-[react]-[storybook,vitest]-js/rslib.config.mjs index 7717aff12..ea02edfa7 100644 --- a/packages/create-rslib/template-[react]-[storybook,vitest]-js/rslib.config.mjs +++ b/packages/create-rslib/template-[react]-[storybook,vitest]-js/rslib.config.mjs @@ -13,6 +13,9 @@ export default defineConfig({ format: 'esm', }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/create-rslib/template-[react]-[storybook,vitest]-ts/rslib.config.ts b/packages/create-rslib/template-[react]-[storybook,vitest]-ts/rslib.config.ts index 5ae8d4675..03bb9f7a5 100644 --- a/packages/create-rslib/template-[react]-[storybook,vitest]-ts/rslib.config.ts +++ b/packages/create-rslib/template-[react]-[storybook,vitest]-ts/rslib.config.ts @@ -14,6 +14,9 @@ export default defineConfig({ format: 'esm', }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/create-rslib/template-[react]-[storybook]-js/rslib.config.mjs b/packages/create-rslib/template-[react]-[storybook]-js/rslib.config.mjs index 7717aff12..ea02edfa7 100644 --- a/packages/create-rslib/template-[react]-[storybook]-js/rslib.config.mjs +++ b/packages/create-rslib/template-[react]-[storybook]-js/rslib.config.mjs @@ -13,6 +13,9 @@ export default defineConfig({ format: 'esm', }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/create-rslib/template-[react]-[storybook]-ts/rslib.config.ts b/packages/create-rslib/template-[react]-[storybook]-ts/rslib.config.ts index 5ae8d4675..03bb9f7a5 100644 --- a/packages/create-rslib/template-[react]-[storybook]-ts/rslib.config.ts +++ b/packages/create-rslib/template-[react]-[storybook]-ts/rslib.config.ts @@ -14,6 +14,9 @@ export default defineConfig({ format: 'esm', }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/create-rslib/template-[react]-[vitest]-js/rslib.config.mjs b/packages/create-rslib/template-[react]-[vitest]-js/rslib.config.mjs index 7717aff12..ea02edfa7 100644 --- a/packages/create-rslib/template-[react]-[vitest]-js/rslib.config.mjs +++ b/packages/create-rslib/template-[react]-[vitest]-js/rslib.config.mjs @@ -13,6 +13,9 @@ export default defineConfig({ format: 'esm', }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/create-rslib/template-[react]-[vitest]-ts/rslib.config.ts b/packages/create-rslib/template-[react]-[vitest]-ts/rslib.config.ts index 5ae8d4675..03bb9f7a5 100644 --- a/packages/create-rslib/template-[react]-[vitest]-ts/rslib.config.ts +++ b/packages/create-rslib/template-[react]-[vitest]-ts/rslib.config.ts @@ -14,6 +14,9 @@ export default defineConfig({ format: 'esm', }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/packages/plugin-dts/rslib.config.ts b/packages/plugin-dts/rslib.config.ts index 8e03e15f5..beacf3928 100644 --- a/packages/plugin-dts/rslib.config.ts +++ b/packages/plugin-dts/rslib.config.ts @@ -16,6 +16,7 @@ export default defineConfig({ index: ['./src/**'], }, }, + // TODO: Remove this after bumping Rslib output: { target: 'node', }, diff --git a/tests/e2e/react-component/rsbuild.config.ts b/tests/e2e/react-component/rsbuild.config.ts index ff826363f..e282fa951 100644 --- a/tests/e2e/react-component/rsbuild.config.ts +++ b/tests/e2e/react-component/rsbuild.config.ts @@ -60,5 +60,8 @@ export default defineConfig({ }, }, }, + output: { + target: 'web', + }, plugins: [pluginReact()], }); diff --git a/tests/integration/asset/limit/rslib.config.ts b/tests/integration/asset/limit/rslib.config.ts index 9c9e5b896..b82c816c1 100644 --- a/tests/integration/asset/limit/rslib.config.ts +++ b/tests/integration/asset/limit/rslib.config.ts @@ -45,4 +45,7 @@ export default defineConfig({ index: './src/index.js', }, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/asset/name/rslib.config.ts b/tests/integration/asset/name/rslib.config.ts index 41a62905e..0a70ba02e 100644 --- a/tests/integration/asset/name/rslib.config.ts +++ b/tests/integration/asset/name/rslib.config.ts @@ -31,5 +31,8 @@ export default defineConfig({ index: './src/index.jsx', }, }, + output: { + target: 'web', + }, plugins: [pluginReact()], }); diff --git a/tests/integration/asset/path/rslib.config.ts b/tests/integration/asset/path/rslib.config.ts index aca26ef5a..5881be935 100644 --- a/tests/integration/asset/path/rslib.config.ts +++ b/tests/integration/asset/path/rslib.config.ts @@ -26,4 +26,7 @@ export default defineConfig({ index: './src/index.js', }, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/asset/public-path/rslib.config.ts b/tests/integration/asset/public-path/rslib.config.ts index 7314ce292..cb025d05a 100644 --- a/tests/integration/asset/public-path/rslib.config.ts +++ b/tests/integration/asset/public-path/rslib.config.ts @@ -32,4 +32,7 @@ export default defineConfig({ index: './src/index.js', }, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/asset/svgr/rslib.config.ts b/tests/integration/asset/svgr/rslib.config.ts index 675713e04..6318ab07a 100644 --- a/tests/integration/asset/svgr/rslib.config.ts +++ b/tests/integration/asset/svgr/rslib.config.ts @@ -72,5 +72,8 @@ export default defineConfig({ ], }), ], + output: { + target: 'web', + }, plugins: [pluginReact()], }); diff --git a/tests/integration/bundle-false/svgr/rslib.config.ts b/tests/integration/bundle-false/svgr/rslib.config.ts index 20dbe11a8..17aa8a6e4 100644 --- a/tests/integration/bundle-false/svgr/rslib.config.ts +++ b/tests/integration/bundle-false/svgr/rslib.config.ts @@ -17,5 +17,8 @@ export default defineConfig({ index: ['./src/**'], }, }, + output: { + target: 'web', + }, plugins: [pluginReact(), pluginSvgr()], }); diff --git a/tests/integration/externals/browser/rslib.config.ts b/tests/integration/externals/browser/rslib.config.ts index 843e34d16..94a477e58 100644 --- a/tests/integration/externals/browser/rslib.config.ts +++ b/tests/integration/externals/browser/rslib.config.ts @@ -10,5 +10,6 @@ export default defineConfig({ }, output: { externals: { react: 'react' }, + target: 'web', }, }); diff --git a/tests/integration/externals/node/rslib.config.ts b/tests/integration/externals/node/rslib.config.ts index ffac0872e..4c6bd9192 100644 --- a/tests/integration/externals/node/rslib.config.ts +++ b/tests/integration/externals/node/rslib.config.ts @@ -5,12 +5,11 @@ export default defineConfig({ lib: [ generateBundleEsmConfig({ output: { - target: 'node', externals: { foo: 'node-commonjs foo' }, }, }), generateBundleCjsConfig({ - output: { target: 'node', externals: { foo: 'foo' } }, + output: { externals: { foo: 'foo' } }, }), ], source: { diff --git a/tests/integration/minify/config/rslib.config.ts b/tests/integration/minify/config/rslib.config.ts index 0722397f2..30d5a147c 100644 --- a/tests/integration/minify/config/rslib.config.ts +++ b/tests/integration/minify/config/rslib.config.ts @@ -5,7 +5,6 @@ import { generateBundleEsmConfig } from 'test-helper'; export default defineConfig({ lib: [generateBundleEsmConfig()], output: { - target: 'node', minify: false, }, source: { diff --git a/tests/integration/minify/default/rslib.config.ts b/tests/integration/minify/default/rslib.config.ts index 3cde45244..8ed99602c 100644 --- a/tests/integration/minify/default/rslib.config.ts +++ b/tests/integration/minify/default/rslib.config.ts @@ -4,9 +4,6 @@ import { generateBundleEsmConfig } from 'test-helper'; export default defineConfig({ lib: [generateBundleEsmConfig()], - output: { - target: 'node', - }, source: { entry: { index: path.resolve(__dirname, '../__fixtures__/src/index.ts'), diff --git a/tests/integration/minify/mf/config/rslib.config.ts b/tests/integration/minify/mf/config/rslib.config.ts index 9e236e661..6e0754071 100644 --- a/tests/integration/minify/mf/config/rslib.config.ts +++ b/tests/integration/minify/mf/config/rslib.config.ts @@ -28,6 +28,7 @@ export default defineConfig({ }, }, output: { + target: 'web', minify: false, }, source: { diff --git a/tests/integration/minify/mf/default/rslib.config.ts b/tests/integration/minify/mf/default/rslib.config.ts index bf7d466d7..d01b23feb 100644 --- a/tests/integration/minify/mf/default/rslib.config.ts +++ b/tests/integration/minify/mf/default/rslib.config.ts @@ -32,4 +32,7 @@ export default defineConfig({ index: path.resolve(__dirname, '../../__fixtures__/src/index.ts'), }, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/node-polyfill/bundle-false/rslib.config.ts b/tests/integration/node-polyfill/bundle-false/rslib.config.ts index b7dd56d26..4eb000952 100644 --- a/tests/integration/node-polyfill/bundle-false/rslib.config.ts +++ b/tests/integration/node-polyfill/bundle-false/rslib.config.ts @@ -28,6 +28,9 @@ export default defineConfig({ }, }), ], + output: { + target: 'web', + }, plugins: [pluginNodePolyfill()], source: { entry: { diff --git a/tests/integration/node-polyfill/bundle/rslib.config.ts b/tests/integration/node-polyfill/bundle/rslib.config.ts index 6edd96393..0657fa596 100644 --- a/tests/integration/node-polyfill/bundle/rslib.config.ts +++ b/tests/integration/node-polyfill/bundle/rslib.config.ts @@ -21,6 +21,9 @@ export default defineConfig({ }, }), ], + output: { + target: 'web', + }, plugins: [pluginNodePolyfill()], source: { entry: { diff --git a/tests/integration/require/import-dynamic/rslib.config.ts b/tests/integration/require/import-dynamic/rslib.config.ts index 67fafd2b8..388ed9b6c 100644 --- a/tests/integration/require/import-dynamic/rslib.config.ts +++ b/tests/integration/require/import-dynamic/rslib.config.ts @@ -3,9 +3,6 @@ import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper'; export default defineConfig({ lib: [generateBundleEsmConfig(), generateBundleCjsConfig()], - output: { - target: 'node', - }, source: { entry: { index: './index.ts', diff --git a/tests/integration/require/require-as-expression/rslib.config.ts b/tests/integration/require/require-as-expression/rslib.config.ts index e0264b270..bde34c8e1 100644 --- a/tests/integration/require/require-as-expression/rslib.config.ts +++ b/tests/integration/require/require-as-expression/rslib.config.ts @@ -3,9 +3,6 @@ import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper'; export default defineConfig({ lib: [generateBundleEsmConfig(), generateBundleCjsConfig()], - output: { - target: 'node', - }, source: { entry: { index: './index.js', diff --git a/tests/integration/require/require-dynamic/rslib.config.ts b/tests/integration/require/require-dynamic/rslib.config.ts index 67fafd2b8..388ed9b6c 100644 --- a/tests/integration/require/require-dynamic/rslib.config.ts +++ b/tests/integration/require/require-dynamic/rslib.config.ts @@ -3,9 +3,6 @@ import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper'; export default defineConfig({ lib: [generateBundleEsmConfig(), generateBundleCjsConfig()], - output: { - target: 'node', - }, source: { entry: { index: './index.ts', diff --git a/tests/integration/require/require-resolve/rslib.config.ts b/tests/integration/require/require-resolve/rslib.config.ts index 67fafd2b8..388ed9b6c 100644 --- a/tests/integration/require/require-resolve/rslib.config.ts +++ b/tests/integration/require/require-resolve/rslib.config.ts @@ -3,9 +3,6 @@ import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper'; export default defineConfig({ lib: [generateBundleEsmConfig(), generateBundleCjsConfig()], - output: { - target: 'node', - }, source: { entry: { index: './index.ts', diff --git a/tests/integration/resolve/node-protocol/rslib.config.ts b/tests/integration/resolve/node-protocol/rslib.config.ts index b7b8089f7..388ed9b6c 100644 --- a/tests/integration/resolve/node-protocol/rslib.config.ts +++ b/tests/integration/resolve/node-protocol/rslib.config.ts @@ -8,7 +8,4 @@ export default defineConfig({ index: './index.ts', }, }, - output: { - target: 'node', - }, }); diff --git a/tests/integration/resolve/with-condition-exports/rslib.config.ts b/tests/integration/resolve/with-condition-exports/rslib.config.ts index 50c7862a1..868f39600 100644 --- a/tests/integration/resolve/with-condition-exports/rslib.config.ts +++ b/tests/integration/resolve/with-condition-exports/rslib.config.ts @@ -8,7 +8,6 @@ export default defineConfig({ distPath: { root: './dist/node', }, - target: 'node', }, }), generateBundleEsmConfig({ @@ -16,6 +15,7 @@ export default defineConfig({ distPath: { root: './dist/browser', }, + target: 'web', }, }), ], diff --git a/tests/integration/resolve/with-main-fields/rslib.config.ts b/tests/integration/resolve/with-main-fields/rslib.config.ts index 802ba2f1a..77bba8884 100644 --- a/tests/integration/resolve/with-main-fields/rslib.config.ts +++ b/tests/integration/resolve/with-main-fields/rslib.config.ts @@ -22,7 +22,6 @@ export default defineConfig({ distPath: { root: './dist/node', }, - target: 'node', }, source: { entry: { diff --git a/tests/integration/shims/cjs/rslib.config.ts b/tests/integration/shims/cjs/rslib.config.ts index 2b558cd15..9e95a40ac 100644 --- a/tests/integration/shims/cjs/rslib.config.ts +++ b/tests/integration/shims/cjs/rslib.config.ts @@ -11,7 +11,6 @@ export default defineConfig({ }), ], output: { - target: 'node', copy: [{ from: 'src/ok.cjs' }], }, source: { diff --git a/tests/integration/shims/esm/rslib.config.ts b/tests/integration/shims/esm/rslib.config.ts index 5628aa7f2..c2cdcbec2 100644 --- a/tests/integration/shims/esm/rslib.config.ts +++ b/tests/integration/shims/esm/rslib.config.ts @@ -46,7 +46,4 @@ export default defineConfig({ }, }), ], - output: { - target: 'node', - }, }); diff --git a/tests/integration/style/css-modules/bundle-false-auto/rslib.config.ts b/tests/integration/style/css-modules/bundle-false-auto/rslib.config.ts index bf921ff48..020b3f5c8 100644 --- a/tests/integration/style/css-modules/bundle-false-auto/rslib.config.ts +++ b/tests/integration/style/css-modules/bundle-false-auto/rslib.config.ts @@ -20,6 +20,7 @@ export default defineConfig({ }), ], output: { + target: 'web', cssModules: { auto: /\.scss/, }, diff --git a/tests/integration/style/css-modules/bundle-false/rslib.config.ts b/tests/integration/style/css-modules/bundle-false/rslib.config.ts index 2ea1e042b..df82701d0 100644 --- a/tests/integration/style/css-modules/bundle-false/rslib.config.ts +++ b/tests/integration/style/css-modules/bundle-false/rslib.config.ts @@ -12,6 +12,9 @@ export default defineConfig({ index: ['../__fixtures__/basic/src/**'], }, }, + output: { + target: 'web', + }, plugins: [ pluginSass({ sassLoaderOptions: { diff --git a/tests/integration/style/css-modules/bundle/rslib.config.ts b/tests/integration/style/css-modules/bundle/rslib.config.ts index a18391047..90930aa8f 100644 --- a/tests/integration/style/css-modules/bundle/rslib.config.ts +++ b/tests/integration/style/css-modules/bundle/rslib.config.ts @@ -9,6 +9,9 @@ export default defineConfig({ index: ['../__fixtures__/basic/src/index.ts'], }, }, + output: { + target: 'web', + }, plugins: [ pluginSass({ sassLoaderOptions: { diff --git a/tests/integration/style/css/bundle-false/rslib.config.ts b/tests/integration/style/css/bundle-false/rslib.config.ts index 73218ed2f..d144c0b13 100644 --- a/tests/integration/style/css/bundle-false/rslib.config.ts +++ b/tests/integration/style/css/bundle-false/rslib.config.ts @@ -11,4 +11,7 @@ export default defineConfig({ index: ['../__fixtures__/basic/src/**/*.css'], }, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/style/css/bundle/rslib.config.ts b/tests/integration/style/css/bundle/rslib.config.ts index 5a9a0c3d3..dacd0d949 100644 --- a/tests/integration/style/css/bundle/rslib.config.ts +++ b/tests/integration/style/css/bundle/rslib.config.ts @@ -8,4 +8,7 @@ export default defineConfig({ index: '../__fixtures__/basic/src/import.css', }, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/style/less/bundle-false/rslib.config.ts b/tests/integration/style/less/bundle-false/rslib.config.ts index ca9dcb75f..b4afac27e 100644 --- a/tests/integration/style/less/bundle-false/rslib.config.ts +++ b/tests/integration/style/less/bundle-false/rslib.config.ts @@ -29,6 +29,7 @@ export default defineConfig({ }), ], output: { + target: 'web', // TODO: support asset // dataUriLimit: 0 }, diff --git a/tests/integration/style/less/bundle-import/rslib.config.ts b/tests/integration/style/less/bundle-import/rslib.config.ts index ac559ed66..fb6cb7826 100644 --- a/tests/integration/style/less/bundle-import/rslib.config.ts +++ b/tests/integration/style/less/bundle-import/rslib.config.ts @@ -9,5 +9,8 @@ export default defineConfig({ index: ['../__fixtures__/import/src/index.ts'], }, }, + output: { + target: 'web', + }, plugins: [pluginLess()], }); diff --git a/tests/integration/style/less/bundle/rslib.config.ts b/tests/integration/style/less/bundle/rslib.config.ts index 18bcbe877..b45dca44d 100644 --- a/tests/integration/style/less/bundle/rslib.config.ts +++ b/tests/integration/style/less/bundle/rslib.config.ts @@ -15,6 +15,9 @@ export default defineConfig({ ), }, }, + output: { + target: 'web', + }, plugins: [ pluginLess({ lessLoaderOptions: { diff --git a/tests/integration/style/lightningcss/bundle-false/rslib.config.ts b/tests/integration/style/lightningcss/bundle-false/rslib.config.ts index 4c0b2192f..34bcb2783 100644 --- a/tests/integration/style/lightningcss/bundle-false/rslib.config.ts +++ b/tests/integration/style/lightningcss/bundle-false/rslib.config.ts @@ -11,4 +11,7 @@ export default defineConfig({ index: ['../__fixtures__/basic/src/*.css'], }, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/style/lightningcss/bundle/rslib.config.ts b/tests/integration/style/lightningcss/bundle/rslib.config.ts index 1dad8ed1c..6de130e75 100644 --- a/tests/integration/style/lightningcss/bundle/rslib.config.ts +++ b/tests/integration/style/lightningcss/bundle/rslib.config.ts @@ -8,4 +8,7 @@ export default defineConfig({ index: ['../__fixtures__/basic/src/index.css'], }, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/style/postcss/bundle-false/rslib.config.ts b/tests/integration/style/postcss/bundle-false/rslib.config.ts index 4e23ba808..9adc1a4a7 100644 --- a/tests/integration/style/postcss/bundle-false/rslib.config.ts +++ b/tests/integration/style/postcss/bundle-false/rslib.config.ts @@ -19,4 +19,7 @@ export default defineConfig({ }, }, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/style/postcss/bundle/rslib.config.ts b/tests/integration/style/postcss/bundle/rslib.config.ts index bba694410..71d96af06 100644 --- a/tests/integration/style/postcss/bundle/rslib.config.ts +++ b/tests/integration/style/postcss/bundle/rslib.config.ts @@ -16,4 +16,7 @@ export default defineConfig({ }, }, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/style/redirect-style-false/rslib.config.ts b/tests/integration/style/redirect-style-false/rslib.config.ts index b2796fb33..e4aa58126 100644 --- a/tests/integration/style/redirect-style-false/rslib.config.ts +++ b/tests/integration/style/redirect-style-false/rslib.config.ts @@ -22,6 +22,7 @@ export default defineConfig({ }, }, output: { + target: 'web', copy: [{ from: './src/index.less' }, { from: './src/style.module.less' }], }, }); diff --git a/tests/integration/style/sass/bundle-false/rslib.config.ts b/tests/integration/style/sass/bundle-false/rslib.config.ts index b07f07bf9..79c602f7e 100644 --- a/tests/integration/style/sass/bundle-false/rslib.config.ts +++ b/tests/integration/style/sass/bundle-false/rslib.config.ts @@ -23,9 +23,10 @@ export default defineConfig({ }, }), ], - // output: { - // dataUriLimit: { - // svg: 0 - // } - // } + output: { + target: 'web', + // dataUriLimit: { + // svg: 0 + // } + }, }); diff --git a/tests/integration/style/sass/bundle/rslib.config.ts b/tests/integration/style/sass/bundle/rslib.config.ts index 4d18c4f25..dc80e308a 100644 --- a/tests/integration/style/sass/bundle/rslib.config.ts +++ b/tests/integration/style/sass/bundle/rslib.config.ts @@ -16,9 +16,10 @@ export default defineConfig({ }, }), ], - // output: { - // dataUriLimit: { - // svg: 0 - // } - // } + output: { + target: 'web', + // dataUriLimit: { + // svg: 0, + // }, + }, }); diff --git a/tests/integration/style/style-inject/bundle/rslib.config.ts b/tests/integration/style/style-inject/bundle/rslib.config.ts index b649cf8a8..b9a953531 100644 --- a/tests/integration/style/style-inject/bundle/rslib.config.ts +++ b/tests/integration/style/style-inject/bundle/rslib.config.ts @@ -9,6 +9,7 @@ export default defineConfig({ }, }, output: { + target: 'web', injectStyles: true, }, }); diff --git a/tests/integration/style/tailwindcss/bundle/rslib.config.ts b/tests/integration/style/tailwindcss/bundle/rslib.config.ts index a9b4c1f8c..96ab47b68 100644 --- a/tests/integration/style/tailwindcss/bundle/rslib.config.ts +++ b/tests/integration/style/tailwindcss/bundle/rslib.config.ts @@ -11,4 +11,7 @@ export default defineConfig({ tools: { lightningcssLoader: false, }, + output: { + target: 'web', + }, }); diff --git a/tests/integration/umd-library-name/rslib.config.ts b/tests/integration/umd-library-name/rslib.config.ts index 161c0e549..a293c4d1b 100644 --- a/tests/integration/umd-library-name/rslib.config.ts +++ b/tests/integration/umd-library-name/rslib.config.ts @@ -12,4 +12,7 @@ export default defineConfig({ index: './src/index.js', }, }, + output: { + target: 'web', + }, }); diff --git a/website/docs/en/guide/advanced/module-federation.mdx b/website/docs/en/guide/advanced/module-federation.mdx index 2e6627f3f..2d6808ed8 100644 --- a/website/docs/en/guide/advanced/module-federation.mdx +++ b/website/docs/en/guide/advanced/module-federation.mdx @@ -75,6 +75,9 @@ export default defineConfig({ ], }, ], + output: { + target: 'web', + }, plugins: [pluginReact()], }); ``` diff --git a/website/docs/en/guide/advanced/output-compatibility.mdx b/website/docs/en/guide/advanced/output-compatibility.mdx index 06ab09746..973e7317c 100644 --- a/website/docs/en/guide/advanced/output-compatibility.mdx +++ b/website/docs/en/guide/advanced/output-compatibility.mdx @@ -34,7 +34,7 @@ By using [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbui Rslib uses [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill) to provide the Node Polyfill feature. - + Then add the plugin into the plugins field. diff --git a/website/docs/en/guide/basic/output-format.mdx b/website/docs/en/guide/basic/output-format.mdx index a15d037f4..33d330467 100644 --- a/website/docs/en/guide/basic/output-format.mdx +++ b/website/docs/en/guide/basic/output-format.mdx @@ -118,6 +118,9 @@ export default defineConfig({ }, }, ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { diff --git a/website/docs/en/guide/migration/modernjs-module.mdx b/website/docs/en/guide/migration/modernjs-module.mdx index 67dd58fc6..e34558f05 100644 --- a/website/docs/en/guide/migration/modernjs-module.mdx +++ b/website/docs/en/guide/migration/modernjs-module.mdx @@ -110,6 +110,9 @@ import { pluginReact } from '@rsbuild/plugin-react'; export default defineConfig({ //... + output: { + target: 'web', + }, plugins: [pluginReact()], }); ``` diff --git a/website/docs/en/guide/migration/tsup.mdx b/website/docs/en/guide/migration/tsup.mdx index 2f814b6cf..c5cb292f7 100644 --- a/website/docs/en/guide/migration/tsup.mdx +++ b/website/docs/en/guide/migration/tsup.mdx @@ -64,22 +64,6 @@ Here is the corresponding Rslib configuration for tsup configuration: | terserOptions | [output.minify](/config/rsbuild/output) | | tsconfig | [source.tsconfigPath](/config/rsbuild/source) | -## Platform - -For `platform`, tsup defaults to `node` while Rslib defaults to `web` (the same as tsup's `browser`). - -If your target platform is `node`, you can set `output.target` to `node`: - -```ts title="rslib.config.ts" -import { defineConfig } from '@rslib/core'; - -export default defineConfig({ - output: { - target: 'node', - }, -}); -``` - ## Contents Supplement The current document only covers part of the migration process. If you find suitable content to add, feel free to contribute to the documentation via pull request 🤝. diff --git a/website/docs/en/guide/solution/nodejs.mdx b/website/docs/en/guide/solution/nodejs.mdx index e8da9be41..d0b2008d1 100644 --- a/website/docs/en/guide/solution/nodejs.mdx +++ b/website/docs/en/guide/solution/nodejs.mdx @@ -21,7 +21,7 @@ Then select `Node.js` when prompted to "Select template". ## Use Rslib in an existing project -To development an Node.js library, you need to set [target](/config/rsbuild/output#target) to `"node"` in `rslib.config.ts`. This is crucial because when the `target` is set to `"node"`, Rslib automatically adjusts many configurations for Node.js. For example, [output.externals](/config/rsbuild/output#target) will exclude built-in Node.js modules, and [shims](/config/lib/shims) will add a shim for `import.meta.url` in CJS output by default. +Rslib offers seamless support for Node.js projects, allowing you to build Node.js project effortlessly with minimal configuration. For example, in `rsbuild.config.ts`: @@ -47,15 +47,14 @@ export default defineConfig({ }, }, ], - output: { - target: 'node', - }, }); ``` ## Target for Node.js -When [target](/config/rsbuild/output#target) is set to `"node"`, Rslib will automatically adjust the following configurations: +Rslib set [target](/config/rsbuild/output#target) to `"node"` by default, which is different from the default target of Rsbuild. + +Rslib adjusts many configurations for Node.js. For example, [output.externals](/config/rsbuild/output#target) will exclude built-in Node.js modules, and [shims](/config/lib/shims) will add a shim for `import.meta.url` in CJS output by default. ### Externals diff --git a/website/docs/en/guide/solution/react.mdx b/website/docs/en/guide/solution/react.mdx index 472ac3324..f1dbb1248 100644 --- a/website/docs/en/guide/solution/react.mdx +++ b/website/docs/en/guide/solution/react.mdx @@ -21,11 +21,13 @@ Then select `React` when prompted to "Select template". ## Use Rslib in an Existing Project +To develop a React library, you need to set the [target](/config/rsbuild/output#target) to `"web"` in `rslib.config.ts`. This is crucial because Rslib sets the `target` to `"node"` by default, which differs from the default target of Rsbuild. + To compile React (JSX and TSX), you need to register the Rsbuild [React Plugin](https://rsbuild.dev/plugins/list/plugin-react). The plugin will automatically add the necessary configuration for React builds. For example, register in `rslib.config.ts`: -```ts title="rslib.config.ts" {2,8} +```ts title="rslib.config.ts" {2,8-11} import { defineConfig } from '@rslib/core'; import { pluginReact } from '@rsbuild/plugin-react'; @@ -33,6 +35,9 @@ export default defineConfig({ lib: [ // ... ], + output: { + target: 'web', + }, plugins: [pluginReact(/** options here */)], }); ``` @@ -48,7 +53,7 @@ By default, Rsbuild uses the new JSX transform, which is `runtime: 'automatic'`. To change the JSX transform, you can pass the [swcReactOptions](https://rsbuild.dev/plugins/list/plugin-react#swcreactoptionsruntime) option to the React plugin. For example, to use the classic runtime: -```ts title="rslib.config.ts" {10-12} +```ts title="rslib.config.ts" {13-15} import { pluginReact } from '@rsbuild/plugin-react'; import { defineConfig } from '@rslib/core'; @@ -56,6 +61,9 @@ export default defineConfig({ lib: [ // ... ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { @@ -75,7 +83,7 @@ When `runtime` is `'automatic'`, you can specify the import path of the JSX tran For example, when using [Emotion](https://emotion.sh/), you can set `importSource` to `'@emotion/react'`: -```ts title="rslib.config.ts" {10-12} +```ts title="rslib.config.ts" {13-15} import { pluginReact } from '@rsbuild/plugin-react'; import { defineConfig } from '@rslib/core'; @@ -83,6 +91,9 @@ export default defineConfig({ lib: [ // ... ], + output: { + target: 'web', + }, plugins: [ pluginReact({ swcReactOptions: { From d52e410014d1004daa7b1a36322a99a492f2b9b2 Mon Sep 17 00:00:00 2001 From: nyqykk <65393845+nyqykk@users.noreply.github.com> Date: Mon, 11 Nov 2024 18:24:14 +0800 Subject: [PATCH 22/23] feat: support use storybook to dev rslib module federation format assets and also support hmr (#349) Co-authored-by: nyqykk Co-authored-by: fi3ework Co-authored-by: Timeless0911 <1604889533@qq.com> --- .npmrc | 1 + .../module-federation/mf-host/package.json | 2 +- .../mf-host/rsbuild.config.ts | 2 + .../mf-react-component/.storybook/main.ts | 42 + .../mf-react-component/README.md | 34 + .../mf-react-component/package.json | 14 +- .../mf-react-component/rslib.config.ts | 7 + .../stories/index.stories.tsx | 12 + .../mf-react-component/tsconfig.json | 8 +- .../module-federation/mf-remote/package.json | 2 +- examples/module-federation/package.json | 8 +- packages/core/src/cli/commands.ts | 19 +- packages/core/src/mf.ts | 49 + pnpm-lock.yaml | 1212 ++++++++++++++++- tests/playwright.config.ts | 2 +- .../en/guide/advanced/module-federation.mdx | 148 +- website/docs/en/guide/basic/cli.mdx | 16 + 17 files changed, 1515 insertions(+), 63 deletions(-) create mode 100644 examples/module-federation/mf-react-component/.storybook/main.ts create mode 100644 examples/module-federation/mf-react-component/stories/index.stories.tsx create mode 100644 packages/core/src/mf.ts diff --git a/.npmrc b/.npmrc index 4f1c2ef2b..8a55ae9ca 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,4 @@ registry = 'https://registry.npmjs.org/' strict-peer-dependencies=false +auto-install-peers=false hoist-patterns[]=[] diff --git a/examples/module-federation/mf-host/package.json b/examples/module-federation/mf-host/package.json index 97404841a..a06f0595f 100644 --- a/examples/module-federation/mf-host/package.json +++ b/examples/module-federation/mf-host/package.json @@ -1,5 +1,5 @@ { - "name": "@example/mf-host", + "name": "@examples/mf-host", "version": "1.0.0", "private": true, "scripts": { diff --git a/examples/module-federation/mf-host/rsbuild.config.ts b/examples/module-federation/mf-host/rsbuild.config.ts index 38578026b..a73c0b5db 100644 --- a/examples/module-federation/mf-host/rsbuild.config.ts +++ b/examples/module-federation/mf-host/rsbuild.config.ts @@ -18,6 +18,8 @@ export default defineConfig({ singleton: true, }, }, + // Enable this when the output of Rslib is build under 'production' mode, while the host app is 'development'. + // Reference: https://lib.rsbuild.dev/guide/advanced/module-federation#faqs shareStrategy: 'loaded-first', }), ], diff --git a/examples/module-federation/mf-react-component/.storybook/main.ts b/examples/module-federation/mf-react-component/.storybook/main.ts new file mode 100644 index 000000000..3643264a4 --- /dev/null +++ b/examples/module-federation/mf-react-component/.storybook/main.ts @@ -0,0 +1,42 @@ +import { dirname, join } from 'node:path'; +import type { StorybookConfig } from 'storybook-react-rsbuild'; + +/** + * This function is used to resolve the absolute path of a package. + * It is needed in projects that use Yarn PnP or are set up within a monorepo. + */ +function getAbsolutePath(value: string): any { + return dirname(require.resolve(join(value, 'package.json'))); +} + +const config: StorybookConfig = { + stories: [ + '../stories/**/*.mdx', + '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)', + ], + framework: { + name: getAbsolutePath('storybook-react-rsbuild'), + options: {}, + }, + addons: [ + { + name: getAbsolutePath('storybook-addon-rslib'), + options: { + rslib: { + include: ['**/stories/**'], + }, + }, + }, + { + name: '@module-federation/storybook-addon/preset', + options: { + remotes: { + 'rslib-module': + 'rslib-module@http://localhost:3001/mf/mf-manifest.json', + }, + }, + }, + ], +}; + +export default config; diff --git a/examples/module-federation/mf-react-component/README.md b/examples/module-federation/mf-react-component/README.md index f4c237d68..be4b26189 100644 --- a/examples/module-federation/mf-react-component/README.md +++ b/examples/module-federation/mf-react-component/README.md @@ -1,3 +1,37 @@ # @examples/mf-react-component This example demonstrates how to use Rslib to build a simple Module Federation React component. + +### Usage + +Dev MF module + +1. Start remote module which is loaded by Rslib module. + +``` +nx run @examples/mf-remote:dev +``` + +2. Start MF dev mode. + +``` +nx run @examples/mf-react-component:dev +``` + +3. Use Storybook to development component. + +``` +nx run @examples/mf-react-component:storybook +``` + +Build + +``` +nx run @examples/mf-react-component:build +``` + +Build and Serve dist + +``` +nx run @examples/mf-react-component:serve +``` diff --git a/examples/module-federation/mf-react-component/package.json b/examples/module-federation/mf-react-component/package.json index 092f015f3..759a0cdd4 100644 --- a/examples/module-federation/mf-react-component/package.json +++ b/examples/module-federation/mf-react-component/package.json @@ -3,9 +3,9 @@ "private": true, "exports": { ".": { + "types": "./dist/cjs/index.d.ts", "import": "./dist/esm/index.mjs", - "require": "./dist/cjs/index.js", - "types": "./dist/cjs/index.d.ts" + "require": "./dist/cjs/index.js" } }, "main": "./dist/cjs/index.js", @@ -13,17 +13,23 @@ "types": "./dist/cjs/index.d.ts", "scripts": { "build": "rslib build", - "serve": "pnpm build && http-server -p 3001 ./dist/ --cors" + "dev": "rslib mf dev", + "serve": "pnpm build & http-server -p 3001 ./dist/ --cors", + "storybook": "storybook dev -p 6006" }, "devDependencies": { "@module-federation/enhanced": "^0.7.1", "@module-federation/rsbuild-plugin": "^0.7.1", + "@module-federation/storybook-addon": "0.0.0-next-20241106024856", "@rsbuild/plugin-react": "^1.0.7", "@rslib/core": "workspace:*", "@types/react": "^18.3.12", "http-server": "^14.1.1", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "storybook": "^8.3.6", + "storybook-addon-rslib": "^0.1.3", + "storybook-react-rsbuild": "^0.1.3" }, "peerDependencies": { "react": "*" diff --git a/examples/module-federation/mf-react-component/rslib.config.ts b/examples/module-federation/mf-react-component/rslib.config.ts index ced53fbfe..271828b2d 100644 --- a/examples/module-federation/mf-react-component/rslib.config.ts +++ b/examples/module-federation/mf-react-component/rslib.config.ts @@ -37,6 +37,13 @@ export default defineConfig({ }, assetPrefix: 'http://localhost:3001/mf', }, + dev: { + assetPrefix: 'http://localhost:3001/mf', + }, + // just for dev + server: { + port: 3001, + }, plugins: [ pluginModuleFederation({ name: 'rslib_provider', diff --git a/examples/module-federation/mf-react-component/stories/index.stories.tsx b/examples/module-federation/mf-react-component/stories/index.stories.tsx new file mode 100644 index 000000000..0f48ef128 --- /dev/null +++ b/examples/module-federation/mf-react-component/stories/index.stories.tsx @@ -0,0 +1,12 @@ +import React from 'react'; +// @ts-ignore ignore remote module type check for passing ci run build because we set @mf-types folder in .gitignore +import { Counter } from 'rslib-module'; + +const Component = () => ; + +export default { + title: 'App Component', + component: Component, +}; + +export const Primary = {}; diff --git a/examples/module-federation/mf-react-component/tsconfig.json b/examples/module-federation/mf-react-component/tsconfig.json index 19bcd30dd..9e2b51623 100644 --- a/examples/module-federation/mf-react-component/tsconfig.json +++ b/examples/module-federation/mf-react-component/tsconfig.json @@ -2,7 +2,11 @@ "compilerOptions": { "jsx": "react-jsx", "strict": true, - "skipLibCheck": true + "skipLibCheck": true, + "esModuleInterop": true, + "paths": { + "*": ["./@mf-types/*"] + } }, - "include": ["src/**/*"] + "include": ["src/**/*", "stories"] } diff --git a/examples/module-federation/mf-remote/package.json b/examples/module-federation/mf-remote/package.json index 25e6fc43a..78ecd7242 100644 --- a/examples/module-federation/mf-remote/package.json +++ b/examples/module-federation/mf-remote/package.json @@ -1,5 +1,5 @@ { - "name": "@example/mf-remote", + "name": "@examples/mf-remote", "version": "1.0.0", "private": true, "scripts": { diff --git a/examples/module-federation/package.json b/examples/module-federation/package.json index 7514ad68c..1272ba6a4 100644 --- a/examples/module-federation/package.json +++ b/examples/module-federation/package.json @@ -1,10 +1,10 @@ { - "name": "@example/mf", + "name": "@examples/mf", "private": true, "scripts": { - "dev:all": "pnpm dev:host & pnpm dev:lib & pnpm dev:remote", + "dev:all": "pnpm dev:host & pnpm serve:lib & pnpm dev:remote", "dev:host": "pnpm --filter mf-host dev", - "dev:lib": "pnpm --filter mf-react-component run serve", - "dev:remote": "pnpm --filter mf-remote dev" + "dev:remote": "pnpm --filter mf-remote dev", + "serve:lib": "pnpm --filter mf-react-component run serve" } } diff --git a/packages/core/src/cli/commands.ts b/packages/core/src/cli/commands.ts index 3c0df6209..b738f3f6d 100644 --- a/packages/core/src/cli/commands.ts +++ b/packages/core/src/cli/commands.ts @@ -6,6 +6,7 @@ import { loadConfig, pruneEnvironments, } from '../config'; +import { startMFDevServer } from '../mf'; import { logger } from '../utils/logger'; export type CommonOptions = { @@ -45,8 +46,9 @@ export function runCli(): void { const buildCommand = program.command('build'); const inspectCommand = program.command('inspect'); + const mfDevCommand = program.command('mf dev'); - [buildCommand, inspectCommand].forEach(applyCommonOptions); + [buildCommand, inspectCommand, mfDevCommand].forEach(applyCommonOptions); buildCommand .option( @@ -109,5 +111,20 @@ export function runCli(): void { } }); + mfDevCommand + .description('start Rsbuild dev server of Module Federation format') + .action(async (options: CommonOptions) => { + try { + const rslibConfig = await loadConfig({ + path: options.config, + envMode: options.envMode, + }); + await startMFDevServer(rslibConfig); + } catch (err) { + logger.error('Failed to start mf dev.'); + logger.error(err); + process.exit(1); + } + }); program.parse(); } diff --git a/packages/core/src/mf.ts b/packages/core/src/mf.ts new file mode 100644 index 000000000..4412cc0cd --- /dev/null +++ b/packages/core/src/mf.ts @@ -0,0 +1,49 @@ +import { createRsbuild, mergeRsbuildConfig } from '@rsbuild/core'; +import { composeCreateRsbuildConfig } from './config'; + +import type { RsbuildConfig, RsbuildInstance } from '@rsbuild/core'; +import type { RslibConfig } from './types'; + +export async function startMFDevServer( + config: RslibConfig, +): Promise { + const rsbuildInstance = await initMFRsbuild(config); + return rsbuildInstance; +} + +async function initMFRsbuild( + rslibConfig: RslibConfig, +): Promise { + const rsbuildConfigObject = await composeCreateRsbuildConfig(rslibConfig); + const mfRsbuildConfig = rsbuildConfigObject.find( + (config) => config.format === 'mf', + ); + + if (!mfRsbuildConfig) { + // no mf format, return. + return; + } + + mfRsbuildConfig.config = changeEnvToDev(mfRsbuildConfig.config); + const rsbuildInstance = await createRsbuild({ + rsbuildConfig: mfRsbuildConfig.config, + }); + await rsbuildInstance.startDevServer(); + return rsbuildInstance; +} + +function changeEnvToDev(rsbuildConfig: RsbuildConfig) { + return mergeRsbuildConfig(rsbuildConfig, { + mode: 'development', + dev: { + writeToDisk: true, + }, + tools: { + rspack: { + optimization: { + nodeEnv: 'development', + }, + }, + }, + }); +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8b5bcb948..c921af523 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: '9.0' settings: - autoInstallPeers: true + autoInstallPeers: false excludeLinksFromLockfile: false overrides: @@ -113,6 +113,9 @@ importers: '@module-federation/rsbuild-plugin': specifier: ^0.7.1 version: 0.7.1(@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0))(@rsbuild/core@1.1.0) + '@module-federation/storybook-addon': + specifier: 0.0.0-next-20241106024856 + version: 0.0.0-next-20241106024856(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack-virtual-modules@0.6.2)(webpack@5.94.0) '@rsbuild/plugin-react': specifier: ^1.0.7 version: 1.0.7(@rsbuild/core@1.1.0) @@ -131,6 +134,15 @@ importers: react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) + storybook: + specifier: ^8.3.6 + version: 8.4.2(prettier@3.3.3) + storybook-addon-rslib: + specifier: ^0.1.3 + version: 0.1.3(@rsbuild/core@1.1.0)(@rslib/core@packages+core)(storybook-builder-rsbuild@0.1.3(@rsbuild/core@1.1.0)(@types/react@18.3.12)(storybook@8.4.2(prettier@3.3.3))(typescript@5.6.3)(webpack-sources@3.2.3))(typescript@5.6.3) + storybook-react-rsbuild: + specifier: ^0.1.3 + version: 0.1.3(@rsbuild/core@1.1.0)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.18.1)(storybook@8.4.2(prettier@3.3.3))(typescript@5.6.3)(webpack-sources@3.2.3)(webpack@5.94.0) examples/module-federation/mf-remote: dependencies: @@ -216,9 +228,6 @@ importers: packages/core: dependencies: - '@microsoft/api-extractor': - specifier: ^7 - version: 7.47.11(@types/node@22.8.1) '@rsbuild/core': specifier: ~1.1.0 version: 1.1.0 @@ -422,10 +431,6 @@ importers: tests/integration/asset/public-path: {} tests/integration/asset/svgr: - dependencies: - react: - specifier: ^18 - version: 18.3.1 devDependencies: '@rsbuild/plugin-react': specifier: ^1.0.7 @@ -1349,6 +1354,12 @@ packages: peerDependencies: react: '>=16' + '@mdx-js/react@3.1.0': + resolution: {integrity: sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==} + peerDependencies: + '@types/react': '>=16' + react: '>=16' + '@microsoft/api-extractor-model@7.29.8': resolution: {integrity: sha512-t3Z/xcO6TRbMcnKGVMs4uMzv/gd5j0NhMiJIGjD4cJMeFJ1Hf8wnLSx37vxlRlL0GWlGJhnFgxvnaL6JlS+73g==} @@ -1365,15 +1376,33 @@ packages: '@modern-js/utils@2.61.0': resolution: {integrity: sha512-p0AvefKHLX96Oea1I8mKCDhuDHkGT61dcWbVomZ0LKyJnDY/0YFiOX1kVeWJBfuka+2qdgH6wXE905K2uB7wEQ==} + '@module-federation/bridge-react-webpack-plugin@0.0.0-next-20241106024856': + resolution: {integrity: sha512-zcKaRw2Sz0VGUtjdBtixouq+VTQrEaY8Dp0rHl/yuR6PRhAfE7GwQ1sizGEMWYC3xjS27/yIZg+7yjsRC8tZNw==} + '@module-federation/bridge-react-webpack-plugin@0.7.1': resolution: {integrity: sha512-LTDm2xxd70zYtpe9h6iyEgmMtc2MJdHBoFKRCcDmbcojHAoxEJBQnWuXT6QdPM+uKCqobcPIqGAciPc6xymaaA==} + '@module-federation/data-prefetch@0.0.0-next-20241106024856': + resolution: {integrity: sha512-2Fz6r7DAzIAVDlEMi4PNjN2r93HORzxZxW18KN4MDua7OcNiZ6FmBe6HVLz753WhoZP8a5U5zHHr9zjAzdjhPw==} + peerDependencies: + react: '>=16.9.0' + react-dom: '>=16.9.0' + '@module-federation/data-prefetch@0.7.1': resolution: {integrity: sha512-RaA1kkE5zRcAC3iYeFUzh+33nHxircOo9eALGaDHK7gQhLf8vv3b1lAiy8IQPkpPgiKbg5ItfsY9A8bSJUxgeQ==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' + '@module-federation/dts-plugin@0.0.0-next-20241106024856': + resolution: {integrity: sha512-pHgHlJX6Xv3fJspbNIwKTHPP+Cto+npL81Xc+9Yd61GMcXUZynfM0M3dV3PJ1+jfKVGsIaVWwCjAffeSeXXSjQ==} + peerDependencies: + typescript: ^4.9.0 || ^5.0.0 + vue-tsc: '>=1.0.24' + peerDependenciesMeta: + vue-tsc: + optional: true + '@module-federation/dts-plugin@0.7.1': resolution: {integrity: sha512-QdKY6/byhmr5Yw3eJcjROWDnDlT71O2eTbdu00qAT7F31llFoEogoq74aSgbN7aoOpo/paYR/2Du9zszGdJ/1w==} peerDependencies: @@ -1383,6 +1412,20 @@ packages: vue-tsc: optional: true + '@module-federation/enhanced@0.0.0-next-20241106024856': + resolution: {integrity: sha512-Ymbzlp/FJaqlQhoTb5OunUBp4erSJ3d0acYSBnvWypGjqjSBDPdKOaiGneud/FDNrKnM9RW6BEjZy9M3dku6RA==} + peerDependencies: + typescript: ^4.9.0 || ^5.0.0 + vue-tsc: '>=1.0.24' + webpack: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + vue-tsc: + optional: true + webpack: + optional: true + '@module-federation/enhanced@0.7.1': resolution: {integrity: sha512-cTBnRRcyWW+jdh+Z0PK44o1ZDy3prOL/8iGWZ8BQK7ePjwU/5+hZMxAG9r/fIpwSblfMq2SgbGslHm+ZZzMoJw==} peerDependencies: @@ -1397,12 +1440,21 @@ packages: webpack: optional: true + '@module-federation/error-codes@0.0.0-next-20241106024856': + resolution: {integrity: sha512-qLciAyviNo0fEG/3det3vdunO5Vss3Gr63oaEEhHZAgDrP5LvnhC6Wadwbgc6yK+U1ojLCdlLNT3AKdDzDCNgA==} + '@module-federation/error-codes@0.7.1': resolution: {integrity: sha512-sQAjRXbjWMS7be0PthLtCl6N2AjjfdC1yn06KluO1hZ/DA3i+qT8x56xOh4DQ7ugPtn/7+8qiV8NAiqdxePvSQ==} + '@module-federation/managers@0.0.0-next-20241106024856': + resolution: {integrity: sha512-Dq5a1EOrMEGsbBenWEWAgpP+pANp6dEKLIjkyJsCiArfQTLxA2h+QzvCwM44pO237Ae/m34QGvzkplOxBmPfUQ==} + '@module-federation/managers@0.7.1': resolution: {integrity: sha512-raqmlygPVm7P+wD8upVVasQvMfzpquRQSOonh7oVzgs0q8Y3ifTJn6GJnaF7YoBh30sO68kKr29Vxm8MOeC4sw==} + '@module-federation/manifest@0.0.0-next-20241106024856': + resolution: {integrity: sha512-LuaHppijJiSJjry7hTTaxYG047Ce3IR0XVudA7Ryv9aDyuA50eqqLRgc4GeayhH4MpaIxYFAP/Z1uL18viAgzw==} + '@module-federation/manifest@0.7.1': resolution: {integrity: sha512-ugZz6y1ltxIrO7EVUthHyog/+dydizgFKc+MFxqyO9SE1xkN1wtsJpw+s0C8ASG6oB5ADhpnIn5zgmRwB3EKIA==} @@ -1413,6 +1465,17 @@ packages: '@module-federation/enhanced': 0.7.1 '@rsbuild/core': 1.x + '@module-federation/rspack@0.0.0-next-20241106024856': + resolution: {integrity: sha512-WMAWt8GnKXw53eIOfGZFdpnEd1A/0lLzZSm/lwtVPiPNCNmnavBzSXIWu1URppa/PqamWFeFrcgo8osssK6VTA==} + peerDependencies: + typescript: ^4.9.0 || ^5.0.0 + vue-tsc: '>=1.0.24' + peerDependenciesMeta: + typescript: + optional: true + vue-tsc: + optional: true + '@module-federation/rspack@0.7.1': resolution: {integrity: sha512-lTL7biXR4GKQRfbt+U5JMluXESq+x2Q7m502g4wi7SN3xNm/n12Fs6Ohdy+QV6j+rJWDMrcCyi7vn9cSZZcLUw==} peerDependencies: @@ -1424,27 +1487,53 @@ packages: vue-tsc: optional: true + '@module-federation/runtime-tools@0.0.0-next-20241106024856': + resolution: {integrity: sha512-zwRReQs3tzk8QnXWXg8P1Q6efMPDfN5q74LWevNt0gY36GpxAMy/x3j8hhcuWT8Ne8RNXCo4rJFH18SxFAs4pg==} + '@module-federation/runtime-tools@0.5.1': resolution: {integrity: sha512-nfBedkoZ3/SWyO0hnmaxuz0R0iGPSikHZOAZ0N/dVSQaIzlffUo35B5nlC2wgWIc0JdMZfkwkjZRrnuuDIJbzg==} '@module-federation/runtime-tools@0.7.1': resolution: {integrity: sha512-psJfcZUU648XpaoOPYwdarG/EPu5HANmQ7PdaNqYjYCxTRTcNmhXLtyScPUbBWvJ+0bTjfZQ32HgQqXVBcxQzQ==} + '@module-federation/runtime@0.0.0-next-20241106024856': + resolution: {integrity: sha512-eLv09gcgA5SYq630+Fti0ShCRiFM1Nwdc3wEXeMsl/qFhmqAF3vEqd3Q/b+04jif2GL6OOhPfdlMj2+kQ7MXGQ==} + '@module-federation/runtime@0.5.1': resolution: {integrity: sha512-xgiMUWwGLWDrvZc9JibuEbXIbhXg6z2oUkemogSvQ4LKvrl/n0kbqP1Blk669mXzyWbqtSp6PpvNdwaE1aN5xQ==} '@module-federation/runtime@0.7.1': resolution: {integrity: sha512-CONUmPTq4LywV3dJB9UQIMhC2+Vrv8XxLTQMsUf3pZDvsDAcH7MWvxzY09049rvBqE4xyhsg4U0OeGhEVbMwVQ==} + '@module-federation/sdk@0.0.0-next-20241106024856': + resolution: {integrity: sha512-O+5UL3SK+PQ6s3qokpyGsiH6uTcVIhqyWR5R+9tbFkZ4ucSGEdZG4dz5eOjJq+EFaYfyB839uDNahS5CCaC1Jg==} + '@module-federation/sdk@0.5.1': resolution: {integrity: sha512-exvchtjNURJJkpqjQ3/opdbfeT2wPKvrbnGnyRkrwW5o3FH1LaST1tkiNviT6OXTexGaVc2DahbdniQHVtQ7pA==} '@module-federation/sdk@0.7.1': resolution: {integrity: sha512-fcjJoxdi8YHYAU9gcFC2hoDPoE4rbpfpJyVE/RNbnAP+nhYNVU4WDm9PO4HohDMZ5a/4Xr0z6WSh4ZqdFn7+AA==} + '@module-federation/storybook-addon@0.0.0-next-20241106024856': + resolution: {integrity: sha512-3T2qUzBMV5REmRZXw2QdF1p3u09eb1bnsNy9oN7DUGcDBgLZibZL/mckQPTNST5ZXiMa0VpcK/z9SNoZFQb8CA==} + peerDependencies: + '@module-federation/utilities': 0.0.0-next-20241106024856 + '@nx/react': ~16.0.0 || ~17.0.0 || ~17.2.0 + '@nx/webpack': ~16.0.0 || ~17.0.0 || ~17.2.0 + '@storybook/core-common': ^6.5.16 || ^7.0.0 + '@storybook/node-logger': ^6.5.16 || ^7.0.0 + webpack: ^5.75.0 + webpack-virtual-modules: ^0.5.0 || ^0.6.0 + + '@module-federation/third-party-dts-extractor@0.0.0-next-20241106024856': + resolution: {integrity: sha512-K3uojsWp0JE82dYp7Kzs1IHql7l92t2MLRiXTyAnQCcB60W869vgeR6edlERr1fQJP+SmQW9LZ+XRbVF1k4HGg==} + '@module-federation/third-party-dts-extractor@0.7.1': resolution: {integrity: sha512-njWiqb6G3GWi9nm928ssVHQJgJTM9yxc2eeybFI5GvPo3Qg0XdkLzFz/ALKl5Esl8PdtUTrblIa6H4ch17iJxw==} + '@module-federation/webpack-bundler-runtime@0.0.0-next-20241106024856': + resolution: {integrity: sha512-lpgKirKAdp6SDq6vigOH7vfpzhnm5KXu7MBG5D1Ge92E6IFtL4sJrJtQyj03XTGpMvInSqeTsasmhPb3F6Va6g==} + '@module-federation/webpack-bundler-runtime@0.5.1': resolution: {integrity: sha512-mMhRFH0k2VjwHt3Jol9JkUsmI/4XlrAoBG3E0o7HoyoPYv1UFOWyqAflfANcUPgbYpvqmyLzDcO+3IT36LXnrA==} @@ -1539,10 +1628,22 @@ packages: engines: {node: '>=18'} hasBin: true + '@polka/url@1.0.0-next.28': + resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + '@remix-run/router@1.20.0': resolution: {integrity: sha512-mUnk8rPJBI9loFDZ+YzPGdeniYK+FTmRD1TMCz7ev2SNIozyKKpnGgsxO34u6Z4z/t0ITuu7voi/AshfsGsgFg==} engines: {node: '>=14.0.0'} + '@rollup/pluginutils@5.1.3': + resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@rollup/rollup-android-arm-eabi@4.18.1': resolution: {integrity: sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==} cpu: [arm] @@ -1676,6 +1777,14 @@ packages: peerDependencies: '@rsbuild/core': 1.x + '@rsbuild/plugin-type-check@1.0.1': + resolution: {integrity: sha512-BahXAJNq4kWtL2dINUlrOL9UCN1t8c/qf5RW8JXx2HSSasfKPJGJ1BVfieMcIaFa/t8/QdafcwoxY1WKPTlSMg==} + peerDependencies: + '@rsbuild/core': 1.x || ^1.0.1-beta.0 + peerDependenciesMeta: + '@rsbuild/core': + optional: true + '@rslib/core@0.0.16': resolution: {integrity: sha512-g6IFUZW0K7DDKK/27kF7DOKhP5JIqZoIVAU0c9DZffRE3Pw9sWTyEyVN/kaEnp5k3gaeQTBpcV9nSW+41B2slQ==} engines: {node: '>=16.0.0'} @@ -1988,6 +2097,102 @@ packages: '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@storybook/addon-docs@8.4.2': + resolution: {integrity: sha512-jIpykha7hv2Inlrq31ZoYg2QhuCuvcO+Q+uvhT45RDTB+2US/fg3rJINKlw2Djq8RPPOXvty5W0yvE6CrWKhnQ==} + peerDependencies: + storybook: ^8.4.2 + + '@storybook/blocks@8.4.2': + resolution: {integrity: sha512-yAAvmOWaD8gIrepOxCh/RxQqd/1xZIwd/V+gsvAhW/thawN+SpI+zK63gmcqAPLX84hJ3Dh5pegRk0SoHNuDVA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.2 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + + '@storybook/components@8.4.2': + resolution: {integrity: sha512-+W59oF7D73LAxLNmCfFrfs98cH9pyNHK9HlJoO5/lKbK4IdWhhOoqUR/AJ3ueksoLuetFat4DxyE8SN1H4Bvrg==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + + '@storybook/core-webpack@8.4.2': + resolution: {integrity: sha512-bzGvzrLK/oDE9YlKayDEplcECURSa1oRkvV7rxI2sOTNfwuoxHJapvxFxazEKAHMVeSwfWDf4uKK0XeG2R/arA==} + peerDependencies: + storybook: ^8.4.2 + + '@storybook/core@8.4.2': + resolution: {integrity: sha512-hF8GWoUZTjwwuV5j4OLhMHZtZQL/NYcVUBReC2Ba06c8PkFIKqKZwATr1zKd301gQ5Qwcn9WgmZxJTMgdKQtOg==} + peerDependencies: + prettier: ^2 || ^3 + peerDependenciesMeta: + prettier: + optional: true + + '@storybook/csf-plugin@8.4.2': + resolution: {integrity: sha512-1f0t6W5xbC1sSAHHs3uXYPIQs2NXAEtIGqn6X9i3xbbub6hDS8PF8BIm7dOjQ8dZOPp7d9ltR64V5CoLlsOigA==} + peerDependencies: + storybook: ^8.4.2 + + '@storybook/csf@0.1.11': + resolution: {integrity: sha512-dHYFQH3mA+EtnCkHXzicbLgsvzYjcDJ1JWsogbItZogkPHgSJM/Wr71uMkcvw8v9mmCyP4NpXJuu6bPoVsOnzg==} + + '@storybook/global@5.0.0': + resolution: {integrity: sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==} + + '@storybook/icons@1.2.12': + resolution: {integrity: sha512-UxgyK5W3/UV4VrI3dl6ajGfHM4aOqMAkFLWe2KibeQudLf6NJpDrDMSHwZj+3iKC4jFU7dkKbbtH2h/al4sW3Q==} + engines: {node: '>=14.0.0'} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + + '@storybook/manager-api@8.4.2': + resolution: {integrity: sha512-rhPc4cgQDKDH8NUyRh/ZaJW7QIhR/PO5MNX4xc+vz71sM2nO7ONA/FrgLtCuu4SULdwilEPvGefYvLK0dE+Caw==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + + '@storybook/preview-api@8.4.2': + resolution: {integrity: sha512-5X/xvIvDPaWJKUBCo5zVeBbbjkhnwcI2KPkuOgrHVRRhuQ5WqD0RYxVtOOFNyQXme7g0nNl5RFNgvT7qv9qGeg==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + + '@storybook/react-docgen-typescript-plugin@1.0.1': + resolution: {integrity: sha512-dqbHa+5gaxaklFCuV1WTvljVPTo3QIJgpW4Ln+QeME7osPZUnUhjN2/djvo+sxrWUrTTuqX5jkn291aDngu9Tw==} + peerDependencies: + typescript: '>= 3.x' + webpack: '>= 4' + + '@storybook/react-dom-shim@8.4.2': + resolution: {integrity: sha512-FZVTM1f34FpGnf6e3MDIKkz05gmn8H9wEccvQAgr8pEFe8VWfrpVWeUrmatSAfgrCMNXYC1avDend8UX6IM8Fg==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.2 + + '@storybook/react@8.4.2': + resolution: {integrity: sha512-rO5/aVKBVhIKENcL7G8ud4QKC5OyWBPCkJIvY6XUHIuhErJy9/4pP+sZ85jypVwx5kq+EqCPF8AEOWjIxB/4/Q==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@storybook/test': 8.4.2 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.2 + typescript: '>= 4.2.x' + peerDependenciesMeta: + '@storybook/test': + optional: true + typescript: + optional: true + + '@storybook/theming@8.4.2': + resolution: {integrity: sha512-9j4fnu5LcV+qSs1rdwf61Bt14lms0T1LOZkHxGNcS1c1oH+cPS+sxECh2lxtni+mvOAHUlBs9pKhVZzRPdWpvg==} + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + '@svgr/babel-plugin-add-jsx-attribute@8.0.0': resolution: {integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==} engines: {node: '>=14'} @@ -2081,6 +2286,18 @@ packages: '@types/argparse@1.0.38': resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.6.8': + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.20.6': + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/body-parser@1.19.5': resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} @@ -2096,6 +2313,9 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/doctrine@0.0.9': + resolution: {integrity: sha512-eOIHzCUSH7SMfonMG1LsC2f8vxBFtho6NGBznK41R84YzPuvSBzrhEps33IsQiOW9+VL6NQ9DbjQJznk/S4uRA==} + '@types/estree-jsx@1.0.5': resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} @@ -2126,6 +2346,9 @@ packages: '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/html-minifier-terser@7.0.2': + resolution: {integrity: sha512-mm2HqV22l8lFQh4r2oSsOEVea+m0qqxEmwpc9kC1p/XzmjLWrReR9D/GRs8Pex2NX/imyEH9c5IU/7tMBQCHOA==} + '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} @@ -2156,6 +2379,9 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + '@types/node@18.19.64': + resolution: {integrity: sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ==} + '@types/node@22.8.1': resolution: {integrity: sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==} @@ -2177,6 +2403,9 @@ packages: '@types/react@18.3.12': resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} + '@types/resolve@1.20.6': + resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} + '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -2305,8 +2534,8 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true @@ -2324,11 +2553,6 @@ packages: ajv-formats@3.0.1: resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true ajv-keywords@3.5.2: resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} @@ -2408,6 +2632,10 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} + ast-types@0.16.1: + resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==} + engines: {node: '>=4'} + astral-regex@2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} @@ -2452,6 +2680,10 @@ packages: resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} engines: {node: '>= 0.8'} + better-opn@3.0.2: + resolution: {integrity: sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==} + engines: {node: '>=12.0.0'} + better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -2495,6 +2727,9 @@ packages: brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + browser-assert@1.2.1: + resolution: {integrity: sha512-nfulgvOR6S4gt9UKCeGJOuSGBPGiFT6oQ/2UBnvTY/5aQ1PnksW72fhZkM30DzoRRv2WpwZf1vHHEr3mtuXIWQ==} + browserify-aes@1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} @@ -2563,6 +2798,9 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} + camel-case@4.1.2: + resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} + camelcase-css@2.0.1: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} @@ -2574,6 +2812,10 @@ packages: caniuse-lite@1.0.30001663: resolution: {integrity: sha512-o9C3X27GLKbLeTYZ6HBOLU1tsAcBZsLis28wrVzddShCS16RujjHp9GDHKZqrB3meE0YjhawvMFsGb/igqiPzA==} + case-sensitive-paths-webpack-plugin@2.4.0: + resolution: {integrity: sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==} + engines: {node: '>=4'} + ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -2645,6 +2887,13 @@ packages: cipher-base@1.0.4: resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + cjs-module-lexer@1.4.1: + resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} + + clean-css@5.3.3: + resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} + engines: {node: '>= 10.0'} + cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -2728,6 +2977,9 @@ packages: resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} engines: {node: '>= 10'} + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + compute-scroll-into-view@1.0.11: resolution: {integrity: sha512-uUnglJowSe0IPmWOdDtrlHXof5CTIJitfJEyITHBW6zDVOGu9Pjk5puaLM73SLcwak0L4hEjO7Td88/a6P5i7A==} @@ -2890,6 +3142,9 @@ packages: decode-named-character-reference@1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} + dedent@0.7.0: + resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} + deep-eql@5.0.2: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} @@ -2981,6 +3236,10 @@ packages: dlv@1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dom-helpers@5.2.1: resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} @@ -3061,6 +3320,9 @@ packages: end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + endent@2.1.0: + resolution: {integrity: sha512-r8VyPX7XL8U01Xgnb1CjZ3XV+z90cXIJ9JPE/R9SEC9vpw2P6CfsRPJmp20DppC5N7ZAMCmjYkJIa744Iyg96w==} + enhanced-resolve@5.17.1: resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} @@ -3097,6 +3359,11 @@ packages: es-module-lexer@1.5.4: resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + esbuild-register@3.6.0: + resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==} + peerDependencies: + esbuild: '>=0.12 <1' + esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} @@ -3158,9 +3425,16 @@ packages: estree-util-visit@1.2.1: resolution: {integrity: sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw==} + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} @@ -3216,6 +3490,9 @@ packages: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} + fast-json-parse@1.0.3: + resolution: {integrity: sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw==} + fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -3249,6 +3526,10 @@ packages: resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} engines: {node: '>= 0.8'} + find-cache-dir@3.3.2: + resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} + engines: {node: '>=8'} + find-file-up@2.0.1: resolution: {integrity: sha512-qVdaUhYO39zmh28/JLQM5CoYN9byEOKEH4qfa8K1eNV17W0UUMJ9WgbR/hHFH+t5rcl+6RTb5UC7ck/I+uRkpQ==} engines: {node: '>=8'} @@ -3261,6 +3542,10 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + find-up@6.3.0: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -3268,6 +3553,10 @@ packages: find-value@1.0.12: resolution: {integrity: sha512-OCpo8LTk8eZ2sdDCwbU2Lc3ivYsdM6yod6jP2jHcNEFcjPhkgH0+POzTIol7xx1LZgtbI5rkO5jqxsG5MWtPjQ==} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true @@ -3298,6 +3587,13 @@ packages: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} + fork-ts-checker-webpack-plugin@9.0.2: + resolution: {integrity: sha512-Uochze2R8peoN1XqlSi/rGUkDQpRogtLFocP9+PGu68zk1BDAKXfdeCdyVZpgTk8V8WFVQXdEz426VKjXLO1Gg==} + engines: {node: '>=12.13.0', yarn: '>=1.0.0'} + peerDependencies: + typescript: '>3.6.0' + webpack: ^5.11.0 + form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -3338,6 +3634,10 @@ packages: fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + fs-extra@11.2.0: resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} engines: {node: '>=14.14'} @@ -3354,6 +3654,12 @@ packages: resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} engines: {node: '>=10'} + fs-monkey@1.0.6: + resolution: {integrity: sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -3415,6 +3721,10 @@ packages: resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} hasBin: true + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + global-modules@1.0.0: resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==} engines: {node: '>=0.10.0'} @@ -3561,6 +3871,11 @@ packages: html-entities@2.5.2: resolution: {integrity: sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==} + html-minifier-terser@7.2.0: + resolution: {integrity: sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==} + engines: {node: ^14.13.1 || >=16.0.0} + hasBin: true + html-tags@3.3.1: resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==} engines: {node: '>=8'} @@ -3647,6 +3962,10 @@ packages: resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} engines: {node: '>=8'} + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -3819,6 +4138,10 @@ packages: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} + isomorphic-rslog@0.0.5: + resolution: {integrity: sha512-pkU3vvajRJ0LKLaMFy8Cj7ElbFUdkQKVhUk+DQsVCYsLW4uulU65C2s3l+Sm5OtiOwprzkYYcAIJa/COwCYHWA==} + engines: {node: '>=14.17.6'} + isomorphic-rslog@0.0.6: resolution: {integrity: sha512-HM0q6XqQ93psDlqvuViNs/Ea3hAyGDkIdVAHlrEocjjAwGrs1fZ+EdQjS9eUPacnYB7Y8SoDdSY3H8p3ce205A==} engines: {node: '>=14.17.6'} @@ -3864,11 +4187,18 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + jsdoc-type-pratt-parser@4.1.0: + resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} + engines: {node: '>=12.0.0'} + jsesc@2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} hasBin: true + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -3896,6 +4226,9 @@ packages: resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} engines: {node: '>= 0.6'} + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -3945,6 +4278,10 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + locate-path@7.2.0: resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4015,6 +4352,10 @@ packages: magic-string@0.30.12: resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} + make-dir@3.1.0: + resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} + engines: {node: '>=8'} + markdown-extensions@1.1.1: resolution: {integrity: sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==} engines: {node: '>=0.10.0'} @@ -4089,6 +4430,10 @@ packages: medium-zoom@1.1.0: resolution: {integrity: sha512-ewyDsp7k4InCUp3jRmwHBRFGyjBimKps/AJLjRSox+2q/2H4p/PNpQf+pwONWlJiOudkBXtbdmVbFjqyybfTmQ==} + memfs@3.5.3: + resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==} + engines: {node: '>= 4.0.0'} + memfs@4.14.0: resolution: {integrity: sha512-JUeY0F/fQZgIod31Ja1eJgiSxLn7BfQlCnqhwXFBzFHEw63OdLK7VJUJ7bnzNsWgCyoUP5tEp1VRY8rDaYzqOA==} engines: {node: '>= 4.0.0'} @@ -4241,6 +4586,10 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} @@ -4250,6 +4599,9 @@ packages: minimatch@3.0.8: resolution: {integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==} + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} @@ -4273,6 +4625,10 @@ packages: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} + mrmime@2.0.0: + resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} + engines: {node: '>=10'} + ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -4302,6 +4658,9 @@ packages: no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + node-abort-controller@3.1.1: + resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==} + node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} @@ -4377,6 +4736,9 @@ packages: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} + objectorarray@1.0.5: + resolution: {integrity: sha512-eJJDYkhJFFbBBAxeh8xW+weHlkI28n2ZdQV/J/DNfWfSKlGEf2xcfAbZTv3riEXHAhL9SVOTs2pRmXiSTf78xg==} + on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} @@ -4429,6 +4791,10 @@ packages: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + p-limit@4.0.0: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4437,6 +4803,10 @@ packages: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + p-locate@6.0.0: resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4458,6 +4828,9 @@ packages: pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + param-case@3.0.4: + resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -4493,6 +4866,9 @@ packages: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} + pascal-case@3.1.2: + resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} @@ -4504,6 +4880,10 @@ packages: resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -4565,6 +4945,10 @@ packages: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + playwright-core@1.48.2: resolution: {integrity: sha512-sjjw+qrLFlriJo64du+EK0kJgZzoQPsabGF4lBvsid+3CNIZIYLgnMj9V6JY5VhM2Peh20DJWIVpVljLLnlawA==} engines: {node: '>=18'} @@ -4737,6 +5121,15 @@ packages: peerDependencies: react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react-docgen-typescript@2.2.2: + resolution: {integrity: sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==} + peerDependencies: + typescript: '>= 4.3.x' + + react-docgen@7.1.0: + resolution: {integrity: sha512-APPU8HB2uZnpl6Vt/+0AFoVYgSRtfiP6FLrZgPPTDmqSb2R4qZRbgd0A3VzIFxDt5e+Fozjx79WjLWnF69DK8g==} + engines: {node: '>=16.14.0'} + react-dom@18.3.1: resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} peerDependencies: @@ -4827,6 +5220,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + recast@0.23.9: + resolution: {integrity: sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==} + engines: {node: '>= 4'} + reduce-configs@1.0.0: resolution: {integrity: sha512-/JCYSgL/QeXXsq0Lv/7kOZfqvof7vyzHWfyNQPt3c6vc73mU4WRyT8RJ6ZH5Ci08vUOqXwk7jkZy6BycHTDD9w==} @@ -4842,6 +5239,10 @@ packages: rehype-stringify@9.0.4: resolution: {integrity: sha512-Uk5xu1YKdqobe5XpSskwPvo1XeHUUucWEQSl8hTrXt5selvca1e8K1EZ37E6YoZ4BT8BCqCdVfQW7OfHfthtVQ==} + relateurl@0.2.7: + resolution: {integrity: sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==} + engines: {node: '>= 0.10'} + remark-gfm@3.0.1: resolution: {integrity: sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==} @@ -4911,6 +5312,11 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + ripemd160@2.0.2: resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} @@ -4947,6 +5353,14 @@ packages: '@rsbuild/core': optional: true + rsbuild-plugin-html-minifier-terser@1.1.1: + resolution: {integrity: sha512-rbDLv+XmGeSQo9JWKSwBst3Qwx1opLqtQCnQ3t9Z0F0ZTxKOC1S/ypPv5tSn/S3GMHct5Yb76mMgh6p80hjOAQ==} + peerDependencies: + '@rsbuild/core': 1.x || ^1.0.1-beta.0 + peerDependenciesMeta: + '@rsbuild/core': + optional: true + rslog@1.2.3: resolution: {integrity: sha512-antALPJaKBRPBU1X2q9t085K4htWDOOv/K1qhTUk7h0l1ePU/KbDqKJn19eKP0dk7PqMioeA0+fu3gyPXCsXxQ==} engines: {node: '>=14.17.6'} @@ -5208,6 +5622,10 @@ packages: simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + sirv@2.0.4: + resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} + engines: {node: '>= 10'} + slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -5281,6 +5699,50 @@ packages: resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} engines: {node: '>=18'} + storybook-addon-rslib@0.1.3: + resolution: {integrity: sha512-uIzo5XA05e1rFUmp8T2UyaqdjPDSoSDibuPsp9FKwbmJ+btZkuE2qpZ1aQ/7o9gaidt1VTyV3yK0Hr8FXpEwCQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@rsbuild/core': ^1.0.1 + '@rslib/core': '*' + storybook-builder-rsbuild: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + storybook-builder-rsbuild@0.1.3: + resolution: {integrity: sha512-/W+FE1dkLB9qeLBu1S2lVoAKPgMXCmbtnVaQ985f/F800SjcGY2MWzgvWOw8VdifVSQ0MrmhOwxRUin/C7XMZQ==} + peerDependencies: + '@rsbuild/core': ^1.0.1 + storybook: ^8.2.1 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + storybook-react-rsbuild@0.1.3: + resolution: {integrity: sha512-yBNofOrqizWvhnvXdw/mpndeXpJKpz4BcFbHtixjTvEe2LZI4xV7k9JXuj+UjF6KMweOw2noRQOWGwfpwOQstw==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@rsbuild/core': ^1.0.1 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.2.1 + typescript: '>= 4.2.x' + peerDependenciesMeta: + typescript: + optional: true + + storybook@8.4.2: + resolution: {integrity: sha512-GMCgyAulmLNrkUtDkCpFO4SB77YrpiIxq6e5tzaQdXEuaDu1mdNwOuP3VG7nE2FzxmqDvagSgriM68YW9iFaZA==} + hasBin: true + peerDependencies: + prettier: ^2 || ^3 + peerDependenciesMeta: + prettier: + optional: true + stream-browserify@3.0.0: resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} @@ -5336,6 +5798,10 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} + strip-indent@4.0.0: + resolution: {integrity: sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==} + engines: {node: '>=12'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -5435,6 +5901,9 @@ packages: resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} engines: {node: '>=0.6.0'} + tiny-invariant@1.3.3: + resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -5480,6 +5949,10 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + tree-dump@1.0.2: resolution: {integrity: sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ==} engines: {node: '>=10.0'} @@ -5492,6 +5965,10 @@ packages: trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} + ts-dedent@2.2.0: + resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} + engines: {node: '>=6.10'} + ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} @@ -5524,6 +6001,10 @@ packages: tty-browserify@0.0.1: resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} + type-fest@2.19.0: + resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} + engines: {node: '>=12.20'} + type-fest@3.13.1: resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} engines: {node: '>=14.16'} @@ -5542,6 +6023,9 @@ packages: engines: {node: '>=14.17'} hasBin: true + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} @@ -5594,6 +6078,15 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} + unplugin@1.15.0: + resolution: {integrity: sha512-jTPIs63W+DUEDW207ztbaoO7cQ4p5aVaB823LSlxpsFEU3Mykwxf3ZGC/wzxFJeZlASZYgVrWeo7LgOrqJZ8RA==} + engines: {node: '>=14.0.0'} + peerDependencies: + webpack-sources: ^3 + peerDependenciesMeta: + webpack-sources: + optional: true + upath@2.0.1: resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==} engines: {node: '>=4'} @@ -5756,6 +6249,9 @@ packages: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + webpack@5.94.0: resolution: {integrity: sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==} engines: {node: '>=10.13.0'} @@ -5849,6 +6345,10 @@ packages: resolution: {integrity: sha512-2OQsPNEmBCvXuFlIni/a+Rn+R2pHW9INm0BxXJ4hVDA8TirqMj+J/Rp9ItLatT/5pZqWwefVrTQcHpixsxnVlA==} engines: {node: '>= 4.0.0'} + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + yocto-queue@1.1.1: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} @@ -6471,6 +6971,12 @@ snapshots: '@types/react': 18.3.12 react: 18.3.1 + '@mdx-js/react@3.1.0(@types/react@18.3.12)(react@18.3.1)': + dependencies: + '@types/mdx': 2.0.13 + '@types/react': 18.3.12 + react: 18.3.1 + '@microsoft/api-extractor-model@7.29.8(@types/node@22.8.1)': dependencies: '@microsoft/tsdoc': 0.15.0 @@ -6513,12 +7019,26 @@ snapshots: lodash: 4.17.21 rslog: 1.2.3 + '@module-federation/bridge-react-webpack-plugin@0.0.0-next-20241106024856': + dependencies: + '@module-federation/sdk': 0.0.0-next-20241106024856 + '@types/semver': 7.5.8 + semver: 7.6.3 + '@module-federation/bridge-react-webpack-plugin@0.7.1': dependencies: '@module-federation/sdk': 0.7.1 '@types/semver': 7.5.8 semver: 7.6.3 + '@module-federation/data-prefetch@0.0.0-next-20241106024856(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@module-federation/runtime': 0.0.0-next-20241106024856 + '@module-federation/sdk': 0.0.0-next-20241106024856 + fs-extra: 9.1.0 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + '@module-federation/data-prefetch@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@module-federation/runtime': 0.7.1 @@ -6527,9 +7047,34 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@module-federation/dts-plugin@0.7.1(typescript@5.6.3)': + '@module-federation/dts-plugin@0.0.0-next-20241106024856(typescript@5.6.3)': dependencies: - '@module-federation/error-codes': 0.7.1 + '@module-federation/error-codes': 0.0.0-next-20241106024856 + '@module-federation/managers': 0.0.0-next-20241106024856 + '@module-federation/sdk': 0.0.0-next-20241106024856 + '@module-federation/third-party-dts-extractor': 0.0.0-next-20241106024856 + adm-zip: 0.5.16 + ansi-colors: 4.1.3 + axios: 1.7.7 + chalk: 3.0.0 + fs-extra: 9.1.0 + isomorphic-ws: 5.0.0(ws@8.18.0) + koa: 2.15.3 + lodash.clonedeepwith: 4.5.0 + log4js: 6.9.1 + node-schedule: 2.1.1 + rambda: 9.3.0 + typescript: 5.6.3 + ws: 8.18.0 + transitivePeerDependencies: + - bufferutil + - debug + - supports-color + - utf-8-validate + + '@module-federation/dts-plugin@0.7.1(typescript@5.6.3)': + dependencies: + '@module-federation/error-codes': 0.7.1 '@module-federation/managers': 0.7.1 '@module-federation/sdk': 0.7.1 '@module-federation/third-party-dts-extractor': 0.7.1 @@ -6552,6 +7097,29 @@ snapshots: - supports-color - utf-8-validate + '@module-federation/enhanced@0.0.0-next-20241106024856(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0)': + dependencies: + '@module-federation/bridge-react-webpack-plugin': 0.0.0-next-20241106024856 + '@module-federation/data-prefetch': 0.0.0-next-20241106024856(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@module-federation/dts-plugin': 0.0.0-next-20241106024856(typescript@5.6.3) + '@module-federation/managers': 0.0.0-next-20241106024856 + '@module-federation/manifest': 0.0.0-next-20241106024856(typescript@5.6.3) + '@module-federation/rspack': 0.0.0-next-20241106024856(typescript@5.6.3) + '@module-federation/runtime-tools': 0.0.0-next-20241106024856 + '@module-federation/sdk': 0.0.0-next-20241106024856 + btoa: 1.2.1 + upath: 2.0.1 + optionalDependencies: + typescript: 5.6.3 + webpack: 5.94.0 + transitivePeerDependencies: + - bufferutil + - debug + - react + - react-dom + - supports-color + - utf-8-validate + '@module-federation/enhanced@0.7.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.7.1 @@ -6575,14 +7143,37 @@ snapshots: - supports-color - utf-8-validate + '@module-federation/error-codes@0.0.0-next-20241106024856': {} + '@module-federation/error-codes@0.7.1': {} + '@module-federation/managers@0.0.0-next-20241106024856': + dependencies: + '@module-federation/sdk': 0.0.0-next-20241106024856 + find-pkg: 2.0.0 + fs-extra: 9.1.0 + '@module-federation/managers@0.7.1': dependencies: '@module-federation/sdk': 0.7.1 find-pkg: 2.0.0 fs-extra: 9.1.0 + '@module-federation/manifest@0.0.0-next-20241106024856(typescript@5.6.3)': + dependencies: + '@module-federation/dts-plugin': 0.0.0-next-20241106024856(typescript@5.6.3) + '@module-federation/managers': 0.0.0-next-20241106024856 + '@module-federation/sdk': 0.0.0-next-20241106024856 + chalk: 3.0.0 + find-pkg: 2.0.0 + transitivePeerDependencies: + - bufferutil + - debug + - supports-color + - typescript + - utf-8-validate + - vue-tsc + '@module-federation/manifest@0.7.1(typescript@5.6.3)': dependencies: '@module-federation/dts-plugin': 0.7.1(typescript@5.6.3) @@ -6604,6 +7195,22 @@ snapshots: '@module-federation/sdk': 0.7.1 '@rsbuild/core': 1.1.0 + '@module-federation/rspack@0.0.0-next-20241106024856(typescript@5.6.3)': + dependencies: + '@module-federation/bridge-react-webpack-plugin': 0.0.0-next-20241106024856 + '@module-federation/dts-plugin': 0.0.0-next-20241106024856(typescript@5.6.3) + '@module-federation/managers': 0.0.0-next-20241106024856 + '@module-federation/manifest': 0.0.0-next-20241106024856(typescript@5.6.3) + '@module-federation/runtime-tools': 0.0.0-next-20241106024856 + '@module-federation/sdk': 0.0.0-next-20241106024856 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - bufferutil + - debug + - supports-color + - utf-8-validate + '@module-federation/rspack@0.7.1(typescript@5.6.3)': dependencies: '@module-federation/bridge-react-webpack-plugin': 0.7.1 @@ -6620,6 +7227,11 @@ snapshots: - supports-color - utf-8-validate + '@module-federation/runtime-tools@0.0.0-next-20241106024856': + dependencies: + '@module-federation/runtime': 0.0.0-next-20241106024856 + '@module-federation/webpack-bundler-runtime': 0.0.0-next-20241106024856 + '@module-federation/runtime-tools@0.5.1': dependencies: '@module-federation/runtime': 0.5.1 @@ -6630,6 +7242,11 @@ snapshots: '@module-federation/runtime': 0.7.1 '@module-federation/webpack-bundler-runtime': 0.7.1 + '@module-federation/runtime@0.0.0-next-20241106024856': + dependencies: + '@module-federation/error-codes': 0.0.0-next-20241106024856 + '@module-federation/sdk': 0.0.0-next-20241106024856 + '@module-federation/runtime@0.5.1': dependencies: '@module-federation/sdk': 0.5.1 @@ -6639,18 +7256,49 @@ snapshots: '@module-federation/error-codes': 0.7.1 '@module-federation/sdk': 0.7.1 + '@module-federation/sdk@0.0.0-next-20241106024856': + dependencies: + isomorphic-rslog: 0.0.5 + '@module-federation/sdk@0.5.1': {} '@module-federation/sdk@0.7.1': dependencies: isomorphic-rslog: 0.0.6 + '@module-federation/storybook-addon@0.0.0-next-20241106024856(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack-virtual-modules@0.6.2)(webpack@5.94.0)': + dependencies: + '@module-federation/enhanced': 0.0.0-next-20241106024856(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.3)(webpack@5.94.0) + '@module-federation/sdk': 0.0.0-next-20241106024856 + webpack: 5.94.0 + webpack-virtual-modules: 0.6.2 + transitivePeerDependencies: + - bufferutil + - debug + - react + - react-dom + - supports-color + - typescript + - utf-8-validate + - vue-tsc + + '@module-federation/third-party-dts-extractor@0.0.0-next-20241106024856': + dependencies: + find-pkg: 2.0.0 + fs-extra: 9.1.0 + resolve: 1.22.8 + '@module-federation/third-party-dts-extractor@0.7.1': dependencies: find-pkg: 2.0.0 fs-extra: 9.1.0 resolve: 1.22.8 + '@module-federation/webpack-bundler-runtime@0.0.0-next-20241106024856': + dependencies: + '@module-federation/runtime': 0.0.0-next-20241106024856 + '@module-federation/sdk': 0.0.0-next-20241106024856 + '@module-federation/webpack-bundler-runtime@0.5.1': dependencies: '@module-federation/runtime': 0.5.1 @@ -6718,8 +7366,18 @@ snapshots: dependencies: playwright: 1.48.2 + '@polka/url@1.0.0-next.28': {} + '@remix-run/router@1.20.0': {} + '@rollup/pluginutils@5.1.3(rollup@4.18.1)': + dependencies: + '@types/estree': 1.0.5 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.18.1 + '@rollup/rollup-android-arm-eabi@4.18.1': optional: true @@ -6875,6 +7533,22 @@ snapshots: - supports-color - typescript + '@rsbuild/plugin-type-check@1.0.1(@rsbuild/core@1.1.0)(typescript@5.6.3)': + dependencies: + deepmerge: 4.3.1 + fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.6.3)(webpack@5.94.0) + json5: 2.2.3 + reduce-configs: 1.0.0 + webpack: 5.94.0 + optionalDependencies: + '@rsbuild/core': 1.1.0 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - typescript + - uglify-js + - webpack-cli + '@rslib/core@0.0.16(@microsoft/api-extractor@7.47.11(@types/node@22.8.1))(typescript@5.6.3)': dependencies: '@rsbuild/core': 1.0.19 @@ -7195,7 +7869,7 @@ snapshots: dependencies: ajv: 8.13.0 ajv-draft-04: 1.0.0(ajv@8.13.0) - ajv-formats: 3.0.1(ajv@8.13.0) + ajv-formats: 3.0.1 fs-extra: 7.0.1 import-lazy: 4.0.0 jju: 1.4.0 @@ -7232,6 +7906,124 @@ snapshots: '@sinclair/typebox@0.27.8': {} + '@storybook/addon-docs@8.4.2(@types/react@18.3.12)(storybook@8.4.2(prettier@3.3.3))(webpack-sources@3.2.3)': + dependencies: + '@mdx-js/react': 3.1.0(@types/react@18.3.12)(react@18.3.1) + '@storybook/blocks': 8.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.2(prettier@3.3.3)) + '@storybook/csf-plugin': 8.4.2(storybook@8.4.2(prettier@3.3.3))(webpack-sources@3.2.3) + '@storybook/react-dom-shim': 8.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.2(prettier@3.3.3)) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + storybook: 8.4.2(prettier@3.3.3) + ts-dedent: 2.2.0 + transitivePeerDependencies: + - '@types/react' + - webpack-sources + + '@storybook/blocks@8.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.2(prettier@3.3.3))': + dependencies: + '@storybook/csf': 0.1.11 + '@storybook/icons': 1.2.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + storybook: 8.4.2(prettier@3.3.3) + ts-dedent: 2.2.0 + optionalDependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + '@storybook/components@8.4.2(storybook@8.4.2(prettier@3.3.3))': + dependencies: + storybook: 8.4.2(prettier@3.3.3) + + '@storybook/core-webpack@8.4.2(storybook@8.4.2(prettier@3.3.3))': + dependencies: + '@types/node': 22.8.1 + storybook: 8.4.2(prettier@3.3.3) + ts-dedent: 2.2.0 + + '@storybook/core@8.4.2(prettier@3.3.3)': + dependencies: + '@storybook/csf': 0.1.11 + better-opn: 3.0.2 + browser-assert: 1.2.1 + esbuild: 0.23.1 + esbuild-register: 3.6.0(esbuild@0.23.1) + jsdoc-type-pratt-parser: 4.1.0 + process: 0.11.10 + recast: 0.23.9 + semver: 7.6.3 + util: 0.12.5 + ws: 8.18.0 + optionalDependencies: + prettier: 3.3.3 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@storybook/csf-plugin@8.4.2(storybook@8.4.2(prettier@3.3.3))(webpack-sources@3.2.3)': + dependencies: + storybook: 8.4.2(prettier@3.3.3) + unplugin: 1.15.0(webpack-sources@3.2.3) + transitivePeerDependencies: + - webpack-sources + + '@storybook/csf@0.1.11': + dependencies: + type-fest: 2.19.0 + + '@storybook/global@5.0.0': {} + + '@storybook/icons@1.2.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + + '@storybook/manager-api@8.4.2(storybook@8.4.2(prettier@3.3.3))': + dependencies: + storybook: 8.4.2(prettier@3.3.3) + + '@storybook/preview-api@8.4.2(storybook@8.4.2(prettier@3.3.3))': + dependencies: + storybook: 8.4.2(prettier@3.3.3) + + '@storybook/react-docgen-typescript-plugin@1.0.1(typescript@5.6.3)(webpack@5.94.0)': + dependencies: + debug: 4.3.7 + endent: 2.1.0 + find-cache-dir: 3.3.2 + flat-cache: 3.2.0 + micromatch: 4.0.7 + react-docgen-typescript: 2.2.2(typescript@5.6.3) + tslib: 2.8.1 + typescript: 5.6.3 + webpack: 5.94.0 + transitivePeerDependencies: + - supports-color + + '@storybook/react-dom-shim@8.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.2(prettier@3.3.3))': + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + storybook: 8.4.2(prettier@3.3.3) + + '@storybook/react@8.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.2(prettier@3.3.3))(typescript@5.6.3)': + dependencies: + '@storybook/components': 8.4.2(storybook@8.4.2(prettier@3.3.3)) + '@storybook/global': 5.0.0 + '@storybook/manager-api': 8.4.2(storybook@8.4.2(prettier@3.3.3)) + '@storybook/preview-api': 8.4.2(storybook@8.4.2(prettier@3.3.3)) + '@storybook/react-dom-shim': 8.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.2(prettier@3.3.3)) + '@storybook/theming': 8.4.2(storybook@8.4.2(prettier@3.3.3)) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + storybook: 8.4.2(prettier@3.3.3) + optionalDependencies: + typescript: 5.6.3 + + '@storybook/theming@8.4.2(storybook@8.4.2(prettier@3.3.3))': + dependencies: + storybook: 8.4.2(prettier@3.3.3) + '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 @@ -7331,6 +8123,27 @@ snapshots: '@types/argparse@1.0.38': {} + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.6 + + '@types/babel__generator@7.6.8': + dependencies: + '@babel/types': 7.25.6 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 + + '@types/babel__traverse@7.20.6': + dependencies: + '@babel/types': 7.25.6 + '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 @@ -7353,6 +8166,8 @@ snapshots: dependencies: '@types/ms': 0.7.34 + '@types/doctrine@0.0.9': {} + '@types/estree-jsx@1.0.5': dependencies: '@types/estree': 1.0.5 @@ -7394,6 +8209,8 @@ snapshots: dependencies: '@types/unist': 3.0.3 + '@types/html-minifier-terser@7.0.2': {} + '@types/http-errors@2.0.4': {} '@types/js-yaml@4.0.9': {} @@ -7418,6 +8235,10 @@ snapshots: '@types/node@12.20.55': {} + '@types/node@18.19.64': + dependencies: + undici-types: 5.26.5 + '@types/node@22.8.1': dependencies: undici-types: 6.19.8 @@ -7439,6 +8260,8 @@ snapshots: '@types/prop-types': 15.7.12 csstype: 3.1.3 + '@types/resolve@1.20.6': {} + '@types/semver@7.5.8': {} '@types/send@0.17.4': @@ -7598,15 +8421,15 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 - acorn-import-attributes@1.9.5(acorn@8.12.1): + acorn-import-attributes@1.9.5(acorn@8.14.0): dependencies: - acorn: 8.12.1 + acorn: 8.14.0 - acorn-jsx@5.3.2(acorn@8.12.1): + acorn-jsx@5.3.2(acorn@8.14.0): dependencies: - acorn: 8.12.1 + acorn: 8.14.0 - acorn@8.12.1: {} + acorn@8.14.0: {} adm-zip@0.5.16: {} @@ -7614,9 +8437,9 @@ snapshots: optionalDependencies: ajv: 8.13.0 - ajv-formats@3.0.1(ajv@8.13.0): - optionalDependencies: - ajv: 8.13.0 + ajv-formats@3.0.1: + dependencies: + ajv: 8.16.0 ajv-keywords@3.5.2(ajv@6.12.6): dependencies: @@ -7703,6 +8526,10 @@ snapshots: assertion-error@2.0.1: {} + ast-types@0.16.1: + dependencies: + tslib: 2.8.1 + astral-regex@2.0.0: {} astring@1.9.0: {} @@ -7741,6 +8568,10 @@ snapshots: dependencies: safe-buffer: 5.1.2 + better-opn@3.0.2: + dependencies: + open: 8.4.2 + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -7795,6 +8626,8 @@ snapshots: brorand@1.1.0: {} + browser-assert@1.2.1: {} + browserify-aes@1.2.0: dependencies: buffer-xor: 1.0.3 @@ -7886,12 +8719,19 @@ snapshots: callsites@3.1.0: {} + camel-case@4.1.2: + dependencies: + pascal-case: 3.1.2 + tslib: 2.8.1 + camelcase-css@2.0.1: {} camelcase@6.3.0: {} caniuse-lite@1.0.30001663: {} + case-sensitive-paths-webpack-plugin@2.4.0: {} + ccount@2.0.1: {} chai@5.1.2: @@ -7971,6 +8811,12 @@ snapshots: inherits: 2.0.4 safe-buffer: 5.2.1 + cjs-module-lexer@1.4.1: {} + + clean-css@5.3.3: + dependencies: + source-map: 0.6.1 + cli-cursor@3.1.0: dependencies: restore-cursor: 3.1.0 @@ -8037,6 +8883,8 @@ snapshots: commander@7.2.0: {} + commondir@1.0.1: {} + compute-scroll-into-view@1.0.11: {} compute-scroll-into-view@1.0.20: {} @@ -8195,6 +9043,8 @@ snapshots: dependencies: character-entities: 2.0.2 + dedent@0.7.0: {} + deep-eql@5.0.2: {} deep-equal@1.0.1: {} @@ -8266,6 +9116,10 @@ snapshots: dlv@1.1.3: {} + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dom-helpers@5.2.1: dependencies: '@babel/runtime': 7.24.8 @@ -8358,6 +9212,12 @@ snapshots: dependencies: once: 1.4.0 + endent@2.1.0: + dependencies: + dedent: 0.7.0 + fast-json-parse: 1.0.3 + objectorarray: 1.0.5 + enhanced-resolve@5.17.1: dependencies: graceful-fs: 4.2.11 @@ -8392,6 +9252,13 @@ snapshots: es-module-lexer@1.5.4: {} + esbuild-register@3.6.0(esbuild@0.23.1): + dependencies: + debug: 4.3.7 + esbuild: 0.23.1 + transitivePeerDependencies: + - supports-color + esbuild@0.21.5: optionalDependencies: '@esbuild/aix-ppc64': 0.21.5 @@ -8491,10 +9358,14 @@ snapshots: '@types/estree-jsx': 1.0.5 '@types/unist': 2.0.11 + estree-walker@2.0.2: {} + estree-walker@3.0.3: dependencies: '@types/estree': 1.0.5 + esutils@2.0.3: {} + etag@1.8.1: {} event-target-shim@5.0.1: {} @@ -8586,6 +9457,8 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.7 + fast-json-parse@1.0.3: {} + fast-json-stable-stringify@2.1.0: {} fastq@1.17.1: @@ -8625,6 +9498,12 @@ snapshots: transitivePeerDependencies: - supports-color + find-cache-dir@3.3.2: + dependencies: + commondir: 1.0.1 + make-dir: 3.1.0 + pkg-dir: 4.2.0 + find-file-up@2.0.1: dependencies: resolve-dir: 1.0.1 @@ -8638,6 +9517,11 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + find-up@6.3.0: dependencies: locate-path: 7.2.0 @@ -8645,6 +9529,12 @@ snapshots: find-value@1.0.12: {} + flat-cache@3.2.0: + dependencies: + flatted: 3.3.1 + keyv: 4.5.4 + rimraf: 3.0.2 + flat@5.0.2: {} flatted@3.3.1: {} @@ -8666,6 +9556,23 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 + fork-ts-checker-webpack-plugin@9.0.2(typescript@5.6.3)(webpack@5.94.0): + dependencies: + '@babel/code-frame': 7.24.7 + chalk: 4.1.2 + chokidar: 3.6.0 + cosmiconfig: 8.3.6(typescript@5.6.3) + deepmerge: 4.3.1 + fs-extra: 10.1.0 + memfs: 3.5.3 + minimatch: 3.1.2 + node-abort-controller: 3.1.1 + schema-utils: 3.3.0 + semver: 7.6.3 + tapable: 2.2.1 + typescript: 5.6.3 + webpack: 5.94.0 + form-data@4.0.0: dependencies: asynckit: 0.4.0 @@ -8695,6 +9602,12 @@ snapshots: fs-constants@1.0.0: {} + fs-extra@10.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + fs-extra@11.2.0: dependencies: graceful-fs: 4.2.11 @@ -8720,6 +9633,10 @@ snapshots: jsonfile: 6.1.0 universalify: 2.0.1 + fs-monkey@1.0.6: {} + + fs.realpath@1.0.0: {} + fsevents@2.3.2: optional: true @@ -8773,6 +9690,15 @@ snapshots: package-json-from-dist: 1.0.1 path-scurry: 1.11.1 + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + global-modules@1.0.0: dependencies: global-prefix: 1.0.2 @@ -9017,6 +9943,16 @@ snapshots: html-entities@2.5.2: {} + html-minifier-terser@7.2.0: + dependencies: + camel-case: 4.1.2 + clean-css: 5.3.3 + commander: 10.0.1 + entities: 4.5.0 + param-case: 3.0.4 + relateurl: 0.2.7 + terser: 5.31.6 + html-tags@3.3.1: {} html-to-text@9.0.5: @@ -9133,6 +10069,11 @@ snapshots: import-lazy@4.0.0: {} + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + inherits@2.0.4: {} ini@1.3.8: {} @@ -9261,6 +10202,8 @@ snapshots: isobject@3.0.1: {} + isomorphic-rslog@0.0.5: {} + isomorphic-rslog@0.0.6: {} isomorphic-ws@5.0.0(ws@8.18.0): @@ -9305,8 +10248,12 @@ snapshots: dependencies: argparse: 2.0.1 + jsdoc-type-pratt-parser@4.1.0: {} + jsesc@2.5.2: {} + json-buffer@3.0.1: {} + json-parse-even-better-errors@2.3.1: {} json-schema-traverse@0.4.1: {} @@ -9331,6 +10278,10 @@ snapshots: dependencies: tsscmp: 1.0.6 + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + kind-of@6.0.3: {} kleur@4.1.5: {} @@ -9392,6 +10343,10 @@ snapshots: dependencies: p-locate: 4.1.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + locate-path@7.2.0: dependencies: p-locate: 6.0.0 @@ -9466,6 +10421,10 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + make-dir@3.1.0: + dependencies: + semver: 6.3.1 + markdown-extensions@1.1.1: {} markdown-table@3.0.3: {} @@ -9636,6 +10595,10 @@ snapshots: medium-zoom@1.1.0: {} + memfs@3.5.3: + dependencies: + fs-monkey: 1.0.6 + memfs@4.14.0: dependencies: '@jsonjoy.com/json-pack': 1.0.4(tslib@2.8.1) @@ -9770,8 +10733,8 @@ snapshots: micromark-extension-mdxjs@1.0.1: dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) micromark-extension-mdx-expression: 1.0.8 micromark-extension-mdx-jsx: 1.0.5 micromark-extension-mdx-md: 1.0.1 @@ -9937,6 +10900,8 @@ snapshots: mimic-function@5.0.1: {} + min-indent@1.0.1: {} + minimalistic-assert@1.0.1: {} minimalistic-crypto-utils@1.0.1: {} @@ -9945,6 +10910,10 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + minimatch@9.0.3: dependencies: brace-expansion: 2.0.1 @@ -9963,6 +10932,8 @@ snapshots: mri@1.2.0: {} + mrmime@2.0.0: {} + ms@2.0.0: {} ms@2.1.3: {} @@ -9988,6 +10959,8 @@ snapshots: lower-case: 2.0.2 tslib: 2.8.1 + node-abort-controller@3.1.1: {} + node-domexception@1.0.0: {} node-fetch@3.3.2: @@ -10090,6 +11063,8 @@ snapshots: has-symbols: 1.0.3 object-keys: 1.1.1 + objectorarray@1.0.5: {} + on-finished@2.4.1: dependencies: ee-first: 1.1.1 @@ -10153,6 +11128,10 @@ snapshots: dependencies: p-try: 2.2.0 + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + p-limit@4.0.0: dependencies: yocto-queue: 1.1.1 @@ -10161,6 +11140,10 @@ snapshots: dependencies: p-limit: 2.3.0 + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + p-locate@6.0.0: dependencies: p-limit: 4.0.0 @@ -10175,6 +11158,11 @@ snapshots: pako@1.0.11: {} + param-case@3.0.4: + dependencies: + dot-case: 3.0.4 + tslib: 2.8.1 + parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -10230,12 +11218,19 @@ snapshots: parseurl@1.3.3: {} + pascal-case@3.1.2: + dependencies: + no-case: 3.0.4 + tslib: 2.8.1 + path-browserify@1.0.1: {} path-exists@4.0.0: {} path-exists@5.0.0: {} + path-is-absolute@1.0.1: {} + path-key@3.1.1: {} path-parse@1.0.7: {} @@ -10283,6 +11278,10 @@ snapshots: pirates@4.0.6: {} + pkg-dir@4.2.0: + dependencies: + find-up: 4.1.0 + playwright-core@1.48.2: {} playwright@1.48.2: @@ -10454,6 +11453,25 @@ snapshots: '@babel/runtime': 7.24.8 react: 18.3.1 + react-docgen-typescript@2.2.2(typescript@5.6.3): + dependencies: + typescript: 5.6.3 + + react-docgen@7.1.0: + dependencies: + '@babel/core': 7.25.2 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 + '@types/babel__core': 7.20.5 + '@types/babel__traverse': 7.20.6 + '@types/doctrine': 0.0.9 + '@types/resolve': 1.20.6 + doctrine: 3.0.0 + resolve: 1.22.8 + strip-indent: 4.0.0 + transitivePeerDependencies: + - supports-color + react-dom@18.3.1(react@18.3.1): dependencies: loose-envify: 1.4.0 @@ -10570,6 +11588,14 @@ snapshots: dependencies: picomatch: 2.3.1 + recast@0.23.9: + dependencies: + ast-types: 0.16.1 + esprima: 4.0.1 + source-map: 0.6.1 + tiny-invariant: 1.3.3 + tslib: 2.8.1 + reduce-configs@1.0.0: dependencies: browserslist: 4.24.0 @@ -10598,6 +11624,8 @@ snapshots: hast-util-to-html: 8.0.4 unified: 10.1.2 + relateurl@0.2.7: {} + remark-gfm@3.0.1: dependencies: '@types/mdast': 3.0.15 @@ -10691,6 +11719,10 @@ snapshots: rfdc@1.4.1: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + ripemd160@2.0.2: dependencies: hash-base: 3.1.0 @@ -10740,6 +11772,13 @@ snapshots: optionalDependencies: '@rsbuild/core': 1.1.0 + rsbuild-plugin-html-minifier-terser@1.1.1(@rsbuild/core@1.1.0): + dependencies: + '@types/html-minifier-terser': 7.0.2 + html-minifier-terser: 7.2.0 + optionalDependencies: + '@rsbuild/core': 1.1.0 + rslog@1.2.3: {} rspack-plugin-virtual-module@0.1.13: @@ -10989,6 +12028,12 @@ snapshots: dependencies: is-arrayish: 0.3.2 + sirv@2.0.4: + dependencies: + '@polka/url': 1.0.0-next.28 + mrmime: 2.0.0 + totalist: 3.0.1 + slash@3.0.0: {} slash@4.0.0: {} @@ -11053,6 +12098,86 @@ snapshots: stdin-discarder@0.2.2: {} + storybook-addon-rslib@0.1.3(@rsbuild/core@1.1.0)(@rslib/core@packages+core)(storybook-builder-rsbuild@0.1.3(@rsbuild/core@1.1.0)(@types/react@18.3.12)(storybook@8.4.2(prettier@3.3.3))(typescript@5.6.3)(webpack-sources@3.2.3))(typescript@5.6.3): + dependencies: + '@rsbuild/core': 1.1.0 + '@rslib/core': link:packages/core + storybook-builder-rsbuild: 0.1.3(@rsbuild/core@1.1.0)(@types/react@18.3.12)(storybook@8.4.2(prettier@3.3.3))(typescript@5.6.3)(webpack-sources@3.2.3) + optionalDependencies: + typescript: 5.6.3 + + storybook-builder-rsbuild@0.1.3(@rsbuild/core@1.1.0)(@types/react@18.3.12)(storybook@8.4.2(prettier@3.3.3))(typescript@5.6.3)(webpack-sources@3.2.3): + dependencies: + '@rsbuild/core': 1.1.0 + '@rsbuild/plugin-type-check': 1.0.1(@rsbuild/core@1.1.0)(typescript@5.6.3) + '@storybook/addon-docs': 8.4.2(@types/react@18.3.12)(storybook@8.4.2(prettier@3.3.3))(webpack-sources@3.2.3) + '@storybook/core-webpack': 8.4.2(storybook@8.4.2(prettier@3.3.3)) + browser-assert: 1.2.1 + case-sensitive-paths-webpack-plugin: 2.4.0 + cjs-module-lexer: 1.4.1 + constants-browserify: 1.0.0 + es-module-lexer: 1.5.4 + fs-extra: 11.2.0 + magic-string: 0.30.12 + path-browserify: 1.0.1 + process: 0.11.10 + rsbuild-plugin-html-minifier-terser: 1.1.1(@rsbuild/core@1.1.0) + sirv: 2.0.4 + storybook: 8.4.2(prettier@3.3.3) + ts-dedent: 2.2.0 + url: 0.11.4 + util: 0.12.5 + util-deprecate: 1.0.2 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - '@swc/core' + - '@types/react' + - esbuild + - uglify-js + - webpack-cli + - webpack-sources + + storybook-react-rsbuild@0.1.3(@rsbuild/core@1.1.0)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.18.1)(storybook@8.4.2(prettier@3.3.3))(typescript@5.6.3)(webpack-sources@3.2.3)(webpack@5.94.0): + dependencies: + '@rollup/pluginutils': 5.1.3(rollup@4.18.1) + '@rsbuild/core': 1.1.0 + '@storybook/react': 8.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.4.2(prettier@3.3.3))(typescript@5.6.3) + '@storybook/react-docgen-typescript-plugin': 1.0.1(typescript@5.6.3)(webpack@5.94.0) + '@types/node': 18.19.64 + find-up: 5.0.0 + magic-string: 0.30.12 + react: 18.3.1 + react-docgen: 7.1.0 + react-dom: 18.3.1(react@18.3.1) + resolve: 1.22.8 + storybook: 8.4.2(prettier@3.3.3) + storybook-builder-rsbuild: 0.1.3(@rsbuild/core@1.1.0)(@types/react@18.3.12)(storybook@8.4.2(prettier@3.3.3))(typescript@5.6.3)(webpack-sources@3.2.3) + tsconfig-paths: 4.2.0 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - '@storybook/test' + - '@swc/core' + - '@types/react' + - esbuild + - rollup + - supports-color + - uglify-js + - webpack + - webpack-cli + - webpack-sources + + storybook@8.4.2(prettier@3.3.3): + dependencies: + '@storybook/core': 8.4.2(prettier@3.3.3) + optionalDependencies: + prettier: 3.3.3 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + stream-browserify@3.0.0: dependencies: inherits: 2.0.4 @@ -11120,6 +12245,10 @@ snapshots: strip-final-newline@2.0.0: {} + strip-indent@4.0.0: + dependencies: + min-indent: 1.0.1 + strip-json-comments@3.1.1: {} style-to-object@0.4.4: @@ -11226,7 +12355,7 @@ snapshots: terser@5.31.6: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.12.1 + acorn: 8.14.0 commander: 2.20.3 source-map-support: 0.5.21 @@ -11246,6 +12375,8 @@ snapshots: dependencies: setimmediate: 1.0.5 + tiny-invariant@1.3.3: {} + tinybench@2.9.0: {} tinyexec@0.3.1: {} @@ -11277,6 +12408,8 @@ snapshots: toidentifier@1.0.1: {} + totalist@3.0.1: {} + tree-dump@1.0.2(tslib@2.8.1): dependencies: tslib: 2.8.1 @@ -11285,6 +12418,8 @@ snapshots: trough@2.2.0: {} + ts-dedent@2.2.0: {} + ts-interface-checker@0.1.13: {} tsconfck@3.1.4(typescript@5.6.3): @@ -11310,6 +12445,8 @@ snapshots: tty-browserify@0.0.1: {} + type-fest@2.19.0: {} + type-fest@3.13.1: {} type-is@1.6.18: @@ -11321,6 +12458,8 @@ snapshots: typescript@5.6.3: {} + undici-types@5.26.5: {} + undici-types@6.19.8: {} unified@10.1.2: @@ -11385,6 +12524,13 @@ snapshots: unpipe@1.0.0: {} + unplugin@1.15.0(webpack-sources@3.2.3): + dependencies: + acorn: 8.14.0 + webpack-virtual-modules: 0.6.2 + optionalDependencies: + webpack-sources: 3.2.3 + upath@2.0.1: {} update-browserslist-db@1.1.0(browserslist@4.24.0): @@ -11553,14 +12699,16 @@ snapshots: webpack-sources@3.2.3: {} + webpack-virtual-modules@0.6.2: {} + webpack@5.94.0: dependencies: '@types/estree': 1.0.5 '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/wasm-edit': 1.12.1 '@webassemblyjs/wasm-parser': 1.12.1 - acorn: 8.12.1 - acorn-import-attributes: 1.9.5(acorn@8.12.1) + acorn: 8.14.0 + acorn-import-attributes: 1.9.5(acorn@8.14.0) browserslist: 4.24.0 chrome-trace-event: 1.0.4 enhanced-resolve: 5.17.1 @@ -11655,6 +12803,8 @@ snapshots: ylru@1.4.0: {} + yocto-queue@0.1.0: {} + yocto-queue@1.1.1: {} zwitch@2.0.4: {} diff --git a/tests/playwright.config.ts b/tests/playwright.config.ts index 2c2b06ac7..9534c1c40 100644 --- a/tests/playwright.config.ts +++ b/tests/playwright.config.ts @@ -14,7 +14,7 @@ export default defineConfig({ timeout: 120 * 1000, }, { - command: 'cd ../examples/module-federation && npm run dev:lib', + command: 'cd ../examples/module-federation && npm run serve:lib', url: 'http://127.0.0.1:3001', timeout: 120 * 1000, }, diff --git a/website/docs/en/guide/advanced/module-federation.mdx b/website/docs/en/guide/advanced/module-federation.mdx index 2d6808ed8..7f70d00dc 100644 --- a/website/docs/en/guide/advanced/module-federation.mdx +++ b/website/docs/en/guide/advanced/module-federation.mdx @@ -27,14 +27,7 @@ First install the Module Federation Rsbuild Plugin (Rslib is based on Rsbuild). import { PackageManagerTabs } from '@theme'; - + Add the plugin to the `rslib.config.ts` file: @@ -52,9 +45,17 @@ export default defineConfig({ distPath: { root: './dist/mf', }, - // add your assetPrefix here + // for production, add online assetPrefix here assetPrefix: 'http://localhost:3001/mf', }, + // for Storybook to dev + dev: { + assetPrefix: 'http://localhost:3001/mf', + }, + // for Storybook to dev + server: { + port: 3001, + }, plugins: [ pluginModuleFederation({ name: 'rslib_provider', @@ -62,7 +63,7 @@ export default defineConfig({ // add expose here }, // can not add 'remote' here, because you may build 'esm' or 'cjs' assets in one build. - // if you want the rslib package use remote module, please see below. + // if you want the Rslib package use remote module, please see below. shared: { react: { singleton: true, @@ -88,20 +89,129 @@ In the above example we added a new `format: 'mf'` , which will help you add an However, if you want this Rslib Module to consume other producers at the same time, do not use the build configuration `remote` parameter, because in other formats, this may cause errors, please refer to the example below using the Module Federation runtime +## Develop Module Federation remote module + +Rslib support using Storybook to development Module Federation Rslib module. + +### 1. Add Rslib `mf dev` command + +```json title="package.json" +{ + // ... + "scripts": { + "dev": "rslib mf dev" + } +} +``` + + +Running the `dev` command can start the Module Federation development mode, +enabling consumption by either your **Host app** or the **Storybook app**, along +with Hot Module Replacement (HMR). + +### 2. Install Storybook and Rsbuild Storybook addon + + + +`React App` + + + +`Vue App` + + + +This chapter will use `React App` as an example later. + +### 3. Create `.storybook/main.ts` and add addons + +```ts title=".storybook/main.ts" {13-38} +import { dirname, join } from 'node:path'; +import type { StorybookConfig } from 'storybook-react-rsbuild'; + +function getAbsolutePath(value: string): any { + return dirname(require.resolve(join(value, 'package.json'))); +} + +const config: StorybookConfig = { + stories: [ + '../stories/**/*.mdx', + '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)', + ], + framework: { + name: getAbsolutePath('storybook-react-rsbuild'), + options: {}, + }, + addons: [ + { + name: getAbsolutePath('storybook-addon-rslib'), + options: { + rslib: { + include: ['**/stories/**'], + }, + }, + }, + { + name: '@module-federation/storybook-addon/preset', + options: { + // add your rslib module manifest here for storybook dev + // we have set dev.assetPrefix and server.port to 3001 in rslib.config.ts above + remotes: { + 'rslib-module': + // you can also add shared here for storybook app + // shared: {} + 'rslib-module@http://localhost:3001/mf/mf-manifest.json', + }, + }, + }, + ], +}; + +export default config; +``` + +### 4. Start writing stories + +```ts title="stories/index.stories.tsx" {2-3} +import React from 'react'; +// Load your remote module here, Storybook will act as the host app. +import { Counter } from 'rslib-module'; + +const Component = () => ; + +export default { + title: 'App Component', + component: Component, +}; + +export const Primary = {}; +``` + +### 5. Add Module Federation types and stories into `tsconfig.json`. + +```json title="tsconfig.json" +{ + "compilerOptions": { + // ... + "paths": { + "*": ["./@mf-types/*"] + } + }, + "include": ["src/**/*", ".storybook/**/*", "stories/**/*"] +} +``` + +### 6. Start Storybook app + +There you go, start Storybook with `npx storybook dev`. + ## Consume other Module Federation modules Because there are multiple formats in Rslib, if you configure the `remote` parameter to consume other modules during construction, it may not work properly in all formats. It is recommended to access through the [Module Federation Runtime](https://module-federation.io/guide/basic/runtime.html) First install the runtime dependencies - + Then consume other Module Federation modules at runtime, for example @@ -159,3 +269,5 @@ pluginModuleFederation({ - `mf-host`: Rsbuild App Consumer - `mf-react-component`: Rslib Module, which is both a producer and a consumer, provides the module to the `mf-host` as a producer, and consumes the `mf-remote` - `mf-remote`: Rsbuild App Producer + +[Rslib Module Federation Storybook Example](https://github.com/web-infra-dev/rslib/tree/main/examples/module-federation/mf-react-component) diff --git a/website/docs/en/guide/basic/cli.mdx b/website/docs/en/guide/basic/cli.mdx index c455f6c30..c5ac498cd 100644 --- a/website/docs/en/guide/basic/cli.mdx +++ b/website/docs/en/guide/basic/cli.mdx @@ -101,3 +101,19 @@ Inspect config succeed, open following files to view the content: - Rspack Config (esm): /project/dist/.rsbuild/rspack.config.esm.mjs - Rspack Config (cjs): /project/dist/.rsbuild/rspack.config.cjs.mjs ``` + +## rslib mf dev + +The `rslib mf dev` command is utilized to start Rsbuild dev server of Module Federation format. +This enables you to develop your mf format module within the host app more rapidly. + +```text +Usage: rslib mf dev [options] + +start Rsbuild dev server of Module Federation format. + +Options: + -c --config specify the configuration file, can be a relative or absolute path + --env-mode specify the env mode to load the `.env.[mode]` file + -h, --help display help for command +``` From 8fb5d50445a7479bcb0ca7485add91195f1cd7c6 Mon Sep 17 00:00:00 2001 From: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> Date: Mon, 11 Nov 2024 20:16:33 +0800 Subject: [PATCH 23/23] Release v0.0.17 (#402) --- CONTRIBUTING.md | 8 -------- packages/core/package.json | 2 +- packages/create-rslib/package.json | 2 +- packages/plugin-dts/package.json | 2 +- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff4467969..3ccfe25dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -135,11 +135,3 @@ Here are the steps to publish (we generally use CI for releases and avoid publis 2. [Run the release action on release branch](https://github.com/web-infra-dev/rslib/actions/workflows/release.yml). 3. Merge the release pull request. 4. [Create Git tag on main branch and generate the release notes](https://github.com/web-infra-dev/rslib/releases). - -## Caveats - -The project is still in its early stages and under active development, so it possible dependents on Rsbuild or Rspack canary versions to test the latest features. The current versions are: - -| Package | Link | -| ------------ | ------------------------------------------------------------ | -| @rspack/core | https://github.com/web-infra-dev/rspack/releases/tag/v1.0.14 | diff --git a/packages/core/package.json b/packages/core/package.json index 596991949..67554c92e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@rslib/core", - "version": "0.0.16", + "version": "0.0.17", "description": "The Rsbuild-based library development tool.", "homepage": "https://lib.rsbuild.dev", "bugs": { diff --git a/packages/create-rslib/package.json b/packages/create-rslib/package.json index 9f20f635d..3b854bf84 100644 --- a/packages/create-rslib/package.json +++ b/packages/create-rslib/package.json @@ -1,6 +1,6 @@ { "name": "create-rslib", - "version": "0.0.16", + "version": "0.0.17", "description": "Create a new Rslib project", "homepage": "https://lib.rsbuild.dev", "repository": { diff --git a/packages/plugin-dts/package.json b/packages/plugin-dts/package.json index f0166f676..029e4c427 100644 --- a/packages/plugin-dts/package.json +++ b/packages/plugin-dts/package.json @@ -1,6 +1,6 @@ { "name": "rsbuild-plugin-dts", - "version": "0.0.16", + "version": "0.0.17", "description": "Rsbuild plugin that supports emitting declaration files for TypeScript.", "homepage": "https://lib.rsbuild.dev", "bugs": {