Commit Graph

1072 Commits

Author SHA1 Message Date
Tim Neutkens 4802b9839e Turbopack: Add docs for debugIds option (#84375)
## What?

Adds documentation for #84319.
2025-09-30 17:22:26 +02:00
Joseph b6834b1bfe docs: Type helpers don't need to be imported (#84265)
Let's be more clear about the usage of these types.
2025-09-30 15:45:35 +02:00
Jiwon Choi 2318b5e2c0 docs: Remove AMP docs (#84357)
Stacked on https://github.com/vercel/next.js/pull/84312

Removes the AMP docs, which is no longer supported.
2025-09-30 15:21:52 +02:00
Sebastian "Sebbie" Silbermann 4642591dc0 Mark React Compiler integration as stable (#84220) 2025-09-29 23:12:10 +00:00
Anshuman Bhardwaj c35549a5c4 docs: remove repeated to (#84325)
### What?

Removed an extra "to"

### Why?

Semantics error/not required

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-09-29 12:00:19 -07:00
Tobias Koppers 8586cdf17d Turbopack: add separate turbopackPersistentCachingForBuild/ForDev flags (#84215)
### What?

Move persistent caching for `next build` into a separate config option: `turbopackPersistentCachingForBuild`.
And `next dev` to `turbopackPersistentCachingForDev`.
2025-09-29 17:26:58 +02:00
Jiwon Choi a61dab2507 Move config.turbopack.moduleIds to config.experimental.turbopackModuleIds (#84230)
https://github.com/vercel/next.js/pull/77850 moved `experimental.turbo`
option to `turbopack`, but `moduleIds` is intended for debugging, in
line with `turbopackSourceMaps` and `turbopackMinify`, so move to
`experimental.turbopackModuleIds`.

- In development, it's "named" by default, and making it "deterministic"
breaks HMR.
- In production, it's "deterministic" by default, and making it "named"
blows up bundle sizes and exposes your internal project structure in the
module ID strings.
2025-09-26 01:53:34 +02:00
Benjamin Woodruff 1c0fb583d7 docs: Include more detailed instructions on excluding from common AV solutions, including macOS Gatekeeper (#84206)
Gatekeeper instructions are based on https://nexte.st/docs/installation/macos/#gatekeeper

Windows instructions are based on https://support.microsoft.com/en-us/windows/virus-and-threat-protection-in-the-windows-security-app-1362f4cd-d71a-b52a-0b66-c2820032b65e#bkmk_threat-protection-settings

<img src="https://app.graphite.dev/user-attachments/assets/b7d6f232-ed87-4245-be9e-4fe130b5dc96.png" width="600">

<img src="https://app.graphite.dev/user-attachments/assets/6ab4623f-45e7-4bb7-aca0-de0b85051715.png" width="600">
2025-09-25 11:44:50 -07:00
Joseph 446a671184 docs: nav_title for long unbroken words (#84233)
Let's use a different title for these, otherwise we have a very long
composite word.
2025-09-25 15:50:45 +02:00
Jiwon Choi aee02f850c Revert "[Breaking] Remove deprecated publicRuntimeConfig and serverRuntimeConfig (#83944)" (#84167)
This PR reverts #83944 as it was missing a deprecation warning in the
app, which is easy to miss for the users.
2025-09-24 10:21:16 +02:00
Benjamin Woodruff 498c7fce68 Turbopack: Remove the deprecated .turbo config object (#84109)
This config name was previously deprecated in a 15.x release (renamed to `turbopack`), and there's already a codemod to migrate these over.
2025-09-23 11:03:37 -07:00
Steven 0f14e5333f BREAKING CHANGE!: bump default images.minimumCacheTTL from 1 min to 4 hours (#84105)
We have found many Next.js users are confused why images keep
revalidating so frequently (increasing cpu and cost).

The reason is usually that their upstream source images are missing the
`cache-control` header and thus fallback to the 60 second revalidation
default. This its not a great default since most images don't change
frequently.

This PR is a breaking change to bump the `images.minimumCacheTTL` config
from 60 (1 min) to 14400 (4 hours).

Why 4 hours? Because its long enough to take advantage of the durable
cache, but short enough that changing or deleting the upstream src image
will take effect on the same day.

For advanced use cases where images are changing frequently, developers
can change this behavior back by reducing `images.minimumCacheTTL` to a
lower value.
2025-09-23 10:49:34 -04:00
Joseph 94fe834574 docs: onRequestError request header type (#83988)
Aligning with the actual type
https://github.com/vercel/next.js/blob/canary/packages/next/src/server/instrumentation/types.ts#L18
2025-09-23 14:48:36 +02:00
liketiger 8377773b5a docs: improve dynamic routes example in project structure page (#84086)
## Documentation Update

This PR improves the dynamic routes example in the
`project-structure.mdx` page.

### Changes
- Updated catch-all segments example:
  - Before: `/shop/clothing/shoes`
  - After:  `/shop/clothing`
- Adjusted follow-up examples for consistency:
  - `/shop/a`, `/shop/a/b` → `/shop/clothing`, `/shop/clothing/shirts`

### Why
- Provides a clearer and more intuitive demonstration of how catch-all
segments work.
- Keeps the example consistent with other dynamic routes documentation.

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-09-23 12:31:19 +02: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
Benjamin Woodruff 51656e537c Turbopack: Remove useless 'default' built-in webpack loader condition (#84111)
Follow up to https://github.com/vercel/next.js/pull/83246#discussion_r2366553689

Discussed this with @lukesandberg and we can't find a place where it would be very useful, it seems it might've been useful with the old builtin condition syntax (which I removed).

It also looks like maybe I forgot to actually wire this up to anything? Whoops. Whelp, now it's gone.
2025-09-22 21:46:20 -07:00
Benjamin Woodruff 3c42dfb313 Turbopack: Document automatic Babel config support (#84002)
~I'm looking for review/feedback, but **DO NOT MERGE UNTIL NEXT 16.0 IS RELEASED.** This is not supported on 15.5, and merging these docs now would be confusing to users. If you want to try it out, use a recent canary release.~ I've been informed that docs are not currently tracking canary, so this is safe to merge.

https://github.com/vercel/next.js/pull/82676 adds support for automatically enabling Babel if a babel config is found. Previously we'd exit the process with a hard error explaining that Babel is not supported.

Technically you could previously manually configure `babel-loader`, but we had heuristics to detect and warn against that, and you'd need to use a different path for the config file to work around our error message, so it didn't really work properly. (This seems like it was a mistake/oversight)

## Rendered

<img src="https://app.graphite.dev/user-attachments/assets/1b4712ba-c2f3-4b02-81ec-f1f9267a545e.png" width=700>

<img src="https://app.graphite.dev/user-attachments/assets/6ce60399-8623-4357-8cc1-6443d23eb3c2.png" width=700>

<img src="https://app.graphite.dev/user-attachments/assets/36ae8a63-5429-4134-bafd-e0f52b34f718.png" width=700>
2025-09-22 16:22:38 -07:00
Jiwon Choi 9ee864e34c [Breaking] Remove deprecated publicRuntimeConfig and serverRuntimeConfig (#83944)
This PR removed the deprecated runtime configs.

https://github.com/vercel/next.js/blob/74b226fe4afc7149901affc3c005476e9e592315/docs/02-pages/04-api-reference/04-config/01-next-config-js/runtime-configuration.mdx#L6-L8

This way, we can use the serialized next config for the prod server.
2025-09-22 20:11:58 +02:00
Benjamin Woodruff 0761a92514 Turbopack: Document new advanced turbopack.rule.*.condition config options (#83246)
~I'm looking for review/feedback, but **DO NOT MERGE UNTIL NEXT 16.0 IS RELEASED.** These APIs are not available on 15.5, and merging it now would be confusing to users. If you want to try it out, use a recent canary release.~ I've been informed that docs are not currently tracking canary, so this is safe to merge.

Documented the new configuration syntax added in https://github.com/vercel/next.js/pull/82857 that should ship with Next 16.0.

## Rendered

<details>
<summary>Toggle</summary>
<img src="https://app.graphite.dev/user-attachments/assets/b2404001-6e3f-47c9-9704-160fcfb1438d.png" width=1000>
</details>
2025-09-22 09:21:16 -07:00
François Martin af9298cc38 Fix TypeScript type error in example code (#84041)
Without the `| null`, the following error appears during compilation:
```
TS2322: Type RefObject<HTMLDivElement | null> is not assignable to type RefObject<HTMLDivElement>
Type HTMLDivElement | null is not assignable to type HTMLDivElement
Type null is not assignable to type HTMLDivElement
```

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-09-22 13:29:45 +02:00
Milancen123 2d96b9660f docs: add pageExtensions note to Middleware and clarify default filename (#84045)
- Added a Note to the Middleware docs explaining that when
`pageExtensions` are customized (e.g. `.page.ts`), the Middleware file
should be named `middleware.page.ts` or `middleware.page.js`.
- Updated wording so `middleware.ts/js` is described as the default
filename, not a strict requirement.

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

### 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?

-Added a callout note to middleware.mdx stating that if pageExtensions
is customized (e.g., .page.ts), the Middleware file should also match
(middleware.page.ts/js).
-Updated the language from “must” → “default is” for filename clarity.


### Why?

-Developers customizing pageExtensions were misled by the existing docs,
which implied middleware.ts/js was always required.
-This PR prevents confusion when Middleware isn’t recognized after a
pageExtensions change.


### How?
Edited docs/app/api-reference/file-conventions/middleware.mdx.
Inserted a > **Note** block right after the paragraph explaining where
to create the middleware file.


Closes NEXT-
Fixes #84008

-->

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-09-22 11:24:57 +02:00
Joseph 9d73c86403 docs: We have dropped the CORS example linked (#84065)
We have dropped the example linked in this page. I'll re-evaluate later
if the section is still enough for a dev to understand how to set CORS
related headers.
2025-09-22 10:46:33 +02:00
Anvi Banga 936a4b83d3 Add Descope to Auth libraries list (#83968)
Add Descope to Auth libraries list as mentioned
[here](https://github.com/vercel/next.js/pull/75667#issuecomment-3309812276)

Co-authored-by: Allen Zhou <46854522+allenzhou101@users.noreply.github.com>
2025-09-18 15:58:37 -07:00
Felix Shih 4d047b28be fix: add the missing comma in the document example (#83932)
### What?
This PR fixes a missing comma in the function parameter in
`03-api-reference/03-file-conventions/layout.mdx`.

The comma between `children` and `params` parameters was missing in the
documentation example, showing incorrect syntax.

### Why?
The missing comma in the documentation example shows invalid
JavaScript/TypeScript syntax.

### How?
- Added missing comma after `children` parameter .

**Before:**
```tsx filename="app/dashboard/[team]/layout.tsx" switcher
export default async function Layout({
  children
  params,
}: {
```

**After:**
```tsx filename="app/dashboard/[team]/layout.tsx" switcher
export default async function Layout({
  children,
  params,
}: {
  children: React.ReactNode
```
2025-09-18 08:11:46 +00:00
Jiwon Choi 09c5a7c121 docs: add next.config.ts Node.js native resolver (#83561)
This PR adds docs for using Node.js native TS resolver for
`next.config.ts`. It states:

- Supports Node.js native TS resolver
- Why use it
- How to use it
- Restrictions
- Why use `next.config.mts`

I didn't mention how much it's faster compared to the legacy resolver
(~68% faster in the hello world app -
[link](https://github.com/vercel/next.js/pull/83240)) because the
experience may vary for users.

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
Co-authored-by: Abdón Rodríguez <a@abdonrd.com>
2025-09-17 21:12:31 +02:00
Lee Robinson 12e64cf0ae docs: Update command to use npx for tracing files (#83903)
This was easier than needing to modify `package.json` or similar. Thank
you!

_(Hello from the otheeerr siiiiiiiddeeee 🎶)_
2025-09-17 18:25:33 +02:00
Joseph a4be33e9d1 docs: the as prop is still available in Pages Router (#83864)
We accidentally removed the documentation for `as` prop in Pages Router
`next/link`.

Closes:
https://linear.app/vercel/issue/DOC-3140/add-missing-props-as-to-nextlink-reference-page
2025-09-17 15:21:18 +02:00
Yousef Dawood a096e3ea73 Update generate-metadata.mdx (#81853)
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Joseph <sephxd1234@gmail.com>
Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-09-17 10:33:36 +02:00
Benjamin Woodruff bba9b2f366 docs: Fix self-referential link to Middleware in middleware.mdx (#83854)
This link was to the current page, which isn't very useful.

Link to the getting started page
(https://nextjs.org/docs/app/getting-started/route-handlers-and-middleware#middleware)
instead
2025-09-16 22:50:47 +02:00
Joseph aab50c395b docs: implications of mutating cookies in server actions (#83691)
Ref: https://github.com/vercel/next.js/discussions/83481 Closes:
https://linear.app/vercel/issue/DOC-5070/mutating-cookies-invalidates-router-cache

Making sure those using cookies in server actions, know that the server
tree is re-rendered and merged with the current client tree.
2025-09-16 15:18:32 +02:00
Joseph e2f7cb206d docs: Type narrowing using LayoutProps, PageProps (#83692)
Make a couple of clarifications:

- type resolved by the helpers
- ways to narrow down to a narrower union

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Rich Haines <hello@richardhaines.dev>
2025-09-16 14:19:56 +02:00
Vladimir Bagdeev 8b17a636bc Removed link to maintain text consistency (#83644)
<!-- 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

### 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? Removed link 
### Why? To maintain text consistency. There are four includes of
'browser’s history stack' and two of them contain link with different
style.
### How?

Closes NEXT-
Fixes #

-->

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-09-16 10:41:11 +02:00
Aymeric PINEAU 721def6b58 Update next-intlayer reference in i18n doc (#83761)
[`next-intlayer`](https://intlayer.org/doc/environment/nextjs) is an
i18n library that adopts a per-component approach to manage multilingual
content in a next.js application.

### Changes
- Fix doc related to page-router documentation,
- And add App Router realted doc.

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-09-15 16:09:42 +02:00
Luca Krebs deee6f3089 docs(data-security): add bun package manager example (#83735)
Adds the `bun add server-only` command to the data security guide.

This change adds the missing Bun package manager example to the
`docs/01-app/02-guides/data-security.mdx` file, ensuring consistency
with other documentation sections.

Fixes #83734

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-09-15 15:51:41 +02:00
David 716bc0e420 docs(metadata): align default function export name with file name (#83796) 2025-09-15 13:38:54 +02:00
Joseph a63cd29bae Docs/sep paper cuts (#83689)
Addressing `papercuts` found this month

- Fixes: #83622
2025-09-12 15:12:04 +02:00
Mohammad Nedaeifard 8348bd32ad Update content-security-policy.mdx, fix development environment error (#83665)
fix _nextjsDevtools csp error which happens in development environment
after enabling csp and following the current documents.

Full Error:
- Refused to apply inline style because it violates the following
Content Security Policy directive: "style-src 'self'
'nonce-YmYyMTZmYTQtMzgxNy00ZjYwLWIwMGQtYjBmYjJjNGYzZWQ1'
'unsafe-inline'". Note that 'unsafe-inline' is ignored if either a hash
or nonce value is present in the source list.

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

### 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: Joseph <joseph.chamochumbi@vercel.com>
2025-09-11 23:07:49 +02:00
Joseph 7a76e9fa68 docs: rewrite+usePathname+prerender hydration error mitigation (#83462)
Closes:
https://linear.app/vercel/issue/DOC-5040/usepathname-and-rewrites
2025-09-09 15:14:57 +02:00
pontasan 90c5a66bfa Docs: Add authentication note for external/internal image sources (#83469)
**Summary**  
This PR adds a note to the documentation clarifying the behavior when
using external or internal URLs (API Routes) as image sources with
Next.js Image Optimization.
This change addresses issue #82610.  

**Details**  
- Added a note explaining that, for security reasons, request headers
are not forwarded to API Routes or external URLs when Image Optimization
is used.
- Documented that if image data requires authentication, the
`unoptimized` property should be considered to disable Image
Optimization.

**Why**  
Users may be confused when trying to load images from endpoints that
require authentication. This clarification helps developers understand
the limitation and how to handle such cases.

**References**  
- [Vercel Changelog:
CVE-2025-57752](https://vercel.com/changelog/cve-2025-57752)
- [Next.js GitHub Issue
#82703](https://github.com/vercel/next.js/issues/82703)

---

resolves #82610

---------

Co-authored-by: Joseph <sephxd1234@gmail.com>
Co-authored-by: Steven <steven@ceriously.com>
2025-09-08 14:47:17 +00:00
Honda Yuto a225045924 Docs: Fix broken getImageProps sample code (#83436)
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2025-09-04 17:18:12 +02:00
Steven 07e9324016 feat(next/image): introduce preload prop and deprecated priority prop (#83351)
The Image component's existing `priority` prop is confusing since its
not obvious what it does.

In order to improve clarity, we are introducing a `preload` prop and
deprecating the `priority` prop.

We also updated the dev warning to no longer suggest using this prop for
the LCP and instead use `loading="eager"`.
2025-09-04 13:50:17 +00:00
Joseph db1de21e25 docs: Middleware explicit runtime differences (#83348)
In previous docs versions, while not explicitly stated, it was rather
clearer that middleware has its own runtime.

Also, people who have used bundle-analyzer would for example be familiar
with the 3 bundles, or those who have worked with
`next.config.js`/instrumentation would understand that there's some
different runtimes at play going on there, but those who exclusively
work with middleware might still miss on this detail.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-09-04 09:04:06 +02:00
Bülent Güven fc6e3dbc5b Update next-response.mdx (#83302)
This PR aims to fix a typo in documentation

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-09-03 23:31:27 +00:00
geraldochristiano ce359e0065 Fixed broken link in backend-for-frontend.mdx (#83310)
Broken link to API Routes in Pages Router

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-09-03 23:25:35 +00:00
Joseph d373280a90 docs: relative links that were absolute (#83317)
Certain relative links were absolute, which renders them with the ->
external arrow - might have been a decision per case, but AFAIK, this is
only helpful for those links that are now redirecting to other content
2025-09-03 13:38:07 +02:00
Joseph 5cf762235a docs: Improve troubleshooting and awareness around useSearchParams (#83226)
Closes: https://linear.app/vercel/issue/DOC-5030/usesearchparams
2025-09-02 23:07:41 +02:00
Joseph f49402c7ff docs: use-link-status as a subtle hint (#83104)
Let's try to change how we present useLinkStatus - it could be misused
to overuse loading spinners next to links - which can cause layout
shifts.

Closes:
https://linear.app/vercel/issue/DOC-5028/uselinkstatus-reformulation

---------

Co-authored-by: Ian Jones <witspr@gmail.com>
2025-09-02 19:52:55 +02:00
Steven e33a128da4 BREAKING CHANGE!: next/image only allow quality 75 by default (#83175)
## Background
We have default allowlists for the `url` (localPatterns/remotePatterns
config) and `w` (imageSizes/deviceSizes config) but we don't have a
default allowlist for `q` (currently opt-in with via qualities config).

## What's changing?
BREAKING CHANGE: This PR is a breaking change that sets the default
allowlist to `qualities: [75]`, meaning that anything other than 75 is
invalid. Since most images don't set the quality prop and therefore
default to 75, most apps will be unaffected.

However, we can be even more gracious when users upgrade because we can
coerce the value automatically to 75 (or rather any value in `qualities`
allowlist). In dev, this will print a warning explaining why the prop
was not observed. This also works if you had `qualities` configured but
removed 75, since the closet matching value in the array will be used
instead.
2025-09-02 19:26:14 +02:00
Neko 9163d25a3c docs: use resourceFromAttributes to replace new Resource() to obtain Resource (#83321)
### What?

By following the default method to integrate OpenTelemetry in Next.js
applications... this error occurs:

```
'Resource' only refers to a type, but is being used as a value here.
```

### Why?

`Resource` presented here as a `interface` or type only definition, as
specified in OpenTelemetry's repo,
https://github.com/open-telemetry/opentelemetry-js/blob/2d544088ac9a4bcb07986be7d9cdc2d0688e7b44/packages/opentelemetry-resources/src/Resource.ts#L20-L30:

> This interface is NOT user-implementable. Valid ways to obtain a
{@link Resource} are by using either of these functions
> -
[`resourceFromAttributes`](https://github.com/open-telemetry/opentelemetry-js/blob/2d544088ac9a4bcb07986be7d9cdc2d0688e7b44/packages/opentelemetry-resources/src/ResourceImpl.ts#L149)
> -
[`emptyResource`](https://github.com/open-telemetry/opentelemetry-js/blob/2d544088ac9a4bcb07986be7d9cdc2d0688e7b44/packages/opentelemetry-resources/src/ResourceImpl.ts#L163)
> -
[`defaultResource`](https://github.com/open-telemetry/opentelemetry-js/blob/2d544088ac9a4bcb07986be7d9cdc2d0688e7b44/packages/opentelemetry-resources/src/ResourceImpl.ts#L167)
> -
[`detectResources`](https://github.com/open-telemetry/opentelemetry-js/blob/2d544088ac9a4bcb07986be7d9cdc2d0688e7b44/packages/opentelemetry-resources/src/detect-resources.ts#L27)

### How?

By default, we use `resourceFromAttributes` for OTEL resources with
attributes.


Fixes: https://github.com/vercel/next.js/issues/77451

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-09-02 18:57:41 +02:00
Remco Haszing 7aa5d16231 Use the automatic runtime for type checking (#83159)
Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com>
2025-09-02 12:35:42 +02:00