@storybook/react-dom-shim 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/preset.js +13 -7
  2. package/package.json +2 -2
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_6oq49n2gxwn from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_6oq49n2gxwn from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_6oq49n2gxwn from "node:module";
1
+ import CJS_COMPAT_NODE_URL_fmanx7345ma from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_fmanx7345ma from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_fmanx7345ma from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_6oq49n2gxwn.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_6oq49n2gxwn.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_6oq49n2gxwn.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_fmanx7345ma.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_fmanx7345ma.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_fmanx7345ma.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -15,6 +15,7 @@ import { readFile } from "node:fs/promises";
15
15
  import { isAbsolute as isAbsolute2, join as join2 } from "node:path";
16
16
 
17
17
  // ../../core/src/shared/utils/module.ts
18
+ import { createRequire, register } from "node:module";
18
19
  import { fileURLToPath, pathToFileURL } from "node:url";
19
20
 
20
21
  // ../../../node_modules/exsolve/dist/index.mjs
@@ -206,7 +207,12 @@ var importMetaResolve = (...args) => typeof import.meta.resolve != "function" &&
206
207
  try {
207
208
  return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
208
209
  } catch {
209
- return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"))));
210
+ try {
211
+ return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"))));
212
+ } catch {
213
+ let req = createRequire(parent ?? import.meta.url);
214
+ return dirname(req.resolve(join(pkg, "package.json")));
215
+ }
210
216
  }
211
217
  };
212
218
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-dom-shim",
3
- "version": "10.2.14",
3
+ "version": "10.2.16",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "storybook"
@@ -43,7 +43,7 @@
43
43
  "peerDependencies": {
44
44
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
45
45
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
46
- "storybook": "^10.2.14"
46
+ "storybook": "^10.2.16"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"