Skip to content

Commit

Permalink
feat(storybook): list of migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarini committed Jun 23, 2023
1 parent 538a042 commit 086d650
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/react/plugins/storybook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ export const webpack = async (
}

const { withNx, withWeb } = require('@nx/webpack');
const tsconfigPath = join(options.configDir, 'tsconfig.json');

const projectData = await getProjectData(options);
const tsconfigPath = join(projectData.projectRoot, 'tsconfig.storybook.json');

fixBabelConfigurationIfNeeded(storybookWebpackConfig, projectData);

Expand Down
6 changes: 6 additions & 0 deletions packages/storybook/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
"version": "16.1.0-beta.0",
"description": "Ignore @nx/react/plugins/storybook in Storybook eslint rules.",
"factory": "./src/migrations/update-16-1-0/eslint-ignore-react-plugin"
},
"update-16-4-0": {
"cli": "nx",
"version": "16.4.0-beta.16",
"description": "Move .storybook/tsconfig.json to tsconfig.storybook.json for non-Angular projects.",
"factory": "./src/migrations/update-16-4-0/move-storybook-tsconfig"
}
},
"packageJsonUpdates": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,7 @@ exports[`@nx/storybook:configuration for Storybook v7 basic functionalities shou

exports[`@nx/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 2`] = `null`;

exports[`@nx/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 3`] = `
"{
"extends": "./tsconfig.json",
"compilerOptions": {
"emitDecoratorMetadata": true
},
"exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"],
"include": [
"src/**/*.stories.ts",
"src/**/*.stories.js",
"src/**/*.stories.jsx",
"src/**/*.stories.tsx",
"src/**/*.stories.mdx",
".storybook/*.js",
".storybook/*.ts"
]
}
"
`;
exports[`@nx/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 3`] = `null`;

exports[`@nx/storybook:configuration for Storybook v7 basic functionalities should generate TypeScript Configuration files 4`] = `
"import type { StorybookConfig } from '@storybook/angular';
Expand Down

0 comments on commit 086d650

Please sign in to comment.