mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #1082] [MERGED] chore(shims): delete unused deprecated exports #1079
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#1079
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/1082
Author: @james-elicx
Created: 5/5/2026
Status: ✅ Merged
Merged: 5/5/2026
Merged by: @james-elicx
Base:
main← Head:chore/delete-dead-shim-exports📝 Commits (1)
7b8b734chore(shims): delete unused deprecated toRscUrl export📊 Changes
3 files changed (+3 additions, -27 deletions)
View changed files
📝
packages/vinext/src/server/app-browser-entry.ts(+3 -3)📝
packages/vinext/src/shims/navigation.ts(+0 -19)📝
packages/vinext/src/shims/next-shims.d.ts(+0 -5)📄 Description
Summary
Deletes the deprecated
toRscUrlexport from the navigation shim and its matching ambient declaration. All internal callers already usecreateRscRequestUrl, which appends RSC cache-busting params for variant headers.The originally-proposed
requestAsyncStoragedeletion was not performed — see "Verification" below for the reason.What changed
packages/vinext/src/shims/navigation.ts— removetoRscUrl(href)function (deprecated, zero internal callers).packages/vinext/src/shims/next-shims.d.ts— remove the matching ambientexport function toRscUrl(href: string): stringdeclaration so the public type surface no longer advertises it.packages/vinext/src/server/app-browser-entry.ts— update a stale code comment that namedtoRscUrlto instead referencecreateRscRequestUrl(the actual current call site).Verification
toRscUrl— safe to deleteThree hits: the function definition, the ambient type declaration, and one stale code comment. No call sites. After this PR:
requestAsyncStorage— kept (load-bearing)The task originally also proposed deleting the
requestAsyncStoragelegacy alias inshims/internal/work-unit-async-storage.ts. Verification turned up multiple production-relevant uses, so it was left in place:The shim file is the resolution target for Next.js's legacy
next/dist/client/components/request-async-storage.externalmodule path (mapped inindex.ts/check.ts). The shim's JSDoc explicitly states@sentry/nextjsruntime-resolves request context via this name, andtests/shims.test.tsasserts the alias is exported. Deleting it would break the Sentry integration path on Next.js 13.x/14.x-style imports.Test plan
pnpm vp test run tests/app-router.test.ts tests/pages-router.test.ts— 508 tests pass (one unrelatedafterAllcleanup hook timed out tearing downtmpDir; pre-existing infra flake, no test assertions failed).pnpm fmt --write— clean.pnpm knip— clean.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.