@storybook/preset-react-webpack 11.0.0-alpha.7 → 11.0.0-alpha.9
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_acph6k44io from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_acph6k44io from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_acph6k44io from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_acph6k44io.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_acph6k44io.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_acph6k44io.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,6 +12,10 @@ var require = CJS_COMPAT_NODE_MODULE_1on306w6zwzh.createRequire(import.meta.url)
|
|
|
12
12
|
|
|
13
13
|
// src/framework-preset-react-docs.ts
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
|
+
import {
|
|
16
|
+
getTypeScriptForDocgenError,
|
|
17
|
+
isDocgenServerDisabledInMainConfig
|
|
18
|
+
} from "storybook/internal/common";
|
|
15
19
|
import { deprecate } from "storybook/internal/node-logger";
|
|
16
20
|
var webpackFinal = async (config, options) => {
|
|
17
21
|
if ((await options.presets.apply("features", {}))?.docgenServer)
|
|
@@ -19,9 +23,13 @@ var webpackFinal = async (config, options) => {
|
|
|
19
23
|
let typescriptOptions = await options.presets.apply("typescript", {}), debug = options.loglevel === "debug", { reactDocgen, reactDocgenTypescriptOptions } = typescriptOptions || {};
|
|
20
24
|
if (typeof reactDocgen != "string")
|
|
21
25
|
return config;
|
|
22
|
-
|
|
23
|
-
`Builder docgen (\`typescript.reactDocgen: '${reactDocgen}'\`) is deprecated and will be removed in Storybook 12. It runs because
|
|
24
|
-
)
|
|
26
|
+
await isDocgenServerDisabledInMainConfig(options) && deprecate(
|
|
27
|
+
`Builder docgen (\`typescript.reactDocgen: '${reactDocgen}'\`) is deprecated and will be removed in Storybook 12. It runs because your Storybook main config sets \`features.docgenServer: false\`. Remove that setting to use server-side docgen.`
|
|
28
|
+
);
|
|
29
|
+
let typescriptUsable = !getTypeScriptForDocgenError(
|
|
30
|
+
(specifier) => import.meta.resolve(specifier)
|
|
31
|
+
);
|
|
32
|
+
if (reactDocgen !== "react-docgen-typescript" || !typescriptUsable)
|
|
25
33
|
return {
|
|
26
34
|
...config,
|
|
27
35
|
module: {
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_acph6k44io from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_acph6k44io from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_acph6k44io from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_acph6k44io.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_acph6k44io.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_acph6k44io.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_acph6k44io from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_acph6k44io from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_acph6k44io from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_acph6k44io.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_acph6k44io.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_acph6k44io.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/preset-react-webpack",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.9",
|
|
4
4
|
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"!src/**/*"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@storybook/core-webpack": "11.0.0-alpha.
|
|
41
|
+
"@storybook/core-webpack": "11.0.0-alpha.9",
|
|
42
42
|
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.0c3f3b7.0",
|
|
43
43
|
"magic-string": "^1.1.0",
|
|
44
44
|
"react-docgen": "^8.0.2",
|
|
@@ -54,12 +54,8 @@
|
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"react": "^18.0.0 || ^19.0.0",
|
|
56
56
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
57
|
-
"storybook": "^11.0.0-alpha.
|
|
58
|
-
|
|
59
|
-
"peerDependenciesMeta": {
|
|
60
|
-
"typescript": {
|
|
61
|
-
"optional": true
|
|
62
|
-
}
|
|
57
|
+
"storybook": "^11.0.0-alpha.9",
|
|
58
|
+
"typescript": "^5.9.0 || ^6.0.0 || ^7.0.0"
|
|
63
59
|
},
|
|
64
60
|
"publishConfig": {
|
|
65
61
|
"access": "public"
|