add async support for waitOn#126
Merged
Merged
Conversation
|
@codex review |
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 |
Author
|
Right, but this code will result in a call to Promise.all() within
FlowRouter, where promises are processed concurrently.
Sometimes you might need to process them sequentially, or is my case:
await somethingImportant
return [ … ]
I realize it can still be done with a single Promise but the code is less
readable IMHO.
…On Thu, 26 Mar 2026 at 16:46, dr.dimitru ***@***.***> wrote:
Merged #126 <#126> into
master.
—
Reply to this email directly, view it on GitHub
<#126?email_source=notifications&email_token=ABQIEPFDWPSTQQNFGEKUWQL4SVGFHA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTEMZZGM4TANBYGU2DNJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FMMZXW65DFOJPWG3DJMNVQ#event-23939048546>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQIEPEARDTPFB2YD43NCR34SVGFHAVCNFSM6AAAAACWEW56E2VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMRTHEZTSMBUHA2TINQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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.
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.
Close #125
All tests pass.
✅ 1. Make sure you're using
spacesfor 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 :)