Meteor-Community-Packages / meteor-collection2

A Meteor package that extends Mongo.Collection to provide support for specifying a schema and then validating against that schema when inserting and updating.
https://packosphere.com/aldeed/collection2
MIT License
1.02k stars 108 forks source link

add load function to lazy export minimal package code #430

Closed jankapunkt closed 2 years ago

jankapunkt commented 3 years ago

Table of Contents generated with DocToc

What

Implemented a function Collection2.load that uses a nested import to load all the required functionality. The default export consists only of the EventEmitter instance.

Why

see #394

StorytellerCZ commented 3 years ago

Don't forget to update readme. I think this will require major version bump.

jankapunkt commented 3 years ago

Yes this will be breaking IMO. I did not edited in the README anything yet, because I first wanted to know what you and @CaptainN think about this :-)

harryadel commented 2 years ago

Sorry for being late @jankapunkt but I'm willing to move forward with this. It's ok to introduce a major version update with new lazy load feature but can we also preserve the old static load type of way? Same way it was done in autoform where they can statically import the package?

jankapunkt commented 2 years ago

@StorytellerCZ if we have a breaking release with Meteor 2.6, wouldn't it be a good chance to add this now and make a breaking 4.0 release?

jankapunkt commented 2 years ago

@StorytellerCZ @harryadel just getting back at this one. Would this have a chance to be merged when I resolve the conflicts?

StorytellerCZ commented 2 years ago

@jankapunkt yes, it will become the base for version 4.0

jankapunkt commented 2 years ago

@StorytellerCZ @harryadel I created a new release-4.0 branch and changed it to be the new base branch

harryadel commented 2 years ago

I had hoped we can merge this with the ability to import things statically like autoform.

StorytellerCZ commented 2 years ago

Let's play with this on the v4 branch.

jankapunkt commented 2 years ago

It should work both dynamic and static.