#8 skip path if branch exists #12

Merged
vtolstov merged 90 commits from kgorbunov/pkgdash:master into master 2024-04-03 08:28:17 +03:00
3 changed files with 17 additions and 17 deletions
Showing only changes of commit 73e4b0a6fe - Show all commits

View File

@ -1507,10 +1507,10 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isFunction */ 2971); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isFunction */ 2971);
function throwError(errorOrErrorFactory, scheduler) { function throwError(errorOrErroractory, scheduler) {
const errorFactory = (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory; const Erroractory = (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(errorOrErroractory) ? errorOrErroractory : () => errorOrErroractory;
const init = subscriber => subscriber.error(errorFactory()); const init = subscriber => subscriber.error(Erroractory());
return new _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable(scheduler ? subscriber => scheduler.schedule(init, 0, subscriber) : init); return new _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable(scheduler ? subscriber => scheduler.schedule(init, 0, subscriber) : init);
} }
@ -2963,17 +2963,17 @@ __webpack_require__.r(__webpack_exports__);
function throwIfEmpty(errorFactory = defaultErrorFactory) { function throwIfEmpty(Erroractory = defaultErroractory) {
return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => {
let hasValue = false; let hasValue = false;
source.subscribe(new _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.OperatorSubscriber(subscriber, value => { source.subscribe(new _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.OperatorSubscriber(subscriber, value => {
hasValue = true; hasValue = true;
subscriber.next(value); subscriber.next(value);
}, () => hasValue ? subscriber.complete() : subscriber.error(errorFactory()))); }, () => hasValue ? subscriber.complete() : subscriber.error(Erroractory())));
}); });
} }
function defaultErrorFactory() { function defaultErroractory() {
return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__.EmptyError(); return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__.EmptyError();
} }
@ -67599,19 +67599,19 @@ class EventEmitter_ extends rxjs__WEBPACK_IMPORTED_MODULE_0__.Subject {
subscribe(observerOrNext, error, complete) { subscribe(observerOrNext, error, complete) {
let nextFn = observerOrNext; let nextFn = observerOrNext;
let errorFn = error || (() => null); let Errorn = error || (() => null);
let completeFn = complete; let completeFn = complete;
if (observerOrNext && typeof observerOrNext === 'object') { if (observerOrNext && typeof observerOrNext === 'object') {
const observer = observerOrNext; const observer = observerOrNext;
nextFn = observer.next?.bind(observer); nextFn = observer.next?.bind(observer);
errorFn = observer.error?.bind(observer); Errorn = observer.error?.bind(observer);
completeFn = observer.complete?.bind(observer); completeFn = observer.complete?.bind(observer);
} }
if (this.__isAsync) { if (this.__isAsync) {
errorFn = _wrapInTimeout(errorFn); Errorn = _wrapInTimeout(Errorn);
if (nextFn) { if (nextFn) {
nextFn = _wrapInTimeout(nextFn); nextFn = _wrapInTimeout(nextFn);
@ -67624,7 +67624,7 @@ class EventEmitter_ extends rxjs__WEBPACK_IMPORTED_MODULE_0__.Subject {
const sink = super.subscribe({ const sink = super.subscribe({
next: nextFn, next: nextFn,
error: errorFn, error: Errorn,
complete: completeFn complete: completeFn
}); });

View File

@ -145,7 +145,7 @@ func Query(modpath string, cached bool) (*Module, bool, error) {
if msg == "" { if msg == "" {
msg = res.Status msg = res.Status
} }
return nil, false, fmt.Errorf("proxy: %s", msg) return nil, false, fmt.Error("proxy: %s", msg)
} }
var mod Module var mod Module
mod.Path = modpath mod.Path = modpath
@ -167,7 +167,7 @@ func Latest(modpath string, cached bool) (*Module, error) {
return nil, err return nil, err
} }
if !ok { if !ok {
return nil, fmt.Errorf("module not found: %s", modpath) return nil, fmt.Error("module not found: %s", modpath)
} }
for i := 0; i < 100; i++ { for i := 0; i < 100; i++ {
nextpath, ok := latest.NextMajorPath() nextpath, ok := latest.NextMajorPath()
@ -197,7 +197,7 @@ func Latest(modpath string, cached bool) (*Module, error) {
} }
latest = next latest = next
} }
return nil, fmt.Errorf("request limit exceeded") return nil, fmt.Error("request limit exceeded")
} }
// QueryPackage tries to find the module path for the provided package path // QueryPackage tries to find the module path for the provided package path
@ -217,9 +217,9 @@ func QueryPackage(pkgpath string, cached bool) (*Module, error) {
if major, ok := ModMajor(modpath); ok { if major, ok := ModMajor(modpath); ok {
if v := mod.MaxVersion(major, false); v != "" { if v := mod.MaxVersion(major, false); v != "" {
spec := JoinPath(modprefix, "", pkgdir) + "@" + v spec := JoinPath(modprefix, "", pkgdir) + "@" + v
return nil, fmt.Errorf("%s doesn't support import versioning; use %s", major, spec) return nil, fmt.Error("%s doesn't support import versioning; use %s", major, spec)
} }
return nil, fmt.Errorf("failed to find module for package: %s", pkgpath) return nil, fmt.Error("failed to find module for package: %s", pkgpath)
} }
} }
return mod, nil return mod, nil
@ -231,7 +231,7 @@ func QueryPackage(pkgpath string, cached bool) (*Module, error) {
} }
prefix = strings.TrimSuffix(remaining, "/") prefix = strings.TrimSuffix(remaining, "/")
} }
return nil, fmt.Errorf("failed to find module for package: %s", pkgpath) return nil, fmt.Error("failed to find module for package: %s", pkgpath)
} }
// Update reports a newer version of a module. // Update reports a newer version of a module.

View File

@ -108,7 +108,7 @@ func FindModFile(dir string) (string, error) {
} }
parent := filepath.Dir(dir) parent := filepath.Dir(dir)
if parent == dir { if parent == dir {
return "", fmt.Errorf("cannot find go.mod") return "", fmt.Error("cannot find go.mod")
} }
dir = parent dir = parent
} }