Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Migrate @storybook/scripts to strict-ts #23818

Merged
merged 11 commits into from
Aug 16, 2023
Prev Previous commit
Next Next commit
add scripts to check task
  • Loading branch information
stilt0n authored and kasperpeulen committed Aug 16, 2023
commit 660789e2e33c6145c58e050c4eae55bdbf181355
2 changes: 2 additions & 0 deletions code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"changelog": "pr-log --sloppy --cherry-pick",
"changelog:next": "pr-log --sloppy --since-prerelease",
"check": "NODE_ENV=production node ../scripts/check-package.js",
"check:scripts": "cd ../scripts && ./prepare/check-scripts.ts",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the "nx" field these can be picked up by nx run and nx run-many. Unfortunately, if we try to do this all in one command, the check task would also run check-package which I think we don't want it to do.

I considered renaming check to check:package, but then I would need to know everywhere it is used so it can be renamed, which is tricky using just text search.

"ci-tests": "yarn task --task check --no-link --start-from=install && yarn lint && yarn test && cd ../scripts && yarn test",
"danger": "danger",
"generate-sandboxes": "ts-node --swc ../scripts/sandbox/generate.ts",
Expand Down Expand Up @@ -292,6 +293,7 @@
"type": "opencollective",
"url": "https://opencollective.com/storybook"
},
"nx": {},
"pr-log": {
"skipLabels": [
"cleanup"
Expand Down
4 changes: 2 additions & 2 deletions scripts/tasks/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { maxConcurrentTasks } from '../utils/maxConcurrentTasks';

const parallel = process.env.CI ? 8 : maxConcurrentTasks;

const linkCommand = `nx run-many --target="check" --all --parallel=${parallel} --exclude=@storybook/addon-storyshots,@storybook/addon-storyshots-puppeteer,@storybook/vue,@storybook/svelte,@storybook/vue3,@storybook/angular`;
const nolinkCommand = `nx run-many --target="check" --all --parallel=${parallel} --exclude=@storybook/addon-storyshots,@storybook/addon-storyshots-puppeteer`;
const linkCommand = `nx run-many --target="check","check:scripts" --all --parallel=${parallel} --exclude=@storybook/addon-storyshots,@storybook/addon-storyshots-puppeteer,@storybook/vue,@storybook/svelte,@storybook/vue3,@storybook/angular,root && nx run root:check:scripts`;
const nolinkCommand = `nx run-many --target="check","check:scripts" --all --parallel=${parallel} --exclude=@storybook/addon-storyshots,@storybook/addon-storyshots-puppeteer,root && nx run root:check:scripts`;

export const check: Task = {
description: 'Typecheck the source code of the monorepo',
Expand Down