@storybook/addon-themes 10.0.0-beta.2 → 10.0.0-beta.4

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/postinstall.js +14 -17
  2. package/package.json +2 -2
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_mbm3e5jaz8q from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mbm3e5jaz8q from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mbm3e5jaz8q from "node:module";
1
+ import CJS_COMPAT_NODE_URL_mmpoasxznil from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_mmpoasxznil from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_mmpoasxznil from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mbm3e5jaz8q.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mbm3e5jaz8q.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mbm3e5jaz8q.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_mmpoasxznil.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_mmpoasxznil.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_mmpoasxznil.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -15,23 +15,20 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
15
15
  // src/postinstall.ts
16
16
  import { spawn } from "child_process";
17
17
  var PACKAGE_MANAGER_TO_COMMAND = {
18
- npm: ["npx"],
19
- pnpm: ["pnpm", "dlx"],
20
- yarn1: ["npx"],
21
- yarn2: ["yarn", "dlx"],
22
- bun: ["bunx"]
18
+ npm: "npx",
19
+ pnpm: "pnpm dlx",
20
+ yarn1: "npx",
21
+ yarn2: "yarn dlx",
22
+ bun: "bunx"
23
23
  };
24
24
  var selectPackageManagerCommand = /* @__PURE__ */ __name((packageManager) => PACKAGE_MANAGER_TO_COMMAND[packageManager], "selectPackageManagerCommand");
25
- var spawnPackageManagerScript = /* @__PURE__ */ __name(async (packageManager, args) => {
26
- const [command, ...baseArgs] = selectPackageManagerCommand(packageManager);
27
- await spawn(command, [...baseArgs, ...args], {
25
+ async function postinstall({ packageManager = "npm" }) {
26
+ const command = selectPackageManagerCommand(packageManager);
27
+ await spawn(`${command} @storybook/auto-config themes`, {
28
28
  stdio: "inherit",
29
29
  cwd: process.cwd(),
30
30
  shell: true
31
31
  });
32
- }, "spawnPackageManagerScript");
33
- async function postinstall({ packageManager = "npm" }) {
34
- await spawnPackageManagerScript(packageManager, ["@storybook/auto-config", "themes"]);
35
32
  }
36
33
  __name(postinstall, "postinstall");
37
34
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-themes",
3
- "version": "10.0.0-beta.2",
3
+ "version": "10.0.0-beta.4",
4
4
  "description": "Storybook Themes addon: Switch between themes from the toolbar",
5
5
  "keywords": [
6
6
  "css",
@@ -67,7 +67,7 @@
67
67
  "typescript": "^5.8.3"
68
68
  },
69
69
  "peerDependencies": {
70
- "storybook": "^10.0.0-beta.2"
70
+ "storybook": "^10.0.0-beta.4"
71
71
  },
72
72
  "publishConfig": {
73
73
  "access": "public"