storybook-react-rsbuild 0.0.2 → 0.0.3

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.
@@ -801,8 +801,6 @@ type BaseIndexInput = {
801
801
  metaId?: MetaId;
802
802
  /** Tags for filtering entries in Storybook and its tools. */
803
803
  tags?: Tag$1[];
804
- /** Tags from the meta for filtering entries in Storybook and its tools. */
805
- metaTags?: Tag$1[];
806
804
  /**
807
805
  * The id of the entry, auto-generated from {@link title}/{@link metaId} and {@link exportName} if unspecified.
808
806
  * If specified, the story in the CSF file _must_ have a matching id set at `parameters.__id`, to be correctly matched.
@@ -997,6 +995,8 @@ type DocsOptions = {
997
995
  * Should we generate a docs entry per CSF file?
998
996
  * Set to 'tag' (the default) to generate an entry for every CSF file with the
999
997
  * 'autodocs' tag.
998
+ *
999
+ * @deprecated Use `tags: ['autodocs']` in `.storybook/preview.js` instead
1000
1000
  */
1001
1001
  autodocs?: boolean | 'tag';
1002
1002
  /**
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { F as FrameworkOptions, S as StorybookConfig } from './index-8cba017d.js';
1
+ export { F as FrameworkOptions, S as StorybookConfig } from './index-8df66448.js';
2
2
  import 'storybook-builder-rsbuild';
3
3
  import 'file-system-cache';
4
4
  import 'http';
@@ -133,13 +133,22 @@ var actualNameHandler = function actualNameHandler2(documentation, componentDefi
133
133
  var defaultHandlers = Object.values(import_react_docgen.builtinHandlers).map((handler) => handler);
134
134
  var defaultResolver = new import_react_docgen.builtinResolvers.FindExportedDefinitionsResolver();
135
135
  var handlers = [...defaultHandlers, actualNameHandler];
136
- var tsconfigPathsInitialized = false;
136
+ var tsconfigPathsInitializeStatus = "uninitialized";
137
+ var resolveTsconfigPathsInitialingPromise;
138
+ var tsconfigPathsInitialingPromise = new Promise((resolve2) => {
139
+ resolveTsconfigPathsInitialingPromise = resolve2;
140
+ });
141
+ var finishInitialization = () => {
142
+ resolveTsconfigPathsInitialingPromise();
143
+ tsconfigPathsInitializeStatus = "initialized";
144
+ };
137
145
  var matchPath;
138
146
  async function reactDocgenLoader(source) {
139
147
  const callback = this.async();
140
148
  const options = this.getOptions() || {};
141
149
  const { debug = false } = options;
142
- if (!tsconfigPathsInitialized) {
150
+ if (tsconfigPathsInitializeStatus === "uninitialized") {
151
+ tsconfigPathsInitializeStatus = "initializing";
143
152
  const tsconfigPath = await (0, import_find_up.default)("tsconfig.json", { cwd: process.cwd() });
144
153
  const tsconfig = TsconfigPaths.loadConfig(tsconfigPath);
145
154
  if (tsconfig.resultType === "success") {
@@ -150,7 +159,10 @@ async function reactDocgenLoader(source) {
150
159
  ["browser", "module", "main"]
151
160
  );
152
161
  }
153
- tsconfigPathsInitialized = true;
162
+ finishInitialization();
163
+ }
164
+ if (tsconfigPathsInitializeStatus === "initializing") {
165
+ await tsconfigPathsInitialingPromise;
154
166
  }
155
167
  try {
156
168
  const docgenResults = (0, import_react_docgen.parse)(source, {
@@ -97,13 +97,22 @@ var actualNameHandler = function actualNameHandler2(documentation, componentDefi
97
97
  var defaultHandlers = Object.values(builtinHandlers).map((handler) => handler);
98
98
  var defaultResolver = new builtinResolvers.FindExportedDefinitionsResolver();
99
99
  var handlers = [...defaultHandlers, actualNameHandler];
100
- var tsconfigPathsInitialized = false;
100
+ var tsconfigPathsInitializeStatus = "uninitialized";
101
+ var resolveTsconfigPathsInitialingPromise;
102
+ var tsconfigPathsInitialingPromise = new Promise((resolve2) => {
103
+ resolveTsconfigPathsInitialingPromise = resolve2;
104
+ });
105
+ var finishInitialization = () => {
106
+ resolveTsconfigPathsInitialingPromise();
107
+ tsconfigPathsInitializeStatus = "initialized";
108
+ };
101
109
  var matchPath;
102
110
  async function reactDocgenLoader(source) {
103
111
  const callback = this.async();
104
112
  const options = this.getOptions() || {};
105
113
  const { debug = false } = options;
106
- if (!tsconfigPathsInitialized) {
114
+ if (tsconfigPathsInitializeStatus === "uninitialized") {
115
+ tsconfigPathsInitializeStatus = "initializing";
107
116
  const tsconfigPath = await findUp("tsconfig.json", { cwd: process.cwd() });
108
117
  const tsconfig = TsconfigPaths.loadConfig(tsconfigPath);
109
118
  if (tsconfig.resultType === "success") {
@@ -114,7 +123,10 @@ async function reactDocgenLoader(source) {
114
123
  ["browser", "module", "main"]
115
124
  );
116
125
  }
117
- tsconfigPathsInitialized = true;
126
+ finishInitialization();
127
+ }
128
+ if (tsconfigPathsInitializeStatus === "initializing") {
129
+ await tsconfigPathsInitialingPromise;
118
130
  }
119
131
  try {
120
132
  const docgenResults = parse(source, {
package/dist/preset.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as StorybookConfig, P as PresetProperty } from './index-8cba017d.js';
1
+ import { S as StorybookConfig, P as PresetProperty } from './index-8df66448.js';
2
2
  import 'storybook-builder-rsbuild';
3
3
  import 'file-system-cache';
4
4
  import 'http';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-react-rsbuild",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Storybook for React and Rsbuild: Develop React components in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook",
@@ -8,7 +8,6 @@
8
8
  "rspack",
9
9
  "react"
10
10
  ],
11
- "license": "MIT",
12
11
  "bugs": {
13
12
  "url": "https://github.com/rspack-contrib/storybook-rsbuild/issues"
14
13
  },
@@ -17,6 +16,7 @@
17
16
  "url": "https://github.com/rspack-contrib/storybook-rsbuild",
18
17
  "directory": "packages/builder-react"
19
18
  },
19
+ "license": "MIT",
20
20
  "exports": {
21
21
  ".": {
22
22
  "types": "./dist/index.d.ts",
@@ -50,17 +50,22 @@
50
50
  ],
51
51
  "dependencies": {
52
52
  "@rsbuild/core": "0.6.15",
53
- "@storybook/docs-tools": "8.0.10",
54
- "@storybook/node-logger": "8.0.10",
55
- "@storybook/react": "8.0.10",
56
- "@storybook/react-docgen-typescript-plugin": "1.0.1",
53
+ "@storybook/docs-tools": "^8.0.10",
54
+ "@storybook/node-logger": "^8.0.10",
55
+ "@storybook/react": "^8.0.10",
56
+ "@storybook/react-docgen-typescript-plugin": "^1.0.1",
57
57
  "@types/node": "^18.0.0",
58
58
  "find-up": "^5.0.0",
59
59
  "magic-string": "^0.30.10",
60
60
  "react-docgen": "^7.0.3",
61
61
  "resolve": "^1.22.8",
62
62
  "tsconfig-paths": "^4.2.0",
63
- "storybook-builder-rsbuild": "0.0.2"
63
+ "storybook-builder-rsbuild": "0.0.3"
64
+ },
65
+ "devDependencies": {
66
+ "@storybook/types": "^8.0.10",
67
+ "add": "^2.0.6",
68
+ "typescript": "^5.3.2"
64
69
  },
65
70
  "peerDependencies": {
66
71
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
@@ -86,11 +91,6 @@
86
91
  ],
87
92
  "platform": "node"
88
93
  },
89
- "devDependencies": {
90
- "@storybook/types": "8.0.10",
91
- "add": "^2.0.6",
92
- "typescript": "^5.3.2"
93
- },
94
94
  "scripts": {
95
95
  "check": "node --loader ../../scripts/node_modules/esbuild-register/loader.js -r ../../scripts/node_modules/esbuild-register/register.js ../../scripts/prepare/check.ts",
96
96
  "prep": "node --loader ../../scripts/node_modules/esbuild-register/loader.js -r ../../scripts/node_modules/esbuild-register/register.js ../../scripts/prepare/bundle.ts"