[pull] canary from vercel:canary - #1305
Merged
Merged
Conversation
Make the inserted comment configurable.
## What? - remove manifest fragments when Turbopack's development entrypoint cleanup removes a deleted page - add an end-to-end regression for replacing concrete App Router pages with an optional catch-all without restarting the dev server ## Why? Turbopack already removes deleted entry keys from its asset mapper, subscriptions, issues, and client state. It did not remove the corresponding records from `TurbopackManifestLoader`, so the next manifest write continued to serialize deleted App Router routes. When a deleted concrete route is replaced by an optional catch-all, those stale records conflict with the new route at the same specificity. The dev server reports the route conflict and responds with 404 until it is restarted. This is independently consistent with the cleanup identified in #97194. This draft adds end-to-end coverage that fails on current canary by observing both the 404 and stale manifest records, then passes with the lifecycle fix. ## How? Pass the existing manifest loader to `handleEntrypointsDevCleanup` and call its existing `delete(key)` method in the same branch that deletes the stale asset mapping. This keeps all per-entry manifest maps synchronized with the authoritative current entrypoint set without special-casing any route shape. The regression test: 1. compiles two concrete localized routes 2. deletes both pages and adds an optional catch-all 3. waits for three affected paths to return the new catch-all content 4. verifies the development app-paths manifest contains the catch-all and no deleted entries ## Verification - reproduced the report on `16.3.1-canary.10`: all four reported paths returned 404 after the live route replacement and returned 200 after a restart - confirmed the regression fails on current canary before the source change with the same-specificity route error and a 404 response - `pnpm test-dev-turbo test/development/app-dir/hmr-deleted-page/hmr-deleted-page.test.ts` - `pnpm test-dev-webpack test/development/app-dir/hmr-deleted-page/hmr-deleted-page.test.ts` - `pnpm test-dev-rspack test/development/app-dir/hmr-deleted-page/hmr-deleted-page.test.ts` - `CI=1 pnpm build-all` - `pnpm --filter=next build` - formatting, ESLint, staged-diff, and signed-commit checks Fixes #97035
The metadata resolver currently passes ResolvedMetadata directly to tag rendering even though several fields only exist to carry state between route layers. Introduce SelectedMetadata as the post-processed, tag-ready representation and convert the current resolved output before rendering. This makes the final selection boundary explicit without changing generated tags, preparing the metadata pipeline for multiple independently resolved branches. <!-- NEXT_JS_LLM -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )