Repository navigation
Keep route scan order on watcher updates - #28
Open
everton-dgn wants to merge 1 commit into
Open
everton-dgn wants to merge 1 commit into
everton-dgn wants to merge 1 commit into
Conversation
An updated route was moved to the end of the manifest and new files were appended, so watcher events reordered the manifest and the generated types. Replace existing routes in place and insert new ones where a full scan puts them.
This was referenced Oct 22, 2026
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.
Fixes #27
The watcher path changed the manifest order that #14 made deterministic:
_addRoutemoved an updated route to the end and appended new ones._addRoutereplaces an existing route in place.removeRoutedrops the record._addRoutetakes the source as an optional second argument. Without it, a new route is appended, as before.This also changes the initial scan when two files map to the same path (for example
about.mdxandabout.tsx): the entry now keeps the position of the first file instead of moving to the end.The new tests in
test/convention.spec.tsupdate a route, remove and re-add it, and add files in the middle and at the end, comparingrouter.routeswith a fresh scan after each step; a second test covers two files that map to the same path. Both fail onmain.