- 29 Apr, 2025 20 commits
-
-
vercel-release-bot authored
-
Luke Sandberg authored
Enable prettier for turbopack While the majority of the javascript in turbopack is for tests, this code is generally hand authored so prettier will help us. There are also core parts of turbopack implemented in JavaScript/TypeScript so a formatter will help. This was done by simply fixing prettier ignore and chasing lint errors. There were a few fun issues * We had a test file called `won't-run-tla.js` and this triggered a bug in our eslint precommit hook. The simplest thing was to simply drop the `'` character so that is what i did. I spent a small amount of time trying to narrow this down't in the `lint-staged` dependency but failed, so i think the problem is probably in `eslint`, but it isn't really clear. * We had another test exercising `import.meta` but in a file called `.cjs`, which prettier rejects due its default `babel` parser. So i excluded this from prettier.
-
Cong-Cong Pan 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 # --> Rspack now supports symbol keys in asset info, enabling it to pass more Next.js test cases. --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
JJ Kasper authored
Fixes case failing in https://github.com/vercel/vercel/actions/runs/14716507754/job/41302495247?pr=13276 we were missing the default locale handling necessary to process rewrite params for i18n pages API routes. <details> <summary>validated test case</summary>  </details>
-
Jack Wilson authored
### What? We use [Nissuer](https://github.com/balazsorban44/nissuer) to assist in triaging new GitHub Issues. This PR updates our Nissuer config to send alerts to a webhook endpoint if Nissuer detects a possible security report/responsible disclosure via a public GitHub Issue. ### Why? So we can be alerted in a timely manner to possible public disclosures of unresolved security issues in Next.js ### How? Nissuer performs keyword detection and sends an alert to a webhook if any keywords are detected in a newly-raised GitHub Issue. Note: we must also set the appropriate `NISSUER_WEBHOOK_URL` and `NISSUER_WEBHOOK_SECRET` environmental variables on the repository for this to be effective. Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
JJ Kasper authored
This is a follow-up to https://github.com/vercel/next.js/pull/78326 which reverts the change that interferes with the added middleware rewrite test while also ensuring the encoding test from the `vercel/vercel` repo is still passing as expected. The issue with the encoding seems to be from the `x-matched-path` value being incorrectly decoded when using non-utf8 characters so this fixes the encoding. Fixes: https://github.com/vercel/next.js/actions/runs/14717733032/attempts/2 <details> <summary>test runs with patch</summary>   </details>
-
Vercel Release Bot authored
-
Tobias Koppers authored
### What? Storing many large thread local collectors can lead to high memory usage on systems with many cores. It also unnecessarily delays writing out files to disk. This changes this to use very small thread local collector that flushes to a single global collector (per key family). The small thread local collectors still avoid contention. This also creates more compact files.
-
Donny/강동윤 authored
### What? Drop dependency on `@swc/counter` ### Why? x-ref: https://vercel.slack.com/archives/C06BR9ZH14H/p1745851763574729?thread_ts=1745851352.737009&cid=C06BR9ZH14H ### How?
-
Lee Robinson authored
-
Tobias Koppers authored
### What? An empty compaction should not commit
-
Jiwon Choi authored
### Why? The "separate export" was not warning correctly. It is because the `symbol.declaration` is a declaration from the export clause. Needed to get from `originalSymbol.declaration`. | Before | After | |--------|--------| |  |  |
-
Tim Neutkens authored
## What? The check for the svg extension that exists in the webpack loader was missing: https://github.com/vercel/next.js/blob/757542a400945c7709f1338e5619b171304b8d48/packages/next/src/build/webpack/loaders/next-metadata-image-loader.ts#L150 Implemented that. Fixes PACK-4475 Fixes #78520 <!-- 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 # -->
-
Tobias Koppers authored
### What? Write a LOG file for the database to allow introspection and debugging
-
Vercel Release Bot authored
-
Jiwon Choi authored
-
rauno authored
-
Benjamin Woodruff authored
It seems like `persistence` is the least-read and least-important field of this enum variant, so move it to the end... Also added documentation to the `RawVc` enum variants. This stuff is already documented elsewhere, but it's useful to have something here as well.
-
Will Binns-Smith authored
-
Tobias Koppers authored
### What? As initial build performance is a performance bottleneck for persistent caching we want to delay compaction and don't want to execute it on the first build.
-
- 28 Apr, 2025 20 commits
-
-
Benjamin Woodruff authored
After https://github.com/vercel/next.js/pull/78488 and https://github.com/vercel/next.js/pull/78487, the task id isn't really needed anymore, so this removes it! There's no expected change in memory consumption: `RawVc` is still 128 bits because `RawVc::TaskCell` is 96 bits, and the type is aligned to the nearest 64 bit machine word.
-
vercel-release-bot authored
-
Benjamin Woodruff authored
refactor(turbo-tasks): Use an execution id instead of the parent task id to prevent local Vc escapes (#78487) Re-using the task id just for the `Vc` scope escape check isn't ideal: - A task can execute multiple times. Just using task ids doesn't guarantee that the `Vc` hasn't leaked across multiple executions of the same task. - This is just a fallback check to help with debugging, so allocating 32 bits to this id seems wasteful. We can do a good job with 16 bits. Nothing else really needs the task id, so we can get rid of it later in this PR stack. A version of this idea was part of the original local tasks idea: https://www.notion.so/vercel/Resolved-Vcs-Vc-Lifetimes-Local-Vcs-and-Vc-Refcounts-49d666d3f9594017b5b312b87ddc5bff?pvs=4#da95dbdc390144a9bb1b3d2fb73867b7 Even with this extra 4 bits, the overall enum size is still 16 bits due to alignment and the size of the other enum variants, so this shouldn't regress memory consumption. The next PR (https://github.com/vercel/next.js/pull/78561) removes `TaskId` entirely...
-
vercel-release-bot authored
-
Andrew Clark authored
Depends on: - https://github.com/vercel/vercel/pull/13275 --- Follow up to #78387. When incremental PPR mode is enabled, we need to create a special "inverse" route to handle tree requests for every route in the manifest that doesn't have PPR enabled. #78387 fixed this for "dynamic" routes — which in the context of the relevant module I believe means routes with params, and has nothing to do with dynamic data in the PPR sense — but it didn't handle for "static" routes — which here means routes without any params. The fix is to apply the same logic in #78387 for all routes, both "static" and "dynamic", in the routes manifest.
-
Benjamin Woodruff authored
refactor(turbo-tasks): Tighten up id factory overflow checks, tweak API to make construction easier (#78486) - Prefer construction of `IdFactory<T>` with value of type `T` instead of `u64`, except in cases where we can't because of limitations with `const`. - Always start the internal counter at 0 so that our assumptions of overflowing a `u64` type hold. A test is included for this. - Add an extra debug assertion (and abort) in the bizarre case that a `u64` does overflow. - Remove unused type bounds from `register_thing` and `get_thing_id`. - Avoid `as` casts as much as possible (these have silent overflow behavior). I did this prior to https://github.com/vercel/next.js/pull/78487 because I add an intentionally-overflowing id factory method there.
-
Donny/강동윤 authored
### What? This PR is a follow-up PR of https://github.com/vercel/next.js/pull/75261 ### Why? This could give us noticeable memory reduction. ### How? - See: https://linear.app/vercel/issue/PACK-3828
-
JJ Kasper authored
Applies some clean-up/follow-ups from review on https://github.com/vercel/next.js/pull/78166
-
JJ Kasper authored
This dependency should be pre-compiled just like our other dependencies seems it just got missed. We should investigate a CI check for any non-devDependencies added to catch this going forward.
-
Victor Berchet authored
Thanks for adding a link to the Cloudflare adapter. This PR updates the link to the adapter to link the adapter based on OpenNext which is our current recommended solution to deploy to Cloudflare Workers. (The existing link was to Next on Pages which was our former solution). Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Jiří Hofman authored
Tiny typo fix
-
Maksym Smoliński authored
Hello from the RavenDB team (https://github.com/ravendb/ravendb) We've seen multiple reports of issues with Next.js and our ravendb package. This PR resolves those issues by adding ravendb package to `server-external-package.json`. i've included one library. - [ravendb](https://www.npmjs.com/package/ravendb) let me know if any changes are needed.
-
Luca Casonato authored
This enables running this directly in Deno, even when bare node builtin imports are not enabled. By default Deno does not resolve bare node builtins. You have to either prefix them with `node:`, or use `--unstable-bare-node-builtins` Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Wesley Luyten authored
Co-authored-by:Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
-
Niklas Mischkulnig authored
Related to https://github.com/vercel/next.js/issues/78509 We still call `ref.resolve_reference()` in dev on `ChunkingType::Traced` but never look at the result (and unnecessarily call `read_matches` potentially).
-
Hendrik Liebau authored
During prerendering, we don't need to return a stream early for a `"use cache"` function. We can instead prerender the cache function fully, before returning the prelude as the stream. This simplifies the timeout handling a bit, when `dynamicIO` is enabled, and more importantly, it prepares us for handling cookies access in `"use cache"` functions during prerendering. - [x] depends on facebook/react#32953
-
Janka Uryga authored
Turbopack applies the "use cache" transform in node_modules, but Webpack wasn't doing that. This is due to a sneaky little regex that controls whether files in node_modules are passed to SWC for transforming or not -- `use client` and `use server` were included there, but `use cache` wasn't. This PR fixes that. (I don't really expect NPM packages to use `"use cache"` because it's pretty application-specific, but it might be relevant in a monorepo situation where shared utils that use the directive can live in a separate package) --------- Co-authored-by:Hendrik Liebau <mail@hendrik-liebau.de>
-
Mohammad Reza Badri authored
-
Niklas Mischkulnig authored
Fix a regression in https://github.com/vercel/next.js/pull/78357 Bug found by @sokra as well: https://github.com/vercel/next.js/pull/78357#discussion_r2063544480
-
Donny/강동윤 authored
### What? Make the `ImportBinding` node a phantom node. ### Why? Because they are not used. We have to import directly from the original module because of the static analysis like `next/dynamic`. So I modified the tree shaking to import directly with https://github.com/vercel/next.js/pull/71704. But #71704 didn't remove the concept of `ImportBinding`. This PR finishes the work of using direct imports. Additionally, this PR introduces `ReexportBinding` fragments because these are not phantom nodes. I'll check if it would be possible to remove `ReexportBinding` fragments with follow-up PRs. ### How? - Closes PACK-4366
-