mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Read versions instead of packages in the packages.js hack
This commit is contained in:
@@ -1754,8 +1754,8 @@ _.extend(Package.prototype, {
|
||||
|
||||
_.each(["client", "server"], function (sliceName) {
|
||||
// Determine used packages
|
||||
// var names = project.getAllDependencies(appDir);
|
||||
var names = project.getPackages(appDir);
|
||||
var vers = project.getAllDependencies(appDir);
|
||||
var arch = sliceName === "server" ? "os" : "browser";
|
||||
|
||||
|
||||
@@ -1763,13 +1763,16 @@ _.extend(Package.prototype, {
|
||||
// instead of an override.
|
||||
names = _.map(names, function(name) {
|
||||
var narr = name.split("@=");
|
||||
if (narr.length === 2) {
|
||||
var newPath = tropohouse.packagePath(narr[0], narr[1]);
|
||||
self.library.override(narr[0], newPath);
|
||||
}
|
||||
return narr[0];
|
||||
});
|
||||
|
||||
vers = _.map(vers, function(name) {
|
||||
var newPath = tropohouse.packagePath(name.packageName, name.versionConstraint, "browser+os");
|
||||
self.library.override(name.packageName, newPath);
|
||||
return name.packageName;
|
||||
});
|
||||
|
||||
names = _.union(names, vers);
|
||||
// Create slice
|
||||
var slice = new Slice(self, {
|
||||
name: sliceName,
|
||||
|
||||
@@ -54,9 +54,9 @@ tropohouse.downloadedBuilds = function (packageName, version) {
|
||||
tropohouse.downloadedBuildsDirectory(packageName, version));
|
||||
};
|
||||
|
||||
tropohouse.packagePath = function (packageName, version) {
|
||||
tropohouse.packagePath = function (packageName, version, arch) {
|
||||
return path.join(tropohouse.getWarehouseDir(), "packages", packageName,
|
||||
version);
|
||||
version, arch);
|
||||
};
|
||||
|
||||
tropohouse.downloadSpecifiedBuild = function (buildRecord) {
|
||||
|
||||
@@ -99,7 +99,10 @@ _.extend(WatchSet.prototype, {
|
||||
if (self.files[filePath] === hash)
|
||||
return;
|
||||
// Nope, inconsistent.
|
||||
self.alwaysFire = true;
|
||||
console.log(filePath, hash, self.files[filePath]);
|
||||
self.files[filePath] = hash;
|
||||
|
||||
// self.alwaysFire = true;
|
||||
return;
|
||||
}
|
||||
self.files[filePath] = hash;
|
||||
@@ -135,9 +138,9 @@ _.extend(WatchSet.prototype, {
|
||||
self.alwaysFire = true;
|
||||
return;
|
||||
}
|
||||
_.each(other.files, function (hash, name) {
|
||||
self.addFile(name, hash);
|
||||
});
|
||||
// _.each(other.files, function (hash, name) {
|
||||
// self.addFile(name, hash);
|
||||
// });
|
||||
_.each(other.directories, function (dir) {
|
||||
// XXX this doesn't deep-clone the directory, but I think these objects
|
||||
// are never mutated
|
||||
|
||||
Reference in New Issue
Block a user