From fbc07b11c3a14304c4d3a00c477bb646f273b143 Mon Sep 17 00:00:00 2001 From: ShaMan123 Date: Sun, 5 Nov 2023 12:15:11 +0200 Subject: [PATCH 01/16] init Create index.spec.ts x --- .codesandbox/templates/next/.gitignore | 3 +- .../templates/next/instrumentation.ts | 11 ++++++ .codesandbox/templates/next/next.config.mjs | 7 ++++ e2e/tests/SSR/index.spec.ts | 36 ++++++++++++++++++ .../SSR-using-Next-js-1.png | Bin 0 -> 24926 bytes package-lock.json | 12 +++--- 6 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 .codesandbox/templates/next/instrumentation.ts create mode 100644 e2e/tests/SSR/index.spec.ts create mode 100644 e2e/tests/SSR/index.spec.ts-snapshots/SSR-using-Next-js-1.png diff --git a/.codesandbox/templates/next/.gitignore b/.codesandbox/templates/next/.gitignore index b26ec807da8..791bf233c31 100644 --- a/.codesandbox/templates/next/.gitignore +++ b/.codesandbox/templates/next/.gitignore @@ -1,4 +1,5 @@ node_modules .next package-lock.json -yarn.lock \ No newline at end of file +yarn.lock +.instrumentation \ No newline at end of file diff --git a/.codesandbox/templates/next/instrumentation.ts b/.codesandbox/templates/next/instrumentation.ts new file mode 100644 index 00000000000..a0f023822a1 --- /dev/null +++ b/.codesandbox/templates/next/instrumentation.ts @@ -0,0 +1,11 @@ +import { appendFileSync } from 'fs'; + +const PATH = './.instrumentation'; + +/** + * Used to hook into the server lifecycle + * https://nextjs.org/docs/pages/building-your-application/optimizing/instrumentation + */ +export function register() { + appendFileSync(PATH, `${Date.now()}\n`); +} diff --git a/.codesandbox/templates/next/next.config.mjs b/.codesandbox/templates/next/next.config.mjs index 11d69c34ddd..9563dfcb6c1 100644 --- a/.codesandbox/templates/next/next.config.mjs +++ b/.codesandbox/templates/next/next.config.mjs @@ -3,6 +3,13 @@ */ const nextConfig = { reactStrictMode: true, + + // config for the instrumentationHook + experimental: { instrumentationHook: true }, + webpack: (config) => { + config.resolve.fallback = { fs: false }; + return config; + }, }; export default nextConfig; diff --git a/e2e/tests/SSR/index.spec.ts b/e2e/tests/SSR/index.spec.ts new file mode 100644 index 00000000000..6afaea9a052 --- /dev/null +++ b/e2e/tests/SSR/index.spec.ts @@ -0,0 +1,36 @@ +import { expect, test } from '@playwright/test'; +import type { ChildProcessWithoutNullStreams } from 'child_process'; +import { spawn } from 'child_process'; +import { watch } from 'fs'; +import path from 'path'; + +// setup(); + +let task: ChildProcessWithoutNullStreams; +test.beforeAll(({}, testInfo) => { + testInfo.setTimeout(60 * 1000); + task = spawn('npm start next -- --no-watch', { + stdio: 'pipe', + shell: true, + detached: true, + cwd: process.cwd(), + }); + return new Promise((resolve) => { + const watcher = watch( + path.resolve(process.cwd(), '.codesandbox', 'templates', 'next'), + (event, filename) => { + if (filename === '.instrumentation') { + watcher.close(); + resolve(); + } + } + ); + }); +}); +test.afterAll(() => task.kill(0)); + +test('SSR with Next.js', async ({ page }) => { + await page.goto('http://localhost:3000/'); + await page.waitForLoadState('load'); + expect(await page.screenshot()).toMatchSnapshot(); +}); diff --git a/e2e/tests/SSR/index.spec.ts-snapshots/SSR-using-Next-js-1.png b/e2e/tests/SSR/index.spec.ts-snapshots/SSR-using-Next-js-1.png new file mode 100644 index 0000000000000000000000000000000000000000..127f666948b54629300e7eac29989d889a67d2fd GIT binary patch literal 24926 zcmdSAWmuGL)HaI!2qKR`7|5g22q-CSfdW#}ts>nmIT(PFI&_0{j>OO*Al)&HGy+3+ z_w04+_wFD2_>TQ^AK&H=BhK7&-Pg6&xz6)k>;5b+`;?sYDk%vG3AyC6Cof1yPQlCL zo&TJMUmb44D)8%=?Te?6NOIb*&ytY*M-z8Pl$nrAa{xY2X{p1D_$}27A=WfEoQ~9m-kX$=B1_m zmq*%Ys1Xr5Ji(seCOU09GCj1d6^1tzU0%;^Y_5F$4=e+IJk&E(@yG&^ zpEQA!9>{O_^Of5qC;z@|r8)NB-&Zf|{~XOPQ`6-tn(wLRi*#ii7Ybxd#i3tqjHIHO-XsgkPf zls@Y6fpD{_%`s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fri, 10 Nov 2023 13:35:23 +0200 Subject: [PATCH 02/16] refactor sandbox cmd --- .codesandbox/README.md | 2 +- .codesandbox/start.mjs | 34 +- .codesandbox/templates/next/package.json | 3 +- .codesandbox/templates/node/package.json | 10 +- .codesandbox/templates/node/src/index.mjs | 16 +- .codesandbox/templates/vanilla/package.json | 3 +- CONTRIBUTING.md | 4 +- package-lock.json | 1804 ++++++++++++++++++- package.json | 1 + scripts/sandbox.mjs | 98 +- 10 files changed, 1909 insertions(+), 66 deletions(-) diff --git a/.codesandbox/README.md b/.codesandbox/README.md index 6bd39252529..cac7c3924c4 100644 --- a/.codesandbox/README.md +++ b/.codesandbox/README.md @@ -19,7 +19,7 @@ npm run sandbox ## Developing ```bash -npm start