Skip to content

docs: make route sources canonical#10

Merged
smiggleworth merged 3 commits into
mainfrom
fix/website-route-contract-docs
Jul 25, 2026
Merged

docs: make route sources canonical#10
smiggleworth merged 3 commits into
mainfrom
fix/website-route-contract-docs

Conversation

@smiggleworth

Copy link
Copy Markdown
Contributor

Summary\n- require explicit registries in route-testing guidance\n- identify Router-backed createServerApp composition as the canonical low-level server path\n- regenerate API and CLI snapshots from published Askr packages\n- add drift coverage against no-argument route warnings and stale route-source prose\n\nFixes #7\n\n## Validation\n- npm run check\n- 338/338 SSG routes\n- 32,442 static API anchors verified

Copilot AI review requested due to automatic review settings July 25, 2026 18:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the website’s documentation and generated snapshots to make route guidance canonical and consistent with the published @askrjs/* package contracts (notably registry-first route testing), and adds drift coverage to prevent regressions.

Changes:

  • Updates route-testing docs to require an explicit RouteRegistry (e.g. getRouteWarnings({ registry })) and removes competing “route source” guidance in server docs.
  • Regenerates API/CLI snapshots and package version manifests after bumping installed @askrjs/* dependencies.
  • Adds a docs drift test to reject no-argument getRouteWarnings() usage and stale route-source prose.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/docs-catalog.test.ts Adds drift assertions to keep route guidance registry-first and remove stale route-source prose.
src/pages/docs/package-versions.ts Updates documented package versions to match installed artifacts.
src/pages/docs/content-overrides.ts Adjusts documentation prose to enforce registry-first testing and canonical Router-backed server composition guidance.
src/pages/docs/cli-snapshot.ts Updates CLI snapshot version from regenerated help output.
src/pages/docs/api-snapshot.ts Updates generated API signatures to match published types.
src/pages/docs/api-manifest.ts Updates API manifest versions to match installed packages.
package.json Bumps installed @askrjs/askr, @askrjs/cli, and @askrjs/server versions.
package-lock.json Updates lockfile to reflect dependency bumps and resolved tarballs.
Comments suppressed due to low confidence (1)

src/pages/docs/content-overrides.ts:2200

  • createServerApp({ router, ... }); inside backticks is not valid syntax (spread ... requires an identifier). This is a likely copy/paste point in routing docs, so the snippet should be syntactically correct.
      'For low-level HTTP applications, createRouter() from @askrjs/server/router (also re-exported from the package root) is the canonical route source. It returns a Router with no routes registered yet. Router carries the same verb methods as RouteBuilder — get, post, put, patch, delete, options, head, trace, connect, and ws — plus use(...middleware) and read-only routes and middleware arrays you can inspect after registration. Pass the finished router as the `router` field of createServerApp({ router, ... }); raw route arrays are compatibility escape hatches, not a parallel application pattern.',

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pages/docs/content-overrides.ts Outdated
@smiggleworth
smiggleworth merged commit f48f6ea into main Jul 25, 2026
1 check passed
@smiggleworth
smiggleworth deleted the fix/website-route-contract-docs branch July 25, 2026 18:18
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.

2 participants