Migrate @wekanteam/meteor-reactive-cache#6139
Merged
xet7 merged 9 commits intowekan:mainfrom Feb 19, 2026
Merged
Conversation
- Clone @wekanteam/meteor-reactive-cache to npm-packages/ - Add .meteorignore to exclude npm-packages from Meteor - Update package.json to use local file path This allows direct modification of the package for Meteor 3.0 async migration while maintaining publishability to npm.
- Convert all ReactiveCacheServer methods to async - findOne() → findOneAsync() - find().fetch() → find().fetchAsync() - Meteor.user() → Meteor.userAsync() - Convert ReactiveCache facade methods to async - Server path uses await for async operations - Client path returns sync Minimongo result (wrapped in Promise) This prepares the codebase for Meteor 3.0 where MongoDB operations are async.
Part 3 of ReactiveCache async migration: - Add await before all ReactiveCache.getX() calls - Make functions containing ReactiveCache calls async - Convert forEach/map/filter loops with async callbacks to for...of - Update model helpers, Meteor methods, JsonRoutes handlers - Update collection hooks (.before/.after insert/update/remove) - Update .allow() callbacks to async Files updated across models/ and server/ directories: - Model files: cards, boards, lists, swimlanes, activities, users, checklists, checklistItems, customFields, attachments, integrations, cardComments, settings files, creators, exporters, and more - Server files: publications, methods, notifications, routes, migrations
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
… without wrapping in an extra Promise
xet7
added a commit
that referenced
this pull request
Feb 19, 2026
…ache https://github.com/wekan/meteor-reactive-cache. Thanks to xet7 ! Related #6139
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.
Since we're in the process of migrating packages to support async I noticed
@wekanteam/meteor-reactive-cachewhich is an NPM package, it's used as a caching layer in order to prevent repetitive DB calls.The problem is, as with many Meteor projects out there, is the isomorphism (using the same code for client and server). I hate it! I wish Meteor never attempted it but what can we do 🤷♂️
The best course of action was to move this package within Wekan code and link to it via filesystem
The directory from which this package is imported is ignored by the Meteor build system via
.meteorignore.This is the best way to iterate quickly on this package and modify it as we see fit in our migration process without having to create separate PRs, merge and push then come here to import the latest version.
The changes are quite timid, basically we asyncified server side calls of reactive cache whilst keeping client side as is. The only downside here is that in allow/deny calls we had to stop using reactive cache as allow/deny are only sync in 2.x.
This unique workaround is documented in
METEOR3_MIGRATION.mdwhich has been added to the root level in order to track the current status of 3.0 migration and upcoming challenges so when we flip the switch. We wouldn't lose track of what needs to be done.