Skip to content

Add asynchronous route guards - #133

Merged
dr-dimitru merged 1 commit into
veliovgroup:masterfrom
drone1:feature/async-route-guards
Aug 24, 2026
Merged

dr-dimitru merged 1 commit into
veliovgroup:masterfrom
drone1:feature/async-route-guards

Conversation

@drone1

@drone1 drone1 commented Jul 22, 2026 •

Copy link
Copy Markdown

Summary

  • add route and group guard hooks that run before waitOn
  • await guards sequentially from parent group to child group to route
  • allow guards to redirect and skip the remaining guarded route work
  • prevent stale async guards from resuming or redirecting after a newer navigation
  • document the API and add runtime + TypeScript coverage

This is a cleaned-up port of functionality used in Lightwall. The original local implementation predated the current MicroRouter architecture; this version is rebased on current master and adds explicit stale-navigation handling.

FWIW: I've had this code in my app in production for months now.

Tests

  • meteor npm run test:once (196 passed)
  • meteor npm run test:types

@dr-dimitru
dr-dimitru merged commit 4255113 into veliovgroup:master Aug 24, 2026
7 checks passed
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