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 @@
-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