- 17 Mar, 2025 9 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
Per feedback in https://github.com/vercel/next.js/pull/76880 this ensures we ocnsider `*.localhost` as allowed by default for the dev origins list.
-
Zack Tanner authored
This unifies the CSRF origin detection to mirror what we do for server action origins, which supports things like wildcard matches (below the domain level) Fixes #76999
-
JJ Kasper authored
Adding a warning when we block cross-origin requests in dev so users are aware this is why easier and know how to allow the origin through as custom setups can use different origins and it be valid. x-ref: https://github.com/vercel/next.js/pull/76880#issuecomment-2718487112 --------- Co-authored-by:
Jiachi Liu <inbox@huozhi.im> Co-authored-by:
Zack Tanner <1939140+ztanner@users.noreply.github.com>
-
JJ Kasper authored
This just ensures we use the deployment ID if configured for preload CSS links. x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1742146672858189)
-
JJ Kasper authored
This just adds an additional header to our internal filtering list for middleware.
-
Jiachi Liu authored
### What Remove the default segment checks for metadata rendering. When the `default.js` is rendered, it should still have the metadata. It was a condition added due to possible of duplicated metadata, but it's resolved by other conditions such as only rendering in child slot, and hoisting metadata into rsc head for navigation.
-
Jiachi Liu authored
### What Fix the enabling of ts hint plugin in vscode. This is a regression introduced in #76300, where we use the plugin config `{ "name": "next" }` to directly check if it has a `enabled` property, and determine if we should enable the plugin. This PR fixed the way of reading plugin config and keep it enabled by default. Fixes 76980 -
Jiachi Liu authored
### What Re-insert the metadata icons under body tag into head tag to ensure they can be proper displayed. ### Why * For chromium based browsers (Chrome, Edge, etc.) and Safari, icons need to stay under `<head>` to be picked up by the browser. Firefox doesn't have this requirement. * Firefox will always render svg > icon > png, so it doesn't matter to it. Made a test in https://icons-order-test.vercel.app/, you can play with the test cases here. These links can see the comparsion of the approach in the this PR. During deployment it's very hard to verify Safari as it's pretty broken. But deploymet works well. After we re-insert the icon from body into head, they can be properly displayed across all the browsers. Note: We insert the script during streaming rather than using a jsx element right after metadata to avoid the hydration errors Closes #76810 Closes NDX-951
-
- 11 Mar, 2025 2 commits
-
-
vercel-release-bot authored
-
Jiachi Liu authored
-
- 09 Mar, 2025 3 commits
-
-
vercel-release-bot authored
-
Oscar authored
-
Sebastian "Sebbie" Silbermann authored
-
- 08 Mar, 2025 3 commits
-
-
vercel-release-bot authored
-
Sebastian "Sebbie" Silbermann authored
-
Sam Ko authored
## Why? We're missing some still! - Add `After`, `Connection`, `Cookies`, `Headers` - Remove `Package Managers`
-
- 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 10 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 .
-