From 7784c3f770f2a9953b3cb43612a4aedb196d4184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Fri, 14 Jul 2017 08:43:14 +0200 Subject: [PATCH] Changed build status badges urls --- README.md | 2 +- README_ja.md | 2 +- README_ru.md | 2 +- README_zh-cn.md | 2 +- README_zh-hant.md | 2 +- dist/redux-saga.js | 49 ++++++++++++++++++++++++---------------------- 6 files changed, 31 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 72058083f..910fa4473 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # redux-saga -[![Build Status](https://travis-ci.org/camflan/redux-saga.svg?branch=master)](https://travis-ci.org/camflan/redux-saga) +[![Build Status](https://travis-ci.org/redux-saga/redux-saga.svg?branch=master)](https://travis-ci.org/redux-saga/redux-saga) [![Join the chat at https://gitter.im/yelouafi/redux-saga](https://badges.gitter.im/yelouafi/redux-saga.svg)](https://gitter.im/yelouafi/redux-saga?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![npm version](https://img.shields.io/npm/v/redux-saga.svg?style=flat-square)](https://www.npmjs.com/package/redux-saga) [![CDNJS](https://img.shields.io/cdnjs/v/redux-saga.svg?style=flat-square)](https://cdnjs.com/libraries/redux-saga) diff --git a/README_ja.md b/README_ja.md index 4580885b5..1b0ab4c7b 100644 --- a/README_ja.md +++ b/README_ja.md @@ -1,6 +1,6 @@ # redux-saga -[![Build Status](https://travis-ci.org/camflan/redux-saga.svg?branch=master)](https://travis-ci.org/camflan/redux-saga) +[![Build Status](https://travis-ci.org/redux-saga/redux-saga.svg?branch=master)](https://travis-ci.org/redux-saga/redux-saga) [![Join the chat at https://gitter.im/yelouafi/redux-saga](https://badges.gitter.im/yelouafi/redux-saga.svg)](https://gitter.im/yelouafi/redux-saga?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![npm version](https://img.shields.io/npm/v/redux-saga.svg?style=flat-square)](https://www.npmjs.com/package/redux-saga) [![CDNJS](https://img.shields.io/cdnjs/v/redux-saga.svg?style=flat-square)](https://cdnjs.com/libraries/redux-saga) diff --git a/README_ru.md b/README_ru.md index b33c7e0d5..868069796 100644 --- a/README_ru.md +++ b/README_ru.md @@ -1,6 +1,6 @@ # redux-saga -[![Build Status](https://travis-ci.org/camflan/redux-saga.svg?branch=master)](https://travis-ci.org/camflan/redux-saga) [![Join the chat at https://gitter.im/yelouafi/redux-saga](https://badges.gitter.im/yelouafi/redux-saga.svg)](https://gitter.im/yelouafi/redux-saga?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![npm version](https://img.shields.io/npm/v/redux-saga.svg?style=flat-square)](https://www.npmjs.com/package/redux-saga) [![CDNJS](https://img.shields.io/cdnjs/v/redux-saga.svg?style=flat-square)](https://cdnjs.com/libraries/redux-saga) +[![Build Status](https://travis-ci.org/redux-saga/redux-saga.svg?branch=master)](https://travis-ci.org/redux-saga/redux-saga) [![Join the chat at https://gitter.im/yelouafi/redux-saga](https://badges.gitter.im/yelouafi/redux-saga.svg)](https://gitter.im/yelouafi/redux-saga?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![npm version](https://img.shields.io/npm/v/redux-saga.svg?style=flat-square)](https://www.npmjs.com/package/redux-saga) [![CDNJS](https://img.shields.io/cdnjs/v/redux-saga.svg?style=flat-square)](https://cdnjs.com/libraries/redux-saga) [![OpenCollective](https://opencollective.com/redux-saga/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/redux-saga/sponsors/badge.svg)](#sponsors) diff --git a/README_zh-cn.md b/README_zh-cn.md index dffb0b13f..fd1baccb3 100644 --- a/README_zh-cn.md +++ b/README_zh-cn.md @@ -1,6 +1,6 @@ # redux-saga -[![Build Status](https://travis-ci.org/camflan/redux-saga.svg?branch=master)](https://travis-ci.org/camflan/redux-saga) +[![Build Status](https://travis-ci.org/redux-saga/redux-saga.svg?branch=master)](https://travis-ci.org/redux-saga/redux-saga) [![npm version](https://img.shields.io/npm/v/redux-saga.svg?style=flat-square)](https://www.npmjs.com/package/redux-saga) [![CDNJS](https://img.shields.io/cdnjs/v/redux-saga.svg?style=flat-square)](https://cdnjs.com/libraries/redux-saga) diff --git a/README_zh-hant.md b/README_zh-hant.md index 446aeb32b..66246b835 100644 --- a/README_zh-hant.md +++ b/README_zh-hant.md @@ -1,6 +1,6 @@ # redux-saga -[![Build Status](https://travis-ci.org/camflan/redux-saga.svg?branch=master)](https://travis-ci.org/camflan/redux-saga) +[![Build Status](https://travis-ci.org/redux-saga/redux-saga.svg?branch=master)](https://travis-ci.org/redux-saga/redux-saga) [![npm version](https://img.shields.io/npm/v/redux-saga.svg?style=flat-square)](https://www.npmjs.com/package/redux-saga) [![CDNJS](https://img.shields.io/cdnjs/v/redux-saga.svg?style=flat-square)](https://cdnjs.com/libraries/redux-saga) diff --git a/dist/redux-saga.js b/dist/redux-saga.js index bee1f0ebc..6d7e9ef79 100644 --- a/dist/redux-saga.js +++ b/dist/redux-saga.js @@ -608,8 +608,8 @@ function channel() { } function flush$$1(cb) { - checkForbiddenStates(); // TODO: check if some new state should be forbidden now - check(cb, is.func, "channel.flush' callback must be a function"); + checkForbiddenStates // TODO: check if some new state should be forbidden now + ();check(cb, is.func, "channel.flush' callback must be a function"); if (closed && buffer.isEmpty()) { cb(END); return; @@ -1327,13 +1327,13 @@ function proc(iterator) { var log$$1 = logger || log; var stdChannel$$1 = stdChannel(subscribe); - var taskContext = Object.create(parentContext); + var taskContext = Object.create(parentContext /** Tracks the current effect cancellation Each time the generator progresses. calling runEffect will set a new value on it. It allows propagating cancellation to child effects **/ - next.cancel = noop; + );next.cancel = noop; /** Creates a new task descriptor for this generator, We'll also create a main task @@ -1341,12 +1341,12 @@ function proc(iterator) { **/ var task = newTask(parentEffectId, name, iterator, cont); var mainTask = { name: name, cancel: cancelMain, isRunning: true }; - var taskQueue = forkQueue(name, mainTask, end); + var taskQueue = forkQueue(name, mainTask, end /** cancellation of the main task. We'll simply resume the Generator with a Cancel **/ - function cancelMain() { + );function cancelMain() { if (mainTask.isRunning && !mainTask.isCancelled) { mainTask.isCancelled = true; next(TASK_CANCEL); @@ -1367,11 +1367,11 @@ function proc(iterator) { **/ if (iterator._isRunning && !iterator._isCancelled) { iterator._isCancelled = true; - taskQueue.cancelAll(); + taskQueue.cancelAll /** Ending with a Never result will propagate the Cancellation to all joiners **/ - end(TASK_CANCEL); + ();end(TASK_CANCEL); } } /** @@ -1384,10 +1384,10 @@ function proc(iterator) { iterator._isRunning = true; // kicks up the generator - next(); + next // then return the task descriptor to the caller - return task; + ();return task; /** This is the generator driver @@ -1415,12 +1415,12 @@ function proc(iterator) { /** Cancels the current effect; this will propagate the cancellation down to any called tasks **/ - next.cancel(); + next.cancel /** If this Generator has a `return` method then invokes it This will jump to the finally block **/ - result = is.func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL }; + ();result = is.func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL }; } else if (arg === CHANNEL_END) { // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels) result = is.func(iterator.return) ? iterator.return() : { done: true }; @@ -1481,14 +1481,14 @@ function proc(iterator) { var cb = arguments[3]; var effectId = uid(); - sagaMonitor && sagaMonitor.effectTriggered({ effectId: effectId, parentEffectId: parentEffectId, label: label, effect: effect }); + sagaMonitor && sagaMonitor.effectTriggered({ effectId: effectId, parentEffectId: parentEffectId, label: label, effect: effect } /** completion callback and cancel callback are mutually exclusive We can't cancel an already completed effect And We can't complete an already cancelled effectId **/ - var effectSettled = void 0; + );var effectSettled = void 0; // Completion callback passed to the appropriate effect runner function currCb(res, isErr) { @@ -1545,10 +1545,10 @@ function proc(iterator) { // prettier-ignore return ( // Non declarative effect - is.promise(effect) ? resolvePromise(effect, currCb) : is.helper(effect) ? runForkEffect(wrapHelper(effect), effectId, currCb) : is.iterator(effect) ? resolveIterator(effect, effectId, name, currCb) + is.promise(effect) ? resolvePromise(effect, currCb) : is.helper(effect) ? runForkEffect(wrapHelper(effect), effectId, currCb) : is.iterator(effect) ? resolveIterator(effect, effectId, name, currCb // declarative effects - : is.array(effect) ? runParallelEffect(effect, effectId, currCb) : (data = asEffect.take(effect)) ? runTakeEffect(data, currCb) : (data = asEffect.put(effect)) ? runPutEffect(data, currCb) : (data = asEffect.all(effect)) ? runAllEffect(data, effectId, currCb) : (data = asEffect.race(effect)) ? runRaceEffect(data, effectId, currCb) : (data = asEffect.call(effect)) ? runCallEffect(data, effectId, currCb) : (data = asEffect.cps(effect)) ? runCPSEffect(data, currCb) : (data = asEffect.fork(effect)) ? runForkEffect(data, effectId, currCb) : (data = asEffect.join(effect)) ? runJoinEffect(data, currCb) : (data = asEffect.cancel(effect)) ? runCancelEffect(data, currCb) : (data = asEffect.select(effect)) ? runSelectEffect(data, currCb) : (data = asEffect.actionChannel(effect)) ? runChannelEffect(data, currCb) : (data = asEffect.flush(effect)) ? runFlushEffect(data, currCb) : (data = asEffect.cancelled(effect)) ? runCancelledEffect(data, currCb) : (data = asEffect.getContext(effect)) ? runGetContextEffect(data, currCb) : (data = asEffect.setContext(effect)) ? runSetContextEffect(data, currCb) : /* anything else returned as is */currCb(effect) + ) : is.array(effect) ? runParallelEffect(effect, effectId, currCb) : (data = asEffect.take(effect)) ? runTakeEffect(data, currCb) : (data = asEffect.put(effect)) ? runPutEffect(data, currCb) : (data = asEffect.all(effect)) ? runAllEffect(data, effectId, currCb) : (data = asEffect.race(effect)) ? runRaceEffect(data, effectId, currCb) : (data = asEffect.call(effect)) ? runCallEffect(data, effectId, currCb) : (data = asEffect.cps(effect)) ? runCPSEffect(data, currCb) : (data = asEffect.fork(effect)) ? runForkEffect(data, effectId, currCb) : (data = asEffect.join(effect)) ? runJoinEffect(data, currCb) : (data = asEffect.cancel(effect)) ? runCancelEffect(data, currCb) : (data = asEffect.select(effect)) ? runSelectEffect(data, currCb) : (data = asEffect.actionChannel(effect)) ? runChannelEffect(data, currCb) : (data = asEffect.flush(effect)) ? runFlushEffect(data, currCb) : (data = asEffect.cancelled(effect)) ? runCancelledEffect(data, currCb) : (data = asEffect.getContext(effect)) ? runGetContextEffect(data, currCb) : (data = asEffect.setContext(effect)) ? runSetContextEffect(data, currCb) : /* anything else returned as is */currCb(effect) ); } @@ -1558,10 +1558,11 @@ function proc(iterator) { cb.cancel = cancelPromise; } else if (is.func(promise.abort)) { cb.cancel = function () { - return promise.abort(); + return promise.abort + // TODO: add support for the fetch API, whenever they get around to + // adding cancel support + (); }; - // TODO: add support for the fetch API, whenever they get around to - // adding cancel support } promise.then(cb, function (error) { return cb(error, true); @@ -1614,8 +1615,9 @@ function proc(iterator) { } else { return cb(result); } - }); + } // Put effects are non cancellables + ); } function runCallEffect(_ref4, effectId, cb) { @@ -1706,8 +1708,9 @@ function proc(iterator) { if (taskToCancel.isRunning()) { taskToCancel.cancel(); } - cb(); + cb // cancel effects are non cancellables + (); } function runAllEffect(effects, effectId, cb) { @@ -1984,8 +1987,8 @@ function sagaMiddlewareFactory() { if (sagaMonitor && sagaMonitor.actionDispatched) { sagaMonitor.actionDispatched(action); } - var result = next(action); // hit reducers - sagaEmitter.emit(action); + var result = next(action // hit reducers + );sagaEmitter.emit(action); return result; }; };