@storybook/addon-themes 10.0.0-beta.1 → 10.0.0-beta.10

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 +3 -3
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_bnoczi530de from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bnoczi530de from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bnoczi530de from "node:module";
1
+ import CJS_COMPAT_NODE_URL_xvpxo3gh1iq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_xvpxo3gh1iq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_xvpxo3gh1iq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_bnoczi530de.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bnoczi530de.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bnoczi530de.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_xvpxo3gh1iq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_xvpxo3gh1iq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_xvpxo3gh1iq.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.1",
3
+ "version": "10.0.0-beta.10",
4
4
  "description": "Storybook Themes addon: Switch between themes from the toolbar",
5
5
  "keywords": [
6
6
  "css",
@@ -61,13 +61,13 @@
61
61
  "ts-dedent": "^2.0.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@storybook/icons": "^1.4.0",
64
+ "@storybook/icons": "^1.6.0",
65
65
  "react": "^18.2.0",
66
66
  "react-dom": "^18.2.0",
67
67
  "typescript": "^5.8.3"
68
68
  },
69
69
  "peerDependencies": {
70
- "storybook": "^10.0.0-beta.1"
70
+ "storybook": "^10.0.0-beta.10"
71
71
  },
72
72
  "publishConfig": {
73
73
  "access": "public"