Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vercel/next.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v14.1.2
Choose a base ref
...
head repository: vercel/next.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fc38ee190c9b7de09ebff13a17ebd948cf580ec3
Choose a head ref
  • 6 commits
  • 55 files changed
  • 4 contributors

Commits on Mar 6, 2024

  1. update release workflow

    ijjk committed Mar 6, 2024
    Copy the full SHA
    2f210d4 View commit details
  2. Migrate locale redirect handling to router-server (#62606)

    This moves the locale redirect handling out of `base-server` as it
    shouldn't be handled here and should be at the routing level. This
    avoids the duplicate handling with middleware that causes the incorrect
    detection/infinite looping. Test case from separate PR was carried over
    to prevent regression.
    
    Fixes: #55648
    Closes: #62435
    Closes: NEXT-2627
    Closes: NEXT-2628
    
    ---------
    
    Co-authored-by: Nourman Hajar <nourmanhajar@gmail.com>
    Co-authored-by: samcx <sam@vercel.com>
    3 people committed Mar 6, 2024
    Copy the full SHA
    960b738 View commit details
  3. Fix output: export with custom distDir (#62064)

    This ensures we don't normalize the `distDir` in the webpack config in
    dev mode as it won't be moved to the right location like it is during
    build.
    
    Fixes: #61105
    
    Closes NEXT-2495
    ijjk committed Mar 6, 2024
    Copy the full SHA
    b10a610 View commit details
  4. Upgrade to latest @edge-runtime packages (#62955)

    This upgrades to the latest edge-runtime packages as it includes
    exposing `performance`. This was reverted previously as our publishes
    were failing with a specific change that has since been removed
    upstream.
    
    Closes NEXT-2730
    # Conflicts:
    #	packages/next/package.json
    #	test/e2e/opentelemetry/app/api/app/[param]/data/edge/route.ts
    #	test/e2e/opentelemetry/pages/api/pages/[param]/edge.ts
    ijjk committed Mar 6, 2024
    Copy the full SHA
    4b059bc View commit details
  5. fix type

    ijjk committed Mar 6, 2024
    Copy the full SHA
    85a5c4d View commit details
  6. v14.1.3

    vercel-release-bot committed Mar 6, 2024
    Copy the full SHA
    fc38ee1 View commit details
Showing with 400 additions and 294 deletions.
  1. +5 −4 .github/workflows/trigger_release.yml
  2. +1 −1 lerna.json
  3. +1 −1 package.json
  4. +1 −1 packages/create-next-app/package.json
  5. +2 −2 packages/eslint-config-next/package.json
  6. +1 −1 packages/eslint-plugin-next/package.json
  7. +1 −1 packages/font/package.json
  8. +1 −1 packages/next-bundle-analyzer/package.json
  9. +1 −1 packages/next-codemod/package.json
  10. +1 −1 packages/next-env/package.json
  11. +1 −1 packages/next-mdx/package.json
  12. +1 −1 packages/next-plugin-storybook/package.json
  13. +1 −1 packages/next-polyfill-module/package.json
  14. +1 −1 packages/next-polyfill-nomodule/package.json
  15. +1 −1 packages/next-swc/package.json
  16. +10 −10 packages/next/package.json
  17. +1 −1 packages/next/src/build/webpack-config.ts
  18. +13 −8 packages/next/src/compiled/@edge-runtime/cookies/index.d.ts
  19. +4 −1 packages/next/src/compiled/@edge-runtime/cookies/index.js
  20. +1 −1 packages/next/src/compiled/@edge-runtime/cookies/package.json
  21. +1 −0 packages/next/src/compiled/@edge-runtime/ponyfill/index.js
  22. +1 −1 packages/next/src/compiled/@edge-runtime/ponyfill/package.json
  23. +1 −1 packages/next/src/compiled/@edge-runtime/primitives/abort-controller.js.text.js
  24. +1 −1 packages/next/src/compiled/@edge-runtime/primitives/blob.js.text.js
  25. +1 −1 packages/next/src/compiled/@edge-runtime/primitives/console.js.text.js
  26. +0 −8 packages/next/src/compiled/@edge-runtime/primitives/encoding.d.ts
  27. 0 packages/next/src/compiled/@edge-runtime/primitives/encoding.js.LEGAL.txt
  28. +0 −1 packages/next/src/compiled/@edge-runtime/primitives/encoding.js.text.js
  29. +0 −1 packages/next/src/compiled/@edge-runtime/primitives/events.d.ts
  30. +1 −1 packages/next/src/compiled/@edge-runtime/primitives/events.js.text.js
  31. +1 −1 packages/next/src/compiled/@edge-runtime/primitives/fetch.d.ts
  32. +1 −1 packages/next/src/compiled/@edge-runtime/primitives/fetch.js.text.js
  33. +11 −3 packages/next/src/compiled/@edge-runtime/primitives/index.d.ts
  34. +1 −1 packages/next/src/compiled/@edge-runtime/primitives/load.d.ts
  35. +3 −8 packages/next/src/compiled/@edge-runtime/primitives/load.js
  36. +1 −1 packages/next/src/compiled/@edge-runtime/primitives/package.json
  37. +2 −2 packages/next/src/compiled/@edge-runtime/primitives/timers.d.ts
  38. +1 −1 packages/next/src/compiled/@edge-runtime/primitives/url.js.text.js
  39. +0 −31 packages/next/src/server/base-server.ts
  40. +55 −0 packages/next/src/server/lib/router-server.ts
  41. +2 −0 packages/next/src/server/web/sandbox/context.ts
  42. +1 −1 packages/react-dev-overlay/package.json
  43. +1 −1 packages/react-refresh-utils/package.json
  44. +2 −2 packages/third-parties/package.json
  45. +78 −81 pnpm-lock.yaml
  46. +11 −105 scripts/start-release.js
  47. +4 −0 test/e2e/i18n-preferred-locale-detection/app/middleware.js
  48. +10 −0 test/e2e/i18n-preferred-locale-detection/app/next.config.js
  49. +21 −0 test/e2e/i18n-preferred-locale-detection/app/pages/index.js
  50. +21 −0 test/e2e/i18n-preferred-locale-detection/app/pages/new.js
  51. +63 −0 test/e2e/i18n-preferred-locale-detection/i18n-preferred-locale-detection.test.ts
  52. +9 −0 test/e2e/opentelemetry/app/api/app/[param]/data/edge/route.ts
  53. +9 −0 test/e2e/opentelemetry/pages/api/pages/[param]/edge.ts
  54. +1 −0 test/integration/app-dir-export/next.config.js
  55. +36 −0 test/integration/app-dir-export/test/dev-custom-dist-dir.test.ts
9 changes: 5 additions & 4 deletions .github/workflows/trigger_release.yml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ name: Trigger Release

env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.11.3
TURBO_VERSION: 1.12.2
NODE_LTS_VERSION: 20

jobs:
@@ -45,14 +45,15 @@ jobs:
environment: release-${{ github.event.inputs.releaseType || 'canary' }}
steps:
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
check-latest: true

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 25
persist-credentials: false # to allow start-release to override the git credentials

- name: Get commit of the latest tag
run: echo "LATEST_TAG_COMMIT=$(git rev-list -n 1 $(git describe --tags --abbrev=0))" >> $GITHUB_ENV
@@ -77,7 +78,7 @@ jobs:
- id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
timeout-minutes: 5
id: cache-pnpm-store
with:
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "14.1.2"
"version": "14.1.3"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
"@babel/preset-flow": "7.22.5",
"@babel/preset-react": "7.22.5",
"@edge-runtime/jest-environment": "2.3.4",
"@edge-runtime/jest-environment": "2.3.10",
"@emotion/cache": "11.11.0",
"@emotion/react": "11.11.1",
"@fullhuman/postcss-purgecss": "1.3.0",
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "14.1.2",
"version": "14.1.3",
"keywords": [
"react",
"next",
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "14.1.2",
"version": "14.1.3",
"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.1.2",
"@next/eslint-plugin-next": "14.1.3",
"@rushstack/eslint-patch": "^1.3.3",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
"eslint-import-resolver-node": "^0.3.6",
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "14.1.2",
"version": "14.1.3",
"description": "ESLint plugin for Next.js.",
"main": "dist/index.js",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/font",
"version": "14.1.2",
"version": "14.1.3",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "14.1.2",
"version": "14.1.3",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "14.1.2",
"version": "14.1.3",
"license": "MIT",
"repository": {
"type": "git",
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "14.1.2",
"version": "14.1.3",
"keywords": [
"react",
"next",
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "14.1.2",
"version": "14.1.3",
"main": "index.js",
"license": "MIT",
"repository": {
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "14.1.2",
"version": "14.1.3",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "14.1.2",
"version": "14.1.3",
"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",
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "14.1.2",
"version": "14.1.3",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/next-swc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "14.1.2",
"version": "14.1.3",
"private": true,
"scripts": {
"clean": "node ../../scripts/rm.mjs native",
20 changes: 10 additions & 10 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "14.1.2",
"version": "14.1.3",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
@@ -92,7 +92,7 @@
]
},
"dependencies": {
"@next/env": "14.1.2",
"@next/env": "14.1.3",
"@swc/helpers": "0.5.2",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001579",
@@ -137,20 +137,20 @@
"@babel/traverse": "7.22.5",
"@babel/types": "7.22.5",
"@capsizecss/metrics": "1.1.0",
"@edge-runtime/cookies": "4.0.2",
"@edge-runtime/ponyfill": "2.4.1",
"@edge-runtime/primitives": "4.0.2",
"@edge-runtime/cookies": "4.1.0",
"@edge-runtime/ponyfill": "2.4.2",
"@edge-runtime/primitives": "4.1.0",
"@hapi/accept": "5.0.2",
"@jest/transform": "29.5.0",
"@jest/types": "29.5.0",
"@mswjs/interceptors": "0.23.0",
"@napi-rs/cli": "2.16.2",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "14.1.2",
"@next/polyfill-nomodule": "14.1.2",
"@next/react-dev-overlay": "14.1.2",
"@next/react-refresh-utils": "14.1.2",
"@next/swc": "14.1.2",
"@next/polyfill-module": "14.1.3",
"@next/polyfill-nomodule": "14.1.3",
"@next/react-dev-overlay": "14.1.3",
"@next/react-refresh-utils": "14.1.3",
"@next/swc": "14.1.3",
"@opentelemetry/api": "1.6.0",
"@playwright/test": "^1.35.1",
"@taskr/clear": "1.1.0",
2 changes: 1 addition & 1 deletion packages/next/src/build/webpack-config.ts
Original file line number Diff line number Diff line change
@@ -372,7 +372,7 @@ export default async function getBaseWebpackConfig(

const babelConfigFile = getBabelConfigFile(dir)

if (hasCustomExportOutput(config)) {
if (!dev && hasCustomExportOutput(config)) {
config.distDir = '.next'
}
const distDir = path.join(dir, config.distDir)
21 changes: 13 additions & 8 deletions packages/next/src/compiled/@edge-runtime/cookies/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// Type definitions for cookie 0.5
// Project: https://github.com/jshttp/cookie
// Definitions by: Pine Mizune <https://github.com/pine>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
* Basic HTTP cookie parser and serializer for HTTP servers.
*/
@@ -62,6 +56,17 @@ interface CookieSerializeOptions {
* point to the same date and time.
*/
maxAge?: number | undefined;
/**
* Specifies the `boolean` value for the [`Partitioned` `Set-Cookie`](rfc-cutler-httpbis-partitioned-cookies)
* attribute. When truthy, the `Partitioned` attribute is set, otherwise it is not. By default, the
* `Partitioned` attribute is not set.
*
* **note** This is an attribute that has not yet been fully standardized, and may change in the future.
* This also means many clients may ignore this attribute until they understand it.
*
* More information about can be found in [the proposal](https://github.com/privacycg/CHIPS)
*/
partitioned?: boolean | undefined;
/**
* Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.4|`Path` `Set-Cookie` attribute}.
* By default, the path is considered the "default path".
@@ -114,7 +119,7 @@ interface CookieSerializeOptions {
* {@link https://wicg.github.io/cookie-store/#dictdef-cookielistitem CookieListItem}
* as specified by W3C.
*/
interface CookieListItem extends Pick<CookieSerializeOptions, 'domain' | 'path' | 'secure' | 'sameSite'> {
interface CookieListItem extends Pick<CookieSerializeOptions, 'domain' | 'path' | 'secure' | 'sameSite' | 'partitioned'> {
/** A string with the name of a cookie. */
name: string;
/** A string containing the value of the cookie. */
@@ -193,4 +198,4 @@ declare function parseCookie(cookie: string): Map<string, string>;
/** Parse a `Set-Cookie` header value */
declare function parseSetCookie(setCookie: string): undefined | ResponseCookie;

export { CookieListItem, RequestCookie, RequestCookies, ResponseCookie, ResponseCookies, parseCookie, parseSetCookie, stringifyCookie };
export { type CookieListItem, type RequestCookie, RequestCookies, type ResponseCookie, ResponseCookies, parseCookie, parseSetCookie, stringifyCookie };
5 changes: 4 additions & 1 deletion packages/next/src/compiled/@edge-runtime/cookies/index.js
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ function stringifyCookie(c) {
"secure" in c && c.secure && "Secure",
"httpOnly" in c && c.httpOnly && "HttpOnly",
"sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`,
"partitioned" in c && c.partitioned && "Partitioned",
"priority" in c && c.priority && `Priority=${c.priority}`
].filter(Boolean);
return `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}; ${attrs.join("; ")}`;
@@ -74,6 +75,7 @@ function parseSetCookie(setCookie) {
path,
samesite,
secure,
partitioned,
priority
} = Object.fromEntries(
attributes.map(([key, value2]) => [key.toLowerCase(), value2])
@@ -88,7 +90,8 @@ function parseSetCookie(setCookie) {
path,
...samesite && { sameSite: parseSameSite(samesite) },
...secure && { secure: true },
...priority && { priority: parsePriority(priority) }
...priority && { priority: parsePriority(priority) },
...partitioned && { partitioned: true }
};
return compact(cookie);
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"@edge-runtime/cookies","version":"4.0.2","main":"./index.js","license":"MPL-2.0"}
{"name":"@edge-runtime/cookies","version":"4.1.0","main":"./index.js","license":"MPL-2.0"}
1 change: 1 addition & 0 deletions packages/next/src/compiled/@edge-runtime/ponyfill/index.js
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ function edge() {
File,
FormData,
Headers,
performance,
PromiseRejectionEvent,
ReadableStream,
ReadableStreamBYOBReader,
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"@edge-runtime/ponyfill","version":"2.4.1","main":"./index.js","types":"./index.d.ts","license":"MPL-2.0"}
{"name":"@edge-runtime/ponyfill","version":"2.4.2","main":"./index.js","types":"./index.d.ts","license":"MPL-2.0"}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading