Commit Graph

7 Commits

Author SHA1 Message Date
Aurora Scharff 108fe00fbd fix: replace docs/canary links with stable docs paths in error messages (#92528)
### What?

Error messages for the `"use cache"` directive and `after()` API (in
`cookies()`, `headers()`, `connection()`) pointed to `/docs/canary/...`
instead of `/docs/...`.

### Why?

On canary builds, `docs/canary` links can create circular or confusing
references. These APIs are stable and their docs live at the standard
`/docs/app/...` path.

### How?

Replaced all `nextjs.org/docs/canary/` URLs with `nextjs.org/docs/` in:

- `crates/next-custom-transforms/src/transforms/server_actions.rs` — the
`"use cache"` feature flag error
-
`crates/next-custom-transforms/tests/errors/use-cache-not-allowed/1/output.stderr`
and `2/output.stderr` — matching test fixtures
- `packages/next/src/server/request/cookies.ts`, `headers.ts`,
`connection.ts` — `after()` errors
- `packages/next/errors.json` — compiled error message index (6
occurrences)

<!-- NEXT_JS_LLM_PR -->
2026-04-08 20:28:46 +02:00
Zack Tanner 85c3d20a91 [cache components]: move flag out of experimental (#85035)
This moves `experimental.cacheComponents` to a top level config. As part
of this, I disabled some tests in `build-output-prerender` that assert
on `cacheComponents` appearing in the experimental list. In a separate
PR, I'm going to show that Cache Components is enabled next to the
bundler info.

This also updates some docs pages to remove "experimental" language.
2025-10-18 14:13:44 -07:00
Hendrik Liebau 81bccc93e9 Guide users to experimental.cacheComponents config (#84121)
In error messages and in docs for `'use cache'` and related APIs, we now
guide users to the `experimental.cacheComponents` config instead of
`experimental.useCache`.

closes NAR-410
2025-09-23 12:23:59 +02:00
Hendrik Liebau bf726d3c21 Introduce standalone experimental.useCache flag (#75240) 2025-01-24 00:28:05 +01:00
Hendrik Liebau 12c483aa4d Don't hoist a server function if a compile error was emitted (#73189)
This allows us to skip unnecessary work, and also avoids generating invalid code, e.g. not allowed `super` calls in hoisted methods.
2024-11-26 17:24:10 +01:00
Donny/강동윤 c8f96d50ff perf(turbopack): Enable merging of export fragments (#72813)
### What?

Enable single-incoming-edge optimization for module fragments with `ModulePart::Export`. 

### Why?

It will reduce the number of modules greatly.



### How?

Closes PACK-3481
2024-11-21 23:06:41 +09:00
Hendrik Liebau 2c6b09d57d Emit build error when "use cache" is used without dynamicIO enabled (#72781)
Using a build error instead of a runtime error allows us to fail early,
and show a proper error source in the terminal and in the dev overlay.

<img width="777" alt="Screenshot 2024-11-13 at 22 19 45"
src="https://github.com/user-attachments/assets/d0ee3c69-71f5-4aa6-8c0a-879217f66930">
2024-11-13 21:43:58 +00:00