- 12 Mar, 2025 6 commits
-
-
vercel-release-bot authored
-
rauno authored
This PR is a follow up to https://github.com/vercel/next.js/pull/76969 and adds a size setting to the Dev Tools preferences. Right now the **Small**, **Medium** (default), and **Large** variants scale the UI as if the root font size were **14px**, **16px**, **18px**. We can tweak these values as a follow-up. https://github.com/user-attachments/assets/43055cae-1e14-4e52-94cc-3ad1b8cae424 --- - Closes NDX-971
-
JJ Kasper authored
In https://github.com/vercel/next.js/pull/76990 we noticed that imports in `base-server`/`next-server` are being processed by turbopack which needs to be investigated further although for now this moves the imports to only import the necessary files in `next-server` to avoid bundling time regression.
-
Vercel Release Bot authored
[diff facebook/react@0ca3deeb...6aa8254b](https://github.com/facebook/react/compare/0ca3deeb...6aa8254b) <details> <summary>React upstream changes</summary> - https://github.com/facebook/react/pull/32465 - https://github.com/facebook/react/pull/32540 - https://github.com/facebook/react/pull/32565 </details>
-
Dominik Koch authored
In 75831c08 I added support for the Pinterest rich pin meta tag, this change adds it to the [generateMetadata](https://nextjs.org/docs/app/api-reference/functions/generate-metadata) documentation. - [x] Ran `pnpm prettier-fix` before commiting
-
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 17 commits
-
-
Lee Robinson authored
Make it clear this is not a real function
-
vercel-release-bot authored
-
Jude Gao authored
-
Tim Neutkens authored
Builds on #76814 Closes PACK-4071 (implementing config.deploymentId) This uses the new `__turbopack_load_by_url__` to load chunks through client references in react-dom-turbopack. After this lands I'm going to send a PR to react-dom-turbopack to switch the original source to use `__turbopack_load_by_url__` too, landing this PR first to make sure it passes all the Next.js tests. <!-- 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 # -->
-
JJ Kasper authored
This brings back the env inlining step separate of compilation used for the [flying shuttle experiment](https://github.com/vercel/next.js/pull/73710) so that when `next build --experimental-build-mode=compile` is used we don't inline these values so that these artifacts can be cached/reused independent of the env values. Then `next build --experimental-build-mode=generate` can be used to inline the values and run prerendering to generate finalized build.
-
vercel-release-bot authored
-
Jiachi Liu authored
### What While adding a regression test for overlay JS bundle to ensure it's not gonna existed in client bundles by asserting the source map. Found that we're also including the indicator reducer from client JS bundles. This PR ensure we fully strips it out
-
Jiachi Liu authored
### What Adds support for Pinterest's Rich Pin Data meta tag, while future-proofing for additional Pinterest tags. This currently works like so ```js pinterest: { richPin: true } ``` And would resolve to: ```html <meta property="pinterest-rich-pin" content="true" /> ``` x-ref: https://help.pinterest.com/en/business/article/rich-pins Closes #70873 --------- Co-authored-by:Dominik Koch <dominik@koch-bautechnik.de>
-
Vercel Release Bot authored
[diff facebook/react@029e8bd6...0ca3deeb](https://github.com/facebook/react/compare/029e8bd6...0ca3deeb) <details> <summary>React upstream changes</summary> - https://github.com/facebook/react/pull/32569 - https://github.com/facebook/react/pull/32567 - https://github.com/facebook/react/pull/32549 - https://github.com/facebook/react/pull/32545 - https://github.com/facebook/react/pull/32566 - https://github.com/facebook/react/pull/32551 - https://github.com/facebook/react/pull/32550 - https://github.com/facebook/react/pull/32528 - https://github.com/facebook/react/pull/32359 - https://github.com/facebook/react/pull/32536 - https://github.com/facebook/react/pull/32539 </details>
-
Jiachi Liu authored
Update flaky 18.3 test x-ref: https://github.com/vercel/next.js/actions/runs/13770136279/job/38509693811
-
rauno authored
This PR applies `all: unset` to the `<select>` we use in Preferences for the Dev Overlay and adds a custom icon because we lose the chevron as soon as we apply this. Why? So the styling for the control would look more consistent, for example this is what it looks like in Safari now:  And after the changes:  --- Closes NDX-928
-
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 3 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
-