From 11aeb9723401e8ed4438c6844b63cc188409286c Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 11:53:03 +0200 Subject: [PATCH 01/15] Readd Angular 17 prerelease sandbox --- .circleci/config.yml | 10 +++++----- .github/workflows/generate-sandboxes-main.yml | 2 +- .github/workflows/generate-sandboxes-next.yml | 2 +- code/lib/cli/src/sandbox-templates.ts | 3 +-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9b03dd3739bc..5d0cf92241ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -609,22 +609,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 34 + parallelism: 35 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 34 + parallelism: 35 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 31 + parallelism: 32 requires: - build-sandboxes - e2e-production: - parallelism: 31 + parallelism: 32 requires: - build-sandboxes - e2e-dev: @@ -632,7 +632,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 31 + parallelism: 32 requires: - build-sandboxes # TODO: reenable once we find out the source of flakyness diff --git a/.github/workflows/generate-sandboxes-main.yml b/.github/workflows/generate-sandboxes-main.yml index 77d3f8c8646d..7d9328578493 100644 --- a/.github/workflows/generate-sandboxes-main.yml +++ b/.github/workflows/generate-sandboxes-main.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 working-directory: ./code - name: Publish run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=main diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index 92e79bef6468..8a28c4cbb23a 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 --debug + run: yarn generate-sandboxes --local-registry --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/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 69e858f1d14f..2f2aa69cce32 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -586,8 +586,7 @@ export const merged: TemplateKey[] = [ ]; export const daily: TemplateKey[] = [ ...merged, - // TODO: Should be re-added after we merge this PR: https://github.com/storybookjs/storybook/pull/24188 - // 'angular-cli/prerelease', + 'angular-cli/prerelease', 'cra/default-js', 'react-vite/default-js', 'vue3-vite/default-js', From 4c43bc5e044d03ce8bf89842855fd602215f64ff Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 12:38:01 +0200 Subject: [PATCH 02/15] Add Next.js Canary sandbox --- .circleci/config.yml | 10 +++++----- code/lib/cli/src/sandbox-templates.ts | 11 +++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5d0cf92241ed..2273bcc5bdf3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -609,22 +609,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 35 + parallelism: 36 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 35 + parallelism: 36 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 32 + parallelism: 33 requires: - build-sandboxes - e2e-production: - parallelism: 32 + parallelism: 33 requires: - build-sandboxes - e2e-dev: @@ -632,7 +632,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 32 + parallelism: 33 requires: - build-sandboxes # TODO: reenable once we find out the source of flakyness diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 2f2aa69cce32..ca6e7cb94c76 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -137,6 +137,16 @@ const baseTemplates = { }, skipTasks: ['e2e-tests-dev', 'bench'], }, + 'nextjs/prerelease': { + name: 'Next.js Prerelease (Webpack | TypeScript)', + script: 'yarn create next-app@canary {{beforeDir}} --typescript --eslint', + expected: { + framework: '@storybook/nextjs', + renderer: '@storybook/react', + builder: '@storybook/builder-webpack5', + }, + skipTasks: ['e2e-tests-dev', 'bench'], + }, 'react-vite/default-js': { name: 'React Latest (Vite | JavaScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template react', @@ -597,6 +607,7 @@ export const daily: TemplateKey[] = [ 'svelte-vite/default-js', 'nextjs/12-js', 'nextjs/default-js', + 'nextjs/prerelease', 'qwik-vite/default-ts', 'preact-webpack5/default-js', 'preact-vite/default-js', From 2a8ab8e82c2cf0735b81666bd03a0f2820ba914e Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 13:16:29 +0200 Subject: [PATCH 03/15] Fix CircleCI parallelism --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2273bcc5bdf3..5d0cf92241ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -609,22 +609,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 36 + parallelism: 35 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 36 + parallelism: 35 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 33 + parallelism: 32 requires: - build-sandboxes - e2e-production: - parallelism: 33 + parallelism: 32 requires: - build-sandboxes - e2e-dev: @@ -632,7 +632,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 33 + parallelism: 32 requires: - build-sandboxes # TODO: reenable once we find out the source of flakyness From 99382b98f0fa9eb57b5996b4080226cce03e7268 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 13:21:30 +0200 Subject: [PATCH 04/15] Temporarily change ref branch in generate-sandboxes-next.yml --- .github/workflows/generate-sandboxes-next.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index 8a28c4cbb23a..e163df8ecd47 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: next + ref: valentin/setup-sandboxes - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' From 20e69a644698d44ae35df0019826b84150e73bcf Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 13:27:37 +0200 Subject: [PATCH 05/15] Add inDevelopment for Next.js Prerelease sandbox --- code/lib/cli/src/sandbox-templates.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index ca6e7cb94c76..a29030400745 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -146,6 +146,7 @@ const baseTemplates = { builder: '@storybook/builder-webpack5', }, skipTasks: ['e2e-tests-dev', 'bench'], + inDevelopment: true, }, 'react-vite/default-js': { name: 'React Latest (Vite | JavaScript)', From 8c0453eb864ea1e152a36d9c08250ea9454a2ed5 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 13:42:07 +0200 Subject: [PATCH 06/15] Fix creating Nextjs Sandbox --- code/lib/cli/src/sandbox-templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index a29030400745..9ffe4e74a60b 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -139,7 +139,7 @@ const baseTemplates = { }, 'nextjs/prerelease': { name: 'Next.js Prerelease (Webpack | TypeScript)', - script: 'yarn create next-app@canary {{beforeDir}} --typescript --eslint', + script: 'npx create-next-app@canary {{beforeDir}} --typescript --eslint', expected: { framework: '@storybook/nextjs', renderer: '@storybook/react', From 296202bfebe0702eb89e7eaa7e6bdaf3492a5671 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 13:45:03 +0200 Subject: [PATCH 07/15] Temporarily only create angular/prerelease and nextjs/prerelease sandboxes --- scripts/sandbox/generate.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/sandbox/generate.ts b/scripts/sandbox/generate.ts index 22a4eccf4d14..5d1f8abedfbc 100755 --- a/scripts/sandbox/generate.ts +++ b/scripts/sandbox/generate.ts @@ -235,6 +235,7 @@ export const generate = async ({ debug, }: OptionValues) => { const generatorConfigs = Object.entries(sandboxTemplates) + .filter(([key]) => key === 'nextjs/prerelease' || key === 'angular-cli/prerelease') .map(([dirName, configuration]) => ({ dirName, ...configuration, From 10f11ed3bb51bb71930bd2e75e4c398a3c3da29b Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 14:02:17 +0200 Subject: [PATCH 08/15] Generate all sandboxes again --- scripts/sandbox/generate.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/sandbox/generate.ts b/scripts/sandbox/generate.ts index 5d1f8abedfbc..22a4eccf4d14 100755 --- a/scripts/sandbox/generate.ts +++ b/scripts/sandbox/generate.ts @@ -235,7 +235,6 @@ export const generate = async ({ debug, }: OptionValues) => { const generatorConfigs = Object.entries(sandboxTemplates) - .filter(([key]) => key === 'nextjs/prerelease' || key === 'angular-cli/prerelease') .map(([dirName, configuration]) => ({ dirName, ...configuration, From 6da3c0df3a227329defbb316e39f738d66d0f9d1 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 16:25:18 +0200 Subject: [PATCH 09/15] Fix Next.js canary --- code/frameworks/nextjs/package.json | 2 +- code/frameworks/nextjs/src/config/webpack.ts | 2 +- code/frameworks/nextjs/src/dependency-map.ts | 18 +-- .../head-manager/head-manager-provider.tsx | 2 +- .../src/routing/app-router-provider.tsx | 18 ++- .../src/routing/page-router-provider.tsx | 2 +- code/lib/cli/src/sandbox-templates.ts | 6 +- code/yarn.lock | 143 ++++++++---------- 8 files changed, 88 insertions(+), 105 deletions(-) diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index 891ea29585ee..cbe8a52f0360 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -119,7 +119,7 @@ "@types/babel__core": "^7", "@types/babel__plugin-transform-runtime": "^7", "@types/babel__preset-env": "^7", - "next": "13.4.19", + "next": "13.5.4", "typescript": "^4.9.3", "webpack": "^5.65.0" }, diff --git a/code/frameworks/nextjs/src/config/webpack.ts b/code/frameworks/nextjs/src/config/webpack.ts index f5e72bc360d8..9d7c85d8c003 100644 --- a/code/frameworks/nextjs/src/config/webpack.ts +++ b/code/frameworks/nextjs/src/config/webpack.ts @@ -48,7 +48,7 @@ const setupRuntimeConfig = (baseConfig: WebpackConfig, nextConfig: NextConfig): }), }; - const newNextLinkBehavior = nextConfig.experimental?.newNextLinkBehavior; + const newNextLinkBehavior = (nextConfig.experimental as any)?.newNextLinkBehavior; /** * In Next 13.0.0 - 13.0.5, the `newNextLinkBehavior` option now defaults to truthy (still diff --git a/code/frameworks/nextjs/src/dependency-map.ts b/code/frameworks/nextjs/src/dependency-map.ts index 70ad2ece94e0..2bfdbac071fc 100644 --- a/code/frameworks/nextjs/src/dependency-map.ts +++ b/code/frameworks/nextjs/src/dependency-map.ts @@ -6,17 +6,17 @@ const mapping: Record> = { '<11.1.0': { 'next/dist/next-server/lib/router-context': 'next/dist/next-server/lib/router-context', }, - '>=11.1.0': { + '>=11.1.0 <13.5.0': { 'next/dist/shared/lib/router-context': 'next/dist/shared/lib/router-context', }, - '>=13.5.0': { - 'next/dist/shared/lib/router-context': 'next/dist/shared/lib/router-context.shared-runtime', - 'next/dist/shared/lib/head-manager-context': - 'next/dist/shared/lib/head-manager-context.shared-runtime', - 'next/dist/shared/lib/app-router-context': - 'next/dist/shared/lib/app-router-context.shared-runtime', - 'next/dist/shared/lib/hooks-client-context': - 'next/dist/shared/lib/hooks-client-context.shared-runtime', + '< 13.5.0': { + 'next/dist/shared/lib/router-context.shared-runtime': 'next/dist/shared/lib/router-context', + 'next/dist/shared/lib/head-manager-context.shared-runtime': + 'next/dist/shared/lib/head-manager-context', + 'next/dist/shared/lib/app-router-context.shared-runtime': + 'next/dist/shared/lib/app-router-context', + 'next/dist/shared/lib/hooks-client-context.shared-runtime': + 'next/dist/shared/lib/hooks-client-context', }, }; diff --git a/code/frameworks/nextjs/src/head-manager/head-manager-provider.tsx b/code/frameworks/nextjs/src/head-manager/head-manager-provider.tsx index 6d8ab263f92c..45c3a4ab4c33 100644 --- a/code/frameworks/nextjs/src/head-manager/head-manager-provider.tsx +++ b/code/frameworks/nextjs/src/head-manager/head-manager-provider.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react'; -import { HeadManagerContext } from 'next/dist/shared/lib/head-manager-context'; +import { HeadManagerContext } from 'next/dist/shared/lib/head-manager-context.shared-runtime'; import initHeadManager from 'next/dist/client/head-manager'; type HeadManagerValue = { diff --git a/code/frameworks/nextjs/src/routing/app-router-provider.tsx b/code/frameworks/nextjs/src/routing/app-router-provider.tsx index e25c2f1488b4..a7f0bd326f9b 100644 --- a/code/frameworks/nextjs/src/routing/app-router-provider.tsx +++ b/code/frameworks/nextjs/src/routing/app-router-provider.tsx @@ -3,11 +3,11 @@ import type { LayoutRouterContext as TLayoutRouterContext, AppRouterContext as TAppRouterContext, GlobalLayoutRouterContext as TGlobalLayoutRouterContext, -} from 'next/dist/shared/lib/app-router-context'; +} from 'next/dist/shared/lib/app-router-context.shared-runtime'; import type { PathnameContext as TPathnameContext, SearchParamsContext as TSearchParamsContext, -} from 'next/dist/shared/lib/hooks-client-context'; +} from 'next/dist/shared/lib/hooks-client-context.shared-runtime'; import type { FlightRouterState } from 'next/dist/server/app-render/types'; import type { RouteParams } from './types'; @@ -25,12 +25,16 @@ let SearchParamsContext: typeof TSearchParamsContext; let GlobalLayoutRouterContext: typeof TGlobalLayoutRouterContext; try { - AppRouterContext = require('next/dist/shared/lib/app-router-context').AppRouterContext; - LayoutRouterContext = require('next/dist/shared/lib/app-router-context').LayoutRouterContext; - PathnameContext = require('next/dist/shared/lib/hooks-client-context').PathnameContext; - SearchParamsContext = require('next/dist/shared/lib/hooks-client-context').SearchParamsContext; + AppRouterContext = + require('next/dist/shared/lib/app-router-context.shared-runtime').AppRouterContext; + LayoutRouterContext = + require('next/dist/shared/lib/app-router-context.shared-runtime').LayoutRouterContext; + PathnameContext = + require('next/dist/shared/lib/hooks-client-context.shared-runtime').PathnameContext; + SearchParamsContext = + require('next/dist/shared/lib/hooks-client-context.shared-runtime').SearchParamsContext; GlobalLayoutRouterContext = - require('next/dist/shared/lib/app-router-context').GlobalLayoutRouterContext; + require('next/dist/shared/lib/app-router-context.shared-runtime').GlobalLayoutRouterContext; } catch { AppRouterContext = React.Fragment as any; LayoutRouterContext = React.Fragment as any; diff --git a/code/frameworks/nextjs/src/routing/page-router-provider.tsx b/code/frameworks/nextjs/src/routing/page-router-provider.tsx index c882e3bee5b3..e91819fde38e 100644 --- a/code/frameworks/nextjs/src/routing/page-router-provider.tsx +++ b/code/frameworks/nextjs/src/routing/page-router-provider.tsx @@ -1,5 +1,5 @@ import type { Globals } from '@storybook/csf'; -import { RouterContext } from 'next/dist/shared/lib/router-context'; +import { RouterContext } from 'next/dist/shared/lib/router-context.shared-runtime'; import React from 'react'; import type { RouteParams } from './types'; diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 9ffe4e74a60b..3802d67b858c 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -139,14 +139,14 @@ const baseTemplates = { }, 'nextjs/prerelease': { name: 'Next.js Prerelease (Webpack | TypeScript)', - script: 'npx create-next-app@canary {{beforeDir}} --typescript --eslint', + script: + 'npx create-next-app@canary {{beforeDir}} --typescript --eslint --tailwind --app --import-alias="@/*" --src-dir', expected: { framework: '@storybook/nextjs', renderer: '@storybook/react', builder: '@storybook/builder-webpack5', }, skipTasks: ['e2e-tests-dev', 'bench'], - inDevelopment: true, }, 'react-vite/default-js': { name: 'React Latest (Vite | JavaScript)', @@ -307,8 +307,6 @@ const baseTemplates = { builder: '@storybook/builder-webpack5', }, skipTasks: ['e2e-tests-dev', 'bench'], - // TODO: Should be removed after we merge this PR: https://github.com/storybookjs/storybook/pull/24188 - inDevelopment: true, }, 'angular-cli/default-ts': { name: 'Angular CLI Latest (Webpack | TypeScript)', diff --git a/code/yarn.lock b/code/yarn.lock index 041e96115807..63b6817c354a 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -3973,72 +3973,72 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:13.4.19": - version: 13.4.19 - resolution: "@next/env@npm:13.4.19" - checksum: 0d9cb76fedcde6f8116c5f029d999cccaf929c9eb8c55daf1d38ae223a80113abae28834e537b26b81731d84ed14fd5231301b2126cd7d9097a7e175dd79bf59 +"@next/env@npm:13.5.4": + version: 13.5.4 + resolution: "@next/env@npm:13.5.4" + checksum: 69c013047371bde6c4dc6d03ec77140059bd4e3db38c1991a8aa8a9c8ce4d1370b98a141145a6f60e23f32ce97a3040b448bfd0455b0d9e5ba6efda8df33c89f languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:13.4.19": - version: 13.4.19 - resolution: "@next/swc-darwin-arm64@npm:13.4.19" +"@next/swc-darwin-arm64@npm:13.5.4": + version: 13.5.4 + resolution: "@next/swc-darwin-arm64@npm:13.5.4" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:13.4.19": - version: 13.4.19 - resolution: "@next/swc-darwin-x64@npm:13.4.19" +"@next/swc-darwin-x64@npm:13.5.4": + version: 13.5.4 + resolution: "@next/swc-darwin-x64@npm:13.5.4" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:13.4.19": - version: 13.4.19 - resolution: "@next/swc-linux-arm64-gnu@npm:13.4.19" +"@next/swc-linux-arm64-gnu@npm:13.5.4": + version: 13.5.4 + resolution: "@next/swc-linux-arm64-gnu@npm:13.5.4" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:13.4.19": - version: 13.4.19 - resolution: "@next/swc-linux-arm64-musl@npm:13.4.19" +"@next/swc-linux-arm64-musl@npm:13.5.4": + version: 13.5.4 + resolution: "@next/swc-linux-arm64-musl@npm:13.5.4" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:13.4.19": - version: 13.4.19 - resolution: "@next/swc-linux-x64-gnu@npm:13.4.19" +"@next/swc-linux-x64-gnu@npm:13.5.4": + version: 13.5.4 + resolution: "@next/swc-linux-x64-gnu@npm:13.5.4" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:13.4.19": - version: 13.4.19 - resolution: "@next/swc-linux-x64-musl@npm:13.4.19" +"@next/swc-linux-x64-musl@npm:13.5.4": + version: 13.5.4 + resolution: "@next/swc-linux-x64-musl@npm:13.5.4" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:13.4.19": - version: 13.4.19 - resolution: "@next/swc-win32-arm64-msvc@npm:13.4.19" +"@next/swc-win32-arm64-msvc@npm:13.5.4": + version: 13.5.4 + resolution: "@next/swc-win32-arm64-msvc@npm:13.5.4" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:13.4.19": - version: 13.4.19 - resolution: "@next/swc-win32-ia32-msvc@npm:13.4.19" +"@next/swc-win32-ia32-msvc@npm:13.5.4": + version: 13.5.4 + resolution: "@next/swc-win32-ia32-msvc@npm:13.5.4" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:13.4.19": - version: 13.4.19 - resolution: "@next/swc-win32-x64-msvc@npm:13.4.19" +"@next/swc-win32-x64-msvc@npm:13.5.4": + version: 13.5.4 + resolution: "@next/swc-win32-x64-msvc@npm:13.5.4" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -7323,7 +7323,7 @@ __metadata: fs-extra: ^11.1.0 image-size: ^1.0.0 loader-utils: ^3.2.0 - next: 13.4.19 + next: 13.5.4 node-polyfill-webpack-plugin: ^2.0.1 pnp-webpack-plugin: ^1.7.0 postcss: ^8.4.21 @@ -8689,12 +8689,12 @@ __metadata: languageName: node linkType: hard -"@swc/helpers@npm:0.5.1": - version: 0.5.1 - resolution: "@swc/helpers@npm:0.5.1" +"@swc/helpers@npm:0.5.2": + version: 0.5.2 + resolution: "@swc/helpers@npm:0.5.2" dependencies: tslib: ^2.4.0 - checksum: 2e2272c8278351670e1daf27cc634ace793afb378dcc85be2800d30a7b4d3afad37707371ead2a6d96662fa30294da678d66cdc4dc7f3e698bd8e111235c60fc + checksum: b6fa49bcf6c00571d0eb7837b163f8609960d4d77538160585e27ed167361e9776bd6e5eb9646ffac2fb4d43c58df9ca50dab9d96ab097e6591bc82a75fd1164 languageName: node linkType: hard @@ -23841,7 +23841,7 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.3.4, nanoid@npm:^3.3.6": +"nanoid@npm:^3.3.6": version: 3.3.6 resolution: "nanoid@npm:3.3.6" bin: @@ -23936,27 +23936,26 @@ __metadata: languageName: node linkType: hard -"next@npm:13.4.19": - version: 13.4.19 - resolution: "next@npm:13.4.19" +"next@npm:13.5.4": + version: 13.5.4 + resolution: "next@npm:13.5.4" dependencies: - "@next/env": 13.4.19 - "@next/swc-darwin-arm64": 13.4.19 - "@next/swc-darwin-x64": 13.4.19 - "@next/swc-linux-arm64-gnu": 13.4.19 - "@next/swc-linux-arm64-musl": 13.4.19 - "@next/swc-linux-x64-gnu": 13.4.19 - "@next/swc-linux-x64-musl": 13.4.19 - "@next/swc-win32-arm64-msvc": 13.4.19 - "@next/swc-win32-ia32-msvc": 13.4.19 - "@next/swc-win32-x64-msvc": 13.4.19 - "@swc/helpers": 0.5.1 + "@next/env": 13.5.4 + "@next/swc-darwin-arm64": 13.5.4 + "@next/swc-darwin-x64": 13.5.4 + "@next/swc-linux-arm64-gnu": 13.5.4 + "@next/swc-linux-arm64-musl": 13.5.4 + "@next/swc-linux-x64-gnu": 13.5.4 + "@next/swc-linux-x64-musl": 13.5.4 + "@next/swc-win32-arm64-msvc": 13.5.4 + "@next/swc-win32-ia32-msvc": 13.5.4 + "@next/swc-win32-x64-msvc": 13.5.4 + "@swc/helpers": 0.5.2 busboy: 1.6.0 caniuse-lite: ^1.0.30001406 - postcss: 8.4.14 + postcss: 8.4.31 styled-jsx: 5.1.1 watchpack: 2.4.0 - zod: 3.21.4 peerDependencies: "@opentelemetry/api": ^1.1.0 react: ^18.2.0 @@ -23988,7 +23987,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: 557fd15a52220f003ec88a79f51de41c5bb9cda5294944985f31ce45e75f98dd3caf902896d8419d96cc81596976671e953391b1eb3707757d261e362a242310 + checksum: 0b0bc7fa42844859a0444a79122a48b5e65116c30ce077a3edaaecd7cee1d7925214a659391ae6ecf8dc612869a7a646ab3a1a8aa12d074ff17e3f18c53a2621 languageName: node linkType: hard @@ -26096,25 +26095,25 @@ __metadata: languageName: node linkType: hard -"postcss@npm:8.4.14": - version: 8.4.14 - resolution: "postcss@npm:8.4.14" +"postcss@npm:8.4.27": + version: 8.4.27 + resolution: "postcss@npm:8.4.27" dependencies: - nanoid: ^3.3.4 + nanoid: ^3.3.6 picocolors: ^1.0.0 source-map-js: ^1.0.2 - checksum: 2a4cfa28e2f1bfd358313501f7771bd596e494487c7b735c492e2f8b1faf493d24fcb43e2e6ad825863fc65a77abb949ca8f228602ae46a022f02dc812c4ac8b + checksum: 41a0476e05cb97514ff8d75e4ff9fdcf778f22b2e0d25b7028f219cd408e01d3c4f50459d4a1cd9a430d8ef08202c881374a4fa4ea6009f4a135a07315d606e5 languageName: node linkType: hard -"postcss@npm:8.4.27": - version: 8.4.27 - resolution: "postcss@npm:8.4.27" +"postcss@npm:8.4.31, postcss@npm:^8.1.10, postcss@npm:^8.2.14, postcss@npm:^8.4.14, postcss@npm:^8.4.21, postcss@npm:^8.4.23, postcss@npm:^8.4.26, postcss@npm:^8.4.27": + version: 8.4.31 + resolution: "postcss@npm:8.4.31" dependencies: nanoid: ^3.3.6 picocolors: ^1.0.0 source-map-js: ^1.0.2 - checksum: 41a0476e05cb97514ff8d75e4ff9fdcf778f22b2e0d25b7028f219cd408e01d3c4f50459d4a1cd9a430d8ef08202c881374a4fa4ea6009f4a135a07315d606e5 + checksum: 748b82e6e5fc34034dcf2ae88ea3d11fd09f69b6c50ecdd3b4a875cfc7cdca435c958b211e2cb52355422ab6fccb7d8f2f2923161d7a1b281029e4a913d59acf languageName: node linkType: hard @@ -26128,17 +26127,6 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.1.10, postcss@npm:^8.2.14, postcss@npm:^8.4.14, postcss@npm:^8.4.21, postcss@npm:^8.4.23, postcss@npm:^8.4.26, postcss@npm:^8.4.27": - version: 8.4.31 - resolution: "postcss@npm:8.4.31" - dependencies: - nanoid: ^3.3.6 - picocolors: ^1.0.0 - source-map-js: ^1.0.2 - checksum: 748b82e6e5fc34034dcf2ae88ea3d11fd09f69b6c50ecdd3b4a875cfc7cdca435c958b211e2cb52355422ab6fccb7d8f2f2923161d7a1b281029e4a913d59acf - languageName: node - linkType: hard - "preact-render-to-string@npm:^5.1.19": version: 5.2.6 resolution: "preact-render-to-string@npm:5.2.6" @@ -33315,13 +33303,6 @@ __metadata: languageName: node linkType: hard -"zod@npm:3.21.4": - version: 3.21.4 - resolution: "zod@npm:3.21.4" - checksum: 161e8cf7aea38a99244d65da4a9477d9d966f6a533e503feaa20ff7968a9691065c38c6f1eab5cbbdc8374142fff4a05c9cacb8479803ab50ab6a6ca80e5d624 - languageName: node - linkType: hard - "zone.js@npm:^0.13.0": version: 0.13.3 resolution: "zone.js@npm:0.13.3" From 3c0f77a0feb48a025483a039d09ad692887c3701 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 16:43:35 +0200 Subject: [PATCH 10/15] Fix parallelism config for CircleCI --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5d0cf92241ed..2273bcc5bdf3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -609,22 +609,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 35 + parallelism: 36 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 35 + parallelism: 36 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 32 + parallelism: 33 requires: - build-sandboxes - e2e-production: - parallelism: 32 + parallelism: 33 requires: - build-sandboxes - e2e-dev: @@ -632,7 +632,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 32 + parallelism: 33 requires: - build-sandboxes # TODO: reenable once we find out the source of flakyness From 62e4b479884376ea196eaad9de74dfb1f6fb6150 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 16:47:13 +0200 Subject: [PATCH 11/15] Revert ref in genreate-sandboxes-next.yml --- .github/workflows/generate-sandboxes-next.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index e163df8ecd47..8a28c4cbb23a 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: valentin/setup-sandboxes + ref: next - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' From 66b15ff1a01dd6382c045d50f038efad93f41e70 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 16:50:46 +0200 Subject: [PATCH 12/15] Update code/frameworks/nextjs/src/dependency-map.ts Co-authored-by: Yann Braga --- code/frameworks/nextjs/src/dependency-map.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/frameworks/nextjs/src/dependency-map.ts b/code/frameworks/nextjs/src/dependency-map.ts index 2bfdbac071fc..57170a88329b 100644 --- a/code/frameworks/nextjs/src/dependency-map.ts +++ b/code/frameworks/nextjs/src/dependency-map.ts @@ -9,7 +9,7 @@ const mapping: Record> = { '>=11.1.0 <13.5.0': { 'next/dist/shared/lib/router-context': 'next/dist/shared/lib/router-context', }, - '< 13.5.0': { + '<13.5.0': { 'next/dist/shared/lib/router-context.shared-runtime': 'next/dist/shared/lib/router-context', 'next/dist/shared/lib/head-manager-context.shared-runtime': 'next/dist/shared/lib/head-manager-context', From c8ec3a645bbb41ad9caba0665a154a21f9fc88a0 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 17:30:17 +0200 Subject: [PATCH 13/15] Fix Next.js 12 --- code/frameworks/nextjs/src/dependency-map.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/frameworks/nextjs/src/dependency-map.ts b/code/frameworks/nextjs/src/dependency-map.ts index 57170a88329b..466af4c66511 100644 --- a/code/frameworks/nextjs/src/dependency-map.ts +++ b/code/frameworks/nextjs/src/dependency-map.ts @@ -9,14 +9,16 @@ const mapping: Record> = { '>=11.1.0 <13.5.0': { 'next/dist/shared/lib/router-context': 'next/dist/shared/lib/router-context', }, + '>=13': { + 'next/dist/shared/lib/hooks-client-context.shared-runtime': + 'next/dist/shared/lib/hooks-client-context', + }, '<13.5.0': { 'next/dist/shared/lib/router-context.shared-runtime': 'next/dist/shared/lib/router-context', 'next/dist/shared/lib/head-manager-context.shared-runtime': 'next/dist/shared/lib/head-manager-context', 'next/dist/shared/lib/app-router-context.shared-runtime': 'next/dist/shared/lib/app-router-context', - 'next/dist/shared/lib/hooks-client-context.shared-runtime': - 'next/dist/shared/lib/hooks-client-context', }, }; From eb52b37d5ed62fc582c472083b595acea6870a87 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 18:01:59 +0200 Subject: [PATCH 14/15] Fix Next.js default sandboxes --- code/frameworks/nextjs/src/dependency-map.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/frameworks/nextjs/src/dependency-map.ts b/code/frameworks/nextjs/src/dependency-map.ts index 466af4c66511..0b2825ca297b 100644 --- a/code/frameworks/nextjs/src/dependency-map.ts +++ b/code/frameworks/nextjs/src/dependency-map.ts @@ -9,7 +9,7 @@ const mapping: Record> = { '>=11.1.0 <13.5.0': { 'next/dist/shared/lib/router-context': 'next/dist/shared/lib/router-context', }, - '>=13': { + '>=12.2.1 <13.5.0': { 'next/dist/shared/lib/hooks-client-context.shared-runtime': 'next/dist/shared/lib/hooks-client-context', }, From 74bd3b08073a368d12e7654cf8890890472d1dba Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 12 Oct 2023 18:32:51 +0200 Subject: [PATCH 15/15] Fix Next.js 12 --- code/frameworks/nextjs/src/dependency-map.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/frameworks/nextjs/src/dependency-map.ts b/code/frameworks/nextjs/src/dependency-map.ts index 0b2825ca297b..dd848087f3e3 100644 --- a/code/frameworks/nextjs/src/dependency-map.ts +++ b/code/frameworks/nextjs/src/dependency-map.ts @@ -9,7 +9,7 @@ const mapping: Record> = { '>=11.1.0 <13.5.0': { 'next/dist/shared/lib/router-context': 'next/dist/shared/lib/router-context', }, - '>=12.2.1 <13.5.0': { + '>=13.0.2 <13.5.0': { 'next/dist/shared/lib/hooks-client-context.shared-runtime': 'next/dist/shared/lib/hooks-client-context', },