- 11 Mar, 2025 6 commits
-
-
vercel-release-bot authored
-
rauno authored
This PR reverts our decision to use `rem` for the Dev Overlay surfaces. We have realised that using `rem` to style the Dev Overlays is not a good idea because if an app sets their root font size to something tiny, they will not have a great time using the Overlays, and it feels unexpected to have the app root size leak into an external package. I did not remove the references to `--size-*` CSS vars because we still want to offer a way to scale the size of the UI, just through a custom interface in the dropdown menu --- - https://github.com/vercel/next.js/discussions/76812 - Closes NDX-969
-
Donny/강동윤 authored
### What? Use the last side effect fragment instead of the module evaluation fragment. ### Why? Module evaluation fragment is a waste of memory. ### How? Closes PACK-3440 --------- Co-authored-by:Tobias Koppers <tobias.koppers@googlemail.com>
-
Niklas Mischkulnig authored
Any suggestions regarding the exact naming? ``` "use turbopack no side effects" export const bar = 123; ```
-
JaeHunPark authored
fix(next/image): use `100% 100%` for placeholder image background-size when object-fit `fill` is used instead of cover (#67482) ### What? - Fixes #67478 ### Why? - When an objectFit property that cannot be used for backgroundSize is applied, I experienced an issue where the placeholder's size behaved unexpectedly. ### How? - Modify it to use 'cover' when the objectFit property cannot be used for backgroundSize --------- Co-authored-by:
Sam Ko <sam@vercel.com> Co-authored-by:
Steven <steven@ceriously.com>
-
Sam Ko authored
## Why? The cacheTag mention [here](https://nextjs.org/docs/app/api-reference/directives/use-cache#revalidating) makes it seem like cacheTag does the "revalidating," but actually this is still revalidateTag's job. - Related: https://github.com/vercel/next.js/issues/76581
-
- 10 Mar, 2025 8 commits
-
-
Will Binns-Smith authored
This: - Prompts users to report turbopack internal errors as new GitHub discussions instead of issues - Encodes the error message and debug information into the discussion title and body respectively - Since these encoded urls can be lengthy, it uses [Terminal Hyperlinks](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) to present things concisely without excessive wrapping. If the terminal does not support this, only the error message is sent. - Removes specific panic handling in favor of the `subscribe` napi error handler. This seems to be the vast majority of panics. Test Plan: In a terminal with hyperlink support `FORCE_HYPERLINK=1 pnpm next dev --turbo examples/basic-css/`: ``` ----- FATAL: An unexpected Turbopack error occurred. A panic log has been written to /var/folders/sk/zy7023wd30j0dxpmdv3nylm80000gn/T/next-panic-bf6bdb325db0f5ed5599cf332d8e364a.log. To help make Turbopack better, report this error by clicking here. ----- ``` Where the link generated is [clicking here.](https://github.com/vercel/next.js/discussions/new?category=error-report&title=Turbopack%20Error%3A%20Panic%20in%20AppProject%3A%3Anew%3A%20Some%28%22oh%20no%20new%20app%21%22%29&body=Error%20message%3A%0A%60%60%60%0APanic%20in%20AppProject%3A%3Anew%3A%20Some%28%22oh%20no%20new%20app%21%22%29%0A%0ADebug%20info%3A%0A-%20Execution%20of%20get_entrypoints_with_issues_operation%20failed%0A-%20Execution%20of%20EntrypointsOperation%3A%3Anew%20failed%0A-%20Execution%20of%20Project%3A%3Aentrypoints%20failed%0A-%20Execution%20of%20Project%3A%3Aapp_project%20failed%0A-%20Panic%20in%20AppProject%3A%3Anew%3A%20Some%28%22oh%20no%20new%20app%21%22%29%0A%60%60%60&labels=Turbopack,Turbopack%20Panic%20Backtrace) In a terminal without hyperlink support `FORCE_HYPERLINK=0 pnpm next dev --turbo examples/basic-css/`: ``` ----- FATAL: An unexpected Turbopack error occurred. A panic log has been written to /var/folders/sk/zy7023wd30j0dxpmdv3nylm80000gn/T/next-panic-3c5a833c682727cba1d51cc97ee0c16.log. To help make Turbopack better, report this error by clicking here: https://github.com/vercel/next.js/discussions/new?category=error-report&title=Turbopack%20Error%3A%20Panic%20in%20AppProject%3A%3Anew%3A%20Some%28%22oh%20no%20new%20app%21%22%29&body=Error%20message%3A%0A%60%60%60%0ATurbopack%20Error%3A%20Panic%20in%20AppProject%3A%3Anew%3A%20Some%28%22oh%20no%20new%20app%21%22%29%0A%60%60%60&labels=Turbopack,Turbopack%20Panic%20Backtrace ----- ``` --------- Co-authored-by:
Tobias Koppers <tobias.koppers@googlemail.com>
-
Will Binns-Smith authored
This includes `isRspack` in the following telemetry events, determining it with the presence of `process.env.NEXT_RSPACK`: - `NEXT_CLI_SESSION_STARTED` - `NEXT_CLI_SESSION_STOPPED` - `NEXT_BUILD_OPTIMIZED` Test Plan: Verify these are included with `NEXT_TELEMETRY_DEBUG=1` for both `next dev` and `next build`
-
Will Binns-Smith authored
This implements a new napi binding, `project.writeAllEndpointsToDisk` which writes chunks for all endpoints. This avoids iterating over each endpoint and calling individual napi bindings, each resulting in a call to `emit()`. While iterating entry points now occurs in Rust, `OutputAssets` are collected in an `IndexSet` to prevent unnecessary `emit()` calls. This also significantly reduces unnecessary calls to the manifest loader from JS. Test Plan: CI Commit before removing merge commits: https://github.com/vercel/next.js/pull/75304/commits/189743dd261a682c5cb0a46e69f27861c612e9c2 --------- Co-authored-by:
Tobias Koppers <tobias.koppers@googlemail.com> Co-authored-by:
Tim Neutkens <tim@timneutkens.nl>
-
Niklas Mischkulnig authored
These are technically not entirely spec compliant as identical data urls in different folders aren't deduplicated (but each generate a new module). But this is good enough for now. You can now do ```js import { bar } from "data:text/javascript,export var bar = 1234;"; import data from 'data:application/json,{ "foo": 1234 }'; import dataURLEncoded from 'data:application/json,%7B%20%22foo%22%3A%201234%20%7D'; import dataBase64Encoded from 'data:application/json;base64,eyAiZm9vIjogMTIzNCB9'; import "data:text/css,body { color: red }"; it("support data URL imports", () => { expect(bar).toEqual(1234); expect(data).toEqual({ foo: 1234 }); expect(dataURLEncoded).toEqual({ foo: 1234 }); expect(dataBase64Encoded).toEqual({ foo: 1234 }); }); ``` Only data-urls in JS ESM imports are turned into modules. For JS, turning data-urls into separate modules is zero-cost, because they all end up in the same bundle anyway, but that is not the case for image data urls in CSS. -
Niklas Mischkulnig authored
I think this should be safe to assume?
-
Zack Tanner authored
Seems the navigation from app -> pages can timeout from the retry in development. This extends the timeout.
-
Benjamin Woodruff authored
User report: https://vercel.slack.com/archives/C046HAU4H7F/p1741216793060779 Appears to be fixed by: https://github.com/arthurprs/qfilter/pull/8 ``` Panic: panicked at turbopack/crates/turbo-persistence/src/static_sorted_file_builder.rs:114:18: AQMF insert failed: CapacityExceeded Backtrace: 0: _napi_register_module_v1 1: _napi_register_module_v1 2: <unknown> 3: _napi_register_module_v1 4: _napi_register_module_v1 5: _napi_register_module_v1 6: _napi_register_module_v1 7: _napi_register_module_v1 8: _napi_register_module_v1 9: <unknown> 10: <unknown> 11: <unknown> 12: <unknown> 13: <unknown> 14: <unknown> 15: <unknown> 16: <unknown> 17: <unknown> 18: <unknown> 19: <unknown> 20: <unknown> 21: <unknown> 22: <unknown> 23: <unknown> 24: <unknown> 25: <unknown> 26: <unknown> 27: <unknown> 28: _napi_register_module_v1 29: _napi_register_module_v1 30: _napi_register_module_v1 31: _napi_register_module_v1 32: _napi_register_module_v1 33: __pthread_deallocate ```
-
Donny/강동윤 authored
### What? Fix the span of the turbopack tree shaking magic comment. ### Why? Previously it was printed on strange position. ### How? Closes NAR-91 Closes PACK-4087
-
- 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 7 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
-