From d4069559f2134d6c0976d902beebd70e35bde0cb Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Mon, 11 Mar 2024 23:23:31 +0000 Subject: [PATCH 1/4] v14.2.0-canary.16 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/eslint-config-next/package.json | 4 ++-- packages/eslint-plugin-next/package.json | 2 +- packages/font/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-codemod/package.json | 2 +- packages/next-env/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-storybook/package.json | 2 +- packages/next-polyfill-module/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next-swc/package.json | 2 +- packages/next/package.json | 12 ++++++------ packages/react-refresh-utils/package.json | 2 +- packages/third-parties/package.json | 4 ++-- pnpm-lock.yaml | 14 +++++++------- 17 files changed, 30 insertions(+), 30 deletions(-) diff --git a/lerna.json b/lerna.json index 056367a975a83..8c3ff8dead33b 100644 --- a/lerna.json +++ b/lerna.json @@ -16,5 +16,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "14.2.0-canary.15" + "version": "14.2.0-canary.16" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index a38d3208b3c02..6f57962f418bb 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "keywords": [ "react", "next", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 0f2ee585d2dc3..c932f299508e0 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "description": "ESLint configuration used by Next.js.", "main": "index.js", "license": "MIT", @@ -10,7 +10,7 @@ }, "homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config", "dependencies": { - "@next/eslint-plugin-next": "14.2.0-canary.15", + "@next/eslint-plugin-next": "14.2.0-canary.16", "@rushstack/eslint-patch": "^1.3.3", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.1", "eslint-import-resolver-node": "^0.3.6", diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 30300fb9d6986..1245490530577 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "description": "ESLint plugin for Next.js.", "main": "dist/index.js", "license": "MIT", diff --git a/packages/font/package.json b/packages/font/package.json index 7121f992701b1..d494a9d58d359 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@next/font", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 934a5dddb437b..e276b1c99d4b0 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index 74babd6142372..31bafc7f6bb9f 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index 05d9d6a1140c1..3cf4f301b82e7 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 74fc5b7fdab0c..ae2658be30d81 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index c08a86f502345..08e2f283eab0e 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index 030ce30d233e8..24279457473be 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 50a7870743d45..6db13166dc96f 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index 954968d08556c..117cddba88eb4 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "private": true, "scripts": { "clean": "node ../../scripts/rm.mjs native", diff --git a/packages/next/package.json b/packages/next/package.json index 48bfc9048fc1f..437b041dc61a5 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -92,7 +92,7 @@ ] }, "dependencies": { - "@next/env": "14.2.0-canary.15", + "@next/env": "14.2.0-canary.16", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", @@ -145,10 +145,10 @@ "@jest/types": "29.5.0", "@mswjs/interceptors": "0.23.0", "@napi-rs/triples": "1.2.0", - "@next/polyfill-module": "14.2.0-canary.15", - "@next/polyfill-nomodule": "14.2.0-canary.15", - "@next/react-refresh-utils": "14.2.0-canary.15", - "@next/swc": "14.2.0-canary.15", + "@next/polyfill-module": "14.2.0-canary.16", + "@next/polyfill-nomodule": "14.2.0-canary.16", + "@next/react-refresh-utils": "14.2.0-canary.16", + "@next/swc": "14.2.0-canary.16", "@opentelemetry/api": "1.6.0", "@playwright/test": "1.41.2", "@taskr/clear": "1.1.0", diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index f69c8a857ba8a..5b7437930ee3b 100644 --- a/packages/react-refresh-utils/package.json +++ b/packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-refresh-utils", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "description": "An experimental package providing utilities for React Refresh.", "repository": { "url": "vercel/next.js", diff --git a/packages/third-parties/package.json b/packages/third-parties/package.json index 46af6f0532ae8..2ab6bde23eb95 100644 --- a/packages/third-parties/package.json +++ b/packages/third-parties/package.json @@ -1,6 +1,6 @@ { "name": "@next/third-parties", - "version": "14.2.0-canary.15", + "version": "14.2.0-canary.16", "repository": { "url": "vercel/next.js", "directory": "packages/third-parties" @@ -26,7 +26,7 @@ "third-party-capital": "1.0.20" }, "devDependencies": { - "next": "14.2.0-canary.15", + "next": "14.2.0-canary.16", "outdent": "0.8.0", "prettier": "2.5.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9863abb551d1b..373ccfc5e343c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -747,7 +747,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 14.2.0-canary.15 + specifier: 14.2.0-canary.16 version: link:../eslint-plugin-next '@rushstack/eslint-patch': specifier: ^1.3.3 @@ -809,7 +809,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 14.2.0-canary.15 + specifier: 14.2.0-canary.16 version: link:../next-env '@swc/helpers': specifier: 0.5.5 @@ -930,16 +930,16 @@ importers: specifier: 1.2.0 version: 1.2.0 '@next/polyfill-module': - specifier: 14.2.0-canary.15 + specifier: 14.2.0-canary.16 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 14.2.0-canary.15 + specifier: 14.2.0-canary.16 version: link:../next-polyfill-nomodule '@next/react-refresh-utils': - specifier: 14.2.0-canary.15 + specifier: 14.2.0-canary.16 version: link:../react-refresh-utils '@next/swc': - specifier: 14.2.0-canary.15 + specifier: 14.2.0-canary.16 version: link:../next-swc '@opentelemetry/api': specifier: 1.6.0 @@ -1554,7 +1554,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 14.2.0-canary.15 + specifier: 14.2.0-canary.16 version: link:../next outdent: specifier: 0.8.0 From 7b5d81c0c9f2add3919626430ae648309368019c Mon Sep 17 00:00:00 2001 From: Sam Ko Date: Mon, 11 Mar 2024 17:35:54 -0700 Subject: [PATCH 2/4] chore: upgrade turbo to 1.12.5 (#63163) --- .github/workflows/build_and_deploy.yml | 2 +- .github/workflows/build_and_test.yml | 2 +- .github/workflows/build_reusable.yml | 2 +- .github/workflows/code_freeze.yml | 2 +- .github/workflows/pull_request_stats.yml | 2 +- .github/workflows/test_e2e_deploy.yml | 2 +- .github/workflows/trigger_release.yml | 2 +- package.json | 2 +- pnpm-lock.yaml | 46 ++++++++++++------------ 9 files changed, 32 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 850fa9397a828..7f0101e10afa1 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -7,7 +7,7 @@ on: env: NAPI_CLI_VERSION: 2.16.2 - TURBO_VERSION: 1.12.2 + TURBO_VERSION: 1.12.5 NODE_LTS_VERSION: 20 CARGO_PROFILE_RELEASE_LTO: 'true' TURBO_TEAM: 'vercel' diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index d600acfe5b27f..3668499c1f92b 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -8,7 +8,7 @@ on: env: NAPI_CLI_VERSION: 2.14.7 - TURBO_VERSION: 1.12.2 + TURBO_VERSION: 1.12.5 NODE_MAINTENANCE_VERSION: 18 NODE_LTS_VERSION: 20 TEST_CONCURRENCY: 8 diff --git a/.github/workflows/build_reusable.yml b/.github/workflows/build_reusable.yml index fb4e862a58e12..0d48f5403af8a 100644 --- a/.github/workflows/build_reusable.yml +++ b/.github/workflows/build_reusable.yml @@ -52,7 +52,7 @@ on: env: NAPI_CLI_VERSION: 2.14.7 - TURBO_VERSION: 1.12.2 + TURBO_VERSION: 1.12.5 NODE_LTS_VERSION: 20.9.0 TEST_CONCURRENCY: 8 # disable backtrace for test snapshots diff --git a/.github/workflows/code_freeze.yml b/.github/workflows/code_freeze.yml index fa699b6b9aa21..0aaacd58bc3fd 100644 --- a/.github/workflows/code_freeze.yml +++ b/.github/workflows/code_freeze.yml @@ -17,7 +17,7 @@ name: Code Freeze env: NAPI_CLI_VERSION: 2.14.7 - TURBO_VERSION: 1.12.2 + TURBO_VERSION: 1.12.5 NODE_LTS_VERSION: 20 jobs: diff --git a/.github/workflows/pull_request_stats.yml b/.github/workflows/pull_request_stats.yml index 3e657431e42d6..85d9e04378138 100644 --- a/.github/workflows/pull_request_stats.yml +++ b/.github/workflows/pull_request_stats.yml @@ -6,7 +6,7 @@ name: Generate Pull Request Stats env: NAPI_CLI_VERSION: 2.14.7 - TURBO_VERSION: 1.12.2 + TURBO_VERSION: 1.12.5 NODE_LTS_VERSION: 20 TEST_CONCURRENCY: 6 diff --git a/.github/workflows/test_e2e_deploy.yml b/.github/workflows/test_e2e_deploy.yml index 872dbb783f247..8871dacfe0c97 100644 --- a/.github/workflows/test_e2e_deploy.yml +++ b/.github/workflows/test_e2e_deploy.yml @@ -17,7 +17,7 @@ jobs: VERCEL_TEST_TEAM: vtest314-next-e2e-tests DATADOG_API_KEY: ${{ secrets.DATA_DOG_API_KEY }} NAPI_CLI_VERSION: 2.16.2 - TURBO_VERSION: 1.12.2 + TURBO_VERSION: 1.12.5 NODE_LTS_VERSION: 20 CARGO_PROFILE_RELEASE_LTO: 'true' TURBO_TEAM: 'vercel' diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index 106fb4e671a70..099ec5681d88d 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -29,7 +29,7 @@ name: Trigger Release env: NAPI_CLI_VERSION: 2.14.7 - TURBO_VERSION: 1.12.2 + TURBO_VERSION: 1.12.5 NODE_LTS_VERSION: 20 jobs: diff --git a/package.json b/package.json index df8e8b759fbc8..d2660dfade581 100644 --- a/package.json +++ b/package.json @@ -228,7 +228,7 @@ "taskr": "1.1.0", "tree-kill": "1.2.2", "tsec": "0.2.1", - "turbo": "1.12.2", + "turbo": "1.12.5", "typescript": "5.2.2", "unfetch": "4.2.0", "wait-port": "0.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 373ccfc5e343c..c8125438cf5d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -540,8 +540,8 @@ importers: specifier: 0.2.1 version: 0.2.1(@bazel/bazelisk@1.18.0)(typescript@5.2.2) turbo: - specifier: 1.12.2 - version: 1.12.2 + specifier: 1.12.5 + version: 1.12.5 typescript: specifier: 5.2.2 version: 5.2.2 @@ -2202,6 +2202,7 @@ packages: /@babel/plugin-proposal-nullish-coalescing-operator@7.16.7(@babel/core@7.22.5): resolution: {integrity: sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==} engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. peerDependencies: '@babel/core': 7.22.5 dependencies: @@ -2251,6 +2252,7 @@ packages: /@babel/plugin-proposal-optional-chaining@7.16.7(@babel/core@7.22.5): resolution: {integrity: sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==} engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. peerDependencies: '@babel/core': 7.22.5 dependencies: @@ -23997,64 +23999,64 @@ packages: engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} dev: true - /turbo-darwin-64@1.12.2: - resolution: {integrity: sha512-Aq/ePQ5KNx6XGwlZWTVTqpQYfysm1vkwkI6kAYgrX5DjMWn+tUXrSgNx4YNte0F+V4DQ7PtuWX+jRG0h0ZNg0A==} + /turbo-darwin-64@1.12.5: + resolution: {integrity: sha512-0GZ8reftwNQgIQLHkHjHEXTc/Z1NJm+YjsrBP+qhM/7yIZ3TEy9gJhuogDt2U0xIWwFgisTyzbtU7xNaQydtoA==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.12.2: - resolution: {integrity: sha512-wTr+dqkwJo/eXE+4SPTSeNBKyyfQJhI6I9sKVlCSBmtaNEqoGNgdVzgMUdqrg9AIFzLIiKO+zhfskNaSWpVFow==} + /turbo-darwin-arm64@1.12.5: + resolution: {integrity: sha512-8WpOLNNzvH6kohQOjihD+gaWL+ZFNfjvBwhOF0rjEzvW+YR3Pa7KjhulrjWyeN2yMFqAPubTbZIGOz1EVXLuQA==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.12.2: - resolution: {integrity: sha512-BggBKrLojGarDaa2zBo+kUR3fmjpd6bLA8Unm3Aa2oJw0UvEi3Brd+w9lNsPZHXXQYBUzNUY2gCdxf3RteWb0g==} + /turbo-linux-64@1.12.5: + resolution: {integrity: sha512-INit73+bNUpwqGZCxgXCR3I+cQsdkQ3/LkfkgSOibkpg+oGqxJRzeXw3sp990d7SCoE8QOcs3iw+PtiFX/LDAA==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.12.2: - resolution: {integrity: sha512-v/apSRvVuwYjq1D9MJFsHv2EpGd1S4VoSdZvVfW6FaM06L8CFZa92urNR1svdGYN28YVKwK9Ikc9qudC6t/d5A==} + /turbo-linux-arm64@1.12.5: + resolution: {integrity: sha512-6lkRBvxtI/GQdGtaAec9LvVQUoRw6nXFp0kM+Eu+5PbZqq7yn6cMkgDJLI08zdeui36yXhone8XGI8pHg8bpUQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.12.2: - resolution: {integrity: sha512-3uDdwXcRGkgopYFdPDpxQiuQjfQ12Fxq0fhj+iGymav0eWA4W4wzYwSdlUp6rT22qOBIzaEsrIspRwx1DsMkNg==} + /turbo-windows-64@1.12.5: + resolution: {integrity: sha512-gQYbOhZg5Ww0bQ/bC0w/4W6yQRwBumUUnkB+QPo15VznwxZe2a7bo6JM+9Xy9dKLa/kn+p7zTqme4OEp6M3/Yg==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.12.2: - resolution: {integrity: sha512-zNIHnwtQfJSjFi7movwhPQh2rfrcKZ7Xv609EN1yX0gEp9GxooCUi2yNnBQ8wTqFjioA2M5hZtGJQ0RrKaEm/Q==} + /turbo-windows-arm64@1.12.5: + resolution: {integrity: sha512-auvhZ9FrhnvQ4mgBlY9O68MT4dIfprYGvd2uPICba/mHUZZvVy5SGgbHJ0KbMwaJfnnFoPgLJO6M+3N2gDprKw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.12.2: - resolution: {integrity: sha512-BcoQjBZ+LJCMdjzWhzQflOinUjek28rWXj07aaaAQ8T3Ehs0JFSjIsXOm4qIbo52G4xk3gFVcUtJhh/QRADl7g==} + /turbo@1.12.5: + resolution: {integrity: sha512-FATU5EnhrYG8RvQJYFJnDd18DpccDjyvd53hggw9T9JEg9BhWtIEoeaKtBjYbpXwOVrJQMDdXcIB4f2nD3QPPg==} hasBin: true optionalDependencies: - turbo-darwin-64: 1.12.2 - turbo-darwin-arm64: 1.12.2 - turbo-linux-64: 1.12.2 - turbo-linux-arm64: 1.12.2 - turbo-windows-64: 1.12.2 - turbo-windows-arm64: 1.12.2 + turbo-darwin-64: 1.12.5 + turbo-darwin-arm64: 1.12.5 + turbo-linux-64: 1.12.5 + turbo-linux-arm64: 1.12.5 + turbo-windows-64: 1.12.5 + turbo-windows-arm64: 1.12.5 dev: true /tweetnacl@0.14.5: From 3f1ae543199c2f0f42d7d23e8d7fa991e4937c77 Mon Sep 17 00:00:00 2001 From: Sam Ko Date: Mon, 11 Mar 2024 17:36:11 -0700 Subject: [PATCH 3/4] Revert "fix: permissions in with-docker example" (#63165) Reverts vercel/next.js#63134 Closes NEXT-2783 --- examples/with-docker/Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/with-docker/Dockerfile b/examples/with-docker/Dockerfile index 165be9df7fc81..90f03ede15809 100644 --- a/examples/with-docker/Dockerfile +++ b/examples/with-docker/Dockerfile @@ -22,8 +22,6 @@ WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -RUN mkdir -p public - # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry # Uncomment the following line in case you want to disable telemetry during the build. @@ -47,17 +45,17 @@ ENV NODE_ENV production RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs +COPY --from=builder /app/public ./public + +# Set the correct permission for prerender cache +RUN mkdir .next +RUN chown nextjs:nodejs .next + # Automatically leverage output traces to reduce image size # https://nextjs.org/docs/advanced-features/output-file-tracing -COPY --from=builder --chown=nextjs:nodejs /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static -# Set the correct permission for prerender cache -RUN mkdir -p .next/cache -RUN chown -R nextjs:nodejs .next -RUN chmod -R 777 .next/cache - USER nextjs EXPOSE 3000 From 7de0f478c6350603f87355f4c6d2450e2a32acdd Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 12 Mar 2024 13:51:35 +0100 Subject: [PATCH 4/4] Ensure PromiseLikeOfReactNode is not included in .d.ts files (#63185) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the compile error on all test runs currently: https://github.com/vercel/next.js/actions/runs/8243077904/job/22543375810?pr=63167#step:27:345 The root cause is that `.d.ts` files automatically include inferred return types automatically, in this case `tsc` included React class component `render()` return types in the `.d.ts` for e.g. error-boundary.tsx / redirect-boundary.tsx. This is a problem because yesterday that return type was changed: https://github.com/DefinitelyTyped/DefinitelyTyped/commit/bf659aefa780a8b61b1636bd0296e0723c96d780#diff-1d64e275d9755825ba[…]520436dbd8e1f1fd9fc66a9 and that change also removes one of the previous types that the `.d.ts` in Next.js automatically included. This PR changes the `render()` return type to be explicit instead of inferred, this makes sure that the `.d.ts` file includes only `: React.ReactNode` instead of the many types of return values allowed. The reason I went with the explicit type instead of e.g. upgrading `@types/react` is that upgrading the types would cause existing applications that use older versions of `@types/react` would break. The current change ensures it works in both cases. Closes NEXT-2787 --- packages/next/src/client/components/error-boundary.tsx | 3 ++- .../components/react-dev-overlay/pages/ErrorBoundary.tsx | 3 ++- packages/next/src/client/components/redirect-boundary.tsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/next/src/client/components/error-boundary.tsx b/packages/next/src/client/components/error-boundary.tsx index 13d87fb40c18e..ad661efaac03c 100644 --- a/packages/next/src/client/components/error-boundary.tsx +++ b/packages/next/src/client/components/error-boundary.tsx @@ -109,7 +109,8 @@ export class ErrorBoundaryHandler extends React.Component< this.setState({ error: null }) } - render() { + // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific the the `@types/react` version. + render(): React.ReactNode { if (this.state.error) { return ( <> diff --git a/packages/next/src/client/components/react-dev-overlay/pages/ErrorBoundary.tsx b/packages/next/src/client/components/react-dev-overlay/pages/ErrorBoundary.tsx index a6400822538ff..3b8e9ef393680 100644 --- a/packages/next/src/client/components/react-dev-overlay/pages/ErrorBoundary.tsx +++ b/packages/next/src/client/components/react-dev-overlay/pages/ErrorBoundary.tsx @@ -30,7 +30,8 @@ export class ErrorBoundary extends React.PureComponent< } } - render() { + // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific the the `@types/react` version. + render(): React.ReactNode { // The component has to be unmounted or else it would continue to error return this.state.error || (this.props.globalOverlay && this.props.isMounted) ? ( diff --git a/packages/next/src/client/components/redirect-boundary.tsx b/packages/next/src/client/components/redirect-boundary.tsx index f0ee6fad318c4..c4530614895ac 100644 --- a/packages/next/src/client/components/redirect-boundary.tsx +++ b/packages/next/src/client/components/redirect-boundary.tsx @@ -58,7 +58,8 @@ export class RedirectErrorBoundary extends React.Component< throw error } - render() { + // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific the the `@types/react` version. + render(): React.ReactNode { const { redirect, redirectType } = this.state if (redirect !== null && redirectType !== null) { return (