diff --git a/packages/vike-node/package.json b/packages/vike-node/package.json index cb389f9..1825d64 100644 --- a/packages/vike-node/package.json +++ b/packages/vike-node/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "@brillout/picocolors": "^1.0.14", - "@nitedani/shrink-ray-current": "^4.2.0", + "@nitedani/shrink-ray-current": "^4.3.0", "@vercel/nft": "^0.26.5", "esbuild": "^0.19.12", "sirv": "^2.0.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8e289da..506b3cf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ^1.0.14 version: 1.0.14 '@nitedani/shrink-ray-current': - specifier: ^4.2.0 - version: 4.2.0 + specifier: ^4.3.0 + version: 4.3.0 '@vercel/nft': specifier: ^0.26.5 version: 0.26.5 @@ -108,6 +108,9 @@ importers: '@types/express': specifier: ^4.17.21 version: 4.17.21 + '@types/node': + specifier: ^20.14.12 + version: 20.14.12 '@types/react': specifier: ^18.3.3 version: 18.3.3 @@ -143,7 +146,7 @@ importers: version: 0.33.4 telefunc: specifier: ^0.1.76 - version: 0.1.76(@babel/core@7.24.9)(@babel/parser@7.24.8)(@babel/types@7.24.9)(react-streaming@0.3.42(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + version: 0.1.76(@babel/core@7.24.9)(@babel/parser@7.25.0)(@babel/types@7.25.0)(react-streaming@0.3.42(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) typescript: specifier: ^5.5.4 version: 5.5.4 @@ -167,40 +170,28 @@ packages: resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.24.9': - resolution: {integrity: sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng==} + '@babel/compat-data@7.25.0': + resolution: {integrity: sha512-P4fwKI2mjEb3ZU5cnMJzvRsRKGBUcs8jvxIoRmr6ufAY9Xk2Bz7JubRTTivkw55c7WQJfTECeqYVa+HZ0FzREg==} engines: {node: '>=6.9.0'} '@babel/core@7.24.9': resolution: {integrity: sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==} engines: {node: '>=6.9.0'} - '@babel/generator@7.24.10': - resolution: {integrity: sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==} + '@babel/generator@7.25.0': + resolution: {integrity: sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==} engines: {node: '>=6.9.0'} '@babel/helper-compilation-targets@7.24.8': resolution: {integrity: sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==} engines: {node: '>=6.9.0'} - '@babel/helper-environment-visitor@7.24.7': - resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-function-name@7.24.7': - resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-hoist-variables@7.24.7': - resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.24.7': resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.24.9': - resolution: {integrity: sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw==} + '@babel/helper-module-transforms@7.25.0': + resolution: {integrity: sha512-bIkOa2ZJYn7FHnepzr5iX9Kmz8FjIz4UKzJ9zhX3dnYuVW0xul9RuR3skBfoLu+FPTQw90EHW9rJsSZhyLQ3fQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -213,10 +204,6 @@ packages: resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} engines: {node: '>=6.9.0'} - '@babel/helper-split-export-declaration@7.24.7': - resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.8': resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} @@ -229,16 +216,16 @@ packages: resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.24.8': - resolution: {integrity: sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ==} + '@babel/helpers@7.25.0': + resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==} engines: {node: '>=6.9.0'} '@babel/highlight@7.24.7': resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.8': - resolution: {integrity: sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==} + '@babel/parser@7.25.0': + resolution: {integrity: sha512-CzdIU9jdP0dg7HdyB+bHvDJGagUv+qtzZt5rYCWwW6tITNqV9odjp6Qu41gkG0ca5UfdDUWrKkiAnHHdGRnOrA==} engines: {node: '>=6.0.0'} hasBin: true @@ -254,16 +241,16 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/template@7.24.7': - resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} + '@babel/template@7.25.0': + resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.24.8': - resolution: {integrity: sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==} + '@babel/traverse@7.25.0': + resolution: {integrity: sha512-ubALThHQy4GCf6mbb+5ZRNmLLCI7bJ3f8Q6LHBSRlSKSWj5a7dSUzJBLv3VuIhFrFPgjF4IzPF567YG/HSCdZA==} engines: {node: '>=6.9.0'} - '@babel/types@7.24.9': - resolution: {integrity: sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==} + '@babel/types@7.25.0': + resolution: {integrity: sha512-LcnxQSsd9aXOIgmmSpvZ/1yo46ra2ESYyqLcryaBZOghxy5qqOBjvCWP5JfkI8yl9rlxRgdLTTMCQQRcN2hdCg==} engines: {node: '>=6.9.0'} '@biomejs/biome@1.8.3': @@ -926,8 +913,8 @@ packages: '@napi-rs/wasm-runtime@0.2.4': resolution: {integrity: sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==} - '@nitedani/shrink-ray-current@4.2.0': - resolution: {integrity: sha512-ltIQurbwv7Hk579seW8HGH+ay42+FUEPi0OChmSB5qCrnXFa5Ecd4zxVCbn2JjTHJj4R5M5YW4fYN0SOqlAiUQ==} + '@nitedani/shrink-ray-current@4.3.0': + resolution: {integrity: sha512-GC/+xG/TDZDl9hoMDXRA3UxQycDSofvRN4oCMb/2jpo3OEUb2WaxuQjR9z6eYCUMoMcPquMpdQv+yzrCkImpUA==} engines: {node: '>=14.0'} '@node-rs/argon2-android-arm-eabi@1.8.3': @@ -1929,13 +1916,13 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + lru-cache@11.0.0: + resolution: {integrity: sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==} + engines: {node: 20 || >=22} + lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lru-cache@8.0.5: - resolution: {integrity: sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==} - engines: {node: '>=16.14'} - make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -2651,20 +2638,20 @@ snapshots: '@babel/highlight': 7.24.7 picocolors: 1.0.1 - '@babel/compat-data@7.24.9': {} + '@babel/compat-data@7.25.0': {} '@babel/core@7.24.9': dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.10 + '@babel/generator': 7.25.0 '@babel/helper-compilation-targets': 7.24.8 - '@babel/helper-module-transforms': 7.24.9(@babel/core@7.24.9) - '@babel/helpers': 7.24.8 - '@babel/parser': 7.24.8 - '@babel/template': 7.24.7 - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.9 + '@babel/helper-module-transforms': 7.25.0(@babel/core@7.24.9) + '@babel/helpers': 7.25.0 + '@babel/parser': 7.25.0 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.0 + '@babel/types': 7.25.0 convert-source-map: 2.0.0 debug: 4.3.5 gensync: 1.0.0-beta.2 @@ -2673,49 +2660,35 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.24.10': + '@babel/generator@7.25.0': dependencies: - '@babel/types': 7.24.9 + '@babel/types': 7.25.0 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 '@babel/helper-compilation-targets@7.24.8': dependencies: - '@babel/compat-data': 7.24.9 + '@babel/compat-data': 7.25.0 '@babel/helper-validator-option': 7.24.8 browserslist: 4.23.2 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-environment-visitor@7.24.7': - dependencies: - '@babel/types': 7.24.9 - - '@babel/helper-function-name@7.24.7': - dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.9 - - '@babel/helper-hoist-variables@7.24.7': - dependencies: - '@babel/types': 7.24.9 - '@babel/helper-module-imports@7.24.7': dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.9 + '@babel/traverse': 7.25.0 + '@babel/types': 7.25.0 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.24.9(@babel/core@7.24.9)': + '@babel/helper-module-transforms@7.25.0(@babel/core@7.24.9)': dependencies: '@babel/core': 7.24.9 - '@babel/helper-environment-visitor': 7.24.7 '@babel/helper-module-imports': 7.24.7 '@babel/helper-simple-access': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 '@babel/helper-validator-identifier': 7.24.7 + '@babel/traverse': 7.25.0 transitivePeerDependencies: - supports-color @@ -2723,25 +2696,21 @@ snapshots: '@babel/helper-simple-access@7.24.7': dependencies: - '@babel/traverse': 7.24.8 - '@babel/types': 7.24.9 + '@babel/traverse': 7.25.0 + '@babel/types': 7.25.0 transitivePeerDependencies: - supports-color - '@babel/helper-split-export-declaration@7.24.7': - dependencies: - '@babel/types': 7.24.9 - '@babel/helper-string-parser@7.24.8': {} '@babel/helper-validator-identifier@7.24.7': {} '@babel/helper-validator-option@7.24.8': {} - '@babel/helpers@7.24.8': + '@babel/helpers@7.25.0': dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.9 + '@babel/template': 7.25.0 + '@babel/types': 7.25.0 '@babel/highlight@7.24.7': dependencies: @@ -2750,9 +2719,9 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.0.1 - '@babel/parser@7.24.8': + '@babel/parser@7.25.0': dependencies: - '@babel/types': 7.24.9 + '@babel/types': 7.25.0 '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.24.9)': dependencies: @@ -2764,28 +2733,25 @@ snapshots: '@babel/core': 7.24.9 '@babel/helper-plugin-utils': 7.24.8 - '@babel/template@7.24.7': + '@babel/template@7.25.0': dependencies: '@babel/code-frame': 7.24.7 - '@babel/parser': 7.24.8 - '@babel/types': 7.24.9 + '@babel/parser': 7.25.0 + '@babel/types': 7.25.0 - '@babel/traverse@7.24.8': + '@babel/traverse@7.25.0': dependencies: '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.10 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-function-name': 7.24.7 - '@babel/helper-hoist-variables': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.24.8 - '@babel/types': 7.24.9 + '@babel/generator': 7.25.0 + '@babel/parser': 7.25.0 + '@babel/template': 7.25.0 + '@babel/types': 7.25.0 debug: 4.3.5 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.24.9': + '@babel/types@7.25.0': dependencies: '@babel/helper-string-parser': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 @@ -3225,13 +3191,13 @@ snapshots: '@tybys/wasm-util': 0.9.0 optional: true - '@nitedani/shrink-ray-current@4.2.0': + '@nitedani/shrink-ray-current@4.3.0': dependencies: accepts: 1.3.8 bytes: 3.1.2 compressible: 2.0.18 debug: 4.3.5 - lru-cache: 8.0.5 + lru-cache: 11.0.0 multipipe: 4.0.0 on-headers: 1.0.2 stream-buffers: 3.0.3 @@ -3406,24 +3372,24 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.24.8 - '@babel/types': 7.24.9 + '@babel/parser': 7.25.0 + '@babel/types': 7.25.0 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.24.9 + '@babel/types': 7.25.0 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.24.8 - '@babel/types': 7.24.9 + '@babel/parser': 7.25.0 + '@babel/types': 7.25.0 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.24.9 + '@babel/types': 7.25.0 '@types/body-parser@1.19.5': dependencies: @@ -4306,12 +4272,12 @@ snapshots: lru-cache@10.4.3: {} + lru-cache@11.0.0: {} + lru-cache@5.1.1: dependencies: yallist: 3.1.1 - lru-cache@8.0.5: {} - make-dir@3.1.0: dependencies: semver: 6.3.1 @@ -4834,7 +4800,7 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 - telefunc@0.1.76(@babel/core@7.24.9)(@babel/parser@7.24.8)(@babel/types@7.24.9)(react-streaming@0.3.42(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1): + telefunc@0.1.76(@babel/core@7.24.9)(@babel/parser@7.25.0)(@babel/types@7.25.0)(react-streaming@0.3.42(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1): dependencies: '@brillout/import': 0.2.3 '@brillout/json-serializer': 0.5.13 @@ -4845,8 +4811,8 @@ snapshots: ts-morph: 19.0.0 optionalDependencies: '@babel/core': 7.24.9 - '@babel/parser': 7.24.8 - '@babel/types': 7.24.9 + '@babel/parser': 7.25.0 + '@babel/types': 7.25.0 react: 18.3.1 react-streaming: 0.3.42(react-dom@18.3.1(react@18.3.1))(react@18.3.1) diff --git a/test/vike-node/.testRun.ts b/test/vike-node/.testRun.ts index 8748340..e870ac3 100644 --- a/test/vike-node/.testRun.ts +++ b/test/vike-node/.testRun.ts @@ -48,6 +48,7 @@ function testRun(cmd: 'npm run dev' | 'npm run prod') { test('argon2', async () => { await page.goto(`${getServerUrl()}/argon2`) + expect(await page.textContent('button[type="submit"]')).toBe('Sign in') await page.fill('input[type="text"]', 'correct-password') await autoRetry(async () => { await page.click('button[type="submit"]') @@ -57,6 +58,7 @@ function testRun(cmd: 'npm run dev' | 'npm run prod') { test('sharp', async () => { await page.goto(`${getServerUrl()}/sharp`) + expect(await page.textContent('button[type="button"]')).toBe('Run sharp') await autoRetry(async () => { await page.click('button[type="button"]') expect(await page.textContent('body')).toContain('240000 bytes') @@ -71,9 +73,9 @@ function testRun(cmd: 'npm run dev' | 'npm run prod') { // fastify should work but broken on ci // let's leave it out for now - if (!isProd && !(isCI && process.env.VIKE_NODE_FRAMEWORK === 'fastify')) + if (!isProd && !(isCI() && process.env.VIKE_NODE_FRAMEWORK === 'fastify')) test('vite hmr websocket', async () => { - const logs = [] + const logs: string[] = [] page.on('console', (msg) => logs.push(msg.text())) await page.goto(`${getServerUrl()}/`) diff --git a/test/vike-node/package.json b/test/vike-node/package.json index e31732c..7dcca90 100644 --- a/test/vike-node/package.json +++ b/test/vike-node/package.json @@ -12,6 +12,7 @@ "@types/express": "^4.17.21", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", + "@types/node": "^20.14.12", "@vitejs/plugin-react": "^4.3.1", "cross-env": "^7.0.3", "express": "^4.19.2",