Minor tweaks.

This commit is contained in:
André Cruz
2013-06-15 23:12:17 +01:00
parent 92b7668067
commit 578557f3d7
3 changed files with 6 additions and 8 deletions

View File

@@ -142,7 +142,7 @@ When a package is resolved, all its associated incompatible packages will also b
All decomposed endpoints might contain a `dependants` key that will be used to display additional information
on conflicts.
The `resolved` endpoints should contain the `package meta` and `canonical package` information set.
An additional `unresolvable` key is set to true, will cause a conflict to occur even if a resolution is set.
An additional `unresolvable` key with a true value will cause a conflict to occur even if a resolution is set.
The `resolutions` object will be updated as necessary.
If the Manager is already working, the promise is immediately rejected.
@@ -237,7 +237,7 @@ The promise is resolved with both the `canonical package` and `package meta`.
`ResolveCache#store(canonicalPackage, pkgMeta)`: Promise
Stores `canonicalPackage` into the cache.
Stores `canonical package` into the cache.
The `pkgMeta` is optional and will be read if not passed.
`ResolveCache#eliminate(source, version)`: Promise

View File

@@ -16,11 +16,7 @@ function Manager(config, logger) {
this._logger = logger;
this._repository = new PackageRepository(this._config, this._logger);
this._targets = [];
this._resolved = {};
this._installed = {};
this._incompatibles = {};
this._resolutions = {};
this.configure({});
}
// -----------------

View File

@@ -111,9 +111,11 @@ StandardRenderer.prototype._install = function (packages) {
mout.object.forOwn(pkg.dependencies, function (dependency) {
dependency.dependencies = {};
});
// Make canonical package relative
pkg.canonicalPkg = path.relative(this._config.cwd, pkg.canonicalPkg);
// Signal as root
pkg.root = true;
cliTree = this._tree2archy(pkg);
str += '\n' + archy(cliTree);
}, this);