- 28 Feb, 2025 18 commits
-
-
vercel-release-bot authored
-
Jiachi Liu authored
-
Andrew Clark authored
It's a common UI pattern for apps to refresh when you click a link to the current page. So when this happens, we refresh the dynamic data in the page segments. Note that this does not apply if the any part of the hash or search query has changed. This might feel a bit weird but it makes more sense when you consider that the way to trigger this behavior is to click the same link multiple times. We should probably refresh the *entire* route when this case occurs, not just the page segments. Essentially treating it the same as a refresh() triggered by an action, which is the more explicit way of modeling the UI pattern described above. Also note that this only refreshes the dynamic data, not static/cached data. If the page segment is fully static and prefetched, the request is skipped. (This is also how refresh() works.)
-
Andrew Clark authored
Adds support for output: "export" mode to the Segment Cache implementation. We output an additional `.txt` data file per segment per page. When the client issues a per-segment request, it appends the segment path to the end of the page URL, rather than passing it as a request header. The segment file output follows this convention: ``` /a/b/c.html /a/b/c/__next.a.txt <- corresponds to segment /a /a/b/c/__next.a.b.txt <- corresponds to segment /a/b /a/b/c/__next.a.b.c.txt <- corresponds to segment /a/b/c ... and so on ``` This scheme is designed so that the server can implement patterns like protection rules or rewrites using just the original path. i.e. by blocking access to `/a/b`, you also block access to all of its associated segment data. Technically it's possible for the segment files to clash with a nested segment config. We add a `__next` prefix to make a clash less likely. It's unlikely this will ever be an issue in practice but if needed we could make this prefix configurable at build time.
-
Andrew Clark authored
Alternative to https://github.com/vercel/next.js/pull/76597. This works by importing all Segment Cache related code through a single entry point (segment-cache.ts), and wrapping each export in a feature flag check. This fixes the size regression in v15.2 but long term I don't love this approach. Since experimental flags are an essential part of our workflow, we should establish a better pattern for dead code elimination. Ideally it would be done at the bundler level, like how React's build process works. In the React repo, you don't even need to add any extra configuration per experiment — if the code is not reachable, it gets stripped from the build automatically by Rollup. Or, shorter term, we could stub out experimental modules at build time by updating the build config, i.e. a more automated version of what I'm doing manually for this particular flag.
-
Jiachi Liu authored
-
Tobias Koppers authored
### What? Traverse modules in cycles actually in postorder Because post-order edge traversal is not the same as post-order node traversal
-
Benjamin Woodruff authored
These scripts were 95% identical, so they can just be one script that accepts a few arguments. ``` $ node test/update-bundler-manifest.js --help Options: --help Show help [boolean] --version Show version number [boolean] --bundler The JavaScript bundler the tests were run against [required] [choices: "turbopack", "rspack"] --test-suite Test group to update [required] [choices: "dev", "build"] --branch the git branch to filter CI artifacts to [string] [default: "canary"] --override Don't merge with existing test results, allowing tests to transition to a failed state [boolean] ``` Tested by running: ``` node test/update-bundler-manifest.js --bundler rspack --test-suite dev --override node test/update-bundler-manifest.js --bundler rspack --test-suite build --override ``` -
Tobias Koppers authored
### What? Avoid using a turbo-tasks function for generating the input source map so the source map is not persistently stored in a cell.
-
Jiwon Choi authored
### Why?  The env name label style was different from the error type label. It is because during change of https://github.com/vercel/next.js/pull/76385, the env name label was omitted. https://github.com/vercel/next.js/blob/e3878ca38f61ab50af46d342e770344076015b55/packages/next/src/client/components/react-dev-overlay/ui/components/errors/error-type-label/error-type-label.tsx#L23-L36 Closes NDX-930
-
Tobias Koppers authored
### What? Adds a broken test case
-
Hendrik Liebau authored
The `revalidate` property of the `ctx` object that is passed into the incremental cache by the patched `fetch` as well as `unstable_cache` is unused since it was introduced in #43659. It was just added because of how the method signature for `set()` was changed back then. However, for those kinds of cache entries, the `revalidate` context property is never used, and instead the `revalidate` property of the passed-in `data` is used. To avoid further confusion (e.g. in [this question](https://github.com/vercel/next.js/pull/76207#discussion_r1968478141)), this PR improves the method signatures and types of the incremental cache so that the different call-site use cases can be clearly discriminated, and superfluous context properties can be omitted.
-
Jiwon Choi authored
### Why? The dark theme was broken due to invalid CSS syntax been shipped at https://github.com/vercel/next.js/issues/76528. ### Follow Up Restore the removed VS Code Extension styled-components as recommended, and apply a real "noop" to CSS template literals so that it can leverage the extension.
-
Tobias Koppers authored
### What? * More precision in reported number * Also report duration for webpack
-
Tim Neutkens authored
## What? Improves the test to check not just the one output file but all files related to the route. This makes it clearer why Turbopack fails instead of failing on the file not existing. It does not attempt to fix the test, only makes it easier to fix it later. <!-- 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 # -->
-
Niklas Mischkulnig authored
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing alternative bundlers.
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing alternative bundlers.
-
- 27 Feb, 2025 22 commits
-
-
vercel-release-bot authored
-
Benjamin Woodruff authored
Reverts vercel/next.js#76606 Causes the nightly jobs to fail with: ``` Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run ``` because we're running two `build_reusable` jobs with the same stepName. While I could fix this, we'd still have problems with either duplicating tests on areweturboyet, or we'd need some logic to merge test results across the matrix. I like the idea of running the full matrix, but this type of thing is rare and maybe not worth solving for (aside from catching it when the PR goes up, which we now have logic for, thanks to @unstubbable).
-
Will Binns-Smith authored
Currently many of our plugins import a singleton mapping of webpack compilation objects to their corresponding tracing span. This change abstracts that away into a function called `getCompilationSpan`, and allows us to use the corresponding mapping in the rspack case. Previously, any plugin that used these would fail with rspack when the compilation object wouldn’t be found. This was the case when running `next build` with rspack. Test Plan: Install and run `next build` with the rspack plugin in a test app.
-
Andrew Clark authored
When a navigation happens and the only thing that changes is the hash fragment, we must do some special handling to ensure that the hash is correctly scrolled into view. Nearly all of this is handled by ScrollAndFocusHandler; for the Segment Cache, the only thing we need to do is update a few of the fields on the router state object, like `scrollableSegments` and `onlyHashChange`.
-
Will Binns-Smith authored
This opts us out of using the native built-in plugins for Rspack for now. The existing swc plugin we use for webpack does additional work beyond just swc transformation, including validating RSC components to make sure they don’t use React APIs unavailable in that context. In total, the native plugins result in a less than 20% performance gain which, while significant, isn’t necessary as we focus on correctness for now. If we decide the maintenance cost of maintaining multiple plugins in parity is worth the performance gain in the future, we can selectively re-enable some or all of these plugins. Test Plan: `pnpm test-dev-rspack test/development/acceptance/server-component-compiler-errors-in-pages.test.ts` no longer fails by missing the invalid React api messages.
-
Sebastian "Sebbie" Silbermann authored
-
Sam Ko authored
## Why? We are not extending the tailwind theme for `--color-background` and `--color-foreground`. (Before) https://github.com/user-attachments/assets/d336dab3-a00f-46cb-9587-055a6c5272fa (After) https://github.com/user-attachments/assets/123e829d-aa7e-4b57-aa21-261fc05350f8 Follow-up fix for https://github.com/vercel/next.js/pull/75407.
-
Niklas Mischkulnig authored
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing alternative bundlers.
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing alternative bundlers.
-
Delba de Oliveira authored
- Minor updates to the new Streaming Metadata section - Document new next.config.ts option: `htmlLimitedBots`
-
Delba de Oliveira authored
We added a new option to `devIndicators` (`position`) and removed the previous options from the docs. This PR adds a version history with a note about the deprecated options.
-
Philip I. Thomas authored
-
Jiachi Liu authored
### What `_optOutBundlingPackages` was not used as there's already a optOutBundlingPackagesRegex, removing it from the `handleExternals`
-
Sebastian "Sebbie" Silbermann authored
-
Hendrik Liebau authored
While #76544 doesn't hurt, this is the more important fix to ensure that tests that were previously marked as `failed` are only promoted to `passed` if they also pass when the test is run with React 18.
-
Sebastian "Sebbie" Silbermann authored
-
Sebastian "Sebbie" Silbermann authored
-
Sebastian "Sebbie" Silbermann authored
-
Hendrik Liebau authored
Follow-up for #76544. [Failed worflow run](https://github.com/vercel/next.js/actions/runs/13560755436/job/37903278074) The PR number was incorrectly retrieved from the `octokit.rest.pulls.create` response.
-
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%28-%40git.branch%3A%2A%3F%2A%20OR%20%40git.branch%3Acanary%29%20%40test.name%3A%22parallel-routes-revalidation%20should%20not%20trigger%20the%20intercepted%20route%20when%20lazy-fetching%20missing%20data%22&agg_m=count&agg_m_source=base&agg_t=count&citest_explorer_sort=timestamp%2Casc&cols=%40test.status%2Ctimestamp%2C%40test.suite%3A83%2C%40test.name%3A607%2C%40git.branch¤tTab=overview&eventStack=&fromUser=false&graphType=flamegraph&index=citest&start=1738068572273&end=1740660572273&paused=false) The latest canary release [failed](https://github.com/vercel/next.js/actions/runs/13555525831/job/37890389323) because the deploy test `parallel-routes-revalidation › should not trigger the intercepted route when lazy-fetching missing data` kept failing even with retries. According to my local testing using `pnpm test-deploy test/e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts -t 'should not trigger the intercepted route when lazy-fetching missing data'`, the forward navigation was sometimes triggered too early after the page was reloaded. To fix it we're waiting for the idle network event before proceeding with the forward navigation.
-
Niklas Mischkulnig authored
-