@storybook/preset-create-react-app 10.3.0-alpha.13 → 10.3.0-alpha.15

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -7
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_pmr66lcpcr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_pmr66lcpcr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_pmr66lcpcr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_vlbheas8wjc from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_vlbheas8wjc from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_vlbheas8wjc from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_pmr66lcpcr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_pmr66lcpcr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_pmr66lcpcr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_vlbheas8wjc.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_vlbheas8wjc.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_vlbheas8wjc.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -53,6 +53,7 @@ import { lstatSync, readFileSync, realpathSync } from "node:fs";
53
53
  import { join as join3 } from "node:path";
54
54
 
55
55
  // ../../core/src/shared/utils/module.ts
56
+ import { createRequire, register } from "node:module";
56
57
  import { fileURLToPath, pathToFileURL } from "node:url";
57
58
 
58
59
  // ../../../node_modules/exsolve/dist/index.mjs
@@ -244,7 +245,12 @@ var importMetaResolve = (...args) => typeof import.meta.resolve != "function" &&
244
245
  try {
245
246
  return dirname(fileURLToPath(importMetaResolve(join2(pkg, "package.json"), parent)));
246
247
  } catch {
247
- return dirname(fileURLToPath(importMetaResolve(join2(pkg, "package.json"))));
248
+ try {
249
+ return dirname(fileURLToPath(importMetaResolve(join2(pkg, "package.json"))));
250
+ } catch {
251
+ let req = createRequire(parent ?? import.meta.url);
252
+ return dirname(req.resolve(join2(pkg, "package.json")));
253
+ }
248
254
  }
249
255
  };
250
256
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/preset-create-react-app",
3
- "version": "10.3.0-alpha.13",
3
+ "version": "10.3.0-alpha.15",
4
4
  "description": "Storybook for Create React App preset",
5
5
  "keywords": [
6
6
  "storybook"
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react-scripts": ">=5.0.0",
48
- "storybook": "^10.3.0-alpha.13"
48
+ "storybook": "^10.3.0-alpha.15"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"