diff --git a/lib/semver.js b/lib/semver.js index 319f12d..887c2f6 100644 --- a/lib/semver.js +++ b/lib/semver.js @@ -124,8 +124,9 @@ Resolver.prototype.resolveSemverRemotely = function* (branch, name, ref) { // special case 'local' if unsuccessful // i.e. if 'ref' is not satisfied by 'local' afford // non-local resolvedRemotes to try to resolve it + var remote; do { - var remote = yield* this.remote.resolve(remotes, name); + remote = yield* this.remote.check(remotes, name); if (!remote) throw new Error('no remote found for dependency "' + name + '".'); var versions = yield* remote.versions(name); var version = semver.maxSatisfying(versions, ref); @@ -139,7 +140,7 @@ Resolver.prototype.resolveSemverRemotely = function* (branch, name, ref) { // to do: use the actual "main" branch // ex. gh-pages return 'master'; -} +}; function nonLocal(remote) { return (remote !== 'local');