Commit graph

10960 commits

Author SHA1 Message Date
Tim Neutkens
4d2ef951dc
Error overlay refactors (#60886)
## What?

Some small refactors to the click handler in the error overlay.

Also removes `export` for a function that is only used in the module.

<!-- 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-2169
2024-01-22 10:01:16 +01:00
vercel-release-bot
e5e33d4d21 v14.1.1-canary.5 2024-01-21 23:22:29 +00:00
vercel-release-bot
48533617d1 v14.1.1-canary.4 2024-01-20 23:23:00 +00:00
Will Binns-Smith
498f342b35
Turbopack: always log HMR rebuild times (#60908)
This removes the need for `NEXT_HMR_TIMING` to do this.


Closes PACK-2264

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-01-19 17:07:22 -08:00
vercel-release-bot
5c0e1419ef v14.1.1-canary.3 2024-01-19 23:39:47 +00:00
Will Binns-Smith
7b9e711ed5
Report HMR latency as trace spans for Turbopack (#60799)
This:
- Makes makes reporting hmr changes more accurate by emitting an
explicit start event and lowering the aggregation period for reporting
completed turbo tasks
- Parameterizes the aggregation period, allowing JS subscribers to
request different intervals, such as for the next-rs-api test
- Aligns path pattern with webpack by normalizing its layer names
- Fixes a bug in `drainAndGetNext` where the stream never could drain
past the first item
- Sends `client-hmr-latency` spans from Turbopack in both page and app
router pages


Closes PACK-2252

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2024-01-19 15:34:17 -08:00
vercel-release-bot
f6da5a0fe2 v14.1.1-canary.2 2024-01-19 23:21:34 +00:00
Sukka
53a0a0fb87
chore: replace micromatch w/ picomatch (#60699)
The PR continues from #58038 aiming to reduce the installation size
further, and **improve performance in doing so**.

Most of `micromatch`'s APIs are essentially wrappers/alias of
`picomatch`, supplemented with additional features facilitated by a
transitive dependency `braces`. However, Next.js doesn't use those
"extra features". Switching from `micromatch` to `picomatch` can avoid
introducing the transitive dependency `braces`.

The PR also improves some globs' performance by hoisting.

- `micromatch.makeRe` is just an alias of `picomatch.makeRe`
-
90dc0cd3e1/index.js (L387C30-L387C30)
- `micromatch.isMatch(str, patterns, options)` equals
`picomatch(patterns, options)(str)`
-
90dc0cd3e1/index.js (L123)
- `micromatch.matcher` is just an alias of `picomatch`
-
90dc0cd3e1/index.js (L104C1-L104C40)

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-01-19 19:56:16 +00:00
Dima Voytenko
35422800fa
Telemetry: createComponentTree span (#60857)
This span is meant to be a parent for all "resolve segment modules"
spans.
2024-01-19 10:40:08 -08:00
Balázs Orbán
dc109bf6c9
chore: indicate staleness more prominently in next info output (#60376)
### What?

Improve the `next info` output.

<details>
<summary>Before:
</summary>
<img
src="https://github.com/vercel/next.js/assets/18369201/735da72f-6746-42a0-838d-e10db78b2db3">
</details>

<details>
<summary>After:
</summary>
<img
src="https://github.com/vercel/next.js/assets/18369201/d72c0027-71d9-494c-bb98-dd0fed99c8d9">
</details>

### Why?

People have been ignoring the ask to check `next@canary` before opening
a new issue, which results in triaging overhead. This PR inlines the
warning into `next info` that would make it an extra effort to remove
the warning without reading the message, hopefully leading to not
ignoring the message anymore.

### How?

Reusing the same logic from the version staleness indicator from Error
Overlay.

[Slack
thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1704364764719949)
2024-01-19 18:36:19 +01:00
Damien Simonin Feugas
821849261d
Deprecation warning for config.analyticsId (#60677)
###  🧐 What's in there?

`config.analyticsId` is a rarely-used mechanism, initially intended to
Next.js users hosting their application themselves and willing to report
Core Web Vitals to Vercel Speed Insights.

This platform specific mechanism can be replaced with the built-in
[`useReportWebVitals`](https://nextjs.org/docs/app/api-reference/functions/use-report-web-vitals).

### 🧪 How to test?

1. make a new Next.js app
1. define env variable `VERCEL_ANALYTICS_ID` to a dummy value
1. start your application in dev mode:
   ```shell
⚠ config.analyticsId is deprecated and will be removed in next major
version. Read more:
https://nextjs.org/docs/messages/deprecated-analyticsid
   
      ▲ Next.js 14.0.5-canary.58
      - Local:        http://localhost:3000
    ✓ Ready in 917ms
   ```
1. build your application:
   ```shell
      ▲ Next.js 14.0.5-canary.58
   
      Creating an optimized production build ...
    ✓ Compiled successfully
      Linting and checking validity of types  .
⚠ The Next.js plugin was not detected in your ESLint configuration. See
https://nextjs.org/docs/basic-features/eslint#migrating-existing-config
    ✓ Linting and checking validity of types
    ✓ Collecting page data
    ✓ Generating static pages (4/4)
⚠ `config.analyticsId` is deprecated and will be removed in next major
version. Read more:
https://nextjs.org/docs/messages/deprecated-analyticsid
    ```
1. remove the env variable, add a `next.config.js` file with a dummy
`analyticsId` variable:
   ```js
   module.exports = { analyticsId: "UA-12345678-9" };
   ```
1. start your application in dev mode: it'll issue the same warning.
1. build your application: it'll issue the same warning.

---------

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2024-01-19 14:45:05 +01:00
vercel-release-bot
0fc29480fc v14.1.1-canary.1 2024-01-19 06:02:07 +00:00
JJ Kasper
bde427a7d7
Optimize build trace ignores (#60859)
It seems that when tracing build dependencies our server tracing was
analyzing all server chunks un-necessarily and when a very large
dependency like `ace-builds` is creating large chunks it can slow down
builds drastically so this ensures we eagerly apply our shared ignores
to avoid this over tracing.

Build times before [with provided
repro](https://github.com/MartinXPN/next-slow-build-reproduction):

```sh
▲ Next.js 14.1.0

   Creating an optimized production build ...
 ✓ Compiled successfully
 ✓ Linting and checking validity of types
 ✓ Collecting page data
 ✓ Generating static pages (5/5)
 ✓ Collecting build traces
 ✓ Finalizing page optimization

  Done in 437.29s.
```

Build times after [with provided
repro](https://github.com/MartinXPN/next-slow-build-reproduction):

```sh
▲ Next.js 14.1.1-canary.0

   Creating an optimized production build ...
 ✓ Compiled successfully
 ✓ Linting and checking validity of types
 ✓ Collecting page data
 ✓ Generating static pages (5/5)
 ✓ Collecting build traces
 ✓ Finalizing page optimization

  Done in 42.38s.
```


Closes: https://github.com/vercel/next.js/issues/58759
Closes NEXT-2161
2024-01-18 21:58:05 -08:00
Jesse Koldewijn
3734ae8890
fix: added @sentry/profiling-node to sep list to prevent build/bundle breakage (#60855)
Issue: https://github.com/vercel/next.js/issues/60853

### What?
Added `@sentry/profiling-node` to the server-external-package object so
that sentry users who want to use this package don't have to manually
add this package in the experimental nextjs config entry.

### Why?
Package bundling will fail as shown in the following issue if not added
to this exclude list.
https://github.com/getsentry/profiling-node/issues/170

---

Fixes #60853
2024-01-19 05:16:03 +00:00
vercel-release-bot
fcfa45cd8e v14.1.1-canary.0 2024-01-18 23:23:12 +00:00
JJ Kasper
75f73fe93d
Update build worker warning to use debug (#60847)
Since we are enabling `webpackBuildWorker` by default now we should move
this warning to debug since it can be confusing without additional
context.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1705612748627769?thread_ts=1705599489.811039&cid=C04KC8A53T7)

Closes NEXT-2158
2024-01-18 14:35:13 -08:00
vercel-release-bot
16e7a5bd93 v14.1.0 2024-01-18 21:41:02 +00:00
vercel-release-bot
1b255a6c5b v14.0.5-canary.68 2024-01-18 20:14:53 +00:00
Jiachi Liu
02c2f11ec9
Enable missing suspense bailout by default (#60840)
`experimental.missingSuspenseWithCSRBailout` should be enabled by
default to help users to disciver unwrapped suspense boundaries.

Add more notes in the error doc about deprecation and temporary
workaround to disable it.

Closes NEXT-2157

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-01-18 21:11:22 +01:00
vercel-release-bot
2096dfa687 v14.0.5-canary.67 2024-01-18 17:48:11 +00:00
Jiachi Liu
b8d8e6e7cc
dx: warn the deprecated cache configs are used (#60836)
Follow up for #57953 for DX, give better warnings

x-ref:
https://github.com/vercel/next.js/pull/60828#discussion_r1457736645

Closes NEXT-2156
2024-01-18 18:38:29 +01:00
Jiachi Liu
c192f4ec2f
turbopack: rename custom cache handler configs (#60828)
Follow up for #57953 for turbopack side

Closes NEXT-2153
2024-01-18 18:10:10 +01:00
Steven
2227ae5f34
Revert "Fix: Throw an error for empty array return in generateStaticParams with output:export" (#60831)
Reverts vercel/next.js#57053 per this comment:
https://github.com/vercel/next.js/pull/57053#issuecomment-1892747474

Instead of erroring, we should warn (and only in dev mode). That can be
added in a future PR.

Closes NEXT-2155
2024-01-18 18:02:07 +01:00
Jiachi Liu
b7f5107544
Fix: respect init.cache if fetch input is request instance (#60821)
When there’s a request input instance and init object present the same
time, we should respect init as preferred

Closes NEXT-2149
2024-01-18 17:54:36 +01:00
JJ Kasper
752c15e798
Add metrics names for unstable_cache (#60802)
This ensures we add params for `unstable_cache` so it can be identified
the same was as fetches instead of being unlabeled.

Closes NEXT-2143
2024-01-18 17:49:35 +01:00
JJ Kasper
e733853cf5
Ensure request specific caches for revalidate are reset (#60810)
This ensures our in memory cache leveraged for the `fetch-cache`
interface is reset per-request instead of using an arbitrary timeout so
that we are always pulling the revalidate state from upstream correctly
on new requests.

Before:
https://vercel-revalidate-3zi8wpexo-vtest314-ijjk-testing.vercel.app/
After:
https://vercel-revalidate-70y5a8dbh-vtest314-ijjk-testing.vercel.app/

Closes: https://github.com/vercel/next.js/issues/60680

Closes NEXT-2144
2024-01-18 16:43:55 +00:00
Leah
c2473471e2
feat: support custom image loaders in turbopack (#60736)
### What?
We were missing the alias (and config field) for custom image loaders.

Closes PACK-2190
Fixes #60097
2024-01-18 16:23:06 +00:00
Steven
cb71d80879
chore(deps): update browserslist and caniuse-lite (#60827)
Closes #57872
Closes NEXT-2152
2024-01-18 16:14:38 +00:00
Jiachi Liu
7472cefb42
Remove the warning for build worker when custom webpack present (#60820)
Drop the warning of build worker due to the common usage of custom
webpack

Closes NEXT-2148
2024-01-18 15:06:08 +00:00
Balázs Orbán
b14c1eb991
fix(ts): auto-complete next/headers (#60817)
### What?

Add support for auto-importing `headers()` and `cookies()`

### Why?

Improve the auto-import experience in IDEs like VScode

### How?

Re-export the `next/headers` type references

Closes NEXT-2146
2024-01-18 15:01:22 +01:00
vercel-release-bot
8179e7008e v14.0.5-canary.66 2024-01-18 12:52:28 +00:00
Jiachi Liu
e0399ca6dc
Support next/og usage in ESM nextjs app (#60818)
### What 

Follow up for #59852 , now you can use `next/og` if your nextjs app is
marked as ESM with `"type": "module"` in package.json.

### How

It's a bug in external handling, we shouldn't ESM import error for local
requests. Previously you'll see the below error but the
og import shouldn't be errored as it's not external package

```
Module not found: ESM packages (/.../app/opengraph-image.js) need to be imported. Use 'import' to reference the package instead
 https://nextjs.org/docs/messages/import-esm-externals
```


Closes NEXT-2147
2024-01-18 13:44:50 +01:00
Tim Neutkens
299d145303
Use snapshots for component-stack tests (#60768)
### What?

Follow-up to #60579 and #60750. Checking `startsWith` is not enough
because it hides the rest of the stack. Changed the test to check the
snapshot for Turbopack and webpack.

Fixes a bug where the stack lines showed `http (NaN:NaN)` as the source
lines.

Added support for source lines that don't have a open in editor.

<!-- 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-2128
2024-01-18 13:44:03 +01:00
Willi#m ⬣
c5bdc5c54f
add missing function call to normalize-catchall-routes test case (#60777)
### Fixed a Test Case

- Tests fixed:
`packages/next/src/build/normalize-catchall-routes.test.ts`, the
function call `normalizeCatchAllRoutes(appPaths)` was removed by
accident in this [merged commit
](efebba80a7 (diff-e3c0d3c6e15d8b035a3252a1ada2b04d5dd33010885fed8f6d689f75aa80bff5))
rendering the test case pointless

REF NEXT-1984
2024-01-18 00:33:54 -08:00
Dima Voytenko
9e8e44e530
Dev Server: Preserve globals overwrites in the initialization hook (#60796)
The original dev server implementation records globals in the server
constructor and thus overwrites the values initialized in the
instrumentation hook. This is a major delta from the `next start` where
the instrumentation values are preserved.

Fixes: https://github.com/vercel/next.js/issues/47596
Fixes: https://github.com/vercel/next.js/issues/53407
2024-01-17 16:32:54 -08:00
Shu Ding
fd59a007e1
Fix Server Actions compiler bug (#60794)
This PR fixes the issue where an inline Server Action gets exported. As
this isn't the designed use case for inline Server Actions (they're
supposed to be defined and used inside another closure, such as
components), we are not handling the export cases currently:

```ts
export async function action() {
  "use server"
  ...
}

<form action={action}/>
```

...which gets compiled into:

```ts
export async function action() {} // No-op function

<form action={...actionReference...}/>
```

Note that everything works inside this module until you `import` that
action and use it in another module.

To tackle that, this PR changes how that works as described in
`server/27/output.js`.

Closes NEXT-2140
2024-01-18 01:29:07 +01:00
Steven
4b50313fd9
feat: stabilize unstable_getImgProps() => getImageProps() (#60739)
This PR renames `unstable_getImgProps` to `getImageProps()` (originally
introduced in PR #51205).

Most feedback [after
announcing](https://twitter.com/leeerob/status/1674250190432116736)
looks positive so it seems like we can safely stabilize this API now.
Its unlikely to change.

I also added documentation with example usage.

Closes NEXT-2120
Fixes https://github.com/vercel/next.js/issues/56009
2024-01-17 18:28:49 -05:00
vercel-release-bot
70fc4028eb v14.0.5-canary.65 2024-01-17 23:23:34 +00:00
Lee Robinson
16dcebe792
Stabilize custom cache handlers and changing memory size. (#57953)
This PR stabilizes the previously introduced experimental config options
for providing a custom cache handler (for both ISR as well as the Data
Cache) and for disabling or configuring the in-memory cache size. The
example usage would be as follows:

```js
// next.config.js
module.exports = {
  cacheHandler: require.resolve('./cache-handler.js'),
  cacheMaxMemorySize: 0 // disable default in-memory caching
}
```

This PR also updates the documentation to better reflect how to use the
custom cache handler when self-hosting. Further information will be
added in a following PR that also includes a full example of a custom
cache handler that implements `revalidateTag` as well as passing in
custom cache tags. The API reference docs have been updated here, as
well as a version history added.

I also noticed that we currently have two duplicated versions of the ISR
docs in the Pages Router docs: both for rendering and for data fetching.
Data Fetching is the correct location for this page. There were no other
references to the rendering version in the docs, so that must have been
an accident. I'll need to a get a redirect going for that regardless.

Tests have been updated for `cacheHandler` and I added a new test for
`cacheMaxMemorySize`.

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2024-01-17 23:42:52 +01:00
JJ Kasper
8e216ecb8d
Fix locale domain public files check (#60749)
This ensures we properly handle serving public files when routing via a
locale domain and adds regression tests for this case.

Closes: https://github.com/vercel/next.js/issues/54765
Closes: https://github.com/vercel/next.js/pull/59773
Closes: https://github.com/vercel/next.js/pull/55137
Closes NEXT-2123
2024-01-17 13:41:16 -08:00
vercel-release-bot
8d4e5be736 v14.0.5-canary.64 2024-01-17 17:59:57 +00:00
Tobias Koppers
861b472b12
fix layout segment key to match up with manifest (#60783)
### What?

When webpack loaders are applied on a page file and it's renamed with
the `as` key, layout segment key no longer matches. This fixes that

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes PACK-2251
2024-01-17 17:11:50 +00:00
vercel-release-bot
a211566655 v14.0.5-canary.63 2024-01-17 15:14:46 +00:00
Tobias Koppers
b24ba17cc7
apply page transforms only on pages (#60779)
### What?

apply page transforms only on pages as intended

### Why?

Before they were applied on all files


Closes PACK-2250
2024-01-17 16:11:09 +01:00
Tim Neutkens
4548fed1cf
Skip postcss config location resolving in node_modules (#60697)
## What?

Skip postcss config resolving in node_modules for Turbopack. This
matches current Next.js on webpack closer as that only resolves the
postcss config from the project root. The additional feature Turbopack
has is that it can find a postcss config relative to the css being
compiled. This is useful for e.g. reducing the amount of overhead
certain postcss plugins that only have to run against a single file take
(i.e. Tailwindcss).


Depends on github.com/vercel/turbo/pull/7012 landing first.

<!-- 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-2109

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2024-01-17 13:54:17 +00:00
vercel-release-bot
c583528116 v14.0.5-canary.62 2024-01-17 11:37:23 +00:00
Wyatt Johnson
dda1870501
Reapply "feat(app-router): introduce experimental.missingSuspenseWithCSRBailout flag" (#60508) (#60751)
This reapplies the `experimental.missingSuspenseWithCSRBailout` option
to bail out during build if there was a missing suspense boundary when
using something that bails out to client side rendering (like
`useSearchParams()`). See #57642

Closes [NEXT-1770](https://linear.app/vercel/issue/NEXT-1770)
2024-01-17 12:33:45 +01:00
vercel-release-bot
7f3d9099c2 v14.0.5-canary.61 2024-01-17 10:16:12 +00:00
OJ Kwon
5956ff76b5
feat(next-core): port remaining next.js custom transforms (#60498)
<!-- 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?



-->

This PR ports over all of the remaining custom transforms for next-swc
into turbopack, and apply it into client / server rules accordingly.

Closes PACK-2225
2024-01-17 10:32:58 +01:00
Tobias Koppers
16d009ef1b
separate chunking per layout parts (#60569)
### What?

* creates a separate chunk group for client components per layout
segment (before it was per page)

### Why?

This fixes a bug with css loading on client transitions as next.js
assumes that the chunk group for the unchanged layout segments are
already loaded (fixes PACK-2163)


Closes PACK-2232
2024-01-17 08:18:59 +00:00