feature(deps): bump barracks (#249)

Adds support for https://github.com/yoshuawuyts/barracks/pull/59
This commit is contained in:
Yoshua Wuyts
2016-09-07 19:00:16 +02:00
committed by GitHub
parent 0c5babd300
commit fd0aaf9ca3
3 changed files with 18 additions and 4 deletions
+9
View File
@@ -1,3 +1,12 @@
## `3.3.0`
Yay, `plugins` now support `wrappers` which is a segway onto HMR, time travel
and other cool plugins. These changes have come through in barracks `v8.3.0`
and a lil fix in `v8.3.1`. This is a lil patch before `4.0.0` comes through,
but should be super valuable. Wooh!
### changes
- updated barracks to `v8.3.1`
## `3.2.0` ## `3.2.0`
Wooh, `plugins` are a first class citizen now thanks to the `.use()` API. It's Wooh, `plugins` are a first class citizen now thanks to the `.use()` API. It's
a multiplexed version of the old `app = choo(hooks)`. It should enable a multiplexed version of the old `app = choo(hooks)`. It should enable
+8 -3
View File
@@ -400,7 +400,7 @@ DOM](#does-choo-use-a-virtual-dom).
Sometimes it's necessary to change the way `choo` itself works. For example to Sometimes it's necessary to change the way `choo` itself works. For example to
report whenever an action is triggered, handle errors globally or perist state report whenever an action is triggered, handle errors globally or perist state
somewhere. This is done through something called `plugins`. Plugins are objects somewhere. This is done through something called `plugins`. Plugins are objects
that contain `hook` functions and are passed to `app.use()`: that contain `hook` and `wrap` functions and are passed to `app.use()`:
```js ```js
const log = require('choo-log') const log = require('choo-log')
@@ -423,7 +423,7 @@ frameworks a lot harder. Please exhaust all other options before using
plugins.__ plugins.__
If you want to learn more about creating your own `plugins`, and which `hooks` If you want to learn more about creating your own `plugins`, and which `hooks`
are available, head on over to [app.use()](#appusehooks). and `wrappers` are available, head on over to [app.use()](#appusehooks).
## Badges ## Badges
Using `choo` in a project? Show off which version you've used using a badge: Using `choo` in a project? Show off which version you've used using a badge:
@@ -489,7 +489,7 @@ way `choo` works, adding custom behavior and listeners. Generally returning
objects of `hooks` is done by returning them from functions (which we call objects of `hooks` is done by returning them from functions (which we call
`plugins` throughout the documentation). `plugins` throughout the documentation).
There are several `hooks` that are picked up by `choo`: There are several `hooks` and `wrappers` that are picked up by `choo`:
- __onError(err, state, createSend):__ called when an `effect` or - __onError(err, state, createSend):__ called when an `effect` or
`subscription` emit an error. If no handler is passed, the default handler `subscription` emit an error. If no handler is passed, the default handler
will `throw` on each error. will `throw` on each error.
@@ -497,6 +497,11 @@ There are several `hooks` that are picked up by `choo`:
`action` is fired. `action` is fired.
- __onStateChange(data, state, prev, caller, createSend):__ called after a - __onStateChange(data, state, prev, caller, createSend):__ called after a
reducer changes the `state`. reducer changes the `state`.
- __wrapSubscriptions(fn):__ wraps a `subscription` to add custom behavior
- __wrapReducers(fn):__ wraps a `reducer` to add custom behavior
- __wrapEffects(fn):__ wraps an `effect` to add custom behavior
- __wrapInitialState(fn):__ mutate the complete initial `state` to add custom
behavior - useful to mutate the state before starting up
__:warning: Warning :warning:: plugins should only be used as a last resort. __:warning: Warning :warning:: plugins should only be used as a last resort.
It creates peer dependencies which makes upgrading versions and switching It creates peer dependencies which makes upgrading versions and switching
+1 -1
View File
@@ -36,7 +36,7 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"barracks": "^8.1.1", "barracks": "^8.3.1",
"document-ready": "~1.0.2", "document-ready": "~1.0.2",
"global": "^4.3.0", "global": "^4.3.0",
"hash-match": "^1.0.2", "hash-match": "^1.0.2",