Several docs cleanups - #1430
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Yo. (I have nothing real to add, but I was still getting notifications for all of our public repos—now on my personal email! Now I'm not, but consider this one last goodbye from the beyond.) |
Member
Author
|
always feel free to lurk or leave a meme :) hi from the bay area! |
(For example because you don't have wifi and work on docs locally)
eseliger
force-pushed
the
es/cleanup-docs
branch
from
November 16, 2025 01:23
7b8500e to
ec94a02
Compare
eseliger
marked this pull request as ready for review
November 16, 2025 01:24
eseliger
enabled auto-merge (squash)
November 16, 2025 01:24
DaedalusG
approved these changes
Nov 24, 2025
marcleblanc2
added a commit
that referenced
this pull request
Sep 7, 2026
Follow-up to 7a81737 (#1430), which deleted the commented-out next.config.js redirects() block. Since 578a3ae (#880) redirects are served by src/middleware.ts, which only reads source and destination and always responds 307, so permanent has been unused for ~19 months. Five entries had it misspelled as permanant, which nothing caught because nothing reads it. Amp-Thread-ID: https://ampcode.com/threads/T-01a07558-075c-743f-b255-c080ca6b5cc7 Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
added a commit
that referenced
this pull request
Sep 7, 2026
Follow-up to 7a81737 (#1430), which deleted the commented-out `redirects()` block from `next.config.js`. ## Why `permanent` on redirect entries has been dead data since 578a3ae (#880, Jan 2025) moved redirects into `src/middleware.ts`. The middleware only reads `source` and `destination`, and calls `NextResponse.redirect()` with no status, so every redirect is a 307 regardless of the field: ```ts const redirect = updatedRedirectsData.find((r: any) => r.source === pathWithoutBase); if (redirect) { return NextResponse.redirect(createRedirectUrl(request, redirect.destination, path)); } ``` The field was only functional while Next's built-in `redirects()` consumed the list (cfeed16, Dec 2023 → 578a3ae, Jan 2025). Nothing has read it since, which is why five entries added in #1620 with the key misspelled as `permanant` went unnoticed. ## What - Remove `permanent` / `permanant` from all 1325 entries in `src/data/redirects.ts` - Remove the `permanent: redirect.permanent` pass-through in `updatedRedirectsData` - No behaviour change: matching and destinations are untouched ## Verification - `rg -o "^\t\t\w+:" src/data/redirects.ts | sort | uniq -c` → 1325 `source`, 1325 `destination`, nothing else - `npx tsc --noEmit` reports no errors in `redirects.ts` or `middleware.ts` (the remaining errors are the pre-existing missing `contentlayer/generated` build output) - `prettier --check` on `redirects.ts` fails the same way it does on `main` (line-join nits at exactly 80 chars); left as-is to avoid unrelated churn If we ever want 308s back, the fix is in `middleware.ts` (pass a status to `NextResponse.redirect`), and at that point the key can be reintroduced with the entries that actually need it. Co-authored-by: Amp <amp@ampcode.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 individual commits