Skip to content

v1.1.3: Pages Router walker

Choose a tag to compare

@skibidiskib skibidiskib released this 25 Apr 12:41
· 23 commits to master since this release

Pages Router walker (closes a long-standing gap)

Pages Router has been listed as supported since v1.0.0, but the walker only handled App Router naming (route.ts, page.tsx). Real Pages Router projects produced empty output: every section marked "skipped (not applicable)".

v1.1.3 adds a proper walker that handles:

  • Routes: any .ts/.tsx/.js/.jsx file under pages/api/**
  • Pages: any .tsx/.jsx/.ts/.js file under pages/**, excluding _app, _document, _error, and middleware
  • HTTP method detection: scans handler bodies for req.method === 'X' patterns; falls back to ANY when no branch is detected
  • index.tsx files collapse to their parent route (e.g., pages/blog/index.tsx/blog)
  • Catch-all [...slug] and optional catch-all [[...slug]] correctly converted

Generalized stray-leftover heuristic

The v1.1.2 fix prevented a stray src/app/page.tsx from masking a populated root app/. v1.1.3 applies the same count-based heuristic to Pages Router, so a stray src/pages/index.tsx no longer masks a populated pages/.

No App Router behavior changes

Verified byte-identical output on a 1,063-route App Router project.

Install / upgrade

npx ai-codex@latest
# or
npm install -g ai-codex@latest

Notes on previous versions

  • v1.1.1 is deprecated (buggy with stray src/app leftovers; npm install will warn).
  • v1.1.2 remains valid for App Router users; v1.1.3 is the recommended version for everyone.

🤖 This release was prepared and verified by Claude Code.