@storybook/addon-themes 0.0.0-pr-24389-sha-88c59837 → 0.0.0-pr-24271-sha-b8f97f09

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +8 -8
  2. package/postinstall.js +7 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-themes",
3
- "version": "0.0.0-pr-24389-sha-88c59837",
3
+ "version": "0.0.0-pr-24271-sha-b8f97f09",
4
4
  "description": "Switch between multiple themes for you components in Storybook",
5
5
  "keywords": [
6
6
  "css",
@@ -74,13 +74,13 @@
74
74
  "prep": "../../../scripts/prepare/bundle.ts"
75
75
  },
76
76
  "dependencies": {
77
- "@storybook/client-logger": "0.0.0-pr-24389-sha-88c59837",
78
- "@storybook/components": "0.0.0-pr-24389-sha-88c59837",
79
- "@storybook/core-events": "0.0.0-pr-24389-sha-88c59837",
80
- "@storybook/manager-api": "0.0.0-pr-24389-sha-88c59837",
81
- "@storybook/preview-api": "0.0.0-pr-24389-sha-88c59837",
82
- "@storybook/theming": "0.0.0-pr-24389-sha-88c59837",
83
- "@storybook/types": "0.0.0-pr-24389-sha-88c59837",
77
+ "@storybook/client-logger": "0.0.0-pr-24271-sha-b8f97f09",
78
+ "@storybook/components": "0.0.0-pr-24271-sha-b8f97f09",
79
+ "@storybook/core-events": "0.0.0-pr-24271-sha-b8f97f09",
80
+ "@storybook/manager-api": "0.0.0-pr-24271-sha-b8f97f09",
81
+ "@storybook/preview-api": "0.0.0-pr-24271-sha-b8f97f09",
82
+ "@storybook/theming": "0.0.0-pr-24271-sha-b8f97f09",
83
+ "@storybook/types": "0.0.0-pr-24271-sha-b8f97f09",
84
84
  "ts-dedent": "^2.0.0"
85
85
  },
86
86
  "devDependencies": {
package/postinstall.js CHANGED
@@ -1,29 +1,17 @@
1
1
  const { spawn } = require('child_process');
2
2
 
3
3
  const PACKAGE_MANAGER_TO_COMMAND = {
4
- npm: ['npx'],
5
- pnpm: ['pnpm', 'dlx'],
6
- yarn1: ['npx'],
7
- yarn2: ['yarn', 'dlx'],
4
+ npm: 'npx',
5
+ yarn1: 'npx',
6
+ yarn2: 'yarn dlx',
7
+ pnpm: 'pnpm dlx',
8
8
  };
9
9
 
10
- const selectPackageManagerCommand = (packageManager) => PACKAGE_MANAGER_TO_COMMAND[packageManager];
10
+ module.exports = function postinstall(options) {
11
+ const command = PACKAGE_MANAGER_TO_COMMAND[options.packageManager];
11
12
 
12
- const spawnPackageManagerScript = async (packageManager, args) => {
13
- const [command, ...baseArgs] = selectPackageManagerCommand(packageManager);
14
-
15
- await spawn(command, [...baseArgs, ...args], {
13
+ spawn(command, ['@storybook/auto-config', 'themes'], {
16
14
  stdio: 'inherit',
17
15
  cwd: process.cwd(),
18
- shell: true,
19
16
  });
20
17
  };
21
-
22
- module.exports = async function postinstall({ packageManager = 'npm' }) {
23
- try {
24
- await spawnPackageManagerScript(packageManager, ['@storybook/auto-config', 'themes']);
25
- } catch (e) {
26
- console.error(e);
27
- process.exit(1);
28
- }
29
- };