-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from TeoTN/deployment
Deployment
- Loading branch information
Showing
125 changed files
with
7,741 additions
and
1,190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
before_install: | ||
- npm install -g babel-cli rimraf | ||
- cd redux-saga-router | ||
- npm install | ||
- cd .. | ||
script: | ||
- npm test -- --coverage | ||
- npm build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"presets": [ | ||
["es2015", { "loose": true }], | ||
"react" | ||
], | ||
"plugins": [ | ||
"transform-class-properties", | ||
"transform-export-extensions" | ||
], | ||
"env": { | ||
"test": { | ||
"plugins": [ | ||
"transform-async-to-generator", | ||
"transform-object-rest-spread" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"extends": [ | ||
"airbnb", | ||
"plugin:import/errors", | ||
"plugin:import/warnings" | ||
], | ||
"settings": { | ||
"import/resolver": "node" | ||
}, | ||
"rules": { | ||
"arrow-parens": 0, | ||
"react/forbid-prop-types": 0, | ||
"react/jsx-filename-extension": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: node_js | ||
node_js: | ||
- "4" | ||
- "5" | ||
- "6" | ||
branches: | ||
only: | ||
- master | ||
- /^greenkeeper.*$/ | ||
script: | ||
- npm run lint | ||
- npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
## v2.0.0 | ||
|
||
### Spawned Route Sagas | ||
|
||
While this is a new major version, there aren't any directly noticeable breaking | ||
changes. Route sagas used to be invoked via the `call` effect. Unfortunately, | ||
`call` is blocking, so long running sagas could prevent other route sagas from | ||
immediately running if the route changed. Another issue is that if a route saga | ||
happened to `fork` or `spawn` a sub saga, there was no way to know when the | ||
route changed to perform cleanup such as cancelling the forked sub saga. | ||
|
||
Thanks to [@victorchabbert](https://github.com/victorchabbert), route sagas are | ||
now spawned via the `spawn` effect. This creates a detached, forked task for | ||
each route saga when its route triggers. Now, when the route changes, Redux Saga | ||
Router will cancel any currently running route saga task, giving you the | ||
opportunity to perform cleanup in your route saga or sub sagas. | ||
|
||
```js | ||
const delay = time => new Promise(resolve => setTimeout(resolve, time)); | ||
|
||
function* autoSaveSaga() { | ||
try { | ||
while (true) { | ||
const data = yield select(getData); | ||
yield call(Api.saveEditor, data); | ||
yield call(delay, 5000); | ||
} | ||
} finally { | ||
if (yield cancelled()) { | ||
// do some other cleanup | ||
} | ||
} | ||
} | ||
|
||
const routes = { | ||
'/editor': function* editorSaga() { | ||
try { | ||
yield fork(autoSaveSaga); | ||
} finally { | ||
if (yield cancelled()) { | ||
// do some cleanup | ||
} | ||
} | ||
}, | ||
}; | ||
|
||
function* mainSaga() { | ||
yield* router(history, routes); | ||
} | ||
``` | ||
|
||
Because the behavior of route sagas has slightly changed, this could impact your | ||
application. For example, if you have a route saga that fetches some data from | ||
an API and the route suddenly changes, Redux Saga Router used to wait for the | ||
data to come back and the currently running saga to complete before starting the | ||
new route saga. Now, Redux Saga Router will cancel the running saga even if the | ||
data hasn't come back yet. This new behavior actually makes more sense because | ||
there is no reason to complete fetching the data or delay letting the new route | ||
saga run. If you used to depend on the previous behavior, though, then Redux | ||
Saga Router could break your app. Therefore, this release was a major bump so | ||
you can ensure your route sagas are safe before upgrading. | ||
|
||
--- | ||
|
||
## v1.1.0 | ||
|
||
- Support redux-saga 0.14.x, 0.13.x, and 0.12.x | ||
|
||
--- | ||
|
||
## v1.0.1 | ||
|
||
- Internal implementation tweaks | ||
|
||
--- | ||
|
||
## v1.0.0 | ||
|
||
- Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016 Jeremy Fairbank | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.