Packages migration version 3.0-alpha

Hi @filipenevola, First, I’m trying to convert Collection2 for version 2.1x.x to support async methods only, as @storyteller indicated, but I’m having some problems with this asynchronous Meteor function generation mode:

ASYNC_COLLECTION_METHODS.forEach(methodName => {
  const methodNameAsync = getAsyncMethodName(methodName);
  Mongo.Collection.prototype[methodNameAsync] = function(...args) {
    try {
    // TODO: Fibers remove this when we remove fibers.
      this[methodName].isCalledFromAsync = true;
      return Promise.resolve(this[methodName](...args));
    } catch (error) {
      return Promise.reject(error);
    }
  };

});

Generates a repetition, instead of saving the methodo name it would have been better to use the function reference. I do not know whether you have already addressed this problem in other libraries. In version 3 it works because the method is a real function of the collection.

Unfortunately, there are so many small differences between the 3 and the others that it is difficult to support everything. I have tried to list here the problems I am encountering.