@storybook/preset-create-react-app 10.2.14 → 10.2.16

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_pemavk6ygff from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_pemavk6ygff from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_pemavk6ygff from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8r3otmloo1l from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8r3otmloo1l from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8r3otmloo1l from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_pemavk6ygff.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_pemavk6ygff.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_pemavk6ygff.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8r3otmloo1l.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8r3otmloo1l.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8r3otmloo1l.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.2.14",
3
+ "version": "10.2.16",
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.2.14"
48
+ "storybook": "^10.2.16"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"