Skip to content

Commit

Permalink
Merge pull request #19478 from storybookjs/nextjs-framework-add-to-ci
Browse files Browse the repository at this point in the history
Enable `@storybook/nextjs` framework in CLI
  • Loading branch information
shilman authored Oct 21, 2022
2 parents 4df3f6f + 4bf683e commit a21931e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ jobs:
executor:
class: medium+
name: sb_node_16_browsers
parallelism: 22
parallelism: 24
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -341,7 +341,7 @@ jobs:
executor:
class: medium+
name: sb_node_16_browsers
parallelism: 22
parallelism: 24
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -356,7 +356,7 @@ jobs:
executor:
class: medium+
name: sb_node_16_browsers
parallelism: 22
parallelism: 24
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -375,7 +375,7 @@ jobs:
executor:
class: medium+
name: sb_playwright
parallelism: 20
parallelism: 22
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -390,7 +390,7 @@ jobs:
executor:
class: medium+
name: sb_node_16_browsers
parallelism: 22
parallelism: 24
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -405,7 +405,7 @@ jobs:
executor:
class: medium+
name: sb_playwright
parallelism: 22
parallelism: 24
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand Down
4 changes: 0 additions & 4 deletions code/lib/cli/src/detect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,6 @@ describe('Detect', () => {

MOCK_FRAMEWORK_FILES.forEach((structure) => {
it(`${structure.name}`, () => {
// TODO: remove this once we fully enable nextjs framework in CI. @yannbf
if (structure.name === ProjectType.NEXTJS) {
process.env.STORYBOOK_REPRO_GENERATOR = 'true';
}
(fs.existsSync as jest.Mock).mockImplementation((filePath) => {
return Object.keys(structure.files).includes(filePath);
});
Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/project_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export const supportedTemplates: TemplateConfiguration[] = [
next: (versionRange) => eqMajor(versionRange, 9) || gtMajor(versionRange, 9),
},
matcherFunction: ({ dependencies }) => {
return process.env.STORYBOOK_REPRO_GENERATOR && dependencies.every(Boolean);
return dependencies.every(Boolean);
},
},
{
Expand Down
4 changes: 2 additions & 2 deletions code/lib/cli/src/repro-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const nextjsTemplates = {
'nextjs/default-js': {
name: 'Next.js (JavaScript)',
script: 'npx create-next-app {{beforeDir}}',
cadence: [] as string[],
cadence: ['ci', 'daily', 'weekly'],
expected: {
framework: '@storybook/nextjs',
renderer: '@storybook/react',
Expand All @@ -39,7 +39,7 @@ const nextjsTemplates = {
'nextjs/default-ts': {
name: 'Next.js (TypeScript)',
script: 'npx create-next-app {{beforeDir}} --typescript',
cadence: [] as string[],
cadence: ['ci', 'daily', 'weekly'],
expected: {
framework: '@storybook/nextjs',
renderer: '@storybook/react',
Expand Down

0 comments on commit a21931e

Please sign in to comment.