diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index f6ab2f7c822f..c20f5491ef30 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -43,7 +43,7 @@ jobs: run: yarn wait-on http://localhost:6001 working-directory: ./code - name: Generate - run: yarn generate-sandboxes --local-registry --exclude=angular-cli/prerelease + run: yarn generate-sandboxes --local-registry --exclude=angular-cli/prerelease --debug working-directory: ./code - name: Publish run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=next diff --git a/code/lib/cli/src/project_types.ts b/code/lib/cli/src/project_types.ts index 25c058dee818..05c64b402423 100644 --- a/code/lib/cli/src/project_types.ts +++ b/code/lib/cli/src/project_types.ts @@ -5,11 +5,6 @@ function ltMajor(versionRange: string, major: number) { return validRange(versionRange) && minVersion(versionRange).major < major; } -function gtMajor(versionRange: string, major: number) { - // Uses validRange to avoid a throw from minVersion if an invalid range gets passed - return validRange(versionRange) && minVersion(versionRange).major > major; -} - function eqMajor(versionRange: string, major: number) { // Uses validRange to avoid a throw from minVersion if an invalid range gets passed return validRange(versionRange) && minVersion(versionRange).major === major; @@ -162,9 +157,7 @@ export const supportedTemplates: TemplateConfiguration[] = [ }, { preset: ProjectType.NEXTJS, - dependencies: { - next: (versionRange) => eqMajor(versionRange, 9) || gtMajor(versionRange, 9), - }, + dependencies: ['next'], matcherFunction: ({ dependencies }) => { return dependencies.every(Boolean); }, diff --git a/scripts/sandbox/generate.ts b/scripts/sandbox/generate.ts index 0e477b1a6220..22a4eccf4d14 100755 --- a/scripts/sandbox/generate.ts +++ b/scripts/sandbox/generate.ts @@ -125,6 +125,10 @@ const runGenerators = async ( localRegistry = true, debug = false ) => { + if (debug) { + console.log('Debug mode enabled. Verbose logs will be printed to the console.'); + } + console.log(`🤹‍♂️ Generating sandboxes with a concurrency of ${maxConcurrentTasks}`); const limit = pLimit(maxConcurrentTasks);