Meteor package dependentcy version constrains

I’m developing a Meteor package, in this package I use other Meteor packages, for example

Package.onUse(function (api) {
  api.versionsFrom("2.0");
  api.use("react-meteor-data@2.0.0 || 3.0.0");

The problem is it doesn’t match react-meteor-data@3.0.0-beta300.1

How does Meteor find/compare package versions? what definition will support any react-meteor-data version 3 package?

Thank you.

1 Like

what definition will support any react-meteor-data version 3 package?

I think if you add:

api.use("react-meteor-data@2.0.0 || 3.0.0-beta300.1 || 3.0.0");

From what I recall, beta/rc versions need to be exact to work with packages. I will try to find the code for the package comparison; I think it is somewhere along this file

1 Like

WOW. That version comparing looks incredibly complicated

If I understand the comments of the code correctly,

@3.0.0-beta300.1

means that succeeding beta300 pre-release versions should work including version 3.x.y releases