@storybook/csf-plugin 10.1.0-alpha.1 → 10.1.0-alpha.2
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_t35p4864zas from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_t35p4864zas from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_t35p4864zas from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_t35p4864zas.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_t35p4864zas.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_t35p4864zas.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_t35p4864zas from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_t35p4864zas from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_t35p4864zas from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_t35p4864zas.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_t35p4864zas.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_t35p4864zas.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-BI54VIUD.js";
|
|
15
15
|
|
|
16
16
|
// src/index.ts
|
|
17
17
|
import { fileURLToPath } from "node:url";
|
|
@@ -38,7 +38,7 @@ function rollupBasedPlugin(options) {
|
|
|
38
38
|
const csfSource = loadCsf(sourceCode, {
|
|
39
39
|
makeTitle
|
|
40
40
|
}).parse();
|
|
41
|
-
enrichCsf(csf, csfSource, options);
|
|
41
|
+
await enrichCsf(csf, csfSource, options);
|
|
42
42
|
const inputSourceMap = this.getCombinedSourcemap();
|
|
43
43
|
return formatCsf(csf, { sourceMaps: true, inputSourceMap }, code);
|
|
44
44
|
} catch (err) {
|
package/dist/webpack-loader.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_t35p4864zas from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_t35p4864zas from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_t35p4864zas from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_t35p4864zas.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_t35p4864zas.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_t35p4864zas.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-BI54VIUD.js";
|
|
15
15
|
|
|
16
16
|
// src/webpack-loader.ts
|
|
17
17
|
import { readFile } from "node:fs/promises";
|
|
@@ -25,7 +25,7 @@ async function loader(content, map) {
|
|
|
25
25
|
const makeTitle = /* @__PURE__ */ __name((userTitle) => userTitle || "default", "makeTitle");
|
|
26
26
|
const csf = loadCsf(content, { makeTitle }).parse();
|
|
27
27
|
const csfSource = loadCsf(sourceCode, { makeTitle }).parse();
|
|
28
|
-
enrichCsf(csf, csfSource, options);
|
|
28
|
+
await enrichCsf(csf, csfSource, options);
|
|
29
29
|
const formattedCsf = formatCsf(
|
|
30
30
|
csf,
|
|
31
31
|
{ sourceMaps: true, inputSourceMap: map, sourceFileName: id },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/csf-plugin",
|
|
3
|
-
"version": "10.1.0-alpha.
|
|
3
|
+
"version": "10.1.0-alpha.2",
|
|
4
4
|
"description": "Enrich CSF files via static analysis",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"esbuild": "*",
|
|
51
51
|
"rollup": "*",
|
|
52
|
-
"storybook": "^10.1.0-alpha.
|
|
52
|
+
"storybook": "^10.1.0-alpha.2",
|
|
53
53
|
"vite": "*",
|
|
54
54
|
"webpack": "*"
|
|
55
55
|
},
|