Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ jobs:
- run:
name: Compile
command: |
yarn task --task compile --start-from=auto --no-link --debug
yarn task --task compile --prod --start-from=auto --no-link --debug
- run:
name: Check
command: |
yarn task --task check --start-from=auto --no-link --debug
yarn task --task check --prod --start-from=auto --no-link --debug
- run:
name: Ensure no changes pending
command: |
Expand Down
4 changes: 2 additions & 2 deletions code/addons/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts"
Comment on lines -65 to -66
Copy link
Member

Choose a reason for hiding this comment

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

can you explain why these scripts need to be renamed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I can. I find nx a bit impenetrable, but it seems that if a user runs nx check, and nx finds a script called check in package.json, it'll run that script rather than its own, ignoring all nx config.

So the options were either rename all the check scripts in all package.json, which is churny but not user visible, or rename the top-level nx command, which would potentially confuse users.

"prep": "jiti ../../../scripts/prepare/addon-bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@storybook/global": "^5.0.0",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/a11y/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts"
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@mdx-js/react": "^3.0.0",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/addons/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts"
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"tiny-invariant": "^1.3.1",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/jest/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts"
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@storybook/global": "^5.0.0"
Expand Down
3 changes: 2 additions & 1 deletion code/addons/links/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/addons/onboarding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts"
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"devDependencies": {
"@neoconfetti/react": "^1.0.0",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/onboarding/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/addons/pseudo-states/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts"
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"devDependencies": {
"@storybook/icons": "^1.4.0",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/pseudo-states/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/addons/themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts"
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"ts-dedent": "^2.0.0"
Expand Down
3 changes: 2 additions & 1 deletion code/addons/themes/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "addon-themes",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/addons/vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts"
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@storybook/global": "^5.0.0",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/vitest/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/builders/builder-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/bundle.ts"
"prep": "jiti ../../../scripts/prepare/bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@storybook/csf-plugin": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion code/builders/builder-vite/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/builders/builder-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/bundle.ts"
"prep": "jiti ../../../scripts/prepare/bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@storybook/core-webpack": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion code/builders/builder-webpack5/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
3 changes: 2 additions & 1 deletion code/core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/frameworks/ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/tsc.ts"
"prep": "jiti ../../../scripts/prepare/tsc.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion code/frameworks/ember/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/frameworks/html-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/bundle.ts"
"prep": "jiti ../../../scripts/prepare/bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@storybook/builder-vite": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion code/frameworks/html-vite/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/frameworks/nextjs-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/bundle.ts"
"prep": "jiti ../../../scripts/prepare/bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@storybook/builder-vite": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion code/frameworks/nextjs-vite/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
8 changes: 0 additions & 8 deletions code/frameworks/nextjs-vite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import type { ReactPreview } from '@storybook/react';
import { __definePreview } from '@storybook/react';
import type { ReactTypes } from '@storybook/react';

import type vitePluginStorybookNextJs from 'vite-plugin-storybook-nextjs';

import * as nextPreview from './preview';
import type { NextJsTypes } from './types';

Expand All @@ -15,12 +13,6 @@ export * from '@storybook/react';
export * from './portable-stories';
export * from './types';

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
declare module '@storybook/nextjs-vite/vite-plugin' {
export const storybookNextJsPlugin: typeof vitePluginStorybookNextJs;
}

export function definePreview<Addons extends PreviewAddon<never>[]>(
preview: { addons?: Addons } & ProjectAnnotations<ReactTypes & NextJsTypes & InferTypes<Addons>>
): NextPreview<InferTypes<Addons>> {
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/bundle.ts"
"prep": "jiti ../../../scripts/prepare/bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@babel/core": "^7.24.4",
Expand Down
3 changes: 2 additions & 1 deletion code/frameworks/nextjs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/frameworks/preact-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/bundle.ts"
"prep": "jiti ../../../scripts/prepare/bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@storybook/builder-vite": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion code/frameworks/preact-vite/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/frameworks/react-native-web-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/bundle.ts"
"prep": "jiti ../../../scripts/prepare/bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@bunchtogether/vite-plugin-flow": "^1.0.2",
Expand Down
3 changes: 2 additions & 1 deletion code/frameworks/react-native-web-vite/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/frameworks/react-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/bundle.ts"
"prep": "jiti ../../../scripts/prepare/bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@joshwooding/vite-plugin-react-docgen-typescript": "0.6.0",
Expand Down
3 changes: 2 additions & 1 deletion code/frameworks/react-vite/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"targets": {
"build": {}
"build": {},
"check": {}
}
}
4 changes: 2 additions & 2 deletions code/frameworks/react-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"!src/**/*"
],
"scripts": {
"check": "jiti ../../../scripts/prepare/check.ts",
"prep": "jiti ../../../scripts/prepare/bundle.ts"
"prep": "jiti ../../../scripts/prepare/bundle.ts",
"typecheck": "jiti ../../../scripts/prepare/check.ts"
},
"dependencies": {
"@storybook/builder-webpack5": "workspace:*",
Expand Down
Loading