mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-21 05:02:39 +08:00
Merge pull request #19478 from storybookjs/nextjs-framework-add-to-ci
Enable `@storybook/nextjs` framework in CLI
This commit is contained in:
commit
a21931e13d
@ -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'
|
||||
@ -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'
|
||||
@ -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'
|
||||
@ -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'
|
||||
@ -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'
|
||||
@ -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'
|
||||
|
@ -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);
|
||||
});
|
||||
|
@ -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);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -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',
|
||||
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user