Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow email@example.com! override syntax in .meteor/packages.
With this commit, if a top-level package version constraint in .meteor/packages ends with a '!' character, any other (non-!) constraints on that package elsewhere in the application will be weakened to accept any version of the package that is not less than the constraint, regardless of whether the major/minor versions actually match. This functionality is extremely useful in cases where an unmaintained package was last published with api.versionsFrom(<some ancient version>), thus constraining the major version of any Meteor core package it depended on, but you really want to upgrade that core package anyway. Just put a '!' after the core package's version constraint in your .meteor/packages file, and you will almost certainly get your way. The fact that minimum versions are still enforced is good/fine because the constraints you want to override are typically ancient, so they easily match any recent version of the package. Your only recourse before this @x.y.z! syntax was to find a replacement for the unmaintained package, or fork and modify it locally, or somehow persuade the package author to publish a new version with a more reasonable api.versionsFrom. None of these options were easy. Many thanks to @GeoffreyBooth, long-time maintainer of the `coffeescript` package, for originally suggesting a ! syntax similar to this one: meteor/meteor-feature-requests#208 (comment) The limitation of this syntax to .meteor/packages is deliberate, since overriding package version constraints is a power-tool that should be used sparingly by application developers, and never abused by package authors. Also, limiting the scope of this syntax reduces the risk of an arms race between overrides, a la the infamous CSS !important modifier.
- Loading branch information
Showing with 111 additions and 32 deletions.