Commit graph

18652 commits

Author SHA1 Message Date
Rishabh Poddar
484efaec85
examples: Updates with-supertokens example app (#58525)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-04 16:17:46 -06:00
Jiachi Liu
42b87892e4
Fix non bundler module resolution in ts for third-parties pkg (#59244) 2023-12-04 20:40:25 +01:00
Tim Neutkens
f05b503182
Add app router name to font tests (#59257)
## What?

Ensures this is reported correctly. 

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes NEXT-1794
2023-12-04 20:25:41 +01:00
Wyatt Johnson
f99812727d
Delete unused static prefetch code (#58783)
This removes the dead code related to prefetching until it can reland.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-12-04 17:54:32 +00:00
Leah
2cc88d7b11
fix missing checkout in daily turbopack reporting (#59256) 2023-12-04 18:54:00 +01:00
Leah
d348e4b569
fix missing echo in daily turbopack reporting (#59255)
### What?

GitHub workflow commands need to be echoed

Closes PACK-2075
2023-12-04 18:02:08 +01:00
Jiachi Liu
065d196b5e
Fix dynamic transform ssr:false case for pages router with ESM (#59246) 2023-12-04 17:48:46 +01:00
Andrew Clark
f64e92ba4d
Add process.env.__NEXT_PPR to build config (#59253)
Adds process.env.__NEXT_PPR as static flag that it gets inlined by
DefinePlugin during build.

This matches what we do for other experiments, but I do wonder, why do
we bother with process.env at all instead of a global __NEXT_PPR symbol?
I'll leave that for later discussion.

Closes NEXT-1792
2023-12-04 11:32:46 -05:00
Andrew Clark
65a74b1bef
Remove mutable field from action types (#59221)
Similar in spirit to #58938.

The app router reducer state used to be managed by useReducer, so it was
written to be resilient to rebasing — the same action may be processed
multiple times. Now that we've lifted the reducer outside of React
(#56497), each action runs only a single time. So we can simplify some
of the logic.

The purpose of the `mutable` field was so that if an action is processed
multiple times, state could be reused between each run; for example, to
prevent redundant network fetches. Now that this scenario can no longer
happen, we can remove it.

I had to update some of the unit tests in navigate-reducer because they
were written with the assumption that the reducer was called multiple
times. As far as I can tell, most of this behavior is covered by e2e
tests anyway, so I don't think it's too risky.

Closes NEXT-1782
2023-12-04 11:31:41 -05:00
Leah
b2e183ec1d
fix typo in daily turbopack integration test reporting (#59251) 2023-12-04 17:08:46 +01:00
Leah
15215d4c96
ci: report daily turbo integration test results from this repo (#58965)
### What?

A follow up for #58267 and #58394.

We no longer need the git branch for history it's stored in datadog now
and we also decided that we no longer need slack reporting.


Closes PACK-2039

---------

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2023-12-04 16:18:42 +01:00
Delba de Oliveira
63a578f1c3
Docs: Fix upgrade guide files (#59249)
- Add v14 update guide to /app router docs
- Fix duplicate /upgrading folders
2023-12-04 08:55:46 -06:00
Tim Neutkens
c1fba5735c
Disable more Turbopack build tests (#59245)
## What?

Skips more tests that are running `next build` which is not supported by
Turbopack yet.

## How?

Used an approach where all `next build` tests would fail if
`TURBOPACK=1` is set, which is how the tests run. This highlighted the
cases `next build` was still running.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes NEXT-1791
2023-12-04 14:23:32 +00:00
vercel-release-bot
445e705028 v14.0.4-canary.39 2023-12-04 11:05:59 +00:00
Adam Lavin
00eff94d8c
Resolve build issues with symlinked files (#57412)
This resolves an issue introduced in #52361 where `shouldOmit` is
overwritten based on if it is a directory or not without considering
include conditions.

In an environment where the the application being built is orchestrated
and managed by bazel, all files are symbolic links and thus without this
the file includes predicate checks aren't considered - and the build
fails under certain conditions.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

---------

Co-authored-by: Shu Ding <g@shud.in>
2023-12-04 11:43:13 +01:00
vercel-release-bot
d9e58034c3 v14.0.4-canary.38 2023-12-04 09:53:49 +00:00
Tobias Koppers
669a48cb4d
fix tsconfig alias cycle (#59232)
### What?

fixes https://github.com/vercel/next.js/issues/59195
fixes PACK-450

### Why?

### How?

see https://github.com/vercel/turbo/pull/6687

### Turbopack Changes

* https://github.com/vercel/turbo/pull/6627 <!-- Tobias Koppers - fix
stack trace of errors -->
* https://github.com/vercel/turbo/pull/6646 <!-- OJ Kwon -
fix(turbo-tasks-fs): support unicode segment for glob -->
* https://github.com/vercel/turbo/pull/6672 <!-- OJ Kwon -
fix(ecmascript): dbg assert for the globals -->
* https://github.com/vercel/turbo/pull/6687 <!-- Tobias Koppers - fix
tsconfig alias cycle -->
2023-12-04 10:50:15 +01:00
Tim Neutkens
b089529caf
Failing test for 59195 (#59210)
Added a failing test based on the reproduction in #59195

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes NEXT-1781
2023-12-04 05:13:28 +01:00
vercel-release-bot
141dbb2663 v14.0.4-canary.37 2023-12-03 15:32:15 +00:00
Tim Neutkens
f8dea8d564
Correctly skip build test for Turbopack (#59207)
This test was failing in the Turbopack run but it shouldn't be executed
in the Turbopack run currently as it's a production mode test.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes NEXT-1780
2023-12-03 12:07:36 +01:00
Tobias Koppers
94ca98c242
fix some small turbopack issues (#59171)
### What?

* remove console.log
* avoid duplicate chunks in app-build-manifest.json
* avoid mutation and duplication in middleware-manifest.json


Closes PACK-2066
2023-12-03 09:19:48 +01:00
Tim Neutkens
8ff1368fdb
Ensure original history is read in effect (#58861)
## What?

Fixes
https://github.com/vercel/next.js/pull/58335#issuecomment-1825003091.
Waiting on a reply for the exact case but my assumption is that the
history is overwritten in the user module instead of before the other JS
loads.


<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2023-12-03 09:18:34 +01:00
vercel-release-bot
c530664c13 v14.0.4-canary.36 2023-12-02 23:21:42 +00:00
JJ Kasper
a3616d33ed
Update to latest version of @vercel/nft (#59183)
Updates to latest `@vercel/nft` which includes fix for tracing folders
that include dot files.

x-ref: https://github.com/vercel/nft/pull/373
x-ref: [slack
thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1700210671195669)

Closes NEXT-1778
2023-12-02 10:42:49 -08:00
汪磊
ba23d98611
Correcting the webpack function introduction (#58663) 2023-12-02 08:36:53 +00:00
Murat Ogulcan Sahin
e7589e05db
docs:Add react hydration error case. (#59147) 2023-12-02 08:35:22 +00:00
JJ Kasper
43b076620c
Fix ssgCacheKey in minimal mode (#59181)
This ensures we use the correct `srcPathname` in minimal mode so that we
can normalize the URL and generate the correct `ssgCacheKey` which is
used for request caching/de-duping.

We aren't able to add a reliable test case for this as it is a race
condition within a second of a previous request although this was
verified against a stress test repro here
https://overlapping-segments-h1455lwvk-vtest314-ijjk-testing.vercel.app/repro/tutorials/demo

This behavior seems to have regressed in
https://github.com/vercel/next.js/pull/45716

Closes NEXT-1777
2023-12-01 17:23:50 -08:00
vercel-release-bot
7d8fab2f4d v14.0.4-canary.35 2023-12-01 23:22:14 +00:00
Zack Tanner
363c2e8eb7
fix server actions behavior on intercepted routes (#59175)
### What?
When using a server action on an intercepted route, when submitting that
action, you'd expect it to correspond with the page you're currently on.
However if you have route interception set up, and you load the page
rather than the intercepted page, submitting the action would `POST` to
the intercepted page. This would result in a 404 error because the
action ID you're attempting to submit wouldn't be found on the requested
page.

### Why?
Interception routes rely on the `Next-Url` request header to determine
if an interception should occur via a rewrite. However, server actions
are submitted with this header as well, so the rewrite will be applied
to the `POST` request corresponding with a non-existent action, or an
action on the intercepted page.

### How?
When loading a page that has an intercepted route, `nextUrl` should be
consistent with URL derived from the flight router state tree. But when
an interception occurs via navigation, `nextUrl` will now deviate. I'm
using this to determine whether or not `Next-Url` should be forwarded
along in the `POST` request.

Closes NEXT-1436
Fixes #52591
Fixes #49934
2023-12-01 14:45:00 -08:00
OJ Kwon
840b60bc8b
fix(next-core): do not panic when parsing segment config (#59170) 2023-12-01 12:54:01 -08:00
vercel-release-bot
574e7060b1 v14.0.4-canary.34 2023-12-01 20:52:57 +00:00
Tim Neutkens
fad847e062
Turbopack only enable instrumentationHook with experimental flag (#59173)
Ensures that the experimental instrumentation hook file is not enabled
in Turbopack unless `experimenta.instrumentationHook: true`

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2023-12-01 21:49:33 +01:00
Zack Tanner
5f98e9bc6e
fix behavior when revisiting an intercepted route (#59168)
### What?
When using rewrites, in the scenario where a user visits an intercepted
route, reloads the page, goes back, and then revisits the same route, we
serve the page rather than the intercepted route.

### Why?
#59094 fixed the case where `ACTION_RESTORE` was not restoring `nextUrl`
properly. However there's a separate issue where when the `SERVER_PATCH`
action comes in, `handleMutable` attempts to compute `nextUrl` by
comparing the patched tree with the current tree. In the case of the
popstate event, both trees are the same, so the logic is currently
configured to fallback to `canonicalUrl`, which is not the correct URL
to use in the case of rewrites.

### How?
If the computed changed path is null, we should only fallback to using
`canonicalUrl` if we don't have a valid `nextUrl` that we can use.

Closes NEXT-1747
Fixes #56072
2023-12-01 08:54:01 -08:00
vercel-release-bot
d71d7767f3 v14.0.4-canary.33 2023-12-01 16:19:08 +00:00
Tim Neutkens
19cb32e6af
Don't catch ensureMiddleware errors (#59166)
## What?

While investigating a Turbopack bug we noticed that middleware would be
skipped in development if there was an error during compilation that
caused `ensurePage` to throw. This updates the logic to not catch that
throw and instead make it bubble up correctly.


<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2023-12-01 17:16:03 +01:00
Jiachi Liu
87e0b4495a
Fix mixed module swc compilation for app router (#58967) 2023-12-01 15:23:43 +01:00
Vercel Release Bot
cc42e437ea
Update Turbopack test manifest (#59109)
This auto-generated PR updates the integration test manifest used when
testing Turbopack.

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-12-01 10:16:28 +00:00
Simon Hänisch
f47640375a
fix: add maxDuration to PageConfig type (#55918) 2023-12-01 10:58:02 +01:00
Karl Horky
b02a10e331
Enable typechecking on config (#57892)
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2023-12-01 09:57:57 +01:00
Ahmed Abdelbaset
89f6322cda
chore: fix typo in jsDoc (#58224) 2023-12-01 09:53:02 +01:00
vercel-release-bot
fa9cd3efc4 v14.0.4-canary.32 2023-12-01 04:31:03 +00:00
Christian Vuerings
7458ffa042
Support adding CSP nonce with content-security-policy-report-only header (#59071)
**Note**: this is a 1-to-1 copy of #48969 by @danieltott with all the
merge conflicts fixed.

## Checklist

* Fixes https://github.com/vercel/next.js/issues/48966
* Tests added to
`test/production/app-dir/subresource-integrity/subresource-integrity.test.ts`

## Description

Currently `renderToHTMLOrFlight` in app-render pulls out a nonce value
from a `content-security-policy` header for use in generating script
tags:


e7c9d3c051/packages/next/src/server/app-render/app-render.tsx (L1204)

That misses the ability to use a [content-security-policy-report-only
header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only).
Many times this is a required step to enabling a CSP - by shipping a CSP
with report-only and collecting reports before actually blocking
resources.

## Changes

* Added ability to check `content-security-policy-report-only` header in
`renderToHTMLOrFlight()`
* Added test to verify `nonce` is correctly applied when
`content-security-policy-report-only` header exists

Co-authored-by: Dan Ott <dan@dtott.com>
Co-authored-by: Zack Tanner <zacktanner@gmail.com>
2023-11-30 19:40:57 -08:00
Michael Diodone
cdff6df098
Add NEXT_MANUAL_SIG_HANDLE handling to start-server.ts (#59117)
If a manual signal handler is registered, SIGINT and SIGTERM should not
be handled by Next.js. This was already the case in the standalone
server.js but was missing here, rendering the env flag useless.

With this fix, the example given in
https://nextjs.org/docs/pages/building-your-application/deploying#manual-graceful-shutdowns
is working (again).

Fixes #56810.

Co-authored-by: Zack Tanner <zacktanner@gmail.com>
2023-11-30 19:05:20 -08:00
Zack Tanner
a5e60f179b
fix typedRoutes when used with webpackBuildWorker (#59140)
When using `experimental.typedRoutes` in conjunction with
`experimental.webpackBuildWorker`, type errors would be erroneously
thrown during build.

This is because the build workers are parallelized between multiple
runtimes (edge, server, client), but the `typedRoutes` is unique to each
`webpackBuild`. The state needs to shared between the different compile
steps for each instance of the types plugin.

This leverages plugin state to keep share the `typedRoutes` state
amongst the different workers.

Closes NEXT-1734
Fixes #58369
2023-11-30 18:25:08 -08:00
Vercel Release Bot
1c61153d77
Update font data (#59138)
This auto-generated PR updates font data with latest available
2023-11-30 17:20:22 -08:00
vercel-release-bot
1b08dfe040 v14.0.4-canary.31 2023-11-30 23:22:21 +00:00
Zack Tanner
511867ceec
fix variable name in release workflow (#59135)
Follow up to https://github.com/vercel/next.js/pull/59134
2023-11-30 15:19:46 -08:00
vercel-release-bot
3159fa197b v14.0.4-canary.30 2023-11-30 23:10:37 +00:00
Zack Tanner
f241f44b38
skip release if no new commits (#59134)
Prevents publishing canaries if there are no changes

Closes NEXT-1748
2023-11-30 15:07:05 -08:00
vercel-release-bot
73d4ca5775 v14.0.4-canary.29 2023-11-30 22:56:34 +00:00