- 07 Mar, 2025 13 commits
-
-
vercel-release-bot authored
-
Zack Tanner authored
When the router returns an aliased prefetch for URLs to the same path but with different search params, there's the possibility that we trigger an MPA-style navigation if the path doesn't contain a valid flight payload (eg: a route handler, a `pages` router page, or an external URL). The logic to bail out of the alias handling was happening _after_ this, which meant the incorrect searchParams would be applied to the final URL. This ensures that if we bail out of applying the alias (eg because it's not a valid RSC payload, or the aliased entry has no reusable loading segment), then we re-run the navigation with a non-aliased entry. Fixes #75318 Closes NDX-804
-
Zack Tanner authored
When Turbopack creates the default not-found entry, it does so without providing a default root layout in case one is missing. This works ok in Webpack since the `default-layout` is correctly added in [next-app-loader](https://github.com/vercel/next.js/blob/4518bc91641a0fd938664b781e12ae7c145f3396/packages/next/src/build/webpack/loaders/next-app-loader/index.ts#L339-L342). Looking at the [original PR](https://github.com/vercel/next.js/pull/54199) that added `default-layout` it seems it was only really ever intended for the not-found entrypoint since in all other cases, a missing root layout means we create one for you in dev and in build it'd be a hard error. This also includes the other defaults that are correctly added in other entries to match Webpack behavior. Though I'm not sure the presence of these makes a difference when rendering the not found page Closes NDX-858
-
Benjamin Woodruff authored
fix(turbopack): Use vergen-gitcl instead of shadow-rs (or vergen-git2) for napi and next-api crates to fix stale git lock files (#76889) This does not depend on libgit2 which apparently breaks our builds on some platforms. Instead it uses the git CLI using my PR: https://github.com/rustyhorde/vergen/pull/406 Original PR: https://github.com/vercel/next.js/pull/76773 Revert: https://github.com/vercel/next.js/pull/76879 Manually triggered CI run to try to build all platforms: https://github.com/vercel/next.js/actions/runs/13711866131
-
Jiachi Liu authored
### What Mention it's experimental feature and maintained by react team, we're still developing it --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Niklas Mischkulnig authored
`HashMap` strikes again, causing the server action manifest order to be non-deterministic. Less test flakeyness for `app-dir - server-action-period-hash-custom-key should have different manifest if the encryption key from process env is same`
-
Niklas Mischkulnig authored
`__dirname` was always `undefined` due to a typo. This was a regression from https://github.com/vercel/next.js/pull/75358, the PR restores the behavior of 15.1.7 Closes #76497 Closes PACK-4060
-
rauno authored
Fixes lack of padding on the right if there is no `x` close button  After the changes:  --- Closes DSN-756
-
Vercel Release Bot authored
-
Sebastian "Sebbie" Silbermann authored
-
Donny/강동윤 authored
### What? Fix warning like <img width="909" alt="image" src="https://github.com/user-attachments/assets/f29a7a65-d032-4f95-ba39-480302ff566a" /> ### Why? I made a mistake in https://github.com/vercel/next.js/pull/76144
-
Donny/강동윤 authored
### What? See release note: https://github.com/parcel-bundler/lightningcss/releases/tag/v1.29.2 ### Why? To keep in sync.
-
Lee Robinson authored
-
- 06 Mar, 2025 15 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
This ensures we don't allow cross-origin requests to be made to `/_next` resources in dev mode. This matches existing handling that webpack-dev-middleware does as well.
-
Donny/강동윤 authored
### What? ChangeLog: https://github.com/swc-project/swc/compare/swc_core%40v16.0.0...swc_core%40v16.4.0 ### Why? To apply https://github.com/swc-project/swc/pull/10119 and fix random panics. --------- Co-authored-by:
CPunisher <1343316114@qq.com>
-
Benjamin Woodruff authored
Revert "fix(turbopack): Use vergen-git2 instead of shadow-rs for napi and next-api crates to fix stale git lock files" (#76879) Reverts vercel/next.js#76773 > Looks like we broke compilation for our linux swc builds for musl/gnu
-
Benjamin Woodruff authored
fix(turbopack): Use vergen-git2 instead of shadow-rs for napi and next-api crates to fix stale git lock files (#76773) Both `shadow-rs` and `vergen-gitcl` call out to the git CLI, which takes optional locks to update the index: https://git-scm.com/docs/git-status#_background_refresh This is why we sometimes find ourselves with stale `.git/index.lock` files. Using a lightly patched version of https://github.com/martinpitt/fatrace (to look up parent process names) shows this:  `shadow-rs` has a `git2` feature (enabled by default), but that doesn't prevent it from running the git CLI. Instead it runs *both* and overwrites some values. `vergen-git2` only uses `libgit2` and does not invoke the CLI. This fixes things because `libgit2` disables `GIT_STATUS_OPT_UPDATE_INDEX` by default. Additionally, after looking through both codebases, I've decided I like `vergen`'s implementation a bit more than `shadow-rs`'s. Supposedly, `git`'s command-line should support a `GIT_OPTIONAL_LOCKS=0` environment variable to disable this behavior, but I'm still finding the lock written to when trying to use that. I'm still investigating if I can use something like this to contribute a proper fix upstream to these crates.
-
Sebastian "Sebbie" Silbermann authored
-
Will Binns-Smith authored
Test Plan: `pnpm test-start-rspack test/integration/server-side-dev-errors/test/index.test.js` passes
-
Will Binns-Smith authored
Test Plan: `pnpm test-dev-rspack test/development/acceptance/ReactRefreshLogBox-app-doc.test.ts` passes
-
Tim Neutkens authored
Work in progress for PACK-4071 (implementing `config.deploymentId`) - [x] Implement `?dpl={config.deploymentId}` in client references manifest - [x] Implement `?dpl={config.deploymentId}` in Turbopack chunk loading - [x] Add `__turbopack_load_by_url__` - [ ] Change react-dom-turbopack to use __turbopack_load_by_url__ Last item will be a follow-up PR to this one, given it's already a large enough change in chunk loading right now. <!-- 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 # --> -
Niklas Mischkulnig authored
Using this would break the module graph and chunking now anyway .
-
Niklas Mischkulnig authored
That `add_pure_comment(dummy_pure_span)` shouldn't be necessary with `PURE_SP`.
-
Donny/강동윤 authored
### What? ### Why? For description about the `resolver`/`hygiene` system, please see https://rustdoc.swc.rs/swc_core/ecma/transforms/base/fn.resolver.html ### How? - Closes https://github.com/vercel/next.js/issues/72232 - Closes PACK-3372 - Closes https://github.com/vercel/next.js/issues/73383 - Closes PACK-3586 --------- Co-authored-by:
Benjamin Woodruff <benjamin.woodruff@vercel.com> Co-authored-by:
Tobias Koppers <tobias.koppers@googlemail.com>
-
JJ Kasper authored
Ensures we use the new turbo command for global turbo without repo dependencies being installed. x-ref: https://github.com/vercel/next.js/actions/runs/13688466017/job/38277118036?pr=76849
-
Zack Tanner authored
We currently vendor `platform` and `medialize/ally` to tackle focus trapping in the error overlay. We already use a custom focus trap util for most cases such as the indicator / popover, so there isn't much reason to have forked handling here, and `platform` is quite large. https://github.com/user-attachments/assets/1bc8a065-9892-4ce1-90a3-c714479dc236 Closes NDX-877
-
Janka Uryga authored
If we run two or more actions, the first starts executing immediately, and the rest gets queued. The bug here was that if we navigated right after, the navigation would make us drop the rest of the queue, which would cause all the queued action calls to never resolve.
-
- 05 Mar, 2025 12 commits
-
-
vercel-release-bot authored
-
Jiachi Liu authored
### What When client sends and Server Action request with `notFound()` inside, next-server will serve the RSC payload in response but we were also serving a fallback `robots=noindex` metadata for 404 requests. This will be a conflict for users custom metadata. The fallback `robots=noindex` for 404 response was for initially for pages rendering request. Here we skip it for the dynamic RSC to avoid user's metadata being de-prioritized due to the fallback `robots=noindex` taking precedence. We also add a test that it won't break form action, where when JS is disabled and notFound involked, the new page can still be served with fallback noindex Fixes NDX-953
-
Janka Uryga authored
`__next_app__.require` and `__next_app__.loadChunk` were typed as `any` for no good reason. i made them more strict + adjusted callsites as needed. also contains a drive-by fix for `wrapClientComponentLoader` -- it was using a `try ... finally` without awaiting, so it wasn't measuring anything (because `loadChunk`, being async, would always return immediately)
-
Vercel Release Bot authored
-
Tobias Koppers authored
### What? * handle task cancelation * wait for stopping turbo-tasks before running exit handlers * sort all output manifests
-
Hendrik Liebau authored
Reflect team changes.
-
Janka Uryga authored
`handleAction` had a weird spot where it'd add a `set-cookie` header if a redirect was thrown during handling a no-js action. AFAICT, this is unnecessary -- we set the `set-cookie` header on the response as soon as `cookies().set()` is called, so there's no need to set the cookies again in that branch of the handler. this is done through a combination of the patched setter from `RequestCookies`: https://github.com/vercel/next.js/blob/0abd87717f19bced6c35af1255837628513cf772/packages/next/src/server/web/spec-extension/adapters/request-cookies.ts#L160-L171 and this cookie updating function from the request store (which `updateResponseCookies` above would invoke with the new cookies): https://github.com/vercel/next.js/blob/0abd87717f19bced6c35af1255837628513cf772/packages/next/src/server/async-storage/request-store.ts#L170-L174 i've also added a test for this specific scenario to ensure that this wasn't actually doing anything useful.
-
Niklas Mischkulnig authored
Should make the output more deterministic. We could change these to instead use our own `SliceMap`, but these aren't stored anywhere.
-
rauno authored
The current animation strategy for our Dev Tools surface does not work. https://github.com/user-attachments/assets/a0ca5459-9d5a-4d90-af00-b071d43581e0 On page load, several animations can be observed: - Width growth from `0` → `auto` - Issue count translates and fades, along with the plural `s` suffix - A subtle scale bounce effect plays All these animations are state transitions, and thus we should ignore them completely on page load or on high-frequency updates where animating is undesirable, e.g. sometimes `issueCount` will receive updates faster than the animation can run. This PR implements checks to guard the animations from being executed on page load, _and only_ during state transitions. To review, it is worth checking out the [/animation-test](https://github.com/vercel/next.js/blob/a6e6fe635b712020d4ea2d027040d838eb5941c6/test/development/app-dir/hydration-error-count/app/animation-test/page.tsx) fixture I've set up in this PR. After these changes, the experience is as follows—no animations on page load, but only on subsequent low-frequency updates (count change, or collapse of the surface): https://github.com/user-attachments/assets/7b2d5e0d-64ec-4165-b5e2-85489bd00a2c _Note: I am not using Storybook for a page load reference, the apps under `test/development/app-dir/*` are more reliable._
-
Sam Ko authored
docs(errors): remove confusing good-to-know since global-errors.tsx also show in dev as of 15.2 (#76825) ## Why? The "Good to know" has a typo, and it is probably better not mentioned. The https://nextjs.org/docs/app/building-your-application/routing/error-handling#handling-global-errors page does not mention (the fact that `global-errors.tsx` now show in `next dev`) it either.
-
Jiachi Liu authored
Add a new page for the experimental flag `viewTransition`
-
Jude Gao authored
Co-authored-by:Jimmy Lai <laijimmy0@gmail.com>
-