- 06 Feb, 2025 9 commits
-
-
vercel-release-bot authored
-
Tobias Koppers authored
### What? * avoid cloning SourceMap for ignore list * shrink vec before converting to Rope * shrink Strings too * shrink source map
-
Tobias Koppers authored
### What? * use new backend in next-build-test * apply effects in next-build-test * fix Dockerfile
-
Jiachi Liu authored
-
vercel-release-bot authored
-
Tobias Koppers authored
Reverts vercel/next.js#75707 canary builds timed out
-
Niklas Mischkulnig authored
<!-- 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 # -->
-
Jiwon Choi authored
### Why? The color contrast of the terminal violated the WCAG standard. Example: | Yellow | Blue | |--------|--------| |  |  | ### Before #### Light   #### Dark  ### After #### Light   #### Dark  Closes https://linear.app/vercel/issue/NDX-657/fix-code-frame-color-contrast
-
Janka Uryga authored
-
- 05 Feb, 2025 31 commits
-
-
Will Binns-Smith authored
No behavior changes in this PR, just a small adjustment since while debugging it was surprising that `invalidate` was called even though it was a no-op with an empty array. Previously, `invalidate` would unconditionally get called after building, even if no work was queued. Test Plan: CI
-
Josh Story authored
When we made Request data APIs async we made them exotic to make the transition to the Promise API easier to adopt because lots of existing code probably accessed these values synchronously. `rootParams` is a new Request Data API however and it has no existing usage that is async so we do not need to support exotic access to these values. This change removes the exotic construction in favor of a simple resolved Promise.
-
vercel-release-bot authored
-
Hendrik Liebau authored
When `dynamicIO` is not enabled, and only the standalone `useCache` experimental flag is enabled, we can not encode `searchParams` as hanging promises. To still avoid unused search params from making a page dynamic (due to the `searchParams` being encoded into the cache key), we set them to a promise that resolves to an empty object, while also overwriting the to-be-invoked function for generating a cache entry with a function that creates an erroring `searchParams` prop before invoking the original function. This ensures that used `searchParams` inside of cached functions would still yield an error. closes NAR-85
-
Benjamin Woodruff authored
napi-rs only uses the cdylib version: https://github.com/napi-rs/napi-rs/blob/688a266f132f947b8002e892b78decd660d8a6ec/crates/napi/README.md#building This might(?) slightly improve compile times for certain invocations of `cargo`.
-
Hendrik Liebau authored
This allows us to catch regressions and monitor progress (e.g. for NAR-85). In addition, we're consolidating all pages in the test app to use a single root layout without a suspense boundary. Before we switched the app from using the `dynamicIO` flag to the `useCache` flag, some pages needed a suspense boundary to not fail the build.
-
Tobias Koppers authored
### What? fix a previous PR that disables dependency tracking when not needed.
-
JJ Kasper authored
This is a follow-up to https://github.com/vercel/next.js/pull/75624 which ensures middleware behaves correctly in the `src/` directory. This previously wasn't an issue since edge runtime output location isn't picky since it's just output in the middleware-manifest although with node runtime it is particular.
-
JJ Kasper authored
Seems this was failing in https://github.com/vercel/next.js/pull/75693
-
Niklas Mischkulnig authored
Don't even evaluate the left side of `obj.prop` if we know that we don't have anything in the replacement maps that matches `*.prop` anyway. This particular helps in huge files with complex code and also containing many member expressions ``` testing against 0293c96cf32 canary b6f8743e 13,75 GB TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD= 507.86s user 77.80s system 847% cpu 1:09.11 total TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD= 503.13s user 77.86s system 855% cpu 1:07.90 total mischnic/analyzer-faster-members ed38e94ba2 13,75 GB TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD= 499.54s user 79.28s system 857% cpu 1:07.51 total TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD= 498.31s user 76.99s system 855% cpu 1:07.27 total ```
-
Tawsif Haque authored
-
Benjamin Woodruff authored
chore(turbo-tasks): Remove support for local_cells (a specific mode of local tasks we ended up not using) (#75672) Local cells would allow us to avoid allocating real cells for data passed to local task functions. Unfortunately, in practice, we manually resolve most arguments passed to local task functions, which would defeat this optimization. I was holding onto this in the hopes that we might end up using it, but that seems fleeting: - We could get similar benefits by scanning for unreferenced cells at the end of function execution using `TraceRawVcs` at the cost of a bit of execution time. This would work even on `Vc`s that were resolved. - For ergonomics reasons, we want to eventually rename `ResolvedVc` to `Vc` (and `Vc` to something like `UnresolvedVc`), which will probably lead to us resolving even more stuff, breaking this potential optimization even more. - Cache eviction may do a good enough job of removing cells, the bigger enemy are the harder-to-evict tasks, which our current version of local tasks does do a good job of reducing. Meanwhile, it makes the code harder to follow, and could cause issues if this codepath somehow got activated.
-
Hendrik Liebau authored
When adding or removing a `"use cache"` directive to a function or module, Turbopack was not able to finish the compilation and hung. This is now fixed, and we're adding the test to prevent regression.
-
Jiachi Liu authored
-
Donny/강동윤 authored
### What? ChangeLog: https://github.com/swc-project/swc/compare/swc_core%40v12.0.0...swc_core%40v13.0.4 ### Why? - To keep in sync - To drop `rustc-hash` v1 - To apply https://github.com/swc-project/swc/pull/9978 --------- Co-authored-by:
Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
-
Niklas Mischkulnig authored
-
Niklas Mischkulnig authored
Disambiguate `TaskInput::resolve` from `Vc::resolve` and `ResolvedVc::resolve`. Turns out there was only a single instance where `resolve()` turned out to be the wrong function anyway...
-
vercel-release-bot authored
-
Niklas Mischkulnig authored
Maintain a cache of `VariableId -> JsValue` (per-module), so that we don't reevaluate variables (mostly, unless it's a local variable inside a function call) ``` canary 82026906: 15,3gb TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD= 501.72s user 108.30s system 760% cpu 1:20.26 total TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD= 502.01s user 102.27s system 774% cpu 1:18.04 total mischnic/analyzer-link-cache 66d7e1f00c: 15,3gb TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD= 490.36s user 104.63s system 731% cpu 1:21.34 total TURBO_ENGINE_READ_ONLY=1 NEXT_TURBOPACK_TRACING= TURBOPACK=1 TURBOPACK_BUILD= 489.22s user 106.89s system 780% cpu 1:16.39 total ```
-
Niklas Mischkulnig authored
This might make a difference if the `RequireContextMap` is huge and used across many files More importantly, this seems to solve this failure in the testing backend on https://github.com/vercel/next.js/pull/75440: ``` called 'Result::unwrap()' on an 'Err' value: Cell is empty Stack backtrace: 0: <anyhow::Error>::msg::<&str> 1: <turbo_tasks::backend::TypedCellContent>::cast::<turbopack_emascript::analyzer::RequireContextValue> 2: <turbo_tasks::vc::read::ReadVcFuture<turbopack_ecmascript::analyzer::RequireContextValue> as core::future::future::Future>::poll 3: turbopack_ecmascript::analyzer::well_known::replace_well_known::{closure#0} 4: turbopack_ecmascript::analyzer::linker::visit::<mod::analyzer::bench_link::{closure#0}::{closure#0}::{closure#0}::{closure#0}, turbopack_emascript: analyzer: it {closure#0}>::{closure#0} ```
-
Niklas Mischkulnig authored
AFAICT, Next.js doesn't do this either and this seems to solve this error ``` thread '<unnamed>' panicked at turbopack/crates/turbo-tasks-backend/src/backend/mod.rs:949:13: Dependency tracking is disabled so invalidation is not allowed thread 'tokio-runtime-worker' panicked at turbopack/crates/turbo-tasks-fs/src/lib.rs:265:63: called `Result::unwrap()` on an `Err` value: PoisonError { .. } ``` -
Vercel Release Bot authored
-
Hendrik Liebau authored
[flakiness metric](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20env%3Aci%20%40git.repository.id%3Agithub.com%2Fvercel%2Fnext.js%20%40test.service%3Anextjs%20%40test.status%3Afail%20%40test.name%3A%22use-cache%20should%20error%20when%20cookies%2Fheaders%2FdraftMode%20is%20used%20inside%20%5C%22use%20cache%5C%22%22&agg_m=count&agg_m_source=base&agg_t=count¤tTab=overview&eventStack=&fromUser=false&graphType=flamegraph&index=citest&start=1730967696059&end=1738743696059&paused=false) The error chunks are streaming in while the page is loaded, so `waitForElementByCss` is not sufficient because the error boundary is initially rendered without content, before React replaces it with the expected error messages. https://github.com/user-attachments/assets/adb24a85-d7ac-4bcc-841d-d8f3e0644389
-
Niklas Mischkulnig authored
Meaning fewer cells and fewer tasks No measureable perf difference
-
rauno authored
This PR adds a lot of polish to the experimental Error Overlay: https://github.com/user-attachments/assets/2540b966-c61d-43eb-b816-5ef25f3ecb11 ### Motion - Stacked layers transition smoothly when switching between errors - Height transition for the dialog panel to complement the stacked layers transition - Dialog contents and the backdrop fade in as per Geist Motion Guidelines (`scale`, `opacity`) ### Design - New language icon based on file extension à la (`app.tsx`) - Shadows are clipped with translucent borders to visually be more crisp - Use `backdrop-filter: blur()` for backdrop to blend with application content - Use `font-variant-numeric: tabular-nums` for ←→ switcher to avoid layout shift - Misc alignment improvements ### Interactions - Focus is now trapped in the dialog, <kbd>Escape</kbd> will un-trap and re-focus the last `root.activeElement` - Focus states for all interactive elements - Fluid reveal & collapse of ignored Call Stack items ↓ https://github.com/user-attachments/assets/59a81cea-24ec-4fe4-be00-b911ab484757 Closes NDX-711 Closes NDX-744 --------- Co-authored-by:
devjiwonchoi <devjiwonchoi@gmail.com> Co-authored-by:
Zack Tanner <1939140+ztanner@users.noreply.github.com>
-
Donny/강동윤 authored
### What? Remove one allocation per `transform()` and `minify()`. ### Why? We don't need to allocate `Compiler` in an `Arc`, because we don't share it.
-
Tobias Koppers authored
### What? Allow to continue follow-up tasks even if a task is not completely finished. It can do task completion work in background. This enables more concurrency, especially since all task connecting is at the end of the task now.
-
Tobias Koppers authored
### What? Skip some methods for tasks without children. Reduces number of spans created in tracing.
-
Donny/강동윤 authored
### What? Use `swc_atoms::Atom` instead of `String` in `next-swc`. ### Why? `Atom` does not allocate if another instance has the same value, meaning that `clone()` is a single atomic operation. But `String` allocates regardless of any other occurrence.
-
Donny/강동윤 authored
### What? Use `swc_atoms::Atom` instead of `String` in `next-swc`. ### Why? `Atom` does not allocate if another instance has the same value, meaning that `clone()` is a single atomic operation. But `String` allocates regardless of any other occurrence.
-
Tobias Koppers authored
### What? This changes to order of operations to upper aggregation numbers before connecting children, so they can be added based on the new aggregation numbers.
-