storybook-react-rsbuild 3.6.1 → 4.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -16,14 +16,6 @@ declare type FrameworkName = CompatibleString<'storybook-react-rsbuild'>;
16
16
  export declare type FrameworkOptions = {
17
17
  builder?: BuilderOptions;
18
18
  strictMode?: boolean;
19
- /**
20
- * Use React's legacy root API to mount components
21
- * @description
22
- * React has introduced a new root API with React 18.x to enable a whole set of new features (e.g. concurrent features)
23
- * If this flag is true, the legacy Root API is used to mount components to make it easier to migrate step by step to React 18.
24
- * @default false
25
- */
26
- legacyRootApi?: boolean;
27
19
  };
28
20
 
29
21
  /**
@@ -58,6 +50,7 @@ declare type TypescriptOptionsReact = {
58
50
  * Sets the type of Docgen when working with React and TypeScript
59
51
  *
60
52
  * @default `'react-docgen'`
53
+ * @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
61
54
  */
62
55
  reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
63
56
  /**
@@ -65,6 +58,7 @@ declare type TypescriptOptionsReact = {
65
58
  *
66
59
  * @default
67
60
  * @see https://github.com/storybookjs/storybook/blob/next/code/builders/builder-webpack5/src/config/defaults.js#L4-L6
61
+ * @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
68
62
  */
69
63
  reactDocgenTypescriptOptions: PluginOptions;
70
64
  };
@@ -15,14 +15,6 @@ declare type FrameworkName = CompatibleString<'storybook-react-rsbuild'>;
15
15
  declare type FrameworkOptions = {
16
16
  builder?: BuilderOptions;
17
17
  strictMode?: boolean;
18
- /**
19
- * Use React's legacy root API to mount components
20
- * @description
21
- * React has introduced a new root API with React 18.x to enable a whole set of new features (e.g. concurrent features)
22
- * If this flag is true, the legacy Root API is used to mount components to make it easier to migrate step by step to React 18.
23
- * @default false
24
- */
25
- legacyRootApi?: boolean;
26
18
  };
27
19
 
28
20
  /**
@@ -57,6 +49,7 @@ declare type TypescriptOptionsReact = {
57
49
  * Sets the type of Docgen when working with React and TypeScript
58
50
  *
59
51
  * @default `'react-docgen'`
52
+ * @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
60
53
  */
61
54
  reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
62
55
  /**
@@ -64,6 +57,7 @@ declare type TypescriptOptionsReact = {
64
57
  *
65
58
  * @default
66
59
  * @see https://github.com/storybookjs/storybook/blob/next/code/builders/builder-webpack5/src/config/defaults.js#L4-L6
60
+ * @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
67
61
  */
68
62
  reactDocgenTypescriptOptions: PluginOptions;
69
63
  };
package/dist/preset.d.ts CHANGED
@@ -16,14 +16,6 @@ declare type FrameworkName = CompatibleString<'storybook-react-rsbuild'>;
16
16
  declare type FrameworkOptions = {
17
17
  builder?: BuilderOptions;
18
18
  strictMode?: boolean;
19
- /**
20
- * Use React's legacy root API to mount components
21
- * @description
22
- * React has introduced a new root API with React 18.x to enable a whole set of new features (e.g. concurrent features)
23
- * If this flag is true, the legacy Root API is used to mount components to make it easier to migrate step by step to React 18.
24
- * @default false
25
- */
26
- legacyRootApi?: boolean;
27
19
  };
28
20
 
29
21
  export declare const rsbuildFinal: NonNullable<StorybookConfig['rsbuildFinal']>;
@@ -60,6 +52,7 @@ declare type TypescriptOptionsReact = {
60
52
  * Sets the type of Docgen when working with React and TypeScript
61
53
  *
62
54
  * @default `'react-docgen'`
55
+ * @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
63
56
  */
64
57
  reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
65
58
  /**
@@ -67,6 +60,7 @@ declare type TypescriptOptionsReact = {
67
60
  *
68
61
  * @default
69
62
  * @see https://github.com/storybookjs/storybook/blob/next/code/builders/builder-webpack5/src/config/defaults.js#L4-L6
63
+ * @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
70
64
  */
71
65
  reactDocgenTypescriptOptions: PluginOptions;
72
66
  };
package/dist/preset.js CHANGED
@@ -3,16 +3,18 @@ const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(/*#__PURE__*/
3
3
  import { mergeRsbuildConfig } from "@rsbuild/core";
4
4
  import { createRequire } from "node:module";
5
5
  import { fileURLToPath } from "node:url";
6
+ import { deprecate } from "storybook/internal/node-logger";
6
7
  function requirer(resolver, path) {
7
8
  return resolver(path);
8
9
  }
9
10
  const rsbuildFinalDocs = async (config, options)=>{
10
11
  const features = await options.presets.apply('features', {});
11
- if (features?.experimentalDocgenServer) return config;
12
+ if (features?.docgenServer) return config;
12
13
  const typescriptOptions = await options.presets.apply("typescript", {});
13
14
  const debug = 'debug' === options.loglevel;
14
15
  const { reactDocgen, reactDocgenTypescriptOptions } = typescriptOptions || {};
15
16
  if ('string' != typeof reactDocgen) return config;
17
+ deprecate(`Builder docgen (\`typescript.reactDocgen: '${reactDocgen}'\`) is deprecated and will be removed in Storybook 12. It runs because \`features.docgenServer\` is off. Server-side docgen needs the \`typescript\` package: install it and remove any \`docgenServer: false\` from your \`.storybook/main.ts\`.`);
16
18
  const reactDocgenLoaderRule = (test)=>({
17
19
  test,
18
20
  enforce: 'pre',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-react-rsbuild",
3
- "version": "3.6.1",
3
+ "version": "4.0.0-beta.0",
4
4
  "description": "Storybook for React and Rsbuild: Develop React components in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook",
@@ -47,32 +47,32 @@
47
47
  ],
48
48
  "dependencies": {
49
49
  "@rollup/pluginutils": "^5.4.0",
50
- "@storybook/react": "^10.6.0",
50
+ "@storybook/react": "^11.0.0-alpha.9",
51
51
  "@storybook/react-docgen-typescript-plugin": "^1.0.1",
52
- "magic-string": "^1.4.2",
52
+ "magic-string": "^1.4.3",
53
53
  "react-docgen": "^8.0.4",
54
54
  "react-docgen-typescript": "^2.4.0",
55
- "resolve": "^1.22.12",
55
+ "resolve": "^1.22.13",
56
56
  "tsconfig-paths": "^4.2.0",
57
- "storybook-builder-rsbuild": "3.6.1"
57
+ "storybook-builder-rsbuild": "4.0.0-beta.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@microsoft/api-extractor": "^7.59.3",
61
- "@rsbuild/core": "^2.2.11",
62
- "@types/node": "^22.0.0",
60
+ "@microsoft/api-extractor": "^7.59.4",
61
+ "@rsbuild/core": "^2.2.13",
62
+ "@types/node": "^22.12.0",
63
63
  "@types/react": "^18.3.31",
64
64
  "@types/resolve": "^1.20.6",
65
65
  "react": "18.3.1",
66
66
  "react-dom": "18.3.1",
67
- "storybook": "10.6.0",
67
+ "storybook": "11.0.0-alpha.9",
68
68
  "typescript": "^5.9.3"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@rsbuild/core": "^1.5.0 || ^2.0.0-0",
72
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
73
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
74
- "storybook": "^10.6.0",
75
- "typescript": ">= 4.2.x"
72
+ "react": "^18.0.0 || ^19.0.0",
73
+ "react-dom": "^18.0.0 || ^19.0.0",
74
+ "storybook": "^11.0.0-alpha.9",
75
+ "typescript": "^5.9.0 || ^6.0.0 || ^7.0.0"
76
76
  },
77
77
  "peerDependenciesMeta": {
78
78
  "typescript": {
@@ -80,7 +80,7 @@
80
80
  }
81
81
  },
82
82
  "engines": {
83
- "node": ">=18.0.0"
83
+ "node": ">=22.12.0"
84
84
  },
85
85
  "publishConfig": {
86
86
  "access": "public"