3167 Commits

Author SHA1 Message Date
next-js-bot[bot] d0ac8828c2 v16.3.2 2026-08-21 09:07:01 +00:00
next-js-bot[bot] 3d32eb870f v16.3.1 2026-08-13 22:06:37 +00:00
next-js-bot[bot] d73f5622e2 v16.3.0 2026-08-03 20:06:44 +00:00
Aurora Scharff 8a4920c15a docs: clarify first-party Skills workflows (#96495)
## Summary

- clarify how runtime foundations, interactive workflows, and unattended
loops fit into the AI agents and Instant Navigation guides
- harden the Cache Components and Partial Prefetching Skills around
capability checks, trustworthy `instant()` tests, route scope, and
real-app verification failures
- add migration-guide comments to temporary Partial Prefetching route
config and update `remove-partial-prefetch` to remove only generated
comments while preserving runtime-prefetch TODOs and user comments

This keeps the experimental Partial Prefetching optimizer in #96471
separate.

## Testing

- `pnpm --filter @next/codemod build`
- `pnpm --filter @next/codemod test --
transforms/__tests__/remove-partial-prefetch.test.js --runInBand`
2026-08-03 19:23:56 +00:00
next-js-bot[bot] 4fd843fb48 v16.3.0-canary.107 2026-08-02 23:34:28 +00:00
next-js-bot[bot] 9480f7f9ff v16.3.0-canary.106 2026-08-01 23:33:55 +00:00
next-js-bot[bot] a8dcd2562f v16.3.0-canary.105 2026-07-31 23:35:12 +00:00
next-js-bot[bot] 38f0cdee46 v16.3.0-canary.104 2026-07-30 23:34:58 +00:00
next-js-bot[bot] f3edea1b06 v16.3.0-canary.103 2026-07-29 23:35:42 +00:00
next-js-bot[bot] 0d5ff0d321 v16.3.0-canary.102 2026-07-28 23:34:15 +00:00
next-js-bot[bot] cf1e001f40 v16.3.0-canary.101 2026-07-28 20:51:42 +00:00
next-js-bot[bot] 267d6b1a17 v16.3.0-canary.100 2026-07-28 20:42:44 +00:00
next-js-bot[bot] ad618bf13f Restore canary version 16.3.0-canary.99 after v16.3.0-preview.10 preview release 2026-07-28 15:54:36 +00:00
next-js-bot[bot] 35917f58d2 v16.3.0-preview.10 2026-07-28 15:54:33 +00:00
next-js-bot[bot] e70495c1ee v16.3.0-canary.99 2026-07-28 14:57:37 +00:00
next-js-bot[bot] aae4179ac6 v16.3.0-canary.98 2026-07-27 23:36:11 +00:00
next-js-bot[bot] 367e5215bf v16.3.0-canary.97 2026-07-25 23:35:04 +00:00
next-js-bot[bot] 4a432e4d79 v16.3.0-canary.96 2026-07-24 23:35:57 +00:00
next-js-bot[bot] cf10c50a65 v16.3.0-canary.95 2026-07-23 23:33:24 +00:00
next-js-bot[bot] 5d662af3cd Restore canary version 16.3.0-canary.94 after v16.3.0-preview.9 preview release 2026-07-23 12:18:57 +00:00
next-js-bot[bot] 838bd19bde v16.3.0-preview.9 2026-07-23 12:18:54 +00:00
next-js-bot[bot] b2144ddb79 v16.3.0-canary.94 2026-07-22 23:34:52 +00:00
next-js-bot[bot] 66c2e0a2ab Restore canary version 16.3.0-canary.93 after v16.3.0-preview.8 preview release 2026-07-22 09:55:36 +00:00
next-js-bot[bot] bedbdcfe66 v16.3.0-preview.8 2026-07-22 09:55:34 +00:00
Sebastian "Sebbie" Silbermann 1353c78815 Always consult npm_config_user_agent first (#95879)
The `getPkgManager` helpers previously consulted the filesystem first
for files hinting at the used package manager. Only if none were found
did we check `process.env.npm_config_user_agent` and then shelled out to
testing which package manager is available.

This change makes all helpers check the `npm_config_user_agent`
environment variable first. The variable is set by the package manager
that invoked the process, so when present it is both the cheapest and
the most direct signal, avoiding filesystem access and subprocess spawns
entirely. `create-next-app` already used this user-agent-first approach
and is unchanged.

The check order is now consistent across all three implementations:
yarn, pnpm, bun, npm for the user agent (the `packages/next` variant has
no `bun` in its `PackageManager` type and falls through to lockfile
detection there), and the same order for the codemod's lockfile walk,
which previously prioritized `package-lock.json`.

Because the invoking package manager now takes precedence over lockfile
inference, running `npx next ...` or `npx @next/codemod ...` inside a
pnpm or yarn app is now detected as npm. Use `pnpx` (or `pnpm dlx`) and
`yarn dlx` instead so the detected package manager matches the project.
2026-07-22 11:52:14 +02:00
next-js-bot[bot] c77f3ded55 v16.3.0-canary.93 2026-07-21 23:34:26 +00:00
next-js-bot[bot] 4d122a7df1 Restore canary version 16.3.0-canary.92 after v16.3.0-preview.7 preview release 2026-07-21 18:02:33 +00:00
next-js-bot[bot] d4b0dc3158 v16.3.0-preview.7 2026-07-21 18:02:30 +00:00
next-js-bot[bot] 80fd3fed69 v16.3.0-canary.92 2026-07-21 17:27:08 +00:00
Sam Poder e90189b940 [turbopack] Rename turbopackTreeShaking to turbopackModuleFragments (#95978)
This has been causing a lot of confusion when contributors have been
debugging tree shaking, eg.
https://github.com/vercel/next.js/issues/95698 and the linked issues.
Turbopack's standard tree-shaking features are controlled through the
`turbopackRemoveUnusedExports` and `turbopackRemoveUnusedImports`
options which default to true.
2026-07-20 18:14:11 -07:00
next-js-bot[bot] 4dea35dbd2 v16.3.0-canary.91 2026-07-20 23:34:46 +00:00
next-js-bot[bot] 163e45e401 v16.3.0-canary.90 2026-07-19 23:34:16 +00:00
next-js-bot[bot] 0491db047b v16.3.0-canary.89 2026-07-17 23:32:07 +00:00
next-js-bot[bot] 68033b385a v16.3.0-canary.88 2026-07-16 23:32:58 +00:00
next-js-bot[bot] 50925bb80a v16.3.0-canary.87 2026-07-15 23:34:23 +00:00
next-js-bot[bot] 4f69a33548 v16.3.0-canary.86 2026-07-14 23:31:39 +00:00
Aurora Scharff 420ab0c7e1 docs: add route-side URL data audit to the Partial Prefetching adoption guide (#95389)
## What

Follow-up to #95365. Documents adopting Partial Prefetching end to end:

- Restructures the [Adopting Partial Prefetching
guide](https://github.com/vercel/next.js/blob/canary/docs/01-app/02-guides/adopting-partial-prefetching.mdx)
around the two paths: enable `partialPrefetching` and audit every `<Link
prefetch={true}>` against a per-case decision table, or adopt
incrementally per route with the
[`instant-link-prefetch-partial`](https://nextjs.org/docs/messages/instant-link-prefetch-partial)
insight as the worklist. Adds `Auditing routes for URL data` and
`Prefetching URL data` sections.
- Adds the `remove-partial-prefetch` codemod, which strips the redundant
per-route `prefetch = 'partial'` exports once the flag is on while
preserving comments and other `prefetch` values.
- Adds the `next-partial-prefetching-adoption` skill that sequences the
guide for agents: audit, enable + codemod, URL-data sweep, verify,
optional runtime prefetching.
- Aligns the `instant-link-prefetch-partial` error page, `<Link>`
reference, glossary, and Interactive apps guide with the same prefetch
model.

## Why

With the flag on, `<Link prefetch={true}>` no longer delivers dynamic
content, and shell validation flags `params`/`searchParams` reads
outside `<Suspense>`. Adopters need one guide that sequences the audit,
the flag, and both insights, and an agent skill that follows it.

Stacked on #95365 (base: `codex/instant-shell-link-data`) since it links
to the `instant-shell-url-data` error page that PR introduces. GitHub
will retarget to `canary` when that merges.

<!-- NEXT_JS_LLM_PR -->
2026-07-14 20:22:00 +02:00
next-js-bot[bot] 1ecd8f1b63 v16.3.0-canary.85 2026-07-13 23:32:10 +00:00
next-js-bot[bot] 08f7c980bf Restore canary version 16.3.0-canary.84 after v16.3.0-preview.6 preview release 2026-07-13 19:58:15 +00:00
next-js-bot[bot] ea219c9088 v16.3.0-preview.6 2026-07-13 19:58:13 +00:00
next-js-bot[bot] a7bf1202de v16.3.0-canary.84 2026-07-12 23:33:22 +00:00
next-js-bot[bot] 1bd2fd585a v16.3.0-canary.83 2026-07-10 23:34:00 +00:00
next-js-bot[bot] a30d8b2c17 v16.3.0-canary.82 2026-07-09 23:41:26 +00:00
Jude Gao 86ff18a4be Refresh outdated agent-rules blocks on next dev and codemod upgrade (#95470)
Once the managed agent-rules block is installed, `next dev` never
touches it again — `ensureAgentRulesForDev` gates on marker presence —
and `@next/codemod upgrade` doesn't refresh it either, so changes to the
block's content (like the wording fix in #95467) never reach existing
projects.

`next dev` now gates on `hasCurrentAgentRules` and re-upserts a block
whose content differs from canonical, targeting whichever file already
hosts it so an upgrade rewrites the block in place instead of
duplicating it into a second file; legacy `NEXT-AGENTS-MD` blocks
migrate the same way, and CRLF files keep their line endings.
`@next/codemod upgrade` refreshes the block after the version bump by
delegating to the installed package's own generator
(`next/dist/server/lib/generate-agent-files`), so the codemod never
carries a copy of the wording and no-ops below 16.3 or when the project
never adopted the block. A malformed block (start marker without end)
converges to a single canonical block within two runs rather than
growing unboundedly.

The e2e test now covers the in-place upgrade (surrounding content
preserved, exactly one block, no `CLAUDE.md` created when `AGENTS.md`
hosts it) and idempotence across dev-server restarts, using the real
generator's output rather than hardcoded wording.
2026-07-08 22:58:49 -04:00
next-js-bot[bot] 4bfa190166 v16.3.0-canary.81 2026-07-08 23:37:00 +00:00
next-js-bot[bot] 9dd6d677b6 v16.3.0-canary.80 2026-07-07 23:33:18 +00:00
next-js-bot[bot] b275ca597d v16.3.0-canary.79 2026-07-06 23:37:56 +00:00
next-js-bot[bot] 0059804503 v16.3.0-canary.78 2026-07-04 23:35:17 +00:00
next-js-bot[bot] 65dbff0a82 v16.3.0-canary.77 2026-07-03 23:36:36 +00:00
next-js-bot[bot] 7e2efbc85f v16.3.0-canary.76 2026-07-02 23:37:12 +00:00