Skip to content

Commit

Permalink
Merge pull request #66 from chromaui/jarel/ap-3573-switch-to-dependin…
Browse files Browse the repository at this point in the history
…g-on-storybook-instead-of-storybookcli

Switch to depend on storybook instead of @storybook/cli
  • Loading branch information
tevanoff authored Jan 18, 2024
2 parents ab34e78 + 21b691d commit 9abc77d
Show file tree
Hide file tree
Showing 6 changed files with 1,393 additions and 24 deletions.
7 changes: 7 additions & 0 deletions .changeset/smooth-maps-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'chromatic-playwright': minor
'chromatic-cypress': minor
'@chromaui/shared-e2e': minor
---

depend on storybook instead of @storybook/cli
5 changes: 5 additions & 0 deletions packages/cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,10 @@
"chrome-remote-interface": "^0.33.0",
"lodash.debounce": "^4.0.8",
"rrweb-snapshot": "^2.0.0-alpha.4"
},
"peerDependencies": {
"@storybook/addon-essentials": "^7.0.0 || ^8.0.x",
"@storybook/server-webpack5": "^7.0.0 || ^8.0.x",
"storybook": "^7.0.0 || ^8.0.x"
}
}
5 changes: 4 additions & 1 deletion packages/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
"ts-dedent": "^2.2.0"
},
"peerDependencies": {
"@playwright/test": "^1.0.0"
"@playwright/test": "^1.0.0",
"@storybook/addon-essentials": "^7.0.0 || ^8.0.x",
"@storybook/server-webpack5": "^7.0.0 || ^8.0.x",
"storybook": "^7.0.0 || ^8.0.x"
}
}
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"@jest/types": "^27.0.6",
"@playwright/test": "^1.39.0",
"@storybook/addon-essentials": "^7.5.2",
"@storybook/cli": "^7.5.2",
"@storybook/eslint-config-storybook": "^3.1.2",
"@storybook/server-webpack5": "^7.5.2",
"@testing-library/dom": "^8.1.0",
Expand All @@ -92,6 +91,7 @@
"react-dom": "^17.0.1",
"rimraf": "^3.0.2",
"srcset": "^4.0.0",
"storybook": "^7.5.2",
"ts-dedent": "^2.2.0",
"ts-jest": "^27.0.4",
"tsup": "^6.7.0",
Expand Down
10 changes: 2 additions & 8 deletions packages/shared/src/archive-storybook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,13 @@ import { checkArchivesDirExists } from '../utils/filePaths';
export function archiveStorybook(processArgs: string[], configDir: string) {
checkArchivesDirExists();

const binPath = resolve(
dirname(require.resolve('@storybook/cli/package.json')),
'./bin/index.js'
);
const binPath = resolve(dirname(require.resolve('storybook/package.json')), './index.js');
execFileSync('node', [binPath, 'dev', ...processArgs, '-c', configDir], { stdio: 'inherit' });
}

export function buildArchiveStorybook(processArgs: string[], configDir: string) {
checkArchivesDirExists();

const binPath = resolve(
dirname(require.resolve('@storybook/cli/package.json')),
'./bin/index.js'
);
const binPath = resolve(dirname(require.resolve('storybook/package.json')), './index.js');
execFileSync('node', [binPath, 'build', ...processArgs, '-c', configDir], { stdio: 'inherit' });
}
Loading

0 comments on commit 9abc77d

Please sign in to comment.