docs: make route sources canonical#10
Merged
Merged
Conversation
There was a problem hiding this comment.
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.
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.
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