@storybook/react-vite 10.4.0-alpha.5 → 10.4.0-alpha.6
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_3sq22esqhif from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3sq22esqhif from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3sq22esqhif from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3sq22esqhif.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3sq22esqhif.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3sq22esqhif.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -96,9 +96,15 @@ function defaultLookupModule(filename, basedir) {
|
|
|
96
96
|
switch (ext) {
|
|
97
97
|
case ".js":
|
|
98
98
|
case ".mjs":
|
|
99
|
-
case ".cjs":
|
|
100
|
-
|
|
99
|
+
case ".cjs": {
|
|
100
|
+
let base = filename.slice(0, -2);
|
|
101
|
+
try {
|
|
102
|
+
return resolve.sync(`${base}ts`, { ...resolveOptions, extensions: [] });
|
|
103
|
+
} catch {
|
|
104
|
+
newFilename = `${base}tsx`;
|
|
105
|
+
}
|
|
101
106
|
break;
|
|
107
|
+
}
|
|
102
108
|
case ".jsx":
|
|
103
109
|
newFilename = `${filename.slice(0, -3)}tsx`;
|
|
104
110
|
break;
|
|
@@ -119,7 +125,7 @@ async function reactDocgen({
|
|
|
119
125
|
include = /\.(mjs|tsx?|jsx?)$/,
|
|
120
126
|
exclude = [/node_modules\/.*/]
|
|
121
127
|
} = {}) {
|
|
122
|
-
let cwd = process.cwd(), filter = createFilter(include, exclude), tsconfigPath = find.up("tsconfig.json", { cwd, last:
|
|
128
|
+
let cwd = process.cwd(), filter = createFilter(include, exclude), projectRoot = getProjectRoot(), tsconfigPath = find.up("tsconfig.json", { cwd, last: projectRoot }) ?? find.up("tsconfig.base.json", { cwd, last: projectRoot }) ?? find.up("tsconfig.app.json", { cwd, last: projectRoot }), tsconfig = TsconfigPaths.loadConfig(tsconfigPath), matchPath;
|
|
123
129
|
return tsconfig.resultType === "success" && (logger.debug("Using tsconfig paths for react-docgen"), matchPath = TsconfigPaths.createMatchPath(tsconfig.absoluteBaseUrl, tsconfig.paths, [
|
|
124
130
|
"browser",
|
|
125
131
|
"module",
|
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3sq22esqhif from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3sq22esqhif from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3sq22esqhif from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3sq22esqhif.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3sq22esqhif.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3sq22esqhif.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3sq22esqhif from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3sq22esqhif from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3sq22esqhif from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3sq22esqhif.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3sq22esqhif.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3sq22esqhif.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -31,7 +31,7 @@ var core = {
|
|
|
31
31
|
savePropValueAsString: !0
|
|
32
32
|
})
|
|
33
33
|
), typeof reactDocgenOption == "string") {
|
|
34
|
-
let { reactDocgen } = await import("./_node-chunks/react-docgen-
|
|
34
|
+
let { reactDocgen } = await import("./_node-chunks/react-docgen-GXS2ZB3Q.js");
|
|
35
35
|
plugins.unshift(
|
|
36
36
|
// If react-docgen is specified, use it for everything, otherwise only use it for non-typescript files
|
|
37
37
|
await reactDocgen({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-vite",
|
|
3
|
-
"version": "10.4.0-alpha.
|
|
3
|
+
"version": "10.4.0-alpha.6",
|
|
4
4
|
"description": "Storybook for React and Vite: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@joshwooding/vite-plugin-react-docgen-typescript": "^0.7.0",
|
|
56
56
|
"@rollup/pluginutils": "^5.0.2",
|
|
57
|
-
"@storybook/builder-vite": "10.4.0-alpha.
|
|
58
|
-
"@storybook/react": "10.4.0-alpha.
|
|
57
|
+
"@storybook/builder-vite": "10.4.0-alpha.6",
|
|
58
|
+
"@storybook/react": "10.4.0-alpha.6",
|
|
59
59
|
"empathic": "^2.0.0",
|
|
60
60
|
"magic-string": "^0.30.0",
|
|
61
61
|
"react-docgen": "^8.0.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
72
72
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
73
|
-
"storybook": "^10.4.0-alpha.
|
|
73
|
+
"storybook": "^10.4.0-alpha.6",
|
|
74
74
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
75
75
|
},
|
|
76
76
|
"publishConfig": {
|