Skip to content

refactor: delete app-dev-server.ts, point all callers at entries/ directly (#253 batch 3)#379

Merged
james-elicx merged 2 commits intomainfrom
refactor/remove-app-dev-server
Mar 9, 2026
Merged

refactor: delete app-dev-server.ts, point all callers at entries/ directly (#253 batch 3)#379
james-elicx merged 2 commits intomainfrom
refactor/remove-app-dev-server

Conversation

@james-elicx
Copy link
Collaborator

Summary

Follows #377 and #378. Now that all generators live in entries/, the server/app-dev-server.ts shim (which was just three re-exports) can be deleted.

Changes:

  • Delete packages/vinext/src/server/app-dev-server.ts
  • Update every import/dynamic-import site to point straight at the individual entry modules:
    • entries/app-rsc-entry.tsgenerateRscEntry, AppRouterConfig
    • entries/app-ssr-entry.tsgenerateSsrEntry
    • entries/app-browser-entry.tsgenerateBrowserEntry
  • Update stale app-dev-server.ts references in comments across source files, tests, and examples

Files updated: index.ts, tests/entry-templates.test.ts, tests/app-router.test.ts, tests/shims.test.ts, plus comments in 6 other files.

Verification

  • pnpm run lint — 0 warnings, 0 errors
  • pnpm run typecheck — clean
  • pnpm test tests/entry-templates.test.ts — 10/10 pass

…es/ directly

The file was already a pure re-export shim with no logic of its own.
Update every import/dynamic-import site to point straight at the
individual entry modules:

  entries/app-rsc-entry.ts    ← generateRscEntry, AppRouterConfig
  entries/app-ssr-entry.ts    ← generateSsrEntry
  entries/app-browser-entry.ts ← generateBrowserEntry

Sites updated:
  packages/vinext/src/index.ts
  tests/entry-templates.test.ts
  tests/app-router.test.ts
  tests/shims.test.ts

Also update stale comments in:
  server/middleware-codegen.ts, server/request-pipeline.ts,
  server/instrumentation.ts, shims/metadata.tsx,
  tests/rsc-streaming.test.ts, tests/nextjs-compat/rsc-context-lazy-stream.test.ts,
  examples/app-router-cloudflare/instrumentation*.ts
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 9, 2026

Open in StackBlitz

npm i https://pkg.pr.new/vinext@379

commit: 9135aa5

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original

@james-elicx
Copy link
Collaborator Author

/bigbonk review

@james-elicx james-elicx marked this pull request as ready for review March 9, 2026 14:09
Copy link
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approve

Clean mechanical refactor. Verified the following:

Correctness

  • The deleted app-dev-server.ts re-exported exactly 4 symbols: AppRouterConfig (type), generateRscEntry, generateSsrEntry, generateBrowserEntry. All callers now import directly from entries/app-rsc-entry.ts, entries/app-ssr-entry.ts, and entries/app-browser-entry.ts respectively.
  • index.ts imports updated correctly (3 separate imports replacing 1 barrel import).
  • entry-templates.test.ts imports updated, including the AppRouterConfig type.
  • app-router.test.ts and shims.test.ts dynamic imports (await import(...)) all point to the correct entry modules.

Completeness

  • Grepped the full repo for app-dev-server — zero remaining references outside .git/ metadata, except the intentional "Previously housed in server/app-dev-server.ts" comment in entries/app-rsc-entry.ts:8.
  • All 21 changed files are comment/import updates only — no behavioral changes.

Comment accuracy

  • AGENTS.md key files table, test mapping table, and dev/prod parity section all updated.
  • README.md directory tree updated to list the entries/ directory and remove app-dev-server.ts from server/.
  • .opencode/ agent docs and command files updated consistently.
  • TRACKING.md references (10 occurrences) all point to the correct entry files.

No functional changes — pure import rewiring and comment updates. No risk to dev/prod parity.

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 9, 2026

Reviewed and approved PR #379. Summary:

  • Correctness: All 4 exports from the deleted app-dev-server.ts shim (AppRouterConfig, generateRscEntry, generateSsrEntry, generateBrowserEntry) are now imported directly from their respective entry modules. Every import site — static imports in index.ts/entry-templates.test.ts and dynamic imports in app-router.test.ts/shims.test.ts — points to the correct module.
  • Completeness: No remaining references to app-dev-server in the codebase (outside .git/ and one intentional historical comment in app-rsc-entry.ts:8).
  • No functional changes: Pure import rewiring and comment updates across 21 files. No behavioral risk.

github run

@james-elicx james-elicx enabled auto-merge (squash) March 9, 2026 14:10
@james-elicx james-elicx merged commit 23a5cb2 into main Mar 9, 2026
24 of 25 checks passed
@james-elicx james-elicx deleted the refactor/remove-app-dev-server branch March 9, 2026 14:11
james-elicx added a commit that referenced this pull request Mar 9, 2026
…ectly (#253 batch 3) (#379)

* refactor: delete app-dev-server.ts and update all references to entries/ directly

The file was already a pure re-export shim with no logic of its own.
Update every import/dynamic-import site to point straight at the
individual entry modules:

  entries/app-rsc-entry.ts    ← generateRscEntry, AppRouterConfig
  entries/app-ssr-entry.ts    ← generateSsrEntry
  entries/app-browser-entry.ts ← generateBrowserEntry

Sites updated:
  packages/vinext/src/index.ts
  tests/entry-templates.test.ts
  tests/app-router.test.ts
  tests/shims.test.ts

Also update stale comments in:
  server/middleware-codegen.ts, server/request-pipeline.ts,
  server/instrumentation.ts, shims/metadata.tsx,
  tests/rsc-streaming.test.ts, tests/nextjs-compat/rsc-context-lazy-stream.test.ts,
  examples/app-router-cloudflare/instrumentation*.ts

* docs: update app-dev-server.ts references in markdown files to entries/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: Extract template string code generation from index.ts and app-dev-server.ts into separate modules

1 participant