mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix uniload for packages with plugins
This commit is contained in:
@@ -448,6 +448,13 @@ _.extend(CompleteCatalog.prototype, {
|
||||
// OK, we're building something while uniload
|
||||
var ret = {};
|
||||
_.each(constraints, function (constraint) {
|
||||
if (_.has(constraint, 'version')) {
|
||||
if (constraint.version !== null) {
|
||||
throw Error("Uniload specifying version? " + JSON.stringify(constraint));
|
||||
}
|
||||
delete constraint.version;
|
||||
}
|
||||
|
||||
// Constraints for uniload should just be packages with no version
|
||||
// constraint and one local version (since they should all be in core).
|
||||
if (!_.has(constraint, 'packageName') || _.size(constraint) !== 1) {
|
||||
|
||||
@@ -14,7 +14,17 @@ exports.PackageLoader = function (options) {
|
||||
var self = this;
|
||||
if (!options.catalog)
|
||||
throw Error("Must specify a catalog");
|
||||
self.versions = options.versions || null;
|
||||
|
||||
self.versions = null;
|
||||
// Ignore specified versions if we're doing this as part of uniload.
|
||||
// The PackageLoader created in uniload.js will not specify a versions option,
|
||||
// but other PackageLoaders (eg, created to build plugins in compiler.compile)
|
||||
// might, but we should ignore that since uniload never loads versioned
|
||||
// packages; it only loads precompiled packages (for built releases) or local
|
||||
//packages (from checkout).
|
||||
if (options.versions && options.catalog !== catalog.uniload)
|
||||
self.versions = options.versions;
|
||||
|
||||
self.uniloadDir = options.uniloadDir;
|
||||
self.constraintSolverOpts = options.constraintSolverOpts;
|
||||
self.catalog = options.catalog;
|
||||
|
||||
Reference in New Issue
Block a user