Skip to content

add async support for waitOn#126

Merged
dr-dimitru merged 1 commit into
veliovgroup:masterfrom
drone1:master
Mar 26, 2026
Merged

add async support for waitOn#126
dr-dimitru merged 1 commit into
veliovgroup:masterfrom
drone1:master

Conversation

@drone1

@drone1 drone1 commented Mar 2, 2026

Copy link
Copy Markdown

Close #125

All tests pass.

image

✅ 1. Make sure you're using spaces for indentation [yes]
✅ 2. Make sure all new code is documented in-code-docs [yes]
✅ 3. Make sure new features, or changes in behavior is documented in README.md and/or other docs materials [yes]
✅ 4. Make sure this PR was previously discussed, if not create new issue ticket for your PR
✅ 5. Give an expressive description what you have changed/added and why

Thank you for making this package better :)

@dr-dimitru-agent

Copy link
Copy Markdown

@codex review

@dr-dimitru

Copy link
Copy Markdown
Member

@drone1 looks good! Just FYI: I didn't added it to v3.12.0 as you can do the next:

FlowRouter.route('/posts', {
	name: 'posts',
	waitOn() {
		return [import('/imports/client/posts.js'), Meteor.subscribe('Posts')];
	}
});

So it seemed a little unnecessary to call it async waitOn() {}

@dr-dimitru dr-dimitru merged commit ef23774 into veliovgroup:master Mar 26, 2026
@drone1

drone1 commented Mar 27, 2026 via email

Copy link
Copy Markdown
Author

dr-dimitru added a commit that referenced this pull request Apr 21, 2026
# ostrio:flow-router-extra Changelog

For full history see [GitHub releases](https://github.com/veliovgroup/flow-router/releases).

## v3.14.0 (2026-04-22)

### ⚠️ Major changes
- Replaced page.js w/ custom `MicroRouter` (`lib/micro-router.js`, client/router.js) — full control over history, popstate, matchPath; removes dep, fixes bugs. (PRs #126/#127), closing #74 and #73, thanks to @dupontbertrand
- Shared base classes (`lib/router-base.js` etc) for Router/Route/Group — isomorphic, cleaner code, better maintenance.
- Async `waitOn` overhaul: correct hook order, completeness, abort on navigation, Tracker.autorun instead of setTimeout polling. **Highlights new robust async feature**.
- Removed `underscore` dep (refactor to native methods; updated tests/docs).

### Changes
- 🔧 Fixed order and completeness in async waitOn (client/route.js, router.core.spec.js).
- 🔧 Fixed undefined `name` in tests; added missed `timer` var.
- 🛡️ Security: removed publicly exposed `___refresh` route.
- 🔧 Fixed renderer queue (startQueue.bind() issue).
- 📔 Docs updated to prefer native JS; AGENTS.md + SKILL.md for ecosystem.
- 👷‍♂️ TS refactor/setup, .cursorignore, styling, year bump, test helpers.
- notfound route workaround/fixes for companion packages compatibility (meta/title).

### ✨ New
- 😎 Agentic Skills, AGENTS.md for Cursor IDE + meteor-flow-router (registration, hooks, meta/title, TS, 404).
- 👨‍💻 TS tests via `tsd` (`index.test-d.ts`); updated `index.d.ts`.
- Enhanced `FlowRouter.initialize(options)`, `maxWaitFor`, `MAX_WAIT_FOR_MS` export, onRouteRegister.
- Better Meteor 3.x, SWC/compiler compat, peer version alignment ([email protected]+ pins in meta).

### 📦 Dependencies
**prod**
- `qs`: 6.14.0 (from 6.x)

**dev**
- zodern:[email protected], typescript (weak); removed underscore from onTest where possible.
- Updated test-packages for current Meteor.
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.

waitOn() function not detected if async

3 participants