Meteor-collection-hooks & meteor-publish-composite new versions with async support released!

On a march to Meteor 3, today we have release of 3 MCP packages that both enable or extend async support!

First we have meteor-collection-hooks v1.3.0 which adds support for async methods and will allow you to install easily install the package with Meteor 3.0-alpha.15

Full changelog:

Next, after a long time without an update we have meteor-publish-composite v1.8 which fixes a few bugs, has a minor refactor and now allows to pass async functions which will be crucial in Meteor 3 upgrade preparations.

Full changelog:

v1.8.1 of meteor-publish-composite also allows to you to test it in Meteor 3.0-alpha.15:


Awesome work @storyteller.

I found that there is still an issue with async before hooks.

When you change a field in the doc, depending on the response of an async function it wont set the field to that value, for example.

Tickets.before.insert(async function ticketsBeforeInsert(userId, doc) {
  doc.idNumber = await incrementCounter(`PQR::${doc.orgId}`);

I have been trying to find a way for this to work, but have failed multiple times. Do you have any hints?

Update: Actually just found how to do it, will make a PR for this.


Awesome! Will check in a moment and release a patch release while I have everything still open.

Unfortunatelly my changes break the tests, so will nee to check how to fix that. Will create an issue with the details and there we can continue the discussion.

1 Like

Find and children in reywood:publish-composite now support async as well: