- 01 May, 2025 7 commits
-
-
vercel-release-bot authored
-
Tobias Koppers authored
### What? Instead of only limiting the number of files to merge during a compaction step, limit the number of bytes to merge. That should be more aligned with the performance cost of the merging step, which we want to limit
-
Janka Uryga authored
For some reason `createExoticDraftMode[WithDevWarnings]` defines a setter for `draft.isEnabled`. As far as i can tell, this setter is unnecessary. It doesn't seem like we ever allowed this: ```js const draft = await draftMode() draft.isEnabled = false ``` The `DraftMode` class had `isEnabled` as a pure getter from the start, see #49096. You can also see that the previous implementation did the same. (also, the setter wasn't doing anything useful anyway, and arguably was misleading -- it was defining the `isEnabled` property on the promise itself, without actually performing `enable()/disable()`, so i can't see how anyone could be relying on this)
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Turbopack.
-
JJ Kasper authored
This updates our workflow for testing new tests against deploy mode to allow running against forks as we don't want to introduce flakey tests in this mode even if opened from forks.
-
Benjamin Woodruff authored
It seems too easy to accidentally not pass through `TEST_CONCURRENCY` in `build_and_test.yml`, so IMO `run-tests.js` should use it by default, still allowing overriding with `-c` or `--concurrency`. I tested by spot-checking CI jobs for log lines like this: ``` Running tests with concurrency: 4 in test mode undefined ``` or ``` Running tests with concurrency: 1 in test mode undefined ```
-
Yufeng Xiang authored
Fix a bug that may confuse beginners. <!-- 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 # -->
-
- 30 Apr, 2025 27 commits
-
-
vercel-release-bot authored
-
Kevin Mårtensson authored
In https://github.com/vercel/next.js/pull/77553 we fixed reading the request body in middleware using the `nodejs` runtime. However, this caused issues with subsequent reads like in server actions. In sandbox, [we run](https://github.com/vercel/next.js/blob/1e62ce2c61048ddc0297f1a4f268894541975521/packages/next/src/server/web/sandbox/sandbox.ts#L146-L148) `.finalize()` after middleware is executed so we should do the same here. Fixes https://github.com/vercel/next.js/issues/77646 --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Benjamin Woodruff authored
Apparently there's a chicken-and-egg problem between `pnpm install` and `pnpm build` where some packages depend on `pnpm build` being run first, but `pnpm build` can't run until after `pnpm install`. Remove this one-off hack in `afterBuild` for `devlow-bench` and document it in `build_reusable.yml`.
-
JJ Kasper authored
As discussed stylistic ESLint defaults should not be errors they should be warnings instead as errors from ESLint should be serious as they cause builds to fail. If users want to be more strict they can make them errors themselves. x-ref: [slack thread](https://vercel.slack.com/archives/C088NDH88AY/p1745893026311189?thread_ts=1745871583.511739&cid=C088NDH88AY)
-
Donny/강동윤 authored
### What? Remove Rust-side amending logic for minifier options and move all configuration to JS side ### Why? x-ref: https://vercel.slack.com/archives/C04KC8A53T7/p1746034154828369?thread_ts=1746024368.021439&cid=C04KC8A53T7 ### How?
-
Benjamin Woodruff authored
As part of #76251 I rewrote the `afterBuild` job from: ```yaml - run: /bin/bash -c "${{ inputs.afterBuild }}" ``` to ```yaml - run: ${{ inputs.afterBuild }} # defaults.run.shell sets a stronger options (`-leo pipefail`) # Set this back to github action's weaker defaults: # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell # # We must use a login shell: fnm installation may modify the `.profile` shell: bash -le {0} ``` So it should handle escaping and line wrapping without problems now. Because we run `bash` with `-e`, failed commands should abort the entire script, so `&&` shouldn't be needed everywhere. -
Tobias Koppers authored
### What? Avoid loading data for marking a task as dirty
-
Benjamin Woodruff authored
This includes https://github.com/rust-lang/rustc-hash/pull/56 Apparently 2.1.0 has a bug that can cause lots of hashtable collisions for very large maps with more than `2^20` elements. We have some very large maps, so this seems potentially concerning.
-
Tobias Koppers authored
### What? Compact earlier to limit the number of accessed files.
-
Donny/강동윤 authored
### What? Adjust the options for the SWC minifier to disable character frequency analysis for webpack builds correctly. ### Why? https://github.com/vercel/next.js/pull/77887 only adjusted the option for rspack. ### How? Follow-up of https://github.com/vercel/next.js/pull/77887
-
Vercel Release Bot authored
-
Tobias Koppers authored
### What? When many entries are written for a key family in a write batch, shard the entries into multiple SST files by key space. This results in better initial distribution of keys and allows for 4 compactions to happen in parallel
-
Sebastian "Sebbie" Silbermann authored
These weren't sourcemapped because we logged the stack directly as a string. Only actual error instances will be sourcemapped not arbitrary strings. Now we'll also include digest and `cause` in the error.
-
Jiwon Choi authored
Co-authored-by:Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
-
Andrew Clark authored
Adds a "auto" as a valid value for the `<Link>` component's prefetch prop. It acts as an alias for the default behavior, i.e. same as no prefetch prop at all. --- A common source of confusion is the difference between `<Link>`, `<Link prefetch={null}>`, and `<Link prefetch={boolean}>`: - `prefetch={true}` → dynamically prefetch the whole page - `prefetch={false}` → disable prefetching entirely - no prop, `prefetch={null}`, `prefetch={undefined}` → default behavior If you want to conditionally opt into dynamic prefetching, you have to write something like this: ``` <Link prefetch={shouldDynamicallyPrefetch ? true : null}> ``` After this PR, you can do this instead: ``` <Link prefetch={shouldDynamicallyPrefetch ? true : 'auto'}> ``` It's still a bit confusing if you aren't aware of the subtleties of dynamic versus static prefetching, but at least the "auto" string gives slightly more of a hint that `true` is different from the default. (In retrospect, we probably should have made `true` an alias for the default, and chosen a separate value to opt into dynamic.) -
Donny/강동윤 authored
### What? Provide full path to the SWC Wasm plugins ### Why? To align with other SWC Wasm plugin runtimes ### How? - Closes PACK-4363 - Closes #78181
-
Jiachi Liu authored
-
Jiachi Liu authored
-
vercel-release-bot authored
-
Jiachi Liu authored
-
Vercel Release Bot authored
-
Vercel Release Bot authored
-
Niklas Mischkulnig authored
So that every type of ecmascript chunk item uses `EcmascriptModuleContent::new`
-
Tim Neutkens authored
## What? Adds `config` to the list of packages not to bundle. Turbopack's require/import analysis is more advanced than Webpack's and it fails to bundle because the package require is not in a `try {}` block. Fixes #78471 Fixes PACK-4477 <!-- 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 fixes an issue where deploy tests were intermittently passing when they shouldn't have been due to jobs not being sorted consistently across retries.
-
Janka Uryga authored
i messed up a deployment test thing in https://github.com/vercel/next.js/pull/77898, had the fix locally but forgot to push before merging. the test tries to wait for some initial stuff to happen stuff after the deployment finishes, but we should only to do that once, it won't work in the second test of the `it.each`, so the test fails.
-
Janka Uryga authored
This PR centralizes some logic that we always want to run after executing a server action into `executeActionAndPrepareForRender`. This fixes some issues where we were only executing revalidates, setting draft mode, and synchronizing mutated cookies for fetch actions, but not MPA actions. I've also moved the logic for `addRevalidationHeader` to the one place where it makes sense -- after executing a fetch action. This header is only used by the client router and only makes sense to add if we actually executed an action, so e.g. calling it for each possible error type was unnecessary.
-
- 29 Apr, 2025 6 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>
-