Odd behaviour with package versions

I asked meteor to install dburles:factory

 meteor add dburles:factory

Changes to your project's package version selections:

dburles:factory  added, version 0.2.0
underscore       added, version 1.6.4

dburles:factory: Factories for Meteor

It seems odd that it has chosen version 0.2.0 when packosphere shows 1.5.0 as the latest release

So I asked for a specific version:

meteor add dburles:factory@1.5.0
 => Errors while adding packages:

While selecting package versions:
error: Conflict: Constraint minimongo@1.0.9 is not satisfied by minimongo 2.0.2.
Constraints on package "minimongo":
* minimongo@~2.0.2 <- top level
* minimongo@2.0.2 <- mongo 2.0.3
* minimongo@2.0.0 <- allow-deny 2.0.0 <- mongo 2.0.3
* minimongo@1.0.9 <- dburles:factory 1.5.0

minimongo is referenced as a dependency, but with no specific version.

I was able to work around this dependency problem by manually adding the package to my packages folder.

It was due to api.versionFrom()

Package.onUse(function (api) {
  api.versionsFrom("1.2");
  api.use(["ecmascript", "minimongo", "underscore", "ejson", "random"]);
  api.addFiles("factory.js");
  api.export("Factory");
});

@rjdavid thanks, that makes sense, but I’ve never seen it selecting an old version of a package before like that. Something is still not quite right

dburles:factory does not support Meteor3 yet: meteor-factory/package.js at master · versolearning/meteor-factory · GitHub

Use GitHub - leaonline/collection-factory: Create factory functions for your collections. Supports (but not depends on) aldeed:collection2 one of the many great packages by @jkuester