- 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 15 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>
-
Vercel Release Bot authored
-
Sebastian "Sebbie" Silbermann authored
-
Jiachi Liu authored
### What Those metadata were added into error boundaries but they're actually duplicated, we already have the actual metadata in the page and the metadata outlet can trigger the error boundary. The metadata element in the error boundary is not necessary.
-
- 04 Mar, 2025 10 commits
-
-
vercel-release-bot authored
-
Tobias Koppers authored
### What? * avoid single entry sectioned source maps * avoid empty generated source map sections
-
Sam Ko authored
## Why? Updating Tailwind templates to closer match the non-Tailwind template. (before, `localhost:3000` is current Tailwind template) https://github.com/user-attachments/assets/b5bef4c7-0c22-43e2-87f1-2dbd4903ea0f (after) https://github.com/user-attachments/assets/5b1d087c-60e6-45fc-b749-f3894834e339 - Minor fix to `a.secondary` style's `min-width` to be the same width as `a.primary` - --------- Co-authored-by:
Lee Robinson <lee@leerob.com>
-
Steven authored
The docs for `minimumCacheTTL` showed the default but didn't show an example of changing it. Based on looking at many websites and the frequency those images change, I think 31 days is a good choice.
-
Lee Robinson authored
-
Niaz Morshed Nayeem authored
-
Sebastian "Sebbie" Silbermann authored
-
Sebastian "Sebbie" Silbermann authored
Fixes https://github.com/vercel/next.js/actions/runs/13651039022/job/38159568577?pr=76787#step:33:639 Sometimes we didn't get to assert in time before more errors come in. Now the test ensures that each error is intentional.
-
Sebastian "Sebbie" Silbermann authored
-
Sebastian "Sebbie" Silbermann authored
Missing stack tracked in https://linear.app/vercel/issue/NDX-920/
-