Skip to content

Migrate @wekanteam/meteor-reactive-cache#6139

Merged
xet7 merged 9 commits intowekan:mainfrom
harryadel:feature/reactive-cache-async-migration
Feb 19, 2026
Merged

Migrate @wekanteam/meteor-reactive-cache#6139
xet7 merged 9 commits intowekan:mainfrom
harryadel:feature/reactive-cache-async-migration

Conversation

@harryadel
Copy link
Contributor

@harryadel harryadel commented Feb 9, 2026

Since we're in the process of migrating packages to support async I noticed @wekanteam/meteor-reactive-cache which 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

    "@wekanteam/meteor-reactive-cache": "file:./npm-packages/meteor-reactive-cache",

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.md which 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.

- 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
@socket-security
Copy link

socket-security bot commented Feb 17, 2026

@socket-security
Copy link

socket-security bot commented Feb 17, 2026

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.

View full report

@harryadel harryadel changed the title Feature/reactive cache async migration Migrate @wekanteam/meteor-reactive-cache Feb 18, 2026
@harryadel harryadel marked this pull request as ready for review February 18, 2026 22:47
@xet7 xet7 merged commit 1d910b8 into wekan:main Feb 19, 2026
5 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