Meteor 3 incompatible with dburles:collection-helpers?

Hi all,

Seems like it doesn’t work anymore. Something I should use instead?

findOne() & friends used to automatically _transform() documents so that each document’s “helpers” would exist. Now in Meteor 3, with findOne() (on the client) and findOneAsync() (on the client or server), documents come back sad and lonely, without their friendly helpers.

The source for dburles:collection-helpers is simple, under 20 lines. source for findOneAsync doesn’t show anything super meaningful to me.

Hoping someone else has already figured out a solution here.

Thanks a lot :]

I forked the package and modified the package.js to the following, and it seems to be working fine now:

Package.onUse(function(api) {
  api.versionsFrom(['1.12.1', '2.3', '3.0']); // <---- fix
  api.use([
    'underscore',
    'mongo']);

  api.addFiles('collection-helpers.js');
});

Can anyone confirm that this is indeed a sane fix? I’ll push a PR, although the package hasn’t been modified in 10 years or something…again, if anyone knows of a maintained package I might look into, please feel free to let me know :slight_smile:

Added tests for Meteor 3.0+ and submitted a PR.

1 Like

@drone1 great so see you were able to fix this. Please let us know, once there is a new release avaiable from dburles.