From cf3e88987713445191e56ff0fe456d1c7b66eb5b Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 21 Dec 2022 15:51:59 +0100 Subject: [PATCH 1/3] add GlobalError export to layout entry --- .../js/src/entry/app/layout-entry.tsx | 1 + crates/next-dev/tests/package.json | 2 +- pnpm-lock.yaml | 214 ++++++++++-------- 3 files changed, 119 insertions(+), 98 deletions(-) diff --git a/crates/next-core/js/src/entry/app/layout-entry.tsx b/crates/next-core/js/src/entry/app/layout-entry.tsx index ad39d203f4a5f..8fb29229eb8b9 100644 --- a/crates/next-core/js/src/entry/app/layout-entry.tsx +++ b/crates/next-core/js/src/entry/app/layout-entry.tsx @@ -1,6 +1,7 @@ export { default as AppRouter } from "next/dist/client/components/app-router.js"; export { default as LayoutRouter } from "next/dist/client/components/layout-router.js"; export { default as RenderFromTemplateContext } from "next/dist/client/components/render-from-template-context.js"; +export { default as GlobalError } from "next/dist/client/components/error-boundary.js"; export { staticGenerationAsyncStorage } from "next/dist/esm/client/components/static-generation-async-storage.js"; export { requestAsyncStorage } from "next/dist/esm/client/components/request-async-storage.js"; import * as serverHooks from "next/dist/esm/client/components/hooks-server-context.js"; diff --git a/crates/next-dev/tests/package.json b/crates/next-dev/tests/package.json index 3a8a7e67155ff..8132728c4f5ea 100644 --- a/crates/next-dev/tests/package.json +++ b/crates/next-dev/tests/package.json @@ -3,7 +3,7 @@ "devDependencies": { "@turbo/pack-test-harness": "*", "autoprefixer": "^10.4.13", - "next": "13.0.1", + "next": "13.0.8-canary.2", "postcss": "^8.4.20", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 55a4257da9c4f..0c894543837a6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,7 +125,7 @@ importers: specifiers: '@turbo/pack-test-harness': '*' autoprefixer: ^10.4.13 - next: 13.0.1 + next: 13.0.8-canary.2 postcss: ^8.4.20 react: ^18.2.0 react-dom: ^18.2.0 @@ -135,7 +135,7 @@ importers: devDependencies: '@turbo/pack-test-harness': link:../test-harness autoprefixer: 10.4.13_postcss@8.4.20 - next: 13.0.1_biqbaboplfbrettd7655fr4n2y + next: 13.0.8-canary.2_biqbaboplfbrettd7655fr4n2y postcss: 8.4.20 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -1476,10 +1476,6 @@ packages: '@napi-rs/simple-git-win32-x64-msvc': 0.1.8 dev: false - /@next/env/13.0.1: - resolution: {integrity: sha512-gK60YoFae3s8qi5UgIzbvxOhsh5gKyEaiKH5+kLBUYXLlrPyWJR2xKBj2WqvHkO7wDX7/Hed3DAqjSpU4ijIvQ==} - dev: true - /@next/env/13.0.3: resolution: {integrity: sha512-/4WzeG61Ot/PxsghXkSqQJ6UohFfwXoZ3dtsypmR9EBP+OIax9JRq0trq8Z/LCT9Aq4JbihVkaazRWguORjTAw==} dev: false @@ -1487,6 +1483,10 @@ packages: /@next/env/13.0.6: resolution: {integrity: sha512-yceT6DCHKqPRS1cAm8DHvDvK74DLIkDQdm5iV+GnIts8h0QbdHvkUIkdOvQoOODgpr6018skbmSQp12z5OWIQQ==} + /@next/env/13.0.8-canary.2: + resolution: {integrity: sha512-AL/qgwt7uwsauCWZdX3HsEanNCmv/kCY+0p3Av9q++6uSDRauZ6/nofn0NvxRqi2zjmQXZcVTiZbJJLA7aucnQ==} + dev: true + /@next/eslint-plugin-next/12.3.1: resolution: {integrity: sha512-sw+lTf6r6P0j+g/n9y4qdWWI2syPqZx+uc0+B/fRENqfR3KpSid6MIKqc9gNwGhJASazEQ5b3w8h4cAET213jw==} dependencies: @@ -1511,15 +1511,6 @@ packages: react-refresh: 0.12.0 dev: false - /@next/swc-android-arm-eabi/13.0.1: - resolution: {integrity: sha512-M28QSbohZlNXNn//HY6lV2T3YaMzG58Jwr0YwOdVmOQv6i+7lu6xe3GqQu4kdqInqhLrBXnL+nabFuGTVSHtTg==} - engines: {node: '>= 10'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - /@next/swc-android-arm-eabi/13.0.3: resolution: {integrity: sha512-uxfUoj65CdFc1gX2q7GtBX3DhKv9Kn343LMqGNvXyuTpYTGMmIiVY7b9yF8oLWRV0gVKqhZBZifUmoPE8SJU6Q==} engines: {node: '>= 10'} @@ -1537,10 +1528,10 @@ packages: requiresBuild: true optional: true - /@next/swc-android-arm64/13.0.1: - resolution: {integrity: sha512-szmO/i6GoHcPXcbhUKhwBMETWHNXH3ITz9wfxwOOFBNKdDU8pjKsHL88lg28aOiQYZSU1sxu1v1p9KY5kJIZCg==} + /@next/swc-android-arm-eabi/13.0.8-canary.2: + resolution: {integrity: sha512-L0HoZ8XTD+zFW1E7UwQY0iaugy/t49QVXwWwUZYJ601+5puhuvgvRyAz6qY8ByNd2dGXCsCEqEsT77Ns6Cq5hQ==} engines: {node: '>= 10'} - cpu: [arm64] + cpu: [arm] os: [android] requiresBuild: true dev: true @@ -1563,11 +1554,11 @@ packages: requiresBuild: true optional: true - /@next/swc-darwin-arm64/13.0.1: - resolution: {integrity: sha512-O1RxCaiDNOjGZmdAp6SQoHUITt9aVDQXoR3lZ/TloI/NKRAyAV4u0KUUofK+KaZeHOmVTnPUaQuCyZSc3i1x5Q==} + /@next/swc-android-arm64/13.0.8-canary.2: + resolution: {integrity: sha512-98vkDyWvARLWLbdjq34NMm6lqhqoy21JZSZdklxoQ7ZffmQmTcPgIPhvYehq+05hf+5JBkhMGkd496k0bMsBjw==} engines: {node: '>= 10'} cpu: [arm64] - os: [darwin] + os: [android] requiresBuild: true dev: true optional: true @@ -1589,10 +1580,10 @@ packages: requiresBuild: true optional: true - /@next/swc-darwin-x64/13.0.1: - resolution: {integrity: sha512-8E6BY/VO+QqQkthhoWgB8mJMw1NcN9Vhl2OwEwxv8jy2r3zjeU+WNRxz4y8RLbcY0R1h+vHlXuP0mLnuac84tQ==} + /@next/swc-darwin-arm64/13.0.8-canary.2: + resolution: {integrity: sha512-VvzrT2DOgst5e0YpG2VfMvOqYf3eUAuHSdBmktxA8l27LKHjNzSZ3t017MmibQtiErkf7vQHvP93riZWE/7I/Q==} engines: {node: '>= 10'} - cpu: [x64] + cpu: [arm64] os: [darwin] requiresBuild: true dev: true @@ -1615,11 +1606,11 @@ packages: requiresBuild: true optional: true - /@next/swc-freebsd-x64/13.0.1: - resolution: {integrity: sha512-ocwoOxm2KVwF50RyoAT+2RQPLlkyoF7sAqzMUVgj+S6+DTkY3iwH+Zpo0XAk2pnqT9qguOrKnEpq9EIx//+K7Q==} + /@next/swc-darwin-x64/13.0.8-canary.2: + resolution: {integrity: sha512-yRN+26jOrXFgVeY3kX5SXnY4Dg7t3JQCFBFiKVsRaerF0aDyrfsF751ujldRGJG1wLHhN5FR1ulnWZ1d3drE7w==} engines: {node: '>= 10'} cpu: [x64] - os: [freebsd] + os: [darwin] requiresBuild: true dev: true optional: true @@ -1641,11 +1632,11 @@ packages: requiresBuild: true optional: true - /@next/swc-linux-arm-gnueabihf/13.0.1: - resolution: {integrity: sha512-yO7e3zITfGol/N6lPQnmIRi0WyuILBMXrvH6EdmWzzqMDJFfTCII6l+B6gMO5WVDCTQUGQlQRNZ7sFqWR4I71g==} + /@next/swc-freebsd-x64/13.0.8-canary.2: + resolution: {integrity: sha512-HxFxdO+H7v1++p/b4kv8OKcrGO9lidBIrUnCgTCuxrSufOsfCJAi9bo8qE+t4zmYj9i16rw/OC+YC0Dn4L0Uvw==} engines: {node: '>= 10'} - cpu: [arm] - os: [linux] + cpu: [x64] + os: [freebsd] requiresBuild: true dev: true optional: true @@ -1667,10 +1658,10 @@ packages: requiresBuild: true optional: true - /@next/swc-linux-arm64-gnu/13.0.1: - resolution: {integrity: sha512-OEs6WDPDI8RyM8SjOqTDMqMBfOlU97VnW6ZMXUvzUTyH0K9c7NF+cn7UMu+I4tKFN0uJ9WQs/6TYaFBGkgoVVA==} + /@next/swc-linux-arm-gnueabihf/13.0.8-canary.2: + resolution: {integrity: sha512-l9aY0mkCxzYJud2iZ20ZG6urSLUgcSpUk1GJ15jdlctzT7XEVU5DUElxPhjZMICO0s337Nt2kenlss71Aiw8Zg==} engines: {node: '>= 10'} - cpu: [arm64] + cpu: [arm] os: [linux] requiresBuild: true dev: true @@ -1693,8 +1684,8 @@ packages: requiresBuild: true optional: true - /@next/swc-linux-arm64-musl/13.0.1: - resolution: {integrity: sha512-y5ypFK0Y3urZSFoQxbtDqvKsBx026sz+Fm+xHlPWlGHNZrbs3Q812iONjcZTo09QwRMk5X86iMWBRxV18xMhaw==} + /@next/swc-linux-arm64-gnu/13.0.8-canary.2: + resolution: {integrity: sha512-v+1+woCfgMW6c7gw6U/oSl4zkdbSL5I7hBg7Yt/2jyXa9Xrk+qxsU4GPVA5RStX9S6X1aDK/cHX/IncKUq7XTQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1719,10 +1710,10 @@ packages: requiresBuild: true optional: true - /@next/swc-linux-x64-gnu/13.0.1: - resolution: {integrity: sha512-XDIHEE6SU8VCF+dUVntD6PDv6RK31N0forx9kucZBYirbe8vCZ+Yx8hYgvtIaGrTcWtGxibxmND0pIuHDq8H5g==} + /@next/swc-linux-arm64-musl/13.0.8-canary.2: + resolution: {integrity: sha512-+CmK4LVZ+RYgLHeN7AQJsES+YLMhr29vWpmyPrvnIAybq839L2iwcP0TzjiYNdbGVHxUYkbJ7Q+2F7J3Tdihpg==} engines: {node: '>= 10'} - cpu: [x64] + cpu: [arm64] os: [linux] requiresBuild: true dev: true @@ -1745,8 +1736,8 @@ packages: requiresBuild: true optional: true - /@next/swc-linux-x64-musl/13.0.1: - resolution: {integrity: sha512-yxIOuuz5EOx0F1FDtsyzaLgnDym0Ysxv8CWeJyDTKKmt9BVyITg6q/cD+RP9bEkT1TQi+PYXIMATSz675Q82xw==} + /@next/swc-linux-x64-gnu/13.0.8-canary.2: + resolution: {integrity: sha512-qX+HkP3X4YHElZvF9hdwVyR5tOjDhbntH/kxh035FwzuDSQZxdLs1pzK3+czHOTBYpdvY4m8TFAK6QCYngi5jw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1771,11 +1762,11 @@ packages: requiresBuild: true optional: true - /@next/swc-win32-arm64-msvc/13.0.1: - resolution: {integrity: sha512-+ucLe2qgQzP+FM94jD4ns6LDGyMFaX9k3lVHqu/tsQCy2giMymbport4y4p77mYcXEMlDaHMzlHgOQyHRniWFA==} + /@next/swc-linux-x64-musl/13.0.8-canary.2: + resolution: {integrity: sha512-fWNi2GcScjKQILD1Z2tjt0vKrsq755ov7gB5sx9AsQksAHzBQw4aJS+siYg1O9vnBnwzlThyeiAnqCFE4ZGCAA==} engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] + cpu: [x64] + os: [linux] requiresBuild: true dev: true optional: true @@ -1797,10 +1788,10 @@ packages: requiresBuild: true optional: true - /@next/swc-win32-ia32-msvc/13.0.1: - resolution: {integrity: sha512-Krr/qGN7OB35oZuvMAZKoXDt2IapynIWLh5A5rz6AODb7f/ZJqyAuZSK12vOa2zKdobS36Qm4IlxxBqn9c00MA==} + /@next/swc-win32-arm64-msvc/13.0.8-canary.2: + resolution: {integrity: sha512-A9NIhEn7gnnr3sOCQOcWOF8AkwA2MEUivJnXa8zYCT4iA6yBp9g8zxF02ikUtNG1V/FnT14fCgPZBh0t4fzGMQ==} engines: {node: '>= 10'} - cpu: [ia32] + cpu: [arm64] os: [win32] requiresBuild: true dev: true @@ -1823,10 +1814,10 @@ packages: requiresBuild: true optional: true - /@next/swc-win32-x64-msvc/13.0.1: - resolution: {integrity: sha512-t/0G33t/6VGWZUGCOT7rG42qqvf/x+MrFp1CU+8CN6PrjSSL57R5bqkXfubV9t4eCEnUxVP+5Hn3MoEXEebtEw==} + /@next/swc-win32-ia32-msvc/13.0.8-canary.2: + resolution: {integrity: sha512-IfrGEhTKI9wBbf3FxzklVDEziHSN3t6eDY1UVlst+JRMcaJkQb5DsNrFRXXXVGgbl7WTvlpAkyuuHmCOVZMf5g==} engines: {node: '>= 10'} - cpu: [x64] + cpu: [ia32] os: [win32] requiresBuild: true dev: true @@ -1849,6 +1840,15 @@ packages: requiresBuild: true optional: true + /@next/swc-win32-x64-msvc/13.0.8-canary.2: + resolution: {integrity: sha512-ymZLJDSYDSquhpUl5lbJ4ZXsoPH2okx/rI4rpHaM+MvP45C8HXllgs10N17kMxwTGPVNI2Lsca8DC34CcbuMsQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2124,7 +2124,8 @@ packages: /@swc/helpers/0.4.11: resolution: {integrity: sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==} dependencies: - tslib: 2.4.0 + tslib: 2.4.1 + dev: false /@swc/helpers/0.4.14: resolution: {integrity: sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==} @@ -3360,6 +3361,7 @@ packages: /caniuse-lite/1.0.30001431: resolution: {integrity: sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==} + dev: false /caniuse-lite/1.0.30001439: resolution: {integrity: sha512-1MgUzEkoMO6gKfXflStpYgZDlFM7M/ck/bgfVCACO5vnAf0fXoNVHdWtqGU+MYca+4bL9Z5bpOVmR33cWW9G2A==} @@ -8536,51 +8538,6 @@ packages: react-dom: 18.2.0_react@18.2.0 dev: false - /next/13.0.1_biqbaboplfbrettd7655fr4n2y: - resolution: {integrity: sha512-ErCNBPIeZMKFn6hX+ZBSlqZVgJIeitEqhGTuQUNmYXJ07/A71DZ7AJI8eyHYUdBb686LUpV1/oBdTq9RpzRVPg==} - engines: {node: '>=14.6.0'} - hasBin: true - peerDependencies: - fibers: '>= 3.1.0' - node-sass: ^6.0.0 || ^7.0.0 - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - peerDependenciesMeta: - fibers: - optional: true - node-sass: - optional: true - sass: - optional: true - dependencies: - '@next/env': 13.0.1 - '@swc/helpers': 0.4.11 - caniuse-lite: 1.0.30001431 - postcss: 8.4.14 - react: 18.2.0 - react-dom: 18.2.0_react@18.2.0 - styled-jsx: 5.1.0_react@18.2.0 - use-sync-external-store: 1.2.0_react@18.2.0 - optionalDependencies: - '@next/swc-android-arm-eabi': 13.0.1 - '@next/swc-android-arm64': 13.0.1 - '@next/swc-darwin-arm64': 13.0.1 - '@next/swc-darwin-x64': 13.0.1 - '@next/swc-freebsd-x64': 13.0.1 - '@next/swc-linux-arm-gnueabihf': 13.0.1 - '@next/swc-linux-arm64-gnu': 13.0.1 - '@next/swc-linux-arm64-musl': 13.0.1 - '@next/swc-linux-x64-gnu': 13.0.1 - '@next/swc-linux-x64-musl': 13.0.1 - '@next/swc-win32-arm64-msvc': 13.0.1 - '@next/swc-win32-ia32-msvc': 13.0.1 - '@next/swc-win32-x64-msvc': 13.0.1 - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-macros - dev: true - /next/13.0.3_672uxklweod7ene3nqtsh262ca: resolution: {integrity: sha512-rFQeepcenRxKzeKlh1CsmEnxsJwhIERtbUjmYnKZyDInZsU06lvaGw5DT44rlNp1Rv2MT/e9vffZ8vK+ytwXHA==} engines: {node: '>=14.6.0'} @@ -8669,6 +8626,50 @@ packages: - '@babel/core' - babel-plugin-macros + /next/13.0.8-canary.2_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-3HMCYnM2kqNz7FgLGnpbkWBvm1o9stNoYIjSfDVtlIk1slDFkJYuekF8L+R0MTl4siRdA7VoEjb/jRyXWjFtiA==} + engines: {node: '>=14.6.0'} + hasBin: true + peerDependencies: + fibers: '>= 3.1.0' + node-sass: ^6.0.0 || ^7.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 + sass: ^1.3.0 + peerDependenciesMeta: + fibers: + optional: true + node-sass: + optional: true + sass: + optional: true + dependencies: + '@next/env': 13.0.8-canary.2 + '@swc/helpers': 0.4.14 + caniuse-lite: 1.0.30001439 + postcss: 8.4.14 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + styled-jsx: 5.1.1_react@18.2.0 + optionalDependencies: + '@next/swc-android-arm-eabi': 13.0.8-canary.2 + '@next/swc-android-arm64': 13.0.8-canary.2 + '@next/swc-darwin-arm64': 13.0.8-canary.2 + '@next/swc-darwin-x64': 13.0.8-canary.2 + '@next/swc-freebsd-x64': 13.0.8-canary.2 + '@next/swc-linux-arm-gnueabihf': 13.0.8-canary.2 + '@next/swc-linux-arm64-gnu': 13.0.8-canary.2 + '@next/swc-linux-arm64-musl': 13.0.8-canary.2 + '@next/swc-linux-x64-gnu': 13.0.8-canary.2 + '@next/swc-linux-x64-musl': 13.0.8-canary.2 + '@next/swc-win32-arm64-msvc': 13.0.8-canary.2 + '@next/swc-win32-ia32-msvc': 13.0.8-canary.2 + '@next/swc-win32-x64-msvc': 13.0.8-canary.2 + transitivePeerDependencies: + - '@babel/core' + - babel-plugin-macros + dev: true + /nextra-theme-docs/2.0.1_ogpkrxaz2lg6nectum6dl66tn4: resolution: {integrity: sha512-vrxSQjfG5hcWXd0foVUgRu1T9rD+dQdVnKzJhpEG+ncAIYTT/o7GajvYUEPPZMYvvZwehmNIUhSTDN9unnVsxw==} peerDependencies: @@ -10584,6 +10585,23 @@ packages: react: 18.2.0 dev: false + /styled-jsx/5.1.1_react@18.2.0: + resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} + engines: {node: '>= 12.0.0'} + peerDependencies: + '@babel/core': '*' + babel-plugin-macros: '*' + react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' + peerDependenciesMeta: + '@babel/core': + optional: true + babel-plugin-macros: + optional: true + dependencies: + client-only: 0.0.1 + react: 18.2.0 + dev: true + /stylis/4.1.2: resolution: {integrity: sha512-Nn2CCrG2ZaFziDxaZPN43CXqn+j7tcdjPFCkRBkFue8QYXC2HdEwnw5TCBo4yQZ2WxKYeSi0fdoOrtEqgDrXbA==} dev: false @@ -11086,6 +11104,7 @@ packages: /tslib/2.4.0: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} + dev: false /tslib/2.4.1: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} @@ -11428,6 +11447,7 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: react: 18.2.0 + dev: false /use/3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} From 23f6cc3079242e316351e69edb86492d562cf260 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 21 Dec 2022 17:35:23 +0100 Subject: [PATCH 2/3] update for changes in app manifests --- crates/next-core/js/package.json | 2 +- .../next-core/js/src/entry/app-renderer.tsx | 15 +++++++------- pnpm-lock.yaml | 20 ++----------------- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/crates/next-core/js/package.json b/crates/next-core/js/package.json index 70d19d94d9e1a..092f7c9306efe 100644 --- a/crates/next-core/js/package.json +++ b/crates/next-core/js/package.json @@ -12,7 +12,7 @@ "@vercel/turbopack-runtime": "latest", "anser": "^2.1.1", "css.escape": "^1.5.1", - "next": "^13.0.6", + "next": "^13.0.8-canary.2", "platform": "1.3.6", "react-dom": "^18.2.0", "react": "^18.2.0", diff --git a/crates/next-core/js/src/entry/app-renderer.tsx b/crates/next-core/js/src/entry/app-renderer.tsx index 4cffd63707a3b..d7844e257405c 100644 --- a/crates/next-core/js/src/entry/app-renderer.tsx +++ b/crates/next-core/js/src/entry/app-renderer.tsx @@ -112,7 +112,7 @@ async function runOperation(renderData: RenderData) { const pageModule = pageItem.page!.module; const Page = pageModule.default; let tree: LoaderTree = ["", {}, { page: [() => Page, "page.js"] }]; - layoutInfoChunks["page.js"] = pageItem.page!.chunks; + layoutInfoChunks["page"] = pageItem.page!.chunks; for (let i = LAYOUT_INFO.length - 2; i >= 0; i--) { const info = LAYOUT_INFO[i]; const components: ComponentsType = {}; @@ -122,7 +122,7 @@ async function runOperation(renderData: RenderData) { } const k = key as FileType; components[k] = [() => info[k]!.module.default, `${k}${i}.js`]; - layoutInfoChunks[`${k}${i}.js`] = info[k]!.chunks; + layoutInfoChunks[`${k}${i}`] = info[k]!.chunks; } tree = [info.segment, { children: tree }, components]; } @@ -145,8 +145,8 @@ async function runOperation(renderData: RenderData) { if (name === "__ssr_module_mapping__") { return manifest; } - if (name === "__client_css_manifest__") { - return {}; + if (name === "__entry_css_files__") { + return __entry_css_files__; } return new Proxy({}, proxyMethodsForModule(name as string, css)); }, @@ -154,14 +154,15 @@ async function runOperation(renderData: RenderData) { }; const manifest: FlightManifest = new Proxy({} as any, proxyMethods(false)); const serverCSSManifest: FlightCSSManifest = {}; - serverCSSManifest.__entry_css__ = {}; + const __entry_css_files__: FlightManifest["__entry_css_files__"] = {}; for (const [key, chunks] of Object.entries(layoutInfoChunks)) { const cssChunks = chunks.filter((path) => path.endsWith(".css")); - serverCSSManifest[key] = cssChunks.map((chunk) => + serverCSSManifest[`${key}.js`] = cssChunks.map((chunk) => JSON.stringify([chunk, [chunk]]) ); + __entry_css_files__[key] = cssChunks; } - serverCSSManifest.__entry_css__ = { + serverCSSManifest.__entry_css_mods__ = { page: serverCSSManifest["page.js"], }; const req: IncomingMessage = { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0c894543837a6..3e0d7766c9113 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -87,7 +87,7 @@ importers: anser: ^2.1.1 css.escape: ^1.5.1 find-up: ^6.3.0 - next: ^13.0.6 + next: ^13.0.8-canary.2 platform: 1.3.6 react: ^18.2.0 react-dom: ^18.2.0 @@ -98,7 +98,7 @@ importers: '@vercel/turbopack-runtime': link:../../turbopack-ecmascript/js anser: 2.1.1 css.escape: 1.5.1 - next: 13.0.6_biqbaboplfbrettd7655fr4n2y + next: 13.0.8-canary.2_biqbaboplfbrettd7655fr4n2y platform: 1.3.6 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -1485,7 +1485,6 @@ packages: /@next/env/13.0.8-canary.2: resolution: {integrity: sha512-AL/qgwt7uwsauCWZdX3HsEanNCmv/kCY+0p3Av9q++6uSDRauZ6/nofn0NvxRqi2zjmQXZcVTiZbJJLA7aucnQ==} - dev: true /@next/eslint-plugin-next/12.3.1: resolution: {integrity: sha512-sw+lTf6r6P0j+g/n9y4qdWWI2syPqZx+uc0+B/fRENqfR3KpSid6MIKqc9gNwGhJASazEQ5b3w8h4cAET213jw==} @@ -1534,7 +1533,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: true optional: true /@next/swc-android-arm64/13.0.3: @@ -1560,7 +1558,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: true optional: true /@next/swc-darwin-arm64/13.0.3: @@ -1586,7 +1583,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@next/swc-darwin-x64/13.0.3: @@ -1612,7 +1608,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@next/swc-freebsd-x64/13.0.3: @@ -1638,7 +1633,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: true optional: true /@next/swc-linux-arm-gnueabihf/13.0.3: @@ -1664,7 +1658,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@next/swc-linux-arm64-gnu/13.0.3: @@ -1690,7 +1683,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@next/swc-linux-arm64-musl/13.0.3: @@ -1716,7 +1708,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@next/swc-linux-x64-gnu/13.0.3: @@ -1742,7 +1733,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@next/swc-linux-x64-musl/13.0.3: @@ -1768,7 +1758,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@next/swc-win32-arm64-msvc/13.0.3: @@ -1794,7 +1783,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@next/swc-win32-ia32-msvc/13.0.3: @@ -1820,7 +1808,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@next/swc-win32-x64-msvc/13.0.3: @@ -1846,7 +1833,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@nodelib/fs.scandir/2.1.5: @@ -8668,7 +8654,6 @@ packages: transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - dev: true /nextra-theme-docs/2.0.1_ogpkrxaz2lg6nectum6dl66tn4: resolution: {integrity: sha512-vrxSQjfG5hcWXd0foVUgRu1T9rD+dQdVnKzJhpEG+ncAIYTT/o7GajvYUEPPZMYvvZwehmNIUhSTDN9unnVsxw==} @@ -10600,7 +10585,6 @@ packages: dependencies: client-only: 0.0.1 react: 18.2.0 - dev: true /stylis/4.1.2: resolution: {integrity: sha512-Nn2CCrG2ZaFziDxaZPN43CXqn+j7tcdjPFCkRBkFue8QYXC2HdEwnw5TCBo4yQZ2WxKYeSi0fdoOrtEqgDrXbA==} From d67f91dd8c899cb5f1e8c903d7653763099d7590 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 21 Dec 2022 19:53:57 +0100 Subject: [PATCH 3/3] update next in benchmarks --- crates/next-dev/benches/bundlers/turbopack/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/next-dev/benches/bundlers/turbopack/mod.rs b/crates/next-dev/benches/bundlers/turbopack/mod.rs index 375bf0886da4e..06a2550e2e468 100644 --- a/crates/next-dev/benches/bundlers/turbopack/mod.rs +++ b/crates/next-dev/benches/bundlers/turbopack/mod.rs @@ -49,7 +49,7 @@ impl Bundler for Turbopack { npm::install( install_dir, &[ - NpmPackage::new("next", "13.0.3"), + NpmPackage::new("next", "13.0.8-canary.2"), // Dependency on this is inserted by swc's preset_env NpmPackage::new("@swc/helpers", "^0.4.11"), ],